]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiException.asm
MdePkg/BaseLib: add PatchInstructionX86()
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / Ia32 / SmiException.asm
index b4eb492da0c04e6a015d07cda33b222d9bf92515..80a44b861fcb183bdfd3542645eb81e49b6df8e7 100644 (file)
@@ -1,5 +1,5 @@
 ;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2009 - 2016, 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
@@ -23,9 +23,9 @@
 \r
 EXTERNDEF   SmiPFHandler:PROC\r
 EXTERNDEF   PageFaultStubFunction:PROC\r
-EXTERNDEF   gSmiMtrrs:QWORD\r
 EXTERNDEF   gcSmiIdtr:FWORD\r
 EXTERNDEF   gcSmiGdtr:FWORD\r
+EXTERNDEF   gTaskGateDescriptor:QWORD\r
 EXTERNDEF   gcPsd:BYTE\r
 EXTERNDEF   FeaturePcdGet (PcdCpuSmmProfileEnable):BYTE\r
 \r
@@ -244,7 +244,7 @@ gcPsd     LABEL   BYTE
             DD      GDT_SIZE\r
             DD      0\r
             DB      24 dup (0)\r
-            DQ      offset gSmiMtrrs\r
+            DQ      0\r
 PSD_SIZE  = $ - offset gcPsd\r
 \r
 gcSmiGdtr   LABEL   FWORD\r
@@ -252,20 +252,10 @@ gcSmiGdtr   LABEL   FWORD
     DD      offset NullSeg\r
 \r
 gcSmiIdtr   LABEL   FWORD\r
-    DW      IDT_SIZE - 1\r
-    DD      offset _SmiIDT\r
-\r
-_SmiIDT     LABEL   QWORD\r
-REPEAT      32\r
-    DW      0                           ; Offset 0:15\r
-    DW      CODE_SEL                    ; Segment selector\r
-    DB      0                           ; Unused\r
-    DB      8eh                         ; Interrupt Gate, Present\r
-    DW      0                           ; Offset 16:31\r
-            ENDM\r
-IDT_SIZE = $ - offset _SmiIDT\r
-\r
-TaskGateDescriptor LABEL DWORD\r
+    DW      0\r
+    DD      0\r
+\r
+gTaskGateDescriptor LABEL QWORD\r
     DW      0                           ; Reserved\r
     DW      EXCEPTION_TSS_SEL           ; TSS Segment selector\r
     DB      0                           ; Reserved\r
@@ -720,19 +710,4 @@ PageFaultStubFunction   PROC
     iretd\r
 PageFaultStubFunction   ENDP\r
 \r
-InitializeIDTSmmStackGuard   PROC    USES    ebx\r
-;\r
-; If SMM Stack Guard feature is enabled, the Page Fault Exception entry in IDT\r
-; is a Task Gate Descriptor so that when a Page Fault Exception occurs,\r
-; the processors can use a known good stack in case stack is ran out.\r
-;\r
-    lea     ebx, _SmiIDT + 14 * 8\r
-    lea     edx, TaskGateDescriptor\r
-    mov     eax, [edx]\r
-    mov     [ebx], eax\r
-    mov     eax, [edx + 4]\r
-    mov     [ebx + 4], eax\r
-    ret\r
-InitializeIDTSmmStackGuard   ENDP\r
-\r
     END\r