Status = SecurityProtocol->FileAuthenticationState (SecurityProtocol, 0, DevicePath);\r
}\r
\r
- DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));\r
+ DEBUG_CODE_BEGIN();\r
+ UINTN DevicePathTypeValue;\r
+ CHAR16 *HiiString;\r
+ CHAR16 *BootStringNumber;\r
+ UINTN BufferSize;\r
+ \r
+ DevicePathTypeValue = BdsGetBootTypeFromDevicePath (Option->DevicePath);\r
+ \r
+ //\r
+ // store number string of boot option temporary.\r
+ //\r
+ HiiString = NULL;\r
+ switch (DevicePathTypeValue) {\r
+ case BDS_EFI_ACPI_FLOPPY_BOOT:\r
+ HiiString = L"EFI Floppy";\r
+ break;\r
+ case BDS_EFI_MEDIA_CDROM_BOOT:\r
+ case BDS_EFI_MESSAGE_SATA_BOOT:\r
+ case BDS_EFI_MESSAGE_ATAPI_BOOT:\r
+ HiiString = L"EFI DVD/CDROM";\r
+ break;\r
+ case BDS_EFI_MESSAGE_USB_DEVICE_BOOT:\r
+ HiiString = L"EFI USB Device";\r
+ break;\r
+ case BDS_EFI_MESSAGE_SCSI_BOOT:\r
+ HiiString = L"EFI SCSI Device";\r
+ break;\r
+ case BDS_EFI_MESSAGE_MISC_BOOT:\r
+ HiiString = L"EFI Misc Device";\r
+ break;\r
+ case BDS_EFI_MESSAGE_MAC_BOOT:\r
+ HiiString = L"EFI Network";\r
+ break;\r
+ case BBS_DEVICE_PATH:\r
+ //\r
+ // Do nothing for legacy boot option.\r
+ //\r
+ break;\r
+ default:\r
+ DEBUG((EFI_D_INFO, "Can not find HiiString for given device path type 0x%x\n", DevicePathTypeValue));\r
+ }\r
\r
+ //\r
+ // If found Hii description string then cat Hii string with original description.\r
+ //\r
+ if (HiiString != NULL) {\r
+ BootStringNumber = Option->Description;\r
+ BufferSize = StrSize(BootStringNumber);\r
+ BufferSize += StrSize(HiiString);\r
+ Option->Description = AllocateZeroPool(BufferSize);\r
+ StrCpy (Option->Description, HiiString);\r
+ if (StrnCmp (BootStringNumber, L"0", 1) != 0) {\r
+ StrCat (Option->Description, L" ");\r
+ StrCat (Option->Description, BootStringNumber);\r
+ } \r
+ \r
+ FreePool (BootStringNumber);\r
+ }\r
+ \r
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));\r
+ \r
+ DEBUG_CODE_END();\r
+ \r
Status = gBS->LoadImage (\r
TRUE,\r
mBdsImageHandle,\r