cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rgetz
Observer
Observer
5,297 Views
Registered: ‎05-03-2011

pstore, or ramoops on zynq's OCM yet?

I was wondering if anyone had implemented pstore, or ramoops on zynq's OCM yet?

 

Some background:

https://www.kernel.org/doc/Documentation/ramoops.txt

Ramoops is an oops/panic logger that writes its logs to RAM before the system
crashes. It works by logging oopses and panics in a circular buffer. Ramoops
needs a system with persistent RAM so that the content of that area can
survive after a restart.

https://www.kernel.org/doc/Documentation/ABI/testing/pstore

Platforms that provide a mechanism to preserve some data
across system reboots can register with this driver to
provide a generic interface to show records captured in
the dying moments.  In the case of a panic the last part
of the console log is captured, but other interesting
data can also be saved.

The goal would be to store info about a crashing kernel, into the Zynq On Chip Memory, and then have that memory survive a re-boot, (not get clobbered by the FSBL, or U-Boot, or a Booting kernel).

 

I couldn't find any info on OCM during boot, and how much is used, to see if this was practical.

 

We would like to do this before we send Alpha units into the field - so we can gather crash info easier.

 

-Robin

0 Kudos
Reply
3 Replies
rgetz
Observer
Observer
5,201 Views
Registered: ‎05-03-2011

After this sat unanswered for a bit, someone suggested by email :

----
do FSBL readelf to see how much space in OCM you have but I expect not so much space in empty.
Also question is how much space you need.

Also you can use DDR because content survive restart. You can't just rewrite it by Linux/U-Boot or by images in boot flow.
------

Will check out the FSBL elf - thanks for tip. I was more concerned about stack and BSS, (segments that can grow outside the linker definitions),

My limited understanding of DDR3 is that it is required to go through a reset state during power up, and any time the FSBL initializes the DDR3 controller - a DDR3 reset will occur.

I was hoping that someone had something like this NXP document for Zynq.
http://www.nxp.com/files/32bit/doc/app_note/AN4531.pdf

? Anyone know of anything like that?

Thanks
- Robin


0 Kudos
Reply
rgetz
Observer
Observer
4,894 Views
Registered: ‎05-03-2011

Anyone? Anyone?
0 Kudos
Reply
rgetz
Observer
Observer
4,883 Views
Registered: ‎05-03-2011

Was just informed that due to secure boot, the on-chip bootrom clears all the OCM. So - that will not work.

So - mtd_oops it is.
0 Kudos
Reply