diff options
author | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2015-07-13 21:03:10 -0500 |
---|---|---|
committer | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2015-08-09 21:15:54 +0200 |
commit | 0dee57837b213c4c3f61feecb24a98bcb9b0fb85 (patch) | |
tree | 1b59a82e5cffe90c338e68117a9b09c6fadfdbf4 | |
parent | 1fa52740713a77a58aa038f61cc0e5ab6112a896 (diff) |
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 <jakllsch@kollasch.net>
Reviewed-on: http://review.coreboot.org/10912
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | src/northbridge/amd/amdk8/acpi.c | 11 |
1 files changed, 11 insertions, 0 deletions
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"; |