]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/FspSecCore/Ia32/Stack.nasm
IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / Ia32 / Stack.nasm
index 5a7e27c240cdb05f330af2614570393f01f2264b..5cb2424bc8dd0f69dcc642612dac797bdd372e4f 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>\r
 ; SPDX-License-Identifier: BSD-2-Clause-Patent\r
 ;\r
 ; Abstract:\r
@@ -9,20 +9,20 @@
 ;\r
 ;------------------------------------------------------------------------------\r
 \r
-SECTION .text\r
+    SECTION .text\r
 \r
 ;------------------------------------------------------------------------------\r
 ; VOID\r
 ; EFIAPI\r
 ; SecSwitchStack (\r
 ;   UINT32   TemporaryMemoryBase,\r
-;   UINT32   PermenentMemoryBase\r
+;   UINT32   PermanentMemoryBase\r
 ;   );\r
 ;------------------------------------------------------------------------------\r
 global ASM_PFX(SecSwitchStack)\r
 ASM_PFX(SecSwitchStack):\r
     ;\r
-    ; Save three register: eax, ebx, ecx\r
+    ; Save four register: eax, ebx, ecx, edx\r
     ;\r
     push  eax\r
     push  ebx\r
@@ -55,7 +55,7 @@ ASM_PFX(SecSwitchStack):
     mov   dword [eax + 12], edx\r
     mov   edx, dword [esp + 16]    ; Update this function's return address into permanent memory\r
     mov   dword [eax + 16], edx\r
-    mov   esp, eax                     ; From now, esp is pointed to permanent memory\r
+    mov   esp, eax                 ; From now, esp is pointed to permanent memory\r
 \r
     ;\r
     ; Fixup the ebp point to permanent memory\r
@@ -63,7 +63,7 @@ ASM_PFX(SecSwitchStack):
     mov   eax, ebp\r
     sub   eax, ebx\r
     add   eax, ecx\r
-    mov   ebp, eax                ; From now, ebp is pointed to permanent memory\r
+    mov   ebp, eax                 ; From now, ebp is pointed to permanent memory\r
 \r
     pop   edx\r
     pop   ecx\r