]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg Sec: Convert X64/SecEntry.asm to NASM
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 31 Oct 2014 20:55:16 +0000 (20:55 +0000)
committerjljusten <jljusten@Edk2>
Fri, 31 Oct 2014 20:55:16 +0000 (20:55 +0000)
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/SecEntry.asm to X64/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@16292 6f19259b-4bc3-4df7-8a09-765794883524

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

index 66ab83353e0bdc14b1e82ab1eea42256e3e22d41..fce99fb74c6c9c982c9c15d6e8da77903016145a 100644 (file)
@@ -34,9 +34,7 @@
   Ia32/SecEntry.nasm\r
 \r
 [Sources.X64]\r
-  X64/SecEntry.asm  | MSFT\r
-  X64/SecEntry.asm  | INTEL\r
-  X64/SecEntry.S    | GCC\r
+  X64/SecEntry.nasm\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
diff --git a/OvmfPkg/Sec/X64/SecEntry.S b/OvmfPkg/Sec/X64/SecEntry.S
deleted file mode 100644 (file)
index 37354d9..0000000
+++ /dev/null
@@ -1,56 +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]  RAX   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]  RBP   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 stack top at very low memory.  The C code\r
-    # can reload to a better address.\r
-    #\r
-    .set    SEC_TOP_OF_STACK, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r
-                              FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)\r
-    movq    $SEC_TOP_OF_STACK, %rsp \r
-    nop\r
-\r
-    #\r
-    # Setup parameters and call SecCoreStartupWithStack\r
-    #   rcx: BootFirmwareVolumePtr\r
-    #   rdx: TopOfCurrentStack\r
-    #\r
-    movq    %rbp, %rcx\r
-    movq    %rsp, %rdx\r
-    subq    $0x20, %rsp\r
-    call    ASM_PFX(SecCoreStartupWithStack)\r
-\r
diff --git a/OvmfPkg/Sec/X64/SecEntry.asm b/OvmfPkg/Sec/X64/SecEntry.asm
deleted file mode 100644 (file)
index 4135208..0000000
+++ /dev/null
@@ -1,58 +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
-.code\r
-\r
-EXTERN SecCoreStartupWithStack:PROC\r
-\r
-;\r
-; SecCore Entry Point\r
-;\r
-; Processor is in flat protected mode\r
-;\r
-; @param[in]  RAX   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]  RBP   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     rsp, SEC_TOP_OF_STACK\r
-    nop\r
-\r
-    ;\r
-    ; Setup parameters and call SecCoreStartupWithStack\r
-    ;   rcx: BootFirmwareVolumePtr\r
-    ;   rdx: TopOfCurrentStack\r
-    ;\r
-    mov     rcx, rbp\r
-    mov     rdx, rsp\r
-    sub     rsp, 20h\r
-    call    SecCoreStartupWithStack\r
-\r
-_ModuleEntryPoint ENDP\r
-\r
-END\r
diff --git a/OvmfPkg/Sec/X64/SecEntry.nasm b/OvmfPkg/Sec/X64/SecEntry.nasm
new file mode 100644 (file)
index 0000000..f40427a
--- /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
+DEFAULT REL\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]  RAX   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]  RBP   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     rsp, SEC_TOP_OF_STACK\r
+    nop\r
+\r
+    ;\r
+    ; Setup parameters and call SecCoreStartupWithStack\r
+    ;   rcx: BootFirmwareVolumePtr\r
+    ;   rdx: TopOfCurrentStack\r
+    ;\r
+    mov     rcx, rbp\r
+    mov     rdx, rsp\r
+    sub     rsp, 0x20\r
+    call    ASM_PFX(SecCoreStartupWithStack)\r
+\r