]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/Library/BaseFspSwitchStackLib/Ia32/Stack.s
Update IntelFspPkg according to FSP1.1.
[mirror_edk2.git] / IntelFspPkg / Library / BaseFspSwitchStackLib / Ia32 / Stack.s
index 6932cd8448cae645217b5297086a169d0ed1a919..4773fe94c239b5f028845651cc7d1b3414deac4e 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,8 +15,6 @@
 #\r
 #------------------------------------------------------------------------------\r
 \r
-ASM_GLOBAL ASM_PFX(Pei2LoaderSwitchStack)\r
-ASM_GLOBAL ASM_PFX(Loader2PeiSwitchStack)\r
 \r
 #------------------------------------------------------------------------------\r
 # UINT32\r
@@ -37,27 +35,30 @@ ASM_PFX(Pei2LoaderSwitchStack):
 #------------------------------------------------------------------------------\r
 ASM_GLOBAL ASM_PFX(Loader2PeiSwitchStack)\r
 ASM_PFX(Loader2PeiSwitchStack):\r
-#Save current contexts\r
+    #\r
+    #Save current contexts\r
+    #\r
     push    $exit\r
     pushf\r
-    pushf\r
     cli\r
     pusha\r
-    push    $0x0\r
-    push    $0x0\r
+    sub     $0x08, %esp\r
     sidt    (%esp)\r
 \r
+    #\r
     # Load new stack\r
+    #\r
     push   %esp\r
     call   ASM_PFX(SwapStack)\r
-    mov    %eax,%esp\r
+    movl   %eax, %esp\r
 \r
+    #\r
     # Restore previous contexts\r
+    #\r
     lidt    (%esp)\r
-    add     $8,%esp\r
+    add     $0x08,%esp\r
     popa\r
     popf\r
-    popf\r
 exit:\r
     ret\r
 \r