summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2012-02-16 18:43:25 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2012-03-08 15:39:05 +0100
commitc8feeddf343e8fd0ddd6be7e42101ab4f1866ed0 (patch)
tree74cd4b04d7b966561334b6482c653d09aa9b3eb7 /src/arch/x86
parent91162705a65e87c56d9fc58edfe597140d1b4d53 (diff)
downloadcoreboot-c8feeddf343e8fd0ddd6be7e42101ab4f1866ed0.tar.xz
Unify Local APIC address definitions
We used several names for that same value, and hardcoded the value at some more places. They're all LOCAL_APIC_ADDR now (except for lapic specific code that still uses LAPIC_DEFAULT_BASE). Change-Id: I1d4be73b1984f22b7e84681edfadf0588a7589b6 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/676 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/boot/acpi.c3
-rw-r--r--src/arch/x86/include/arch/ioapic.h4
-rw-r--r--src/arch/x86/include/arch/smp/mpspec.h5
3 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index f1be0345e4..168933a726 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -31,6 +31,7 @@
#include <arch/acpigen.h>
#include <device/pci.h>
#include <cbmem.h>
+#include <cpu/x86/lapic_def.h>
u8 acpi_checksum(u8 *table, u32 length)
{
@@ -188,8 +189,6 @@ int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu,
void acpi_create_madt(acpi_madt_t *madt)
{
-#define LOCAL_APIC_ADDR 0xfee00000ULL
-
acpi_header_t *header = &(madt->header);
unsigned long current = (unsigned long)madt + sizeof(acpi_madt_t);
diff --git a/src/arch/x86/include/arch/ioapic.h b/src/arch/x86/include/arch/ioapic.h
index 623f617253..5d7e19649e 100644
--- a/src/arch/x86/include/arch/ioapic.h
+++ b/src/arch/x86/include/arch/ioapic.h
@@ -20,7 +20,7 @@
#ifndef __I386_ARCH_IOAPIC_H
#define __I386_ARCH_IOAPIC_H
-#define IO_APIC_ADDR 0xfec00000UL
+#define IO_APIC_ADDR 0xfec00000
#define IO_APIC_INTERRUPTS 24
#define ALL (0xff << 24)
@@ -38,7 +38,9 @@
#define SMI (2 << 8)
#define INT (1 << 8)
+#ifndef __ACPI__
void setup_ioapic(u32 ioapic_base, u8 ioapic_id);
void clear_ioapic(u32 ioapic_base);
+#endif
#endif
diff --git a/src/arch/x86/include/arch/smp/mpspec.h b/src/arch/x86/include/arch/smp/mpspec.h
index 2eb18138a6..e5e6195cd5 100644
--- a/src/arch/x86/include/arch/smp/mpspec.h
+++ b/src/arch/x86/include/arch/smp/mpspec.h
@@ -2,6 +2,8 @@
#define __ASM_MPSPEC_H
#include <device/device.h>
+#include <cpu/x86/lapic_def.h>
+
/*
* Structure definitions for SMP machines following the
* Intel Multiprocessing Specification 1.1 and 1.4.
@@ -229,9 +231,6 @@ struct mp_exten_compatibility_address_space {
*/
} __attribute__((packed));
-/* Default local apic addr */
-#define LAPIC_ADDR 0xFEE00000
-
void mptable_init(struct mp_config_table *mc, u32 lapic_addr);
void *smp_next_mpc_entry(struct mp_config_table *mc);