]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.c
index 5d94bc0760c62233a1e01e7c2426a3bfbe999e84..b70c2c36bc4f7059626ebbb9d0dadc1aefe98f6c 100644 (file)
@@ -3,8 +3,8 @@
   and manage the legacy boot option, all legacy boot option is getting from\r
   the legacy BBS table.\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -675,12 +675,13 @@ BdsCreateOneLegacyBootOption (
 }\r
 \r
 /**\r
-\r
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
-  @retval EFI_SUCCESS       The boot options are added successfully \r
-                            or they are already in boot options.\r
-\r
+  @retval EFI_SUCCESS          The boot options are added successfully \r
+                               or they are already in boot options.\r
+  @retval EFI_NOT_FOUND        No legacy boot options is found.\r
+  @retval EFI_OUT_OF_RESOURCE  No enough memory.\r
+  @return Other value          LegacyBoot options are not added.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -826,12 +827,12 @@ BdsFillDevOrderBuf (
   @param BbsTable        The BBS table.\r
   @param BbsCount        The BBS Count.\r
 \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
+  @retval EFI_SUCCES             The buffer is created and the EFI variable named \r
+                                 VAR_LEGACY_DEV_ORDER and EfiLegacyDevOrderGuid is\r
+                                 set correctly.\r
+  @retval EFI_OUT_OF_RESOURCES   Memmory or storage is not enough.\r
+  @retval EFI_DEVICE_ERROR       Fail to add the device order into EFI variable fail\r
+                                 because of hardware error.\r
 **/\r
 EFI_STATUS\r
 BdsCreateDevOrder (\r
@@ -968,12 +969,14 @@ BdsCreateDevOrder (
 }\r
 \r
 /**\r
-\r
   Add the legacy boot devices from BBS table into \r
   the legacy device boot order.\r
 \r
-  @retval EFI_SUCCESS       The boot devices are added successfully.\r
-\r
+  @retval EFI_SUCCESS           The boot devices are added successfully.\r
+  @retval EFI_NOT_FOUND         The legacy boot devices are not found.\r
+  @retval EFI_OUT_OF_RESOURCES  Memmory or storage is not enough.\r
+  @retval EFI_DEVICE_ERROR      Fail to add the legacy device boot order into EFI variable\r
+                                because of hardware error.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1414,8 +1417,9 @@ BdsUpdateLegacyDevOrder (
   @param LocalBbsTable   The BBS table.\r
   @param Priority        The prority table.\r
 \r
-  @retval EFI_SUCCESS    The function completes successfully.\r
-  @retval EFI_NOT_FOUND  Failed to find device.\r
+  @retval EFI_SUCCESS           The function completes successfully.\r
+  @retval EFI_NOT_FOUND         Failed to find device.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to get the efi variable of device order.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1482,11 +1486,12 @@ BdsSetBootPriority4SameTypeDev (
   Print the BBS Table.\r
 \r
   @param LocalBbsTable   The BBS table.\r
-\r
+  @param BbsCount        The count of entry in BBS table.\r
 **/\r
 VOID\r
 PrintBbsTable (\r
-  IN BBS_TABLE                      *LocalBbsTable\r
+  IN BBS_TABLE  *LocalBbsTable,\r
+  IN UINT16     BbsCount\r
   )\r
 {\r
   UINT16  Idx;\r
@@ -1494,7 +1499,7 @@ PrintBbsTable (
   DEBUG ((DEBUG_ERROR, "\n"));\r
   DEBUG ((DEBUG_ERROR, " NO  Prio bb/dd/ff cl/sc Type Stat segm:offs\n"));\r
   DEBUG ((DEBUG_ERROR, "=============================================\n"));\r
-  for (Idx = 0; Idx < MAX_BBS_ENTRIES; Idx++) {\r
+  for (Idx = 0; Idx < BbsCount; Idx++) {\r
     if ((LocalBbsTable[Idx].BootPriority == BBS_IGNORE_ENTRY) ||\r
         (LocalBbsTable[Idx].BootPriority == BBS_DO_NOT_BOOT_FROM) ||\r
         (LocalBbsTable[Idx].BootPriority == BBS_LOWEST_PRIORITY)\r
@@ -1525,13 +1530,13 @@ PrintBbsTable (
 }\r
 \r
 /**\r
-\r
   Set the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  Entry             The boot option is to be checked for refresh BBS table.\r
   \r
-  @retval EFI_SUCCESS       The boot priority for BBS entries is refreshed successfully.\r
-  @return status of BdsSetBootPriority4SameTypeDev()\r
+  @retval EFI_SUCCESS           The boot priority for BBS entries is refreshed successfully.\r
+  @retval EFI_NOT_FOUND         BBS entries can't be found.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to get the legacy device boot order.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1660,7 +1665,7 @@ BdsRefreshBbsTableForBoot (
   }\r
 \r
   DEBUG_CODE_BEGIN();\r
-    PrintBbsTable (LocalBbsTable);\r
+    PrintBbsTable (LocalBbsTable, BbsCount);\r
   DEBUG_CODE_END();\r
   \r
   return Status;\r