aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-05-31 20:26:16 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-11 07:11:43 +0000
commitdea42e011a126c4fdc9ab62f6d6c449df4740f82 (patch)
tree97896aa5869a5447ecca0310af09d0e122729bfd /src/cpu/x86
parenta96be277e1062796be7109a08a9ab9cdb6bf5d28 (diff)
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>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/lapic/lapic.c6
-rw-r--r--src/cpu/x86/smm/smmhandler.S3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c
index 9f3cff5834..9aac163d15 100644
--- a/src/cpu/x86/lapic/lapic.c
+++ b/src/cpu/x86/lapic/lapic.c
@@ -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)
{
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 4cbfbfdfb1..3750e5224a 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -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