summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2023-06-15 18:48:20 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-27 10:16:25 +0000
commit28eb51dd54217d48869a8f02534243404308482a (patch)
treefb08fb3a3bb7ab689f9d931ece2052e97d36dc7a
parent8ef7e222ae1f4fdd695a69fcfcfff259147c9502 (diff)
downloadedk2-28eb51dd54217d48869a8f02534243404308482a.tar.gz
edk2-28eb51dd54217d48869a8f02534243404308482a.tar.bz2
edk2-28eb51dd54217d48869a8f02534243404308482a.zip
UefiCpuPkg/ResetVector: Remove pre-built binaries
Because it's simpler for a platform to include the ResetVector source and having pre-built binaries add burdens of updating the pre-built binaries. This patch removes the pre-built binaries and the script that buids the pre-built binaries. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.port80.rawbin532 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.rawbin500 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.serial.rawbin900 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf31
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.uni16
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector1G.inf31
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVectorExtra.uni12
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.port80.rawbin12292 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.rawbin12292 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.serial.rawbin12292 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.port80.rawbin28676 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.rawbin28676 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.serial.rawbin28676 -> 0 bytes
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Build.py89
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py20
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf9
16 files changed, 9 insertions, 199 deletions
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.port80.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.port80.raw
deleted file mode 100644
index a3601274c2..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.port80.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.raw
deleted file mode 100644
index 6124f3f9a4..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.serial.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.serial.raw
deleted file mode 100644
index 48b46e3473..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/IA32/ResetVector.ia32.serial.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf b/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf
deleted file mode 100644
index 47ac07798b..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf
+++ /dev/null
@@ -1,31 +0,0 @@
-## @file
-# Reset Vector binary
-#
-# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ResetVector
- MODULE_UNI_FILE = ResetVector.uni
- FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
- MODULE_TYPE = SEC
- VERSION_STRING = 1.1
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Binaries.Ia32]
- RAW|IA32/ResetVector.ia32.raw|*
-
-[Binaries.X64]
- RAW|X64/PageTable2M/ResetVector.x64.raw|*
-
-[UserExtensions.TianoCore."ExtraFiles"]
- ResetVectorExtra.uni
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.uni b/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.uni
deleted file mode 100644
index 3e7bcdafea..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.uni
+++ /dev/null
@@ -1,16 +0,0 @@
-// /** @file
-// Reset Vector binary
-//
-// Reset Vector binary
-//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Reset Vector binary"
-
-#string STR_MODULE_DESCRIPTION #language en-US "Reset Vector binary"
-
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector1G.inf b/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector1G.inf
deleted file mode 100644
index 75705cd344..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector1G.inf
+++ /dev/null
@@ -1,31 +0,0 @@
-## @file
-# Reset Vector binary
-#
-# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ResetVector
- MODULE_UNI_FILE = ResetVector.uni
- FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
- MODULE_TYPE = SEC
- VERSION_STRING = 1.1
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Binaries.Ia32]
- RAW|IA32/ResetVector.ia32.raw|*
-
-[Binaries.X64]
- RAW|X64/PageTable1G/ResetVector.x64.raw|*
-
-[UserExtensions.TianoCore."ExtraFiles"]
- ResetVectorExtra.uni
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVectorExtra.uni b/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVectorExtra.uni
deleted file mode 100644
index 7d2d579390..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVectorExtra.uni
+++ /dev/null
@@ -1,12 +0,0 @@
-// /** @file
-// ResetVector Localized Strings and Content
-//
-// Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-#string STR_PROPERTIES_MODULE_NAME #language en-US "ResetVector module"
-
-
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.port80.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.port80.raw
deleted file mode 100644
index def0ec856d..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.port80.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.raw
deleted file mode 100644
index cd65590188..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.serial.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.serial.raw
deleted file mode 100644
index c1cf994c46..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable1G/ResetVector.x64.serial.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.port80.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.port80.raw
deleted file mode 100644
index 0e981675cc..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.port80.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.raw
deleted file mode 100644
index b9f09dd46f..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.serial.raw b/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.serial.raw
deleted file mode 100644
index a76f8ad124..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Bin/X64/PageTable2M/ResetVector.x64.serial.raw
+++ /dev/null
Binary files differ
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Build.py b/UefiCpuPkg/ResetVector/Vtf0/Build.py
deleted file mode 100644
index 3f1d5cd2c8..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Build.py
+++ /dev/null
@@ -1,89 +0,0 @@
-## @file
-# Automate the process of building the various reset vector types
-#
-# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-
-import os
-import subprocess
-import sys
-
-PAGE_TABLE_2M = 'PageTable2M'
-PAGE_TABLE_1G = 'PageTable1G'
-FILE_FORMAT = '.raw'
-ALL_RAW_FORMAT = '*' + FILE_FORMAT
-IA32 = 'IA32'
-X64 = 'X64'
-
-# Pre-Define a Macros for Page Table
-PAGE_TABLES = {
- PAGE_TABLE_2M : "PAGE_TABLE_2M",
- PAGE_TABLE_1G : "PAGE_TABLE_1G"
-}
-
-def RunCommand(commandLine):
- return subprocess.call(commandLine)
-
-# Check for all raw binaries and delete them
-for root, dirs, files in os.walk('Bin'):
- for file in files:
- if file.endswith(FILE_FORMAT):
- os.remove(os.path.join(root, file))
-
-for arch in ('ia32', 'x64'):
- for debugType in (None, 'port80', 'serial'):
- for pageTable in PAGE_TABLES.keys():
- ret = True
- if arch.lower() == X64.lower():
- directory = os.path.join('Bin', X64, pageTable)
- else:
- directory = os.path.join('Bin', IA32)
-
- # output raw binary name with arch type
- fileName = 'ResetVector' + '.' + arch
-
- if debugType is not None:
- fileName += '.' + debugType
- fileName += FILE_FORMAT
-
- output = os.path.join(directory, fileName)
-
- # if the directory not exists then create it
- if not os.path.isdir(directory):
- os.makedirs(directory)
-
- # Prepare the command to execute the nasmb
- commandLine = (
- 'nasm',
- '-D', 'ARCH_%s' % arch.upper(),
- '-D', 'DEBUG_%s' % str(debugType).upper(),
- '-D', PAGE_TABLES[pageTable].upper(),
- '-o', output,
- 'Vtf0.nasmb',
- )
-
- print(f"Command : {' '.join(commandLine)}")
-
- try:
- ret = RunCommand(commandLine)
- except FileNotFoundError:
- print("NASM not found")
- except:
- pass
-
- if ret != 0:
- print(f"something went wrong while executing {commandLine[-1]}")
- sys.exit()
- print('\tASM\t' + output)
-
- commandLine = (
- 'python',
- 'Tools/FixupForRawSection.py',
- output,
- )
- print('\tFIXUP\t' + output)
- ret = RunCommand(commandLine)
- if ret != 0: sys.exit(ret)
-
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py b/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py
deleted file mode 100644
index de771eba22..0000000000
--- a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py
+++ /dev/null
@@ -1,20 +0,0 @@
-## @file
-# Apply fixup to VTF binary image for FFS Raw section
-#
-# Copyright (c) 2008 - 2021, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-
-import sys
-
-filename = sys.argv[1]
-
-d = open(sys.argv[1], 'rb').read()
-c = ((len(d) + 4 + 7) & ~7) - 4
-if c > len(d):
- c -= len(d)
- f = open(sys.argv[1], 'wb')
- f.write(b'\x90' * c)
- f.write(d)
- f.close()
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
index 03d92d937f..6b406163db 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
+++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
@@ -46,3 +46,12 @@
[UserExtensions.TianoCore."ExtraFiles"]
ResetVectorExtra.uni
+
+[BuildOptions]
+# Different build options can be specified:
+# * for different architectures:
+# -DARCH_X64, -DARCH_IA32
+# * for using 1G page table:
+# -DPAGE_TABLE_1G
+# * for different debug channels:
+# -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel