summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-10-27 08:52:42 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-11-13 21:01:46 +0000
commitf0390f7bf14c1f5fe1205dc12185896150c70756 (patch)
tree3c8281827bef7e563aa2786b8a6bce62bcc1d472
parent0c56edacfb727173cb5e4ed3a769ce28d3f40092 (diff)
downloadedk2-f0390f7bf14c1f5fe1205dc12185896150c70756.tar.gz
edk2-f0390f7bf14c1f5fe1205dc12185896150c70756.tar.bz2
edk2-f0390f7bf14c1f5fe1205dc12185896150c70756.zip
UefiCpuPkg: Make the ResetVector USER_DEFINED
The x86 reset vector is the initial FW code to run on an AP. It should not link to any libraries and is implemented entirely in assembly. This module is currently labled as SEC, because it runs during the SEC phase, but by having it SEC, it will be linked to all NULL libraries linked globally. This causes issue with StackCheckLib (though any NULL library being applied globally has the same issue) because BaseTools will attempt to link the library and add an extern to _ModuleEntryPoint, which does not exist for this module. Moving this module to USER_DEFINED instructs BaseTools to not link any NULL libraries to it, which is the desired behavior, and leads to a much cleaner global NULL library implementation, in this case for StackCheckLib. This change was tested on OVMF IA32/X64 and proved to work as before. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
-rw-r--r--UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf2
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf2
2 files changed, 2 insertions, 2 deletions
diff --git a/UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf b/UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf
index 02645d8682..86de6f168c 100644
--- a/UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf
+++ b/UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf
@@ -13,7 +13,7 @@
INF_VERSION = 0x00010005
BASE_NAME = ResetVector
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
- MODULE_TYPE = SEC
+ MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.1
MODULE_UNI_FILE = ResetVector.uni
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
index 6b406163db..7d0b99f42a 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
+++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
@@ -28,7 +28,7 @@
INF_VERSION = 0x00010005
BASE_NAME = ResetVector
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
- MODULE_TYPE = SEC
+ MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.1
MODULE_UNI_FILE = ResetVector.uni