]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / DriverHealthManagerDxe / DriverHealthManagerDxe.h
CommitLineData
3bb5c813
RN
1/** @file\r
2 This module produces two driver health manager forms.\r
3 One will be used by BDS core to configure the Configured Required\r
4 driver health instances, the other will be automatically included by\r
5 firmware setup (UI).\r
6\r
7Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
9d510e61 8SPDX-License-Identifier: BSD-2-Clause-Patent\r
3bb5c813
RN
9\r
10**/\r
11\r
12#ifndef _DRIVER_HEALTH_MANAGEMENT_DXE_H_\r
13#define _DRIVER_HEALTH_MANAGEMENT_DXE_H_\r
14\r
15#include <Uefi.h>\r
16#include <Base.h>\r
17#include <Protocol/ComponentName.h>\r
18#include <Protocol/DriverHealth.h>\r
19#include <Protocol/HiiConfigAccess.h>\r
20#include <Protocol/FormBrowser2.h>\r
21#include <Protocol/HiiDatabase.h>\r
22#include <Guid/MdeModuleHii.h>\r
23\r
24#include <Library/DebugLib.h>\r
25#include <Library/UefiDriverEntryPoint.h>\r
26#include <Library/UefiLib.h>\r
27#include <Library/BaseLib.h>\r
28#include <Library/BaseMemoryLib.h>\r
29#include <Library/MemoryAllocationLib.h>\r
30#include <Library/UefiBootServicesTableLib.h>\r
31#include <Library/UefiRuntimeServicesTableLib.h>\r
32#include <Library/UefiBootManagerLib.h>\r
33#include <Library/HiiLib.h>\r
34#include <Library/PrintLib.h>\r
35#include <Library/DevicePathLib.h>\r
36#include <Library/PcdLib.h>\r
37\r
38///\r
39/// HII specific Vendor Device Path definition.\r
40///\r
41typedef struct {\r
42 VENDOR_DEVICE_PATH VendorDevicePath;\r
43 EFI_DEVICE_PATH_PROTOCOL End;\r
44} FORM_DEVICE_PATH;\r
45\r
46/**\r
47 This function is invoked if user selected a interactive opcode from Driver Health's\r
48 Formset. The decision by user is saved to gCallbackKey for later processing.\r
49\r
50 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
51 @param Action Specifies the type of action taken by the browser.\r
52 @param QuestionId A unique value which is sent to the original exporting driver\r
53 so that it can identify the type of data to expect.\r
54 @param Type The type of value for the question.\r
55 @param Value A pointer to the data being sent to the original exporting driver.\r
56 @param ActionRequest On return, points to the action requested by the callback function.\r
57\r
58 @retval EFI_SUCCESS The callback successfully handled the action.\r
59 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
60\r
61**/\r
62EFI_STATUS\r
63EFIAPI\r
64DriverHealthManagerCallback (\r
65 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
66 IN EFI_BROWSER_ACTION Action,\r
67 IN EFI_QUESTION_ID QuestionId,\r
68 IN UINT8 Type,\r
69 IN EFI_IFR_TYPE_VALUE *Value,\r
70 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
71 );\r
72\r
73/**\r
74 This function allows a caller to extract the current configuration for one\r
75 or more named elements from the target driver.\r
76\r
77\r
78 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
79 @param Request A null-terminated Unicode string in <ConfigRequest> format.\r
80 @param Progress On return, points to a character in the Request string.\r
81 Points to the string's null terminator if request was successful.\r
82 Points to the most recent '&' before the first failing name/value\r
83 pair (or the beginning of the string if the failure is in the\r
84 first name/value pair) if the request was not successful.\r
85 @param Results A null-terminated Unicode string in <ConfigAltResp> format which\r
86 has all values filled in for the names in the Request string.\r
87 String to be allocated by the called function.\r
88\r
89 @retval EFI_SUCCESS The Results is filled with the requested values.\r
90 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.\r
91 @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.\r
92 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
93\r
94**/\r
95EFI_STATUS\r
96EFIAPI\r
97DriverHealthManagerFakeExtractConfig (\r
98 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
99 IN CONST EFI_STRING Request,\r
100 OUT EFI_STRING *Progress,\r
101 OUT EFI_STRING *Results\r
102 );\r
103\r
104/**\r
105 This function processes the results of changes in configuration.\r
106\r
107\r
108 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
109 @param Configuration A null-terminated Unicode string in <ConfigResp> format.\r
110 @param Progress A pointer to a string filled in with the offset of the most\r
111 recent '&' before the first failing name/value pair (or the\r
112 beginning of the string if the failure is in the first\r
113 name/value pair) or the terminating NULL if all was successful.\r
114\r
115 @retval EFI_SUCCESS The Results is processed successfully.\r
116 @retval EFI_INVALID_PARAMETER Configuration is NULL.\r
117 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
118\r
119**/\r
120EFI_STATUS\r
121EFIAPI\r
122DriverHealthManagerFakeRouteConfig (\r
123 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
124 IN CONST EFI_STRING Configuration,\r
125 OUT EFI_STRING *Progress\r
126 );\r
127#endif\r