2 The boot manager reference implementation
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 This software and associated documentation (if any) is furnished
6 under a license and may only be used or copied in accordance
7 with the terms of the license. Except as permitted by such
8 license, no part of this software or documentation may be
9 reproduced, stored in a retrieval system, or transmitted in any
10 form or by any means without the express written consent of
15 #include "BootManager.h"
18 EFI_GUID mBootManagerGuid
= BOOT_MANAGER_FORMSET_GUID
;
20 // Boot video resolution and text mode.
22 UINT32 mBmBootHorizontalResolution
= 0;
23 UINT32 mBmBootVerticalResolution
= 0;
24 UINT32 mBmBootTextModeColumn
= 0;
25 UINT32 mBmBootTextModeRow
= 0;
27 // BIOS setup video resolution and text mode.
29 UINT32 mBmSetupTextModeColumn
= 0;
30 UINT32 mBmSetupTextModeRow
= 0;
31 UINT32 mBmSetupHorizontalResolution
= 0;
32 UINT32 mBmSetupVerticalResolution
= 0;
34 CHAR16
*mDeviceTypeStr
[] = {
41 L
"Legacy Embedded Network",
42 L
"Legacy Unknown Device"
45 HII_VENDOR_DEVICE_PATH mBootManagerHiiVendorDevicePath
= {
51 (UINT8
) (sizeof (VENDOR_DEVICE_PATH
)),
52 (UINT8
) ((sizeof (VENDOR_DEVICE_PATH
)) >> 8)
56 // {1DDDBE15-481D-4d2b-8277-B191EAF66525}
58 { 0x1dddbe15, 0x481d, 0x4d2b, { 0x82, 0x77, 0xb1, 0x91, 0xea, 0xf6, 0x65, 0x25 } }
62 END_ENTIRE_DEVICE_PATH_SUBTYPE
,
64 (UINT8
) (END_DEVICE_PATH_LENGTH
),
65 (UINT8
) ((END_DEVICE_PATH_LENGTH
) >> 8)
70 BOOT_MANAGER_CALLBACK_DATA gBootManagerPrivate
= {
71 BOOT_MANAGER_CALLBACK_DATA_SIGNATURE
,
75 BootManagerExtractConfig
,
76 BootManagerRouteConfig
,
82 This function will change video resolution and text mode
83 according to defined setup mode or defined boot mode
85 @param IsSetupMode Indicate mode is changed to setup mode or boot mode.
87 @retval EFI_SUCCESS Mode is changed successfully.
88 @retval Others Mode failed to be changed.
97 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
98 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*SimpleTextOut
;
100 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*Info
;
104 UINT32 NewHorizontalResolution
;
105 UINT32 NewVerticalResolution
;
109 EFI_HANDLE
*HandleBuffer
;
119 // Get current video resolution and text mode
121 Status
= gBS
->HandleProtocol (
122 gST
->ConsoleOutHandle
,
123 &gEfiGraphicsOutputProtocolGuid
,
124 (VOID
**)&GraphicsOutput
126 if (EFI_ERROR (Status
)) {
127 GraphicsOutput
= NULL
;
130 Status
= gBS
->HandleProtocol (
131 gST
->ConsoleOutHandle
,
132 &gEfiSimpleTextOutProtocolGuid
,
133 (VOID
**)&SimpleTextOut
135 if (EFI_ERROR (Status
)) {
136 SimpleTextOut
= NULL
;
139 if ((GraphicsOutput
== NULL
) || (SimpleTextOut
== NULL
)) {
140 return EFI_UNSUPPORTED
;
145 // The requried resolution and text mode is setup mode.
147 NewHorizontalResolution
= mBmSetupHorizontalResolution
;
148 NewVerticalResolution
= mBmSetupVerticalResolution
;
149 NewColumns
= mBmSetupTextModeColumn
;
150 NewRows
= mBmSetupTextModeRow
;
153 // The required resolution and text mode is boot mode.
155 NewHorizontalResolution
= mBmBootHorizontalResolution
;
156 NewVerticalResolution
= mBmBootVerticalResolution
;
157 NewColumns
= mBmBootTextModeColumn
;
158 NewRows
= mBmBootTextModeRow
;
161 if (GraphicsOutput
!= NULL
) {
162 MaxGopMode
= GraphicsOutput
->Mode
->MaxMode
;
165 if (SimpleTextOut
!= NULL
) {
166 MaxTextMode
= SimpleTextOut
->Mode
->MaxMode
;
170 // 1. If current video resolution is same with required video resolution,
171 // video resolution need not be changed.
172 // 1.1. If current text mode is same with required text mode, text mode need not be changed.
173 // 1.2. If current text mode is different from required text mode, text mode need be changed.
174 // 2. If current video resolution is different from required video resolution, we need restart whole console drivers.
176 for (ModeNumber
= 0; ModeNumber
< MaxGopMode
; ModeNumber
++) {
177 Status
= GraphicsOutput
->QueryMode (
183 if (!EFI_ERROR (Status
)) {
184 if ((Info
->HorizontalResolution
== NewHorizontalResolution
) &&
185 (Info
->VerticalResolution
== NewVerticalResolution
)) {
186 if ((GraphicsOutput
->Mode
->Info
->HorizontalResolution
== NewHorizontalResolution
) &&
187 (GraphicsOutput
->Mode
->Info
->VerticalResolution
== NewVerticalResolution
)) {
189 // Current resolution is same with required resolution, check if text mode need be set
191 Status
= SimpleTextOut
->QueryMode (SimpleTextOut
, SimpleTextOut
->Mode
->Mode
, &CurrentColumn
, &CurrentRow
);
192 ASSERT_EFI_ERROR (Status
);
193 if (CurrentColumn
== NewColumns
&& CurrentRow
== NewRows
) {
195 // If current text mode is same with required text mode. Do nothing
201 // If current text mode is different from requried text mode. Set new video mode
203 for (Index
= 0; Index
< MaxTextMode
; Index
++) {
204 Status
= SimpleTextOut
->QueryMode (SimpleTextOut
, Index
, &CurrentColumn
, &CurrentRow
);
205 if (!EFI_ERROR(Status
)) {
206 if ((CurrentColumn
== NewColumns
) && (CurrentRow
== NewRows
)) {
208 // Required text mode is supported, set it.
210 Status
= SimpleTextOut
->SetMode (SimpleTextOut
, Index
);
211 ASSERT_EFI_ERROR (Status
);
213 // Update text mode PCD.
215 PcdSet32 (PcdConOutColumn
, mBmSetupTextModeColumn
);
216 PcdSet32 (PcdConOutRow
, mBmSetupTextModeRow
);
222 if (Index
== MaxTextMode
) {
224 // If requried text mode is not supported, return error.
227 return EFI_UNSUPPORTED
;
232 // If current video resolution is not same with the new one, set new video resolution.
233 // In this case, the driver which produces simple text out need be restarted.
235 Status
= GraphicsOutput
->SetMode (GraphicsOutput
, ModeNumber
);
236 if (!EFI_ERROR (Status
)) {
246 if (ModeNumber
== MaxGopMode
) {
248 // If the resolution is not supported, return error.
250 return EFI_UNSUPPORTED
;
254 // Set PCD to Inform GraphicsConsole to change video resolution.
255 // Set PCD to Inform Consplitter to change text mode.
257 PcdSet32 (PcdVideoHorizontalResolution
, NewHorizontalResolution
);
258 PcdSet32 (PcdVideoVerticalResolution
, NewVerticalResolution
);
259 PcdSet32 (PcdConOutColumn
, NewColumns
);
260 PcdSet32 (PcdConOutRow
, NewRows
);
263 // Video mode is changed, so restart graphics console driver and higher level driver.
264 // Reconnect graphics console driver and higher level driver.
265 // Locate all the handles with GOP protocol and reconnect it.
267 Status
= gBS
->LocateHandleBuffer (
269 &gEfiSimpleTextOutProtocolGuid
,
274 if (!EFI_ERROR (Status
)) {
275 for (Index
= 0; Index
< HandleCount
; Index
++) {
276 gBS
->DisconnectController (HandleBuffer
[Index
], NULL
, NULL
);
278 for (Index
= 0; Index
< HandleCount
; Index
++) {
279 gBS
->ConnectController (HandleBuffer
[Index
], NULL
, NULL
, TRUE
);
281 if (HandleBuffer
!= NULL
) {
282 FreePool (HandleBuffer
);
290 Group the legacy boot options in the BootOption.
292 The routine assumes the boot options in the beginning that covers all the device
293 types are ordered properly and re-position the following boot options just after
294 the corresponding boot options with the same device type.
296 1. Input = [Harddisk1 CdRom2 Efi1 Harddisk0 CdRom0 CdRom1 Harddisk2 Efi0]
297 Assuming [Harddisk1 CdRom2 Efi1] is ordered properly
298 Output = [Harddisk1 Harddisk0 Harddisk2 CdRom2 CdRom0 CdRom1 Efi1 Efi0]
300 2. Input = [Efi1 Efi0 CdRom1 Harddisk0 Harddisk1 Harddisk2 CdRom0 CdRom2]
301 Assuming [Efi1 Efi0 CdRom1 Harddisk0] is ordered properly
302 Output = [Efi1 Efi0 CdRom1 CdRom0 CdRom2 Harddisk0 Harddisk1 Harddisk2]
306 GroupMultipleLegacyBootOption4SameType (
313 UINTN DeviceTypeIndex
[7];
318 CHAR16 OptionName
[sizeof ("Boot####")];
319 EFI_BOOT_MANAGER_LOAD_OPTION BootOption
;
321 SetMem (DeviceTypeIndex
, sizeof (DeviceTypeIndex
), 0xff);
323 GetEfiGlobalVariable2 (L
"BootOrder", (VOID
**) &BootOrder
, &BootOrderSize
);
325 for (Index
= 0; Index
< BootOrderSize
/ sizeof (UINT16
); Index
++) {
326 UnicodeSPrint (OptionName
, sizeof (OptionName
), L
"Boot%04x", BootOrder
[Index
]);
327 Status
= EfiBootManagerVariableToLoadOption (OptionName
, &BootOption
);
328 ASSERT_EFI_ERROR (Status
);
330 if ((DevicePathType (BootOption
.FilePath
) == BBS_DEVICE_PATH
) &&
331 (DevicePathSubType (BootOption
.FilePath
) == BBS_BBS_DP
)) {
333 // Legacy Boot Option
335 DEBUG ((EFI_D_ERROR
, "[BootManagerDxe] ==== Find Legacy Boot Option 0x%x! ==== \n", Index
));
336 ASSERT ((((BBS_BBS_DEVICE_PATH
*) BootOption
.FilePath
)->DeviceType
& 0xF) < sizeof (DeviceTypeIndex
) / sizeof (DeviceTypeIndex
[0]));
337 NextIndex
= &DeviceTypeIndex
[((BBS_BBS_DEVICE_PATH
*) BootOption
.FilePath
)->DeviceType
& 0xF];
339 if (*NextIndex
== (UINTN
) -1) {
341 // *NextIndex is the Index in BootOrder to put the next Option Number for the same type
343 *NextIndex
= Index
+ 1;
346 // insert the current boot option before *NextIndex, causing [*Next .. Index] shift right one position
348 OptionNumber
= BootOrder
[Index
];
349 CopyMem (&BootOrder
[*NextIndex
+ 1], &BootOrder
[*NextIndex
], (Index
- *NextIndex
) * sizeof (UINT16
));
350 BootOrder
[*NextIndex
] = OptionNumber
;
353 // Update the DeviceTypeIndex array to reflect the right shift operation
355 for (DeviceIndex
= 0; DeviceIndex
< sizeof (DeviceTypeIndex
) / sizeof (DeviceTypeIndex
[0]); DeviceIndex
++) {
356 if (DeviceTypeIndex
[DeviceIndex
] != (UINTN
) -1 && DeviceTypeIndex
[DeviceIndex
] >= *NextIndex
) {
357 DeviceTypeIndex
[DeviceIndex
]++;
362 EfiBootManagerFreeLoadOption (&BootOption
);
367 &gEfiGlobalVariableGuid
,
372 FreePool (BootOrder
);
376 This function converts an input device structure to a Unicode string.
378 @param DevPath A pointer to the device path structure.
380 @return A new allocated Unicode string that represents the device path.
385 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
390 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
*DevPathToText
;
392 if (DevPath
== NULL
) {
396 Status
= gBS
->LocateProtocol (
397 &gEfiDevicePathToTextProtocolGuid
,
399 (VOID
**) &DevPathToText
401 ASSERT_EFI_ERROR (Status
);
402 ToText
= DevPathToText
->ConvertDevicePathToText (
407 ASSERT (ToText
!= NULL
);
412 This function invokes Boot Manager. If all devices have not a chance to be connected,
413 the connect all will be triggered. It then enumerate all boot options. If
414 a boot option from the Boot Manager page is selected, Boot Manager will boot
415 from this boot option.
424 EFI_BOOT_MANAGER_LOAD_OPTION
*BootOption
;
425 UINTN BootOptionCount
;
428 EFI_STRING_ID HelpToken
;
430 EFI_HII_HANDLE HiiHandle
;
432 VOID
*StartOpCodeHandle
;
433 VOID
*EndOpCodeHandle
;
434 EFI_IFR_GUID_LABEL
*StartLabel
;
435 EFI_IFR_GUID_LABEL
*EndLabel
;
437 BOOLEAN IsLegacyOption
;
441 DeviceType
= (UINT16
) -1;
443 EfiBootManagerConnectAll ();
446 // for better user experience
447 // 1. User changes HD configuration (e.g.: unplug HDD), here we have a chance to remove the HDD boot option
448 // 2. User enables/disables UEFI PXE, here we have a chance to add/remove EFI Network boot option
450 EfiBootManagerRefreshAllBootOption ();
453 // BdsDxe doesn't group the legacy boot options for the same device type
456 GroupMultipleLegacyBootOption4SameType ();
458 BootOption
= EfiBootManagerGetLoadOptions (&BootOptionCount
, LoadOptionTypeBoot
);
460 HiiHandle
= gBootManagerPrivate
.HiiHandle
;
463 // Allocate space for creation of UpdateData Buffer
465 StartOpCodeHandle
= HiiAllocateOpCodeHandle ();
466 ASSERT (StartOpCodeHandle
!= NULL
);
468 EndOpCodeHandle
= HiiAllocateOpCodeHandle ();
469 ASSERT (EndOpCodeHandle
!= NULL
);
472 // Create Hii Extend Label OpCode as the start opcode
474 StartLabel
= (EFI_IFR_GUID_LABEL
*) HiiCreateGuidOpCode (StartOpCodeHandle
, &gEfiIfrTianoGuid
, NULL
, sizeof (EFI_IFR_GUID_LABEL
));
475 StartLabel
->ExtendOpCode
= EFI_IFR_EXTEND_OP_LABEL
;
476 StartLabel
->Number
= LABEL_BOOT_OPTION
;
479 // Create Hii Extend Label OpCode as the end opcode
481 EndLabel
= (EFI_IFR_GUID_LABEL
*) HiiCreateGuidOpCode (EndOpCodeHandle
, &gEfiIfrTianoGuid
, NULL
, sizeof (EFI_IFR_GUID_LABEL
));
482 EndLabel
->ExtendOpCode
= EFI_IFR_EXTEND_OP_LABEL
;
483 EndLabel
->Number
= LABEL_BOOT_OPTION_END
;
486 for (Index
= 0; Index
< BootOptionCount
; Index
++) {
488 // At this stage we are creating a menu entry, thus the Keys are reproduceable
493 // Don't display the hidden/inactive boot option
495 if (((BootOption
[Index
].Attributes
& LOAD_OPTION_HIDDEN
) != 0) || ((BootOption
[Index
].Attributes
& LOAD_OPTION_ACTIVE
) == 0)) {
500 // Group the legacy boot option in the sub title created dynamically
502 IsLegacyOption
= (BOOLEAN
) (
503 (DevicePathType (BootOption
[Index
].FilePath
) == BBS_DEVICE_PATH
) &&
504 (DevicePathSubType (BootOption
[Index
].FilePath
) == BBS_BBS_DP
)
507 if (!IsLegacyOption
&& NeedEndOp
) {
509 HiiCreateEndOpCode (StartOpCodeHandle
);
512 if (IsLegacyOption
&& DeviceType
!= ((BBS_BBS_DEVICE_PATH
*) BootOption
[Index
].FilePath
)->DeviceType
) {
514 HiiCreateEndOpCode (StartOpCodeHandle
);
517 DeviceType
= ((BBS_BBS_DEVICE_PATH
*) BootOption
[Index
].FilePath
)->DeviceType
;
518 Token
= HiiSetString (
522 MIN (DeviceType
& 0xF, sizeof (mDeviceTypeStr
) / sizeof (mDeviceTypeStr
[0]) - 1)
526 HiiCreateSubTitleOpCode (StartOpCodeHandle
, Token
, 0, 0, 1);
530 ASSERT (BootOption
[Index
].Description
!= NULL
);
532 Token
= HiiSetString (HiiHandle
, 0, BootOption
[Index
].Description
, NULL
);
534 TempStr
= BmDevicePathToStr (BootOption
[Index
].FilePath
);
535 TempSize
= StrSize (TempStr
);
536 HelpString
= AllocateZeroPool (TempSize
+ StrSize (L
"Device Path : "));
537 MaxLen
= (TempSize
+ StrSize (L
"Device Path : "))/sizeof(CHAR16
);
538 ASSERT (HelpString
!= NULL
);
539 StrCatS (HelpString
, MaxLen
, L
"Device Path : ");
540 StrCatS (HelpString
, MaxLen
, TempStr
);
542 HelpToken
= HiiSetString (HiiHandle
, 0, HelpString
, NULL
);
544 HiiCreateActionOpCode (
549 EFI_IFR_FLAG_CALLBACK
,
555 HiiCreateEndOpCode (StartOpCodeHandle
);
561 BOOT_MANAGER_FORM_ID
,
566 HiiFreeOpCodeHandle (StartOpCodeHandle
);
567 HiiFreeOpCodeHandle (EndOpCodeHandle
);
569 EfiBootManagerFreeLoadOptions (BootOption
, BootOptionCount
);
573 This function allows a caller to extract the current configuration for one
574 or more named elements from the target driver.
577 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
578 @param Request A null-terminated Unicode string in <ConfigRequest> format.
579 @param Progress On return, points to a character in the Request string.
580 Points to the string's null terminator if request was successful.
581 Points to the most recent '&' before the first failing name/value
582 pair (or the beginning of the string if the failure is in the
583 first name/value pair) if the request was not successful.
584 @param Results A null-terminated Unicode string in <ConfigAltResp> format which
585 has all values filled in for the names in the Request string.
586 String to be allocated by the called function.
588 @retval EFI_SUCCESS The Results is filled with the requested values.
589 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
590 @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.
591 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
596 BootManagerExtractConfig (
597 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
598 IN CONST EFI_STRING Request
,
599 OUT EFI_STRING
*Progress
,
600 OUT EFI_STRING
*Results
603 if (Progress
== NULL
|| Results
== NULL
) {
604 return EFI_INVALID_PARAMETER
;
607 return EFI_NOT_FOUND
;
611 This function processes the results of changes in configuration.
614 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
615 @param Configuration A null-terminated Unicode string in <ConfigResp> format.
616 @param Progress A pointer to a string filled in with the offset of the most
617 recent '&' before the first failing name/value pair (or the
618 beginning of the string if the failure is in the first
619 name/value pair) or the terminating NULL if all was successful.
621 @retval EFI_SUCCESS The Results is processed successfully.
622 @retval EFI_INVALID_PARAMETER Configuration is NULL.
623 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
628 BootManagerRouteConfig (
629 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
630 IN CONST EFI_STRING Configuration
,
631 OUT EFI_STRING
*Progress
634 if (Configuration
== NULL
|| Progress
== NULL
) {
635 return EFI_INVALID_PARAMETER
;
638 *Progress
= Configuration
;
640 return EFI_NOT_FOUND
;
644 This call back function is registered with Boot Manager formset.
645 When user selects a boot option, this call back function will
646 be triggered. The boot option is saved for later processing.
649 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
650 @param Action Specifies the type of action taken by the browser.
651 @param QuestionId A unique value which is sent to the original exporting driver
652 so that it can identify the type of data to expect.
653 @param Type The type of value for the question.
654 @param Value A pointer to the data being sent to the original exporting driver.
655 @param ActionRequest On return, points to the action requested by the callback function.
657 @retval EFI_SUCCESS The callback successfully handled the action.
658 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.
663 BootManagerCallback (
664 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
665 IN EFI_BROWSER_ACTION Action
,
666 IN EFI_QUESTION_ID QuestionId
,
668 IN EFI_IFR_TYPE_VALUE
*Value
,
669 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
672 EFI_BOOT_MANAGER_LOAD_OPTION
*BootOption
;
673 UINTN BootOptionCount
;
675 if (Action
!= EFI_BROWSER_ACTION_CHANGED
) {
677 // Do nothing for other UEFI Action. Only do call back when data is changed.
679 return EFI_UNSUPPORTED
;
682 if ((Value
== NULL
) || (ActionRequest
== NULL
)) {
683 return EFI_INVALID_PARAMETER
;
686 BootOption
= EfiBootManagerGetLoadOptions (&BootOptionCount
, LoadOptionTypeBoot
);
688 // parse the selected option
690 BmBdsSetConsoleMode (FALSE
);
691 EfiBootManagerBoot (&BootOption
[QuestionId
- 1]);
692 BmBdsSetConsoleMode (TRUE
);
694 if (EFI_ERROR (BootOption
[QuestionId
- 1].Status
)) {
695 gST
->ConOut
->OutputString (
697 HiiGetString (gBootManagerPrivate
.HiiHandle
, STRING_TOKEN (STR_ANY_KEY_CONTINUE
), NULL
)
699 gST
->ConIn
->ReadKeyStroke (gST
->ConIn
, &Key
);
702 EfiBootManagerFreeLoadOptions (BootOption
, BootOptionCount
);
709 Install Boot Manager Menu driver.
711 @param ImageHandle The image handle.
712 @param SystemTable The system table.
714 @retval EFI_SUCEESS Install Boot manager menu success.
715 @retval Other Return error status.
720 BootManagerLibConstructor (
721 IN EFI_HANDLE ImageHandle
,
722 IN EFI_SYSTEM_TABLE
*SystemTable
728 // Install Device Path Protocol and Config Access protocol to driver handle
730 gBootManagerPrivate
.DriverHandle
= NULL
;
731 Status
= gBS
->InstallMultipleProtocolInterfaces (
732 &gBootManagerPrivate
.DriverHandle
,
733 &gEfiDevicePathProtocolGuid
,
734 &mBootManagerHiiVendorDevicePath
,
735 &gEfiHiiConfigAccessProtocolGuid
,
736 &gBootManagerPrivate
.ConfigAccess
,
739 ASSERT_EFI_ERROR (Status
);
742 // Publish our HII data
744 gBootManagerPrivate
.HiiHandle
= HiiAddPackages (
746 gBootManagerPrivate
.DriverHandle
,
748 BootManagerLibStrings
,
751 ASSERT (gBootManagerPrivate
.HiiHandle
!= NULL
);
754 // Update boot manager page
756 UpdateBootManager ();
762 Unloads the application and its installed protocol.
764 @param[in] ImageHandle Handle that identifies the image to be unloaded.
765 @param[in] SystemTable System Table
767 @retval EFI_SUCCESS The image has been unloaded.
771 BootManagerLibDestructor (
772 IN EFI_HANDLE ImageHandle
,
773 IN EFI_SYSTEM_TABLE
*SystemTable
778 Status
= gBS
->UninstallMultipleProtocolInterfaces (
779 gBootManagerPrivate
.DriverHandle
,
780 &gEfiDevicePathProtocolGuid
,
781 &mBootManagerHiiVendorDevicePath
,
782 &gEfiHiiConfigAccessProtocolGuid
,
783 &gBootManagerPrivate
.ConfigAccess
,
786 ASSERT_EFI_ERROR (Status
);
788 HiiRemovePackages (gBootManagerPrivate
.HiiHandle
);