Add features flag for pre-OS checker boot

By adding an additional flag for the pre-OS
checker execution flow it is possible to determine
at run time whether to attempt loading/execution
of the pre-OS checker during OS Loader time. From
platform code the decision to attempt to run the
pre-OS checker can be controlled.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
This commit is contained in:
James Gutbub 2019-12-02 14:00:48 -07:00 committed by James Gutbub
parent 533dbed5a0
commit d6909c97fe
2 changed files with 8 additions and 3 deletions

View File

@ -25,6 +25,7 @@ extern EFI_GUID gLoaderPlatformInfoGuid;
#define FEATURE_MMC_TUNING BIT2
#define FEATURE_MMC_FORCE_TUNING BIT3
#define FEATURE_VERIFIED_BOOT BIT4
#define FEATURE_PRE_OS_CHECKER_BOOT BIT5
//
//Definition for LOADER_PLATFORM_INFO.HwState

View File

@ -1091,13 +1091,15 @@ PayloadMain (
)
{
OS_BOOT_OPTION_LIST *OsBootOptionList;
LOADER_PLATFORM_INFO *LoaderPlatformInfo;
OS_BOOT_OPTION OsBootOption;
BOOLEAN BootShell;
UINTN ShellTimeout;
OS_BOOT_OPTION OsBootOption;
UINT8 CurrIdx;
UINT8 BootIdx;
mEntryStack = Param;
LoaderPlatformInfo = (LOADER_PLATFORM_INFO *)GetLoaderPlatformInfoPtr();
DEBUG ((DEBUG_INFO, "\n\n====================Os Loader====================\n\n"));
AddMeasurePoint (0x4010);
@ -1129,9 +1131,11 @@ PayloadMain (
//
// Load PreOsChecker
//
if (FeaturePcdGet (PcdPreOsCheckerEnabled)) {
if (LoaderPlatformInfo != NULL) {
if (FeaturePcdGet (PcdPreOsCheckerEnabled) && (LoaderPlatformInfo->LdrFeatures & FEATURE_PRE_OS_CHECKER_BOOT)) {
LoadPreOsChecker ();
}
}
while (OsBootOptionList != NULL) {