From dea42e011a126c4fdc9ab62f6d6c449df4740f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 31 May 2021 20:26:16 +0300 Subject: cpu/x86/lapic: Replace LOCAL_APIC_ADDR references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that there are assumptions about LAPIC MMIO location in both AMD and Intel sources in coreboot proper. Change-Id: I2c668f5f9b93d170351c00d77d003c230900e0b4 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/55194 Reviewed-by: Felix Held Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/arch/x86/cpu.c | 5 ----- src/arch/x86/include/arch/smp/mpspec.h | 2 +- src/arch/x86/mpspec.c | 6 ++++-- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c index 07bd7b5ff2..c929e5ea69 100644 --- a/src/arch/x86/cpu.c +++ b/src/arch/x86/cpu.c @@ -340,8 +340,3 @@ int cpu_index(void) } return -1; } - -uintptr_t cpu_get_lapic_addr(void) -{ - return LOCAL_APIC_ADDR; -} diff --git a/src/arch/x86/include/arch/smp/mpspec.h b/src/arch/x86/include/arch/smp/mpspec.h index 25c23e68f5..198d7df4aa 100644 --- a/src/arch/x86/include/arch/smp/mpspec.h +++ b/src/arch/x86/include/arch/smp/mpspec.h @@ -224,7 +224,7 @@ struct mp_exten_compatibility_address_space { */ } __packed; -void mptable_init(struct mp_config_table *mc, u32 lapic_addr); +void mptable_init(struct mp_config_table *mc); void *smp_next_mpc_entry(struct mp_config_table *mc); void *smp_next_mpe_entry(struct mp_config_table *mc); diff --git a/src/arch/x86/mpspec.c b/src/arch/x86/mpspec.c index 15c3c0e1ea..fa29e800c3 100644 --- a/src/arch/x86/mpspec.c +++ b/src/arch/x86/mpspec.c @@ -6,13 +6,15 @@ #include #include #include +#include #include #include /* Initialize the specified "mc" struct with initial values. */ -void mptable_init(struct mp_config_table *mc, u32 lapic_addr) +void mptable_init(struct mp_config_table *mc) { int i; + u32 lapic_addr = cpu_get_lapic_addr(); memset(mc, 0, sizeof(*mc)); @@ -533,7 +535,7 @@ unsigned long __weak write_smp_table(unsigned long addr) v = smp_write_floating_table(addr, 0); mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - mptable_init(mc, LOCAL_APIC_ADDR); + mptable_init(mc); smp_write_processors(mc); -- cgit v1.2.3