-
Notifications
You must be signed in to change notification settings - Fork 195
Add a patch for printing the AMD Zen CPU reset reason #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
If I intentionally trigger a CPU soft reset I see this: ``` admin@gold208-dut:~$ sudo dmesg | grep -i reason [ 0.635233] x86/amd: Previous system reset reason [0x00080800]: software wrote 0x6 to reset control register 0xCF9 ``` If I intentionally trigger the CPU FCH Watchdog, I see this: ``` admin@gold208-dut:~$ sudo dmesg | grep reason [ 0.632563] x86/amd: Previous system reset reason [0x02000800]: hardware watchdog timer expired ``` Upstream from here: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=ab8131028710d009ab93d6bffd2a2749ade909b0 The patch had to be adapted to v6.1 we're using, that was basically adding the entire contents (5 constants) of `fch.h` as the file didn't exist in v6.1, and updating the patch for `amd.c` for context.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
How can these events be triggered? |
| From: Yazen Ghannam <[email protected]> | ||
| Date: Tue, 22 Apr 2025 18:48:30 -0500 | ||
| Subject: [PATCH 1/2] x86/CPU/AMD: Print the reason for the last reset | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the upstream commit hash as done for stable series commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @paulmenzel , please take a look at 46ca756 to see if that is what you had in mind.
As I understand it, writing 0x6 to 0xcf9 is a standard way of reboting an x86 CPU. I can trigger this with Triggering the FCH watchdog on SONiC with an AMD Zen3 CPU, I can do by enabling the watchdog and never petting it. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Upstream commits:
The patch had to be adapted to v6.1 we're using, that was basically adding the entire contents (5 constants) of
fch.has the file didn't exist in v6.1, and updating the patch foramd.cfor context.Testing
If we intentionally trigger a CPU soft reset (with
sudo reboot -f) I see this:If we intentionally trigger the CPU FCH Watchdog, I see this:
To enable watchdog we create a
/etc/systemd/system.conf.d/override.confwith the contents:
To trigger the watchdog:
sudo tee /dev/watchdog1and enter just one character and let the device be for a minute or so.