Linux 6.16 introduced the ability to report the cause of AMD system resets/reboots thanks to specialized information available on AMD Zen platforms for indicating the detected cause of previous resets. This is a handy addition and the information is automatically reported to the kernel log on the next system boot, but in some instances that information could be stale/inaccurate. Today’s Linux 6.18-rc2 will fix that.
Sent out today were the x86/urgent changes for Linux 6.18-rc2, which is due to be released later today. There are a few x86 fixes for the week while worth mentioni…
Linux 6.16 introduced the ability to report the cause of AMD system resets/reboots thanks to specialized information available on AMD Zen platforms for indicating the detected cause of previous resets. This is a handy addition and the information is automatically reported to the kernel log on the next system boot, but in some instances that information could be stale/inaccurate. Today’s Linux 6.18-rc2 will fix that.
Sent out today were the x86/urgent changes for Linux 6.18-rc2, which is due to be released later today. There are a few x86 fixes for the week while worth mentioning is the change to reset the “why-the-system-rebooted” register on AMD Zen platforms to avoid stale bits around previous boots.
The fix by AMD engineer Rong Zhang explains how sometimes the bits might not be cleared by the hardware or in some rare code paths the register not updated. In those cases it could lead to stale/inaccurate information being reported:
“The S5_RESET_STATUS register is parsed on boot and printed to kmsg. However, this could sometimes be misleading and lead to users wasting a lot of time on meaningless debugging for two reasons:
* Some bits are never cleared by hardware. It’s the software’s responsibility to clear them as per the Processor Programming Reference.
* Some rare hardware-initiated platform resets do not update the register at all.
In both cases, a previous reboot could leave its trace in the register, resulting in users seeing unrelated reboot reasons while debugging random reboots afterward.
Write the read value back to the register in order to clear all reason bits since they are write-1-to-clear while the others must be preserved.“
This change is set to be merged today ahead of the Linux 6.18-rc2 release. It’s also marked for back-porting to stable, which means going back to just the Linux 6.17 series as Linux 6.16 is already EOL.