]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Support building VTF0 ResetVector during the EDK II build
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 18 Aug 2014 23:03:30 +0000 (23:03 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 18 Aug 2014 23:03:30 +0000 (23:03 +0000)
Using NASM we build VTF0 as part of the EDK II build process.

v2:
 * Use EDK II extension of .nasmb rather than .nasmbin

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

UefiCpuPkg/ResetVector/Vtf0/Build.py
UefiCpuPkg/ResetVector/Vtf0/ResetVectorCode.asm [deleted file]
UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf [new file with mode: 0644]
UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb [new file with mode: 0644]

index 826cde0de6173324b5fa8127311a9210db019071..a645c371b971a5e1c3fa039c1c2293654c6a44d3 100644 (file)
@@ -36,7 +36,7 @@ for arch in ('ia32', 'x64'):
             '-D', 'ARCH_%s' % arch.upper(),\r
             '-D', 'DEBUG_%s' % str(debugType).upper(),\r
             '-o', output,\r
             '-D', 'ARCH_%s' % arch.upper(),\r
             '-D', 'DEBUG_%s' % str(debugType).upper(),\r
             '-o', output,\r
-            'ResetVectorCode.asm',\r
+            'Vtf0.nasmb',\r
             )\r
         ret = RunCommand(commandLine)\r
         print '\tASM\t' + output\r
             )\r
         ret = RunCommand(commandLine)\r
         print '\tASM\t' + output\r
diff --git a/UefiCpuPkg/ResetVector/Vtf0/ResetVectorCode.asm b/UefiCpuPkg/ResetVector/Vtf0/ResetVectorCode.asm
deleted file mode 100644 (file)
index 052c821..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-;------------------------------------------------------------------------------\r
-; @file\r
-; This file includes all other code files to assemble the reset vector code\r
-;\r
-; Copyright (c) 2008 - 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
-;------------------------------------------------------------------------------\r
-\r
-%ifdef ARCH_IA32\r
-  %ifdef ARCH_X64\r
-    %error "Only one of ARCH_IA32 or ARCH_X64 can be defined."\r
-  %endif\r
-%elifdef ARCH_X64\r
-%else\r
-  %error "Either ARCH_IA32 or ARCH_X64 must be defined."\r
-%endif\r
-\r
-%include "CommonMacros.inc"\r
-\r
-%include "PostCodes.inc"\r
-\r
-%ifdef DEBUG_NONE\r
-  %include "DebugDisabled.asm"\r
-%elifdef DEBUG_PORT80\r
-  %include "Port80Debug.asm"\r
-%elifdef DEBUG_SERIAL\r
-  %include "SerialDebug.asm"\r
-%else\r
-  %error "No debug type was specified."\r
-%endif\r
-\r
-%include "Ia32/SearchForBfvBase.asm"\r
-%include "Ia32/SearchForSecEntry.asm"\r
-\r
-%ifdef ARCH_X64\r
-%include "Ia32/Flat32ToFlat64.asm"\r
-%include "Ia32/PageTables64.asm"\r
-%endif\r
-\r
-%include "Ia16/Real16ToFlat32.asm"\r
-%include "Ia16/Init16.asm"\r
-\r
-%include "Main.asm"\r
-\r
-%include "Ia16/ResetVectorVtf0.asm"\r
-\r
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
new file mode 100644 (file)
index 0000000..fe2d9b3
--- /dev/null
@@ -0,0 +1,32 @@
+## @file\r
+#  Reset Vector\r
+#\r
+#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#\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
+#  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
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = ResetVector\r
+  FILE_GUID                      = 1BA0062E-C779-4582-8566-336AE8F78F09\r
+  MODULE_TYPE                    = SEC\r
+  VERSION_STRING                 = 1.1\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64\r
+#\r
+\r
+[Sources]\r
+  Vtf0.nasmb\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb
new file mode 100644 (file)
index 0000000..31ac06a
--- /dev/null
@@ -0,0 +1,66 @@
+;------------------------------------------------------------------------------\r
+; @file\r
+; This file includes all other code files to assemble the reset vector code\r
+;\r
+; Copyright (c) 2008 - 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
+;------------------------------------------------------------------------------\r
+\r
+;\r
+; If neither ARCH_IA32 nor ARCH_X64 are defined, then try to include\r
+; Base.h to use the C pre-processor to determine the architecture.\r
+;\r
+%ifndef ARCH_IA32\r
+  %ifndef ARCH_X64\r
+    #include <Base.h>\r
+    #if defined (MDE_CPU_IA32)\r
+      %define ARCH_IA32\r
+    #elif defined (MDE_CPU_X64)\r
+      %define ARCH_X64\r
+    #endif\r
+  %endif\r
+%endif\r
+\r
+%ifdef ARCH_IA32\r
+  %ifdef ARCH_X64\r
+    %error "Only one of ARCH_IA32 or ARCH_X64 can be defined."\r
+  %endif\r
+%elifdef ARCH_X64\r
+%else\r
+  %error "Either ARCH_IA32 or ARCH_X64 must be defined."\r
+%endif\r
+\r
+%include "CommonMacros.inc"\r
+\r
+%include "PostCodes.inc"\r
+\r
+%ifdef DEBUG_PORT80\r
+  %include "Port80Debug.asm"\r
+%elifdef DEBUG_SERIAL\r
+  %include "SerialDebug.asm"\r
+%else\r
+  %include "DebugDisabled.asm"\r
+%endif\r
+\r
+%include "Ia32/SearchForBfvBase.asm"\r
+%include "Ia32/SearchForSecEntry.asm"\r
+\r
+%ifdef ARCH_X64\r
+%include "Ia32/Flat32ToFlat64.asm"\r
+%include "Ia32/PageTables64.asm"\r
+%endif\r
+\r
+%include "Ia16/Real16ToFlat32.asm"\r
+%include "Ia16/Init16.asm"\r
+\r
+%include "Main.asm"\r
+\r
+%include "Ia16/ResetVectorVtf0.asm"\r
+\r