summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2019-02-15 13:58:50 +0800
committerLiming Gao <liming.gao@intel.com>2019-02-19 16:15:05 +0800
commitc2cf8720a5aad74230767a1f11bade2d86de3745 (patch)
treefec7b1050007c358e1b8696538c0c16ae6ba14cd /MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
parent2b005f41fdf1a5783eed0d0304c8d9c114acea68 (diff)
downloadedk2-c2cf8720a5aad74230767a1f11bade2d86de3745.tar.gz
edk2-c2cf8720a5aad74230767a1f11bade2d86de3745.tar.bz2
edk2-c2cf8720a5aad74230767a1f11bade2d86de3745.zip
MdeModulePkg/BmBoot: Report status when fail to load/start boot option
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1398 According to PI1.7 Spec, report extended data describing an EFI_STATUS return value along with EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR and EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED status code when fail to load or start boot option image. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 6444fb43eb..9be1633b74 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1820,11 +1820,16 @@ EfiBootManagerBoot (
if (EFI_ERROR (Status)) {
//
- // Report Status Code to indicate that the failure to load boot option
+ // Report Status Code with the failure status to indicate that the failure to load boot option
//
- REPORT_STATUS_CODE (
+ REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR)
+ (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR),
+ 0,
+ NULL,
+ NULL,
+ &Status,
+ sizeof (EFI_STATUS)
);
BootOption->Status = Status;
//
@@ -1904,11 +1909,16 @@ EfiBootManagerBoot (
BootOption->Status = Status;
if (EFI_ERROR (Status)) {
//
- // Report Status Code to indicate that boot failure
+ // Report Status Code with the failure status to indicate that boot failure
//
- REPORT_STATUS_CODE (
+ REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED)
+ (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED),
+ 0,
+ NULL,
+ NULL,
+ &Status,
+ sizeof (EFI_STATUS)
);
}
PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber);