[coreboot-gerrit] New patch to review for coreboot: c9b0122 Fix corrupt SSDT table on multiprocessor AMD Family 10h systems

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sat Jan 24 03:51:30 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 c9b012220dfe72cf1beb0dbd16ac339d13536dbb
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Fri Jan 23 20:18:56 2015 -0600

    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 | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 621df2f..6da6f31 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,36 @@ 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 (20131115/dswload-353)
+				// ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20131115/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
+				// The commit that broke multiple physical CPUs is GIT hash 2a19fb1d76c42cb516a4ab6f253de8c65d8cc3ad
+				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