[RFC PATCH 0/3] ACPI, x86/cpu/amd: Parse S5_REST_STATUS from ACPI PHAT on supported AMD platforms
From: K Prateek Nayak
Date: Wed Jun 03 2026 - 02:40:26 EST
x86/cpu/amd bits uses the FCH register to read the S5_RESET_STATUS which
is known to be inaccurate on some configurations where the firmware can
consume the status before the OS boots.
Vilas and Yazen noted that the ACPI PHAT table has a read-only shadow
copy of this state and is the preferred way for OS to consume the S5
Reset Status.
Introduce generic helpers to parse ACPI PHAT records and use the
platform specific helpers to interpret the vendor specific reset reason
records.
Since these records are read-only, the status cannot be cleared once
consumed and the last reset reason will persist across kxec until next
reset which reintroduces the case prevented by commit e6416c2dfe23c
("x86/CPU/AMD: Prevent reset reasons from being retained across reboot")
by clearing the FCH register once consumed.
This can be avoided with a boolean flags passed over as setup data
during kexec but this scheme adds unnecessary complexity in
implementation that has been left out for now.
Patches are based on:
git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpi
at commit 3109f9f38800 ("ACPI: button: Add missing device class clearing
on probe failures") (tag: 'acpi-7.1-rc6')
Series has been tested on both, a Zen4 platform that does not contain
the PHAT record, and a Zen5 platform that contains the PHAT record.
The Zen5 platform was also tested with CONFIG_ACPI_PHAT disabled to
confirm that logic correctly falls back to reading the FCH register.
x86 folks have been Cc'd only on the Cover letter and the x86 bits. ACPI
folks, my fellow AMD colleagues, and the lists should have received the
entire series. If you would like to be Cc'd on the full series for
future posting, please let me know. Sorry in advance for any oversight!
---
K Prateek Nayak (3):
ACPICA: actbl2.h: ACPI 6.5: PHAT: Add more struct definitions
ACPI: PHAT: Add generic helper to parse PHAT records
x86/cpu/amd: Fetch S5_RESET_STATUS from PHAT when supported
arch/x86/kernel/cpu/amd.c | 34 ++++++++++
drivers/acpi/Kconfig | 11 ++++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_phat.c | 133 ++++++++++++++++++++++++++++++++++++++
include/acpi/actbl2.h | 14 ++++
include/linux/acpi.h | 14 ++++
6 files changed, 207 insertions(+)
create mode 100644 drivers/acpi/acpi_phat.c
base-commit: 3109f9f38800841e46769e95e1ba11f1f8c7b230
--
2.34.1