]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / GenericBdsLib.h
index c338c4d022986e1183464d698589e1e9e9fc0816..c0bb371a9d27707680d4b8150428c618bba907d2 100644 (file)
@@ -4,13 +4,13 @@
     2) BDS boot device connect interface.\r
     3) BDS Misc interfaces for mainting boot variable, ouput string.\r
 \r
     2) BDS boot device connect interface.\r
     3) BDS Misc interfaces for mainting boot variable, ouput string.\r
 \r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -134,51 +134,51 @@ BdsLibBootViaBootOption (
 \r
 /**\r
   This function will enumerate all possible boot devices in the system, and\r
 \r
 /**\r
   This function will enumerate all possible boot devices in the system, and\r
-  automatically create boot options for Network, Shell, Removable BlockIo, \r
-  and Non-BlockIo Simplefile devices. \r
-  \r
+  automatically create boot options for Network, Shell, Removable BlockIo,\r
+  and Non-BlockIo Simplefile devices.\r
+\r
   BDS separates EFI boot options into six types:\r
   BDS separates EFI boot options into six types:\r
-  1. Network - The boot option points to the SimpleNetworkProtocol device. \r
+  1. Network - The boot option points to the SimpleNetworkProtocol device.\r
                Bds will try to automatically create this type of boot option during enumeration.\r
                Bds will try to automatically create this type of boot option during enumeration.\r
-  2. Shell   - The boot option points to internal flash shell. \r
+  2. Shell   - The boot option points to internal flash shell.\r
                Bds will try to automatically create this type of boot option during enumeration.\r
   3. Removable BlockIo      - The boot option points to a removable media\r
                               device, such as a USB flash drive or DVD drive.\r
                               These devices should contain a *removable* blockIo\r
                               protocol in their device handle.\r
                Bds will try to automatically create this type of boot option during enumeration.\r
   3. Removable BlockIo      - The boot option points to a removable media\r
                               device, such as a USB flash drive or DVD drive.\r
                               These devices should contain a *removable* blockIo\r
                               protocol in their device handle.\r
-                              Bds will try to automatically create this type boot option \r
+                              Bds will try to automatically create this type boot option\r
                               when enumerate.\r
                               when enumerate.\r
-  4. Fixed BlockIo          - The boot option points to a Fixed blockIo device, \r
+  4. Fixed BlockIo          - The boot option points to a Fixed blockIo device,\r
                               such as a hard disk.\r
                               These devices should contain a *fixed* blockIo\r
                               protocol in their device handle.\r
                               BDS will skip fixed blockIo devices, and not\r
                               such as a hard disk.\r
                               These devices should contain a *fixed* blockIo\r
                               protocol in their device handle.\r
                               BDS will skip fixed blockIo devices, and not\r
-                              automatically create boot option for them. But BDS \r
-                              will help to delete those fixed blockIo boot options, \r
+                              automatically create boot option for them. But BDS\r
+                              will help to delete those fixed blockIo boot options,\r
                               whose description rules conflict with other auto-created\r
                               boot options.\r
                               whose description rules conflict with other auto-created\r
                               boot options.\r
-  5. Non-BlockIo Simplefile - The boot option points to a device whose handle \r
+  5. Non-BlockIo Simplefile - The boot option points to a device whose handle\r
                               has SimpleFileSystem Protocol, but has no blockio\r
                               protocol. These devices do not offer blockIo\r
                               has SimpleFileSystem Protocol, but has no blockio\r
                               protocol. These devices do not offer blockIo\r
-                              protocol, but BDS still can get the \r
+                              protocol, but BDS still can get the\r
                               \EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem\r
                               Protocol.\r
                               \EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem\r
                               Protocol.\r
-  6. File    - The boot option points to a file. These boot options are usually \r
+  6. File    - The boot option points to a file. These boot options are usually\r
                created by the user, either manually or with an OS loader. BDS will not delete or modify\r
                created by the user, either manually or with an OS loader. BDS will not delete or modify\r
-               these boot options.        \r
-    \r
+               these boot options.\r
+\r
   This function will enumerate all possible boot devices in the system, and\r
   This function will enumerate all possible boot devices in the system, and\r
-  automatically create boot options for Network, Shell, Removable BlockIo, \r
+  automatically create boot options for Network, Shell, Removable BlockIo,\r
   and Non-BlockIo Simplefile devices.\r
   It will execute once every boot.\r
   and Non-BlockIo Simplefile devices.\r
   It will execute once every boot.\r
-  \r
+\r
   @param  BdsBootOptionList      The header of the linked list that indexed all\r
                                  current boot options.\r
 \r
   @param  BdsBootOptionList      The header of the linked list that indexed all\r
                                  current boot options.\r
 \r
-  @retval EFI_SUCCESS            Finished all the boot device enumerations and \r
+  @retval EFI_SUCCESS            Finished all the boot device enumerations and\r
                                  created the boot option based on the boot device.\r
 \r
                                  created the boot option based on the boot device.\r
 \r
-  @retval EFI_OUT_OF_RESOURCES   Failed to enumerate the boot device and create \r
+  @retval EFI_OUT_OF_RESOURCES   Failed to enumerate the boot device and create\r
                                  the boot option list.\r
 **/\r
 EFI_STATUS\r
                                  the boot option list.\r
 **/\r
 EFI_STATUS\r
@@ -190,7 +190,7 @@ BdsLibEnumerateAllBootOption (
 /**\r
   Build the boot option with the handle parsed in.\r
 \r
 /**\r
   Build the boot option with the handle parsed in.\r
 \r
-  @param  Handle                 The handle representing the device path for which \r
+  @param  Handle                 The handle representing the device path for which\r
                                  to create a boot option.\r
   @param  BdsBootOptionList      The header of the link list that indexed all\r
                                  current boot options.\r
                                  to create a boot option.\r
   @param  BdsBootOptionList      The header of the link list that indexed all\r
                                  current boot options.\r
@@ -283,8 +283,8 @@ BdsLibBuildOptionFromVar (
   @param  VendorGuid            The GUID part of the EFI variable name.\r
   @param  VariableSize          Returns the size of the EFI variable that was read.\r
 \r
   @param  VendorGuid            The GUID part of the EFI variable name.\r
   @param  VariableSize          Returns the size of the EFI variable that was read.\r
 \r
-  @return                       Dynamically allocated memory that contains a copy \r
-                                of the EFI variable. The caller is responsible for \r
+  @return                       Dynamically allocated memory that contains a copy\r
+                                of the EFI variable. The caller is responsible for\r
                                 freeing the buffer.\r
   @retval NULL                  The variable was not read.\r
 \r
                                 freeing the buffer.\r
   @retval NULL                  The variable was not read.\r
 \r
@@ -366,7 +366,7 @@ BdsLibRegisterNewOption (
 // Bds connect and disconnect driver lib funcions\r
 //\r
 /**\r
 // Bds connect and disconnect driver lib funcions\r
 //\r
 /**\r
-  This function connects all system drivers with the corresponding controllers. \r
+  This function connects all system drivers with the corresponding controllers.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -407,12 +407,12 @@ BdsLibConnectDevicePath (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  This function will connect all current system handles recursively.     \r
-  gBS->ConnectController() service is invoked for each handle exist in system handler buffer.  \r
+  This function will connect all current system handles recursively.\r
+  gBS->ConnectController() service is invoked for each handle exist in system handler buffer.\r
   If the handle is bus type handler, all childrens also will be connected recursively  by gBS->ConnectController().\r
   If the handle is bus type handler, all childrens also will be connected recursively  by gBS->ConnectController().\r
-  \r
+\r
   @retval EFI_SUCCESS           All handles and child handles have been\r
   @retval EFI_SUCCESS           All handles and child handles have been\r
-                                connected.  \r
+                                connected.\r
   @retval EFI_STATUS            Return the status of gBS->LocateHandleBuffer().\r
 **/\r
 EFI_STATUS\r
   @retval EFI_STATUS            Return the status of gBS->LocateHandleBuffer().\r
 **/\r
 EFI_STATUS\r
@@ -422,10 +422,10 @@ BdsLibConnectAllEfi (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  This function will disconnect all current system handles.     \r
-  gBS->DisconnectController() is invoked for each handle exists in system handle buffer.  \r
+  This function will disconnect all current system handles.\r
+  gBS->DisconnectController() is invoked for each handle exists in system handle buffer.\r
   If handle is a bus type handle, all childrens also are disconnected recursively by  gBS->DisconnectController().\r
   If handle is a bus type handle, all childrens also are disconnected recursively by  gBS->DisconnectController().\r
-  \r
+\r
   @retval EFI_SUCCESS           All handles have been disconnected.\r
   @retval EFI_STATUS            Error status returned by of gBS->LocateHandleBuffer().\r
 \r
   @retval EFI_SUCCESS           All handles have been disconnected.\r
   @retval EFI_STATUS            Error status returned by of gBS->LocateHandleBuffer().\r
 \r
@@ -535,7 +535,7 @@ BdsLibConnectConsoleVariable (
 // Bds device path related lib functions\r
 //\r
 /**\r
 // Bds device path related lib functions\r
 //\r
 /**\r
-  Delete the instance in Multi that overlaps with Single. \r
+  Delete the instance in Multi that overlaps with Single.\r
 \r
   @param  Multi                 A pointer to a multi-instance device path data\r
                                 structure.\r
 \r
   @param  Multi                 A pointer to a multi-instance device path data\r
                                 structure.\r
@@ -563,9 +563,9 @@ BdsLibDelPartMatchInstance (
   @param  Single                A pointer to a single-instance device path data\r
                                 structure.\r
 \r
   @param  Single                A pointer to a single-instance device path data\r
                                 structure.\r
 \r
-  @retval TRUE                  If the Single device path is contained within a \r
+  @retval TRUE                  If the Single device path is contained within a\r
                                 Multi device path.\r
                                 Multi device path.\r
-  @retval FALSE                 The Single device path is not contained within a \r
+  @retval FALSE                 The Single device path is not contained within a\r
                                 Multi device path.\r
 \r
 **/\r
                                 Multi device path.\r
 \r
 **/\r
@@ -657,7 +657,7 @@ BdsDeleteAllInvalidLegacyBootOptions (
 /**\r
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
 /**\r
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
-  @retval EFI_SUCCESS          The boot options were added successfully, \r
+  @retval EFI_SUCCESS          The boot options were added successfully,\r
                                or they are already in boot options.\r
   @retval EFI_NOT_FOUND        No legacy boot options is found.\r
   @retval EFI_OUT_OF_RESOURCE  No enough memory.\r
                                or they are already in boot options.\r
   @retval EFI_NOT_FOUND        No legacy boot options is found.\r
   @retval EFI_OUT_OF_RESOURCE  No enough memory.\r
@@ -670,7 +670,7 @@ BdsAddNonExistingLegacyBootOptions (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Add the legacy boot devices from BBS table into \r
+  Add the legacy boot devices from BBS table into\r
   the legacy device boot order.\r
 \r
   @retval EFI_SUCCESS           The boot devices were added successfully.\r
   the legacy device boot order.\r
 \r
   @retval EFI_SUCCESS           The boot devices were added successfully.\r
@@ -689,7 +689,7 @@ BdsUpdateLegacyDevOrder (
   Refresh the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  Entry             The boot option is to be checked for a refreshed BBS table.\r
   Refresh the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  Entry             The boot option is to be checked for a refreshed BBS table.\r
-  \r
+\r
   @retval EFI_SUCCESS           The boot priority for BBS entries refreshed successfully.\r
   @retval EFI_NOT_FOUND         BBS entries can't be found.\r
   @retval EFI_OUT_OF_RESOURCES  Failed to get the legacy device boot order.\r
   @retval EFI_SUCCESS           The boot priority for BBS entries refreshed successfully.\r
   @retval EFI_NOT_FOUND         BBS entries can't be found.\r
   @retval EFI_OUT_OF_RESOURCES  Failed to get the legacy device boot order.\r
@@ -858,7 +858,7 @@ MatchPartitionDevicePathNode (
 \r
 /**\r
   Expand a device path that starts with a hard drive media device path node to be a\r
 \r
 /**\r
   Expand a device path that starts with a hard drive media device path node to be a\r
-  full device path that includes the full hardware path to the device. This function enables the device to boot. \r
+  full device path that includes the full hardware path to the device. This function enables the device to boot.\r
   To avoid requiring a connect on every boot, the front match is saved in a variable (the part point\r
   to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ).\r
   All successful history device paths\r
   To avoid requiring a connect on every boot, the front match is saved in a variable (the part point\r
   to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ).\r
   All successful history device paths\r
@@ -875,7 +875,7 @@ EFIAPI
 BdsExpandPartitionPartialDevicePathToFull (\r
   IN  HARDDRIVE_DEVICE_PATH      *HardDriveDevicePath\r
   );\r
 BdsExpandPartitionPartialDevicePathToFull (\r
   IN  HARDDRIVE_DEVICE_PATH      *HardDriveDevicePath\r
   );\r
-  \r
+\r
 /**\r
   Return the bootable media handle.\r
   First, check whether the device is connected.\r
 /**\r
   Return the bootable media handle.\r
   First, check whether the device is connected.\r
@@ -892,7 +892,7 @@ EFIAPI
 BdsLibGetBootableHandle (\r
   IN  EFI_DEVICE_PATH_PROTOCOL      *DevicePath\r
   );\r
 BdsLibGetBootableHandle (\r
   IN  EFI_DEVICE_PATH_PROTOCOL      *DevicePath\r
   );\r
-  \r
+\r
 \r
 /**\r
   Checks whether the Device path in a boot option points to a valid bootable device, and if the device\r
 \r
 /**\r
   Checks whether the Device path in a boot option points to a valid bootable device, and if the device\r
@@ -941,21 +941,21 @@ BdsLibIsValidEFIBootOptDevicePathExt (
   @param  DevicePath                      The bootable device Path to check.\r
 \r
   @retval BDS_EFI_MEDIA_HD_BOOT           The given device path contains MEDIA_DEVICE_PATH type device path node,\r
   @param  DevicePath                      The bootable device Path to check.\r
 \r
   @retval BDS_EFI_MEDIA_HD_BOOT           The given device path contains MEDIA_DEVICE_PATH type device path node,\r
-                                          whose subtype is MEDIA_HARDDRIVE_DP.  \r
-  @retval BDS_EFI_MEDIA_CDROM_BOOT        If given device path contains MEDIA_DEVICE_PATH type device path node, \r
-                                          whose subtype is MEDIA_CDROM_DP.  \r
-  @retval BDS_EFI_ACPI_FLOPPY_BOOT        A given device path contains ACPI_DEVICE_PATH type device path node,                                          \r
-                                          whose HID is floppy device.  \r
-  @retval BDS_EFI_MESSAGE_ATAPI_BOOT      A given device path contains MESSAGING_DEVICE_PATH type device path node, \r
-                                          and its last device path node's subtype is MSG_ATAPI_DP.  \r
+                                          whose subtype is MEDIA_HARDDRIVE_DP.\r
+  @retval BDS_EFI_MEDIA_CDROM_BOOT        If given device path contains MEDIA_DEVICE_PATH type device path node,\r
+                                          whose subtype is MEDIA_CDROM_DP.\r
+  @retval BDS_EFI_ACPI_FLOPPY_BOOT        A given device path contains ACPI_DEVICE_PATH type device path node,\r
+                                          whose HID is floppy device.\r
+  @retval BDS_EFI_MESSAGE_ATAPI_BOOT      A given device path contains MESSAGING_DEVICE_PATH type device path node,\r
+                                          and its last device path node's subtype is MSG_ATAPI_DP.\r
   @retval BDS_EFI_MESSAGE_SCSI_BOOT       A given device path contains MESSAGING_DEVICE_PATH type device path node,\r
   @retval BDS_EFI_MESSAGE_SCSI_BOOT       A given device path contains MESSAGING_DEVICE_PATH type device path node,\r
-                                          and its last device path node's subtype is MSG_SCSI_DP. \r
-  @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, \r
+                                          and its last device path node's subtype is MSG_SCSI_DP.\r
+  @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node,\r
                                           and its last device path node's subtype is MSG_USB_DP.\r
                                           and its last device path node's subtype is MSG_USB_DP.\r
-  @retval BDS_EFI_MESSAGE_MISC_BOOT       The device path does not contain any media device path node, and  \r
-                                          its last device path node points to a message device path node.  \r
-  @retval BDS_LEGACY_BBS_BOOT             A given device path contains BBS_DEVICE_PATH type device path node. \r
-  @retval BDS_EFI_UNSUPPORT               An EFI Removable BlockIO device path does not point to a media and message device.   \r
+  @retval BDS_EFI_MESSAGE_MISC_BOOT       The device path does not contain any media device path node, and\r
+                                          its last device path node points to a message device path node.\r
+  @retval BDS_LEGACY_BBS_BOOT             A given device path contains BBS_DEVICE_PATH type device path node.\r
+  @retval BDS_EFI_UNSUPPORT               An EFI Removable BlockIO device path does not point to a media and message device.\r
 \r
   **/\r
 UINT32\r
 \r
   **/\r
 UINT32\r
@@ -975,12 +975,12 @@ EFIAPI
 BdsLibSaveMemoryTypeInformation (\r
   VOID\r
   );\r
 BdsLibSaveMemoryTypeInformation (\r
   VOID\r
   );\r
-  \r
+\r
 /**\r
   Identify a user and, if authenticated, returns the current user profile handle.\r
 \r
   @param[out]  User           Points to the user profile handle.\r
 /**\r
   Identify a user and, if authenticated, returns the current user profile handle.\r
 \r
   @param[out]  User           Points to the user profile handle.\r
-  \r
+\r
   @retval EFI_SUCCESS         The user is successfully identified, or user identification\r
                               is not supported.\r
   @retval EFI_ACCESS_DENIED   The user was not successfully identified.\r
   @retval EFI_SUCCESS         The user is successfully identified, or user identification\r
                               is not supported.\r
   @retval EFI_ACCESS_DENIED   The user was not successfully identified.\r
@@ -990,7 +990,7 @@ EFI_STATUS
 EFIAPI\r
 BdsLibUserIdentify (\r
   OUT EFI_USER_PROFILE_HANDLE         *User\r
 EFIAPI\r
 BdsLibUserIdentify (\r
   OUT EFI_USER_PROFILE_HANDLE         *User\r
-  );  \r
+  );\r
 \r
 /**\r
   This function checks if a Fv file device path is valid, according to a file GUID. If it is invalid,\r
 \r
 /**\r
   This function checks if a Fv file device path is valid, according to a file GUID. If it is invalid,\r
@@ -1030,7 +1030,7 @@ BdsLibUpdateFvFileDevicePath (
                                 path.\r
 \r
   @retval EFI_SUCCESS           The specific Usb device is connected successfully.\r
                                 path.\r
 \r
   @retval EFI_SUCCESS           The specific Usb device is connected successfully.\r
-  @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF) \r
+  @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF)\r
                                 or RemainingDevicePath is not the USB class device path.\r
   @retval EFI_NOT_FOUND         The device specified by device path is not found.\r
 \r
                                 or RemainingDevicePath is not the USB class device path.\r
   @retval EFI_NOT_FOUND         The device specified by device path is not found.\r
 \r
@@ -1041,7 +1041,7 @@ BdsLibConnectUsbDevByShortFormDP(
   IN UINT8                      HostControllerPI,\r
   IN EFI_DEVICE_PATH_PROTOCOL   *RemainingDevicePath\r
   );\r
   IN UINT8                      HostControllerPI,\r
   IN EFI_DEVICE_PATH_PROTOCOL   *RemainingDevicePath\r
   );\r
-  \r
+\r
 \r
 //\r
 // The implementation of this function is provided by Platform code.\r
 \r
 //\r
 // The implementation of this function is provided by Platform code.\r
@@ -1098,7 +1098,7 @@ EnableQuietBoot (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Use SystemTable ConOut to turn on video based Simple Text Out consoles. The \r
+  Use SystemTable ConOut to turn on video based Simple Text Out consoles. The\r
   Simple Text Out screens will now be synced up with all non-video output devices.\r
 \r
   @retval EFI_SUCCESS     UGA devices are back in text mode and synced up.\r
   Simple Text Out screens will now be synced up with all non-video output devices.\r
 \r
   @retval EFI_SUCCESS     UGA devices are back in text mode and synced up.\r