Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44868 )
Change subject: trogdor: report hardware watchdog reset after reboot ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/44868/1/src/soc/qualcomm/sc7180/soc... File src/soc/qualcomm/sc7180/soc.c:
https://review.coreboot.org/c/coreboot/+/44868/1/src/soc/qualcomm/sc7180/soc... PS1, Line 27: volatile unsigned int aoss = *(unsigned int *)AOSS_CC_RESET_STATUS; Guys, how many drivers have we landed by now? You *know* this is not how to do register accesses in coreboot! Please stop making me ask for the same things over and over again in every new patch. :/
There is already a struct sc7180_aoss in <soc/clock.h>, please add this register there and then put a function in the clock driver to access it, e.g. bool clock_last_reset_was_watchdog(void) or something like that. Then call that function from here to decide whether to log the event.
https://review.coreboot.org/c/coreboot/+/44868/1/src/soc/qualcomm/sc7180/soc... PS1, Line 30: printk(BIOS_INFO, "AOSS_CC_RESET_STATUS[%x]..[%x]\n", AOSS_CC_RESET_STATUS, aoss); This doesn't work for me -- even if the reboot was a watchdog, the register seems to contain a 0. Does it work for you?
To test, I do:
stop daisydog cat > /dev/watchdog
then I press Ctrl+D and wait for the timeout.