2 Generic BDS library definition, include the data structure and function.
4 Copyright (c) 2004 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _GENERIC_BDS_LIB_H_
16 #define _GENERIC_BDS_LIB_H_
18 #include <Protocol/HiiDatabase.h>
19 #include <IndustryStandard/PeImage.h>
22 extern EFI_HANDLE mBdsImageHandle
;
25 // Constants which are variable names used to access variables
27 #define VAR_LEGACY_DEV_ORDER L"LegacyDevOrder"
30 // Data structures and defines
32 #define FRONT_PAGE_QUESTION_ID 0x0000
33 #define FRONT_PAGE_DATA_WIDTH 0x01
38 #define CONSOLE_OUT 0x00000001
39 #define STD_ERROR 0x00000002
40 #define CONSOLE_IN 0x00000004
41 #define CONSOLE_ALL (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)
44 // Load Option Attributes defined in EFI Specification
46 #define LOAD_OPTION_ACTIVE 0x00000001
47 #define LOAD_OPTION_FORCE_RECONNECT 0x00000002
49 #define LOAD_OPTION_HIDDEN 0x00000008
50 #define LOAD_OPTION_CATEGORY 0x00001F00
52 #define LOAD_OPTION_CATEGORY_BOOT 0x00000000
53 #define LOAD_OPTION_CATEGORY_APP 0x00000100
55 #define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
56 #define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
58 #define IS_LOAD_OPTION_TYPE(_c, _Mask) (BOOLEAN) (((_c) & (_Mask)) != 0)
61 // Define Maxmim characters that will be accepted
64 #define MAX_CHAR_SIZE (MAX_CHAR * 2)
66 #define MIN_ALIGNMENT_SIZE 4
67 #define ALIGN_SIZE(a) ((a % MIN_ALIGNMENT_SIZE) ? MIN_ALIGNMENT_SIZE - (a % MIN_ALIGNMENT_SIZE) : 0)
70 // Define maximum characters for boot option variable "BootXXXX"
72 #define BOOT_OPTION_MAX_CHAR 10
75 // This data structure is the part of BDS_CONNECT_ENTRY that we can hard code.
77 #define BDS_LOAD_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'C', 'O')
84 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
92 UINT32 LoadOptionsSize
;
98 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
100 } BDS_CONSOLE_CONNECT_ENTRY
;
107 // Bds boot related lib functions
110 Boot from the UEFI spec defined "BootNext" variable.
120 Process the boot option follow the UEFI specification and
121 special treat the legacy boot option with BBS_DEVICE_PATH.
123 @param Option The boot option need to be processed
124 @param DevicePath The device path which describe where to load the
125 boot image or the legcy BBS device path to boot
127 @param ExitDataSize The size of exit data.
128 @param ExitData Data returned when Boot image failed.
130 @retval EFI_SUCCESS Boot from the input boot option successfully.
131 @retval EFI_NOT_FOUND If the Device Path is not found in the system
136 BdsLibBootViaBootOption (
137 IN BDS_COMMON_OPTION
* Option
,
138 IN EFI_DEVICE_PATH_PROTOCOL
* DevicePath
,
139 OUT UINTN
*ExitDataSize
,
140 OUT CHAR16
**ExitData OPTIONAL
145 This function will enumerate all possible boot device in the system,
146 it will only excute once of every boot.
148 @param BdsBootOptionList The header of the link list which indexed all
151 @retval EFI_SUCCESS Finished all the boot device enumerate and create
152 the boot option base on that boot device
157 BdsLibEnumerateAllBootOption (
158 IN OUT LIST_ENTRY
*BdsBootOptionList
162 Build the boot option with the handle parsed in
164 @param Handle The handle which present the device path to create
166 @param BdsBootOptionList The header of the link list which indexed all
168 @param String The description of the boot option.
173 BdsLibBuildOptionFromHandle (
174 IN EFI_HANDLE Handle
,
175 IN LIST_ENTRY
*BdsBootOptionList
,
181 Build the on flash shell boot option with the handle parsed in.
183 @param Handle The handle which present the device path to create
184 on flash shell boot option
185 @param BdsBootOptionList The header of the link list which indexed all
191 BdsLibBuildOptionFromShell (
192 IN EFI_HANDLE Handle
,
193 IN OUT LIST_ENTRY
*BdsBootOptionList
197 // Bds misc lib functions
200 Get boot mode by looking up configuration table and parsing HOB list
202 @param BootMode Boot mode from PEI handoff HOB.
204 @retval EFI_SUCCESS Successfully get boot mode
210 OUT EFI_BOOT_MODE
*BootMode
215 The function will go through the driver optoin link list, load and start
216 every driver the driver optoin device path point to.
218 @param BdsDriverLists The header of the current driver option link list
224 IN LIST_ENTRY
*BdsDriverLists
229 Process BootOrder, or DriverOrder variables, by calling
230 BdsLibVariableToOption () for each UINT16 in the variables.
232 @param BdsCommonOptionList The header of the option list base on variable
234 @param VariableName EFI Variable name indicate the BootOrder or
237 @retval EFI_SUCCESS Success create the boot option or driver option
239 @retval EFI_OUT_OF_RESOURCES Failed to get the boot option or driver option list
244 BdsLibBuildOptionFromVar (
245 IN LIST_ENTRY
*BdsCommonOptionList
,
246 IN CHAR16
*VariableName
250 Read the EFI variable (VendorGuid/Name) and return a dynamically allocated
251 buffer, and the size of the buffer. If failure return NULL.
253 @param Name String part of EFI variable name
254 @param VendorGuid GUID part of EFI variable name
255 @param VariableSize Returns the size of the EFI variable that was read
257 @return Dynamically allocated memory that contains a copy of the EFI variable
258 Caller is responsible freeing the buffer.
259 @retval NULL Variable was not read
264 BdsLibGetVariableAndSize (
266 IN EFI_GUID
*VendorGuid
,
267 OUT UINTN
*VariableSize
272 This function prints a series of strings.
274 @param ConOut Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
275 @param ... A variable argument list containing series of
276 strings, the last string must be NULL.
278 @retval EFI_SUCCESS Success print out the string using ConOut.
279 @retval EFI_STATUS Return the status of the ConOut->OutputString ().
284 BdsLibOutputStrings (
285 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*ConOut
,
290 Build the boot#### or driver#### option from the VariableName, the
291 build boot#### or driver#### will also be linked to BdsCommonOptionList.
293 @param BdsCommonOptionList The header of the boot#### or driver#### option
295 @param VariableName EFI Variable name indicate if it is boot#### or
298 @retval BDS_COMMON_OPTION Get the option just been created
299 @retval NULL Failed to get the new option
304 BdsLibVariableToOption (
305 IN OUT LIST_ENTRY
*BdsCommonOptionList
,
306 IN CHAR16
*VariableName
310 This function will register the new boot#### or driver#### option base on
311 the VariableName. The new registered boot#### or driver#### will be linked
312 to BdsOptionList and also update to the VariableName. After the boot#### or
313 driver#### updated, the BootOrder or DriverOrder will also be updated.
315 @param BdsOptionList The header of the boot#### or driver#### link list
316 @param DevicePath The device path which the boot#### or driver####
318 @param String The description of the boot#### or driver####
319 @param VariableName Indicate if the boot#### or driver#### option
321 @retval EFI_SUCCESS The boot#### or driver#### have been success
323 @retval EFI_STATUS Return the status of gRT->SetVariable ().
328 BdsLibRegisterNewOption (
329 IN LIST_ENTRY
*BdsOptionList
,
330 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
332 IN CHAR16
*VariableName
336 // Bds connect or disconnect driver lib funcion
339 Connects all drivers to all controllers.
340 This function make sure all the current system driver will manage
341 the correspoinding controllers if have. And at the same time, make
342 sure all the system controllers have driver to manage it if have.
347 BdsLibConnectAllDriversToAllControllers (
352 This function will connect all the system driver to controller
353 first, and then special connect the default console, this make
354 sure all the system controller available and the platform default
365 This function will create all handles associate with every device
366 path node. If the handle associate with one device path node can not
367 be created success, then still give one chance to do the dispatch,
368 which load the missing drivers if possible.
370 @param DevicePathToConnect The device path which will be connected, it can be
371 a multi-instance device path
373 @retval EFI_SUCCESS All handles associate with every device path node
375 @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles
376 @retval EFI_NOT_FOUND Create the handle associate with one device path
382 BdsLibConnectDevicePath (
383 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePathToConnect
387 This function will connect all current system handles recursively. The
388 connection will finish until every handle's child handle created if it have.
390 @retval EFI_SUCCESS All handles and it's child handle have been
392 @retval EFI_STATUS Return the status of gBS->LocateHandleBuffer().
397 BdsLibConnectAllEfi (
403 This function will disconnect all current system handles. The disconnection
404 will finish until every handle have been disconnected.
406 @retval EFI_SUCCESS All handles have been disconnected
407 @retval EFI_STATUS Return the status of gBS->LocateHandleBuffer().
412 BdsLibDisconnectAllEfi (
417 // Bds console related lib functions
420 This function will search every simpletxt devive in current system,
421 and make every simpletxt device as pertantial console device.
426 BdsLibConnectAllConsoles (
432 This function will connect console device base on the console
433 device variable ConIn, ConOut and ErrOut.
435 @retval EFI_SUCCESS At least one of the ConIn and ConOut device have
436 been connected success.
437 @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
442 BdsLibConnectAllDefaultConsoles (
447 This function update console variable based on ConVarName, it can
448 add or remove one specific console device path from the variable
450 @param ConVarName Console related variable name, ConIn, ConOut,
452 @param CustomizedConDevicePath The console device path which will be added to
453 the console variable ConVarName, this parameter
454 can not be multi-instance.
455 @param ExclusiveDevicePath The console device path which will be removed
456 from the console variable ConVarName, this
457 parameter can not be multi-instance.
459 @retval EFI_UNSUPPORTED The added device path is same to the removed one.
460 @retval EFI_SUCCESS Success add or remove the device path from the
466 BdsLibUpdateConsoleVariable (
467 IN CHAR16
*ConVarName
,
468 IN EFI_DEVICE_PATH_PROTOCOL
*CustomizedConDevicePath
,
469 IN EFI_DEVICE_PATH_PROTOCOL
*ExclusiveDevicePath
473 Connect the console device base on the variable ConVarName, if
474 device path of the ConVarName is multi-instance device path, if
475 anyone of the instances is connected success, then this function
478 @param ConVarName Console related variable name, ConIn, ConOut,
481 @retval EFI_NOT_FOUND There is not any console devices connected
483 @retval EFI_SUCCESS Success connect any one instance of the console
484 device path base on the variable ConVarName.
489 BdsLibConnectConsoleVariable (
490 IN CHAR16
*ConVarName
494 // Bds device path related lib functions
497 Delete the instance in Multi which matches partly with Single instance
499 @param Multi A pointer to a multi-instance device path data
501 @param Single A pointer to a single-instance device path data
504 @return This function will remove the device path instances in Multi which partly
505 match with the Single, and return the result device path. If there is no
506 remaining device path as a result, this function will return NULL.
509 EFI_DEVICE_PATH_PROTOCOL
*
511 BdsLibDelPartMatchInstance (
512 IN EFI_DEVICE_PATH_PROTOCOL
*Multi
,
513 IN EFI_DEVICE_PATH_PROTOCOL
*Single
517 Function compares a device path data structure to that of all the nodes of a
518 second device path instance.
520 @param Multi A pointer to a multi-instance device path data
522 @param Single A pointer to a single-instance device path data
525 @retval TRUE If the Single device path is contained within Multi device path.
526 @retval FALSE The Single device path is not match within Multi device path.
531 BdsLibMatchDevicePaths (
532 IN EFI_DEVICE_PATH_PROTOCOL
*Multi
,
533 IN EFI_DEVICE_PATH_PROTOCOL
*Single
537 This function converts an input device structure to a Unicode string.
539 @param DevPath A pointer to the device path structure.
541 @return A new allocated Unicode string that represents the device path.
547 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
552 // Internal definitions
563 VOID (*Function
) (POOL_PRINT
*, VOID
*);
564 } DEVICE_PATH_STRING_TABLE
;
566 extern EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid
;
569 EFI_DEVICE_PATH_PROTOCOL Header
;
571 UINT8 VendorDefinedData
[1];
572 } VENDOR_DEVICE_PATH_WITH_DATA
;
575 extern EFI_GUID mEfiDevicePathMessagingSASGuid
;
578 EFI_DEVICE_PATH_PROTOCOL Header
;
579 UINT16 NetworkProtocol
;
582 UINT16 TargetPortalGroupTag
;
583 CHAR16 iSCSITargetName
[1];
584 } ISCSI_DEVICE_PATH_WITH_NAME
;
588 // Notes: EFI 64 shadow all option rom
590 #if defined (MDE_CPU_IPF)
591 #define EFI64_SHADOW_ALL_LEGACY_ROM() ShadowAllOptionRom ();
593 #define EFI64_SHADOW_ALL_LEGACY_ROM()
597 Shadow all Legacy OptionRom.
607 // BBS support macros and functions
610 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
611 #define REFRESH_LEGACY_BOOT_OPTIONS \
612 BdsDeleteAllInvalidLegacyBootOptions ();\
613 BdsAddNonExistingLegacyBootOptions (); \
614 BdsUpdateLegacyDevOrder ()
616 #define REFRESH_LEGACY_BOOT_OPTIONS
620 Delete all the invalid legacy boot options.
622 @retval EFI_SUCCESS All invalide legacy boot options are deleted.
623 @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.
624 @retval EFI_NOT_FOUND Fail to retrive variable of boot order.
629 BdsDeleteAllInvalidLegacyBootOptions (
635 Add the legacy boot options from BBS table if they do not exist.
637 @retval EFI_SUCCESS The boot options are added successfully
638 or they are already in boot options.
643 BdsAddNonExistingLegacyBootOptions (
649 Add the legacy boot devices from BBS table into
650 the legacy device boot order.
652 @retval EFI_SUCCESS The boot devices are added successfully.
657 BdsUpdateLegacyDevOrder (
663 Set the boot priority for BBS entries based on boot option entry and boot order.
665 @param Entry The boot option is to be checked for refresh BBS table.
667 @retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.
672 BdsRefreshBbsTableForBoot (
673 IN BDS_COMMON_OPTION
*Entry
678 Delete boot option specified by OptionNumber and adjust the boot order.
680 @param OptionNumber The boot option to be deleted.
681 @param BootOrder Boot order list to be adjusted by remove this boot option.
682 @param BootOrderSize The size of Boot order list will be modified.
684 @retval EFI_SUCCESS The boot option is deleted successfully.
689 BdsDeleteBootOption (
690 IN UINTN OptionNumber
,
691 IN OUT UINT16
*BootOrder
,
692 IN OUT UINTN
*BootOrderSize
696 //The interface functions relate with Setup Browser Reset Reminder feature
699 Enable the setup browser reset reminder feature.
700 This routine is used in platform tip. If the platform policy need the feature, use the routine to enable it.
705 EnableResetReminderFeature (
710 Disable the setup browser reset reminder feature.
711 This routine is used in platform tip. If the platform policy do not want the feature, use the routine to disable it.
716 DisableResetReminderFeature (
721 Record the info that a reset is required.
722 A module boolean variable is used to record whether a reset is required.
727 EnableResetRequired (
733 Record the info that no reset is required.
734 A module boolean variable is used to record whether a reset is required.
739 DisableResetRequired (
744 Check whether platform policy enable the reset reminder feature. The default is enabled.
749 IsResetReminderFeatureEnable (
754 Check if user changed any option setting which needs a system reset to be effective.
764 Check whether a reset is needed, and finish the reset reminder feature.
765 If a reset is needed, Popup a menu to notice user, and finish the feature
766 according to the user selection.
777 Get the headers (dos, image, optional header) from an image
779 @param Device SimpleFileSystem device handle
780 @param FileName File name for the image
781 @param DosHeader Pointer to dos header
782 @param Hdr The buffer in which to return the PE32, PE32+, or TE header.
784 @retval EFI_SUCCESS Successfully get the machine type.
785 @retval EFI_NOT_FOUND The file is not found.
786 @retval EFI_LOAD_ERROR File is not a valid image file.
791 BdsLibGetImageHeader (
792 IN EFI_HANDLE Device
,
794 OUT EFI_IMAGE_DOS_HEADER
*DosHeader
,
795 OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr
799 // Define the boot type which to classify the boot option type
800 // Different boot option type could have different boot behavior
801 // Use their device path node (Type + SubType) as type value
802 // The boot type here can be added according to requirement
805 // ACPI boot type. For ACPI device, cannot use sub-type to distinguish device, so hardcode their value
807 #define BDS_EFI_ACPI_FLOPPY_BOOT 0x0201
810 // If a device path of boot option only point to a message node, the boot option is message boot type
812 #define BDS_EFI_MESSAGE_ATAPI_BOOT 0x0301 // Type 03; Sub-Type 01
813 #define BDS_EFI_MESSAGE_SCSI_BOOT 0x0302 // Type 03; Sub-Type 02
814 #define BDS_EFI_MESSAGE_USB_DEVICE_BOOT 0x0305 // Type 03; Sub-Type 05
815 #define BDS_EFI_MESSAGE_MISC_BOOT 0x03FF
818 // If a device path of boot option contain a media node, the boot option is media boot type
820 #define BDS_EFI_MEDIA_HD_BOOT 0x0401 // Type 04; Sub-Type 01
821 #define BDS_EFI_MEDIA_CDROM_BOOT 0x0402 // Type 04; Sub-Type 02
824 // If a device path of boot option contain a BBS node, the boot option is BBS boot type
826 #define BDS_LEGACY_BBS_BOOT 0x0501 // Type 05; Sub-Type 01
828 #define BDS_EFI_UNSUPPORT 0xFFFF
831 // USB host controller Programming Interface.
833 #define PCI_CLASSC_PI_UHCI 0x00
834 #define PCI_CLASSC_PI_EHCI 0x20
837 Check whether there is a instance in BlockIoDevicePath, which contain multi device path
838 instances, has the same partition node with HardDriveDevicePath device path
840 @param BlockIoDevicePath Multi device path instances which need to check
841 @param HardDriveDevicePath A device path which starts with a hard drive media
844 @retval TRUE There is a matched device path instance.
845 @retval FALSE There is no matched device path instance.
850 MatchPartitionDevicePathNode (
851 IN EFI_DEVICE_PATH_PROTOCOL
*BlockIoDevicePath
,
852 IN HARDDRIVE_DEVICE_PATH
*HardDriveDevicePath
857 Expand a device path that starts with a hard drive media device path node to be a
858 full device path that includes the full hardware path to the device. We need
859 to do this so it can be booted. As an optimizaiton the front match (the part point
860 to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ) is saved in a variable
861 so a connect all is not required on every boot. All successful history device path
862 which point to partition node (the front part) will be saved.
864 @param HardDriveDevicePath EFI Device Path to boot, if it starts with a hard
865 drive media device path.
866 @return A Pointer to the full device path or NULL if a valid Hard Drive devic path
870 EFI_DEVICE_PATH_PROTOCOL
*
872 BdsExpandPartitionPartialDevicePathToFull (
873 IN HARDDRIVE_DEVICE_PATH
*HardDriveDevicePath
877 Return the bootable media handle.
878 First, check the device is connected
879 Second, check whether the device path point to a device which support SimpleFileSystemProtocol,
880 Third, detect the the default boot file in the Media, and return the removable Media handle.
882 @param DevicePath Device Path to a bootable device
884 @retval NULL The media on the DevicePath is not bootable
889 BdsLibGetBootableHandle (
890 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
895 Check whether the Device path in a boot option point to a valide bootable device,
896 And if CheckMedia is true, check the device is ready to boot now.
898 @param DevPath the Device path in a boot option
899 @param CheckMedia if true, check the device is ready to boot now.
901 @retval TRUE the Device path is valide
902 @retval FALSE the Device path is invalide .
907 BdsLibIsValidEFIBootOptDevicePath (
908 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
,
909 IN BOOLEAN CheckMedia
913 For a bootable Device path, return its boot type.
915 @param DevicePath The bootable device Path to check
917 @retval BDS_EFI_MEDIA_HD_BOOT If the device path contains any media deviec path node, it is media boot type
918 For the floppy node, handle it as media node
919 @retval BDS_EFI_MEDIA_CDROM_BOOT If the device path contains any media deviec path node, it is media boot type
920 For the floppy node, handle it as media node
921 @retval BDS_EFI_ACPI_FLOPPY_BOOT If the device path contains any media deviec path node, it is media boot type
922 For the floppy node, handle it as media node
923 @retval BDS_EFI_MESSAGE_ATAPI_BOOT If the device path not contains any media deviec path node, and
924 its last device path node point to a message device path node, it is
926 @retval BDS_EFI_MESSAGE_SCSI_BOOT If the device path not contains any media deviec path node, and
927 its last device path node point to a message device path node, it is
928 @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT If the device path not contains any media deviec path node, and
929 its last device path node point to a message device path node, it is
930 @retval BDS_EFI_MESSAGE_MISC_BOOT If the device path not contains any media deviec path node, and
931 its last device path node point to a message device path node, it is
932 @retval BDS_LEGACY_BBS_BOOT Legacy boot type
933 @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path not point to a media and message devie,
938 BdsGetBootTypeFromDevicePath (
939 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
944 This routine register a function to adjust the different type memory page number
945 just before booting and save the updated info into the variable for next boot to use.
950 BdsLibSaveMemoryTypeInformation (
956 According to a file guild, check a Fv file device path is valid. If it is invalid,
957 try to return the valid device path.
958 FV address maybe changes for memory layout adjust from time to time, use this funciton
959 could promise the Fv file device path is right.
961 @param DevicePath on input, the Fv file device path need to check on
962 output, the updated valid Fv file device path
963 @param FileGuid the Fv file guild
965 @retval EFI_INVALID_PARAMETER the input DevicePath or FileGuid is invalid
967 @retval EFI_UNSUPPORTED the input DevicePath does not contain Fv file
969 @retval EFI_ALREADY_STARTED the input DevicePath has pointed to Fv file, it is
971 @retval EFI_SUCCESS has successfully updated the invalid DevicePath,
972 and return the updated device path in DevicePath
977 BdsLibUpdateFvFileDevicePath (
978 IN OUT EFI_DEVICE_PATH_PROTOCOL
** DevicePath
,
979 IN EFI_GUID
*FileGuid
984 Connect the specific Usb device which match the short form device path,
985 and whose bus is determined by Host Controller (Uhci or Ehci)
987 @param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci and ehci
989 @param RemainingDevicePath a short-form device path that starts with the first
990 element being a USB WWID or a USB Class device
993 @retval EFI_SUCCESS The specific Usb device is connected successfully.
994 @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF)
995 or RemainingDevicePath is not the USB class device path.
996 @retval EFI_NOT_FOUND The device specified by device path is not found.
1001 BdsLibConnectUsbDevByShortFormDP(
1002 IN UINT8 HostControllerPI
,
1003 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
1008 // The implementation of this function is provided by Platform code.
1011 Convert Vendor device path to device name.
1013 @param Str The buffer store device name
1014 @param DevPath Pointer to vendor device path
1020 IN OUT POOL_PRINT
*Str
,
1025 Concatenates a formatted unicode string to allocated pool.
1026 The caller must free the resulting buffer.
1028 @param Str Tracks the allocated pool, size in use, and amount of pool allocated.
1029 @param fmt The format string
1030 @param ... The data will be printed.
1032 @return Allocated buffer with the formatted string printed in it.
1033 The caller must free the allocated buffer.
1034 The buffer allocation is not packed.
1040 IN OUT POOL_PRINT
*Str
,
1046 Use Console Control to turn off UGA based Simple Text Out consoles from going
1047 to the UGA device. Put up LogoFile on every UGA device that is a console
1049 @param[in] LogoFile File name of logo to display on the center of the screen.
1051 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
1052 @retval EFI_UNSUPPORTED Logo not found
1058 IN EFI_GUID
*LogoFile
1063 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
1064 Simple Text Out screens will now be synced up with all non UGA output devices
1066 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
1076 Use Console Control Protocol to lock the Console In Spliter virtual handle.
1077 This is the ConInHandle and ConIn handle in the EFI system table. All key
1078 presses will be ignored until the Password is typed in. The only way to
1079 disable the password is to type it in to a ConIn device.
1081 @param Password Password used to lock ConIn device.
1083 @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully.
1084 @retval EFI_UNSUPPORTED Password not found