Currently EAX is used as an intermediary in setting ESP to
SEC_TOP_OF_STACK, and in passing SEC_TOP_OF_STACK to
SecCoreStartupWithStack() as the "TopOfCurrentStack" argument.

In a later patch we'll use EAX differently, so replace it with EBX under
the current use.

Cc: Ard Biesheuvel <[email protected]>
Cc: Jordan Justen <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <[email protected]>
---
 OvmfPkg/Sec/Ia32/SecEntry.nasm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Sec/Ia32/SecEntry.nasm b/OvmfPkg/Sec/Ia32/SecEntry.nasm
index 7fee1c2b2e4f..54d074e621f6 100644
--- a/OvmfPkg/Sec/Ia32/SecEntry.nasm
+++ b/OvmfPkg/Sec/Ia32/SecEntry.nasm
@@ -40,8 +40,8 @@ ASM_PFX(_ModuleEntryPoint):
     ;
     %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \
                           FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))
-    mov     eax, SEC_TOP_OF_STACK
-    mov     esp, eax
+    mov     ebx, SEC_TOP_OF_STACK
+    mov     esp, ebx
     nop
 
     ;
@@ -50,7 +50,7 @@ ASM_PFX(_ModuleEntryPoint):
     ;   [esp+4] BootFirmwareVolumePtr
     ;   [esp+8] TopOfCurrentStack
     ;
-    push    eax
+    push    ebx
     push    ebp
     call    ASM_PFX(SecCoreStartupWithStack)
 
-- 
2.14.1.3.gb7cf6e02401b


_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to