@@ -1091,6 +1091,10 @@ static int madt_gicc(fwts_framework *fw,
mask = 0xfffffff8;
start = 3;
}
+ if (hdr->length == 82) { /* ACPI 6.5 */
+ mask = 0xfffffff0;
+ start = 4;
+ }
if (gic->flags & mask)
fwts_failed(fw, LOG_LEVEL_MEDIUM,
"MADTGICFLags",
@@ -1103,6 +1107,15 @@ static int madt_gicc(fwts_framework *fw,
"properly set to zero.",
madt_sub_names[hdr->type], start);
+ if (hdr->length == 82) { /* ACPI 6.5 */
+ /* If the Enabled bit is set, Online Capable bit is reserved and must be zero. */
+ if ((gic->flags & 1) && (gic->flags & (1 << 3)))
+ fwts_failed(fw, LOG_LEVEL_MEDIUM,
+ "MADTGICBadFLag",
+ "MADT %s, flags, if Enable bit is set, the Online Capable bit "
+ "is reserved and must be zero.",madt_sub_names[hdr->type]);
+ }
+
if (gic->parking_protocol_version != 0 &&
gic->parking_protocol_version != 1)
fwts_failed(fw, LOG_LEVEL_MEDIUM,
BugLink:https://bugs.launchpad.net/fwts/+bug/2047212 Add MADT GICC new flags and length change in ACPI 6.5 Signed-off-by: Ivan Hu <ivan.hu@canonical.com> --- src/acpi/madt/madt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)