diff options
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index 7c47a87333..0eb59e89c8 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -253,8 +253,69 @@ BdsLibBootViaBootOption ( Status = SecurityProtocol->FileAuthenticationState (SecurityProtocol, 0, DevicePath);
}
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));
+ DEBUG_CODE_BEGIN();
+ UINTN DevicePathTypeValue;
+ CHAR16 *HiiString;
+ CHAR16 *BootStringNumber;
+ UINTN BufferSize;
+
+ DevicePathTypeValue = BdsGetBootTypeFromDevicePath (Option->DevicePath);
+
+ //
+ // store number string of boot option temporary.
+ //
+ HiiString = NULL;
+ switch (DevicePathTypeValue) {
+ case BDS_EFI_ACPI_FLOPPY_BOOT:
+ HiiString = L"EFI Floppy";
+ break;
+ case BDS_EFI_MEDIA_CDROM_BOOT:
+ case BDS_EFI_MESSAGE_SATA_BOOT:
+ case BDS_EFI_MESSAGE_ATAPI_BOOT:
+ HiiString = L"EFI DVD/CDROM";
+ break;
+ case BDS_EFI_MESSAGE_USB_DEVICE_BOOT:
+ HiiString = L"EFI USB Device";
+ break;
+ case BDS_EFI_MESSAGE_SCSI_BOOT:
+ HiiString = L"EFI SCSI Device";
+ break;
+ case BDS_EFI_MESSAGE_MISC_BOOT:
+ HiiString = L"EFI Misc Device";
+ break;
+ case BDS_EFI_MESSAGE_MAC_BOOT:
+ HiiString = L"EFI Network";
+ break;
+ case BBS_DEVICE_PATH:
+ //
+ // Do nothing for legacy boot option.
+ //
+ break;
+ default:
+ DEBUG((EFI_D_INFO, "Can not find HiiString for given device path type 0x%x\n", DevicePathTypeValue));
+ }
+ //
+ // If found Hii description string then cat Hii string with original description.
+ //
+ if (HiiString != NULL) {
+ BootStringNumber = Option->Description;
+ BufferSize = StrSize(BootStringNumber);
+ BufferSize += StrSize(HiiString);
+ Option->Description = AllocateZeroPool(BufferSize);
+ StrCpy (Option->Description, HiiString);
+ if (StrnCmp (BootStringNumber, L"0", 1) != 0) {
+ StrCat (Option->Description, L" ");
+ StrCat (Option->Description, BootStringNumber);
+ }
+
+ FreePool (BootStringNumber);
+ }
+
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));
+
+ DEBUG_CODE_END();
+
Status = gBS->LoadImage (
TRUE,
mBdsImageHandle,
|