UINT16 *TempStr;\r
UINTN OptionNumber;\r
VOID *Buffer;\r
- EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;\r
- UINT16 DeviceType;\r
- BBS_BBS_DEVICE_PATH BbsDevicePathNode;\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
BOOLEAN RemovableMedia;\r
\r
-\r
NoSimpleFsHandles = 0;\r
NoLoadFileHandles = 0;\r
OptionNumber = 0;\r
FreePool (LoadFileHandle);\r
}\r
\r
- //\r
- // Add Legacy Boot Option Support Here\r
- //\r
- Status = gBS->LocateProtocol (\r
- &gEfiLegacyBiosProtocolGuid,\r
- NULL,\r
- (VOID **) &LegacyBios\r
- );\r
- if (!EFI_ERROR (Status)) {\r
-\r
- for (Index = BBS_TYPE_FLOPPY; Index <= BBS_TYPE_EMBEDDED_NETWORK; Index++) {\r
- MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);\r
- if (NULL == MenuEntry) {\r
- return EFI_OUT_OF_RESOURCES;\r
- }\r
-\r
- FileContext = (BM_FILE_CONTEXT *) MenuEntry->VariableContext;\r
-\r
- FileContext->IsRemovableMedia = FALSE;\r
- FileContext->IsLoadFile = TRUE;\r
- FileContext->IsBootLegacy = TRUE;\r
- DeviceType = (UINT16) Index;\r
- BbsDevicePathNode.Header.Type = BBS_DEVICE_PATH;\r
- BbsDevicePathNode.Header.SubType = BBS_BBS_DP;\r
- SetDevicePathNodeLength (\r
- &BbsDevicePathNode.Header,\r
- sizeof (BBS_BBS_DEVICE_PATH)\r
- );\r
- BbsDevicePathNode.DeviceType = DeviceType;\r
- BbsDevicePathNode.StatusFlag = 0;\r
- BbsDevicePathNode.String[0] = 0;\r
- DevicePath = AppendDevicePathNode (\r
- EndDevicePath,\r
- (EFI_DEVICE_PATH_PROTOCOL *) &BbsDevicePathNode\r
- );\r
-\r
- FileContext->DevicePath = DevicePath;\r
- MenuEntry->HelpString = UiDevicePathToStr (FileContext->DevicePath);\r
-\r
- TempStr = MenuEntry->HelpString;\r
- MenuEntry->DisplayString = AllocateZeroPool (MAX_CHAR);\r
- ASSERT (MenuEntry->DisplayString != NULL);\r
- UnicodeSPrint (\r
- MenuEntry->DisplayString,\r
- MAX_CHAR,\r
- L"Boot Legacy [%s]",\r
- TempStr\r
- );\r
- MenuEntry->OptionNumber = OptionNumber;\r
- OptionNumber++;\r
- InsertTailList (&FsOptionMenu.Head, &MenuEntry->Link);\r
- }\r
- }\r
//\r
// Remember how many file system options are here\r
//\r
UpdatePageEnd (CallbackData);\r
}\r
\r
-/**\r
-\r
- IsShellNodeDevicePath checks for the Shell device path. \r
- If it's the shell device path then return TRUE otherwise \r
- return FALSE.\r
-\r
- @param DevicePath The DevicePath to check\r
-\r
- @retval TRUE DevicePath is Shell\r
- @retval FALSE DevicePath is not Shell\r
-\r
-**/\r
-BOOLEAN\r
-IsShellNodeDevicePath(\r
- IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
- )\r
-{\r
-\r
- EFI_DEVICE_PATH_PROTOCOL *Node;\r
-\r
- for (Node = FilePath; !IsDevicePathEnd(Node); Node = NextDevicePathNode(Node)) \r
- {\r
- if ((DevicePathType (Node) == MEDIA_DEVICE_PATH) && (DevicePathSubType (Node) == MEDIA_PIWG_FW_FILE_DP)) {\r
- if (!CompareMem(PcdGetPtr(PcdShellFile), &(((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)Node)->FvFileName), sizeof(EFI_GUID)))\r
- return TRUE;\r
- }\r
- }\r
- return FALSE;\r
-}\r
\r
/**\r
Create a list of boot option from global BootOptionMenu. It\r
#include <Guid/CapsuleVendor.h>\r
#include <Guid/StatusCodeDataTypeId.h>\r
#include <Guid/FileInfo.h>\r
-//#include <Guid/HiiSetupEnter.h>\r
#include <Guid/HiiBootMaintenanceFormset.h>\r
\r
#include <Protocol/LoadFile.h>\r
#include <Protocol/HiiDatabase.h>\r
#include <Protocol/HiiString.h>\r
#include <Protocol/SerialIo.h>\r
-#include <Protocol/LegacyBios.h>\r
#include <Protocol/SimpleTextInEx.h>\r
#include <Protocol/DriverHealth.h>\r
#include <Protocol/DevicePathToText.h>\r
[Packages]\r
MdePkg/MdePkg.dec\r
MdeModulePkg/MdeModulePkg.dec\r
- IntelFrameworkPkg/IntelFrameworkPkg.dec\r
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
\r
[LibraryClasses]\r
DevicePathLib\r
gEfiLoadFileProtocolGuid ## PROTOCOL CONSUMES\r
gEfiSmbiosProtocolGuid ## PROTOCOL CONSUMES\r
gEfiGenericMemTestProtocolGuid ## PROTOCOL CONSUMES\r
- gEfiLegacyBiosProtocolGuid ## PROTOCOL CONSUMES\r
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport ## PROTOCOL SOMETIMES_CONSUMES\r
gEfiBlockIoProtocolGuid ## PROTOCOL CONSUMES\r
gEfiGraphicsOutputProtocolGuid ## PROTOCOL SOMETIMES_CONSUMES\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn\r
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut\r
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile\r
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution\r
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution\r
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn\r