From 93a51766aaca50cfbcbedca780e935ce66c12d73 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Wed, 22 Aug 2018 18:57:24 -0600 Subject: x86/acpi: Add ACPI table revision function Use a single function to set ACPI table versions. This allows us to keep revisions synced to the correct levels for coreboot. This is a partial fix for the bug: FAILED [MEDIUM] SPECMADTFADTRevisions: Test 2, MADT revision is not in sync with the FADT revision; MADT 1 expects FADT 3.0 but found 4.0 instead. BUG=b:112476331 TEST-Run FWTS Change-Id: Ie9a486380e72b1754677c3cdf8190e3ceff9412b Signed-off-by: Marc Jones Reviewed-on: https://review.coreboot.org/28276 Reviewed-by: Martin Roth Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/acpi.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 40fbd548d8..52245ee9be 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -76,6 +76,18 @@ enum coreboot_acpi_ids { COREBOOT_ACPI_ID_MAX = 0xFFFF, /* BOOTFFFF */ }; +/* Table 5-30 DESCRIPTION_HEADER Signatures for tables defined by ACPI 6.2a + * Additional tables mssing in 5-30: MADT, RSDP, VFCT, NHLT + */ +enum acpi_tables { + APIC, BERT, BGRT, CPEP, DSDT, ECDT, EINJ, ERST, FACP, FADT, FACS, + FPDT, GTDT, HEST, MSCT, MPST, NFIT, OEMX, PCCT, PMTT, PSDT, RASF, + RSDT, SBST, SDEV, SLIT, SRAT, SSDT, XSDT, BOOT, CSRT, DBG2, DBGP, + DMAR, DPPT, DRTM, ETDT, HPET, IBFT, IORT, IVRS, LPIT, MCFG, MCHI, + MSDM, SDEI, SLIC, SPCR, SPMI, STAO, TCPA, TPM2, WAET, WDAT, WDRT, + WPBT, WSMT, XENV, MADT, RSDP, VFCT, NHLT +}; + /* RSDP (Root System Description Pointer) */ typedef struct acpi_rsdp { char signature[8]; /* RSDP signature */ @@ -845,6 +857,12 @@ static inline uintptr_t acpi_align_current(uintptr_t current) return ALIGN(current, 16); } +/* ACPI table revisions should match the revision of the ACPI spec + * supported. This function keeps the table versions synced. This could + * be made into a weak function if there is ever a need to override the + * coreboot default ACPI spec version supported. */ +int get_acpi_table_revision(enum acpi_tables table); + #endif // !defined(__ASSEMBLER__) && !defined(__ACPI__) && !defined(__ROMC__) #endif /* __ASM_ACPI_H */ -- cgit v1.2.3