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