diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-09-22 12:50:52 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-24 19:39:26 +0000 |
commit | 4e04776a1bd618cc9f6f5e1a7250104313c5c50c (patch) | |
tree | b55fbcd785be56bac02709ce15ce3e76a3eafe1f /src/cpu/x86 | |
parent | a0405b84cabfa6a53501faa3b914a1026b9277a6 (diff) |
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 <felix-coreboot@felixheld.de>
Change-Id: I336ca9888e24e4d6f10a81cc4f3760c9d7c8f4bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/smm/smihandler.c | 8 |
1 files 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 <cpu/amd/amd64_save_state.h> #include <cpu/intel/em64t100_save_state.h> #include <cpu/intel/em64t101_save_state.h> +#include <cpu/x86/lapic.h> #include <cpu/x86/lapic_def.h> #include <cpu/x86/legacy_save_state.h> @@ -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(); |