HAOUAS Elyes has uploaded this change for review.

View Change

cpu/x86/smm: Don't redefine LAPIC_ID

Use already defined LAPIC_ID in <cpu/x86/lapic_def.h>.

Change-Id: Iaf7da1ea0df58020fe53f2a3482b0f535265b03f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
---
M src/cpu/x86/smm/smihandler.c
M src/cpu/x86/smm/smmrelocate.S
2 files changed, 4 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/37173/1
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c
index 20417d1..9710142 100644
--- a/src/cpu/x86/smm/smihandler.c
+++ b/src/cpu/x86/smm/smihandler.c
@@ -15,6 +15,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/cache.h>
+#include <cpu/x86/lapic_def.h>
#include <cpu/x86/smm.h>
#include <cpu/x86/smi_deprecated.h>
#include <cpu/amd/amd64_save_state.h>
@@ -78,10 +79,9 @@
);
}

-#define LAPIC_ID 0xfee00020
static __always_inline unsigned long nodeid(void)
{
- return (*((volatile unsigned long *)(LAPIC_ID)) >> 24);
+ return (*((volatile unsigned long *)(LOCAL_APIC_ADDR | LAPIC_ID)) >> 24);
}

void io_trap_handler(int smif)
diff --git a/src/cpu/x86/smm/smmrelocate.S b/src/cpu/x86/smm/smmrelocate.S
index f64b365..1ee7b59 100644
--- a/src/cpu/x86/smm/smmrelocate.S
+++ b/src/cpu/x86/smm/smmrelocate.S
@@ -31,7 +31,7 @@
#error "Only use this file with ASEG."
#endif /* CONFIG_SMM_ASEG */

-#define LAPIC_ID 0xfee00020
+#include <cpu/x86/lapic_def.h>

.global smm_relocation_start
.global smm_relocation_end
@@ -113,7 +113,7 @@

smm_relocate:
/* Get this CPU's LAPIC ID */
- movl $LAPIC_ID, %esi
+ movl $(LOCAL_APIC_ADDR | LAPIC_ID), %esi
ADDR32(movl) (%esi), %ecx
shr $24, %ecx


To view, visit change 37173. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaf7da1ea0df58020fe53f2a3482b0f535265b03f
Gerrit-Change-Number: 37173
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-MessageType: newchange