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>
This commit is contained in:
Oliver Smith-Denny 2024-10-27 08:52:42 -07:00 committed by mergify[bot]
parent 0c56edacfb
commit f0390f7bf1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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