summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-10-12 17:34:08 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-10-12 17:34:08 +0000
commit74d1a6e8a166cd477f667a6fcb1e96b8a0cbdac1 (patch)
tree9cbdbe86bd282da60bfcbef7108ca6790bcde94e /src/mainboard
parent4ffde94c4ec51cdb24103ec13653e6f40513e1bb (diff)
We define IO_APIC_ADDR in <arch/ioapic.h>, let's use it.
As both ioapic.h and acpi.h define a macro named "NMI", rename one of them (NMI -> NMIType in acpi.h). Abuild-tested. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5943 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/amd/dbm690t/acpi_tables.c3
-rw-r--r--src/mainboard/amd/mahogany/acpi_tables.c3
-rw-r--r--src/mainboard/amd/mahogany_fam10/acpi_tables.c3
-rw-r--r--src/mainboard/amd/pistachio/acpi_tables.c3
-rw-r--r--src/mainboard/amd/serengeti_cheetah/acpi_tables.c4
-rw-r--r--src/mainboard/amd/serengeti_cheetah/mptable.c3
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c3
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/mptable.c3
-rw-r--r--src/mainboard/amd/tilapia_fam10/acpi_tables.c3
-rw-r--r--src/mainboard/arima/hdama/mptable.c3
-rw-r--r--src/mainboard/asrock/939a785gmh/acpi_tables.c3
-rw-r--r--src/mainboard/asus/a8v-e_se/acpi_tables.c3
-rw-r--r--src/mainboard/asus/a8v-e_se/mptable.c3
-rw-r--r--src/mainboard/asus/m2v-mx_se/acpi_tables.c3
-rw-r--r--src/mainboard/asus/m4a785-m/acpi_tables.c4
-rw-r--r--src/mainboard/asus/p2b-d/mptable.c3
-rw-r--r--src/mainboard/asus/p2b-ds/mptable.c3
-rw-r--r--src/mainboard/dell/s1850/mptable.c3
-rw-r--r--src/mainboard/emulation/qemu-x86/northbridge.c3
-rw-r--r--src/mainboard/getac/p470/acpi_tables.c3
-rw-r--r--src/mainboard/getac/p470/mptable.c4
-rw-r--r--src/mainboard/gigabyte/ma785gmt/acpi_tables.c3
-rw-r--r--src/mainboard/gigabyte/ma78gm/acpi_tables.c4
-rw-r--r--src/mainboard/hp/dl145_g1/mptable.c3
-rw-r--r--src/mainboard/ibase/mb899/acpi_tables.c3
-rw-r--r--src/mainboard/ibase/mb899/mptable.c4
-rw-r--r--src/mainboard/ibm/e325/mptable.c3
-rw-r--r--src/mainboard/ibm/e326/mptable.c3
-rw-r--r--src/mainboard/iei/kino-780am2-fam10/acpi_tables.c3
-rw-r--r--src/mainboard/intel/d945gclf/acpi_tables.c3
-rw-r--r--src/mainboard/intel/d945gclf/mptable.c4
-rw-r--r--src/mainboard/intel/eagleheights/acpi_tables.c7
-rw-r--r--src/mainboard/intel/eagleheights/mptable.c3
-rw-r--r--src/mainboard/intel/jarrell/mptable.c3
-rw-r--r--src/mainboard/intel/mtarvon/mptable.c3
-rw-r--r--src/mainboard/intel/truxton/mptable.c3
-rw-r--r--src/mainboard/intel/xe7501devkit/acpi_tables.c3
-rw-r--r--src/mainboard/intel/xe7501devkit/mptable.c3
-rw-r--r--src/mainboard/iwill/dk8_htx/acpi_tables.c4
-rw-r--r--src/mainboard/iwill/dk8_htx/mptable.c3
-rw-r--r--src/mainboard/iwill/dk8s2/mptable.c3
-rw-r--r--src/mainboard/iwill/dk8x/mptable.c3
-rw-r--r--src/mainboard/jetway/pa78vm5/acpi_tables.c3
-rw-r--r--src/mainboard/kontron/986lcd-m/acpi_tables.c3
-rw-r--r--src/mainboard/kontron/986lcd-m/mptable.c4
-rw-r--r--src/mainboard/kontron/kt690/acpi_tables.c3
-rw-r--r--src/mainboard/newisys/khepri/mptable.c3
-rw-r--r--src/mainboard/roda/rk886ex/acpi_tables.c5
-rw-r--r--src/mainboard/roda/rk886ex/mptable.c4
-rw-r--r--src/mainboard/supermicro/x6dai_g/mptable.c5
-rw-r--r--src/mainboard/supermicro/x6dhe_g/mptable.c5
-rw-r--r--src/mainboard/supermicro/x6dhe_g2/mptable.c5
-rw-r--r--src/mainboard/supermicro/x6dhr_ig/mptable.c3
-rw-r--r--src/mainboard/supermicro/x6dhr_ig2/mptable.c3
-rw-r--r--src/mainboard/technexion/tim5690/acpi_tables.c3
-rw-r--r--src/mainboard/technexion/tim8690/acpi_tables.c3
-rw-r--r--src/mainboard/tyan/s2735/mptable.c3
-rw-r--r--src/mainboard/tyan/s2850/mptable.c3
-rw-r--r--src/mainboard/tyan/s2875/mptable.c3
-rw-r--r--src/mainboard/tyan/s2880/mptable.c3
-rw-r--r--src/mainboard/tyan/s2881/mptable.c3
-rw-r--r--src/mainboard/tyan/s2882/mptable.c3
-rw-r--r--src/mainboard/tyan/s2885/mptable.c3
-rw-r--r--src/mainboard/tyan/s4880/mptable.c3
-rw-r--r--src/mainboard/tyan/s4882/mptable.c3
-rw-r--r--src/mainboard/via/epia-n/acpi_tables.c3
-rw-r--r--src/mainboard/via/epia-n/mainboard.c3
-rw-r--r--src/mainboard/via/epia-n/mptable.c3
-rw-r--r--src/mainboard/via/pc2500e/mptable.c3
-rw-r--r--src/mainboard/via/vt8454c/acpi_tables.c5
-rw-r--r--src/mainboard/via/vt8454c/mptable.c3
71 files changed, 123 insertions, 113 deletions
diff --git a/src/mainboard/amd/dbm690t/acpi_tables.c b/src/mainboard/amd/dbm690t/acpi_tables.c
index 907240b3d1..dcccdf019f 100644
--- a/src/mainboard/amd/dbm690t/acpi_tables.c
+++ b/src/mainboard/amd/dbm690t/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -59,8 +60,6 @@ static void dump_mem(u32 start, u32 end)
extern const unsigned char AmlCode[];
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/mahogany/acpi_tables.c b/src/mainboard/amd/mahogany/acpi_tables.c
index 79c9799deb..c348f44897 100644
--- a/src/mainboard/amd/mahogany/acpi_tables.c
+++ b/src/mainboard/amd/mahogany/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -66,8 +67,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/mahogany_fam10/acpi_tables.c b/src/mainboard/amd/mahogany_fam10/acpi_tables.c
index 2e09a2395d..5ccfa11d53 100644
--- a/src/mainboard/amd/mahogany_fam10/acpi_tables.c
+++ b/src/mainboard/amd/mahogany_fam10/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -56,8 +57,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/pistachio/acpi_tables.c b/src/mainboard/amd/pistachio/acpi_tables.c
index 05c267011d..4a6d3c2664 100644
--- a/src/mainboard/amd/pistachio/acpi_tables.c
+++ b/src/mainboard/amd/pistachio/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -59,8 +60,6 @@ static void dump_mem(u32 start, u32 end)
extern const unsigned char AmlCode[];
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/serengeti_cheetah/acpi_tables.c b/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
index 1b5197e6d7..fd8416f0de 100644
--- a/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
+++ b/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
@@ -11,13 +11,13 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <cpu/amd/amdk8_sysconf.h>
#include "northbridge/amd/amdk8/amdk8_acpi.h"
-
#include "mb_sysconf.h"
#define DUMP_ACPI_TABLES 0
@@ -45,8 +45,6 @@ extern const unsigned char AmlCode_ssdt3[];
extern const unsigned char AmlCode_ssdt4[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/serengeti_cheetah/mptable.c b/src/mainboard/amd/serengeti_cheetah/mptable.c
index 8541ff4cdf..855d2678a1 100644
--- a/src/mainboard/amd/serengeti_cheetah/mptable.c
+++ b/src/mainboard/amd/serengeti_cheetah/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -54,7 +55,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, m->bus_isa, "ISA ");
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, m->apicid_8111, 0x11, 0xfec00000); //8111
+ smp_write_ioapic(mc, m->apicid_8111, 0x11, IO_APIC_ADDR); //8111
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
index 868649171d..9796c725d0 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -56,8 +57,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c
index c0a4d8a0b3..93c6bccd8c 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c
@@ -19,6 +19,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -74,7 +75,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, m->bus_isa, "ISA ");
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, m->apicid_8111, 0x11, 0xfec00000); //8111
+ smp_write_ioapic(mc, m->apicid_8111, 0x11, IO_APIC_ADDR); //8111
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/amd/tilapia_fam10/acpi_tables.c b/src/mainboard/amd/tilapia_fam10/acpi_tables.c
index 2e09a2395d..5ccfa11d53 100644
--- a/src/mainboard/amd/tilapia_fam10/acpi_tables.c
+++ b/src/mainboard/amd/tilapia_fam10/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -56,8 +57,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/arima/hdama/mptable.c b/src/mainboard/arima/hdama/mptable.c
index 8760d7b701..55c4440a69 100644
--- a/src/mainboard/arima/hdama/mptable.c
+++ b/src/mainboard/arima/hdama/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -201,7 +202,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* IOAPIC handling */
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/asrock/939a785gmh/acpi_tables.c b/src/mainboard/asrock/939a785gmh/acpi_tables.c
index 79c9799deb..c348f44897 100644
--- a/src/mainboard/asrock/939a785gmh/acpi_tables.c
+++ b/src/mainboard/asrock/939a785gmh/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -66,8 +67,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/asus/a8v-e_se/acpi_tables.c b/src/mainboard/asus/a8v-e_se/acpi_tables.c
index 1119fd8fce..fe8d4757ee 100644
--- a/src/mainboard/asus/a8v-e_se/acpi_tables.c
+++ b/src/mainboard/asus/a8v-e_se/acpi_tables.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <arch/acpi.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/device.h>
#include <device/pci_ids.h>
#include "southbridge/via/vt8237r/vt8237r.h"
@@ -59,7 +60,7 @@ unsigned long acpi_fill_madt(unsigned long current)
/* Write SB IOAPIC. */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- VT8237R_APIC_ID, VT8237R_APIC_BASE, 0);
+ VT8237R_APIC_ID, IO_APIC_ADDR, 0);
/* Write NB IOAPIC. */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
diff --git a/src/mainboard/asus/a8v-e_se/mptable.c b/src/mainboard/asus/a8v-e_se/mptable.c
index d2529db6db..4260713ae5 100644
--- a/src/mainboard/asus/a8v-e_se/mptable.c
+++ b/src/mainboard/asus/a8v-e_se/mptable.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <stdint.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include "southbridge/via/vt8237r/vt8237r.h"
#include "southbridge/via/k8t890/k8t890.h"
@@ -62,7 +63,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, VT8237R_APIC_BASE);
+ smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR);
smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, K8T890_APIC_BASE);
mptable_add_isa_interrupts(mc, bus_isa, VT8237R_APIC_ID, 0);
diff --git a/src/mainboard/asus/m2v-mx_se/acpi_tables.c b/src/mainboard/asus/m2v-mx_se/acpi_tables.c
index 5858e3ff75..43cd3291fd 100644
--- a/src/mainboard/asus/m2v-mx_se/acpi_tables.c
+++ b/src/mainboard/asus/m2v-mx_se/acpi_tables.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <arch/acpi.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/device.h>
#include <device/pci_ids.h>
#include "southbridge/via/vt8237r/vt8237r.h"
@@ -61,7 +62,7 @@ unsigned long acpi_fill_madt(unsigned long current)
/* Write SB IOAPIC. */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- VT8237R_APIC_ID, VT8237R_APIC_BASE, 0);
+ VT8237R_APIC_ID, IO_APIC_ADDR, 0);
/* Write NB IOAPIC. */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
diff --git a/src/mainboard/asus/m4a785-m/acpi_tables.c b/src/mainboard/asus/m4a785-m/acpi_tables.c
index 2e09a2395d..aeac68e34f 100644
--- a/src/mainboard/asus/m4a785-m/acpi_tables.c
+++ b/src/mainboard/asus/m4a785-m/acpi_tables.c
@@ -20,12 +20,12 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <cpu/amd/amdfam10_sysconf.h>
-
#include "mb_sysconf.h"
#define DUMP_ACPI_TABLES 0
@@ -56,8 +56,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/asus/p2b-d/mptable.c b/src/mainboard/asus/p2b-d/mptable.c
index cc774154ac..6d3e4cc757 100644
--- a/src/mainboard/asus/p2b-d/mptable.c
+++ b/src/mainboard/asus/p2b-d/mptable.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -56,7 +57,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, 2, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/asus/p2b-ds/mptable.c b/src/mainboard/asus/p2b-ds/mptable.c
index 42f6fa4efb..4650c59126 100644
--- a/src/mainboard/asus/p2b-ds/mptable.c
+++ b/src/mainboard/asus/p2b-ds/mptable.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -55,7 +56,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, 1, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/dell/s1850/mptable.c b/src/mainboard/dell/s1850/mptable.c
index b6250b27a1..48d2a2111c 100644
--- a/src/mainboard/dell/s1850/mptable.c
+++ b/src/mainboard/dell/s1850/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -109,7 +110,7 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/emulation/qemu-x86/northbridge.c b/src/mainboard/emulation/qemu-x86/northbridge.c
index cca56204ab..7a73ecff69 100644
--- a/src/mainboard/emulation/qemu-x86/northbridge.c
+++ b/src/mainboard/emulation/qemu-x86/northbridge.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/io.h>
+#include <arch/ioapic.h>
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
@@ -64,7 +65,7 @@ static void cpu_pci_domain_read_resources(struct device *dev)
/* Reserve space for the IOAPIC. This should be in the Southbridge,
* but I couldn't tell which device to put it in. */
res = new_resource(dev, 2);
- res->base = 0xfec00000UL;
+ res->base = IO_APIC_ADDR;
res->size = 0x100000UL;
res->limit = 0xffffffffUL;
res->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_STORED |
diff --git a/src/mainboard/getac/p470/acpi_tables.c b/src/mainboard/getac/p470/acpi_tables.c
index 8dbdbfd2ad..490a182494 100644
--- a/src/mainboard/getac/p470/acpi_tables.c
+++ b/src/mainboard/getac/p470/acpi_tables.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
@@ -131,8 +132,6 @@ static long acpi_create_ecdt(acpi_ecdt_t * ecdt)
return header->length;
}
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
diff --git a/src/mainboard/getac/p470/mptable.c b/src/mainboard/getac/p470/mptable.c
index 547b5987d2..014965b823 100644
--- a/src/mainboard/getac/p470/mptable.c
+++ b/src/mainboard/getac/p470/mptable.c
@@ -19,11 +19,11 @@
* MA 02110-1301 USA
*/
-
#include <device/device.h>
#include <device/pci.h>
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <string.h>
#include <stdint.h>
@@ -67,7 +67,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, isa_bus, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
/* Legacy Interrupts */
mptable_add_isa_interrupts(mc, isa_bus, 0x2, 0);
diff --git a/src/mainboard/gigabyte/ma785gmt/acpi_tables.c b/src/mainboard/gigabyte/ma785gmt/acpi_tables.c
index 8d51dc39b3..29b00e5439 100644
--- a/src/mainboard/gigabyte/ma785gmt/acpi_tables.c
+++ b/src/mainboard/gigabyte/ma785gmt/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -54,8 +55,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/gigabyte/ma78gm/acpi_tables.c b/src/mainboard/gigabyte/ma78gm/acpi_tables.c
index 2a418f605b..29b00e5439 100644
--- a/src/mainboard/gigabyte/ma78gm/acpi_tables.c
+++ b/src/mainboard/gigabyte/ma78gm/acpi_tables.c
@@ -20,13 +20,13 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <cpu/amd/amdfam10_sysconf.h>
-
#define DUMP_ACPI_TABLES 0
#if DUMP_ACPI_TABLES == 1
@@ -55,8 +55,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/hp/dl145_g1/mptable.c b/src/mainboard/hp/dl145_g1/mptable.c
index 8e76057647..72c7c62451 100644
--- a/src/mainboard/hp/dl145_g1/mptable.c
+++ b/src/mainboard/hp/dl145_g1/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -60,7 +61,7 @@ static void *smp_write_config_table(void *v)
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, apicid_8111, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x20, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/ibase/mb899/acpi_tables.c b/src/mainboard/ibase/mb899/acpi_tables.c
index 063127ba10..f8009c3757 100644
--- a/src/mainboard/ibase/mb899/acpi_tables.c
+++ b/src/mainboard/ibase/mb899/acpi_tables.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
@@ -86,8 +87,6 @@ static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
}
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
diff --git a/src/mainboard/ibase/mb899/mptable.c b/src/mainboard/ibase/mb899/mptable.c
index d582ec6526..4c6e9e4e1a 100644
--- a/src/mainboard/ibase/mb899/mptable.c
+++ b/src/mainboard/ibase/mb899/mptable.c
@@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include <device/device.h>
#include <device/pci.h>
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <string.h>
#include <stdint.h>
@@ -86,7 +86,7 @@ static void *smp_write_config_table(void *v)
/* I/O APICs: APIC ID Version State Address */
ioapic_id = 2;
- smp_write_ioapic(mc, ioapic_id, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, ioapic_id, 0x20, IO_APIC_ADDR);
/* Legacy Interrupts */
diff --git a/src/mainboard/ibm/e325/mptable.c b/src/mainboard/ibm/e325/mptable.c
index 945ad9f2a3..7a6de7e3da 100644
--- a/src/mainboard/ibm/e325/mptable.c
+++ b/src/mainboard/ibm/e325/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -81,7 +82,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* Legacy IOAPIC #2 */
- smp_write_ioapic(mc, 2, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/ibm/e326/mptable.c b/src/mainboard/ibm/e326/mptable.c
index 66876e7e82..1452c9900e 100644
--- a/src/mainboard/ibm/e326/mptable.c
+++ b/src/mainboard/ibm/e326/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -80,7 +81,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* Legacy IOAPIC #2 */
- smp_write_ioapic(mc, 2, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/iei/kino-780am2-fam10/acpi_tables.c b/src/mainboard/iei/kino-780am2-fam10/acpi_tables.c
index 2e09a2395d..5ccfa11d53 100644
--- a/src/mainboard/iei/kino-780am2-fam10/acpi_tables.c
+++ b/src/mainboard/iei/kino-780am2-fam10/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -56,8 +57,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/intel/d945gclf/acpi_tables.c b/src/mainboard/intel/d945gclf/acpi_tables.c
index f10a8d5255..9fc2adbc7c 100644
--- a/src/mainboard/intel/d945gclf/acpi_tables.c
+++ b/src/mainboard/intel/d945gclf/acpi_tables.c
@@ -27,6 +27,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
+#include <arch/ioapic.h>
#include "dmi.h"
#define OLD_ACPI 0
@@ -146,8 +147,6 @@ static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
}
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
diff --git a/src/mainboard/intel/d945gclf/mptable.c b/src/mainboard/intel/d945gclf/mptable.c
index bff9849020..5930d2f430 100644
--- a/src/mainboard/intel/d945gclf/mptable.c
+++ b/src/mainboard/intel/d945gclf/mptable.c
@@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include <device/device.h>
#include <device/pci.h>
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <string.h>
#include <stdint.h>
@@ -65,7 +65,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, isa_bus, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
/* Legacy Interrupts */
diff --git a/src/mainboard/intel/eagleheights/acpi_tables.c b/src/mainboard/intel/eagleheights/acpi_tables.c
index 83ed984670..123ddbcb6b 100644
--- a/src/mainboard/intel/eagleheights/acpi_tables.c
+++ b/src/mainboard/intel/eagleheights/acpi_tables.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
@@ -84,8 +85,6 @@ static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
#define IO_APIC0 2
#define IO_APIC1 3
-#define IO_APIC0_ADDR 0xfec00000UL
-#define IO_APIC1_ADDR 0xfec10000UL
unsigned long acpi_fill_madt(unsigned long current)
{
@@ -99,9 +98,9 @@ unsigned long acpi_fill_madt(unsigned long current)
current += acpi_create_madt_lapic((acpi_madt_lapic_t *) current, 2, 1);
/* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, IO_APIC0, IO_APIC0_ADDR, irq_start);
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, IO_APIC0, IO_APIC_ADDR, irq_start);
irq_start += INTEL_IOAPIC_NUM_INTERRUPTS;
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, IO_APIC1, IO_APIC1_ADDR, irq_start);
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, IO_APIC1, IO_APIC_ADDR + 0x10000, irq_start);
irq_start += INTEL_IOAPIC_NUM_INTERRUPTS;
dev = dev_find_slot(0, PCI_DEVFN(0x1e,0));
diff --git a/src/mainboard/intel/eagleheights/mptable.c b/src/mainboard/intel/eagleheights/mptable.c
index 5ee1d1f44b..33d7b01480 100644
--- a/src/mainboard/intel/eagleheights/mptable.c
+++ b/src/mainboard/intel/eagleheights/mptable.c
@@ -23,6 +23,7 @@
#include <console/console.h>
#include <arch/io.h>
+#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <device/pci.h>
#include <string.h>
@@ -144,7 +145,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
/*
{
device_t dev;
diff --git a/src/mainboard/intel/jarrell/mptable.c b/src/mainboard/intel/jarrell/mptable.c
index 863ddf8a0e..7a2a5943ff 100644
--- a/src/mainboard/intel/jarrell/mptable.c
+++ b/src/mainboard/intel/jarrell/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -111,7 +112,7 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 8, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 8, 0x20, IO_APIC_ADDR);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/intel/mtarvon/mptable.c b/src/mainboard/intel/mtarvon/mptable.c
index 8d600ddd30..2f3cd2793f 100644
--- a/src/mainboard/intel/mtarvon/mptable.c
+++ b/src/mainboard/intel/mtarvon/mptable.c
@@ -22,6 +22,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -62,7 +63,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* IOAPIC handling */
- smp_write_ioapic(mc, 0x01, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 0x01, 0x20, IO_APIC_ADDR);
mptable_add_isa_interrupts(mc, bus_isa, 0x1, 0);
diff --git a/src/mainboard/intel/truxton/mptable.c b/src/mainboard/intel/truxton/mptable.c
index c80d5d3be3..6f0054d1e9 100644
--- a/src/mainboard/intel/truxton/mptable.c
+++ b/src/mainboard/intel/truxton/mptable.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -95,7 +96,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* IOAPIC handling */
- smp_write_ioapic(mc, 0x8, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 0x8, 0x20, IO_APIC_ADDR);
mptable_add_isa_interrupts(mc, bus_isa, 0x8, 0);
diff --git a/src/mainboard/intel/xe7501devkit/acpi_tables.c b/src/mainboard/intel/xe7501devkit/acpi_tables.c
index 1188467f20..3695bb4dc4 100644
--- a/src/mainboard/intel/xe7501devkit/acpi_tables.c
+++ b/src/mainboard/intel/xe7501devkit/acpi_tables.c
@@ -8,6 +8,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <assert.h>
@@ -48,7 +49,7 @@ unsigned long acpi_fill_madt(unsigned long current)
// Southbridge IOAPIC
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, IOAPIC_ICH3, 0xfec00000, irq_start);
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, IOAPIC_ICH3, IO_APIC_ADDR, irq_start);
irq_start += INTEL_IOAPIC_NUM_INTERRUPTS;
// P64H2#2 Bus A IOAPIC
diff --git a/src/mainboard/intel/xe7501devkit/mptable.c b/src/mainboard/intel/xe7501devkit/mptable.c
index ed81884122..d39e754700 100644
--- a/src/mainboard/intel/xe7501devkit/mptable.c
+++ b/src/mainboard/intel/xe7501devkit/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -37,7 +38,7 @@ static void xe7501devkit_register_ioapics(struct mp_config_table *mc)
// TODO: Gack. This is REALLY ugly.
// Southbridge IOAPIC
- smp_write_ioapic(mc, IOAPIC_ICH3, 0x20, 0xfec00000); // APIC ID, Version, Address
+ smp_write_ioapic(mc, IOAPIC_ICH3, 0x20, IO_APIC_ADDR); // APIC ID, Version, Address
// P64H2#2 Bus A IOAPIC
dev = dev_find_slot(PCI_BUS_E7501_HI_B, PCI_DEVFN(30, 0));
diff --git a/src/mainboard/iwill/dk8_htx/acpi_tables.c b/src/mainboard/iwill/dk8_htx/acpi_tables.c
index 2221ae4211..e497fb4a2d 100644
--- a/src/mainboard/iwill/dk8_htx/acpi_tables.c
+++ b/src/mainboard/iwill/dk8_htx/acpi_tables.c
@@ -11,13 +11,13 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
#include <cpu/amd/amdk8_sysconf.h>
#include "northbridge/amd/amdk8/amdk8_acpi.h"
-
#include "mb_sysconf.h"
#define DUMP_ACPI_TABLES 0
@@ -47,8 +47,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/iwill/dk8_htx/mptable.c b/src/mainboard/iwill/dk8_htx/mptable.c
index 14df3163e1..8bfaec8b70 100644
--- a/src/mainboard/iwill/dk8_htx/mptable.c
+++ b/src/mainboard/iwill/dk8_htx/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -54,7 +55,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, m->bus_isa, "ISA ");
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, m->apicid_8111, 0x11, 0xfec00000); //8111
+ smp_write_ioapic(mc, m->apicid_8111, 0x11, IO_APIC_ADDR); //8111
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/iwill/dk8s2/mptable.c b/src/mainboard/iwill/dk8s2/mptable.c
index 19d769d2a4..4938d766c6 100644
--- a/src/mainboard/iwill/dk8s2/mptable.c
+++ b/src/mainboard/iwill/dk8s2/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -82,7 +83,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/iwill/dk8x/mptable.c b/src/mainboard/iwill/dk8x/mptable.c
index 19d769d2a4..4938d766c6 100644
--- a/src/mainboard/iwill/dk8x/mptable.c
+++ b/src/mainboard/iwill/dk8x/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -82,7 +83,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/jetway/pa78vm5/acpi_tables.c b/src/mainboard/jetway/pa78vm5/acpi_tables.c
index 591c9221eb..ee920e8ad4 100644
--- a/src/mainboard/jetway/pa78vm5/acpi_tables.c
+++ b/src/mainboard/jetway/pa78vm5/acpi_tables.c
@@ -21,6 +21,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -55,8 +56,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c
index 063127ba10..f8009c3757 100644
--- a/src/mainboard/kontron/986lcd-m/acpi_tables.c
+++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
@@ -86,8 +87,6 @@ static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
}
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
diff --git a/src/mainboard/kontron/986lcd-m/mptable.c b/src/mainboard/kontron/986lcd-m/mptable.c
index ce7a6c5fc2..2b1a90e647 100644
--- a/src/mainboard/kontron/986lcd-m/mptable.c
+++ b/src/mainboard/kontron/986lcd-m/mptable.c
@@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include <device/device.h>
#include <device/pci.h>
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <string.h>
#include <stdint.h>
@@ -72,7 +72,7 @@ static void *smp_write_config_table(void *v)
/* I/O APICs: APIC ID Version State Address */
ioapic_id = 2;
- smp_write_ioapic(mc, ioapic_id, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, ioapic_id, 0x20, IO_APIC_ADDR);
/* Legacy Interrupts */
mptable_add_isa_interrupts(mc, isa_bus, ioapic_id, 0);
diff --git a/src/mainboard/kontron/kt690/acpi_tables.c b/src/mainboard/kontron/kt690/acpi_tables.c
index 0df43859d2..02f04cf0b8 100644
--- a/src/mainboard/kontron/kt690/acpi_tables.c
+++ b/src/mainboard/kontron/kt690/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -59,8 +60,6 @@ static void dump_mem(u32 start, u32 end)
extern const unsigned char AmlCode[];
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/newisys/khepri/mptable.c b/src/mainboard/newisys/khepri/mptable.c
index 7901ab522c..8f388d2ec9 100644
--- a/src/mainboard/newisys/khepri/mptable.c
+++ b/src/mainboard/newisys/khepri/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -83,7 +84,7 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/roda/rk886ex/acpi_tables.c b/src/mainboard/roda/rk886ex/acpi_tables.c
index 3bd4868932..2dd7c5ccf0 100644
--- a/src/mainboard/roda/rk886ex/acpi_tables.c
+++ b/src/mainboard/roda/rk886ex/acpi_tables.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/io.h>
+#include <arch/ioapic.h>
#include <arch/acpi.h>
#include <arch/acpigen.h>
#include <arch/smp/mpspec.h>
@@ -142,10 +143,6 @@ static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
}
-
-
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
diff --git a/src/mainboard/roda/rk886ex/mptable.c b/src/mainboard/roda/rk886ex/mptable.c
index ec6166c417..bdf38fb5b0 100644
--- a/src/mainboard/roda/rk886ex/mptable.c
+++ b/src/mainboard/roda/rk886ex/mptable.c
@@ -19,11 +19,11 @@
* MA 02110-1301 USA
*/
-
#include <device/device.h>
#include <device/pci.h>
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <string.h>
#include <stdint.h>
@@ -67,7 +67,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, isa_bus, "ISA ");
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
/* Legacy Interrupts */
mptable_add_isa_interrupts(mc, isa_bus, 0x2, 0);
diff --git a/src/mainboard/supermicro/x6dai_g/mptable.c b/src/mainboard/supermicro/x6dai_g/mptable.c
index f50f876597..d13c308597 100644
--- a/src/mainboard/supermicro/x6dai_g/mptable.c
+++ b/src/mainboard/supermicro/x6dai_g/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -58,8 +59,8 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
- smp_write_ioapic(mc, 3, 0x20, 0xfec10000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
+ smp_write_ioapic(mc, 3, 0x20, IO_APIC_ADDR + 0x10000);
mptable_add_isa_interrupts(mc, bus_isa, 0x2, 0);
diff --git a/src/mainboard/supermicro/x6dhe_g/mptable.c b/src/mainboard/supermicro/x6dhe_g/mptable.c
index 65bb1b9293..ba712d3fed 100644
--- a/src/mainboard/supermicro/x6dhe_g/mptable.c
+++ b/src/mainboard/supermicro/x6dhe_g/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -84,8 +85,8 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
- smp_write_ioapic(mc, 3, 0x20, 0xfec10000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
+ smp_write_ioapic(mc, 3, 0x20, IO_APIC_ADDR + 0x10000);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/supermicro/x6dhe_g2/mptable.c b/src/mainboard/supermicro/x6dhe_g2/mptable.c
index c961d375fa..50b6299b4f 100644
--- a/src/mainboard/supermicro/x6dhe_g2/mptable.c
+++ b/src/mainboard/supermicro/x6dhe_g2/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -84,8 +85,8 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
- smp_write_ioapic(mc, 3, 0x20, 0xfec10000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
+ smp_write_ioapic(mc, 3, 0x20, IO_APIC_ADDR + 0x10000);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/supermicro/x6dhr_ig/mptable.c b/src/mainboard/supermicro/x6dhr_ig/mptable.c
index 1164e7fa3d..c16017bf93 100644
--- a/src/mainboard/supermicro/x6dhr_ig/mptable.c
+++ b/src/mainboard/supermicro/x6dhr_ig/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -109,7 +110,7 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/supermicro/x6dhr_ig2/mptable.c b/src/mainboard/supermicro/x6dhr_ig2/mptable.c
index 1ee769d866..146b40a1b2 100644
--- a/src/mainboard/supermicro/x6dhr_ig2/mptable.c
+++ b/src/mainboard/supermicro/x6dhr_ig2/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -109,7 +110,7 @@ static void *smp_write_config_table(void *v)
/* IOAPIC handling */
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
struct resource *res;
device_t dev;
diff --git a/src/mainboard/technexion/tim5690/acpi_tables.c b/src/mainboard/technexion/tim5690/acpi_tables.c
index 0df43859d2..02f04cf0b8 100644
--- a/src/mainboard/technexion/tim5690/acpi_tables.c
+++ b/src/mainboard/technexion/tim5690/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -59,8 +60,6 @@ static void dump_mem(u32 start, u32 end)
extern const unsigned char AmlCode[];
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/technexion/tim8690/acpi_tables.c b/src/mainboard/technexion/tim8690/acpi_tables.c
index 0df43859d2..02f04cf0b8 100644
--- a/src/mainboard/technexion/tim8690/acpi_tables.c
+++ b/src/mainboard/technexion/tim8690/acpi_tables.c
@@ -20,6 +20,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
@@ -59,8 +60,6 @@ static void dump_mem(u32 start, u32 end)
extern const unsigned char AmlCode[];
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Just a dummy */
diff --git a/src/mainboard/tyan/s2735/mptable.c b/src/mainboard/tyan/s2735/mptable.c
index 7cfa5ef5ff..5e4afaee01 100644
--- a/src/mainboard/tyan/s2735/mptable.c
+++ b/src/mainboard/tyan/s2735/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -32,7 +33,7 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
mptable_write_buses(mc, NULL, &isa_bus);
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, 8, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 8, 0x20, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/tyan/s2850/mptable.c b/src/mainboard/tyan/s2850/mptable.c
index a2fdd32986..d452dd9c3a 100644
--- a/src/mainboard/tyan/s2850/mptable.c
+++ b/src/mainboard/tyan/s2850/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -105,7 +106,7 @@ static void *smp_write_config_table(void *v)
#endif
apicid_8111 = apicid_base+0;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
mptable_add_isa_interrupts(mc, bus_isa, apicid_8111, 0);
diff --git a/src/mainboard/tyan/s2875/mptable.c b/src/mainboard/tyan/s2875/mptable.c
index 73dc051a65..a2aa275e34 100644
--- a/src/mainboard/tyan/s2875/mptable.c
+++ b/src/mainboard/tyan/s2875/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -120,7 +121,7 @@ static void *smp_write_config_table(void *v)
apicid_base = CONFIG_MAX_PHYSICAL_CPUS;
#endif
apicid_8111 = apicid_base+0;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
mptable_add_isa_interrupts(mc, bus_isa, apicid_8111, 0);
diff --git a/src/mainboard/tyan/s2880/mptable.c b/src/mainboard/tyan/s2880/mptable.c
index 0a979679d8..176aed2212 100644
--- a/src/mainboard/tyan/s2880/mptable.c
+++ b/src/mainboard/tyan/s2880/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -135,7 +136,7 @@ static void *smp_write_config_table(void *v)
apicid_8111 = apicid_base+0;
apicid_8131_1 = apicid_base+1;
apicid_8131_2 = apicid_base+2;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
diff --git a/src/mainboard/tyan/s2881/mptable.c b/src/mainboard/tyan/s2881/mptable.c
index 4be900e2fd..3e9c55d5d4 100644
--- a/src/mainboard/tyan/s2881/mptable.c
+++ b/src/mainboard/tyan/s2881/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -62,7 +63,7 @@ static void *smp_write_config_table(void *v)
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/tyan/s2882/mptable.c b/src/mainboard/tyan/s2882/mptable.c
index a5d6c190c1..f824025cc8 100644
--- a/src/mainboard/tyan/s2882/mptable.c
+++ b/src/mainboard/tyan/s2882/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <string.h>
@@ -143,7 +144,7 @@ static void *smp_write_config_table(void *v)
apicid_8131_1 = apicid_base+1;
apicid_8131_2 = apicid_base+2;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/tyan/s2885/mptable.c b/src/mainboard/tyan/s2885/mptable.c
index 45cf55c0ba..3d2d5a939f 100644
--- a/src/mainboard/tyan/s2885/mptable.c
+++ b/src/mainboard/tyan/s2885/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -64,7 +65,7 @@ static void *smp_write_config_table(void *v)
smp_write_bus(mc, bus_isa, "ISA ");
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000); //8111
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR); //8111
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/tyan/s4880/mptable.c b/src/mainboard/tyan/s4880/mptable.c
index a9746b34df..edef047c9b 100644
--- a/src/mainboard/tyan/s4880/mptable.c
+++ b/src/mainboard/tyan/s4880/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -135,7 +136,7 @@ static void *smp_write_config_table(void *v)
apicid_8131_1 = apicid_base+1;
apicid_8131_2 = apicid_base+2;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/tyan/s4882/mptable.c b/src/mainboard/tyan/s4882/mptable.c
index 73dbcfc08f..1c791fcfd2 100644
--- a/src/mainboard/tyan/s4882/mptable.c
+++ b/src/mainboard/tyan/s4882/mptable.c
@@ -1,5 +1,6 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -135,7 +136,7 @@ static void *smp_write_config_table(void *v)
apicid_8111 = apicid_base+0;
apicid_8131_1 = apicid_base+1;
apicid_8131_2 = apicid_base+2;
- smp_write_ioapic(mc, apicid_8111, 0x11, 0xfec00000);
+ smp_write_ioapic(mc, apicid_8111, 0x11, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/via/epia-n/acpi_tables.c b/src/mainboard/via/epia-n/acpi_tables.c
index d8b28b25e7..741784e839 100644
--- a/src/mainboard/via/epia-n/acpi_tables.c
+++ b/src/mainboard/via/epia-n/acpi_tables.c
@@ -30,6 +30,7 @@
#include <console/console.h>
#include <string.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
@@ -94,7 +95,7 @@ unsigned long acpi_fill_madt(unsigned long current)
/* Write SB IOAPIC. */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- VT8237R_APIC_ID, VT8237R_APIC_BASE, gsi_base);
+ VT8237R_APIC_ID, IO_APIC_ADDR, gsi_base);
/* IRQ0 -> APIC IRQ2. */
current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
diff --git a/src/mainboard/via/epia-n/mainboard.c b/src/mainboard/via/epia-n/mainboard.c
index 4206b24d5d..9227f0ab0e 100644
--- a/src/mainboard/via/epia-n/mainboard.c
+++ b/src/mainboard/via/epia-n/mainboard.c
@@ -23,6 +23,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <boot/tables.h>
+#include <arch/ioapic.h>
#include <southbridge/via/vt8237r/vt8237r.h>
#include "chip.h"
@@ -30,7 +31,7 @@ int add_mainboard_resources(struct lb_memory *mem)
{
#if CONFIG_IOAPIC == 1
lb_add_memory_range(mem, LB_MEM_RESERVED,
- VT8237R_APIC_BASE, 0x1000);
+ IO_APIC_ADDR, 0x1000);
lb_add_memory_range(mem, LB_MEM_RESERVED,
0xFEE00000ULL, 0x1000);
lb_add_memory_range(mem, LB_MEM_RESERVED,
diff --git a/src/mainboard/via/epia-n/mptable.c b/src/mainboard/via/epia-n/mptable.c
index ddd96bed5c..676c7e1988 100644
--- a/src/mainboard/via/epia-n/mptable.c
+++ b/src/mainboard/via/epia-n/mptable.c
@@ -2,6 +2,7 @@
/* as modified by RGM for coreboot */
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -35,7 +36,7 @@ static void *smp_write_config_table(void *v)
mptable_write_buses(mc, NULL, &isa_bus);
/*I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, 2, 0x20, 0xfec00000);
+ smp_write_ioapic(mc, 2, 0x20, IO_APIC_ADDR);
{
device_t dev;
struct resource *res;
diff --git a/src/mainboard/via/pc2500e/mptable.c b/src/mainboard/via/pc2500e/mptable.c
index 3e36e878fa..3e31abfef2 100644
--- a/src/mainboard/via/pc2500e/mptable.c
+++ b/src/mainboard/via/pc2500e/mptable.c
@@ -24,6 +24,7 @@
#include <console/console.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -59,7 +60,7 @@ static void *smp_write_config_table(void *v)
mptable_write_buses(mc, NULL, &isa_bus);
/* I/O APICs: APIC ID Version State Address*/
- smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, VT8237R_APIC_BASE);
+ smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR);
/* Now, assemble the table. */
mptable_add_isa_interrupts(mc, isa_bus, VT8237R_APIC_ID, 0);
diff --git a/src/mainboard/via/vt8454c/acpi_tables.c b/src/mainboard/via/vt8454c/acpi_tables.c
index 737a5c8b12..434bf8799d 100644
--- a/src/mainboard/via/vt8454c/acpi_tables.c
+++ b/src/mainboard/via/vt8454c/acpi_tables.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
+#include <arch/ioapic.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
@@ -85,10 +86,6 @@ static void acpi_create_via_hpet(acpi_hpet_t * hpet)
acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
}
-
-
-#define IO_APIC_ADDR 0xfec00000UL
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local Apic */
diff --git a/src/mainboard/via/vt8454c/mptable.c b/src/mainboard/via/vt8454c/mptable.c
index 588694f6b3..22a4769d3d 100644
--- a/src/mainboard/via/vt8454c/mptable.c
+++ b/src/mainboard/via/vt8454c/mptable.c
@@ -22,6 +22,7 @@
#include <device/device.h>
#include <device/pci.h>
#include <arch/smp/mpspec.h>
+#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>
#include <console/console.h>
#include <string.h>
@@ -56,7 +57,7 @@ static void *smp_write_config_table(void *v)
mptable_write_buses(mc, NULL, &isa_bus);
/* I/O APICs: APIC ID Version State Address */
- smp_write_ioapic(mc, 2, 17, 0xfec00000);
+ smp_write_ioapic(mc, 2, 17, IO_APIC_ADDR);
mptable_add_isa_interrupts(mc, isa_bus, 0x2, 0);