#------------------------------------------------------------------------------\r
#\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
.quad NullSeg\r
\r
ASM_PFX(gcSmiIdtr):\r
- .word IDT_SIZE - 1\r
- .quad _SmiIDT\r
-\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
-# The following segment repeats 32 times:\r
-# No. 1\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 2\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 3\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 4\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 5\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 6\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 7\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 8\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 9\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 10\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 11\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 12\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 13\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 14\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 15\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 16\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 17\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 18\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 19\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 20\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 21\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 22\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 23\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 24\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 25\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 26\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 27\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 28\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 29\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 30\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 31\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-# No. 32\r
- .word 0 # Offset 0:15\r
- .word CODE_SEL\r
- .byte 0 # Unused\r
- .byte 0x8e # Interrupt Gate, Present\r
- .word 0 # Offset 16:31\r
- .quad 0 # Offset 32:63\r
-\r
-_SmiIDTEnd:\r
-\r
-.equ IDT_SIZE, (_SmiIDTEnd - _SmiIDT)\r
+ .word 0\r
+ .quad 0\r
\r
.text\r
\r
addq $16, %rsp # skip INT# & ErrCode\r
iretq\r
\r
-ASM_GLOBAL ASM_PFX(InitializeIDTSmmStackGuard)\r
-ASM_PFX(InitializeIDTSmmStackGuard):\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
- movabsq $_SmiIDT + 14 * 16, %rax\r
- movb $1, 4(%rax)\r
- ret\r