;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2009 - 2019, 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
extern ASM_PFX(FeaturePcdGet (PcdCpuSmmProfileEnable))\r
-extern ASM_PFX(gSmiMtrrs)\r
extern ASM_PFX(SmiPFHandler)\r
+extern ASM_PFX(mSetupDebugTrap)\r
\r
global ASM_PFX(gcSmiIdtr)\r
global ASM_PFX(gcSmiGdtr)\r
DB 0x80 ; LimitHigh\r
DB 0 ; BaseHigh\r
ExceptionTssSeg:\r
- DW TSS_DESC_SIZE ; LimitLow\r
+ DW EXCEPTION_TSS_DESC_SIZE ; LimitLow\r
DW 0 ; BaseLow\r
DB 0 ; BaseMid\r
DB 0x89\r
DW 0 ; Reserved\r
DW 0 ; T\r
DW 0 ; I/O Map Base\r
+ DD 0 ; SSP\r
+EXCEPTION_TSS_DESC_SIZE equ $ - ExceptionTssDescriptor\r
\r
ASM_PFX(gcPsd):\r
DB 'PSDSIG '\r
DD 0\r
times 24 DB 0\r
DD 0\r
- DD ASM_PFX(gSmiMtrrs)\r
+ DD 0\r
PSD_SIZE equ $ - ASM_PFX(gcPsd)\r
\r
ASM_PFX(gcSmiGdtr):\r
;; FX_SAVE_STATE_IA32 FxSaveState;\r
sub esp, 512\r
mov edi, esp\r
- db 0xf, 0xae, 0x7 ;fxsave [edi]\r
+ fxsave [edi]\r
\r
; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
cld\r
\r
;; FX_SAVE_STATE_IA32 FxSaveState;\r
mov esi, esp\r
- db 0xf, 0xae, 0xe ; fxrstor [esi]\r
+ fxrstor [esi]\r
add esp, 512\r
\r
;; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
clts\r
sub esp, 512\r
mov edi, esp\r
- db 0xf, 0xae, 0x7 ;fxsave [edi]\r
+ fxsave [edi]\r
\r
; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
cld\r
\r
;; FX_SAVE_STATE_IA32 FxSaveState;\r
mov esi, esp\r
- db 0xf, 0xae, 0xe ; fxrstor [esi]\r
+ fxrstor [esi]\r
add esp, 512\r
\r
;; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
mov esp, ebp\r
\r
; Set single step DB# if SMM profile is enabled and page fault exception happens\r
- cmp byte [dword ASM_PFX(FeaturePcdGet (PcdCpuSmmProfileEnable))], 0\r
+ cmp byte [dword ASM_PFX(mSetupDebugTrap)], 0\r
jz @Done2\r
\r
; Create return context for iretd in stub function\r