Skip to content

Commit f0390f7

Browse files
os-dmergify[bot]
authored andcommitted
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>
1 parent 0c56eda commit f0390f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

UefiCpuPkg/ResetVector/FixupVtf/Vtf.inf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
INF_VERSION = 0x00010005
1414
BASE_NAME = ResetVector
1515
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
16-
MODULE_TYPE = SEC
16+
MODULE_TYPE = USER_DEFINED
1717
VERSION_STRING = 1.1
1818
MODULE_UNI_FILE = ResetVector.uni
1919

UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
INF_VERSION = 0x00010005
2929
BASE_NAME = ResetVector
3030
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
31-
MODULE_TYPE = SEC
31+
MODULE_TYPE = USER_DEFINED
3232
VERSION_STRING = 1.1
3333
MODULE_UNI_FILE = ResetVector.uni
3434

0 commit comments

Comments
 (0)