summaryrefslogtreecommitdiff
path: root/src/mainboard/msi
diff options
context:
space:
mode:
authorJonathan A. Kollasch <jakllsch@kollasch.net>2013-10-11 14:58:39 -0500
committerJonathan A. Kollasch <jakllsch@kollasch.net>2013-10-14 02:17:03 +0200
commitb6795255389ffd2320307dc6848919049016dfbd (patch)
tree01f2e1f66944d3e2411653acb79064520fc7cf49 /src/mainboard/msi
parent3fa1a13f62fe805a4592eaa551cd9d5713613f91 (diff)
downloadcoreboot-b6795255389ffd2320307dc6848919049016dfbd.tar.xz
ck804: obtain I/O APIC base address for ACPI MADT from allocator
Change-Id: I67192c8ae99e396ea4b17e03c658f31dbb5c1800 Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-on: http://review.coreboot.org/3960 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/msi')
-rw-r--r--src/mainboard/msi/ms7135/acpi_tables.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mainboard/msi/ms7135/acpi_tables.c b/src/mainboard/msi/ms7135/acpi_tables.c
index da4ef8d30d..ee8e81f52a 100644
--- a/src/mainboard/msi/ms7135/acpi_tables.c
+++ b/src/mainboard/msi/ms7135/acpi_tables.c
@@ -48,28 +48,29 @@ unsigned long acpi_fill_mcfg(unsigned long current)
/* APIC */
unsigned long acpi_fill_madt(unsigned long current)
{
- unsigned long apic_addr;
device_t dev;
+ struct resource *res;
/* create all subtables for processors */
current = acpi_create_madt_lapics(current);
/* Write NVIDIA CK804 IOAPIC. */
dev = dev_find_slot(0x0, PCI_DEVFN(0x1,0));
- if (dev) {
- apic_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1) & ~0xf;
- current += acpi_create_madt_ioapic(
- (acpi_madt_ioapic_t *)current,
- CONFIG_MAX_CPUS * CONFIG_MAX_PHYSICAL_CPUS,
- apic_addr, 0);
- /* Initialize interrupt mapping if mptable.c didn't. */
+ ASSERT(dev != NULL);
+
+ res = find_resource(dev, PCI_BASE_ADDRESS_1);
+ ASSERT(res != NULL);
+
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current,
+ CONFIG_MAX_CPUS * CONFIG_MAX_PHYSICAL_CPUS, res->base, 0);
+
+ /* Initialize interrupt mapping if mptable.c didn't. */
#if (!CONFIG_GENERATE_MP_TABLE)
#error untested config
- pci_write_config32(dev, 0x7c, 0x0120d218);
- pci_write_config32(dev, 0x80, 0x12008a00);
- pci_write_config32(dev, 0x84, 0x0000007d);
+ pci_write_config32(dev, 0x7c, 0x0120d218);
+ pci_write_config32(dev, 0x80, 0x12008a00);
+ pci_write_config32(dev, 0x84, 0x0000007d);
#endif
- }
/* IRQ of timer */
current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)