2 Generic BDS library defines general interfaces for a BDS driver, including:
3 1) BDS boot policy interface.
4 2) BDS boot device connect interface.
5 3) BDS Misc interfaces for mainting boot variable, ouput string.
7 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials are licensed and made available under
9 the terms and conditions of the BSD License that accompanies this distribution.
10 The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php.
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef _GENERIC_BDS_LIB_H_
19 #define _GENERIC_BDS_LIB_H_
21 #ifdef __MAKEWITH_GNUEFI
22 #include "gnuefi-helper.h"
25 //#include <Protocol/UserManager.h>
28 /// Constants which are variable names used to access variables.
30 #define VAR_LEGACY_DEV_ORDER L"LegacyDevOrder"
33 /// Data structures and defines.
35 #define FRONT_PAGE_QUESTION_ID 0x0000
36 #define FRONT_PAGE_DATA_WIDTH 0x01
41 #define CONSOLE_OUT 0x00000001
42 #define STD_ERROR 0x00000002
43 #define CONSOLE_IN 0x00000004
44 #define CONSOLE_ALL (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)
47 /// Load Option Attributes
49 #define LOAD_OPTION_ACTIVE 0x00000001
50 #define LOAD_OPTION_FORCE_RECONNECT 0x00000002
52 #define LOAD_OPTION_HIDDEN 0x00000008
53 #define LOAD_OPTION_CATEGORY 0x00001F00
55 #define LOAD_OPTION_CATEGORY_BOOT 0x00000000
56 #define LOAD_OPTION_CATEGORY_APP 0x00000100
58 #define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
59 #define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
61 #define IS_LOAD_OPTION_TYPE(_c, _Mask) (BOOLEAN) (((_c) & (_Mask)) != 0)
64 /// Define the maximum characters that will be accepted.
67 #define MAX_CHAR_SIZE (MAX_CHAR * 2)
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
77 #ifdef __MAKEWITH_TIANO
78 #define BDS_LOAD_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'C', 'O')
80 #define BDS_LOAD_OPTION_SIGNATURE EFI_SIGNATURE_32 ('B', 'd', 'C', 'O')
88 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
96 UINT32 LoadOptionsSize
;
102 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
104 } BDS_CONSOLE_CONNECT_ENTRY
;
107 // Bds boot related lib functions
110 Boot from the UEFI spec defined "BootNext" variable.
120 Process the boot option according to the UEFI specification. The legacy boot option device path includes BBS_DEVICE_PATH.
122 @param Option The boot option to be processed.
123 @param DevicePath The device path describing where to load the
124 boot image or the legcy BBS device path to boot
126 @param ExitDataSize The size of exit data.
127 @param ExitData Data returned when Boot image failed.
129 @retval EFI_SUCCESS Boot from the input boot option succeeded.
130 @retval EFI_NOT_FOUND The Device Path is not found in the system.
135 BdsLibBootViaBootOption (
136 IN BDS_COMMON_OPTION
* Option
,
137 IN EFI_DEVICE_PATH_PROTOCOL
* DevicePath
,
138 OUT UINTN
*ExitDataSize
,
139 OUT CHAR16
**ExitData OPTIONAL
144 This function will enumerate all possible boot devices in the system, and
145 automatically create boot options for Network, Shell, Removable BlockIo,
146 and Non-BlockIo Simplefile devices.
148 BDS separates EFI boot options into six types:
149 1. Network - The boot option points to the SimpleNetworkProtocol device.
150 Bds will try to automatically create this type of boot option during enumeration.
151 2. Shell - The boot option points to internal flash shell.
152 Bds will try to automatically create this type of boot option during enumeration.
153 3. Removable BlockIo - The boot option points to a removable media
154 device, such as a USB flash drive or DVD drive.
155 These devices should contain a *removable* blockIo
156 protocol in their device handle.
157 Bds will try to automatically create this type boot option
159 4. Fixed BlockIo - The boot option points to a Fixed blockIo device,
161 These devices should contain a *fixed* blockIo
162 protocol in their device handle.
163 BDS will skip fixed blockIo devices, and not
164 automatically create boot option for them. But BDS
165 will help to delete those fixed blockIo boot options,
166 whose description rules conflict with other auto-created
168 5. Non-BlockIo Simplefile - The boot option points to a device whose handle
169 has SimpleFileSystem Protocol, but has no blockio
170 protocol. These devices do not offer blockIo
171 protocol, but BDS still can get the
172 \EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem
174 6. File - The boot option points to a file. These boot options are usually
175 created by the user, either manually or with an OS loader. BDS will not delete or modify
178 This function will enumerate all possible boot devices in the system, and
179 automatically create boot options for Network, Shell, Removable BlockIo,
180 and Non-BlockIo Simplefile devices.
181 It will excute once every boot.
183 @param BdsBootOptionList The header of the linked list that indexed all
184 current boot options.
186 @retval EFI_SUCCESS Finished all the boot device enumerations and
187 created the boot option based on the boot device.
189 @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and create
190 the boot option list.
194 BdsLibEnumerateAllBootOption (
195 IN OUT LIST_ENTRY
*BdsBootOptionList
199 Build the boot option with the handle parsed in.
201 @param Handle The handle representing the device path for which
202 to create a boot option.
203 @param BdsBootOptionList The header of the link list that indexed all
204 current boot options.
205 @param String The description of the boot option.
210 BdsLibBuildOptionFromHandle (
211 IN EFI_HANDLE Handle
,
212 IN LIST_ENTRY
*BdsBootOptionList
,
218 Build the on flash shell boot option with the handle parsed in.
220 @param Handle The handle which present the device path to create
221 the on flash shell boot option.
222 @param BdsBootOptionList The header of the link list that indexed all
223 current boot options.
228 BdsLibBuildOptionFromShell (
229 IN EFI_HANDLE Handle
,
230 IN OUT LIST_ENTRY
*BdsBootOptionList
235 The function will go through the driver option link list, and then load and start
236 every driver to which the driver option device path points.
238 @param BdsDriverLists The header of the current driver option link list.
244 IN LIST_ENTRY
*BdsDriverLists
249 This function processes BootOrder or DriverOrder variables, by calling
251 BdsLibVariableToOption () for each UINT16 in the variables.
253 @param BdsCommonOptionList The header of the option list base on the variable
255 @param VariableName An EFI Variable name indicate the BootOrder or
258 @retval EFI_SUCCESS Successfully created the boot option or driver option
260 @retval EFI_OUT_OF_RESOURCES Failed to get the boot option or the driver option list.
264 BdsLibBuildOptionFromVar (
265 IN LIST_ENTRY
*BdsCommonOptionList
,
266 IN CHAR16
*VariableName
270 This function reads the EFI variable (VendorGuid/Name) and returns a dynamically allocated
271 buffer and the size of the buffer. If it fails, return NULL.
273 @param Name The string part of the EFI variable name.
274 @param VendorGuid The GUID part of the EFI variable name.
275 @param VariableSize Returns the size of the EFI variable that was read.
277 @return Dynamically allocated memory that contains a copy
278 of the EFI variable. The caller is responsible for
280 @retval NULL The variable was not read.
284 BdsLibGetVariableAndSize (
286 IN EFI_GUID
*VendorGuid
,
287 OUT UINTN
*VariableSize
292 This function prints a series of strings.
294 @param ConOut A pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
295 @param ... A variable argument list containing a series of
296 strings, the last string must be NULL.
298 @retval EFI_SUCCESS Successfully printed out the string using ConOut.
299 @retval EFI_STATUS Return the status of the ConOut->OutputString ().
304 // BdsLibOutputStrings (
305 // IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut,
310 Build the boot#### or driver#### option from the VariableName. The
311 build boot#### or driver#### will also be linked to BdsCommonOptionList.
313 @param BdsCommonOptionList The header of the boot#### or driver#### option
315 @param VariableName EFI Variable name, indicates if it is boot#### or
318 @retval BDS_COMMON_OPTION The option that was created.
319 @retval NULL Failed to get the new option.
323 BdsLibVariableToOption (
324 IN OUT LIST_ENTRY
*BdsCommonOptionList
,
325 IN CHAR16
*VariableName
330 This function creates all handles associated with the given device
331 path node. If the handle associated with one device path node cannot
332 be created, then it tries to execute the dispatch to load the missing drivers.
334 @param DevicePathToConnect The device path to be connected. Can be
335 a multi-instance device path.
337 @retval EFI_SUCCESS All handles associates with every device path node
339 @retval EFI_OUT_OF_RESOURCES Not enough resources to create new handles.
340 @retval EFI_NOT_FOUND At least one handle could not be created.
344 BdsLibConnectDevicePath (
345 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePathToConnect
350 // Bds connect and disconnect driver lib funcions
353 This function connects all system drivers with the corresponding controllers.
358 BdsLibConnectAllDriversToAllControllers (
363 This function will connect console device based on the console
364 device variable ConIn, ConOut and ErrOut.
366 @retval EFI_SUCCESS At least one of the ConIn and ConOut devices have
368 @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
373 BdsLibConnectAllDefaultConsoles (
378 This function updates the console variable based on ConVarName. It can
379 add or remove one specific console device path from the variable
381 @param ConVarName The console-related variable name: ConIn, ConOut,
383 @param CustomizedConDevicePath The console device path to be added to
384 the console variable ConVarName. Cannot be multi-instance.
385 @param ExclusiveDevicePath The console device path to be removed
386 from the console variable ConVarName. Cannot be multi-instance.
388 @retval EFI_UNSUPPORTED The added device path is the same as a removed one.
389 @retval EFI_SUCCESS Successfully added or removed the device path from the
395 BdsLibUpdateConsoleVariable (
396 IN CHAR16
*ConVarName
,
397 IN EFI_DEVICE_PATH_PROTOCOL
*CustomizedConDevicePath
,
398 IN EFI_DEVICE_PATH_PROTOCOL
*ExclusiveDevicePath
402 Connect the console device base on the variable ConVarName. If
403 ConVarName is a multi-instance device path, and at least one
404 instance connects successfully, then this function
407 @param ConVarName The console related variable name: ConIn, ConOut,
410 @retval EFI_NOT_FOUND No console devices were connected successfully
411 @retval EFI_SUCCESS Connected at least one instance of the console
412 device path based on the variable ConVarName.
417 BdsLibConnectConsoleVariable (
418 IN CHAR16
*ConVarName
422 // Bds device path related lib functions
425 Delete the instance in Multi that overlaps with Single.
427 @param Multi A pointer to a multi-instance device path data
429 @param Single A pointer to a single-instance device path data
432 @return This function removes the device path instances in Multi that overlap
433 Single, and returns the resulting device path. If there is no
434 remaining device path as a result, this function will return NULL.
437 EFI_DEVICE_PATH_PROTOCOL
*
439 BdsLibDelPartMatchInstance (
440 IN EFI_DEVICE_PATH_PROTOCOL
*Multi
,
441 IN EFI_DEVICE_PATH_PROTOCOL
*Single
445 This function compares a device path data structure to that of all the nodes of a
446 second device path instance.
448 @param Multi A pointer to a multi-instance device path data
450 @param Single A pointer to a single-instance device path data
453 @retval TRUE If the Single device path is contained within a
455 @retval FALSE The Single device path is not contained within a
461 BdsLibMatchDevicePaths (
462 IN EFI_DEVICE_PATH_PROTOCOL
*Multi
,
463 IN EFI_DEVICE_PATH_PROTOCOL
*Single
467 This function converts an input device structure to a Unicode string.
469 @param DevPath A pointer to the device path structure.
471 @return A newly allocated Unicode string that represents the device path.
477 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
480 #ifdef __MAKEWITH_TIANO
482 // Internal definitions
493 (*DEV_PATH_FUNCTION
) (
494 IN OUT POOL_PRINT
*Str
,
501 DEV_PATH_FUNCTION Function
;
502 } DEVICE_PATH_STRING_TABLE
;
505 EFI_DEVICE_PATH_PROTOCOL Header
;
507 UINT8 VendorDefinedData
[1];
508 } VENDOR_DEVICE_PATH_WITH_DATA
;
511 EFI_DEVICE_PATH_PROTOCOL Header
;
512 UINT16 NetworkProtocol
;
515 UINT16 TargetPortalGroupTag
;
516 CHAR16 TargetName
[1];
517 } ISCSI_DEVICE_PATH_WITH_NAME
;
520 // BBS support macros and functions
523 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
524 #define REFRESH_LEGACY_BOOT_OPTIONS \
525 BdsDeleteAllInvalidLegacyBootOptions ();\
526 BdsAddNonExistingLegacyBootOptions (); \
527 BdsUpdateLegacyDevOrder ()
529 #define REFRESH_LEGACY_BOOT_OPTIONS
533 Delete all the invalid legacy boot options.
535 @retval EFI_SUCCESS All invalid legacy boot options are deleted.
536 @retval EFI_OUT_OF_RESOURCES Failed to allocate necessary memory.
537 @retval EFI_NOT_FOUND Failed to retrieve variable of boot order.
541 BdsDeleteAllInvalidLegacyBootOptions (
546 Add the legacy boot options from BBS table if they do not exist.
548 @retval EFI_SUCCESS The boot options were added successfully,
549 or they are already in boot options.
550 @retval EFI_NOT_FOUND No legacy boot options is found.
551 @retval EFI_OUT_OF_RESOURCE No enough memory.
552 @return Other value LegacyBoot options are not added.
555 BdsAddNonExistingLegacyBootOptions (
560 Add the legacy boot devices from BBS table into
561 the legacy device boot order.
563 @retval EFI_SUCCESS The boot devices were added successfully.
564 @retval EFI_NOT_FOUND The legacy boot devices are not found.
565 @retval EFI_OUT_OF_RESOURCES Memory or storage is not enough.
566 @retval EFI_DEVICE_ERROR Failed to add the legacy device boot order into EFI variable
567 because of a hardware error.
571 BdsUpdateLegacyDevOrder (
576 Refresh the boot priority for BBS entries based on boot option entry and boot order.
578 @param Entry The boot option is to be checked for a refreshed BBS table.
580 @retval EFI_SUCCESS The boot priority for BBS entries refreshed successfully.
581 @retval EFI_NOT_FOUND BBS entries can't be found.
582 @retval EFI_OUT_OF_RESOURCES Failed to get the legacy device boot order.
586 BdsRefreshBbsTableForBoot (
587 IN BDS_COMMON_OPTION
*Entry
591 Delete the Boot Option from EFI Variable. The Boot Order Arrray
594 @param OptionNumber The number of Boot options wanting to be deleted.
595 @param BootOrder The Boot Order array.
596 @param BootOrderSize The size of the Boot Order Array.
598 @retval EFI_SUCCESS The Boot Option Variable was found and removed.
599 @retval EFI_UNSUPPORTED The Boot Option Variable store was inaccessible.
600 @retval EFI_NOT_FOUND The Boot Option Variable was not found.
603 BdsDeleteBootOption (
604 IN UINTN OptionNumber
,
605 IN OUT UINT16
*BootOrder
,
606 IN OUT UINTN
*BootOrderSize
610 //The interface functions related to the Setup Browser Reset Reminder feature
613 Enable the setup browser reset reminder feature.
614 This routine is used in a platform tip. If the platform policy needs the feature, use the routine to enable it.
619 EnableResetReminderFeature (
624 Disable the setup browser reset reminder feature.
625 This routine is used in a platform tip. If the platform policy does not want the feature, use the routine to disable it.
630 DisableResetReminderFeature (
635 Record the info that a reset is required.
636 A module boolean variable is used to record whether a reset is required.
641 EnableResetRequired (
647 Record the info that no reset is required.
648 A module boolean variable is used to record whether a reset is required.
653 DisableResetRequired (
658 Check whether platform policy enables the reset reminder feature. The default is enabled.
663 IsResetReminderFeatureEnable (
668 Check if the user changed any option setting that needs a system reset to be effective.
678 Check whether a reset is needed, and finish the reset reminder feature.
679 If a reset is needed, pop up a menu to notice user, and finish the feature
680 according to the user selection.
691 /// Define the boot type with which to classify the boot option type.
692 /// Different boot option types could have different boot behaviors.
693 /// Use their device path node (Type + SubType) as the type value.
694 /// The boot type here can be added according to requirements.
698 /// ACPI boot type. For ACPI devices, using sub-types to distinguish devices is not allowed, so hardcode their values.
700 #define BDS_EFI_ACPI_FLOPPY_BOOT 0x0201
702 /// Message boot type
703 /// If a device path of boot option only points to a message node, the boot option is a message boot type.
705 #define BDS_EFI_MESSAGE_ATAPI_BOOT 0x0301 // Type 03; Sub-Type 01
706 #define BDS_EFI_MESSAGE_SCSI_BOOT 0x0302 // Type 03; Sub-Type 02
707 #define BDS_EFI_MESSAGE_USB_DEVICE_BOOT 0x0305 // Type 03; Sub-Type 05
708 #define BDS_EFI_MESSAGE_SATA_BOOT 0x0312 // Type 03; Sub-Type 18
709 #define BDS_EFI_MESSAGE_MAC_BOOT 0x030b // Type 03; Sub-Type 11
710 #define BDS_EFI_MESSAGE_MISC_BOOT 0x03FF
714 /// If a device path of boot option contains a media node, the boot option is media boot type.
716 #define BDS_EFI_MEDIA_HD_BOOT 0x0401 // Type 04; Sub-Type 01
717 #define BDS_EFI_MEDIA_CDROM_BOOT 0x0402 // Type 04; Sub-Type 02
720 /// If a device path of boot option contains a BBS node, the boot option is BBS boot type.
722 #define BDS_LEGACY_BBS_BOOT 0x0501 // Type 05; Sub-Type 01
724 #define BDS_EFI_UNSUPPORT 0xFFFF
727 Check whether an instance in BlockIoDevicePath has the same partition node as the HardDriveDevicePath device path.
729 @param BlockIoDevicePath Multi device path instances to check.
730 @param HardDriveDevicePath A device path starting with a hard drive media
733 @retval TRUE There is a matched device path instance.
734 @retval FALSE There is no matched device path instance.
739 MatchPartitionDevicePathNode (
740 IN EFI_DEVICE_PATH_PROTOCOL
*BlockIoDevicePath
,
741 IN HARDDRIVE_DEVICE_PATH
*HardDriveDevicePath
746 Expand a device path that starts with a hard drive media device path node to be a
747 full device path that includes the full hardware path to the device. This function enables the device to boot.
748 To avoid requiring a connect on every boot, the front match is saved in a variable (the part point
749 to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ).
750 All successful history device paths
751 that point to the front part of the partition node will be saved.
753 @param HardDriveDevicePath EFI Device Path to boot, if it starts with a hard
754 drive media device path.
755 @return A Pointer to the full device path, or NULL if a valid Hard Drive devic path
759 EFI_DEVICE_PATH_PROTOCOL
*
761 BdsExpandPartitionPartialDevicePathToFull (
762 IN HARDDRIVE_DEVICE_PATH
*HardDriveDevicePath
766 Return the bootable media handle.
767 First, check whether the device is connected.
768 Second, check whether the device path points to a device that supports SimpleFileSystemProtocol.
769 Third, detect the the default boot file in the Media, and return the removable Media handle.
771 @param DevicePath The Device Path to a bootable device.
773 @return The bootable media handle. If the media on the DevicePath is not bootable, NULL will return.
778 BdsLibGetBootableHandle (
779 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
784 Checks whether the Device path in a boot option points to a valid bootable device, and if the device
785 is ready to boot now.
787 @param DevPath The Device path in a boot option.
788 @param CheckMedia If TRUE, check whether the device is ready to boot now.
790 @retval TRUE The Device path is valid.
791 @retval FALSE The Device path is invalid.
796 BdsLibIsValidEFIBootOptDevicePath (
797 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
,
798 IN BOOLEAN CheckMedia
802 Checks whether the Device path in a boot option points to a valid bootable device, and if the device
803 is ready to boot now.
804 If Description is not NULL and the device path points to a fixed BlockIo
805 device, this function checks whether the description conflicts with other auto-created
808 @param DevPath The Device path in a boot option.
809 @param CheckMedia If TRUE, checks if the device is ready to boot now.
810 @param Description The description of a boot option.
812 @retval TRUE The Device path is valid.
813 @retval FALSE The Device path is invalid.
818 BdsLibIsValidEFIBootOptDevicePathExt (
819 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
,
820 IN BOOLEAN CheckMedia
,
821 IN CHAR16
*Description
825 For a bootable Device path, return its boot type.
827 @param DevicePath The bootable device Path to check.
829 @retval BDS_EFI_MEDIA_HD_BOOT The given device path contains MEDIA_DEVICE_PATH type device path node,
830 whose subtype is MEDIA_HARDDRIVE_DP.
831 @retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node,
832 whose subtype is MEDIA_CDROM_DP.
833 @retval BDS_EFI_ACPI_FLOPPY_BOOT A given device path contains ACPI_DEVICE_PATH type device path node,
834 whose HID is floppy device.
835 @retval BDS_EFI_MESSAGE_ATAPI_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node,
836 and its last device path node's subtype is MSG_ATAPI_DP.
837 @retval BDS_EFI_MESSAGE_SCSI_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node,
838 and its last device path node's subtype is MSG_SCSI_DP.
839 @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node,
840 and its last device path node's subtype is MSG_USB_DP.
841 @retval BDS_EFI_MESSAGE_MISC_BOOT The device path does not contain any media device path node, and
842 its last device path node points to a message device path node.
843 @retval BDS_LEGACY_BBS_BOOT A given device path contains BBS_DEVICE_PATH type device path node.
844 @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path does not point to a media and message device.
849 BdsGetBootTypeFromDevicePath (
850 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
855 This routine registers a function to adjust the different types of memory page numbers
856 just before booting, and saves the updated info into the variable for the next boot to use.
861 BdsLibSaveMemoryTypeInformation (
866 Identify a user and, if authenticated, returns the current user profile handle.
868 @param[out] User Points to the user profile handle.
870 @retval EFI_SUCCESS The user is successfully identified, or user identification
872 @retval EFI_ACCESS_DENIED The user was not successfully identified.
877 // BdsLibUserIdentify (
878 // OUT EFI_USER_PROFILE_HANDLE *User
882 This function checks if a Fv file device path is valid, according to a file GUID. If it is invalid,
883 it tries to return the valid device path.
884 FV address maybe changes for memory layout adjust from time to time, use this funciton
885 could promise the Fv file device path is right.
887 @param DevicePath On input, the Fv file device path to check. On
888 output, the updated valid Fv file device path
889 @param FileGuid the Fv file GUID.
891 @retval EFI_INVALID_PARAMETER The input DevicePath or FileGuid is invalid.
892 @retval EFI_UNSUPPORTED The input DevicePath does not contain an Fv file
894 @retval EFI_ALREADY_STARTED The input DevicePath has pointed to the Fv file and is
896 @retval EFI_SUCCESS Successfully updated the invalid DevicePath
897 and returned the updated device path in DevicePath.
902 BdsLibUpdateFvFileDevicePath (
903 IN OUT EFI_DEVICE_PATH_PROTOCOL
** DevicePath
,
904 IN EFI_GUID
*FileGuid
909 Connect the specific USB device that matches the RemainingDevicePath,
910 and whose bus is determined by Host Controller (Uhci or Ehci).
912 @param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci and ehci
914 @param RemainingDevicePath A short-form device path that starts with the first
915 element being a USB WWID or a USB Class device
918 @retval EFI_SUCCESS The specific Usb device is connected successfully.
919 @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF)
920 or RemainingDevicePath is not the USB class device path.
921 @retval EFI_NOT_FOUND The device specified by device path is not found.
926 BdsLibConnectUsbDevByShortFormDP(
927 IN UINT8 HostControllerPI
,
928 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
933 // The implementation of this function is provided by Platform code.
936 Convert Vendor device path to a device name.
938 @param Str The buffer storing device name.
939 @param DevPath The pointer to vendor device path.
944 IN OUT POOL_PRINT
*Str
,
949 Concatenates a formatted unicode string to an allocated pool.
950 The caller must free the resulting buffer.
952 @param Str Tracks the allocated pool, size in use, and amount of pool allocated.
953 @param Fmt The format string.
954 @param ... The data will be printed.
956 @return Allocated buffer with the formatted string printed in it.
957 The caller must free the allocated buffer.
958 The buffer allocation is not packed.
965 IN OUT POOL_PRINT
*Str
,
971 Use SystemTable ConOut to stop video based Simple Text Out consoles from going
972 to the video device. Put up LogoFile on every video device that is a console.
974 @param[in] LogoFile The file name of logo to display on the center of the screen.
976 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
977 @retval EFI_UNSUPPORTED Logo not found.
983 IN EFI_GUID
*LogoFile
988 Use SystemTable ConOut to turn on video based Simple Text Out consoles. The
989 Simple Text Out screens will now be synced up with all non-video output devices.
991 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.