]>
Commit | Line | Data |
---|---|---|
216cadbb | 1 | /*++\r |
2 | \r | |
bbeea0de | 3 | Copyright (c) 2008-2013, Intel Corporation. All rights reserved.<BR>\r |
f57387d5 | 4 | This program and the accompanying materials\r |
216cadbb | 5 | are licensed and made available under the terms and conditions of the BSD License\r |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | PlatformToDriverConfiguration.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | UEFI Platform to Driver Configuration Protocol\r | |
19 | \r | |
20 | Revision History:\r | |
21 | \r | |
22 | --*/\r | |
23 | \r | |
24 | #ifndef _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_\r | |
25 | #define _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_\r | |
26 | \r | |
27 | //\r | |
28 | // Global ID for the Platform to Driver Configuration Protocol\r | |
29 | //\r | |
30 | #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID \\r | |
31 | { \\r | |
32 | 0x642cd590, 0x8059, 0x4c0a, {0xa9, 0x58, 0xc5, 0xec, 0x07, 0xd2, 0x3c, 0x4b} \\r | |
33 | }\r | |
34 | \r | |
35 | #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID \\r | |
36 | { \\r | |
37 | 0x345ecc0e, 0x0cb6, 0x4b75, {0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33, 0x3e} \\r | |
38 | }\r | |
39 | \r | |
40 | EFI_FORWARD_DECLARATION (EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL);\r | |
41 | \r | |
42 | typedef enum {\r | |
43 | EfiPlatformConfigurationActionNone = 0,\r | |
44 | EfiPlatformConfigurationActionStopController = 1,\r | |
45 | EfiPlatformConfigurationActionRestartController = 2,\r | |
46 | EfiPlatformConfigurationActionRestartPlatform = 3,\r | |
47 | EfiPlatformConfigurationActionNvramFailed = 4,\r | |
48 | EfiPlatformConfigurationActionMaximum\r | |
49 | } EFI_PLATFORM_CONFIGURATION_ACTION;\r | |
50 | \r | |
51 | typedef struct {\r | |
52 | CHAR8 *CLPCommand;\r | |
53 | UINT32 CLPCommandLength;\r | |
54 | CHAR8 *CLPReturnString;\r | |
55 | UINT32 CLPReturnStringLength;\r | |
56 | UINT8 CLPCmdStatus;\r | |
57 | UINT8 CLPErrorValue;\r | |
58 | UINT16 CLPMsgCode;\r | |
59 | } EFI_CONFIGURE_CLP_PARAMETER_BLK;\r | |
60 | \r | |
61 | typedef\r | |
62 | EFI_STATUS\r | |
63 | (EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY) (\r | |
64 | IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This,\r | |
65 | IN EFI_HANDLE ControllerHandle,\r | |
66 | IN EFI_HANDLE ChildHandle, OPTIONAL\r | |
67 | IN UINTN *Instance,\r | |
68 | OUT EFI_GUID **ParameterTypeGuid,\r | |
69 | OUT VOID **ParameterBlock,\r | |
70 | OUT UINTN *ParameterBlockSize\r | |
71 | );\r | |
72 | /*++\r | |
73 | \r | |
74 | Routine Description:\r | |
75 | Allows the UEFI driver to query the platform for configuration information\r | |
76 | needed to complete the drivers Start() operation.\r | |
77 | \r | |
78 | Arguments:\r | |
79 | This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.\r | |
80 | ControllerHandle - The handle the platform will return configuration\r | |
81 | information about.\r | |
82 | ChildHandle - The handle of the child controller to set options on.\r | |
83 | This is an optional parameter that may be NULL. It will\r | |
84 | be NULL for device drivers, and for a bus drivers that\r | |
85 | wish to set options for the bus controller. It will not\r | |
86 | be NULL for a bus driver that wishes to set options for\r | |
87 | one of its child controllers.\r | |
88 | Instance - Pointer to the Instance value. Zero means return the first\r | |
89 | query data. The caller should increment this value by one\r | |
90 | each time to retrieve successive data.\r | |
91 | ParameterTypeGuid - An EFI_GUID that defines the contents of ParameterBlock.\r | |
92 | UEFI drivers must use the ParameterTypeGuid to determine\r | |
93 | how to parse the ParameterBlock. The caller should not\r | |
94 | attempt to free ParameterTypeGuid.\r | |
95 | ParameterBlock - The platform returns a pointer to the ParameterBlock\r | |
96 | structure which contains details about the configuration\r | |
97 | parameters specific to the ParameterTypeGuid. This structure\r | |
98 | is defined based on the protocol and may be different for\r | |
99 | different protocols. UEFI driver decodes this structure\r | |
bbeea0de | 100 | and its contents based on ParameterTypeGuid. ParameterBlock\r |
216cadbb | 101 | is allocated by the platform and the platform is responsible\r |
102 | for freeing the ParameterBlock after Response is called.\r | |
103 | ParameterBlockSize - The platform returns the size of the ParameterBlock in bytes.\r | |
104 | \r | |
105 | Returns:\r | |
106 | EFI_SUCCESS - The platform return parameter information for ControllerHandle.\r | |
107 | EFI_NOT_FOUND - No more unread Instance exists.\r | |
108 | EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r | |
109 | EFI_INVALID_PARAMETER - Instance is NULL.\r | |
110 | EFI_DEVICE_ERROR - A device error occurred while attempting to return\r | |
111 | parameter block information for the controller specified\r | |
112 | by ControllerHandle and ChildHandle.\r | |
113 | EFI_OUT_RESOURCES - There are not enough resources available to set the\r | |
114 | configuration options for the controller specified\r | |
115 | by ControllerHandle and ChildHandle.\r | |
116 | \r | |
117 | --*/\r | |
118 | \r | |
119 | typedef\r | |
120 | EFI_STATUS\r | |
121 | (EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE) (\r | |
122 | IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This,\r | |
123 | IN EFI_HANDLE ControllerHandle,\r | |
124 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
125 | IN UINTN *Instance,\r | |
126 | IN EFI_GUID *ParameterTypeGuid,\r | |
127 | IN VOID *ParameterBlock,\r | |
128 | IN UINTN ParameterBlockSize ,\r | |
129 | IN EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction\r | |
130 | );\r | |
131 | /*++\r | |
132 | \r | |
133 | Routine Description:\r | |
134 | Tell the platform what actions where taken by the driver after processing\r | |
135 | the data returned from Query.\r | |
136 | \r | |
137 | Arguments:\r | |
138 | This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.\r | |
139 | ControllerHandle - The handle the platform will return configuration\r | |
140 | information about.\r | |
141 | ChildHandle - The handle of the child controller to set options on.\r | |
142 | This is an optional parameter that may be NULL. It will\r | |
143 | be NULL for device drivers, and for a bus drivers that\r | |
144 | wish to set options for the bus controller. It will not\r | |
145 | be NULL for a bus driver that wishes to set options for\r | |
146 | one of its child controllers.\r | |
147 | Instance - Instance data returned from Query.\r | |
148 | ParameterTypeGuid - ParameterTypeGuid returned from Query.\r | |
149 | ParameterBlock - ParameterBlock returned from Query.\r | |
150 | ParameterBlockSize - The ParameterBlock size returned from Query.\r | |
151 | ConfigurationAction- The driver tells the platform what action is required\r | |
152 | for ParameterBlock to take effect.\r | |
153 | \r | |
154 | Returns:\r | |
155 | EFI_SUCCESS - The platform return parameter information for ControllerHandle.\r | |
156 | EFI_NOT_FOUND - Instance was not found.\r | |
157 | EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r | |
158 | EFI_INVALID_PARAMETER - Instance is zero.\r | |
159 | \r | |
160 | --*/\r | |
161 | \r | |
162 | //\r | |
163 | // Interface structure for the Platform to Driver Configuration Protocol\r | |
164 | //\r | |
a1cb16bd | 165 | struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL {\r |
216cadbb | 166 | EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query;\r |
167 | EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response;\r | |
a1cb16bd | 168 | };\r |
216cadbb | 169 | \r |
170 | extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid;\r | |
171 | extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid;\r | |
172 | \r | |
173 | #endif\r |