]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
MdeModulePkg: implement NULL instance of MemoryAllocationLib library class
[mirror_edk2.git] / MdeModulePkg / Library / UefiBootManagerLib / InternalBm.h
index ef09050a1a708319b48d476bdb003d802c12556f..978fbff966f6eeba850ef3157039e6cf45414dbb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   BDS library definition, include the file and data structure\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -51,7 +51,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/MemoryTypeInformation.h>\r
 #include <Guid/FileInfo.h>\r
 #include <Guid/GlobalVariable.h>\r
-#include <Guid/Performance.h>\r
 #include <Guid/StatusCodeDataTypeVariable.h>\r
 \r
 #include <Library/PrintLib.h>\r
@@ -69,7 +68,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
 #include <Library/UefiBootManagerLib.h>\r
-#include <Library/TimerLib.h>\r
 #include <Library/DxeServicesLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/CapsuleLib.h>\r
@@ -110,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
@@ -147,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
@@ -185,23 +192,7 @@ BmGetFreeOptionNumber (
   );\r
 \r
 /**\r
-\r
-  Writes performance data of booting into the allocated memory.\r
-  OS can process these records.\r
-\r
-  @param  Event                 The triggered event.\r
-  @param  Context               Context for this event.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-BmWriteBootToOsPerformanceData (\r
-  IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
-  );\r
-\r
-/**\r
-  This routine adjust the memory information for different memory type and \r
+  This routine adjust the memory information for different memory type and\r
   save them into the variables for next boot. It resets the system when\r
   memory information is updated and the current boot option belongs to\r
   boot category instead of application category. It doesn't count the\r
@@ -254,9 +245,9 @@ BmConnectUsbShortFormDevicePath (
 \r
 /**\r
   Stop the hotkey processing.\r
-  \r
-  @param    Event          Event pointer related to hotkey service. \r
-  @param    Context        Context pass to this function. \r
+\r
+  @param    Event          Event pointer related to hotkey service.\r
+  @param    Context        Context pass to this function.\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -274,15 +265,14 @@ BmStopHotkeyService (
                                  then EFI_INVALID_PARAMETER is returned.\r
   @param  VendorGuid             A unique identifier for the vendor.\r
   @param  Attributes             Attributes bitmask to set for the variable.\r
-  @param  DataSize               The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, \r
-                                 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or \r
-                                 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero \r
-                                 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is \r
-                                 set, then a SetVariable() call with a DataSize of zero will not cause any change to \r
-                                 the variable value (the timestamp associated with the variable may be updated however \r
-                                 even if no new data value is provided,see the description of the \r
-                                 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not \r
-                                 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). \r
+  @param  DataSize               The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,\r
+                                 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero\r
+                                 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is\r
+                                 set, then a SetVariable() call with a DataSize of zero will not cause any change to\r
+                                 the variable value (the timestamp associated with the variable may be updated however\r
+                                 even if no new data value is provided,see the description of the\r
+                                 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not\r
+                                 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).\r
   @param  Data                   The contents for the variable.\r
 \r
   @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
@@ -294,9 +284,8 @@ BmStopHotkeyService (
   @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
   @retval EFI_WRITE_PROTECTED    The variable in question is read-only.\r
   @retval EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
-  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS \r
-                                 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo \r
-                                 does NOT pass the validation check carried out by the firmware.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS\r
+                                 being set, but the AuthInfo does NOT pass the validation check carried out by the firmware.\r
 \r
   @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
 **/\r
@@ -347,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