/** @file\r
The platform device manager reference implementation\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, 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
//\r
// Which form Id need to be show.\r
//\r
-EFI_FORM_ID mNextShowFormId = DEVICE_MANAGER_FORM_ID; \r
+EFI_FORM_ID mNextShowFormId = DEVICE_MANAGER_FORM_ID;\r
\r
//\r
// The Mac Address show in the NETWORK_DEVICE_LIST_FORM_ID\r
{\r
END_DEVICE_PATH_TYPE,\r
END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
- { \r
+ {\r
(UINT8) (END_DEVICE_PATH_LENGTH),\r
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
}\r
{\r
END_DEVICE_PATH_TYPE,\r
END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
- { \r
+ {\r
(UINT8) (END_DEVICE_PATH_LENGTH),\r
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
}\r
UINT8 ClassGuidNum;\r
\r
ASSERT (Handle != NULL);\r
- ASSERT (SetupClassGuid != NULL); \r
+ ASSERT (SetupClassGuid != NULL);\r
ASSERT (FormSetTitle != NULL);\r
ASSERT (FormSetHelp != NULL);\r
\r
// The return status should always be EFI_BUFFER_TOO_SMALL as input buffer's size is 0.\r
//\r
ASSERT (Status == EFI_BUFFER_TOO_SMALL);\r
- \r
+\r
HiiPackageList = AllocatePool (BufferSize);\r
ASSERT (HiiPackageList != NULL);\r
\r
}\r
}\r
}\r
- \r
+\r
//\r
// Go to next package\r
//\r
/**\r
Get the mac address string from the device path.\r
if the device path has the vlan, get the vanid also.\r
- \r
- @param MacAddressNode Device path begin with mac address \r
+\r
+ @param MacAddressNode Device path begin with mac address\r
@param PBuffer Output string buffer contain mac address.\r
\r
**/\r
-BOOLEAN \r
+BOOLEAN\r
GetMacAddressString(\r
IN MAC_ADDR_DEVICE_PATH *MacAddressNode,\r
OUT CHAR16 **PBuffer\r
*PBuffer = String;\r
StrCpyS (String, BufferLen / sizeof (CHAR16), L"MAC:");\r
String += 4;\r
- \r
+\r
//\r
// Convert the MAC address into a unicode string.\r
//\r
*String++ = L':';\r
}\r
}\r
- \r
+\r
//\r
// If VLAN is configured, it will need extra 5 characters like "\0005".\r
// Plus one unicode character for the null-terminator.\r
@retval EFI_SUCCESS Add the item is successful.\r
@return Other values if failed to Add the item.\r
**/\r
-BOOLEAN \r
+BOOLEAN\r
AddIdToMacDeviceList (\r
IN EFI_STRING MacAddrString\r
)\r
} else {\r
TempDeviceList = (MENU_INFO_ITEM *)AllocatePool (sizeof (MENU_INFO_ITEM) * mMacDeviceList.MaxListLen);\r
}\r
- \r
+\r
if (TempDeviceList == NULL) {\r
return FALSE;\r
}\r
- TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId; \r
+ TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId;\r
TempDeviceList[mMacDeviceList.CurListLen].QuestionId = (EFI_QUESTION_ID) (mMacDeviceList.CurListLen + NETWORK_DEVICE_LIST_KEY_OFFSET);\r
- \r
+\r
mMacDeviceList.NodeList = TempDeviceList;\r
}\r
mMacDeviceList.CurListLen ++;\r
\r
@param *Node Input device which need to be check.\r
@param *NeedAddItem Whether need to add the menu in the network device list.\r
- \r
+\r
@retval TRUE Has mac address device path.\r
- @retval FALSE NOT Has mac address device path. \r
+ @retval FALSE NOT Has mac address device path.\r
\r
**/\r
BOOLEAN\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
CHAR16 *Buffer;\r
BOOLEAN ReturnVal;\r
- \r
+\r
ASSERT (Node != NULL);\r
*NeedAddItem = FALSE;\r
ReturnVal = FALSE;\r
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
(DevicePathSubType (DevicePath) == MSG_MAC_ADDR_DP)) {\r
ReturnVal = TRUE;\r
- \r
+\r
if (DEVICE_MANAGER_FORM_ID == mNextShowFormId) {\r
*NeedAddItem = TRUE;\r
break;\r
- } \r
- \r
+ }\r
+\r
if (!GetMacAddressString((MAC_ADDR_DEVICE_PATH*)DevicePath, &Buffer)) {\r
break;\r
}\r
\r
if (NETWORK_DEVICE_LIST_FORM_ID == mNextShowFormId) {\r
//\r
- // Same handle may has two network child handle, so the questionid \r
+ // Same handle may has two network child handle, so the questionid\r
// has the offset of SAME_HANDLE_KEY_OFFSET.\r
//\r
if (AddIdToMacDeviceList (Buffer)) {\r
}\r
break;\r
}\r
- } \r
+ }\r
DevicePath = NextDevicePathNode (DevicePath);\r
}\r
\r
@return FALSE Do not need to add the menu about the network.\r
\r
**/\r
-BOOLEAN \r
+BOOLEAN\r
IsNeedAddNetworkMenu (\r
IN EFI_HII_HANDLE Handle,\r
OUT UINTN *ItemCount\r
{\r
EFI_STATUS Status;\r
UINTN EntryCount;\r
- UINTN Index; \r
+ UINTN Index;\r
EFI_HANDLE DriverHandle;\r
EFI_HANDLE ControllerHandle;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
}\r
TmpDevicePath = DevicePath;\r
\r
- // \r
+ //\r
// Check whether this device path include mac address device path.\r
- // If this path has mac address path, get the value whether need \r
+ // If this path has mac address path, get the value whether need\r
// add this info to the menu and return.\r
// Else check more about the child handle devcie path.\r
//\r
}\r
\r
if (!IsDevicePathEnd (TmpDevicePath)) {\r
- return FALSE; \r
+ return FALSE;\r
}\r
\r
//\r
continue;\r
}\r
\r
- // \r
+ //\r
// Check whether this device path include mac address device path.\r
//\r
if (!IsMacAddressDevicePath(ChildDevicePath, &IsNeedAdd)) {\r
} else {\r
//\r
// If need to update other form, return whether need to add to the menu.\r
- // \r
+ //\r
goto Done;\r
}\r
}\r
\r
Done:\r
if (OpenInfoBuffer != NULL) {\r
- FreePool (OpenInfoBuffer); \r
+ FreePool (OpenInfoBuffer);\r
}\r
- return IsNeedAdd; \r
+ return IsNeedAdd;\r
}\r
\r
/**\r
@param HiiHandles The input HiiHandle array.\r
@param GuidLists The input form set guid lists.\r
@param ArrayCount The input array count, new array will be arraycount + 1 size.\r
- @param Offset The current used HiiHandle's Offset. \r
+ @param Offset The current used HiiHandle's Offset.\r
@param FormSetGuid The new found formset guid.\r
\r
**/\r
\r
This function create the dynamic content for device manager. It includes\r
section header for all class of devices, one-of opcode to set VBIOS.\r
- \r
+\r
@retval EFI_SUCCESS Operation is successful.\r
@return Other values if failed to clean up the dynamic content from HII\r
database.\r
NewStringLen += (StrLen(String) + 2) * 2;\r
NewStringTitle = AllocatePool (NewStringLen);\r
UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);\r
- HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL); \r
+ HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);\r
FreePool (String);\r
FreePool (NewStringTitle);\r
}\r
}\r
\r
//\r
- // One HiiHandle has more than one formset can be shown, \r
+ // One HiiHandle has more than one formset can be shown,\r
// Insert a new pair of HiiHandle + Guid to the HiiHandles and GuidLists list.\r
- // \r
+ //\r
if (SkipCount > 0) {\r
AdjustArrayData (&HiiHandles, &GuidLists, HandleNum, Index + 1, FormSetGuid);\r
HandleNum ++;\r
\r
//\r
// Network device process\r
- // \r
+ //\r
if (IsNeedAddNetworkMenu (HiiHandles[Index], &AddItemCount)) {\r
if (mNextShowFormId == DEVICE_MANAGER_FORM_ID) {\r
//\r
}\r
} else {\r
//\r
- // \r
+ //\r
// Not network device process, only need to show at device manger form.\r
//\r
if (mNextShowFormId == DEVICE_MANAGER_FORM_ID) {\r
}\r
\r
//\r
- // Driver Health item chose. \r
+ // Driver Health item chose.\r
//\r
if (gCallbackKey == DEVICE_MANAGER_KEY_DRIVER_HEALTH) {\r
CallDriverHealth ();\r
// In this case, go from the network device list to the specify device.\r
//\r
if ((gCallbackKey < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET ) && (gCallbackKey >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {\r
- mNextShowFormId = NETWORK_DEVICE_FORM_ID;\r
+ mNextShowFormId = NETWORK_DEVICE_FORM_ID;\r
gCallbackKey = FRONT_PAGE_KEY_DEVICE_MANAGER;\r
goto Done;\r
}\r
}\r
\r
/**\r
- Collect and display the platform's driver health relative information, allow user to do interactive \r
+ Collect and display the platform's driver health relative information, allow user to do interactive\r
operation while the platform is unhealthy.\r
\r
- This function display a form which divided into two parts. The one list all modules which has installed \r
+ This function display a form which divided into two parts. The one list all modules which has installed\r
driver health protocol. The list usually contain driver name, controller name, and it's health info.\r
While the driver name can't be retrieved, will use device path as backup. The other part of the form provide\r
a choice to the user to repair all platform.\r
VOID\r
)\r
{\r
- EFI_STATUS Status; \r
+ EFI_STATUS Status;\r
EFI_HII_HANDLE HiiHandle;\r
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
EFI_IFR_GUID_LABEL *StartLabel;\r
UINTN StringSize;\r
\r
Index = 0;\r
- DriverHealthInfo = NULL; \r
+ DriverHealthInfo = NULL;\r
DriverDevicePath = NULL;\r
IsControllerNameEmpty = FALSE;\r
InitializeListHead (&DriverHealthList);\r
\r
Link = GetFirstNode (&DriverHealthList);\r
\r
- while (!IsNull (&DriverHealthList, Link)) { \r
- DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link); \r
+ while (!IsNull (&DriverHealthList, Link)) {\r
+ DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link);\r
\r
Status = DriverHealthGetDriverName (DriverHealthInfo->DriverHandle, &DriverName);\r
if (EFI_ERROR (Status)) {\r
StringSize = StrSize (DriverName);\r
\r
Status = DriverHealthGetControllerName (\r
- DriverHealthInfo->DriverHandle, \r
- DriverHealthInfo->ControllerHandle, \r
- DriverHealthInfo->ChildHandle, \r
+ DriverHealthInfo->DriverHandle,\r
+ DriverHealthInfo->ControllerHandle,\r
+ DriverHealthInfo->ChildHandle,\r
&ControllerName\r
);\r
\r
} else {\r
IsControllerNameEmpty = TRUE;\r
}\r
- \r
+\r
//\r
// Add the message of the Module itself provided after the string item.\r
//\r
if ((DriverHealthInfo->MessageList != NULL) && (DriverHealthInfo->MessageList->StringId != 0)) {\r
TmpString = HiiGetString (\r
- DriverHealthInfo->MessageList->HiiHandle, \r
- DriverHealthInfo->MessageList->StringId, \r
+ DriverHealthInfo->MessageList->HiiHandle,\r
+ DriverHealthInfo->MessageList->StringId,\r
NULL\r
);\r
ASSERT (TmpString != NULL);\r
- \r
+\r
StringSize += StrLen (L" ") * sizeof(CHAR16);\r
StringSize += StrLen (TmpString) * sizeof(CHAR16);\r
\r
String = (EFI_STRING) AllocateZeroPool (StringSize);\r
ASSERT (String != NULL);\r
- \r
+\r
StrCpyS (String, StringSize / sizeof(CHAR16), DriverName);\r
if (!IsControllerNameEmpty) {\r
StrCatS (String, StringSize / sizeof(CHAR16), L" ");\r
\r
String = (EFI_STRING) AllocateZeroPool (StringSize);\r
ASSERT (String != NULL);\r
- \r
+\r
StrCpyS (String, StringSize / sizeof (CHAR16), DriverName);\r
if (!IsControllerNameEmpty) {\r
StrCatS (String, StringSize / sizeof (CHAR16), L" ");\r
Index++;\r
Link = GetNextNode (&DriverHealthList, Link);\r
}\r
- \r
+\r
//\r
// Add End Opcode for Subtitle\r
- // \r
+ //\r
HiiCreateEndOpCode (StartOpCodeHandle);\r
\r
HiiCreateSubTitleOpCode (StartOpCodeHandleRepair, STRING_TOKEN (STR_DRIVER_HEALTH_REPAIR_ALL), 0, 0, 1);\r
- TokenHelp = HiiSetString (HiiHandle, 0, GetStringById( STRING_TOKEN (STR_DH_REPAIR_ALL_HELP)), NULL); \r
+ TokenHelp = HiiSetString (HiiHandle, 0, GetStringById( STRING_TOKEN (STR_DH_REPAIR_ALL_HELP)), NULL);\r
\r
if (PlaformHealthStatusCheck ()) {\r
//\r
// We will have returned from processing a callback - user either hit ESC to exit, or selected\r
// a target to display.\r
// Process the diver health status states here.\r
- // \r
+ //\r
if (gCallbackKey >= DRIVER_HEALTH_KEY_OFFSET && gCallbackKey != DRIVER_HEALTH_REPAIR_ALL_KEY) {\r
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
\r
//\r
// Got the item relative node in the List\r
//\r
- if (Index == (gCallbackKey - DRIVER_HEALTH_KEY_OFFSET)) { \r
+ if (Index == (gCallbackKey - DRIVER_HEALTH_KEY_OFFSET)) {\r
DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link);\r
//\r
// Process the driver's healthy status for the specify module\r
RebootRequired = FALSE;\r
ProcessSingleControllerHealth (\r
DriverHealthInfo->DriverHealth,\r
- DriverHealthInfo->ControllerHandle, \r
+ DriverHealthInfo->ControllerHandle,\r
DriverHealthInfo->ChildHandle,\r
DriverHealthInfo->HealthStatus,\r
&(DriverHealthInfo->MessageList),\r
if (ActionRequest == EFI_BROWSER_ACTION_REQUEST_RESET) {\r
EnableResetRequired ();\r
}\r
- \r
+\r
//\r
- // Force return to the form of Driver Health in Device Manager \r
+ // Force return to the form of Driver Health in Device Manager\r
//\r
gCallbackKey = DRIVER_HEALTH_RETURN_KEY;\r
}\r
//\r
if (gCallbackKey == DRIVER_HEALTH_REPAIR_ALL_KEY) {\r
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
- \r
+\r
PlatformRepairAll (&DriverHealthList);\r
\r
gCallbackKey = DRIVER_HEALTH_RETURN_KEY;\r
}\r
- \r
+\r
//\r
// Remove driver health packagelist from HII database.\r
//\r
if (DriverHealthInfo->MessageList != NULL) {\r
FreePool(DriverHealthInfo->MessageList);\r
FreePool (DriverHealthInfo);\r
- } \r
+ }\r
}\r
\r
HiiFreeOpCodeHandle (StartOpCodeHandle);\r
- HiiFreeOpCodeHandle (EndOpCodeHandle); \r
+ HiiFreeOpCodeHandle (EndOpCodeHandle);\r
HiiFreeOpCodeHandle (StartOpCodeHandleRepair);\r
- HiiFreeOpCodeHandle (EndOpCodeHandleRepair); \r
+ HiiFreeOpCodeHandle (EndOpCodeHandleRepair);\r
\r
if (gCallbackKey == DRIVER_HEALTH_RETURN_KEY) {\r
//\r
This function called by CheckAllControllersHealthStatus () function in order to process a specify\r
contoller's health state.\r
\r
- @param DriverHealthList A Pointer to the list contain all of the platform driver health information. \r
+ @param DriverHealthList A Pointer to the list contain all of the platform driver health information.\r
@param DriverHandle The handle of driver.\r
@param ControllerHandle The class guid specifies which form set will be displayed.\r
- @param ChildHandle The handle of the child controller to retrieve the health \r
- status on. This is an optional parameter that may be NULL. \r
+ @param ChildHandle The handle of the child controller to retrieve the health\r
+ status on. This is an optional parameter that may be NULL.\r
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r
@param HealthStatus The health status of the controller.\r
\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- DriverHealthInfo->Signature = DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE; \r
+ DriverHealthInfo->Signature = DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE;\r
DriverHealthInfo->DriverHandle = DriverHandle;\r
DriverHealthInfo->ControllerHandle = ControllerHandle;\r
DriverHealthInfo->ChildHandle = ChildHandle;\r
}\r
\r
/**\r
- Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, \r
- and queries each EFI Driver Health Protocol to determine if one or more of the controllers \r
- managed by each EFI Driver Health Protocol instance are not healthy. \r
+ Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database,\r
+ and queries each EFI Driver Health Protocol to determine if one or more of the controllers\r
+ managed by each EFI Driver Health Protocol instance are not healthy.\r
\r
@param DriverHealthList A Pointer to the list contain all of the platform driver health\r
- information. \r
+ information.\r
\r
@retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol.\r
@retval EFI_SUCCESS All the controllers in the platform are healthy.\r
IN OUT LIST_ENTRY *DriverHealthList\r
)\r
{\r
- EFI_STATUS Status; \r
+ EFI_STATUS Status;\r
UINTN NumHandles;\r
EFI_HANDLE *DriverHealthHandles;\r
EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth;\r
UINTN HandleCount;\r
UINTN ControllerIndex;\r
UINTN ChildIndex;\r
- \r
+\r
//\r
// Initialize local variables\r
//\r
\r
if (EFI_ERROR (Status) || DriverHealthHandles == NULL) {\r
//\r
- // If the list of Driver Health Protocol handles can not be retrieved, then \r
+ // If the list of Driver Health Protocol handles can not be retrieved, then\r
// return EFI_OUT_OF_RESOURCES\r
//\r
return EFI_OUT_OF_RESOURCES;\r
//\r
// Retrieve the Driver Health Protocol from DriverHandle\r
//\r
- Status = gBS->HandleProtocol ( \r
+ Status = gBS->HandleProtocol (\r
DriverHealthHandles[DriverHealthIndex],\r
&gEfiDriverHealthProtocolGuid,\r
(VOID **)&DriverHealth\r
}\r
\r
//\r
- // If all the controllers managed by this Driver Health Protocol are healthy, then skip to the next \r
+ // If all the controllers managed by this Driver Health Protocol are healthy, then skip to the next\r
// Driver Health Protocol handle\r
//\r
if (HealthStatus == EfiDriverHealthStatusHealthy) {\r
);\r
if (EFI_ERROR (Status) || Handles == NULL) {\r
//\r
- // If all the handles in the handle database can not be retrieved, then \r
+ // If all the handles in the handle database can not be retrieved, then\r
// return EFI_OUT_OF_RESOURCES\r
//\r
Status = EFI_OUT_OF_RESOURCES;\r
\r
\r
/**\r
- Check the healthy status of the platform, this function will return immediately while found one driver \r
+ Check the healthy status of the platform, this function will return immediately while found one driver\r
in the platform are not healthy.\r
\r
@retval FALSE at least one driver in the platform are not healthy.\r
}\r
//\r
// Assume all modules are healthy.\r
- // \r
+ //\r
AllHealthy = TRUE;\r
\r
//\r
// Found one or more Handles.\r
//\r
- if (!EFI_ERROR (Status)) { \r
+ if (!EFI_ERROR (Status)) {\r
for (Index = 0; Index < NoHandles; Index++) {\r
Status = gBS->HandleProtocol (\r
DriverHealthHandles[Index],\r
//\r
// Return immediately one driver's status not in healthy.\r
//\r
- return FALSE; \r
+ return FALSE;\r
}\r
}\r
}\r
}\r
\r
/**\r
- Processes a single controller using the EFI Driver Health Protocol associated with \r
+ Processes a single controller using the EFI Driver Health Protocol associated with\r
that controller. This algorithm continues to query the GetHealthStatus() service until\r
- one of the legal terminal states of the EFI Driver Health Protocol is reached. This may \r
+ one of the legal terminal states of the EFI Driver Health Protocol is reached. This may\r
require the processing of HII Messages, HII Form, and invocation of repair operations.\r
\r
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r
@param ControllerHandle The class guid specifies which form set will be displayed.\r
- @param ChildHandle The handle of the child controller to retrieve the health \r
- status on. This is an optional parameter that may be NULL. \r
+ @param ChildHandle The handle of the child controller to retrieve the health\r
+ status on. This is an optional parameter that may be NULL.\r
@param HealthStatus The health status of the controller.\r
- @param MessageList An array of warning or error messages associated \r
- with the controller specified by ControllerHandle and \r
+ @param MessageList An array of warning or error messages associated\r
+ with the controller specified by ControllerHandle and\r
ChildHandle. This is an optional parameter that may be NULL.\r
- @param FormHiiHandle The HII handle for an HII form associated with the \r
+ @param FormHiiHandle The HII handle for an HII form associated with the\r
controller specified by ControllerHandle and ChildHandle.\r
@param RebootRequired Indicate whether a reboot is required to repair the controller.\r
**/\r
{\r
EFI_STATUS Status;\r
EFI_DRIVER_HEALTH_STATUS LocalHealthStatus;\r
- \r
+\r
LocalHealthStatus = HealthStatus;\r
//\r
// If the module need to be repaired or reconfiguration, will process it until\r
- // reach a terminal status. The status from EfiDriverHealthStatusRepairRequired after repair \r
+ // reach a terminal status. The status from EfiDriverHealthStatusRepairRequired after repair\r
// will be in (Health, Failed, Configuration Required).\r
//\r
while(LocalHealthStatus == EfiDriverHealthStatusConfigurationRequired ||\r
);\r
}\r
//\r
- // Via a form of the driver need to do configuration provided to process of status in \r
+ // Via a form of the driver need to do configuration provided to process of status in\r
// EfiDriverHealthStatusConfigurationRequired. The status after configuration should be in\r
- // (Healthy, Reboot Required, Failed, Reconnect Required, Repair Required). \r
+ // (Healthy, Reboot Required, Failed, Reconnect Required, Repair Required).\r
//\r
if (LocalHealthStatus == EfiDriverHealthStatusConfigurationRequired) {\r
if (FormHiiHandle != NULL) {\r
\r
if (*MessageList != NULL) {\r
ProcessMessages (*MessageList);\r
- } \r
+ }\r
}\r
- \r
+\r
//\r
// Health status in {Healthy, Failed} may also have Messages need to process\r
//\r
if (LocalHealthStatus == EfiDriverHealthStatusRebootRequired) {\r
*RebootRequired = TRUE;\r
}\r
- \r
+\r
//\r
// Do reconnect if need.\r
//\r
/**\r
Reports the progress of a repair operation.\r
\r
- @param[in] Value A value between 0 and Limit that identifies the current \r
+ @param[in] Value A value between 0 and Limit that identifies the current\r
progress of the repair operation.\r
\r
@param[in] Limit The maximum value of Value for the current repair operation.\r
- For example, a driver that wants to specify progress in \r
+ For example, a driver that wants to specify progress in\r
percent would use a Limit value of 100.\r
\r
@retval EFI_SUCCESS The progress of a repair operation is reported successfully.\r
Processes a set of messages returned by the GetHealthStatus ()\r
service of the EFI Driver Health Protocol\r
\r
- @param MessageList The MessageList point to messages need to processed. \r
+ @param MessageList The MessageList point to messages need to processed.\r
\r
**/\r
VOID\r
);\r
if (MessageString != NULL) {\r
//\r
- // User can customize the output. Just simply print out the MessageString like below. \r
+ // User can customize the output. Just simply print out the MessageString like below.\r
// Also can use the HiiHandle to display message on the front page.\r
- // \r
+ //\r
// Print(L"%s\n",MessageString);\r
// gBS->Stall (100000);\r
}\r
Repair the whole platform.\r
\r
This function is the main entry for user choose "Repair All" in the front page.\r
- It will try to do recovery job till all the driver health protocol installed modules \r
+ It will try to do recovery job till all the driver health protocol installed modules\r
reach a terminal state.\r
\r
@param DriverHealthList A Pointer to the list contain all of the platform driver health\r
PlatformRepairAll (\r
IN LIST_ENTRY *DriverHealthList\r
)\r
-{ \r
+{\r
DRIVER_HEALTH_INFO *DriverHealthInfo;\r
LIST_ENTRY *Link;\r
BOOLEAN RebootRequired;\r
//\r
ASSERT (DriverHealthInfo != NULL);\r
\r
- ProcessSingleControllerHealth ( \r
+ ProcessSingleControllerHealth (\r
DriverHealthInfo->DriverHealth,\r
DriverHealthInfo->ControllerHandle,\r
DriverHealthInfo->ChildHandle,\r
\r
/**\r
\r
- Select the best matching language according to front page policy for best user experience. \r
- \r
- This function supports both ISO 639-2 and RFC 4646 language codes, but language \r
- code types may not be mixed in a single call to this function. \r
+ Select the best matching language according to front page policy for best user experience.\r
+\r
+ This function supports both ISO 639-2 and RFC 4646 language codes, but language\r
+ code types may not be mixed in a single call to this function.\r
\r
@param SupportedLanguages A pointer to a Null-terminated ASCII string that\r
- contains a set of language codes in the format \r
+ contains a set of language codes in the format\r
specified by Iso639Language.\r
@param Iso639Language If TRUE, then all language codes are assumed to be\r
in ISO 639-2 format. If FALSE, then all language\r
codes are assumed to be in RFC 4646 language format.\r
\r
@retval NULL The best matching language could not be found in SupportedLanguages.\r
- @retval NULL There are not enough resources available to return the best matching \r
+ @retval NULL There are not enough resources available to return the best matching\r
language.\r
- @retval Other A pointer to a Null-terminated ASCII string that is the best matching \r
+ @retval Other A pointer to a Null-terminated ASCII string that is the best matching\r
language in SupportedLanguages.\r
**/\r
CHAR8 *\r
@param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID.\r
@param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r
@param ComponentName A pointer to the Component Name (2) protocol interface.\r
- @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the \r
+ @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the\r
located Component Name (2) instance.\r
\r
@retval EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find\r
EFI_COMPONENT_NAME_PROTOCOL *ComponentName;\r
\r
//\r
- // Retrieve Component Name (2) protocol instance on the driver binding handle and \r
- // find the best language this instance supports. \r
+ // Retrieve Component Name (2) protocol instance on the driver binding handle and\r
+ // find the best language this instance supports.\r
//\r
Status = GetComponentNameWorker (\r
ProtocolGuid,\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
//\r
// Get the driver name from Component Name (2) protocol instance on the driver binging handle.\r
//\r
DriverName\r
);\r
FreePool (BestLanguage);\r
- \r
+\r
return Status;\r
}\r
\r
This function gets driver name from Component Name 2 protocol interface and Component Name protocol interface\r
in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the driver name.\r
If the attempt fails, it then gets the driver name from EFI 1.1 Component Name protocol for backward\r
- compatibility support. \r
+ compatibility support.\r
\r
@param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r
@param DriverName A pointer to the Unicode string to return. This Unicode string is the name\r
This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface\r
in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name.\r
If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward\r
- compatibility support. \r
+ compatibility support.\r
\r
@param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID.\r
@param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r
EFI_COMPONENT_NAME_PROTOCOL *ComponentName;\r
\r
//\r
- // Retrieve Component Name (2) protocol instance on the driver binding handle and \r
- // find the best language this instance supports. \r
+ // Retrieve Component Name (2) protocol instance on the driver binding handle and\r
+ // find the best language this instance supports.\r
//\r
Status = GetComponentNameWorker (\r
ProtocolGuid,\r
/**\r
\r
This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface\r
- in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. \r
+ in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name.\r
If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward\r
- compatibility support. \r
+ compatibility support.\r
\r
@param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r
@param ControllerHandle The handle of a controller that the driver specified by This is managing.\r