From 34806cce60002a4f06b8724d79d2558385988e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 31 May 2021 15:15:27 +0300 Subject: arch/x86: Do not call lapicid() without SMP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LAPIC may not be enabled or implemented. Change-Id: I2e0f42641ca15d177590d1696475054eda6ce125 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/55244 Tested-by: build bot (Jenkins) Reviewed-by: Wonkyu Kim Reviewed-by: Arthur Heymans --- src/arch/x86/exception.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/arch/x86/exception.c b/src/arch/x86/exception.c index f10c7bf8ba..aa94d3fe73 100644 --- a/src/arch/x86/exception.c +++ b/src/arch/x86/exception.c @@ -486,6 +486,7 @@ void x86_exception(struct eregs *info) #else /* !CONFIG_GDB_STUB */ int logical_processor = 0; + u32 apic_id = CONFIG(SMP) ? lapicid() : 0; #if ENV_RAMSTAGE logical_processor = cpu_index(); @@ -505,7 +506,7 @@ void x86_exception(struct eregs *info) "r10: %016llx r11: %016llx\n" "r12: %016llx r13: %016llx\n" "r14: %016llx r15: %016llx\n", - logical_processor, (unsigned int)lapicid(), + logical_processor, apic_id, info->vector, info->cs, info->rip, info->error_code, info->rflags, read_cr2(), info->rax, info->rbx, info->rcx, info->rdx, @@ -522,7 +523,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, (unsigned int)lapicid(), + logical_processor, apic_id, info->vector, info->cs, info->eip, info->error_code, info->eflags, read_cr2(), info->eax, info->ebx, info->ecx, info->edx, -- cgit v1.2.3