[PATCH] acpi: fadt: add PERSISTENT_CPU_CACHES bits to fixed feature flags (mantis 2206)

Ivan Hu ivan.hu at canonical.com
Fri Dec 22 10:05:04 UTC 2023


BugLink:https://bugs.launchpad.net/fwts/+bug/2047212
This is new to ACPI 6.5

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/acpi/fadt/fadt.c        | 12 +++++++++++-
 src/lib/include/fwts_acpi.h |  3 ++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
index 346fccbd..c402506d 100644
--- a/src/acpi/fadt/fadt.c
+++ b/src/acpi/fadt/fadt.c
@@ -151,7 +151,17 @@ static int fadt_info(fwts_framework *fw)
 		  fadt->flags & FWTS_FACP_FLAG_HW_REDUCED_ACPI);
 	flag_info(fw, "LOW_POWER_S0_IDLE_CAPABLE",
 		  fadt->flags & FWTS_FACP_FLAG_LOW_POWER_S0_IDLE_CAPABLE);
-
+		  
+	if ((fadt->flags & FWTS_FACP_FLAG_PERSISTENT_CPU_CACHES) == 0)
+		fwts_log_info(fw, "     PERSISTENT_CPU_CACHES is not reported");
+	else if ((fadt->flags & FWTS_FACP_FLAG_PERSISTENT_CPU_CACHES) == FWTS_FACP_FLAG_PERSISTENT_CPU_CACHES) {
+		fwts_failed(fw, LOG_LEVEL_HIGH,
+			    "FADTCPUCACHESRESERVED",
+			    "FADT persistent cpu caches value 11b should be reserved.");
+	} else {
+		fwts_log_info(fw, "     PERSISTENT_CPU_CACHES is 0x%" PRIx8,
+		(fadt->flags & FWTS_FACP_FLAG_PERSISTENT_CPU_CACHES) >> 22);
+	}
 	fwts_log_info(fw, "FADT: IA-PC Boot Architecture flag states");
 	flag_info(fw, "LEGACY_DEVICES", fadt->iapc_boot_arch &
 		  FWTS_FACP_IAPC_BOOT_ARCH_LEGACY_DEVICES);
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index 2d7bacd1..b4671b06 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -56,7 +56,8 @@
 #define FWTS_FACP_FLAG_FORCE_APIC_PHYSICAL_DESTINATION_MODE	(0x00080000)
 #define FWTS_FACP_FLAG_HW_REDUCED_ACPI				(0x00100000)
 #define FWTS_FACP_FLAG_LOW_POWER_S0_IDLE_CAPABLE		(0x00200000)
-#define FWTS_FACP_FLAG_RESERVED_MASK				(0xffc00000)
+#define FWTS_FACP_FLAG_PERSISTENT_CPU_CACHES			(0x00c00000)
+#define FWTS_FACP_FLAG_RESERVED_MASK				(0xff000000)
 
 #define FWTS_FACP_IAPC_BOOT_ARCH_LEGACY_DEVICES		(0x0001)
 #define FWTS_FACP_IAPC_BOOT_ARCH_8042			(0x0002)
-- 
2.34.1




More information about the fwts-devel mailing list