aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/smm
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/smm')
-rw-r--r--src/cpu/x86/smm/smm_stub.S4
-rw-r--r--src/cpu/x86/smm/smmhandler.S6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 07be047a36..44ee7cb327 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -185,7 +185,7 @@ apicid_end:
/* Align stack to 16 bytes. Another 32 bytes are pushed below. */
andl $0xfffffff0, %esp
-#ifdef __x86_64__
+#if ENV_X86_64
mov %ecx, %edi
/* Backup IA32_EFER. Preserves ebx. */
movl $(IA32_EFER), %ecx
@@ -204,7 +204,7 @@ apicid_end:
* struct arg = { c_handler_params, cpu_num, smm_runtime, canary };
* c_handler(&arg)
*/
-#ifdef __x86_64__
+#if ENV_X86_64
push %rbx /* uintptr_t *canary */
push %rcx /* size_t cpu */
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 3750e5224a..b7805d06ab 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -43,7 +43,7 @@
#define SMM_HANDLER_OFFSET 0x0000
-#if defined(__x86_64__)
+#if ENV_X86_64
.bss
ia32efer_backup_eax:
.long 0
@@ -166,7 +166,7 @@ untampered_lapic:
addl $SMM_STACK_SIZE, %ebx
movl %ebx, %esp
-#if defined(__x86_64__)
+#if ENV_X86_64
/* Backup IA32_EFER. Preserves ebx. */
movl $(IA32_EFER), %ecx
rdmsr
@@ -180,7 +180,7 @@ untampered_lapic:
/* Call C handler */
call smi_handler
-#if defined(__x86_64__)
+#if ENV_X86_64
/*
* The only reason to go back to protected mode is that RSM doesn't restore
* MSR registers and MSR IA32_EFER was modified by entering long mode.