UINTN FileSize;\r
EFI_BOOT_LOGO_PROTOCOL *BootLogo;\r
EFI_EVENT LegacyBootEvent;\r
- UINTN RamDiskSizeInPages;\r
\r
if (BootOption == NULL) {\r
return;\r
PERF_START_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber);\r
\r
//\r
- // 5. Load EFI boot option to ImageHandle\r
+ // 5. Adjust the different type memory page number just before booting\r
+ // and save the updated info into the variable for next boot to use\r
+ //\r
+ BmSetMemoryTypeInformationVariable (\r
+ (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT)\r
+ );\r
+\r
//\r
+ // 6. Load EFI boot option to ImageHandle\r
+ //\r
+ DEBUG_CODE_BEGIN ();\r
+ if (BootOption->Description == NULL) {\r
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "[Bds]Booting from unknown device path\n"));\r
+ } else {\r
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "[Bds]Booting %s\n", BootOption->Description));\r
+ }\r
+ DEBUG_CODE_END ();\r
+\r
ImageHandle = NULL;\r
RamDiskDevicePath = NULL;\r
if (DevicePathType (BootOption->FilePath) != BBS_DEVICE_PATH) {\r
}\r
}\r
\r
- //\r
- // 6. Adjust the different type memory page number just before booting\r
- // and save the updated info into the variable for next boot to use\r
- //\r
- if (RamDiskDevicePath == NULL) {\r
- RamDiskSizeInPages = 0;\r
- } else {\r
- BmGetRamDiskMemoryInfo (RamDiskDevicePath, &RamDiskSizeInPages);\r
- }\r
- BmSetMemoryTypeInformationVariable (\r
- (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT),\r
- RamDiskSizeInPages\r
- );\r
-\r
- DEBUG_CODE_BEGIN();\r
- if (BootOption->Description == NULL) {\r
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "[Bds]Booting from unknown device path\n"));\r
- } else {\r
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "[Bds]Booting %s\n", BootOption->Description));\r
- }\r
- DEBUG_CODE_END();\r
-\r
//\r
// Check to see if we should legacy BOOT. If yes then do the legacy boot\r
// Write boot to OS performance data for Legacy boot\r