[PATCH] acpi: update MADT GIC Distributor Structure and related tests
Alex Hung
alex.hung at canonical.com
Tue Jul 21 06:15:53 UTC 2015
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/acpidump/acpidump.c | 3 ++-
src/acpi/madt/madt.c | 5 +++--
src/lib/include/fwts_acpi.h | 3 ++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index 25c795b..9ff28cb 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -978,7 +978,8 @@ static void acpidump_madt(fwts_framework *fw, const fwts_acpi_table_info *table)
FIELD_UINT(" GIC ID", fwts_acpi_madt_gicd, gic_id),
FIELD_UINT(" Phys. Base. Addr",fwts_acpi_madt_gicd, physical_base_address),
FIELD_UINT(" Sys Vector Base", fwts_acpi_madt_gicd, system_vector_base),
- FIELD_UINT(" Reserved", fwts_acpi_madt_gicd, reserved2),
+ FIELD_UINT(" GIC Version", fwts_acpi_madt_gicd, gic_version),
+ FIELD_UINTS(" Reserved", fwts_acpi_madt_gicd, reserved2),
};
__acpi_dump_table_fields(fw, data, fields_madt_gicd, offset);
skip = sizeof(fwts_acpi_madt_gicd);
diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index d32581d..8afceb6 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -239,6 +239,7 @@ static int madt_test1(fwts_framework *fw)
break;
case FWTS_ACPI_MADT_GIC_D_GOC_DISTRIBUTOR: {
fwts_acpi_madt_gicd *gicd = (fwts_acpi_madt_gicd*)data;
+ uint32_t gicd_reserve2 = gicd->reserved2[0] + (gicd->reserved2[1] << 4) + (gicd->reserved2[2] << 8);
if (gicd->reserved) {
passed = false;
@@ -247,12 +248,12 @@ static int madt_test1(fwts_framework *fw)
"MADT GIC Distributor Structure reserved field should be zero, "
"instead got 0x%" PRIx32 ".", gicd->reserved);
}
- if (gicd->reserved2) {
+ if (gicd_reserve2) {
passed = false;
fwts_failed(fw, LOG_LEVEL_LOW,
"MADTGICDReserved2NonZero",
"MADT GIC Distributor Structure second reserved field should be zero, "
- "instead got 0x%" PRIx32 ".", gicd->reserved2);
+ "instead got 0x%" PRIx32 ".", gicd_reserve2);
}
}
skip = sizeof(fwts_acpi_madt_gicd);
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index 61f7129..aa7c1a3 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -481,7 +481,8 @@ typedef struct {
uint32_t gic_id;
uint64_t physical_base_address;
uint32_t system_vector_base;
- uint32_t reserved2;
+ uint8_t gic_version;
+ uint8_t reserved2[3];
} __attribute__ ((packed)) fwts_acpi_madt_gicd;
/* New in ACPI 5.1, GIC MSI Frame structure, 5.2.12.16 */
--
1.9.1
More information about the fwts-devel
mailing list