]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up BootMaint module in BdsDxe.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Jul 2008 10:30:43 +0000 (10:30 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Jul 2008 10:30:43 +0000 (10:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5446 6f19259b-4bc3-4df7-8a09-765794883524

12 files changed:
MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h
MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
MdeModulePkg/Universal/BdsDxe/BootMngr/BootManager.c

index 11ae2b115cdc115d3e21dbd409e1acf88381b18a..4d5a4580c68448beba770fad4dc19dfd34d6ff20 100644 (file)
@@ -24,32 +24,32 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   the entire string is translated.\r
 \r
 \r
-  @param a               Pointer to input Ascii string.\r
+  @param AStr               Pointer to input Ascii string.\r
   @param Size            The number of characters to translate.\r
-  @param u               Pointer to output Unicode string buffer.\r
+  @param UStr               Pointer to output Unicode string buffer.\r
 \r
   @return None\r
 \r
 **/\r
 VOID\r
 AsciiToUnicodeSize (\r
-  IN UINT8              *a,\r
+  IN UINT8              *AStr,\r
   IN UINTN              Size,\r
-  OUT UINT16            *u\r
+  OUT UINT16            *UStr\r
   )\r
 {\r
-  UINTN i;\r
+  UINTN Idx;\r
 \r
-  i = 0;\r
-  while (a[i] != 0) {\r
-    u[i] = (CHAR16) a[i];\r
-    if (i == Size) {\r
+  Idx = 0;\r
+  while (AStr[Idx] != 0) {\r
+    UStr[Idx] = (CHAR16) AStr[Idx];\r
+    if (Idx == Size) {\r
       break;\r
     }\r
 \r
-    i++;\r
+    Idx++;\r
   }\r
-  u[i] = 0;\r
+  UStr[Idx] = 0;\r
 }\r
 \r
 /**\r
@@ -85,14 +85,14 @@ UnicodeToAscii (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Build Legacy Device Name String according.\r
 \r
-  @param CurBBSEntry     EDES_TODO: Add parameter description\r
-  @param Index           EDES_TODO: Add parameter description\r
-  @param BufSize         EDES_TODO: Add parameter description\r
-  @param BootString      EDES_TODO: Add parameter description\r
+  @param CurBBSEntry     BBS Table.\r
+  @param Index           Index.\r
+  @param BufSize         The buffer size.\r
+  @param BootString      The output string.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @return VOID           No output.\r
 \r
 **/\r
 VOID\r
@@ -106,7 +106,7 @@ BdsBuildLegacyDevNameString (
   CHAR16  *Fmt;\r
   CHAR16  *Type;\r
   UINT8   *StringDesc;\r
-  CHAR16  temp[80];\r
+  CHAR16  Temp[80];\r
 \r
   switch (Index) {\r
   //\r
@@ -184,9 +184,9 @@ BdsBuildLegacyDevNameString (
     //\r
     // Only get fisrt 32 characters, this is suggested by BBS spec\r
     //\r
-    AsciiToUnicodeSize (StringDesc, 32, temp);\r
+    AsciiToUnicodeSize (StringDesc, 32, Temp);\r
     Fmt   = L"%s";\r
-    Type  = temp;\r
+    Type  = Temp;\r
   }\r
 \r
   //\r
@@ -386,13 +386,14 @@ BdsCreateLegacyBootOption (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Check if the boot option is a legacy one.\r
 \r
-  @param BootOptionVar   EDES_TODO: Add parameter description\r
-  @param BbsEntry        EDES_TODO: Add parameter description\r
-  @param BbsIndex        EDES_TODO: Add parameter description\r
+  @param BootOptionVar   The boot option data payload.\r
+  @param BbsEntry        The BBS Table.\r
+  @param BbsIndex        The table index.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval TRUE           It is a legacy boot option.\r
+  @retval FALSE          It is not a legacy boot option.\r
 \r
 **/\r
 BOOLEAN\r
@@ -428,67 +429,15 @@ BdsIsLegacyBootOption (
 }\r
 \r
 /**\r
+  Delete all the invalid legacy boot options.\r
 \r
-  Delete boot option specified by OptionNumber and adjust the boot order.\r
-\r
-  @param  OptionNumber      The boot option to be deleted.\r
-  @param  BootOrder         Boot order list to be adjusted by remove this boot option.\r
-  @param  BootOrderSize     The size of Boot order list will be modified.\r
   \r
-  @retval EFI_SUCCESS       The boot option is deleted successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsDeleteBootOption (\r
-  IN UINTN                       OptionNumber,\r
-  IN OUT UINT16                  *BootOrder,\r
-  IN OUT UINTN                   *BootOrderSize\r
-  )\r
-{\r
-  UINT16      BootOption[100];\r
-  UINTN       Index;\r
-  EFI_STATUS  Status;\r
-  UINTN       Index2Del;\r
-\r
-  Status    = EFI_SUCCESS;\r
-  Index2Del = 0;\r
-\r
-  UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", OptionNumber);\r
-  Status = EfiLibDeleteVariable (BootOption, &gEfiGlobalVariableGuid);\r
-  //\r
-  // adjust boot order array\r
-  //\r
-  for (Index = 0; Index < *BootOrderSize / sizeof (UINT16); Index++) {\r
-    if (BootOrder[Index] == OptionNumber) {\r
-      Index2Del = Index;\r
-      break;\r
-    }\r
-  }\r
-\r
-  if (Index != *BootOrderSize / sizeof (UINT16)) {\r
-    for (Index = 0; Index < *BootOrderSize / sizeof (UINT16) - 1; Index++) {\r
-      if (Index >= Index2Del) {\r
-        BootOrder[Index] = BootOrder[Index + 1];\r
-      }\r
-    }\r
-\r
-    *BootOrderSize -= sizeof (UINT16);\r
-  }\r
-\r
-  return Status;\r
-\r
-}\r
-\r
-/**\r
-  Delete all the invalid legacy boot options.\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
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsDeleteAllInvalidLegacyBootOptions (\r
   VOID\r
   )\r
@@ -613,16 +562,17 @@ BdsDeleteAllInvalidLegacyBootOptions (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Find all legacy boot option by device type.\r
 \r
-  @param BootOrder       EDES_TODO: Add parameter description\r
-  @param BootOptionNum   EDES_TODO: Add parameter description\r
-  @param DevType         EDES_TODO: Add parameter description\r
-  @param Attribute       EDES_TODO: Add parameter description\r
-  @param BbsIndex        EDES_TODO: Add parameter description\r
-  @param OptionNumber    EDES_TODO: Add parameter description\r
+  @param BootOrder       The boot order array.\r
+  @param BootOptionNum   The number of boot option.\r
+  @param DevType         Device type.\r
+  @param Attribute       The boot option attribute.\r
+  @param BbsIndex        The BBS table index.\r
+  @param OptionNumber    The boot option index.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval TRUE           The Legacy boot option is found.\r
+  @retval FALSE          The legacy boot option is not found.\r
 \r
 **/\r
 BOOLEAN\r
@@ -683,14 +633,16 @@ BdsFindLegacyBootOptionByDevType (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Create a legacy boot option.\r
 \r
-  @param BbsItem         EDES_TODO: Add parameter description\r
-  @param Index           EDES_TODO: Add parameter description\r
-  @param BootOrderList   EDES_TODO: Add parameter description\r
-  @param BootOrderListSize EDES_TODO: Add parameter description\r
+  @param BbsItem         The BBS Table entry.\r
+  @param Index           Index of the specified entry in BBS table.\r
+  @param BootOrderList   The boot order list.\r
+  @param BootOrderListSize The size of boot order list.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_OUT_OF_RESOURCE  No enough memory.\r
+  @retval EFI_SUCCESS          The function complete successfully.\r
+  @return Other value if the legacy boot option is not created.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -739,12 +691,13 @@ BdsCreateOneLegacyBootOption (
 \r
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
+  \r
+\r
   @retval EFI_SUCCESS       The boot options are added successfully \r
                             or they are already in boot options.\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsAddNonExistingLegacyBootOptions (\r
   VOID\r
   )\r
@@ -845,14 +798,14 @@ BdsAddNonExistingLegacyBootOptions (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Fill the device order buffer.\r
 \r
-  @param BbsTable        EDES_TODO: Add parameter description\r
-  @param BbsType         EDES_TODO: Add parameter description\r
-  @param BbsCount        EDES_TODO: Add parameter description\r
-  @param Buf             EDES_TODO: Add parameter description\r
+  @param BbsTable        The BBS table.\r
+  @param BbsType         The BBS Type.\r
+  @param BbsCount        The BBS Count.\r
+  @param Buf             device order buffer.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @return The device order buffer.\r
 \r
 **/\r
 UINT16 *\r
@@ -860,7 +813,7 @@ BdsFillDevOrderBuf (
   IN BBS_TABLE                    *BbsTable,\r
   IN BBS_TYPE                     BbsType,\r
   IN UINTN                        BbsCount,\r
-  IN UINT16                       *Buf\r
+  OUT UINT16                       *Buf\r
   )\r
 {\r
   UINTN Index;\r
@@ -882,12 +835,16 @@ BdsFillDevOrderBuf (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Create the device order buffer.\r
 \r
-  @param BbsTable        EDES_TODO: Add parameter description\r
-  @param BbsCount        EDES_TODO: Add parameter description\r
+  @param BbsTable        The BBS table.\r
+  @param BbsCount        The BBS Count.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_SUCCES     The buffer is created and the EFI variable named \r
+                         VAR_LEGACY_DEV_ORDER and EfiLegacyDevOrderGuid is\r
+                         set correctly.\r
+  @return Other value if the set of EFI variable fails. Check gRT->SetVariable\r
+          for detailed information.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1024,7 +981,6 @@ BdsCreateDevOrder (
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsUpdateLegacyDevOrder (\r
   VOID\r
   )\r
@@ -1057,7 +1013,7 @@ BdsUpdateLegacyDevOrder (
   UINT16                    *NewBEVPtr;\r
   UINT16                    *NewDevPtr;\r
   UINT16                    Length;\r
-  UINT16                    tmp;\r
+  UINT16                    Tmp;\r
   UINTN                     FDIndex;\r
   UINTN                     HDIndex;\r
   UINTN                     CDIndex;\r
@@ -1352,9 +1308,9 @@ BdsUpdateLegacyDevOrder (
 \r
       for (Index2 = Index + 1; Index2 < FDIndex; Index2++) {\r
         if (0 == (NewFDPtr[Index2] & 0xFF00)) {\r
-          tmp               = NewFDPtr[Index];\r
+          Tmp               = NewFDPtr[Index];\r
           NewFDPtr[Index]   = NewFDPtr[Index2];\r
-          NewFDPtr[Index2]  = tmp;\r
+          NewFDPtr[Index2]  = Tmp;\r
           break;\r
         }\r
       }\r
@@ -1372,9 +1328,9 @@ BdsUpdateLegacyDevOrder (
 \r
       for (Index2 = Index + 1; Index2 < HDIndex; Index2++) {\r
         if (0 == (NewHDPtr[Index2] & 0xFF00)) {\r
-          tmp               = NewHDPtr[Index];\r
+          Tmp               = NewHDPtr[Index];\r
           NewHDPtr[Index]   = NewHDPtr[Index2];\r
-          NewHDPtr[Index2]  = tmp;\r
+          NewHDPtr[Index2]  = Tmp;\r
           break;\r
         }\r
       }\r
@@ -1392,9 +1348,9 @@ BdsUpdateLegacyDevOrder (
 \r
       for (Index2 = Index + 1; Index2 < CDIndex; Index2++) {\r
         if (0 == (NewCDPtr[Index2] & 0xFF00)) {\r
-          tmp               = NewCDPtr[Index];\r
+          Tmp               = NewCDPtr[Index];\r
           NewCDPtr[Index]   = NewCDPtr[Index2];\r
-          NewCDPtr[Index2]  = tmp;\r
+          NewCDPtr[Index2]  = Tmp;\r
           break;\r
         }\r
       }\r
@@ -1412,9 +1368,9 @@ BdsUpdateLegacyDevOrder (
 \r
       for (Index2 = Index + 1; Index2 < NETIndex; Index2++) {\r
         if (0 == (NewNETPtr[Index2] & 0xFF00)) {\r
-          tmp               = NewNETPtr[Index];\r
+          Tmp               = NewNETPtr[Index];\r
           NewNETPtr[Index]  = NewNETPtr[Index2];\r
-          NewNETPtr[Index2] = tmp;\r
+          NewNETPtr[Index2] = Tmp;\r
           break;\r
         }\r
       }\r
@@ -1432,9 +1388,9 @@ BdsUpdateLegacyDevOrder (
 \r
       for (Index2 = Index + 1; Index2 < BEVIndex; Index2++) {\r
         if (0 == (NewBEVPtr[Index2] & 0xFF00)) {\r
-          tmp               = NewBEVPtr[Index];\r
+          Tmp               = NewBEVPtr[Index];\r
           NewBEVPtr[Index]  = NewBEVPtr[Index2];\r
-          NewBEVPtr[Index2] = tmp;\r
+          NewBEVPtr[Index2] = Tmp;\r
           break;\r
         }\r
       }\r
@@ -1456,13 +1412,14 @@ BdsUpdateLegacyDevOrder (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Set Boot Priority for specified device type.\r
 \r
-  @param DeviceType      EDES_TODO: Add parameter description\r
-  @param LocalBbsTable   EDES_TODO: Add parameter description\r
-  @param Priority        EDES_TODO: Add parameter description\r
+  @param DeviceType      The device type.\r
+  @param LocalBbsTable   The BBS table.\r
+  @param Priority        The prority table.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_SUCCESS    The function completes successfully.\r
+  @retval EFI_NOT_FOUND  Failed to find device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1526,11 +1483,9 @@ BdsSetBootPriority4SameTypeDev (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
-\r
-  @param LocalBbsTable   EDES_TODO: Add parameter description\r
+  Print the BBS Table.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @param LocalBbsTable   The BBS table.\r
 \r
 **/\r
 VOID\r
@@ -1583,7 +1538,6 @@ PrintBbsTable (
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 BdsRefreshBbsTableForBoot (\r
   IN BDS_COMMON_OPTION        *Entry\r
   )\r
index bab7de6326ae9bf2acf3b018dc8d4bab9674b945..542c9d9c462c9e1a3cdbd32553981e97e9774862 100644 (file)
@@ -12,24 +12,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _EFI_BDS_BBS_SUPPORT_H\r
-#define _EFI_BDS_BBS_SUPPORT_H\r
+#ifndef _EFI_BDS_BBS_SUPPORT_H_\r
+#define _EFI_BDS_BBS_SUPPORT_H_\r
 \r
 #include "BootMaint.h"\r
-//\r
-// Bugbug: Candidate for a PCD entries\r
-//\r
+\r
 #define MAX_BBS_ENTRIES 0x100\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Build Legacy Device Name String according.\r
 \r
-  @param CurBBSEntry     EDES_TODO: Add parameter description\r
-  @param Index           EDES_TODO: Add parameter description\r
-  @param BufSize         EDES_TODO: Add parameter description\r
-  @param BootString      EDES_TODO: Add parameter description\r
+  @param CurBBSEntry     BBS Table.\r
+  @param Index           Index.\r
+  @param BufSize         The buffer size.\r
+  @param BootString      The output string.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @return VOID           No output.\r
 \r
 **/\r
 VOID\r
@@ -41,12 +39,13 @@ BdsBuildLegacyDevNameString (
   );\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
-\r
-  @param VOID            EDES_TODO: Add parameter description\r
+  Delete all the invalid legacy boot options.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  \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
 **/\r
 EFI_STATUS\r
 BdsDeleteAllInvalidLegacyBootOptions (\r
@@ -58,7 +57,7 @@ BdsDeleteAllInvalidLegacyBootOptions (
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
+  \r
 \r
   @retval  EFI_SUCCESS        The boot options are added successfully or they are already in boot options.\r
   @retval  others             An error occurred when creating legacy boot options.\r
@@ -71,11 +70,11 @@ BdsAddNonExistingLegacyBootOptions (
 ;\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
+  Add the legacy boot devices from BBS table into \r
+  the legacy device boot order.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_SUCCESS       The boot devices are added successfully.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -84,11 +83,12 @@ BdsUpdateLegacyDevOrder (
   );\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
 \r
-  @param Entry           EDES_TODO: Add parameter description\r
+  Set the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @param  Entry             The boot option is to be checked for refresh BBS table.\r
+  \r
+  @retval EFI_SUCCESS       The boot priority for BBS entries is refreshed successfully.\r
 \r
 **/\r
 EFI_STATUS\r
index 1630eeb1553fb82c4534fd7f93aa3385d61914ea..c6b44d61d79e5a42d2d872d3a238d6de29386e11 100644 (file)
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
 \r
   Find the first instance of this Protocol\r
-  in the system and return it's interface\r
+  in the system and return it's interface.\r
 \r
 \r
   @param ProtocolGuid    Provides the protocol to search for\r
@@ -174,10 +174,10 @@ EfiLibGetVariable (
   Function deletes the variable specified by VarName and VarGuid.\r
 \r
 \r
-  @param VarName         - A Null-terminated Unicode string that is\r
+  @param VarName           A Null-terminated Unicode string that is\r
                          the name of the vendor's variable.\r
                          \r
-  @param VendorGuid           - A unique identifier for the vendor.\r
+  @param VarGuid           A unique identifier for the vendor.\r
 \r
   @retval  EFI_SUCCESS           The variable was found and removed\r
   @retval  EFI_UNSUPPORTED       The variable store was inaccessible\r
@@ -437,11 +437,13 @@ EfiLibStrFromDatahub (
   UINT64                                      Count;\r
   EFI_DATA_RECORD_HEADER                      *Record;\r
   EFI_SUBCLASS_TYPE1_HEADER                   *DataHdr;\r
-  EFI_GUID                                    MiscGuid = EFI_MISC_SUBCLASS_GUID;\r
-  EFI_MISC_ONBOARD_DEVICE_DATA                *ob;\r
+  EFI_GUID                                    MiscGuid;\r
+  EFI_MISC_ONBOARD_DEVICE_DATA                *Ob;\r
   EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *Port;\r
   EFI_TIME                                    CurTime;\r
 \r
+  CopyGuid (&MiscGuid, &gEfiMiscSubClassGuid);\r
+\r
   Status = gBS->LocateProtocol (\r
                   &gEfiDataHubProtocolGuid,\r
                   NULL,\r
@@ -470,9 +472,9 @@ EfiLibStrFromDatahub (
       //\r
       DataHdr = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
       if (EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER == DataHdr->RecordType) {\r
-        ob = (EFI_MISC_ONBOARD_DEVICE_DATA *) (DataHdr + 1);\r
-        if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &ob->OnBoardDevicePath, DevPath)) {\r
-          GetProducerString (&Record->ProducerName, ob->OnBoardDeviceDescription, &Desc);\r
+        Ob = (EFI_MISC_ONBOARD_DEVICE_DATA *) (DataHdr + 1);\r
+        if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &Ob->OnBoardDevicePath, DevPath)) {\r
+          GetProducerString (&Record->ProducerName, Ob->OnBoardDeviceDescription, &Desc);\r
           return Desc;\r
         }\r
       }\r
index 432be94c9f480723120cde7c52503887dc006327..44b30d841e3a067b324dcb4f28dd0d2e3f41810f 100644 (file)
@@ -35,9 +35,7 @@ CHAR16  mFileExplorerStorageName[] = L"FeData";
 /**\r
   Init all memu.\r
 \r
-  @param CallbackData    The \r
-\r
-  @return EDES_TODO: Add description for return value\r
+  @param CallbackData    The BMM context data.\r
 \r
 **/\r
 VOID\r
@@ -46,11 +44,7 @@ InitAllMenu (
   );\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
-\r
-  @param VOID            EDES_TODO: Add parameter description\r
-\r
-  @return EDES_TODO: Add description for return value\r
+  Free up all Menu Option list.\r
 \r
 **/\r
 VOID\r
@@ -737,7 +731,7 @@ Error:
   @param Private         The BMM context data.\r
   @param CurrentFakeNVMap The current Fack NV Map.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -787,10 +781,8 @@ DiscardChangeHandler (
 }\r
 \r
 /**\r
-  Initialize the Boot Maintenance Utitliy\r
-\r
+  Initialize the Boot Maintenance Utitliy.\r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
 \r
   @retval  EFI_SUCCESS      utility ended successfully\r
   @retval  others           contain some errors\r
@@ -1044,7 +1036,7 @@ InitializeBM (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1071,9 +1063,9 @@ InitAllMenu (
 /**\r
   Free up all Menu Option list.\r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1094,9 +1086,9 @@ FreeAllMenu (
   Intialize all the string depositories.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1119,8 +1111,8 @@ InitializeStringDepository (
   Fetch a usable string node from the string depository and return the string token.\r
 \r
 \r
-  @param CallbackData    EDES_TODO: Add parameter description\r
-  @param StringDepository - Pointer of the string depository.\r
+  @param CallbackData    The BMM context data.\r
+  @param StringDepository  The string repository.\r
 \r
   @retval  EFI_STRING_ID           String token.\r
 \r
@@ -1168,9 +1160,9 @@ GetStringTokenFromDepository (
   Reclaim string depositories by moving the current node pointer to list head..\r
 \r
 \r
-  @param VOID \r
+   \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1192,9 +1184,9 @@ ReclaimStringDepository (
   Release resource for all the string depositories.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1232,7 +1224,7 @@ CleanUpStringDepository (
   Start boot maintenance manager\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS If BMM is invoked successfully.\r
   @return Other value if BMM return unsuccessfully.\r
@@ -1285,7 +1277,7 @@ BdsStartBootMaint (
   @param CallbackData    The BMM context data.\r
 \r
   @retval EFI_SUCCESS If function complete successfully.\r
-  @retturn Other value if the Setup Browser process BMM's pages and\r
+  @return Other value if the Setup Browser process BMM's pages and\r
            return unsuccessfully.\r
 \r
 **/\r
index da7badd306a3c9ce1dd638aa18523331a577b7a2..d15bbe04c826b8c50619f9fc9c97ce479ab35e13 100644 (file)
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _BOOT_MAINT_H\r
-#define _BOOT_MAINT_H\r
+#ifndef _BOOT_MAINT_H_\r
+#define _BOOT_MAINT_H_\r
 \r
 #include "Bds.h"\r
 #include "BBSsupport.h"\r
@@ -23,9 +23,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Constants which are variable names used to access variables\r
 //\r
-#define VarLegacyDevOrder L"LegacyDevOrder"\r
+#define VAR_LEGACY_DEV_ORDER L"LegacyDevOrder"\r
 \r
-#define VarConOutMode L"ConOutMode"\r
+#define VAR_CON_OUT_MODE L"ConOutMode"\r
 \r
 //\r
 // Guid of a NV Variable which store the information about the\r
@@ -39,16 +39,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // String Contant\r
 //\r
-#define StrFloppy       L"Floppy Drive #%02x"\r
-#define StrHardDisk     L"HardDisk Drive #%02x"\r
-#define StrCDROM        L"ATAPI CDROM Drive #%02x"\r
-#define StrNET          L"NET Drive #%02x"\r
-#define StrBEV          L"BEV Drive #%02x"\r
-#define StrFloppyHelp   L"Select Floppy Drive #%02x"\r
-#define StrHardDiskHelp L"Select HardDisk Drive #%02x"\r
-#define StrCDROMHelp    L"Select ATAPI CDROM Drive #%02x"\r
-#define StrNETHelp      L"NET Drive #%02x"\r
-#define StrBEVHelp      L"BEV Drive #%02x"\r
+#define STR_FLOPPY       L"Floppy Drive #%02x"\r
+#define STR_HARDDISK     L"HardDisk Drive #%02x"\r
+#define STR_CDROM        L"ATAPI CDROM Drive #%02x"\r
+#define STR_NET          L"NET Drive #%02x"\r
+#define STR_BEV          L"BEV Drive #%02x"\r
+#define STR_FLOPPY_HELP   L"Select Floppy Drive #%02x"\r
+#define STR_HARDDISK_HELP L"Select HardDisk Drive #%02x"\r
+#define STR_CDROM_HELP    L"Select ATAPI CDROM Drive #%02x"\r
+#define STR_NET_HELP      L"NET Drive #%02x"\r
+#define STR_BEV_HELP      L"BEV Drive #%02x"\r
 \r
 //\r
 // Variable created with this flag will be "Efi:...."\r
@@ -61,22 +61,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define MAX_CHAR      480\r
 #define MAX_CHAR_SIZE (MAX_CHAR * 2)\r
 \r
-//\r
-// Check to see if current build support option active feature of\r
-// some driver option\r
-//\r
-#ifndef LOAD_OPTION_ACTIVE\r
-#define LOAD_OPTION_ACTIVE  0x00000001\r
-#endif\r
-\r
-//\r
-// Check to see if current build support force reconnect feature of\r
-// some driver option\r
-//\r
-#ifndef LOAD_OPTION_FORCE_RECONNECT\r
-#define LOAD_OPTION_FORCE_RECONNECT 0x00000002\r
-#endif\r
-\r
 extern EFI_GUID mBootMaintGuid;\r
 extern EFI_GUID mFileExplorerGuid;\r
 \r
@@ -493,10 +477,11 @@ BOpt_FindFileSystem (
   All files and sub-directories in current directory\r
   will be stored in DirectoryMenu for future use.\r
 \r
-  @param FileOption  Pointer for Dir to explore.\r
+  @param CallbackData  The BMM context data.\r
+  @param MenuEntry     The Menu Entry.\r
 \r
-  @retval TRUE         Get files from current dir successfully.\r
-  @retval FALSE        Can't get files from current dir.\r
+  @retval EFI_SUCCESS         Get files from current dir successfully.\r
+  @return Other value if can't get files from current dir.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -513,7 +498,7 @@ BOpt_FindFiles (
   All valid handles in the system except those consume SimpleFs, LoadFile\r
   are stored in DriverMenu for future use.\r
 \r
-  @param VOID \r
+   \r
 \r
   @retval EFI_SUCCESS The function complets successfully.\r
   @return Other value if failed to build the DriverMenu.\r
@@ -530,7 +515,7 @@ BOpt_FindDrivers (
   Build the BootOptionMenu according to BootOrder Variable.\r
   This Routine will access the Boot#### to get EFI_LOAD_OPTION.\r
 \r
-  @param None\r
+  @param CallbackData The BMM context data.\r
 \r
   @return The number of the Var Boot####.\r
 \r
@@ -560,7 +545,7 @@ BOpt_GetDriverOptions (
 /**\r
   Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS The function complete successfully.\r
   @retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.\r
@@ -574,9 +559,9 @@ BOpt_GetLegacyOptions (
 /**\r
   Free out resouce allocated from Legacy Boot Options.\r
 \r
-  @param VOID.\r
+  .\r
 \r
-  @return VOID.\r
+  .\r
 \r
 **/\r
 VOID\r
@@ -585,11 +570,11 @@ BOpt_FreeLegacyOptions (
   );\r
 \r
 /**\r
-  Free resources allocated in Allocate Rountine\r
+  Free resources allocated in Allocate Rountine.\r
 \r
   @param FreeMenu        Menu to be freed\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -652,7 +637,7 @@ BOpt_IsEfiApp (
 \r
   Get the Option Number that has not been allocated for use.\r
 \r
-  @param VOID\r
+  \r
 \r
   @return The available Option Number.\r
 \r
@@ -666,7 +651,7 @@ BOpt_GetBootOptionNumber (
 \r
   Get the Option Number that is not in use.\r
 \r
-  @param VOID\r
+  \r
 \r
   @return The unused Option Number.\r
 \r
@@ -726,12 +711,11 @@ BOpt_GetMenuEntry (
 // Locate all serial io devices for console\r
 //\r
 /**\r
-  Build a list containing all serial devices\r
-\r
+  Build a list containing all serial devices.\r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
 \r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_SUCCESS The function complete successfully.\r
+  @retval EFI_UNSUPPORTED No serial ports present.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -746,7 +730,7 @@ LocateSerialIo (
   Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function always complete successfully.\r
 \r
@@ -765,7 +749,7 @@ GetAllConsoles(
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -780,7 +764,7 @@ GetConsoleOutMode (
   Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
 \r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
+              EDES_TODO: Add parameter description\r
 \r
   @retval EFI_SUCCESS    The function always complete successfully.\r
 **/\r
@@ -796,13 +780,14 @@ FreeAllConsoles (
 \r
   @param DevicePath\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
 ChangeVariableDevicePath (\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-);\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
+  )\r
+;\r
 \r
 /**\r
   Update the multi-instance device path of Terminal Device based on\r
@@ -818,9 +803,9 @@ ChangeVariableDevicePath (
 **/\r
 EFI_STATUS\r
 ChangeTerminalDevicePath (\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
-  BOOLEAN                   ChangeTerminal\r
-);\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
+  IN BOOLEAN                   ChangeTerminal\r
+  );\r
 //\r
 // Variable operation by menu selection\r
 //\r
@@ -849,7 +834,7 @@ Var_UpdateBootOption (
   make sure BootOrder is in valid state.\r
 \r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
+              EDES_TODO: Add parameter description\r
 \r
   @retval EFI_SUCCESS   If all boot load option EFI Variables corresponding to  \r
                         BM_LOAD_CONTEXT marked for deletion is deleted\r
@@ -868,7 +853,7 @@ Var_DelBootOption (
   scratch by content from BootOptionMenu is needed.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval  EFI_SUCCESS  The boot order is updated successfully.\r
   @return               EFI_STATUS other than EFI_SUCCESS if failed to\r
@@ -911,7 +896,7 @@ Var_UpdateDriverOption (
   make sure DriverOrder is in valid state.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS Load Option is successfully updated.\r
   @return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
@@ -931,7 +916,7 @@ Var_DelDriverOption (
   needed.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval  EFI_SUCCESS  The driver order is updated successfully.\r
   @return               EFI_STATUS other than EFI_SUCCESS if failed to\r
@@ -948,7 +933,7 @@ Var_ChangeDriverOrder (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -964,7 +949,7 @@ Var_UpdateConsoleInpOption (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -980,7 +965,7 @@ Var_UpdateConsoleOutOption (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -996,9 +981,9 @@ Var_UpdateErrorOutOption (
   based on the new BaudRate, Data Bits, parity and Stop Bits\r
   set.\r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1096,9 +1081,9 @@ Var_UpdateConMode (
 /**\r
   Refresh the global UpdateData structure.\r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1114,7 +1099,7 @@ RefreshUpdateData (
                          opcode deletion.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1129,7 +1114,7 @@ CleanUpPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1142,7 +1127,7 @@ UpdateBootDelPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1157,7 +1142,7 @@ UpdateDrvAddHandlePage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1171,7 +1156,7 @@ UpdateDrvDelPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1186,7 +1171,7 @@ UpdateDriverAddHandleDescPage (
   @param UpdatePageId    The form ID.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1201,7 +1186,7 @@ UpdatePageBody (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1215,7 +1200,7 @@ UpdateBootNextPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1230,7 +1215,7 @@ UpdateTimeOutPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1244,7 +1229,7 @@ UpdateTerminalPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1258,7 +1243,7 @@ UpdateConModePage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1273,14 +1258,14 @@ UpdateConCOMPage (
   @param UpdatePageId    The form ID. It also spefies the legacy device type.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
 UpdateSetLegacyDeviceOrderPage (\r
   IN UINT16                           UpdatePageId,\r
   IN BMM_CALLBACK_DATA                *CallbackData\r
-);\r
+  );\r
 \r
 \r
 /**\r
@@ -1366,7 +1351,7 @@ DevicePathToStr (
 /**\r
 \r
   Find the first instance of this Protocol\r
-  in the system and return it's interface\r
+  in the system and return it's interface.\r
 \r
 \r
   @param ProtocolGuid    Provides the protocol to search for\r
@@ -1408,7 +1393,7 @@ EfiReallocatePool (
 \r
   @param  Name                  String part of EFI variable name\r
   @param  VendorGuid            GUID part of EFI variable name\r
-  @param  VariableSize          Returns the size of the EFI variable that was read\r
+  @param  VarSize          Returns the size of the EFI variable that was read\r
 \r
   @return Dynamically allocated memory that contains a copy of the EFI variable.\r
   @return Caller is responsible freeing the buffer.\r
@@ -1429,7 +1414,7 @@ BdsLibGetVariableAndSize (
   @param VarName         - A Null-terminated Unicode string that is\r
                          the name of the vendor's variable.\r
                          \r
-  @param VendorGuid           - A unique identifier for the vendor.\r
+  @param VarGuid           - A unique identifier for the vendor.\r
 \r
   @retval  EFI_SUCCESS           The variable was found and removed\r
   @retval  EFI_UNSUPPORTED       The variable store was inaccessible\r
@@ -1517,7 +1502,7 @@ EfiLibStrFromDatahub (
   @param OptionIndex     Returns the index number (#### in Boot####).\r
   @param OptionSize      Return the size of the Boot### variable.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID                              *\r
@@ -1525,16 +1510,13 @@ GetLegacyBootOptionVar (
   IN  UINTN                            DeviceType,\r
   OUT UINTN                            *OptionIndex,\r
   OUT UINTN                            *OptionSize\r
- );\r
 );\r
 \r
 /**\r
-  Initialize the Boot Maintenance Utitliy\r
-\r
+  Initialize the Boot Maintenance Utitliy.\r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
-\r
-  @retval  EFI_SUCCESS      utility ended successfully\r
-  @retval  others           contain some errors\r
+  @retval  EFI_SUCCESS      utility ended successfully.\r
+  @retval  others           contain some errors.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1546,7 +1528,7 @@ InitializeBM (
   Start boot maintenance manager\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS If BMM is invoked successfully.\r
   @return Other value if BMM return unsuccessfully.\r
@@ -1561,9 +1543,9 @@ BdsStartBootMaint (
   Intialize all the string depositories.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1591,9 +1573,9 @@ GetStringTokenFromDepository (
   Reclaim string depositories by moving the current node pointer to list head..\r
 \r
 \r
-  @param VOID \r
+   \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1605,9 +1587,9 @@ ReclaimStringDepository (
   Release resource for all the string depositories.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1641,7 +1623,7 @@ ApplyChangeHandler (
   @param Private         The BMM context data.\r
   @param CurrentFakeNVMap The current Fack NV Map.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1656,7 +1638,7 @@ DiscardChangeHandler (
   @param Private         The BMM context data.\r
   @param NewPageId       The original page ID.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1672,7 +1654,7 @@ UpdatePageId (
                          of the file to be boot from.\r
 \r
   @retval EFI_SUCCESS    The function completed successfull.\r
-  @retun                 Other value if the boot from the file fails.\r
+  @return                 Other value if the boot from the file fails.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1742,7 +1724,7 @@ FileExplorerCallback (
   @param CallbackData    The BMM context data.\r
 \r
   @retval EFI_SUCCESS If function complete successfully.\r
-  @retturn Other value if the Setup Browser process BMM's pages and\r
+  @return Other value if the Setup Browser process BMM's pages and\r
            return unsuccessfully.\r
 \r
 **/\r
index 8baff7bb4cfe34fd63a33526e95ac866f818c743..0d39ae8f8e33095e63b588c283691d520b1a4650 100644 (file)
@@ -501,11 +501,11 @@ BOpt_FindFileSystem (
 }\r
 \r
 /**\r
-  Free resources allocated in Allocate Rountine\r
+  Free resources allocated in Allocate Rountine.\r
 \r
   @param FreeMenu        Menu to be freed\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -531,10 +531,11 @@ BOpt_FreeMenu (
   All files and sub-directories in current directory\r
   will be stored in DirectoryMenu for future use.\r
 \r
-  @param FileOption  Pointer for Dir to explore.\r
+  @param CallbackData  The BMM context data.\r
+  @param MenuEntry     The Menu Entry.\r
 \r
-  @retval TRUE         Get files from current dir successfully.\r
-  @retval FALSE        Can't get files from current dir.\r
+  @retval EFI_SUCCESS         Get files from current dir successfully.\r
+  @return Other value if can't get files from current dir.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -684,7 +685,7 @@ BOpt_FindFiles (
 /**\r
   Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS The function complete successfully.\r
   @retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.\r
@@ -824,9 +825,9 @@ BOpt_GetLegacyOptions (
 /**\r
   Free out resouce allocated from Legacy Boot Options.\r
 \r
-  @param VOID.\r
+  \r
 \r
-  @return VOID.\r
+  .\r
 \r
 **/\r
 VOID\r
@@ -846,7 +847,7 @@ BOpt_FreeLegacyOptions (
   Build the BootOptionMenu according to BootOrder Variable.\r
   This Routine will access the Boot#### to get EFI_LOAD_OPTION.\r
 \r
-  @param None\r
+  @param CallbackData The BMM context data.\r
 \r
   @return The number of the Var Boot####.\r
 \r
@@ -1242,7 +1243,7 @@ BOpt_IsEfiApp (
   All valid handles in the system except those consume SimpleFs, LoadFile\r
   are stored in DriverMenu for future use.\r
 \r
-  @param VOID \r
+   \r
 \r
   @retval EFI_SUCCESS The function complets successfully.\r
   @return Other value if failed to build the DriverMenu.\r
@@ -1333,7 +1334,7 @@ BOpt_FindDrivers (
 \r
   Get the Option Number that has not been allocated for use.\r
 \r
-  @param VOID\r
+  \r
 \r
   @return The available Option Number.\r
 \r
@@ -1409,7 +1410,7 @@ BOpt_GetBootOptionNumber (
 \r
   Get the Option Number that is not in use.\r
 \r
-  @param VOID\r
+  \r
 \r
   @return The unused Option Number.\r
 \r
index 0364ba64d36a9e2b5d5cf5ae37221252910afad5..39be20bdbca596952d707a5d3075cd579c075e9e 100644 (file)
@@ -58,8 +58,8 @@ UpdateComAttributeFromVariable (
 **/\r
 EFI_STATUS\r
 ChangeTerminalDevicePath (\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
-  IN BOOLEAN                   ChangeTerminal\r
+  IN OUT    EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
+  IN        BOOLEAN                   ChangeTerminal\r
   )\r
 {\r
   EFI_DEVICE_PATH_PROTOCOL  *Node;\r
@@ -172,7 +172,7 @@ ChangeTerminalDevicePath (
 \r
   @param DevicePath\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -287,7 +287,7 @@ RetrieveUartUid (
 }\r
 \r
 /**\r
-  Sort Uart handles array with Acpi->UID from low to high\r
+  Sort Uart handles array with Acpi->UID from low to high.\r
 \r
 \r
   @param Handles         EFI_SERIAL_IO_PROTOCOL handle buffer\r
@@ -353,12 +353,11 @@ IsTerminalDevicePath (
   );\r
 \r
 /**\r
-  Build a list containing all serial devices\r
+  Build a list containing all serial devices.\r
 \r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
-\r
-  @return EDES_TODO: Add description for return value\r
+  @retval EFI_SUCCESS The function complete successfully.\r
+  @retval EFI_UNSUPPORTED No serial ports present.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -859,7 +858,7 @@ GetConsoleMenu (
   Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function always complete successfully.\r
 \r
@@ -879,7 +878,7 @@ GetAllConsoles (
   Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
 \r
 \r
-  @param VOID            EDES_TODO: Add parameter description\r
+              EDES_TODO: Add parameter description\r
 \r
   @retval EFI_SUCCESS    The function always complete successfully.\r
 **/\r
@@ -985,7 +984,7 @@ IsTerminalDevicePath (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1005,7 +1004,7 @@ GetConsoleOutMode (
 \r
   ConOut   = gST->ConOut;\r
   MaxMode  = (UINTN) (ConOut->Mode->MaxMode);\r
-  ModeInfo = EfiLibGetVariable (VarConOutMode, &gEfiGenericPlatformVariableGuid);\r
+  ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);\r
 \r
   if (ModeInfo != NULL) {\r
     CurrentCol = ModeInfo->Column;\r
index c2c6252076f30330dfb85540133414433dd6acde..fb49a6452d28e7061adfcb3bb282d8ff0b11f7f2 100644 (file)
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param CallbackData    The BMM context data.\r
   @param MenuOption      Pointer to menu options to display.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
index 5af27a6388ea5b15ebd8f139611ff28a69b14aea..d0346d809594af3703a4fbbd2ac03cf5cc92715c 100644 (file)
@@ -11,8 +11,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
-#ifndef _FORM_GUID_H\r
-#define _FORM_GUID_H\r
+#ifndef _FORM_GUID_H_\r
+#define _FORM_GUID_H_\r
 \r
 #define BOOT_MAINT_FORMSET_GUID \\r
   { \\r
index 1791a5cca2cc6edd94678ee85c8092e7a2c10200..5f8b1779df265af9676a5dd8021f9214086255d1 100644 (file)
@@ -17,9 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Refresh the global UpdateData structure.\r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -37,7 +37,7 @@ RefreshUpdateData (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -70,7 +70,7 @@ UpdatePageStart (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -130,7 +130,7 @@ UpdatePageEnd (
                          opcode deletion.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -161,7 +161,7 @@ CleanUpPage (
                          of the file to be boot from.\r
 \r
   @retval EFI_SUCCESS    The function completed successfull.\r
-  @retun                 Other value if the boot from the file fails.\r
+  @return                 Other value if the boot from the file fails.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -203,7 +203,7 @@ BootThisFile (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -241,7 +241,7 @@ UpdateConCOMPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -288,7 +288,7 @@ UpdateBootDelPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -326,7 +326,7 @@ UpdateDrvAddHandlePage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -372,7 +372,7 @@ UpdateDrvDelPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -438,13 +438,13 @@ UpdateDriverAddHandleDescPage (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description.\r
+  Update console page.\r
 \r
-  @param UpdatePageId    EDES_TODO: Add parameter description\r
-  @param ConsoleMenu     EDES_TODO: Add parameter description\r
+  @param UpdatePageId    The form ID to be updated.\r
+  @param ConsoleMenu     The console menu list.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -528,7 +528,7 @@ UpdateConsolePage (
   @param OptionMenu      The new list.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -597,7 +597,7 @@ UpdateOrderPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -671,7 +671,7 @@ UpdateBootNextPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -713,7 +713,7 @@ UpdateTimeOutPage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -822,7 +822,7 @@ UpdateConModePage (
 \r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -998,7 +998,7 @@ UpdateTerminalPage (
   @param UpdatePageId    The form ID.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1043,7 +1043,7 @@ UpdatePageBody (
   @param OptionIndex     Returns the index number (#### in Boot####).\r
   @param OptionSize      Return the size of the Boot### variable.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID *\r
@@ -1125,7 +1125,7 @@ GetLegacyBootOptionVar (
   @param UpdatePageId    The form ID. It also spefies the legacy device type.\r
   @param CallbackData    The BMM context data.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -1179,8 +1179,8 @@ UpdateSetLegacyDeviceOrderPage (
   case FORM_SET_FD_ORDER_ID:\r
     OptionMenu  = (BM_MENU_OPTION *) &LegacyFDMenu;\r
     Key         = (UINT16) LEGACY_FD_QUESTION_ID;\r
-    TypeStr     = StrFloppy;\r
-    TypeStrHelp = StrFloppyHelp;\r
+    TypeStr     = STR_FLOPPY;\r
+    TypeStrHelp = STR_FLOPPY_HELP;\r
     BbsType     = BBS_FLOPPY;\r
     LegacyOrder = CallbackData->BmmFakeNvData.LegacyFD;\r
     OldData     = CallbackData->BmmOldFakeNVData.LegacyFD;\r
@@ -1189,8 +1189,8 @@ UpdateSetLegacyDeviceOrderPage (
   case FORM_SET_HD_ORDER_ID:\r
     OptionMenu  = (BM_MENU_OPTION *) &LegacyHDMenu;\r
     Key         = (UINT16) LEGACY_HD_QUESTION_ID;\r
-    TypeStr     = StrHardDisk;\r
-    TypeStrHelp = StrHardDiskHelp;\r
+    TypeStr     = STR_HARDDISK;\r
+    TypeStrHelp = STR_HARDDISK_HELP;\r
     BbsType     = BBS_HARDDISK;\r
     LegacyOrder = CallbackData->BmmFakeNvData.LegacyHD;\r
     OldData     = CallbackData->BmmOldFakeNVData.LegacyHD;\r
@@ -1199,8 +1199,8 @@ UpdateSetLegacyDeviceOrderPage (
   case FORM_SET_CD_ORDER_ID:\r
     OptionMenu  = (BM_MENU_OPTION *) &LegacyCDMenu;\r
     Key         = (UINT16) LEGACY_CD_QUESTION_ID;\r
-    TypeStr     = StrCDROM;\r
-    TypeStrHelp = StrCDROMHelp;\r
+    TypeStr     = STR_CDROM;\r
+    TypeStrHelp = STR_CDROM_HELP;\r
     BbsType     = BBS_CDROM;\r
     LegacyOrder = CallbackData->BmmFakeNvData.LegacyCD;\r
     OldData     = CallbackData->BmmOldFakeNVData.LegacyCD;\r
@@ -1209,8 +1209,8 @@ UpdateSetLegacyDeviceOrderPage (
   case FORM_SET_NET_ORDER_ID:\r
     OptionMenu  = (BM_MENU_OPTION *) &LegacyNETMenu;\r
     Key         = (UINT16) LEGACY_NET_QUESTION_ID;\r
-    TypeStr     = StrNET;\r
-    TypeStrHelp = StrNETHelp;\r
+    TypeStr     = STR_NET;\r
+    TypeStrHelp = STR_NET_HELP;\r
     BbsType     = BBS_EMBED_NETWORK;\r
     LegacyOrder = CallbackData->BmmFakeNvData.LegacyNET;\r
     OldData     = CallbackData->BmmOldFakeNVData.LegacyNET;\r
@@ -1219,8 +1219,8 @@ UpdateSetLegacyDeviceOrderPage (
   case FORM_SET_BEV_ORDER_ID:\r
     OptionMenu  = (BM_MENU_OPTION *) &LegacyBEVMenu;\r
     Key         = (UINT16) LEGACY_BEV_QUESTION_ID;\r
-    TypeStr     = StrBEV;\r
-    TypeStrHelp = StrBEVHelp;\r
+    TypeStr     = STR_BEV;\r
+    TypeStrHelp = STR_BEV_HELP;\r
     BbsType     = BBS_BEV_DEVICE;\r
     LegacyOrder = CallbackData->BmmFakeNvData.LegacyBEV;\r
     OldData     = CallbackData->BmmOldFakeNVData.LegacyBEV;\r
@@ -1329,7 +1329,7 @@ UpdateSetLegacyDeviceOrderPage (
   @param Private         The BMM context data.\r
   @param NewPageId       The original page ID.\r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
index 7837224e7ea0e98899a594383f06e858a57e047b..35faf1ae278f481a3eb762be21562f3b38b38af5 100644 (file)
@@ -19,9 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   After deleting this boot option, call Var_ChangeBootOrder to\r
   make sure BootOrder is in valid state.\r
 \r
-\r
-  @param VOID            EDES_TODO: Add parameter description\r
-\r
   @retval EFI_SUCCESS   If all boot load option EFI Variables corresponding to  \r
                         BM_LOAD_CONTEXT marked for deletion is deleted\r
   @return Others        If failed to update the "BootOrder" variable after deletion. \r
@@ -88,7 +85,7 @@ Var_DelBootOption (
   scratch by content from BootOptionMenu is needed.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval  EFI_SUCCESS  The boot order is updated successfully.\r
   @return               EFI_STATUS other than EFI_SUCCESS if failed to\r
@@ -180,7 +177,7 @@ Var_ChangeBootOrder (
   make sure DriverOrder is in valid state.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS Load Option is successfully updated.\r
   @return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
@@ -241,7 +238,7 @@ Var_DelDriverOption (
   needed.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval  EFI_SUCCESS  The driver order is updated successfully.\r
   @return               EFI_STATUS other than EFI_SUCCESS if failed to\r
@@ -323,9 +320,9 @@ Var_ChangeDriverOrder (
   based on the new BaudRate, Data Bits, parity and Stop Bits\r
   set.\r
 \r
-  @param VOID\r
+  \r
 \r
-  @return VOID\r
+  \r
 \r
 **/\r
 VOID\r
@@ -490,7 +487,7 @@ Var_UpdateConsoleOption (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -509,7 +506,7 @@ Var_UpdateConsoleInpOption (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -528,7 +525,7 @@ Var_UpdateConsoleOutOption (
   console device.\r
 \r
 \r
-  @param VOID\r
+  \r
 \r
   @retval EFI_SUCCESS    The function complete successfully.\r
   @return                The EFI variable can be saved. See gRT->SetVariable \r
@@ -552,7 +549,7 @@ Var_UpdateErrorOutOption (
   @param HiiHandle       The HII handle associated with the BMM formset.\r
   @param DescriptionData The description of this driver option.\r
   @param OptionalData    The optional load option.\r
-  @param ForceReconnect  EDES_TODO: Add parameter description\r
+  @param ForceReconnect  If to force reconnect.\r
 \r
   @retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
   @retval EFI_SUCCESS          If function completes successfully.\r
@@ -736,7 +733,6 @@ Var_UpdateDriverOption (
   @retval EFI_SUCCESS          If function completes successfully.\r
 \r
 **/\r
-\r
 EFI_STATUS\r
 Var_UpdateBootOption (\r
   IN  BMM_CALLBACK_DATA                   *CallbackData,\r
@@ -1429,7 +1425,7 @@ Var_UpdateConMode (
   }\r
 \r
   Status = gRT->SetVariable (\r
-                  VarConOutMode,\r
+                  VAR_CON_OUT_MODE,\r
                   &gEfiGenericPlatformVariableGuid,\r
                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
                   sizeof (CONSOLE_OUT_MODE),\r
index 9a1b3683e95b34e63c4f808f6c5d0323778aff4a..0abd781003c4da9c07f2fd98235835054d773fc5 100644 (file)
@@ -154,12 +154,7 @@ InitializeBootManager (
 }\r
 \r
 /**\r
-  Hook to enable UI timeout override behavior.\r
-\r
-\r
-  @param VOID            EDES_TODO: Add parameter description\r
-\r
-           EDES_TODO: Incomplete Descriptions  NONE\r
+  Invoke Boot Manager. Hook to enable UI timeout override behavior.\r
 \r
 **/\r
 VOID\r