;------------------------------------------------------------------------------ ;\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
;-------------------------------------------------------------------------------\r
\r
EXTERNDEF SmiPFHandler:PROC\r
-EXTERNDEF gSmiMtrrs:QWORD\r
EXTERNDEF gcSmiIdtr:FWORD\r
EXTERNDEF gcSmiGdtr:FWORD\r
EXTERNDEF gcPsd:BYTE\r
DB 0 ; BaseHigh\r
; TSS Segment for X64 specially\r
TssSeg LABEL QWORD\r
- DW TSS_DESC_SIZE ; LimitLow\r
+ DW TSS_DESC_SIZE - 1 ; LimitLow\r
DW 0 ; BaseLow\r
DB 0 ; BaseMid\r
DB 89h\r
- DB 080h ; LimitHigh\r
+ DB 00h ; LimitHigh\r
DB 0 ; BaseHigh\r
DD 0 ; BaseUpper\r
DD 0 ; Reserved\r
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
;\r
DQ offset NullSeg\r
\r
gcSmiIdtr LABEL FWORD\r
- DW IDT_SIZE - 1\r
- DQ offset _SmiIDT\r
-\r
- .data\r
-\r
-;\r
-; Here is the IDT. There are 32 (not 255) entries in it since only processor\r
-; generated exceptions will be handled.\r
-;\r
-_SmiIDT:\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
- DQ 0 ; Offset 32:63\r
- ENDM\r
-_SmiIDTEnd:\r
-\r
-IDT_SIZE = (offset _SmiIDTEnd - offset _SmiIDT)\r
+ DW 0\r
+ DQ 0\r
\r
.code\r
\r
iretq\r
PageFaultIdtHandlerSmmProfile ENDP\r
\r
-InitializeIDTSmmStackGuard PROC\r
-;\r
-; If SMM Stack Guard feature is enabled, set the IST field of\r
-; the interrupt gate for Page Fault Exception to be 1\r
-;\r
- lea rax, _SmiIDT + 14 * 16\r
- mov byte ptr [rax + 4], 1\r
- ret\r
-InitializeIDTSmmStackGuard ENDP\r
-\r
END\r