summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-09-22 12:35:46 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-23 20:25:31 +0000
commit1f5c5da812d5d71e9ee4f1b3ba47e5d323a8c05d (patch)
tree2a852160d9328447c279828f18a4ca44c8da4b0e
parent3c705fa35d014e8712e2e4766708196120b7aa6c (diff)
downloadcoreboot-1f5c5da812d5d71e9ee4f1b3ba47e5d323a8c05d.tar.gz
coreboot-1f5c5da812d5d71e9ee4f1b3ba47e5d323a8c05d.tar.bz2
coreboot-1f5c5da812d5d71e9ee4f1b3ba47e5d323a8c05d.zip
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 <felix-coreboot@felixheld.de> Change-Id: Id22f9b5ce53c7bced6bbcc3f5026d4c793b34f78 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67776 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/cpu/x86/smm/smihandler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c
index 0b262afaa9eb..2a5f1bb3638b 100644
--- a/src/cpu/x86/smm/smihandler.c
+++ b/src/cpu/x86/smm/smihandler.c
@@ -8,6 +8,7 @@
#include <cpu/amd/amd64_save_state.h>
#include <cpu/intel/em64t100_save_state.h>
#include <cpu/intel/em64t101_save_state.h>
+#include <cpu/x86/lapic_def.h>
#include <cpu/x86/legacy_save_state.h>
#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)