From 1f5c5da812d5d71e9ee4f1b3ba47e5d323a8c05d Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 22 Sep 2022 12:35:46 +0200 Subject: cpu/x86/smm/smihandler: use existing LAPIC ID register definition Instead of redefining the register address in smihandler.c, use the existing definitions from include/cpu/x86/lapic_def.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: Id22f9b5ce53c7bced6bbcc3f5026d4c793b34f78 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67776 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/cpu/x86/smm/smihandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c index 0b262afaa9..2a5f1bb363 100644 --- a/src/cpu/x86/smm/smihandler.c +++ b/src/cpu/x86/smm/smihandler.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #if CONFIG(SPI_FLASH_SMM) @@ -49,10 +50,9 @@ static void smi_release_lock(void) ); } -#define LAPIC_ID 0xfee00020 static __always_inline unsigned long nodeid(void) { - return (*((volatile unsigned long *)(LAPIC_ID)) >> 24); + return (*((volatile unsigned long *)(LAPIC_DEFAULT_BASE + LAPIC_ID)) >> 24); } void io_trap_handler(int smif) -- cgit v1.2.3