[PATCH 4/4] acpi: rsdp: revision 1 must have length 20 according to ACPI 6.1 errata

Alex Hung alex.hung at canonical.com
Fri Jun 16 04:41:53 UTC 2017


Spec update (mantis 1664) clearly points out length of revision 1 is 20,
and no fields are beyond offset 19

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

diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c
index a084d9c..becdbb2 100644
--- a/src/acpi/rsdp/rsdp.c
+++ b/src/acpi/rsdp/rsdp.c
@@ -102,6 +102,19 @@ static int rsdp_test1(fwts_framework *fw)
 			"firmware ACPI complaint.");
 	}
 
+	/* ACPI 6.1 errata clarifies revision 1 must have length 20 */
+	if (rsdp->revision == 1) {
+		if (rsdp->length == 20)
+			fwts_passed(fw, "RSDP: the table is the correct length.");
+		else
+			fwts_failed(fw, LOG_LEVEL_MEDIUM,
+				"RSDPBadLength",
+				"RSDP: length of Revision 1 is %d bytes but should be 20.",
+				rsdp->length);
+
+		return FWTS_OK;
+	}
+
 	if (rsdp->revision <= 2)
 		fwts_passed(fw,
 			    "RSDP: revision is %" PRIu8 ".", rsdp->revision);
-- 
2.7.4




More information about the fwts-devel mailing list