[coreboot-gerrit] Patch set updated for coreboot: 4c71207 ACPI: Fix corrupt SSDT table on multiprocessor AMD Family 10h systems

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sat Jan 24 21:50:31 CET 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8259

-gerrit

commit 4c71207ce3701d095ce35547fed91704a41265b5
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Fri Jan 23 20:18:56 2015 -0600

    ACPI: Fix corrupt SSDT table on multiprocessor AMD Family 10h systems
    
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
    Change-Id: I3175c8b29e94a27a2db6b11f8fc9e1d91bde11f9
---
 src/arch/x86/boot/acpi.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 621df2f..f6548f9 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -4,6 +4,7 @@
  * coreboot ACPI Table support
  * written by Stefan Reinauer <stepan at openbios.org>
  *
+ * Copyright (C) 2015 Timothy Pearson <tpearson at raptorengineeringinc.com>, Raptor Engineering
  * Copyright (C) 2004 SUSE LINUX AG
  * Copyright (C) 2005-2009 coresystems GmbH
  *
@@ -278,10 +279,42 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
 	acpigen_set_current((char *) current);
 	{
 #if IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
+#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AMDFAM10)
+		char amd_cpu_ssdt_generated = 0;
+#endif
 		struct device *dev;
 		for (dev = all_devices; dev; dev = dev->next)
 			if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
+#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AMDFAM10)
+				/*
+				 * HACK
+				 * If more than one physical CPU is installed, northbridge_acpi_write_vars()
+				 * is called more than once and the resultant SSDT table is corrupted
+				 * (duplicated entries).
+				 * This prevents Linux from booting, with log messages like these:
+				 * ACPI Error: [BUSN] Namespace lookup failure, AE_ALREADY_EXISTS (/dswload-353)
+				 * ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (/psobject-222)
+				 * followed by a slew of ACPI method failures and a hang when the invalid PCI
+				 * resource entries are used.
+				 *
+				 * The code in northbridge_acpi_write_vars needs to be reworked to function
+				 * correctly when called once per device.
+				 * Commit 2a19fb1d broke multiple physical CPUs.
+				 */
+				if ((dev->vendor == 0x1022) && (dev->device == 0x1200)) {
+					// AMD K10 CPU...
+					if (!amd_cpu_ssdt_generated) {
+						dev->ops->acpi_fill_ssdt_generator();
+						amd_cpu_ssdt_generated = 1;
+					}
+				}
+				else {
+					// Some other device, proceed normally.
+					dev->ops->acpi_fill_ssdt_generator();
+				}
+#else
 				dev->ops->acpi_fill_ssdt_generator();
+#endif
 			}
 		current = (unsigned long) acpigen_get_current();
 #else



More information about the coreboot-gerrit mailing list