[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    [PATCH 1/3] acpi: hest: add checks for GHES_ASSIST flag value in ACPI 6.2 (mantis 1674)
From:       Alex Hung <alex.hung () canonical ! com>
Date:       2017-06-22 23:50:35
Message-ID: 1498175437-27584-1-git-send-email-alex.hung () canonical ! com
[Download RAW message or body]

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/acpi/hest/hest.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/acpi/hest/hest.c b/src/acpi/hest/hest.c
index 08b60ce..4d10726 100644
--- a/src/acpi/hest/hest.c
+++ b/src/acpi/hest/hest.c
@@ -101,6 +101,22 @@ static void hest_check_ia32_arch_machine_check_exception(
 	fwts_log_info_verbatim(fw, "  Reserved:                 0x%2.2" PRIx8, exception->reserved2[6]);
 	fwts_log_nl(fw);
 
+	if (exception->flags & ~0x5) {
+		fwts_failed(fw, LOG_LEVEL_MEDIUM,
+			"HESTIA32FlagsReserved",
+			"HEST IA-32 Architecture MCE Flags Reserved bits "
+			"[1] & [3:7] must be zero, instead got 0x%" PRIx8,
+			exception->flags);
+		*passed = false;
+	} else if (exception->flags == 0x5) {
+		fwts_failed(fw, LOG_LEVEL_HIGH,
+			"HESTIA32BadFlags",
+			"HEST IA-32 Architecture MCE Flags bits [0] & [2] "
+			"are mutually exclusive, instead got 0x%" PRIx8,
+			exception->flags);
+		*passed = false;
+	}
+
 	for (i = 0; i < exception->number_of_hardware_banks; i++) {
 		fwts_acpi_table_hest_machine_check_bank *bank = &exception->bank[i];
 
@@ -208,6 +224,22 @@ static void hest_check_ia32_arch_corrected_machine_check(
 	fwts_log_info_verbatim(fw, "  Reserved:                 0x%2.2" PRIx8, check->reserved2[2]);
 	fwts_log_nl(fw);
 
+	if (check->flags & ~0x5) {
+		fwts_failed(fw, LOG_LEVEL_MEDIUM,
+			"HESTIA32CorrectedMachineCheckFlagsReserved",
+			"HEST IA-32 Architecture MC Flags Reserved bits "
+			"[1] & [3:7] must be zero, instead got 0x%" PRIx8,
+			check->flags);
+		*passed = false;
+	} else if (check->flags == 0x5) {
+		fwts_failed(fw, LOG_LEVEL_HIGH,
+			"HESTIA32CorrectedMachineCheckBadFlags",
+			"HEST IA-32 Architecture MC Flags bits [0] & [2] "
+			"are mutually exclusive, instead got 0x%" PRIx8,
+			check->flags);
+		*passed = false;
+	}
+
 	if (check->notification.type > 11) {
 		*passed = false;
 		fwts_failed(fw, LOG_LEVEL_HIGH,
-- 
2.7.4


-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic