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

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <cpu/cpu.h>
#include <cpu/x86/lapic.h>
#include <cpu/x86/lapic_def.h>
#include <cpu/x86/msr.h>
@@ -25,6 +26,11 @@ void disable_lapic(void)
wrmsr(LAPIC_BASE_MSR, msr);
}
uintptr_t cpu_get_lapic_addr(void)
{
return LAPIC_DEFAULT_BASE;
}
/* See if I need to initialize the local APIC */
static int need_lapic_init(void)
{

View File

@@ -126,8 +126,9 @@ untampered_lapic:
movw %ax, %fs
movw %ax, %gs
/* FIXME: Incompatible with X2APIC_SUPPORT. */
/* Get this CPU's LAPIC ID */
movl $(LOCAL_APIC_ADDR | LAPIC_ID), %esi
movl $(LAPIC_DEFAULT_BASE | LAPIC_ID), %esi
movl (%esi), %ecx
shr $24, %ecx