Committing changes to the comments, to improve code documentation.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8840 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
pkandel 2009-07-09 12:01:01 +00:00
parent 6d1824fc6e
commit 3d8bd97c27
1 changed files with 123 additions and 164 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Generic BDS library defines general interfaces for BDS driver including: Generic BDS library defines general interfaces for BDS driver including:
1) BDS boot policy interface; 1) BDS boot policy interface
2) BDS boot device connect interface; 2) BDS boot device connect interface
3) BDS Misc interfaces for mainting boot variable, ouput string. 3) BDS Misc interfaces for mainting boot variable, ouput string.
Copyright (c) 2004 - 2009, Intel Corporation. <BR> Copyright (c) 2004 - 2009, Intel Corporation. <BR>
@ -57,7 +57,7 @@ extern EFI_HANDLE mBdsImageHandle;
#define IS_LOAD_OPTION_TYPE(_c, _Mask) (BOOLEAN) (((_c) & (_Mask)) != 0) #define IS_LOAD_OPTION_TYPE(_c, _Mask) (BOOLEAN) (((_c) & (_Mask)) != 0)
/// ///
/// Define Maxmim characters that will be accepted /// Define Maximum characters that will be accepted
/// ///
#define MAX_CHAR 480 #define MAX_CHAR 480
#define MAX_CHAR_SIZE (MAX_CHAR * 2) #define MAX_CHAR_SIZE (MAX_CHAR * 2)
@ -112,15 +112,15 @@ BdsLibBootNext (
Process the boot option follow the UEFI specification and Process the boot option follow the UEFI specification and
special treat the legacy boot option with BBS_DEVICE_PATH. special treat the legacy boot option with BBS_DEVICE_PATH.
@param Option The boot option need to be processed @param Option The boot option to be processed
@param DevicePath The device path which describe where to load the @param DevicePath The device path describing where to load the
boot image or the legcy BBS device path to boot boot image or the legcy BBS device path to boot
the legacy OS the legacy OS
@param ExitDataSize The size of exit data. @param ExitDataSize The size of exit data.
@param ExitData Data returned when Boot image failed. @param ExitData Data returned when Boot image failed.
@retval EFI_SUCCESS Boot from the input boot option successfully. @retval EFI_SUCCESS Boot from the input boot option succeeded.
@retval EFI_NOT_FOUND If the Device Path is not found in the system @retval EFI_NOT_FOUND The Device Path is not found in the system
**/ **/
EFI_STATUS EFI_STATUS
@ -134,25 +134,29 @@ BdsLibBootViaBootOption (
/** /**
For EFI boot option, BDS separate them as six types: This function will enumerate all possible boot devices in the system, and
automatically create boot options for Network, Shell, Removable BlockIo,
and Non-BlockIo Simplefile devices.
BDS separates EFI boot options into six types:
1. Network - The boot option points to the SimpleNetworkProtocol device. 1. Network - The boot option points to the SimpleNetworkProtocol device.
Bds will try to automatically create this type boot option when enumerate. Bds will try to automatically create this type of boot option during enumeration.
2. Shell - The boot option points to internal flash shell. 2. Shell - The boot option points to internal flash shell.
Bds will try to automatically create this type boot option when enumerate. Bds will try to automatically create this type of boot option during enumeration.
3. Removable BlockIo - The boot option only points to the removable media 3. Removable BlockIo - The boot option points to a removable media
device, like USB flash disk, DVD, Floppy etc. device, such as a USB flash drive or DVD drive.
These device should contain a *removable* blockIo These devices should contain a *removable* blockIo
protocol in their device handle. protocol in their device handle.
Bds will try to automatically create this type boot option Bds will try to automatically create this type boot option
when enumerate. when enumerate.
4. Fixed BlockIo - The boot option only points to a Fixed blockIo device, 4. Fixed BlockIo - The boot option points to a Fixed blockIo device,
like HardDisk. such as a hard disk.
These device should contain a *fixed* blockIo These devices should contain a *fixed* blockIo
protocol in their device handle. protocol in their device handle.
BDS will skip fixed blockIo devices, and NOT BDS will skip fixed blockIo devices, and not
automatically create boot option for them. But BDS automatically create boot option for them. But BDS
will help to delete those fixed blockIo boot option, will help to delete those fixed blockIo boot options,
whose description rule conflict with other auto-created whose description rules conflict with other auto-created
boot options. boot options.
5. Non-BlockIo Simplefile - The boot option points to a device whose handle 5. Non-BlockIo Simplefile - The boot option points to a device whose handle
has SimpleFileSystem Protocol, but has no blockio has SimpleFileSystem Protocol, but has no blockio
@ -161,19 +165,19 @@ BdsLibBootViaBootOption (
\EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem \EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem
Protocol. Protocol.
6. File - The boot option points to a file. These boot options are usually 6. File - The boot option points to a file. These boot options are usually
created by user manually or OS loader. BDS will not delete or modify created by the user, either manually or with an OS loader. BDS will not delete or modify
these boot options. these boot options.
This function will enumerate all possible boot device in the system, and This function will enumerate all possible boot devices in the system, and
automatically create boot options for Network, Shell, Removable BlockIo, automatically create boot options for Network, Shell, Removable BlockIo,
and Non-BlockIo Simplefile devices. and Non-BlockIo Simplefile devices.
It will only excute once of every boot. It will excute once every boot.
@param BdsBootOptionList The header of the link list which indexed all @param BdsBootOptionList The header of the linked list that indexed all
current boot options current boot options
@retval EFI_SUCCESS Finished all the boot device enumerate and create @retval EFI_SUCCESS Finished all the boot device enumerations and created
the boot option base on that boot device the boot option based on the boot device
@retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and create the boot option list @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and create the boot option list
**/ **/
@ -186,7 +190,7 @@ BdsLibEnumerateAllBootOption (
/** /**
Build the boot option with the handle parsed in Build the boot option with the handle parsed in
@param Handle The handle which present the device path to create @param Handle The handle representing the device path for which to create
boot option boot option
@param BdsBootOptionList The header of the link list which indexed all @param BdsBootOptionList The header of the link list which indexed all
current boot options current boot options
@ -237,8 +241,8 @@ BdsLibGetBootMode (
/** /**
The function will go through the driver optoin link list, load and start The function will go through the driver option link list, and then load and start
every driver the driver optoin device path point to. every driver to which the driver option device path points.
@param BdsDriverLists The header of the current driver option link list @param BdsDriverLists The header of the current driver option link list
@ -251,15 +255,11 @@ BdsLibLoadDrivers (
/** /**
Process BootOrder, or DriverOrder variables, by calling This function processes BootOrder or DriverOrder variables, by calling
BdsLibVariableToOption () for each UINT16 in the variables. BdsLibVariableToOption () for each UINT16 in the variables.
@param BdsCommonOptionList The header of the option list base on variable VariableName. @param BdsCommonOptionList The header of the option list base on variable VariableName. @param VariableName EFI Variable name indicate the BootOrder or DriverOrder.
@param VariableName EFI Variable name indicate the BootOrder or DriverOrder. @retval EFI_SUCCESS Successfully created the boot option or driver option list @retval EFI_OUT_OF_RESOURCES Failed to get the boot option or driver option list**/
@retval EFI_SUCCESS Success create the boot option or driver option list.
@retval EFI_OUT_OF_RESOURCES Failed to get the boot option or driver option list.
**/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
BdsLibBuildOptionFromVar ( BdsLibBuildOptionFromVar (
@ -268,8 +268,8 @@ BdsLibBuildOptionFromVar (
); );
/** /**
Read the EFI variable (VendorGuid/Name) and return a dynamically allocated This function reads the EFI variable (VendorGuid/Name) and returns a dynamically allocated
buffer, and the size of the buffer. If failure return NULL. buffer and the size of the buffer. If failure, return NULL.
@param Name String part of EFI variable name @param Name String part of EFI variable name
@param VendorGuid GUID part of EFI variable name @param VendorGuid GUID part of EFI variable name
@ -308,15 +308,15 @@ BdsLibOutputStrings (
); );
/** /**
Build the boot#### or driver#### option from the VariableName, the Build the boot#### or driver#### option from the VariableName. The
build boot#### or driver#### will also be linked to BdsCommonOptionList. build boot#### or driver#### will also be linked to BdsCommonOptionList.
@param BdsCommonOptionList The header of the boot#### or driver#### option @param BdsCommonOptionList The header of the boot#### or driver#### option
link list link list
@param VariableName EFI Variable name indicate if it is boot#### or @param VariableName EFI Variable name, indicates if it is boot#### or
driver#### driver####
@retval BDS_COMMON_OPTION Get the option just been created @retval BDS_COMMON_OPTION The option that was created
@retval NULL Failed to get the new option @retval NULL Failed to get the new option
**/ **/
@ -328,7 +328,7 @@ BdsLibVariableToOption (
); );
/** /**
This function will register the new boot#### or driver#### option base on This function registers the new boot#### or driver#### option based on
the VariableName. The new registered boot#### or driver#### will be linked the VariableName. The new registered boot#### or driver#### will be linked
to BdsOptionList and also update to the VariableName. After the boot#### or to BdsOptionList and also update to the VariableName. After the boot#### or
driver#### updated, the BootOrder or DriverOrder will also be updated. driver#### updated, the BootOrder or DriverOrder will also be updated.
@ -354,13 +354,10 @@ BdsLibRegisterNewOption (
); );
// //
// Bds connect or disconnect driver lib funcion // Bds connect and disconnect driver lib funcions
// //
/** /**
Connects all drivers to all controllers. This function connects all system drivers with the corresponding controllers.
This function make sure all the current system driver will manage
the correspoinding controllers if have. And at the same time, make
sure all the system controllers have driver to manage it if have.
**/ **/
VOID VOID
@ -370,10 +367,7 @@ BdsLibConnectAllDriversToAllControllers (
); );
/** /**
This function will connect all the system driver to controller This function connects all system drivers to controllers.
first, and then special connect the default console, this make
sure all the system controller available and the platform default
console connected.
**/ **/
VOID VOID
@ -383,19 +377,17 @@ BdsLibConnectAll (
); );
/** /**
This function will create all handles associate with every device This function creates all handles associated with every device
path node. If the handle associate with one device path node can not path node. If the handle associated with one device path node can not
be created success, then still give one chance to do the dispatch, be created, then it tries to execute the dispatch to load the missing drivers.
which load the missing drivers if possible.
@param DevicePathToConnect The device path which will be connected, it can be @param DevicePathToConnect The device path to be connected. Can be
a multi-instance device path a multi-instance device path
@retval EFI_SUCCESS All handles associate with every device path node @retval EFI_SUCCESS All handles associates with every device path node
have been created were created
@retval EFI_OUT_OF_RESOURCES There is no resource to create new handles @retval EFI_OUT_OF_RESOURCES Not enough resources to create new handles
@retval EFI_NOT_FOUND Create the handle associate with one device path @retval EFI_NOT_FOUND At least one handle could not be created
node failed
**/ **/
EFI_STATUS EFI_STATUS
@ -405,15 +397,8 @@ BdsLibConnectDevicePath (
); );
/** /**
This function will connect all current system handles recursively. This function will connect all current system handles recursively. gBS->ConnectController() service is invoked for each handle exist in system handler buffer. If the handle is bus type handler, all childrens also will be connected recursively by gBS->ConnectController().
@retval EFI_SUCCESS All handles and child handles have been connected @retval EFI_STATUS Return the status of gBS->LocateHandleBuffer().
gBS->ConnectController() service is invoked for each handle exist in system handler buffer.
If the handle is bus type handler, all childrens also will be connected recursively
by gBS->ConnectController().
@retval EFI_SUCCESS All handles and it's child handle have been connected
@retval EFI_STATUS Error status returned by of gBS->LocateHandleBuffer().
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -422,12 +407,7 @@ BdsLibConnectAllEfi (
); );
/** /**
This function will disconnect all current system handles. This function will disconnect all current system handles. gBS->DisconnectController() is invoked for each handle exists in system handle buffer. If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController().
gBS->DisconnectController() is invoked for each handle exists in system handle buffer.
If handle is a bus type handle, all childrens also are disconnected recursively by
gBS->DisconnectController().
@retval EFI_SUCCESS All handles have been disconnected @retval EFI_SUCCESS All handles have been disconnected
@retval EFI_STATUS Error status returned by of gBS->LocateHandleBuffer(). @retval EFI_STATUS Error status returned by of gBS->LocateHandleBuffer().
@ -442,7 +422,7 @@ BdsLibDisconnectAllEfi (
// Bds console related lib functions // Bds console related lib functions
// //
/** /**
This function will search every simpletxt devive in current system, This function will search every simpletxt device in the current system,
and make every simpletxt device as pertantial console device. and make every simpletxt device as pertantial console device.
**/ **/
@ -454,11 +434,11 @@ BdsLibConnectAllConsoles (
/** /**
This function will connect console device base on the console This function will connect console device based on the console
device variable ConIn, ConOut and ErrOut. device variable ConIn, ConOut and ErrOut.
@retval EFI_SUCCESS At least one of the ConIn and ConOut device have @retval EFI_SUCCESS At least one of the ConIn and ConOut devices have
been connected success. been connected.
@retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable (). @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
**/ **/
@ -469,20 +449,18 @@ BdsLibConnectAllDefaultConsoles (
); );
/** /**
This function update console variable based on ConVarName, it can This function updates the console variable based on ConVarName. It can
add or remove one specific console device path from the variable add or remove one specific console device path from the variable
@param ConVarName Console related variable name, ConIn, ConOut, @param ConVarName Console-related variable name: ConIn, ConOut,
ErrOut. ErrOut.
@param CustomizedConDevicePath The console device path which will be added to @param CustomizedConDevicePath The console device path to be added to
the console variable ConVarName, this parameter the console variable ConVarName. Can not be multi-instance.
can not be multi-instance. @param ExclusiveDevicePath The console device path to be removed
@param ExclusiveDevicePath The console device path which will be removed from the console variable ConVarName. Can not be multi-instance.
from the console variable ConVarName, this
parameter can not be multi-instance.
@retval EFI_UNSUPPORTED The added device path is same to the removed one. @retval EFI_UNSUPPORTED The added device path is the same as a removed one.
@retval EFI_SUCCESS Success add or remove the device path from the @retval EFI_SUCCESS Successfully added or removed the device path from the
console variable. console variable.
**/ **/
@ -495,18 +473,17 @@ BdsLibUpdateConsoleVariable (
); );
/** /**
Connect the console device base on the variable ConVarName, if Connect the console device base on the variable ConVarName. If
device path of the ConVarName is multi-instance device path, if ConVarName is a multi-instance device path, and at least one
anyone of the instances is connected success, then this function instance connects successfully, then this function
will return success. will return success.
@param ConVarName Console related variable name, ConIn, ConOut, @param ConVarName Console related variable name, ConIn, ConOut,
ErrOut. ErrOut.
@retval EFI_NOT_FOUND There is not any console devices connected @retval EFI_NOT_FOUND No console devices were connected successfully
success @retval EFI_SUCCESS Connected at least one instance of the console
@retval EFI_SUCCESS Success connect any one instance of the console device path based on the variable ConVarName.
device path base on the variable ConVarName.
**/ **/
EFI_STATUS EFI_STATUS
@ -519,15 +496,15 @@ BdsLibConnectConsoleVariable (
// Bds device path related lib functions // Bds device path related lib functions
// //
/** /**
Delete the instance in Multi which matches partly with Single instance Delete the instance in Multi that overlaps with Single
@param Multi A pointer to a multi-instance device path data @param Multi A pointer to a multi-instance device path data
structure. structure.
@param Single A pointer to a single-instance device path data @param Single A pointer to a single-instance device path data
structure. structure.
@return This function will remove the device path instances in Multi which partly @return This function removes the device path instances in Multi that overlap
match with the Single, and return the result device path. If there is no Single, and returns the resulting device path. If there is no
remaining device path as a result, this function will return NULL. remaining device path as a result, this function will return NULL.
**/ **/
@ -548,7 +525,7 @@ BdsLibDelPartMatchInstance (
structure. structure.
@retval TRUE If the Single device path is contained within Multi device path. @retval TRUE If the Single device path is contained within Multi device path.
@retval FALSE The Single device path is not match within Multi device path. @retval FALSE The Single device path is not contained within Multi device path.
**/ **/
BOOLEAN BOOLEAN
@ -646,7 +623,7 @@ ShadowAllOptionRom (
@retval EFI_SUCCESS All invalide legacy boot options are deleted. @retval EFI_SUCCESS All invalide legacy boot options are deleted.
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory. @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.
@retval EFI_NOT_FOUND Fail to retrive variable of boot order. @retval EFI_NOT_FOUND Fail to retrieve variable of boot order.
**/ **/
EFI_STATUS EFI_STATUS
@ -722,11 +699,11 @@ BdsDeleteBootOption (
); );
// //
//The interface functions relate with Setup Browser Reset Reminder feature //The interface functions related to the Setup Browser Reset Reminder feature
// //
/** /**
Enable the setup browser reset reminder feature. Enable the setup browser reset reminder feature.
This routine is used in platform tip. If the platform policy need the feature, use the routine to enable it. This routine is used in platform tip. If the platform policy needs the feature, use the routine to enable it.
**/ **/
VOID VOID
@ -737,7 +714,7 @@ EnableResetReminderFeature (
/** /**
Disable the setup browser reset reminder feature. Disable the setup browser reset reminder feature.
This routine is used in platform tip. If the platform policy do not want the feature, use the routine to disable it. This routine is used in platform tip. If the platform policy does not want the feature, use the routine to disable it.
**/ **/
VOID VOID
@ -770,7 +747,7 @@ DisableResetRequired (
); );
/** /**
Check whether platform policy enable the reset reminder feature. The default is enabled. Check whether platform policy enables the reset reminder feature. The default is enabled.
**/ **/
BOOLEAN BOOLEAN
@ -780,7 +757,7 @@ IsResetReminderFeatureEnable (
); );
/** /**
Check if user changed any option setting which needs a system reset to be effective. Check if the user changed any option setting that needs a system reset to be effective.
**/ **/
BOOLEAN BOOLEAN
@ -791,7 +768,7 @@ IsResetRequired (
/** /**
Check whether a reset is needed, and finish the reset reminder feature. Check whether a reset is needed, and finish the reset reminder feature.
If a reset is needed, Popup a menu to notice user, and finish the feature If a reset is needed, pop up a menu to notice user, and finish the feature
according to the user selection. according to the user selection.
**/ **/
@ -861,11 +838,10 @@ SetupResetReminder (
#define PCI_CLASSC_PI_EHCI 0x20 #define PCI_CLASSC_PI_EHCI 0x20
/** /**
Check whether there is a instance in BlockIoDevicePath, which contain multi device path Check whether an instance in BlockIoDevicePath has the same partition node as the HardDriveDevicePath device path
instances, has the same partition node with HardDriveDevicePath device path
@param BlockIoDevicePath Multi device path instances which need to check @param BlockIoDevicePath Multi device path instances to check
@param HardDriveDevicePath A device path which starts with a hard drive media @param HardDriveDevicePath A device path starting with a hard drive media
device path. device path.
@retval TRUE There is a matched device path instance. @retval TRUE There is a matched device path instance.
@ -902,8 +878,8 @@ BdsExpandPartitionPartialDevicePathToFull (
/** /**
Return the bootable media handle. Return the bootable media handle.
First, check the device is connected First, check whether the device is connected.
Second, check whether the device path point to a device which support SimpleFileSystemProtocol, Second, check whether the device path points to a device that supports SimpleFileSystemProtocol.
Third, detect the the default boot file in the Media, and return the removable Media handle. Third, detect the the default boot file in the Media, and return the removable Media handle.
@param DevicePath Device Path to a bootable device @param DevicePath Device Path to a bootable device
@ -919,14 +895,14 @@ BdsLibGetBootableHandle (
/** /**
Check whether the Device path in a boot option point to a valide bootable device, Checks whether the Device path in a boot option points to a valid bootable device, and if the device
And if CheckMedia is true, check the device is ready to boot now. is ready to boot now.
@param DevPath the Device path in a boot option @param DevPath the Device path in a boot option
@param CheckMedia if true, check the device is ready to boot now. @param CheckMedia if true, check whether the device is ready to boot now.
@retval TRUE the Device path is valide @retval TRUE the Device path is valid
@retval FALSE the Device path is invalide . @retval FALSE the Device path is invalid
**/ **/
BOOLEAN BOOLEAN
@ -937,18 +913,18 @@ BdsLibIsValidEFIBootOptDevicePath (
); );
/** /**
Check whether the Device path in a boot option point to a valid bootable device, Checks whether the Device path in a boot option points to a valid bootable device, and if the device
And if CheckMedia is true, check the device is ready to boot now. is ready to boot now.
If Description is not NULL and the device path point to a fixed BlockIo If Description is not NULL and the device path points to a fixed BlockIo
device, check the description whether conflict with other auto-created device, this function checks whether the description conflicts with other auto-created
boot options. boot options.
@param DevPath the Device path in a boot option @param DevPath the Device path in a boot option
@param CheckMedia if true, check the device is ready to boot now. @param CheckMedia if true, checks if the device is ready to boot now.
@param Description the description in a boot option @param Description the description of a boot option
@retval TRUE the Device path is valid @retval TRUE the Device path is valid
@retval FALSE the Device path is invalid . @retval FALSE the Device path is invalid
**/ **/
BOOLEAN BOOLEAN
@ -964,23 +940,7 @@ BdsLibIsValidEFIBootOptDevicePathExt (
@param DevicePath The bootable device Path to check @param DevicePath The bootable device Path to check
@retval BDS_EFI_MEDIA_HD_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node @retval BDS_EFI_MEDIA_HD_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node which subtype is MEDIA_HARDDRIVE_DP @retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node which subtype is MEDIA_CDROM_DP @retval BDS_EFI_ACPI_FLOPPY_BOOT If given device path contains ACPI_DEVICE_PATH type device path node which HID is floppy device. @retval BDS_EFI_MESSAGE_ATAPI_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node and its last device path node's subtype is MSG_ATAPI_DP. @retval BDS_EFI_MESSAGE_SCSI_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node and its last device path node's subtype is MSG_SCSI_DP. @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node and its last device path node's subtype is MSG_USB_DP. @retval BDS_EFI_MESSAGE_MISC_BOOT If the device path not contains any media device path node, and its last device path node point to a message device path node. @retval BDS_LEGACY_BBS_BOOT If given device path contains BBS_DEVICE_PATH type device path node. @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path not point to a media and message device,
which subtype is MEDIA_HARDDRIVE_DP
@retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node
which subtype is MEDIA_CDROM_DP
@retval BDS_EFI_ACPI_FLOPPY_BOOT If given device path contains ACPI_DEVICE_PATH type device path node
which HID is floppy device.
@retval BDS_EFI_MESSAGE_ATAPI_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node
and its last device path node's subtype is MSG_ATAPI_DP.
@retval BDS_EFI_MESSAGE_SCSI_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node
and its last device path node's subtype is MSG_SCSI_DP.
@retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT If given device path contains MESSAGING_DEVICE_PATH type device path node
and its last device path node's subtype is MSG_USB_DP.
@retval BDS_EFI_MESSAGE_MISC_BOOT If the device path not contains any media device path node, and
its last device path node point to a message device path node.
@retval BDS_LEGACY_BBS_BOOT If given device path contains BBS_DEVICE_PATH type device path node.
@retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path not point to a media and message device,
**/ **/
UINT32 UINT32
EFIAPI EFIAPI
@ -990,8 +950,8 @@ BdsGetBootTypeFromDevicePath (
/** /**
This routine register a function to adjust the different type memory page number This routine registers a function to adjust the different types of memory page numbers
just before booting and save the updated info into the variable for next boot to use. just before booting, and saves the updated info into the variable for the next boot to use.
**/ **/
VOID VOID
@ -1002,23 +962,22 @@ BdsLibSaveMemoryTypeInformation (
/** /**
According to a file guild, check a Fv file device path is valid. If it is invalid, This function checks if a Fv file device path is valid, according to a file GUID. If it is invalid,
try to return the valid device path. it tries to return the valid device path.
FV address maybe changes for memory layout adjust from time to time, use this funciton FV address maybe changes for memory layout adjust from time to time, use this funciton
could promise the Fv file device path is right. could promise the Fv file device path is right.
@param DevicePath on input, the Fv file device path need to check on @param DevicePath on input, the Fv file device path to check. On
output, the updated valid Fv file device path output, the updated valid Fv file device path
@param FileGuid the Fv file guild @param FileGuid the Fv file GUID
@retval EFI_INVALID_PARAMETER the input DevicePath or FileGuid is invalid @retval EFI_INVALID_PARAMETER the input DevicePath or FileGuid is invalid
parameter @retval EFI_UNSUPPORTED the input DevicePath does not contain an Fv file
@retval EFI_UNSUPPORTED the input DevicePath does not contain Fv file GUID at all
guild at all @retval EFI_ALREADY_STARTED the input DevicePath has pointed to the Fv file and is
@retval EFI_ALREADY_STARTED the input DevicePath has pointed to Fv file, it is
valid valid
@retval EFI_SUCCESS has successfully updated the invalid DevicePath, @retval EFI_SUCCESS successfully updated the invalid DevicePath
and return the updated device path in DevicePath and returned the updated device path in DevicePath
**/ **/
EFI_STATUS EFI_STATUS
@ -1030,7 +989,7 @@ BdsLibUpdateFvFileDevicePath (
/** /**
Connect the specific Usb device which match the short form device path, Connect the specific USB device that matches the RemainingDevicePath,
and whose bus is determined by Host Controller (Uhci or Ehci) and whose bus is determined by Host Controller (Uhci or Ehci)
@param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci and ehci @param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci and ehci
@ -1057,9 +1016,9 @@ BdsLibConnectUsbDevByShortFormDP(
// The implementation of this function is provided by Platform code. // The implementation of this function is provided by Platform code.
// //
/** /**
Convert Vendor device path to device name. Convert Vendor device path to a device name.
@param Str The buffer store device name @param Str The buffer storing device name
@param DevPath Pointer to vendor device path @param DevPath Pointer to vendor device path
**/ **/
@ -1091,8 +1050,8 @@ CatPrint (
); );
/** /**
Use Console Control to turn off UGA based Simple Text Out consoles from going Use Console Control to stop UGA-based Simple Text Out consoles from going
to the UGA device. Put up LogoFile on every UGA device that is a console to the UGA device. Put up LogoFile on every UGA device that is a console.
@param[in] LogoFile File name of logo to display on the center of the screen. @param[in] LogoFile File name of logo to display on the center of the screen.