]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
MdeModulePkg/UefiBootManagerLib: limit recursive call depth
[mirror_edk2.git] / MdeModulePkg / Library / UefiBootManagerLib / InternalBm.h
index 25a1d522fe843d7750b6c2301ee60a775c1f6fb5..21ecd8584d24afd7b6ab20b1da367bda0b888d75 100644 (file)
@@ -108,6 +108,12 @@ CHAR16 *
 #define BM_OPTION_NAME_LEN                          sizeof ("PlatformRecovery####")\r
 extern CHAR16  *mBmLoadOptionName[];\r
 \r
+//\r
+// Maximum number of reconnect retry to repair controller; it is to limit the\r
+// number of recursive call of BmRepairAllControllers.\r
+//\r
+#define MAX_RECONNECT_REPAIR                        10\r
+\r
 /**\r
   Visitor function to be called by BmForEachVariable for each variable\r
   in variable storage.\r
@@ -145,10 +151,13 @@ typedef struct {
 \r
 /**\r
   Repair all the controllers according to the Driver Health status queried.\r
+\r
+  @param ReconnectRepairCount     To record the number of recursive call of\r
+                                  this function itself.\r
 **/\r
 VOID\r
 BmRepairAllControllers (\r
-  VOID\r
+  UINTN       ReconnectRepairCount\r
   );\r
 \r
 #define BM_HOTKEY_SIGNATURE SIGNATURE_32 ('b', 'm', 'h', 'k')\r
@@ -327,14 +336,6 @@ BmDelPartMatchInstance (
   IN     EFI_DEVICE_PATH_PROTOCOL  *Single\r
   );\r
 \r
-/**\r
-  Repair all the controllers according to the Driver Health status queried.\r
-**/\r
-VOID\r
-BmRepairAllControllers (\r
-  VOID\r
-  );\r
-\r
 /**\r
   Print the device path info.\r
 \r