]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/SmmCpuFeaturesLib: Fix Ia32/SmiEntry.asm build issue
authorJeff Fan <jeff.fan@intel.com>
Wed, 10 May 2017 06:42:41 +0000 (14:42 +0800)
committerJeff Fan <jeff.fan@intel.com>
Thu, 11 May 2017 08:32:47 +0000 (16:32 +0800)
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>
UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm
UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm

index 94888d5aeccce1b1f8a8b6d518a76d204bac625b..91dc1eb3d3bc6b2937e175b717ee3c878adf85ca 100644 (file)
@@ -1,5 +1,5 @@
 ;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -201,7 +201,7 @@ CommonHandler:
     call    eax\r
     add     esp, 4\r
 \r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @f\r
@@ -221,7 +221,7 @@ _StmSmiHandler:
 ; Check XD disable bit\r
 ;\r
     xor     esi, esi\r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @StmXdDone\r
index 7c04ad91f20fe8804f05fcb2abcb478bf93e45a9..d0ae14713c336c853c90910501b0e5b8d0fc38c5 100644 (file)
@@ -1,5 +1,5 @@
 ;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -26,11 +26,16 @@ EXTERNDEF   gcStmPsd:BYTE
 EXTERNDEF   SmmStmExceptionHandler:PROC\r
 EXTERNDEF   SmmStmSetup:PROC\r
 EXTERNDEF   SmmStmTeardown:PROC\r
+EXTERNDEF   gStmXdSupported:BYTE\r
 \r
 CODE_SEL    = 08h\r
 DATA_SEL    = 20h\r
 TSS_SEL     = 40h\r
 \r
+MSR_IA32_MISC_ENABLE  EQU     1A0h\r
+MSR_EFER              EQU     0c0000080h\r
+MSR_EFER_XD           EQU     0800h\r
+\r
     .data\r
 \r
 gcStmPsd     LABEL   BYTE\r
@@ -88,7 +93,7 @@ _OnStmSetup PROC
 ; Check XD disable bit\r
 ;\r
     xor     esi, esi\r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @StmXdDone1\r
@@ -109,7 +114,7 @@ _OnStmSetup PROC
 \r
   call SmmStmSetup\r
 \r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @f\r
@@ -130,7 +135,7 @@ _OnStmTeardown PROC
 ; Check XD disable bit\r
 ;\r
     xor     esi, esi\r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @StmXdDone2\r
@@ -151,7 +156,7 @@ _OnStmTeardown PROC
 \r
   call SmmStmTeardown\r
 \r
-    mov     eax, gStmXdSupported\r
+    mov     eax, offset gStmXdSupported\r
     mov     al, [eax]\r
     cmp     al, 0\r
     jz      @f\r