Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] [PROTOTYPE] Stabilizing PCR4 Measurements #1271

Draft
wants to merge 1 commit into
base: dev/202405
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,20 @@ EfiBootManagerBoot (
return;
}

// MU_CHANGE [BEGIN]
//
// 0. Determine if the file path exists. (I.E we can't load it if it doesnt)
//
FilePath = BootOption->FilePath;
Status = gBS->LocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid, &FilePath, &ImageHandle);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: LocateDevicePath Failed (%r)\n", __func__, Status));
BootOption->Status = Status;
return;
}

// MU_CHANGE [END]

//
// 1. Create Boot#### for a temporary boot if there is no match Boot#### (i.e. a boot by selected a EFI Shell using "Boot From File")
//
Expand Down Expand Up @@ -1962,7 +1976,16 @@ EfiBootManagerBoot (
if (BmIsBootManagerMenuFilePath (BootOption->FilePath)) {
DEBUG ((DEBUG_INFO, "[Bds] Booting Boot Manager Menu.\n"));
BmStopHotkeyService (NULL, NULL);
} else {
}
// MU_CHANGE [BEGIN]
else if (BmIsFvFilePath (BootOption->FilePath)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not measure valid FV files into ReadyToBoot

//
// Do nothing. This file originates from a measured FV and is an extension of the BDS environment
// We should not signal ready to boot.
// We will still need to load / start it.
}
// MU_CHANGE [END]
else {
PERF_EVENT_SIGNAL_BEGIN (&gEfiEventPreReadyToBootGuid); // MU_CHANGE
EfiEventGroupSignal (&gEfiEventPreReadyToBootGuid); // MU_CHANGE
PERF_EVENT_SIGNAL_END (&gEfiEventPreReadyToBootGuid); // MU_CHANGE
Expand Down Expand Up @@ -2044,6 +2067,10 @@ EfiBootManagerBoot (
);
}

// MU_CHANGE [BEGIN]
DEBUG ((DEBUG_ERROR, "%a: LoadImage returned %r\n", __func__, Status));
// MU CHANGE [END]

if (FileBuffer != NULL) {
FreePool (FileBuffer);
}
Expand Down