]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / X64 / AsmFuncs.nasm
index 9cc38a3128e35af83bc04a6ff5ad6ad2f8a0c22e..c6c5e4918931a569f3f6bdd6a14b88c5f0579c49 100644 (file)
@@ -1,7 +1,7 @@
 ;/** @file\r
 ;  Low level x64 routines used by the debug support driver.\r
 ;\r
-;  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+;  Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.<BR>\r
 ;  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 ;\r
 ;**/\r
 \r
 %define FXSTOR_FLAG 0x1000000         ; bit cpuid 24 of feature flags\r
 \r
-;; The FXSTOR and FXRSTOR commands are used for saving and restoring the x87,\r
-;; MMX, SSE, SSE2, etc registers.  The initialization of the debugsupport driver\r
-;; MUST check the CPUID feature flags to see that these instructions are available\r
-;; and fail to init if they are not.\r
-\r
-;; fxstor [rdi]\r
-%macro FXSTOR_RDI 0\r
-                         db 0xf, 0xae, 00000111y ; mod = 00, reg/op = 000, r/m = 111 = [rdi]\r
-%endmacro\r
-\r
-;; fxrstor [rsi]\r
-%macro FXRSTOR_RSI 0\r
-                         db 0xf, 0xae, 00001110y ; mod = 00, reg/op = 001, r/m = 110 = [rsi]\r
-%endmacro\r
-\r
 SECTION .data\r
 \r
 global ASM_PFX(OrigVector)\r
@@ -381,7 +366,7 @@ ExtraPushDone:
                 ; IMPORTANT!! The debug stack has been carefully constructed to\r
                 ; insure that rsp and rdi are 16 byte aligned when we get here.\r
                 ; They MUST be.  If they are not, a GP fault will occur.\r
-                FXSTOR_RDI\r
+                fxsave  [rdi]\r
 \r
 ;; UEFI calling convention for x64 requires that Direction flag in EFLAGs is clear\r
                 cld\r
@@ -404,7 +389,7 @@ ExtraPushDone:
 \r
 ;; FX_SAVE_STATE_X64 FxSaveState;\r
                 mov     rsi, rsp\r
-                FXRSTOR_RSI\r
+                fxrstor [rsi]\r
                 add     rsp, 512\r
 \r
 ;; UINT64  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r