/** @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) 2019, NVIDIA CORPORATION. All rights reserved.\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
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#include <Protocol/VariableLock.h>\r
#include <Protocol/RamDisk.h>\r
#include <Protocol/DeferredImageLoad.h>\r
+#include <Protocol/PlatformBootManager.h>\r
\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
+#include <Guid/StatusCodeDataTypeId.h>\r
#include <Guid/StatusCodeDataTypeVariable.h>\r
\r
#include <Library/PrintLib.h>\r
#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
\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
);\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
\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
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
+ @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
+ 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
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