[U-Boot] Getting the reboot/reset reason through to the kernel

Hi List,
Sorry for a vague general post.
I know that a number of SoCs have a reset reason register so that they can distinguish between power-on reset vs reset line input vs watchdog timer etc.
Is there any standard thing in u-boot that looks at these to "do stuff" e.g. to put peripherals through a manual reset or skip certain parts of init.
Is there any standard way of getting this to the Linux kernel and ultimately to userspace to generate a log?
Searching for "linux reboot reason" naturally leads to a zillion results of people wanting to know why their server/laptop crashed so my duckduckgo-fu (yeah I'm trying to make that a thing) is failing me.
Thanks, Chris

On Wed, Jun 12, 2019 at 11:18 AM Chris Packham judge.packham@gmail.com wrote:
Hi List,
Sorry for a vague general post.
I know that a number of SoCs have a reset reason register so that they can distinguish between power-on reset vs reset line input vs watchdog timer etc.
Is there any standard thing in u-boot that looks at these to "do stuff" e.g. to put peripherals through a manual reset or skip certain parts of init.
Is there any standard way of getting this to the Linux kernel and ultimately to userspace to generate a log?
Searching for "linux reboot reason" naturally leads to a zillion results of people wanting to know why their server/laptop crashed so my duckduckgo-fu (yeah I'm trying to make that a thing) is failing me.
One lead I did find was that it looks like the keymile kmp204x board(s) read this info out of the RSTRQSR register and stashes it into a FPGA register. Not sure if this just drives a LED or if there's something else that reads this info back later.
participants (1)
-
Chris Packham