@@ -1919,6 +1919,20 @@ EfiBootManagerBoot (
1919
1919
return ;
1920
1920
}
1921
1921
1922
+ // MU_CHANGE [BEGIN]
1923
+ //
1924
+ // 0. Determine if the file path exists. (I.E we can't load it if it doesnt)
1925
+ //
1926
+ FilePath = BootOption -> FilePath ;
1927
+ Status = gBS -> LocateDevicePath (& gEfiFirmwareVolume2ProtocolGuid , & FilePath , & ImageHandle );
1928
+ if (EFI_ERROR (Status )) {
1929
+ DEBUG ((DEBUG_ERROR , "%a: LocateDevicePath Failed (%r)\n" , __func__ , Status ));
1930
+ BootOption -> Status = Status ;
1931
+ return ;
1932
+ }
1933
+
1934
+ // MU_CHANGE [END]
1935
+
1922
1936
//
1923
1937
// 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")
1924
1938
//
@@ -1962,7 +1976,16 @@ EfiBootManagerBoot (
1962
1976
if (BmIsBootManagerMenuFilePath (BootOption -> FilePath )) {
1963
1977
DEBUG ((DEBUG_INFO , "[Bds] Booting Boot Manager Menu.\n" ));
1964
1978
BmStopHotkeyService (NULL , NULL );
1965
- } else {
1979
+ }
1980
+ // MU_CHANGE [BEGIN]
1981
+ else if (BmIsFvFilePath (BootOption -> FilePath )) {
1982
+ //
1983
+ // Do nothing. This file originates from a measured FV and is an extension of the BDS environment
1984
+ // We should not signal ready to boot.
1985
+ // We will still need to load / start it.
1986
+ }
1987
+ // MU_CHANGE [END]
1988
+ else {
1966
1989
PERF_EVENT_SIGNAL_BEGIN (& gEfiEventPreReadyToBootGuid ); // MU_CHANGE
1967
1990
EfiEventGroupSignal (& gEfiEventPreReadyToBootGuid ); // MU_CHANGE
1968
1991
PERF_EVENT_SIGNAL_END (& gEfiEventPreReadyToBootGuid ); // MU_CHANGE
@@ -2044,6 +2067,10 @@ EfiBootManagerBoot (
2044
2067
);
2045
2068
}
2046
2069
2070
+ // MU_CHANGE [BEGIN]
2071
+ DEBUG ((DEBUG_ERROR , "%a: LoadImage returned %r\n" , __func__ , Status ));
2072
+ // MU CHANGE [END]
2073
+
2047
2074
if (FileBuffer != NULL ) {
2048
2075
FreePool (FileBuffer );
2049
2076
}
0 commit comments