cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jcleavitt
Observer
Observer
4,072 Views
Registered: ‎05-25-2017

Zynq Ultrascale + ES2 enable ecc on OCM

Jump to solution

I'm trying to get the ecc enabled on the OCM. The trm says that it needs to be initialized at boot time so I have tried putting the relevant code to write the OCM_ECC_CTRL.ECC_ON_OFF bit to a 1 as well as doing the same thing in the psu_init.tcl file and I cannot get it to turn on. Just for kicks I also tried turning it on in software and that did not work either. Any help or suggestions that anyone has would be appreciated.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
jcleavitt
Observer
Observer
6,127 Views
Registered: ‎05-25-2017

I figured out how to turn on the ECC for the OCM. It does indeed need to be initialized at boot, but the First Stage Bootloader is stored on the OCM so it has to be initialized before the FSBL. I created a PMU firmware project in the SDK and followed the instructions in the TRM for enabling the ECC as well as error response (pg. 462 steps 1 & 2, step 3 can by default be ignored). I did all of this in the xpfw_user_startup.c file, in the XPfw_UserStartUP function, before all the calls to the different Mod functions. I ran that in bare metal on the board and then afterwards ran my baremetal software test code and read from the indicated registers and lo and behold it was on!

View solution in original post

0 Kudos
8 Replies
austin
Scholar
Scholar
4,024 Views
Registered: ‎02-27-2008

j,

 

How do you know it is not on?

 

Have you checked to see what else may be setting that register?

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
jcleavitt
Observer
Observer
4,013 Views
Registered: ‎05-25-2017

Austin,

 

I don't know for sure that it is not on, but according to the trm if it is on, the OCM_ECC_CTRL.ECC_ON_OFF bit will be set. I have read the register and that bit is not set. I have looked in various places and have been unable to find any other instance of that register being modified. Do you have any suggestions of how to turn it on?

 

Thanks

0 Kudos
austin
Scholar
Scholar
4,003 Views
Registered: ‎02-27-2008

j,

 

I suggest a total bare-metal test program.  Just a modified 'hello world' with no OS.  According to the documentation, this should be as simple as setting the bit.  Then testing it by error insertion should result in an interrupt (which requires an interrupt handler and more code).

 

I suspect if an OS is being loaded, it is setting the ECC off.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
jcleavitt
Observer
Observer
3,957 Views
Registered: ‎05-25-2017

Austin,

this is a bare metal program that I am writing and running on the R5 processor. I am literally following the instructions in the TRM on page 462-463 regarding turning the ECC on. I am not attempting any fault injection as of yet because when I read the OCM_ECC_CTRL after writing the zeroth bit to turn ECC on, that bit is not set. Do you have any other suggestions?

 

-J

0 Kudos
austin
Scholar
Scholar
3,955 Views
Registered: ‎02-27-2008

j,

 

No, I do not.  All features work (unless noted in the errata), so not sure why your situation is not working.

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
jcleavitt
Observer
Observer
3,939 Views
Registered: ‎05-25-2017

Austin, 

Could you maybe shed some light on this for me? in the online register reference for the OCM_ECC_CTRL register, the description for the ECC_ON_OFF bit say this: "ON/OFF control of ECC port 1 = on ; 0 = OFF. This bit should be initialized during system boot. It should not be changed while OCM is in use." Would this need to happen in the first stage bootloader?

-J

 

0 Kudos
austin
Scholar
Scholar
3,937 Views
Registered: ‎02-27-2008

j,

 

Reading that implies to me that it should be set before the OCM is to be used.  A convenient place for that is in the first stage boot loader which defines all of the PS features.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
jcleavitt
Observer
Observer
6,128 Views
Registered: ‎05-25-2017

I figured out how to turn on the ECC for the OCM. It does indeed need to be initialized at boot, but the First Stage Bootloader is stored on the OCM so it has to be initialized before the FSBL. I created a PMU firmware project in the SDK and followed the instructions in the TRM for enabling the ECC as well as error response (pg. 462 steps 1 & 2, step 3 can by default be ignored). I did all of this in the xpfw_user_startup.c file, in the XPfw_UserStartUP function, before all the calls to the different Mod functions. I ran that in bare metal on the board and then afterwards ran my baremetal software test code and read from the indicated registers and lo and behold it was on!

View solution in original post

0 Kudos