[coreboot-gerrit] Change in coreboot[master]: nb/intel/nehalem: Add ACPI path

Patrick Rudolph (Code Review) gerrit at coreboot.org
Tue May 15 11:44:48 CEST 2018


Hello Patrick Rudolph,

I'd like you to do a code review. Please visit

    https://review.coreboot.org/26287

to review the following change.


Change subject: nb/intel/nehalem: Add ACPI path
......................................................................

nb/intel/nehalem: Add ACPI path

Provide a valid ACPI path for coreboot's SSDT generators.

Fixes all ACPI errors found while booting GNU Linux 4.15 on
Lenovo T410.

Change-Id: Idd4986f39f21cb53cb019d0893d40fed94c6505b
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/nehalem/northbridge.c
1 file changed, 21 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/26287/1

diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c
index 37662d5..b5c71b4 100644
--- a/src/northbridge/intel/nehalem/northbridge.c
+++ b/src/northbridge/intel/nehalem/northbridge.c
@@ -92,6 +92,24 @@
 	assign_resources(dev->link_list);
 }
 
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+static const char *northbridge_acpi_name(const struct device *dev)
+{
+	if (dev->path.type == DEVICE_PATH_DOMAIN)
+		return "PCI0";
+
+	if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0)
+		return NULL;
+
+	switch (dev->path.pci.devfn) {
+	case PCI_DEVFN(0, 0):
+		return "MCHC";
+	}
+
+	return NULL;
+}
+#endif
+
 static struct device_operations pci_domain_ops = {
 	.read_resources = pci_domain_read_resources,
 	.set_resources = pci_domain_set_resources,
@@ -99,6 +117,9 @@
 	.init = NULL,
 	.scan_bus = pci_domain_scan_bus,
 	.ops_pci_bus = pci_bus_default_ops,
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+	.acpi_name = northbridge_acpi_name,
+#endif
 };
 
 static void mc_read_resources(struct device *dev)

-- 
To view, visit https://review.coreboot.org/26287
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd4986f39f21cb53cb019d0893d40fed94c6505b
Gerrit-Change-Number: 26287
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180515/7d426e68/attachment-0001.html>


More information about the coreboot-gerrit mailing list