summaryrefslogtreecommitdiffstats
path: root/src/arch/x86
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2023-06-28 06:16:11 +0300
committerShelley Chen <shchen@google.com>2023-07-05 15:59:31 +0000
commitd7542cb338b79e9395e12e79b798a825f1a38f66 (patch)
tree2c042bcfada9069ab571fb44e74ebd656617f52f /src/arch/x86
parent47d61a7c14570e790a4e9795bcf1422be9445a53 (diff)
downloadcoreboot-d7542cb338b79e9395e12e79b798a825f1a38f66.tar.gz
coreboot-d7542cb338b79e9395e12e79b798a825f1a38f66.tar.bz2
coreboot-d7542cb338b79e9395e12e79b798a825f1a38f66.zip
arch/x86: Ensure LAPIC mode for exception handler
Attempting to use X2APIC MSRs before the call to enable_lapic() is made raises exception and double-faults. Change-Id: Ib97889466af0fbe639bec2be730784acc015b525 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76194 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/exception.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/arch/x86/exception.c b/src/arch/x86/exception.c
index 5f6c0fc641f5..e9234ade4a75 100644
--- a/src/arch/x86/exception.c
+++ b/src/arch/x86/exception.c
@@ -488,7 +488,6 @@ void x86_exception(struct eregs *info)
#else /* !CONFIG_GDB_STUB */
int logical_processor = 0;
- u32 apic_id = CONFIG(SMP) ? lapicid() : 0;
if (info->vector == DEBUG_VECTOR) {
if (breakpoint_dispatch_handler(info) == 0)
@@ -513,7 +512,7 @@ void x86_exception(struct eregs *info)
"r10: %016llx r11: %016llx\n"
"r12: %016llx r13: %016llx\n"
"r14: %016llx r15: %016llx\n",
- logical_processor, apic_id,
+ logical_processor, early_lapicid(),
info->vector, info->cs, info->rip,
info->error_code, info->rflags, read_cr2(),
info->rax, info->rbx, info->rcx, info->rdx,
@@ -530,7 +529,7 @@ void x86_exception(struct eregs *info)
"Code: %d eflags: %08x cr2: %08x\n"
"eax: %08x ebx: %08x ecx: %08x edx: %08x\n"
"edi: %08x esi: %08x ebp: %08x esp: %08x\n",
- logical_processor, apic_id,
+ logical_processor, early_lapicid(),
info->vector, info->cs, info->eip,
info->error_code, info->eflags, read_cr2(),
info->eax, info->ebx, info->ecx, info->edx,