diff options
Diffstat (limited to 'src/northbridge')
-rw-r--r-- | src/northbridge/via/cx700/northbridge.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/northbridge/via/cx700/northbridge.c b/src/northbridge/via/cx700/northbridge.c index 7514ec4acb..e3314fff8e 100644 --- a/src/northbridge/via/cx700/northbridge.c +++ b/src/northbridge/via/cx700/northbridge.c @@ -29,6 +29,7 @@ #include <cpu/cpu.h> #include <cpu/x86/mtrr.h> #include <cbmem.h> +#include <arch/acpi.h> static void pci_domain_set_resources(device_t dev) { @@ -79,6 +80,28 @@ static void pci_domain_set_resources(device_t dev) assign_resources(dev->link_list); } +unsigned long acpi_fill_mcfg(unsigned long current) +{ + device_t dev; + u64 mmcfg; + + dev = dev_find_device(0x1106, 0x324b, 0); // 0:0x13.0 + if (!dev) + return current; + + // MMCFG not supported or not enabled. + if ((pci_read_config8(dev, 0x40) & 0xC0) != 0xC0) + return current; + + mmcfg = ((u64) pci_read_config8(dev, 0x41)) << 28; + if (!mmcfg) + return current; + + current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *) current, mmcfg, 0x0, 0x0, 0xff); + + return current; +} + static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, @@ -86,6 +109,7 @@ static struct device_operations pci_domain_ops = { .init = NULL, .scan_bus = pci_domain_scan_bus, .ops_pci_bus = pci_bus_default_ops, + .write_acpi_tables = acpi_write_hpet, }; static void cpu_bus_init(device_t dev) |