summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/Sec/Ia32/SwitchRam.asm
diff options
context:
space:
mode:
Diffstat (limited to 'EmulatorPkg/Sec/Ia32/SwitchRam.asm')
-rw-r--r--EmulatorPkg/Sec/Ia32/SwitchRam.asm26
1 files changed, 13 insertions, 13 deletions
diff --git a/EmulatorPkg/Sec/Ia32/SwitchRam.asm b/EmulatorPkg/Sec/Ia32/SwitchRam.asm
index a2e1f3e910..731ee0ffdb 100644
--- a/EmulatorPkg/Sec/Ia32/SwitchRam.asm
+++ b/EmulatorPkg/Sec/Ia32/SwitchRam.asm
@@ -22,7 +22,7 @@
.586p
.model flat,C
.code
-
+
;------------------------------------------------------------------------------
; VOID
; EFIAPI
@@ -30,7 +30,7 @@
; UINT32 TemporaryMemoryBase,
; UINT32 PermenentMemoryBase
; );
-;------------------------------------------------------------------------------
+;------------------------------------------------------------------------------
SecSwitchStack PROC
;
; Save three register: eax, ebx, ecx
@@ -39,16 +39,16 @@ SecSwitchStack PROC
push ebx
push ecx
push edx
-
+
;
; !!CAUTION!! this function address's is pushed into stack after
; migration of whole temporary memory, so need save it to permenent
; memory at first!
;
-
+
mov ebx, [esp + 20] ; Save the first parameter
mov ecx, [esp + 24] ; Save the second parameter
-
+
;
; Save this function's return address into permenent memory at first.
; Then, Fixup the esp point to permenent memory
@@ -57,17 +57,17 @@ SecSwitchStack PROC
sub eax, ebx
add eax, ecx
mov edx, dword ptr [esp] ; copy pushed register's value to permenent memory
- mov dword ptr [eax], edx
+ mov dword ptr [eax], edx
mov edx, dword ptr [esp + 4]
- mov dword ptr [eax + 4], edx
+ mov dword ptr [eax + 4], edx
mov edx, dword ptr [esp + 8]
- mov dword ptr [eax + 8], edx
+ mov dword ptr [eax + 8], edx
mov edx, dword ptr [esp + 12]
- mov dword ptr [eax + 12], edx
+ mov dword ptr [eax + 12], edx
mov edx, dword ptr [esp + 16] ; Update this function's return address into permenent memory
- mov dword ptr [eax + 16], edx
+ mov dword ptr [eax + 16], edx
mov esp, eax ; From now, esp is pointed to permenent memory
-
+
;
; Fixup the ebp point to permenent memory
;
@@ -75,7 +75,7 @@ SecSwitchStack PROC
sub eax, ebx
add eax, ecx
mov ebp, eax ; From now, ebp is pointed to permenent memory
-
+
;
; Fixup callee's ebp point for PeiDispatch
;
@@ -83,7 +83,7 @@ SecSwitchStack PROC
sub eax, ebx
add eax, ecx
mov dword ptr [ebp], eax ; From now, Temporary's PPI caller's stack is in permenent memory
-
+
pop edx
pop ecx
pop ebx