From 0dee57837b213c4c3f61feecb24a98bcb9b0fb85 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Mon, 13 Jul 2015 21:03:10 -0500 Subject: AMD K8: Avoid duplicate variables in SSDT on multisocket systems Related-to: I3175c8b29e94a27a2db6b11f8fc9e1d91bde11f9 (ACPI: Fix corrupt SSDT table on multiprocessor AMD Family 10h systems) Change-Id: I0b5f265278d90cbaeddc6fc4432933856050f784 Signed-off-by: Jonathan A. Kollasch Reviewed-on: http://review.coreboot.org/10912 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/northbridge/amd/amdk8/acpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/northbridge/amd/amdk8') diff --git a/src/northbridge/amd/amdk8/acpi.c b/src/northbridge/amd/amdk8/acpi.c index 10228cfa94..ce49b9021c 100644 --- a/src/northbridge/amd/amdk8/acpi.c +++ b/src/northbridge/amd/amdk8/acpi.c @@ -282,6 +282,17 @@ static void k8acpi_write_pci_data(int dlen, const char *name, int offset) { void k8acpi_write_vars(device_t device) { + /* + * If more than one physical CPU is installed k8acpi_write_vars() + * is called more than once. If we don't prevent it, a SSDT table + * with duplicate variables will cause some ACPI parsers to be + * confused enough to fail. + */ + static uint8_t ssdt_generated = 0; + if (ssdt_generated) + return; + ssdt_generated = 1; + msr_t msr; char pscope[] = "\\_SB.PCI0"; -- cgit v1.2.3