]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.h
MdeModulePkg: Add DriverHealthManagerDxe driver.
[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
8This program and the accompanying materials\r
9are licensed and made available under the terms and conditions of the BSD License\r
10which accompanies this distribution. The full text of the license may be found at\r
11http://opensource.org/licenses/bsd-license.php\r
12\r
13THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#ifndef _DRIVER_HEALTH_MANAGEMENT_DXE_H_\r
19#define _DRIVER_HEALTH_MANAGEMENT_DXE_H_\r
20\r
21#include <Uefi.h>\r
22#include <Base.h>\r
23#include <Protocol/ComponentName.h>\r
24#include <Protocol/DriverHealth.h>\r
25#include <Protocol/HiiConfigAccess.h>\r
26#include <Protocol/FormBrowser2.h>\r
27#include <Protocol/HiiDatabase.h>\r
28#include <Guid/MdeModuleHii.h>\r
29\r
30#include <Library/DebugLib.h>\r
31#include <Library/UefiDriverEntryPoint.h>\r
32#include <Library/UefiLib.h>\r
33#include <Library/BaseLib.h>\r
34#include <Library/BaseMemoryLib.h>\r
35#include <Library/MemoryAllocationLib.h>\r
36#include <Library/UefiBootServicesTableLib.h>\r
37#include <Library/UefiRuntimeServicesTableLib.h>\r
38#include <Library/UefiBootManagerLib.h>\r
39#include <Library/HiiLib.h>\r
40#include <Library/PrintLib.h>\r
41#include <Library/DevicePathLib.h>\r
42#include <Library/PcdLib.h>\r
43\r
44///\r
45/// HII specific Vendor Device Path definition.\r
46///\r
47typedef struct {\r
48 VENDOR_DEVICE_PATH VendorDevicePath;\r
49 EFI_DEVICE_PATH_PROTOCOL End;\r
50} FORM_DEVICE_PATH;\r
51\r
52/**\r
53 This function is invoked if user selected a interactive opcode from Driver Health's\r
54 Formset. The decision by user is saved to gCallbackKey for later processing.\r
55\r
56 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
57 @param Action Specifies the type of action taken by the browser.\r
58 @param QuestionId A unique value which is sent to the original exporting driver\r
59 so that it can identify the type of data to expect.\r
60 @param Type The type of value for the question.\r
61 @param Value A pointer to the data being sent to the original exporting driver.\r
62 @param ActionRequest On return, points to the action requested by the callback function.\r
63\r
64 @retval EFI_SUCCESS The callback successfully handled the action.\r
65 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
66\r
67**/\r
68EFI_STATUS\r
69EFIAPI\r
70DriverHealthManagerCallback (\r
71 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
72 IN EFI_BROWSER_ACTION Action,\r
73 IN EFI_QUESTION_ID QuestionId,\r
74 IN UINT8 Type,\r
75 IN EFI_IFR_TYPE_VALUE *Value,\r
76 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
77 );\r
78\r
79/**\r
80 This function allows a caller to extract the current configuration for one\r
81 or more named elements from the target driver.\r
82\r
83\r
84 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
85 @param Request A null-terminated Unicode string in <ConfigRequest> format.\r
86 @param Progress On return, points to a character in the Request string.\r
87 Points to the string's null terminator if request was successful.\r
88 Points to the most recent '&' before the first failing name/value\r
89 pair (or the beginning of the string if the failure is in the\r
90 first name/value pair) if the request was not successful.\r
91 @param Results A null-terminated Unicode string in <ConfigAltResp> format which\r
92 has all values filled in for the names in the Request string.\r
93 String to be allocated by the called function.\r
94\r
95 @retval EFI_SUCCESS The Results is filled with the requested values.\r
96 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.\r
97 @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.\r
98 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
99\r
100**/\r
101EFI_STATUS\r
102EFIAPI\r
103DriverHealthManagerFakeExtractConfig (\r
104 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
105 IN CONST EFI_STRING Request,\r
106 OUT EFI_STRING *Progress,\r
107 OUT EFI_STRING *Results\r
108 );\r
109\r
110/**\r
111 This function processes the results of changes in configuration.\r
112\r
113\r
114 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
115 @param Configuration A null-terminated Unicode string in <ConfigResp> format.\r
116 @param Progress A pointer to a string filled in with the offset of the most\r
117 recent '&' before the first failing name/value pair (or the\r
118 beginning of the string if the failure is in the first\r
119 name/value pair) or the terminating NULL if all was successful.\r
120\r
121 @retval EFI_SUCCESS The Results is processed successfully.\r
122 @retval EFI_INVALID_PARAMETER Configuration is NULL.\r
123 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
124\r
125**/\r
126EFI_STATUS\r
127EFIAPI\r
128DriverHealthManagerFakeRouteConfig (\r
129 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
130 IN CONST EFI_STRING Configuration,\r
131 OUT EFI_STRING *Progress\r
132 );\r
133#endif\r