summaryrefslogtreecommitdiff
path: root/src/arch/x86/boot
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-10-10 20:40:41 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-11 09:56:09 +0200
commit9310df8d0351842e7bb9efe3cabc0ff82ec99c53 (patch)
tree8161366232dc3119fb3cfb52325ccd0d72a1382b /src/arch/x86/boot
parent0a66991a345f437e957ecc0ddeed70bc304d2a43 (diff)
acpi: Don't add an empty SSDT.
It's harmless but useless. Change-Id: Iaaa5f6933d120a2071b2e32e62e36e63afa96be3 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7043 Reviewed-by: Aaron Durbin <adurbin@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/x86/boot')
-rw-r--r--src/arch/x86/boot/acpi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index ea656664d9..b9fbc8162e 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -749,9 +749,11 @@ unsigned long write_acpi_tables(unsigned long start)
printk(BIOS_DEBUG, "ACPI: * SSDT\n");
ssdt = (acpi_header_t *)current;
acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
- ALIGN_CURRENT;
+ if (ssdt->length > sizeof(acpi_header_t)) {
+ current += ssdt->length;
+ acpi_add_table(rsdp, ssdt);
+ ALIGN_CURRENT;
+ }
printk(BIOS_DEBUG, "ACPI: * MCFG\n");
mcfg = (acpi_mcfg_t *) current;