From 4e04776a1bd618cc9f6f5e1a7250104313c5c50c Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 22 Sep 2022 12:50:52 +0200 Subject: [PATCH] cpu/x86/smm/smihandler: use lapicid() Replace nodeid() function in cpu/x86/smm/smihandler.c with calling lapicid() from include/cpu/x86/lapic.h. TEST=Timeless build for lenovo/g505s which includes this file in the build results in identical firmware image. Signed-off-by: Felix Held Change-Id: I336ca9888e24e4d6f10a81cc4f3760c9d7c8f4bc Reviewed-on: https://review.coreboot.org/c/coreboot/+/67777 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Martin Roth --- src/cpu/x86/smm/smihandler.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c index 2a5f1bb363..7946e90aea 100644 --- a/src/cpu/x86/smm/smihandler.c +++ b/src/cpu/x86/smm/smihandler.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -50,11 +51,6 @@ static void smi_release_lock(void) ); } -static __always_inline unsigned long nodeid(void) -{ - return (*((volatile unsigned long *)(LAPIC_DEFAULT_BASE + LAPIC_ID)) >> 24); -} - void io_trap_handler(int smif) { /* If a handler function handled a given IO trap, it @@ -164,7 +160,7 @@ void smi_handler(void) smi_backup_pci_address(); - node = nodeid(); + node = lapicid(); console_init();