From 9a0b251680cf4aa9dbacde9c60d8579da81ed404 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 1 Sep 2014 22:35:20 +0200 Subject: i3100: Convert to per-device ACPI Change-Id: Id90db4f6ce1a5fb506c81bc3a6010d85b0aa8c43 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6940 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/northbridge/intel/i3100/northbridge.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/northbridge/intel') diff --git a/src/northbridge/intel/i3100/northbridge.c b/src/northbridge/intel/i3100/northbridge.c index dcce48d334..589c9c546d 100644 --- a/src/northbridge/intel/i3100/northbridge.c +++ b/src/northbridge/intel/i3100/northbridge.c @@ -33,6 +33,7 @@ #include #include "chip.h" #include "i3100.h" +#include static u32 max_bus; @@ -175,6 +176,30 @@ static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned device) ((device & 0xffff) << 16) | (vendor & 0xffff)); } +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) + +unsigned long acpi_fill_mcfg(unsigned long current) +{ + device_t dev; + u64 mmcfg; + + dev = dev_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3100_MC, 0); // 0:0x13.0 + if (!dev) + return current; + + // MMCFG not supported or not enabled. + mmcfg = ((u64) pci_read_config16(dev, 0xce)) << 16; + if (!mmcfg) + return current; + + current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *) current, + mmcfg, 0x0, 0x0, 0xff); + + return current; +} + +#endif + static struct pci_operations intel_pci_ops = { .set_subsystem = intel_set_subsystem, }; -- cgit v1.2.3