Library functions which relates with booting.\r
\r
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\r
-Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
gBS->UnloadImage (ImageHandle);\r
}\r
//\r
- // Report Status Code with the failure status to indicate that the failure to load boot option\r
- //\r
- BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, Status);\r
- BootOption->Status = Status;\r
- //\r
// Destroy the RAM disk\r
//\r
if (RamDiskDevicePath != NULL) {\r
BmDestroyRamDisk (RamDiskDevicePath);\r
FreePool (RamDiskDevicePath);\r
}\r
+ //\r
+ // Report Status Code with the failure status to indicate that the failure to load boot option\r
+ //\r
+ BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, Status);\r
+ BootOption->Status = Status;\r
return;\r
}\r
}\r
Status = gBS->StartImage (ImageHandle, &BootOption->ExitDataSize, &BootOption->ExitData);\r
DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Image Return Status = %r\n", Status));\r
BootOption->Status = Status;\r
- if (EFI_ERROR (Status)) {\r
- //\r
- // Report Status Code with the failure status to indicate that boot failure\r
- //\r
- BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, Status);\r
- }\r
- PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber);\r
\r
//\r
// Destroy the RAM disk\r
FreePool (RamDiskDevicePath);\r
}\r
\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // Report Status Code with the failure status to indicate that boot failure\r
+ //\r
+ BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, Status);\r
+ }\r
+ PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber);\r
+\r
+\r
//\r
// Clear the Watchdog Timer after the image returns\r
//\r