cpu/x86/lapic: Replace LOCAL_APIC_ADDR references

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 <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55194
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2021-05-31 20:26:16 +03:00
parent a96be277e1
commit dea42e011a
21 changed files with 29 additions and 30 deletions

View File

@@ -340,8 +340,3 @@ int cpu_index(void)
}
return -1;
}
uintptr_t cpu_get_lapic_addr(void)
{
return LOCAL_APIC_ADDR;
}

View File

@@ -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);

View File

@@ -6,13 +6,15 @@
#include <arch/smp/mpspec.h>
#include <string.h>
#include <arch/cpu.h>
#include <cpu/cpu.h>
#include <cpu/x86/lapic.h>
#include <drivers/generic/ioapic/chip.h>
/* 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);