-global ASM_PFX(InitializeIDTSmmStackGuard)\r
-ASM_PFX(InitializeIDTSmmStackGuard):\r
- push 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 occurrs,\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
- pop ebx\r
- ret\r