]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg Sec: Convert Ia32/SecEntry.asm to NASM
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 31 Oct 2014 20:55:06 +0000 (20:55 +0000)
committerjljusten <jljusten@Edk2>
Fri, 31 Oct 2014 20:55:06 +0000 (20:55 +0000)
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/SecEntry.asm to Ia32/SecEntry.nasm

Note: Manually collapsed .inf sources

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16291 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Sec/Ia32/SecEntry.S [deleted file]
OvmfPkg/Sec/Ia32/SecEntry.asm [deleted file]
OvmfPkg/Sec/Ia32/SecEntry.nasm [new file with mode: 0644]
OvmfPkg/Sec/SecMain.inf

diff --git a/OvmfPkg/Sec/Ia32/SecEntry.S b/OvmfPkg/Sec/Ia32/SecEntry.S
deleted file mode 100644 (file)
index 0771a87..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#      TITLE   SecEntry.asm\r
-#------------------------------------------------------------------------------\r
-#*\r
-#*   Copyright (c) 2006 - 2013, 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
-#*   http://opensource.org/licenses/bsd-license.php\r
-#*\r
-#*   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#*   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#*\r
-#*    CpuAsm.asm\r
-#*\r
-#*   Abstract:\r
-#*\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-#include <Base.h>\r
-\r
-#EXTERN ASM_PFX(SecCoreStartupWithStack)\r
-\r
-#\r
-# SecCore Entry Point\r
-#\r
-# Processor is in flat protected mode\r
-#\r
-# @param[in]  EAX   Initial value of the EAX register (BIST: Built-in Self Test)\r
-# @param[in]  DI    'BP': boot-strap processor, or 'AP': application processor\r
-# @param[in]  EBP   Pointer to the start of the Boot Firmware Volume\r
-#\r
-# @return     None  This routine does not return\r
-#\r
-ASM_GLOBAL ASM_PFX(_ModuleEntryPoint)\r
-ASM_PFX(_ModuleEntryPoint):\r
-\r
-    #\r
-    # Load temporary RAM stack based on PCDs\r
-    #\r
-    .set    SEC_TOP_OF_STACK, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r
-                              FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)\r
-    movl    $SEC_TOP_OF_STACK, %eax\r
-    movl    %eax, %esp\r
-    nop\r
-\r
-    #\r
-    # Setup parameters and call SecCoreStartupWithStack\r
-    #   [esp]   return address for call\r
-    #   [esp+4] BootFirmwareVolumePtr\r
-    #   [esp+8] TopOfCurrentStack\r
-    #\r
-    pushl   %eax\r
-    pushl   %ebp\r
-    call    ASM_PFX(SecCoreStartupWithStack)\r
-\r
-\r
-#END\r
-\r
diff --git a/OvmfPkg/Sec/Ia32/SecEntry.asm b/OvmfPkg/Sec/Ia32/SecEntry.asm
deleted file mode 100644 (file)
index e9458ad..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-      TITLE   SecEntry.asm\r
-;------------------------------------------------------------------------------\r
-;*\r
-;*   Copyright (c) 2006 - 2013, 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
-;*   http://opensource.org/licenses/bsd-license.php\r
-;*\r
-;*   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-;*   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;*\r
-;*    CpuAsm.asm\r
-;*\r
-;*   Abstract:\r
-;*\r
-;------------------------------------------------------------------------------\r
-\r
-#include <Base.h>\r
-\r
-    .686\r
-    .model  flat,C\r
-    .code\r
-\r
-EXTERN SecCoreStartupWithStack:PROC\r
-\r
-;\r
-; SecCore Entry Point\r
-;\r
-; Processor is in flat protected mode\r
-;\r
-; @param[in]  EAX   Initial value of the EAX register (BIST: Built-in Self Test)\r
-; @param[in]  DI    'BP': boot-strap processor, or 'AP': application processor\r
-; @param[in]  EBP   Pointer to the start of the Boot Firmware Volume\r
-;\r
-; @return     None  This routine does not return\r
-;\r
-_ModuleEntryPoint PROC PUBLIC\r
-\r
-    ;\r
-    ; Load temporary RAM stack based on PCDs\r
-    ;\r
-    SEC_TOP_OF_STACK EQU (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r
-                          FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))\r
-    mov     eax, SEC_TOP_OF_STACK\r
-    mov     esp, eax\r
-    nop\r
-\r
-    ;\r
-    ; Setup parameters and call SecCoreStartupWithStack\r
-    ;   [esp]   return address for call\r
-    ;   [esp+4] BootFirmwareVolumePtr\r
-    ;   [esp+8] TopOfCurrentStack\r
-    ;\r
-    push    eax\r
-    push    ebp\r
-    call    SecCoreStartupWithStack\r
-\r
-_ModuleEntryPoint ENDP\r
-\r
-END\r
diff --git a/OvmfPkg/Sec/Ia32/SecEntry.nasm b/OvmfPkg/Sec/Ia32/SecEntry.nasm
new file mode 100644 (file)
index 0000000..7fee1c2
--- /dev/null
@@ -0,0 +1,56 @@
+;------------------------------------------------------------------------------\r
+;*\r
+;*   Copyright (c) 2006 - 2013, 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
+;*   http://opensource.org/licenses/bsd-license.php\r
+;*\r
+;*   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+;*   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;*\r
+;*    CpuAsm.asm\r
+;*\r
+;*   Abstract:\r
+;*\r
+;------------------------------------------------------------------------------\r
+\r
+#include <Base.h>\r
+\r
+    SECTION .text\r
+\r
+extern ASM_PFX(SecCoreStartupWithStack)\r
+\r
+;\r
+; SecCore Entry Point\r
+;\r
+; Processor is in flat protected mode\r
+;\r
+; @param[in]  EAX   Initial value of the EAX register (BIST: Built-in Self Test)\r
+; @param[in]  DI    'BP': boot-strap processor, or 'AP': application processor\r
+; @param[in]  EBP   Pointer to the start of the Boot Firmware Volume\r
+;\r
+; @return     None  This routine does not return\r
+;\r
+global ASM_PFX(_ModuleEntryPoint)\r
+ASM_PFX(_ModuleEntryPoint):\r
+\r
+    ;\r
+    ; Load temporary RAM stack based on PCDs\r
+    ;\r
+    %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r
+                          FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))\r
+    mov     eax, SEC_TOP_OF_STACK\r
+    mov     esp, eax\r
+    nop\r
+\r
+    ;\r
+    ; Setup parameters and call SecCoreStartupWithStack\r
+    ;   [esp]   return address for call\r
+    ;   [esp+4] BootFirmwareVolumePtr\r
+    ;   [esp+8] TopOfCurrentStack\r
+    ;\r
+    push    eax\r
+    push    ebp\r
+    call    ASM_PFX(SecCoreStartupWithStack)\r
+\r
index 107f60afc29b944842fe5157165bf8a03b792421..66ab83353e0bdc14b1e82ab1eea42256e3e22d41 100644 (file)
@@ -31,9 +31,7 @@
   SecMain.c\r
 \r
 [Sources.IA32]\r
-  Ia32/SecEntry.asm | MSFT\r
-  Ia32/SecEntry.asm | INTEL\r
-  Ia32/SecEntry.S   | GCC\r
+  Ia32/SecEntry.nasm\r
 \r
 [Sources.X64]\r
   X64/SecEntry.asm  | MSFT\r