summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/qemu-i440fx
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2020-03-17 18:47:36 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-03-31 10:41:32 +0000
commitb40e780f8bf8f23337cf5125afdd4c3e04ec5d8c (patch)
tree5d5bd847e11af1150a8c0b1f144d83160a0fc29e /src/mainboard/emulation/qemu-i440fx
parentddd4f9a7179ccc0772f1a26cdb70d68c19ae9140 (diff)
mb/emulation/qemu-i440fx: Add acpi_name handler for QEMU
QEMU does not have a separate northbridge chip, so the mainboard needs to handle the ACPI name and paths so that devices can get generated into the SSDT properly. This fixes the PIRQ and TPM table generation. This issue can be seen in the coreboot output: ACPI_PIRQ_GEN: Missing LPCB ACPI path Change-Id: Ifc7d4359eea38ac0b55d655e39191ae7f8655fe4 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39835 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard/emulation/qemu-i440fx')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/northbridge.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c
index 355f13cd36..74e52de095 100644
--- a/src/mainboard/emulation/qemu-i440fx/northbridge.c
+++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c
@@ -229,6 +229,20 @@ static int qemu_get_smbios_data(struct device *dev, int *handle, unsigned long *
return len;
}
#endif
+
+#if CONFIG(HAVE_ACPI_TABLES)
+static const char *qemu_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;
+
+ return NULL;
+}
+#endif
+
static struct device_operations pci_domain_ops = {
.read_resources = cpu_pci_domain_read_resources,
.set_resources = cpu_pci_domain_set_resources,
@@ -238,6 +252,9 @@ static struct device_operations pci_domain_ops = {
#if CONFIG(GENERATE_SMBIOS_TABLES)
.get_smbios_data = qemu_get_smbios_data,
#endif
+#if CONFIG(HAVE_ACPI_TABLES)
+ .acpi_name = qemu_acpi_name,
+#endif
};
static void cpu_bus_init(struct device *dev)