summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2017-05-10 14:42:41 +0800
committerJeff Fan <jeff.fan@intel.com>2017-05-11 16:32:47 +0800
commit6afc643ce0eded9ccbd015a5cd6d2ba0e264b01d (patch)
treea3f702eb952c2c06a4664577aefceaf6d81dd9fc
parent6d92ae11d14abe39f2587a360bc5d6c370325cad (diff)
downloadedk2-6afc643ce0eded9ccbd015a5cd6d2ba0e264b01d.tar.gz
edk2-6afc643ce0eded9ccbd015a5cd6d2ba0e264b01d.tar.bz2
edk2-6afc643ce0eded9ccbd015a5cd6d2ba0e264b01d.zip
UefiCpuPkg/SmmCpuFeaturesLib: Fix Ia32/SmiEntry.asm build issue
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
-rw-r--r--UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm6
-rw-r--r--UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm15
2 files changed, 13 insertions, 8 deletions
diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm
index 94888d5aec..91dc1eb3d3 100644
--- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm
+++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm
@@ -1,5 +1,5 @@
;------------------------------------------------------------------------------ ;
-; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -201,7 +201,7 @@ CommonHandler:
call eax
add esp, 4
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @f
@@ -221,7 +221,7 @@ _StmSmiHandler:
; Check XD disable bit
;
xor esi, esi
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @StmXdDone
diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm
index 7c04ad91f2..d0ae14713c 100644
--- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm
+++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm
@@ -1,5 +1,5 @@
;------------------------------------------------------------------------------ ;
-; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -26,11 +26,16 @@ EXTERNDEF gcStmPsd:BYTE
EXTERNDEF SmmStmExceptionHandler:PROC
EXTERNDEF SmmStmSetup:PROC
EXTERNDEF SmmStmTeardown:PROC
+EXTERNDEF gStmXdSupported:BYTE
CODE_SEL = 08h
DATA_SEL = 20h
TSS_SEL = 40h
+MSR_IA32_MISC_ENABLE EQU 1A0h
+MSR_EFER EQU 0c0000080h
+MSR_EFER_XD EQU 0800h
+
.data
gcStmPsd LABEL BYTE
@@ -88,7 +93,7 @@ _OnStmSetup PROC
; Check XD disable bit
;
xor esi, esi
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @StmXdDone1
@@ -109,7 +114,7 @@ _OnStmSetup PROC
call SmmStmSetup
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @f
@@ -130,7 +135,7 @@ _OnStmTeardown PROC
; Check XD disable bit
;
xor esi, esi
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @StmXdDone2
@@ -151,7 +156,7 @@ _OnStmTeardown PROC
call SmmStmTeardown
- mov eax, gStmXdSupported
+ mov eax, offset gStmXdSupported
mov al, [eax]
cmp al, 0
jz @f