]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Provides library services to get and set Platform Configuration Database entries.\r |
3 | \r | |
1a2f870c | 4 | PCD Library Class provides a PCD usage macro interface for all PCD types.\r |
5 | It should be included in any module that uses PCD. If a module uses dynamic/dynamicex\r | |
6 | PCD, module should be linked to a PEIM/DXE library instance to access that PCD.\r | |
7 | If a module uses PatchableInModule type PCD, it also needs the library instance to produce\r | |
8 | LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is\r | |
f754f721 | 9 | translated to a variable or macro that is auto-generated by build tool in\r |
50a64e5b | 10 | module's autogen.h/autogen.c.\r |
64735d24 | 11 | The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are \r |
12 | only available prior to ExitBootServices(). If access to PCD values are required \r | |
13 | at runtime, then their values must be collected prior to ExitBootServices().\r | |
14 | There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),\r | |
15 | PatchPcdGetXX(), and PatchPcdSetXX().\r | |
50a64e5b | 16 | \r |
c7451444 | 17 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 18 | This program and the accompanying materials\r |
50a64e5b | 19 | are licensed and made available under the terms and conditions of the BSD License\r |
20 | which accompanies this distribution. The full text of the license may be found at\r | |
21 | http://opensource.org/licenses/bsd-license.php\r | |
22 | \r | |
23 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
24 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
fb3df220 | 25 | \r |
fb3df220 | 26 | **/\r |
27 | \r | |
28 | #ifndef __PCD_LIB_H__\r | |
29 | #define __PCD_LIB_H__\r | |
30 | \r | |
64735d24 | 31 | \r |
32 | /**\r | |
33 | Retrieves a token number based on a token name.\r | |
34 | \r | |
35 | Returns the token number associated with the PCD token specified by TokenName.\r | |
36 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
37 | If TokenName is not a feature flag, then the module will not build.\r | |
38 | \r | |
39 | @param TokenName The name of the PCD token to retrieve the token number for.\r | |
40 | \r | |
41 | @return The token number associated with the PCD.\r | |
42 | \r | |
43 | **/\r | |
fb3df220 | 44 | #define PcdToken(TokenName) _PCD_TOKEN_##TokenName\r |
45 | \r | |
46 | \r | |
64735d24 | 47 | /**\r |
48 | Retrieves a Boolean PCD feature flag based on a token name.\r | |
49 | \r | |
50 | Returns the Boolean value for the PCD feature flag specified by TokenName.\r | |
51 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
52 | If TokenName is not a feature flag, then the module will not build.\r | |
53 | \r | |
54 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
55 | \r | |
56 | @return Boolean value for the PCD feature flag.\r | |
57 | \r | |
58 | **/\r | |
fb3df220 | 59 | #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r |
60 | \r | |
61 | \r | |
64735d24 | 62 | /**\r |
63 | Retrieves an 8-bit fixed PCD token value based on a token name.\r | |
64 | \r | |
65 | Returns the 8-bit value for the token specified by TokenName.\r | |
66 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
67 | If TokenName is not a feature flag, then the module will not build.\r | |
68 | \r | |
69 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
70 | \r | |
71 | @return 8-bit value for the token specified by TokenName.\r | |
72 | \r | |
73 | **/\r | |
fb3df220 | 74 | #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 75 | \r |
76 | \r | |
77 | /**\r | |
78 | Retrieves a 16-bit fixed PCD token value based on a token name.\r | |
79 | \r | |
80 | Returns the 16-bit value for the token specified by TokenName.\r | |
81 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
82 | If TokenName is not a feature flag, then the module will not build.\r | |
83 | \r | |
84 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
85 | \r | |
86 | @return 16-bit value for the token specified by TokenName.\r | |
87 | \r | |
88 | **/\r | |
fb3df220 | 89 | #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 90 | \r |
91 | \r | |
92 | /**\r | |
93 | Retrieves a 32-bit fixed PCD token value based on a token name.\r | |
94 | \r | |
95 | Returns the 32-bit value for the token specified by TokenName.\r | |
96 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
97 | If TokenName is not a feature flag, then the module will not build.\r | |
98 | \r | |
99 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
100 | \r | |
101 | @return 32-bit value for the token specified by TokenName.\r | |
102 | \r | |
103 | **/\r | |
fb3df220 | 104 | #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 105 | \r |
106 | \r | |
107 | /**\r | |
108 | Retrieves a 64-bit fixed PCD token value based on a token name.\r | |
109 | \r | |
110 | Returns the 64-bit value for the token specified by TokenName.\r | |
111 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
112 | If TokenName is not a feature flag, then the module will not build.\r | |
113 | \r | |
114 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
115 | \r | |
116 | @return 64-bit value for the token specified by TokenName.\r | |
117 | \r | |
118 | **/\r | |
fb3df220 | 119 | #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 120 | \r |
121 | \r | |
122 | /**\r | |
123 | Retrieves a Boolean fixed PCD token value based on a token name.\r | |
124 | \r | |
125 | Returns the Boolean value for the token specified by TokenName.\r | |
126 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
127 | If TokenName is not a feature flag, then the module will not build.\r | |
128 | \r | |
129 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
130 | \r | |
131 | @return The Boolean value for the token. \r | |
132 | \r | |
133 | **/\r | |
fb3df220 | 134 | #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName\r |
135 | \r | |
136 | \r | |
64735d24 | 137 | /**\r |
138 | Retrieves a pointer to a fixed PCD token buffer based on a token name.\r | |
139 | \r | |
140 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
141 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
142 | If TokenName is not a feature flag, then the module will not build.\r | |
143 | \r | |
144 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
145 | \r | |
146 | @return A pointer to the buffer. \r | |
147 | \r | |
148 | **/\r | |
fb3df220 | 149 | #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)\r |
150 | \r | |
151 | \r | |
64735d24 | 152 | /**\r |
153 | Retrieves an 8-bit binary patchable PCD token value based on a token name.\r | |
154 | \r | |
155 | Returns the 8-bit value for the token specified by TokenName.\r | |
156 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
157 | If TokenName is not a feature flag, then the module will not build.\r | |
158 | \r | |
159 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
160 | \r | |
161 | @return An 8-bit binary patchable PCD token value.\r | |
162 | \r | |
163 | **/\r | |
fb3df220 | 164 | #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 165 | \r |
166 | /**\r | |
167 | Retrieves a 16-bit binary patchable PCD token value based on a token name.\r | |
168 | \r | |
169 | Returns the 16-bit value for the token specified by TokenName.\r | |
170 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
171 | If TokenName is not a feature flag, then the module will not build.\r | |
172 | \r | |
173 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
174 | \r | |
175 | @return A 16-bit binary patchable PCD token value.\r | |
176 | \r | |
177 | **/\r | |
fb3df220 | 178 | #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 179 | \r |
180 | \r | |
181 | /**\r | |
182 | Retrieves a 32-bit binary patchable PCD token value based on a token name.\r | |
183 | \r | |
184 | Returns the 32-bit value for the token specified by TokenName.\r | |
185 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
186 | If TokenName is not a feature flag, then the module will not build.\r | |
187 | \r | |
188 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
189 | \r | |
190 | @return A 32-bit binary patchable PCD token value.\r | |
191 | \r | |
192 | **/\r | |
fb3df220 | 193 | #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 194 | \r |
195 | \r | |
196 | /**\r | |
197 | Retrieves a 64-bit binary patchable PCD token value based on a token name.\r | |
198 | \r | |
199 | Returns the 64-bit value for the token specified by TokenName.\r | |
200 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
201 | If TokenName is not a feature flag, then the module will not build.\r | |
202 | \r | |
203 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
204 | \r | |
205 | @return A 64-bit binary patchable PCD token value.\r | |
206 | \r | |
207 | **/\r | |
fb3df220 | 208 | #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 209 | \r |
210 | \r | |
211 | /**\r | |
212 | Retrieves a Boolean binary patchable PCD token value based on a token name.\r | |
213 | \r | |
214 | Returns the Boolean value for the token specified by TokenName.\r | |
215 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
216 | If TokenName is not a feature flag, then the module will not build.\r | |
217 | \r | |
218 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
219 | \r | |
220 | @return The Boolean value for the token.\r | |
221 | \r | |
222 | **/\r | |
fb3df220 | 223 | #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 224 | \r |
225 | \r | |
226 | /**\r | |
227 | Retrieves a pointer to a binary patchable PCD token buffer based on a token name.\r | |
228 | \r | |
229 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
230 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
231 | If TokenName is not a feature flag, then the module will not build.\r | |
232 | \r | |
233 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
234 | \r | |
235 | @return A pointer to the buffer for the token.\r | |
236 | \r | |
237 | **/\r | |
fb3df220 | 238 | #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)\r |
239 | \r | |
64735d24 | 240 | \r |
241 | /**\r | |
242 | Sets an 8-bit binary patchable PCD token value based on a token name.\r | |
243 | \r | |
244 | Sets the 8-bit value for the token specified by TokenName. Value is returned.\r | |
245 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
246 | If TokenName is not a feature flag, then the module will not build.\r | |
247 | \r | |
248 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
249 | @param Value The 8-bit value to set.\r | |
250 | \r | |
7b5b3124 | 251 | @return Return the Value that was set.\r |
64735d24 | 252 | \r |
253 | **/\r | |
fb3df220 | 254 | #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 255 | \r |
256 | \r | |
257 | /**\r | |
258 | Sets a 16-bit binary patchable PCD token value based on a token name.\r | |
259 | \r | |
260 | Sets the 16-bit value for the token specified by TokenName. Value is returned.\r | |
261 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
262 | If TokenName is not a feature flag, then the module will not build.\r | |
263 | \r | |
264 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
265 | @param Value The 16-bit value to set.\r | |
266 | \r | |
7b5b3124 | 267 | @return Return the Value that was set.\r |
64735d24 | 268 | \r |
269 | **/\r | |
fb3df220 | 270 | #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 271 | \r |
272 | \r | |
273 | /**\r | |
274 | Sets a 32-bit binary patchable PCD token value based on a token name.\r | |
275 | \r | |
276 | Sets the 32-bit value for the token specified by TokenName. Value is returned.\r | |
277 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
278 | If TokenName is not a feature flag, then the module will not build.\r | |
279 | \r | |
280 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
281 | @param Value The 32-bit value to set.\r | |
282 | \r | |
7b5b3124 | 283 | @return Return the Value that was set.\r |
64735d24 | 284 | \r |
285 | **/\r | |
fb3df220 | 286 | #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 287 | \r |
288 | \r | |
289 | /**\r | |
290 | Sets a 64-bit binary patchable PCD token value based on a token name.\r | |
291 | \r | |
292 | Sets the 64-bit value for the token specified by TokenName. Value is returned.\r | |
293 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
294 | If TokenName is not a feature flag, then the module will not build.\r | |
295 | \r | |
296 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
297 | @param Value The 64-bit value to set.\r | |
298 | \r | |
7b5b3124 | 299 | @return Return the Value that was set.\r |
64735d24 | 300 | \r |
301 | **/\r | |
fb3df220 | 302 | #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 303 | \r |
304 | \r | |
305 | /**\r | |
306 | Sets a Boolean binary patchable PCD token value based on a token name.\r | |
307 | \r | |
308 | Sets the Boolean value for the token specified by TokenName. Value is returned.\r | |
309 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
310 | If TokenName is not a feature flag, then the module will not build.\r | |
311 | \r | |
312 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
313 | @param Value The boolean value to set.\r | |
314 | \r | |
7b5b3124 | 315 | @return Return the Value that was set.\r |
64735d24 | 316 | \r |
317 | **/\r | |
fb3df220 | 318 | #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 319 | \r |
320 | \r | |
321 | /**\r | |
322 | Sets a pointer to a binary patchable PCD token buffer based on a token name.\r | |
323 | \r | |
324 | Sets the buffer for the token specified by TokenName. Buffer is returned. \r | |
325 | If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer\r | |
326 | to the maximum size supported by TokenName and return NULL to indicate that the set operation \r | |
327 | was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be \r | |
328 | set to the maximum size supported by TokenName and NULL must be returned.\r | |
329 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
330 | If TokenName is not a feature flag, then the module will not build.\r | |
331 | \r | |
332 | If SizeOfBuffer is NULL, then ASSERT().\r | |
333 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
334 | \r | |
335 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
336 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
337 | @param Buffer Pointer to the value to set.\r | |
338 | \r | |
7b5b3124 | 339 | @return Return the pointer to the Buffer that was set.\r |
64735d24 | 340 | \r |
341 | **/\r | |
fb3df220 | 342 | #define PatchPcdSetPtr(TokenName, Size, Buffer) \\r |
f8308f0a LG |
343 | LibPatchPcdSetPtrAndSize ( \\r |
344 | (VOID *)_gPcd_BinaryPatch_##TokenName, \\r | |
345 | &_gPcd_BinaryPatch_Size_##TokenName, \\r | |
fb3df220 | 346 | (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \\r |
347 | (Size), \\r | |
348 | (Buffer) \\r | |
349 | )\r | |
64735d24 | 350 | /**\r |
351 | Retrieves an 8-bit PCD token value based on a token name.\r | |
352 | \r | |
353 | Returns the 8-bit value for the token specified by TokenName.\r | |
354 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
355 | \r | |
356 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
357 | \r | |
358 | @return 8-bit value for the token specified by TokenName.\r | |
359 | \r | |
360 | **/\r | |
fb3df220 | 361 | #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName\r |
64735d24 | 362 | \r |
363 | \r | |
364 | /**\r | |
365 | Retrieves a 16-bit PCD token value based on a token name.\r | |
366 | \r | |
367 | Returns the 16-bit value for the token specified by TokenName.\r | |
368 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
369 | \r | |
370 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
371 | \r | |
372 | @return 16-bit value for the token specified by TokenName.\r | |
373 | \r | |
374 | **/\r | |
fb3df220 | 375 | #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName\r |
64735d24 | 376 | \r |
377 | \r | |
378 | /**\r | |
379 | Retrieves a 32-bit PCD token value based on a token name.\r | |
380 | \r | |
381 | Returns the 32-bit value for the token specified by TokenName.\r | |
382 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
383 | \r | |
384 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
385 | \r | |
386 | @return 32-bit value for the token specified by TokenName.\r | |
387 | \r | |
388 | **/\r | |
fb3df220 | 389 | #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName\r |
64735d24 | 390 | \r |
391 | \r | |
392 | /**\r | |
393 | Retrieves a 64-bit PCD token value based on a token name.\r | |
394 | \r | |
395 | Returns the 64-bit value for the token specified by TokenName.\r | |
396 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
397 | \r | |
398 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
399 | \r | |
400 | @return 64-bit value for the token specified by TokenName.\r | |
401 | \r | |
402 | **/\r | |
fb3df220 | 403 | #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName\r |
64735d24 | 404 | \r |
405 | \r | |
406 | /**\r | |
407 | Retrieves a pointer to a PCD token buffer based on a token name.\r | |
408 | \r | |
409 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
410 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
411 | \r | |
412 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
413 | \r | |
414 | @return A pointer to the buffer.\r | |
415 | \r | |
416 | **/\r | |
fb3df220 | 417 | #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName\r |
64735d24 | 418 | \r |
419 | \r | |
420 | /**\r | |
421 | Retrieves a Boolean PCD token value based on a token name.\r | |
422 | \r | |
423 | Returns the Boolean value for the token specified by TokenName.\r | |
424 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
425 | \r | |
426 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
427 | \r | |
428 | @return A Boolean PCD token value.\r | |
429 | \r | |
430 | **/\r | |
fb3df220 | 431 | #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r |
432 | \r | |
64735d24 | 433 | \r |
bf8e99a4 LG |
434 | /**\r |
435 | Retrieves the size of a fixed PCD token based on a token name.\r | |
436 | \r | |
437 | Returns the size of the token specified by TokenName.\r | |
438 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
439 | \r | |
440 | @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r | |
441 | \r | |
442 | @return Return the size\r | |
443 | \r | |
444 | **/\r | |
445 | #define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName\r | |
446 | \r | |
447 | \r | |
448 | /**\r | |
449 | Retrieves the size of a binary patchable PCD token based on a token name.\r | |
450 | \r | |
451 | Returns the size of the token specified by TokenName.\r | |
452 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
453 | \r | |
454 | @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r | |
455 | \r | |
456 | @return Return the size\r | |
457 | \r | |
458 | **/\r | |
459 | #define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName\r | |
460 | \r | |
461 | \r | |
462 | /**\r | |
463 | Retrieves the size of the PCD token based on a token name.\r | |
464 | \r | |
465 | Returns the size of the token specified by TokenName.\r | |
466 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
467 | \r | |
468 | @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r | |
469 | \r | |
470 | @return Return the size\r | |
471 | \r | |
472 | **/\r | |
473 | #define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName\r | |
474 | \r | |
475 | \r | |
476 | /**\r | |
477 | Retrieve the size of a given PCD token.\r | |
478 | \r | |
479 | Returns the size of the token specified by TokenNumber and Guid. \r | |
480 | If Guid is NULL, then ASSERT(). \r | |
481 | \r | |
482 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
483 | which namespace to retrieve a value from.\r | |
484 | @param[in] TokenNumber The PCD token number to retrieve a current value size for.\r | |
485 | \r | |
486 | @return Return the size.\r | |
487 | \r | |
488 | **/\r | |
489 | #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))\r | |
490 | \r | |
9a355841 | 491 | #ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r |
64735d24 | 492 | /**\r |
493 | Sets an 8-bit PCD token value based on a token name.\r | |
494 | \r | |
495 | Sets the 8-bit value for the token specified by TokenName. Value is returned.\r | |
496 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
497 | \r | |
498 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
499 | @param Value The 8-bit value to set.\r | |
500 | \r | |
7b5b3124 | 501 | @return Return the Value that was set.\r |
64735d24 | 502 | \r |
503 | **/\r | |
fb3df220 | 504 | #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))\r |
64735d24 | 505 | \r |
506 | \r | |
507 | /**\r | |
508 | Sets a 16-bit PCD token value based on a token name.\r | |
509 | \r | |
510 | Sets the 16-bit value for the token specified by TokenName. Value is returned.\r | |
511 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
512 | \r | |
513 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
514 | @param Value The 16-bit value to set.\r | |
515 | \r | |
7b5b3124 | 516 | @return Return the Value that was set.\r |
64735d24 | 517 | \r |
518 | **/\r | |
fb3df220 | 519 | #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))\r |
64735d24 | 520 | \r |
521 | \r | |
522 | /**\r | |
523 | Sets a 32-bit PCD token value based on a token name.\r | |
524 | \r | |
525 | Sets the 32-bit value for the token specified by TokenName. Value is returned.\r | |
526 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
527 | \r | |
528 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
529 | @param Value The 32-bit value to set.\r | |
530 | \r | |
7b5b3124 | 531 | @return Return the Value that was set.\r |
64735d24 | 532 | \r |
533 | **/\r | |
fb3df220 | 534 | #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))\r |
64735d24 | 535 | \r |
536 | \r | |
537 | /**\r | |
538 | Sets a 64-bit PCD token value based on a token name.\r | |
539 | \r | |
540 | Sets the 64-bit value for the token specified by TokenName. Value is returned.\r | |
541 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
542 | \r | |
543 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
544 | @param Value The 64-bit value to set.\r | |
545 | \r | |
7b5b3124 | 546 | @return Return the Value that was set.\r |
64735d24 | 547 | \r |
548 | **/\r | |
fb3df220 | 549 | #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))\r |
64735d24 | 550 | \r |
551 | \r | |
552 | /**\r | |
553 | Sets a pointer to a PCD token buffer based on a token name.\r | |
554 | \r | |
555 | Sets the buffer for the token specified by TokenName. Buffer is returned. \r | |
556 | If SizeOfBuffer is greater than the maximum size supported by TokenName, \r | |
557 | then set SizeOfBuffer to the maximum size supported by TokenName and return NULL \r | |
558 | to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
559 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported \r | |
9a355841 | 560 | by TokenName and NULL must be returned.\r |
64735d24 | 561 | If TokenName is not a valid token in the token space, then the module will not build.\r |
562 | \r | |
563 | If SizeOfBuffer is NULL, then ASSERT().\r | |
564 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
565 | \r | |
566 | @param TokenName The name of the PCD token to set the current value for.\r | |
567 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
568 | @param Buffer A pointer to the buffer to set.\r | |
569 | \r | |
7b5b3124 | 570 | @return Return the pointer to the Buffer that was set.\r |
64735d24 | 571 | \r |
572 | **/\r | |
fb3df220 | 573 | #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \\r |
574 | _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))\r | |
64735d24 | 575 | \r |
576 | /**\r | |
577 | Sets a Boolean PCD token value based on a token name.\r | |
578 | \r | |
579 | Sets the Boolean value for the token specified by TokenName. Value is returned. \r | |
580 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
581 | \r | |
582 | @param TokenName The name of the PCD token to set the current value for.\r | |
583 | @param Buffer The Boolean value to set.\r | |
584 | \r | |
7b5b3124 | 585 | @return Return the Value that was set.\r |
64735d24 | 586 | \r |
587 | **/\r | |
fb3df220 | 588 | #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))\r |
9a355841 SZ |
589 | #endif\r |
590 | \r | |
591 | /**\r | |
592 | Sets a 8-bit PCD token value based on a token name.\r | |
593 | \r | |
594 | Sets the 8-bit value for the token specified by TokenName.\r | |
595 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
596 | \r | |
597 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
598 | @param Value The 8-bit value to set.\r | |
599 | \r | |
600 | @return The status of the set operation.\r | |
601 | \r | |
602 | **/\r | |
603 | #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))\r | |
604 | \r | |
605 | /**\r | |
606 | Sets a 16-bit PCD token value based on a token name.\r | |
607 | \r | |
608 | Sets the 16-bit value for the token specified by TokenName.\r | |
609 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
610 | \r | |
611 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
612 | @param Value The 16-bit value to set.\r | |
613 | \r | |
614 | @return The status of the set operation.\r | |
fb3df220 | 615 | \r |
9a355841 SZ |
616 | **/\r |
617 | #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))\r | |
618 | \r | |
619 | /**\r | |
620 | Sets a 32-bit PCD token value based on a token name.\r | |
621 | \r | |
622 | Sets the 32-bit value for the token specified by TokenName.\r | |
623 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
624 | \r | |
625 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
626 | @param Value The 32-bit value to set.\r | |
627 | \r | |
628 | @return The status of the set operation.\r | |
629 | \r | |
630 | **/\r | |
631 | #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))\r | |
632 | \r | |
633 | /**\r | |
634 | Sets a 64-bit PCD token value based on a token name.\r | |
635 | \r | |
636 | Sets the 64-bit value for the token specified by TokenName.\r | |
637 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
638 | \r | |
639 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
640 | @param Value The 64-bit value to set.\r | |
641 | \r | |
642 | @return The status of the set operation.\r | |
643 | \r | |
644 | **/\r | |
645 | #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))\r | |
646 | \r | |
647 | /**\r | |
648 | Sets a pointer to a PCD token buffer based on a token name.\r | |
649 | \r | |
650 | Sets the buffer for the token specified by TokenName.\r | |
651 | If SizeOfBuffer is greater than the maximum size supported by TokenName,\r | |
652 | then set SizeOfBuffer to the maximum size supported by TokenName and return\r | |
653 | RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r | |
654 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r | |
655 | supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r | |
656 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
657 | \r | |
658 | If SizeOfBuffer is NULL, then ASSERT().\r | |
659 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
660 | \r | |
661 | @param TokenName The name of the PCD token to set the current value for.\r | |
662 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
663 | @param Buffer A pointer to the buffer to set.\r | |
664 | \r | |
665 | @return The status of the set operation.\r | |
666 | \r | |
667 | **/\r | |
668 | #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \\r | |
669 | _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))\r | |
670 | \r | |
671 | \r | |
672 | \r | |
673 | /**\r | |
674 | Sets a boolean PCD token value based on a token name.\r | |
675 | \r | |
676 | Sets the boolean value for the token specified by TokenName.\r | |
677 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
678 | \r | |
679 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
680 | @param Value The boolean value to set.\r | |
681 | \r | |
682 | @return The status of the set operation.\r | |
683 | \r | |
684 | **/\r | |
685 | #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))\r | |
64735d24 | 686 | \r |
419db80b BF |
687 | /**\r |
688 | Retrieves a token number based on a GUID and a token name.\r | |
689 | \r | |
690 | Returns the token number for the token specified by Guid and TokenName.\r | |
691 | \r | |
692 | @param Guid Pointer to a 128-bit unique value that designates \r | |
693 | which namespace to retrieve a value from.\r | |
694 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
695 | \r | |
696 | @return Return the token number.\r | |
697 | \r | |
698 | **/\r | |
699 | #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)\r | |
700 | \r | |
64735d24 | 701 | /**\r |
702 | Retrieves an 8-bit PCD token value based on a GUID and a token name.\r | |
703 | \r | |
704 | Returns the 8-bit value for the token specified by Guid and TokenName.\r | |
705 | If TokenName is not a valid token in the token space specified by Guid, \r | |
706 | then the module will not build.\r | |
707 | \r | |
708 | If Guid is NULL, then ASSERT().\r | |
709 | \r | |
710 | @param Guid Pointer to a 128-bit unique value that designates \r | |
711 | which namespace to retrieve a value from.\r | |
712 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
713 | \r | |
714 | @return An 8-bit PCD token value.\r | |
715 | \r | |
716 | **/\r | |
419db80b | 717 | #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))\r |
64735d24 | 718 | \r |
719 | /**\r | |
720 | Retrieves a 16-bit PCD token value based on a GUID and a token name.\r | |
721 | \r | |
722 | Returns the 16-bit value for the token specified by Guid and TokenName.\r | |
723 | If TokenName is not a valid token in the token space specified by Guid, \r | |
724 | then the module will not build.\r | |
725 | \r | |
726 | If Guid is NULL, then ASSERT().\r | |
727 | \r | |
728 | @param Guid Pointer to a 128-bit unique value that designates \r | |
729 | which namespace to retrieve a value from.\r | |
730 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
731 | \r | |
732 | @return A 16-bit PCD token value.\r | |
733 | \r | |
734 | **/\r | |
419db80b | 735 | #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))\r |
64735d24 | 736 | \r |
737 | \r | |
738 | /**\r | |
739 | Retrieves a 32-bit PCD token value based on a GUID and a token name.\r | |
740 | \r | |
741 | Returns the 32-bit value for the token specified by Guid and TokenName.\r | |
742 | If TokenName is not a valid token in the token space specified by Guid, \r | |
743 | then the module will not build.\r | |
744 | \r | |
745 | If Guid is NULL, then ASSERT().\r | |
746 | \r | |
747 | @param Guid Pointer to a 128-bit unique value that designates \r | |
748 | which namespace to retrieve a value from.\r | |
749 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
750 | \r | |
751 | @return A 32-bit PCD token value.\r | |
752 | \r | |
753 | **/\r | |
419db80b | 754 | #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))\r |
64735d24 | 755 | \r |
756 | \r | |
757 | /**\r | |
758 | Retrieves a 64-bit PCD token value based on a GUID and a token name.\r | |
759 | \r | |
760 | Returns the 64-bit value for the token specified by Guid and TokenName.\r | |
761 | If TokenName is not a valid token in the token space specified by Guid, \r | |
762 | then the module will not build.\r | |
763 | \r | |
764 | If Guid is NULL, then ASSERT().\r | |
765 | \r | |
766 | @param Guid Pointer to a 128-bit unique value that designates \r | |
767 | which namespace to retrieve a value from.\r | |
768 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
769 | \r | |
770 | @return A 64-bit PCD token value.\r | |
771 | \r | |
772 | **/\r | |
419db80b | 773 | #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))\r |
64735d24 | 774 | \r |
775 | \r | |
776 | /**\r | |
777 | Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r | |
778 | \r | |
779 | Returns a pointer to the buffer for the token specified by Guid and TokenName.\r | |
780 | If TokenName is not a valid token in the token space specified by Guid, \r | |
781 | then the module will not build.\r | |
782 | \r | |
783 | If Guid is NULL, then ASSERT().\r | |
784 | \r | |
785 | @param Guid Pointer to a 128-bit unique value that designates \r | |
786 | which namespace to retrieve a value from.\r | |
787 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
788 | \r | |
789 | @return A pointer to a PCD token buffer.\r | |
790 | \r | |
791 | **/\r | |
419db80b | 792 | #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))\r |
64735d24 | 793 | \r |
794 | \r | |
795 | /**\r | |
796 | Retrieves a Boolean PCD token value based on a GUID and a token name.\r | |
797 | \r | |
798 | Returns the Boolean value for the token specified by Guid and TokenName.\r | |
799 | If TokenName is not a valid token in the token space specified by Guid, \r | |
800 | then the module will not build.\r | |
801 | \r | |
802 | If Guid is NULL, then ASSERT().\r | |
803 | \r | |
804 | @param Guid Pointer to a 128-bit unique value that designates \r | |
805 | which namespace to retrieve a value from.\r | |
806 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
807 | \r | |
808 | @return A Boolean PCD token value.\r | |
809 | \r | |
810 | **/\r | |
419db80b | 811 | #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))\r |
fb3df220 | 812 | \r |
64735d24 | 813 | \r |
9a355841 SZ |
814 | \r |
815 | #ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r | |
64735d24 | 816 | /**\r |
817 | Sets an 8-bit PCD token value based on a GUID and a token name.\r | |
818 | \r | |
819 | Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
820 | If TokenName is not a valid token in the token space specified by Guid, \r | |
821 | then the module will not build.\r | |
822 | \r | |
823 | If Guid is NULL, then ASSERT().\r | |
824 | \r | |
825 | @param Guid Pointer to a 128-bit unique value that designates \r | |
826 | which namespace to retrieve a value from.\r | |
827 | @param TokenName The name of the PCD token to set the current value for.\r | |
828 | @param Value The 8-bit value to set. \r | |
829 | \r | |
7b5b3124 | 830 | @return Return the Value that was set.\r |
64735d24 | 831 | \r |
832 | **/\r | |
419db80b | 833 | #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r |
64735d24 | 834 | \r |
835 | \r | |
836 | /**\r | |
837 | Sets a 16-bit PCD token value based on a GUID and a token name.\r | |
838 | \r | |
839 | Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
840 | If TokenName is not a valid token in the token space specified by Guid, \r | |
841 | then the module will not build.\r | |
842 | \r | |
843 | If Guid is NULL, then ASSERT().\r | |
844 | \r | |
845 | @param Guid Pointer to a 128-bit unique value that designates \r | |
846 | which namespace to retrieve a value from.\r | |
847 | @param TokenName The name of the PCD token to set the current value for.\r | |
848 | @param Value The 16-bit value to set. \r | |
849 | \r | |
7b5b3124 | 850 | @return Return the Value that was set.\r |
64735d24 | 851 | \r |
852 | **/\r | |
419db80b | 853 | #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r |
64735d24 | 854 | \r |
855 | \r | |
856 | /**\r | |
857 | Sets a 32-bit PCD token value based on a GUID and a token name.\r | |
858 | \r | |
859 | Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
860 | If TokenName is not a valid token in the token space specified by Guid, \r | |
861 | then the module will not build.\r | |
862 | \r | |
863 | If Guid is NULL, then ASSERT().\r | |
864 | \r | |
865 | @param Guid Pointer to a 128-bit unique value that designates \r | |
866 | which namespace to retrieve a value from.\r | |
867 | @param TokenName The name of the PCD token to set the current value for.\r | |
868 | @param Value The 32-bit value to set. \r | |
869 | \r | |
7b5b3124 | 870 | @return Return the Value that was set.\r |
64735d24 | 871 | \r |
872 | **/\r | |
419db80b | 873 | #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r |
64735d24 | 874 | \r |
875 | \r | |
876 | /**\r | |
877 | Sets a 64-bit PCD token value based on a GUID and a token name.\r | |
878 | \r | |
879 | Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
880 | If TokenName is not a valid token in the token space specified by Guid, \r | |
881 | then the module will not build.\r | |
882 | \r | |
883 | If Guid is NULL, then ASSERT().\r | |
884 | \r | |
885 | @param Guid Pointer to a 128-bit unique value that designates \r | |
886 | which namespace to retrieve a value from.\r | |
887 | @param TokenName The name of the PCD token to set the current value for.\r | |
888 | @param Value The 64-bit value to set. \r | |
889 | \r | |
7b5b3124 | 890 | @return Return the Value that was set.\r |
64735d24 | 891 | \r |
892 | **/\r | |
419db80b | 893 | #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r |
64735d24 | 894 | \r |
895 | \r | |
896 | /**\r | |
897 | Sets a pointer to a PCD token buffer based on a GUID and a token name.\r | |
898 | \r | |
899 | Sets the buffer for the token specified by Guid and TokenName. Buffer is returned. \r | |
900 | If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, \r | |
901 | then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return \r | |
902 | NULL to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
903 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by\r | |
9a355841 | 904 | Guid and TokenName and NULL must be returned.\r |
64735d24 | 905 | If TokenName is not a valid token in the token space specified by Guid, \r |
906 | then the module will not build.\r | |
907 | \r | |
908 | If Guid is NULL, then ASSERT().\r | |
909 | If SizeOfBuffer is NULL, then ASSERT().\r | |
910 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
911 | \r | |
912 | @param Guid Pointer to a 128-bit unique value that designates \r | |
913 | which namespace to retrieve a value from.\r | |
914 | @param TokenName The name of the PCD token to set the current value for.\r | |
915 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. \r | |
7b5b3124 | 916 | @param Buffer Pointer to the buffer to set.\r |
64735d24 | 917 | \r |
7b5b3124 | 918 | @return Return the pointer to the Buffer that was set.\r |
64735d24 | 919 | \r |
920 | **/\r | |
fb3df220 | 921 | #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \\r |
419db80b | 922 | LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))\r |
64735d24 | 923 | \r |
924 | \r | |
925 | /**\r | |
926 | Sets a Boolean PCD token value based on a GUID and a token name.\r | |
927 | \r | |
928 | Sets the Boolean value for the token specified by Guid and TokenName. Value is returned. \r | |
929 | If TokenName is not a valid token in the token space specified by Guid, \r | |
930 | then the module will not build.\r | |
931 | \r | |
932 | If Guid is NULL, then ASSERT().\r | |
933 | \r | |
934 | @param Guid Pointer to a 128-bit unique value that designates \r | |
935 | which namespace to retrieve a value from.\r | |
936 | @param TokenName The name of the PCD token to set the current value for. \r | |
937 | @param Value The Boolean value to set.\r | |
938 | \r | |
7b5b3124 | 939 | @return Return the Value that was set.\r |
64735d24 | 940 | \r |
941 | **/ \r | |
fb3df220 | 942 | #define PcdSetExBool(Guid, TokenName, Value) \\r |
419db80b | 943 | LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))\r |
9a355841 SZ |
944 | #endif\r |
945 | \r | |
946 | /**\r | |
947 | Sets an 8-bit PCD token value based on a GUID and a token name.\r | |
948 | \r | |
949 | Sets the 8-bit value for the token specified by Guid and TokenName.\r | |
950 | If TokenName is not a valid token in the token space specified by Guid,\r | |
951 | then the module will not build.\r | |
fb3df220 | 952 | \r |
9a355841 SZ |
953 | If Guid is NULL, then ASSERT().\r |
954 | \r | |
955 | @param Guid Pointer to a 128-bit unique value that designates\r | |
956 | which namespace to retrieve a value from.\r | |
957 | @param TokenName The name of the PCD token to set the current value for.\r | |
958 | @param Value The 8-bit value to set.\r | |
959 | \r | |
960 | @return The status of the set operation.\r | |
961 | \r | |
962 | **/\r | |
963 | #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r | |
964 | \r | |
965 | /**\r | |
966 | Sets an 16-bit PCD token value based on a GUID and a token name.\r | |
967 | \r | |
968 | Sets the 16-bit value for the token specified by Guid and TokenName.\r | |
969 | If TokenName is not a valid token in the token space specified by Guid,\r | |
970 | then the module will not build.\r | |
971 | \r | |
972 | If Guid is NULL, then ASSERT().\r | |
973 | \r | |
974 | @param Guid Pointer to a 128-bit unique value that designates\r | |
975 | which namespace to retrieve a value from.\r | |
976 | @param TokenName The name of the PCD token to set the current value for.\r | |
977 | @param Value The 16-bit value to set.\r | |
978 | \r | |
979 | @return The status of the set operation.\r | |
980 | \r | |
981 | **/\r | |
982 | #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r | |
983 | \r | |
984 | /**\r | |
985 | Sets an 32-bit PCD token value based on a GUID and a token name.\r | |
986 | \r | |
987 | Sets the 32-bit value for the token specified by Guid and TokenName.\r | |
988 | If TokenName is not a valid token in the token space specified by Guid,\r | |
989 | then the module will not build.\r | |
990 | \r | |
991 | If Guid is NULL, then ASSERT().\r | |
992 | \r | |
993 | @param Guid Pointer to a 128-bit unique value that designates\r | |
994 | which namespace to retrieve a value from.\r | |
995 | @param TokenName The name of the PCD token to set the current value for.\r | |
996 | @param Value The 32-bit value to set.\r | |
997 | \r | |
998 | @return The status of the set operation.\r | |
999 | \r | |
1000 | **/\r | |
1001 | #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r | |
1002 | \r | |
1003 | /**\r | |
1004 | Sets an 64-bit PCD token value based on a GUID and a token name.\r | |
1005 | \r | |
1006 | Sets the 64-bit value for the token specified by Guid and TokenName.\r | |
1007 | If TokenName is not a valid token in the token space specified by Guid,\r | |
1008 | then the module will not build.\r | |
1009 | \r | |
1010 | If Guid is NULL, then ASSERT().\r | |
1011 | \r | |
1012 | @param Guid Pointer to a 128-bit unique value that designates\r | |
1013 | which namespace to retrieve a value from.\r | |
1014 | @param TokenName The name of the PCD token to set the current value for.\r | |
1015 | @param Value The 64-bit value to set.\r | |
1016 | \r | |
1017 | @return The status of the set operation.\r | |
1018 | \r | |
1019 | **/\r | |
1020 | #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r | |
1021 | \r | |
1022 | /**\r | |
1023 | Sets a pointer to a PCD token buffer based on a GUID and a token name.\r | |
1024 | \r | |
1025 | Sets the buffer for the token specified by Guid and TokenName.\r | |
1026 | If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,\r | |
1027 | then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return\r | |
1028 | RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r | |
1029 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r | |
1030 | supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.\r | |
1031 | If TokenName is not a valid token in the token space specified by Guid,\r | |
1032 | then the module will not build.\r | |
1033 | \r | |
1034 | If Guid is NULL, then ASSERT().\r | |
1035 | If SizeOfBuffer is NULL, then ASSERT().\r | |
1036 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
1037 | \r | |
1038 | @param Guid Pointer to a 128-bit unique value that designates\r | |
1039 | which namespace to retrieve a value from.\r | |
1040 | @param TokenName The name of the PCD token to set the current value for.\r | |
1041 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
1042 | @param Buffer Pointer to the buffer to set.\r | |
1043 | \r | |
1044 | @return The status of the set operation.\r | |
1045 | \r | |
1046 | **/\r | |
1047 | #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \\r | |
1048 | LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))\r | |
1049 | \r | |
1050 | \r | |
1051 | /**\r | |
1052 | Sets an boolean PCD token value based on a GUID and a token name.\r | |
1053 | \r | |
1054 | Sets the boolean value for the token specified by Guid and TokenName.\r | |
1055 | If TokenName is not a valid token in the token space specified by Guid,\r | |
1056 | then the module will not build.\r | |
1057 | \r | |
1058 | If Guid is NULL, then ASSERT().\r | |
1059 | \r | |
1060 | @param Guid Pointer to a 128-bit unique value that designates\r | |
1061 | which namespace to retrieve a value from.\r | |
1062 | @param TokenName The name of the PCD token to set the current value for.\r | |
1063 | @param Value The boolean value to set.\r | |
1064 | \r | |
1065 | @return The status of the set operation.\r | |
1066 | \r | |
1067 | **/\r | |
1068 | #define PcdSetExBoolS(Guid, TokenName, Value) \\r | |
1069 | LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r | |
fb3df220 | 1070 | \r |
1071 | /**\r | |
64735d24 | 1072 | This function provides a means by which SKU support can be established in the PCD infrastructure.\r |
1073 | \r | |
fb3df220 | 1074 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r |
1075 | \r | |
b677694d | 1076 | @param SkuId The SKU value that will be used when the PCD service retrieves and sets values\r |
1077 | associated with a PCD token.\r | |
fb3df220 | 1078 | \r |
1a2f870c | 1079 | @return Return the SKU ID that was set.\r |
fb3df220 | 1080 | \r |
1081 | **/\r | |
1082 | UINTN\r | |
1083 | EFIAPI\r | |
1084 | LibPcdSetSku (\r | |
1085 | IN UINTN SkuId\r | |
1086 | );\r | |
1087 | \r | |
1088 | \r | |
1089 | /**\r | |
64735d24 | 1090 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1091 | \r | |
fb3df220 | 1092 | Returns the 8-bit value for the token specified by TokenNumber. \r |
1093 | \r | |
2a254b90 | 1094 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 1095 | \r |
f73e0ad2 | 1096 | @return Returns the 8-bit value for the token specified by TokenNumber. \r |
fb3df220 | 1097 | \r |
1098 | **/\r | |
1099 | UINT8\r | |
1100 | EFIAPI\r | |
1101 | LibPcdGet8 (\r | |
1102 | IN UINTN TokenNumber\r | |
1103 | );\r | |
1104 | \r | |
1105 | \r | |
1106 | /**\r | |
64735d24 | 1107 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1108 | \r | |
fb3df220 | 1109 | Returns the 16-bit value for the token specified by TokenNumber. \r |
1110 | \r | |
2a254b90 | 1111 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 1112 | \r |
f73e0ad2 | 1113 | @return Returns the 16-bit value for the token specified by TokenNumber. \r |
fb3df220 | 1114 | \r |
1115 | **/\r | |
1116 | UINT16\r | |
1117 | EFIAPI\r | |
1118 | LibPcdGet16 (\r | |
1119 | IN UINTN TokenNumber\r | |
1120 | );\r | |
1121 | \r | |
1122 | \r | |
1123 | /**\r | |
64735d24 | 1124 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1125 | \r | |
fb3df220 | 1126 | Returns the 32-bit value for the token specified by TokenNumber. \r |
1127 | \r | |
1128 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
1129 | \r | |
f73e0ad2 | 1130 | @return Returns the 32-bit value for the token specified by TokenNumber.\r |
fb3df220 | 1131 | \r |
1132 | **/\r | |
1133 | UINT32\r | |
1134 | EFIAPI\r | |
1135 | LibPcdGet32 (\r | |
1136 | IN UINTN TokenNumber\r | |
1137 | );\r | |
1138 | \r | |
1139 | \r | |
1140 | /**\r | |
64735d24 | 1141 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1142 | \r | |
fb3df220 | 1143 | Returns the 64-bit value for the token specified by TokenNumber.\r |
1144 | \r | |
1145 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
1146 | \r | |
f73e0ad2 | 1147 | @return Returns the 64-bit value for the token specified by TokenNumber.\r |
fb3df220 | 1148 | \r |
1149 | **/\r | |
1150 | UINT64\r | |
1151 | EFIAPI\r | |
1152 | LibPcdGet64 (\r | |
1153 | IN UINTN TokenNumber\r | |
1154 | );\r | |
1155 | \r | |
1156 | \r | |
1157 | /**\r | |
64735d24 | 1158 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1159 | \r | |
fb3df220 | 1160 | Returns the pointer to the buffer of the token specified by TokenNumber.\r |
1161 | \r | |
1162 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
1163 | \r | |
f73e0ad2 | 1164 | @return Returns the pointer to the token specified by TokenNumber.\r |
fb3df220 | 1165 | \r |
1166 | **/\r | |
1167 | VOID *\r | |
1168 | EFIAPI\r | |
1169 | LibPcdGetPtr (\r | |
1170 | IN UINTN TokenNumber\r | |
1171 | );\r | |
1172 | \r | |
1173 | \r | |
1174 | /**\r | |
64735d24 | 1175 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1176 | \r | |
fb3df220 | 1177 | Returns the Boolean value of the token specified by TokenNumber. \r |
1178 | \r | |
1179 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
1180 | \r | |
f73e0ad2 | 1181 | @return Returns the Boolean value of the token specified by TokenNumber. \r |
fb3df220 | 1182 | \r |
1183 | **/\r | |
1184 | BOOLEAN \r | |
1185 | EFIAPI\r | |
1186 | LibPcdGetBool (\r | |
1187 | IN UINTN TokenNumber\r | |
1188 | );\r | |
1189 | \r | |
1190 | \r | |
1191 | /**\r | |
64735d24 | 1192 | This function provides a means by which to retrieve the size of a given PCD token.\r |
fb3df220 | 1193 | \r |
1194 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
1195 | \r | |
f73e0ad2 | 1196 | @return Returns the size of the token specified by TokenNumber. \r |
fb3df220 | 1197 | \r |
1198 | **/\r | |
1199 | UINTN\r | |
1200 | EFIAPI\r | |
1201 | LibPcdGetSize (\r | |
1202 | IN UINTN TokenNumber\r | |
1203 | );\r | |
1204 | \r | |
1205 | \r | |
1206 | /**\r | |
64735d24 | 1207 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1208 | \r | |
fb3df220 | 1209 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 1210 | \r |
fb3df220 | 1211 | If Guid is NULL, then ASSERT(). \r |
1212 | \r | |
b677694d | 1213 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1214 | which namespace to retrieve a value from.\r | |
1215 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1216 | \r |
f73e0ad2 | 1217 | @return Return the UINT8.\r |
fb3df220 | 1218 | \r |
1219 | **/\r | |
1220 | UINT8\r | |
1221 | EFIAPI\r | |
1222 | LibPcdGetEx8 (\r | |
1223 | IN CONST GUID *Guid,\r | |
1224 | IN UINTN TokenNumber\r | |
1225 | );\r | |
1226 | \r | |
1227 | \r | |
1228 | /**\r | |
64735d24 | 1229 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1230 | \r | |
fb3df220 | 1231 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 1232 | \r |
fb3df220 | 1233 | If Guid is NULL, then ASSERT(). \r |
1234 | \r | |
b677694d | 1235 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1236 | which namespace to retrieve a value from.\r | |
1237 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1238 | \r |
f73e0ad2 | 1239 | @return Return the UINT16.\r |
fb3df220 | 1240 | \r |
1241 | **/\r | |
1242 | UINT16\r | |
1243 | EFIAPI\r | |
1244 | LibPcdGetEx16 (\r | |
1245 | IN CONST GUID *Guid,\r | |
1246 | IN UINTN TokenNumber\r | |
1247 | );\r | |
1248 | \r | |
1249 | \r | |
1250 | /**\r | |
1251 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
1252 | If Guid is NULL, then ASSERT(). \r | |
1253 | \r | |
b677694d | 1254 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1255 | which namespace to retrieve a value from.\r | |
1256 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1257 | \r |
f73e0ad2 | 1258 | @return Return the UINT32.\r |
fb3df220 | 1259 | \r |
1260 | **/\r | |
1261 | UINT32\r | |
1262 | EFIAPI\r | |
1263 | LibPcdGetEx32 (\r | |
1264 | IN CONST GUID *Guid,\r | |
1265 | IN UINTN TokenNumber\r | |
1266 | );\r | |
1267 | \r | |
1268 | \r | |
1269 | /**\r | |
64735d24 | 1270 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1271 | \r | |
fb3df220 | 1272 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 1273 | \r |
fb3df220 | 1274 | If Guid is NULL, then ASSERT(). \r |
1275 | \r | |
fb287b56 | 1276 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1277 | which namespace to retrieve a value from.\r | |
1278 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1279 | \r |
f73e0ad2 | 1280 | @return Return the UINT64.\r |
fb3df220 | 1281 | \r |
1282 | **/\r | |
1283 | UINT64\r | |
1284 | EFIAPI\r | |
1285 | LibPcdGetEx64 (\r | |
1286 | IN CONST GUID *Guid,\r | |
1287 | IN UINTN TokenNumber\r | |
1288 | );\r | |
1289 | \r | |
1290 | \r | |
1291 | /**\r | |
64735d24 | 1292 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1293 | \r | |
fb3df220 | 1294 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r |
64735d24 | 1295 | \r |
fb3df220 | 1296 | If Guid is NULL, then ASSERT(). \r |
1297 | \r | |
fb287b56 | 1298 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1299 | which namespace to retrieve a value from.\r | |
1300 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1301 | \r |
f73e0ad2 | 1302 | @return Return the VOID* pointer.\r |
fb3df220 | 1303 | \r |
1304 | **/\r | |
1305 | VOID *\r | |
1306 | EFIAPI\r | |
1307 | LibPcdGetExPtr (\r | |
1308 | IN CONST GUID *Guid,\r | |
1309 | IN UINTN TokenNumber\r | |
1310 | );\r | |
1311 | \r | |
1312 | \r | |
1313 | /**\r | |
64735d24 | 1314 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1315 | \r | |
fb3df220 | 1316 | Returns the Boolean value of the token specified by TokenNumber and Guid. \r |
64735d24 | 1317 | \r |
fb3df220 | 1318 | If Guid is NULL, then ASSERT(). \r |
1319 | \r | |
fb287b56 | 1320 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1321 | which namespace to retrieve a value from.\r | |
1322 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1323 | \r |
f73e0ad2 | 1324 | @return Return the BOOLEAN.\r |
fb3df220 | 1325 | \r |
1326 | **/\r | |
1327 | BOOLEAN\r | |
1328 | EFIAPI\r | |
1329 | LibPcdGetExBool (\r | |
1330 | IN CONST GUID *Guid,\r | |
1331 | IN UINTN TokenNumber\r | |
1332 | );\r | |
1333 | \r | |
1334 | \r | |
1335 | /**\r | |
64735d24 | 1336 | This function provides a means by which to retrieve the size of a given PCD token.\r |
1337 | \r | |
fb3df220 | 1338 | Returns the size of the token specified by TokenNumber and Guid. \r |
64735d24 | 1339 | \r |
fb3df220 | 1340 | If Guid is NULL, then ASSERT(). \r |
1341 | \r | |
fb287b56 | 1342 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1343 | which namespace to retrieve a value from.\r | |
1344 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1345 | \r |
f73e0ad2 | 1346 | @return Return the size.\r |
fb3df220 | 1347 | \r |
1348 | **/\r | |
1349 | UINTN\r | |
1350 | EFIAPI\r | |
1351 | LibPcdGetExSize (\r | |
1352 | IN CONST GUID *Guid,\r | |
1353 | IN UINTN TokenNumber\r | |
1354 | );\r | |
1355 | \r | |
1356 | \r | |
9a355841 | 1357 | #ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r |
fb3df220 | 1358 | /**\r |
64735d24 | 1359 | This function provides a means by which to set a value for a given PCD token.\r |
1360 | \r | |
fb3df220 | 1361 | Sets the 8-bit value for the token specified by TokenNumber \r |
1362 | to the value specified by Value. Value is returned.\r | |
0befb08d | 1363 | \r |
fb287b56 | 1364 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1365 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1366 | \r |
502bfcef | 1367 | @return Return the Value that was set.\r |
fb3df220 | 1368 | \r |
1369 | **/\r | |
1370 | UINT8\r | |
1371 | EFIAPI\r | |
1372 | LibPcdSet8 (\r | |
1373 | IN UINTN TokenNumber,\r | |
1374 | IN UINT8 Value\r | |
1375 | );\r | |
1376 | \r | |
1377 | \r | |
1378 | /**\r | |
64735d24 | 1379 | This function provides a means by which to set a value for a given PCD token.\r |
1380 | \r | |
fb3df220 | 1381 | Sets the 16-bit value for the token specified by TokenNumber \r |
1382 | to the value specified by Value. Value is returned.\r | |
0befb08d | 1383 | \r |
fb287b56 | 1384 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1385 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1386 | \r |
502bfcef | 1387 | @return Return the Value that was set.\r |
fb3df220 | 1388 | \r |
1389 | **/\r | |
1390 | UINT16\r | |
1391 | EFIAPI\r | |
1392 | LibPcdSet16 (\r | |
1393 | IN UINTN TokenNumber,\r | |
1394 | IN UINT16 Value\r | |
1395 | );\r | |
1396 | \r | |
1397 | \r | |
1398 | /**\r | |
64735d24 | 1399 | This function provides a means by which to set a value for a given PCD token.\r |
1400 | \r | |
fb3df220 | 1401 | Sets the 32-bit value for the token specified by TokenNumber \r |
1402 | to the value specified by Value. Value is returned.\r | |
0befb08d | 1403 | \r |
fb287b56 | 1404 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1405 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1406 | \r |
502bfcef | 1407 | @return Return the Value that was set.\r |
fb3df220 | 1408 | \r |
1409 | **/\r | |
1410 | UINT32\r | |
1411 | EFIAPI\r | |
1412 | LibPcdSet32 (\r | |
1413 | IN UINTN TokenNumber,\r | |
1414 | IN UINT32 Value\r | |
1415 | );\r | |
1416 | \r | |
1417 | \r | |
1418 | /**\r | |
64735d24 | 1419 | This function provides a means by which to set a value for a given PCD token.\r |
1420 | \r | |
fb3df220 | 1421 | Sets the 64-bit value for the token specified by TokenNumber \r |
1422 | to the value specified by Value. Value is returned.\r | |
0befb08d | 1423 | \r |
fb287b56 | 1424 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1425 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1426 | \r |
502bfcef | 1427 | @return Return the Value that was set.\r |
fb3df220 | 1428 | \r |
1429 | **/\r | |
1430 | UINT64\r | |
1431 | EFIAPI\r | |
1432 | LibPcdSet64 (\r | |
1433 | IN UINTN TokenNumber,\r | |
1434 | IN UINT64 Value\r | |
1435 | );\r | |
1436 | \r | |
1437 | \r | |
1438 | /**\r | |
64735d24 | 1439 | This function provides a means by which to set a value for a given PCD token.\r |
1440 | \r | |
fb3df220 | 1441 | Sets a buffer for the token specified by TokenNumber to the value \r |
d3057543 | 1442 | specified by Buffer and SizeOfBuffer. Buffer is returned. \r |
1443 | If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r | |
1444 | then set SizeOfBuffer to the maximum size supported by TokenNumber and \r | |
9a355841 | 1445 | return NULL to indicate that the set operation was not actually performed.\r |
fb3df220 | 1446 | \r |
d3057543 | 1447 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the \r |
fb3df220 | 1448 | maximum size supported by TokenName and NULL must be returned.\r |
1449 | \r | |
d3057543 | 1450 | If SizeOfBuffer is NULL, then ASSERT().\r |
1451 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1452 | \r |
2a254b90 | 1453 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
2616448e | 1454 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r |
64735d24 | 1455 | @param[in] Buffer A pointer to the buffer to set.\r |
fb3df220 | 1456 | \r |
502bfcef | 1457 | @return Return the pointer for the Buffer that was set.\r |
fb3df220 | 1458 | \r |
1459 | **/\r | |
64735d24 | 1460 | VOID *\r |
fb3df220 | 1461 | EFIAPI\r |
1462 | LibPcdSetPtr (\r | |
64735d24 | 1463 | IN UINTN TokenNumber,\r |
1464 | IN OUT UINTN *SizeOfBuffer,\r | |
b52f6a1a | 1465 | IN CONST VOID *Buffer\r |
fb3df220 | 1466 | );\r |
1467 | \r | |
1468 | \r | |
1469 | /**\r | |
64735d24 | 1470 | This function provides a means by which to set a value for a given PCD token.\r |
1471 | \r | |
fb3df220 | 1472 | Sets the Boolean value for the token specified by TokenNumber \r |
1473 | to the value specified by Value. Value is returned.\r | |
0befb08d | 1474 | \r |
fb287b56 | 1475 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1476 | @param[in] Value The boolean value to set.\r | |
fb3df220 | 1477 | \r |
502bfcef | 1478 | @return Return the Value that was set.\r |
fb3df220 | 1479 | \r |
1480 | **/\r | |
1481 | BOOLEAN\r | |
1482 | EFIAPI\r | |
1483 | LibPcdSetBool (\r | |
1484 | IN UINTN TokenNumber,\r | |
1485 | IN BOOLEAN Value\r | |
1486 | );\r | |
1487 | \r | |
1488 | \r | |
1489 | /**\r | |
64735d24 | 1490 | This function provides a means by which to set a value for a given PCD token.\r |
1491 | \r | |
fb3df220 | 1492 | Sets the 8-bit value for the token specified by TokenNumber and \r |
1493 | Guid to the value specified by Value. Value is returned.\r | |
0befb08d | 1494 | \r |
fb3df220 | 1495 | If Guid is NULL, then ASSERT().\r |
0befb08d | 1496 | \r |
fb287b56 | 1497 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1498 | designates which namespace to set a value from.\r | |
1499 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1500 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1501 | \r |
502bfcef | 1502 | @return Return the Value that was set.\r |
fb3df220 | 1503 | \r |
1504 | **/\r | |
1505 | UINT8\r | |
1506 | EFIAPI\r | |
1507 | LibPcdSetEx8 (\r | |
1508 | IN CONST GUID *Guid,\r | |
1509 | IN UINTN TokenNumber,\r | |
1510 | IN UINT8 Value\r | |
1511 | );\r | |
1512 | \r | |
1513 | \r | |
1514 | /**\r | |
64735d24 | 1515 | This function provides a means by which to set a value for a given PCD token.\r |
1516 | \r | |
fb3df220 | 1517 | Sets the 16-bit value for the token specified by TokenNumber and \r |
1518 | Guid to the value specified by Value. Value is returned.\r | |
0befb08d | 1519 | \r |
fb3df220 | 1520 | If Guid is NULL, then ASSERT().\r |
0befb08d | 1521 | \r |
fb287b56 | 1522 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1523 | designates which namespace to set a value from.\r | |
1524 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1525 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1526 | \r |
502bfcef | 1527 | @return Return the Value that was set.\r |
fb3df220 | 1528 | \r |
1529 | **/\r | |
1530 | UINT16\r | |
1531 | EFIAPI\r | |
1532 | LibPcdSetEx16 (\r | |
1533 | IN CONST GUID *Guid,\r | |
1534 | IN UINTN TokenNumber,\r | |
1535 | IN UINT16 Value\r | |
1536 | );\r | |
1537 | \r | |
1538 | \r | |
1539 | /**\r | |
64735d24 | 1540 | This function provides a means by which to set a value for a given PCD token.\r |
1541 | \r | |
fb3df220 | 1542 | Sets the 32-bit value for the token specified by TokenNumber and \r |
1543 | Guid to the value specified by Value. Value is returned.\r | |
0befb08d | 1544 | \r |
fb3df220 | 1545 | If Guid is NULL, then ASSERT().\r |
0befb08d | 1546 | \r |
fb287b56 | 1547 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1548 | designates which namespace to set a value from.\r | |
1549 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1550 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1551 | \r |
502bfcef | 1552 | @return Return the Value that was set.\r |
fb3df220 | 1553 | \r |
1554 | **/\r | |
1555 | UINT32\r | |
1556 | EFIAPI\r | |
1557 | LibPcdSetEx32 (\r | |
1558 | IN CONST GUID *Guid,\r | |
1559 | IN UINTN TokenNumber,\r | |
1560 | IN UINT32 Value\r | |
1561 | );\r | |
1562 | \r | |
1563 | \r | |
1564 | /**\r | |
64735d24 | 1565 | This function provides a means by which to set a value for a given PCD token.\r |
1566 | \r | |
fb3df220 | 1567 | Sets the 64-bit value for the token specified by TokenNumber and \r |
1568 | Guid to the value specified by Value. Value is returned.\r | |
0befb08d | 1569 | \r |
fb3df220 | 1570 | If Guid is NULL, then ASSERT().\r |
0befb08d | 1571 | \r |
fb287b56 | 1572 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1573 | designates which namespace to set a value from.\r | |
1574 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1575 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1576 | \r |
502bfcef | 1577 | @return Return the Value that was set.\r |
fb3df220 | 1578 | \r |
1579 | **/\r | |
1580 | UINT64\r | |
1581 | EFIAPI\r | |
1582 | LibPcdSetEx64 (\r | |
1583 | IN CONST GUID *Guid,\r | |
1584 | IN UINTN TokenNumber,\r | |
1585 | IN UINT64 Value\r | |
1586 | );\r | |
1587 | \r | |
1588 | \r | |
1589 | /**\r | |
64735d24 | 1590 | This function provides a means by which to set a value for a given PCD token.\r |
1591 | \r | |
fb3df220 | 1592 | Sets a buffer for the token specified by TokenNumber to the value specified by \r |
d3057543 | 1593 | Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
1594 | the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r | |
fb3df220 | 1595 | supported by TokenNumber and return NULL to indicate that the set operation \r |
9a355841 | 1596 | was not actually performed.\r |
fb3df220 | 1597 | \r |
1598 | If Guid is NULL, then ASSERT().\r | |
d3057543 | 1599 | If SizeOfBuffer is NULL, then ASSERT().\r |
1600 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1601 | \r |
fb287b56 | 1602 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1603 | designates which namespace to set a value from.\r | |
1604 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1605 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
1606 | @param[in] Buffer A pointer to the buffer to set.\r | |
fb3df220 | 1607 | \r |
502bfcef | 1608 | @return Return the pointer to the Buffer that was set.\r |
fb3df220 | 1609 | \r |
1610 | **/\r | |
1611 | VOID *\r | |
1612 | EFIAPI\r | |
1613 | LibPcdSetExPtr (\r | |
1614 | IN CONST GUID *Guid,\r | |
1615 | IN UINTN TokenNumber,\r | |
1616 | IN OUT UINTN *SizeOfBuffer,\r | |
1617 | IN VOID *Buffer\r | |
1618 | );\r | |
1619 | \r | |
1620 | \r | |
1621 | /**\r | |
64735d24 | 1622 | This function provides a means by which to set a value for a given PCD token.\r |
1623 | \r | |
fb3df220 | 1624 | Sets the Boolean value for the token specified by TokenNumber and \r |
1625 | Guid to the value specified by Value. Value is returned.\r | |
0befb08d | 1626 | \r |
fb3df220 | 1627 | If Guid is NULL, then ASSERT().\r |
0befb08d | 1628 | \r |
fb287b56 | 1629 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1630 | designates which namespace to set a value from.\r | |
1631 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1632 | @param[in] Value The Boolean value to set.\r | |
fb3df220 | 1633 | \r |
502bfcef | 1634 | @return Return the Value that was set.\r |
fb3df220 | 1635 | \r |
1636 | **/\r | |
1637 | BOOLEAN\r | |
1638 | EFIAPI\r | |
1639 | LibPcdSetExBool (\r | |
1640 | IN CONST GUID *Guid,\r | |
1641 | IN UINTN TokenNumber,\r | |
1642 | IN BOOLEAN Value\r | |
1643 | );\r | |
9a355841 | 1644 | #endif\r |
fb3df220 | 1645 | \r |
9a355841 SZ |
1646 | /**\r |
1647 | This function provides a means by which to set a value for a given PCD token.\r | |
1648 | \r | |
1649 | Sets the 8-bit value for the token specified by TokenNumber\r | |
1650 | to the value specified by Value.\r | |
1651 | \r | |
1652 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1653 | @param[in] Value The 8-bit value to set.\r | |
1654 | \r | |
1655 | @return The status of the set operation.\r | |
1656 | \r | |
1657 | **/\r | |
1658 | RETURN_STATUS\r | |
1659 | EFIAPI\r | |
1660 | LibPcdSet8S (\r | |
1661 | IN UINTN TokenNumber,\r | |
1662 | IN UINT8 Value\r | |
1663 | );\r | |
1664 | \r | |
1665 | /**\r | |
1666 | This function provides a means by which to set a value for a given PCD token.\r | |
1667 | \r | |
1668 | Sets the 16-bit value for the token specified by TokenNumber\r | |
1669 | to the value specified by Value.\r | |
1670 | \r | |
1671 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1672 | @param[in] Value The 16-bit value to set.\r | |
1673 | \r | |
1674 | @return The status of the set operation.\r | |
1675 | \r | |
1676 | **/\r | |
1677 | RETURN_STATUS\r | |
1678 | EFIAPI\r | |
1679 | LibPcdSet16S (\r | |
1680 | IN UINTN TokenNumber,\r | |
1681 | IN UINT16 Value\r | |
1682 | );\r | |
1683 | \r | |
1684 | /**\r | |
1685 | This function provides a means by which to set a value for a given PCD token.\r | |
1686 | \r | |
1687 | Sets the 32-bit value for the token specified by TokenNumber\r | |
1688 | to the value specified by Value.\r | |
1689 | \r | |
1690 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1691 | @param[in] Value The 32-bit value to set.\r | |
1692 | \r | |
1693 | @return The status of the set operation.\r | |
1694 | \r | |
1695 | **/\r | |
1696 | RETURN_STATUS\r | |
1697 | EFIAPI\r | |
1698 | LibPcdSet32S (\r | |
1699 | IN UINTN TokenNumber,\r | |
1700 | IN UINT32 Value\r | |
1701 | );\r | |
1702 | \r | |
1703 | /**\r | |
1704 | This function provides a means by which to set a value for a given PCD token.\r | |
1705 | \r | |
1706 | Sets the 64-bit value for the token specified by TokenNumber\r | |
1707 | to the value specified by Value.\r | |
1708 | \r | |
1709 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1710 | @param[in] Value The 64-bit value to set.\r | |
1711 | \r | |
1712 | @return The status of the set operation.\r | |
1713 | \r | |
1714 | **/\r | |
1715 | RETURN_STATUS\r | |
1716 | EFIAPI\r | |
1717 | LibPcdSet64S (\r | |
1718 | IN UINTN TokenNumber,\r | |
1719 | IN UINT64 Value\r | |
1720 | );\r | |
1721 | \r | |
1722 | /**\r | |
1723 | This function provides a means by which to set a value for a given PCD token.\r | |
1724 | \r | |
1725 | Sets a buffer for the token specified by TokenNumber to the value specified\r | |
1726 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r | |
1727 | support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r | |
1728 | TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r | |
1729 | was not actually performed.\r | |
1730 | \r | |
1731 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r | |
1732 | maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r | |
1733 | \r | |
1734 | If SizeOfBuffer is NULL, then ASSERT().\r | |
1735 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
1736 | \r | |
1737 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1738 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
1739 | @param[in] Buffer A pointer to the buffer to set.\r | |
1740 | \r | |
1741 | @return The status of the set operation.\r | |
1742 | \r | |
1743 | **/\r | |
1744 | RETURN_STATUS\r | |
1745 | EFIAPI\r | |
1746 | LibPcdSetPtrS (\r | |
1747 | IN UINTN TokenNumber,\r | |
1748 | IN OUT UINTN *SizeOfBuffer,\r | |
1749 | IN CONST VOID *Buffer\r | |
1750 | );\r | |
1751 | \r | |
1752 | /**\r | |
1753 | This function provides a means by which to set a value for a given PCD token.\r | |
1754 | \r | |
1755 | Sets the boolean value for the token specified by TokenNumber\r | |
1756 | to the value specified by Value.\r | |
1757 | \r | |
1758 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1759 | @param[in] Value The boolean value to set.\r | |
1760 | \r | |
1761 | @return The status of the set operation.\r | |
1762 | \r | |
1763 | **/\r | |
1764 | RETURN_STATUS\r | |
1765 | EFIAPI\r | |
1766 | LibPcdSetBoolS (\r | |
1767 | IN UINTN TokenNumber,\r | |
1768 | IN BOOLEAN Value\r | |
1769 | );\r | |
1770 | \r | |
1771 | /**\r | |
1772 | This function provides a means by which to set a value for a given PCD token.\r | |
1773 | \r | |
1774 | Sets the 8-bit value for the token specified by TokenNumber\r | |
1775 | to the value specified by Value.\r | |
1776 | \r | |
1777 | If Guid is NULL, then ASSERT().\r | |
1778 | \r | |
1779 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
1780 | designates which namespace to set a value from.\r | |
1781 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1782 | @param[in] Value The 8-bit value to set.\r | |
1783 | \r | |
1784 | @return The status of the set operation.\r | |
1785 | \r | |
1786 | **/\r | |
1787 | RETURN_STATUS\r | |
1788 | EFIAPI\r | |
1789 | LibPcdSetEx8S (\r | |
1790 | IN CONST GUID *Guid,\r | |
1791 | IN UINTN TokenNumber,\r | |
1792 | IN UINT8 Value\r | |
1793 | );\r | |
1794 | \r | |
1795 | /**\r | |
1796 | This function provides a means by which to set a value for a given PCD token.\r | |
1797 | \r | |
1798 | Sets the 16-bit value for the token specified by TokenNumber\r | |
1799 | to the value specified by Value.\r | |
1800 | \r | |
1801 | If Guid is NULL, then ASSERT().\r | |
1802 | \r | |
1803 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
1804 | designates which namespace to set a value from.\r | |
1805 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1806 | @param[in] Value The 16-bit value to set.\r | |
1807 | \r | |
1808 | @return The status of the set operation.\r | |
1809 | \r | |
1810 | **/\r | |
1811 | RETURN_STATUS\r | |
1812 | EFIAPI\r | |
1813 | LibPcdSetEx16S (\r | |
1814 | IN CONST GUID *Guid,\r | |
1815 | IN UINTN TokenNumber,\r | |
1816 | IN UINT16 Value\r | |
1817 | );\r | |
1818 | \r | |
1819 | /**\r | |
1820 | This function provides a means by which to set a value for a given PCD token.\r | |
1821 | \r | |
1822 | Sets the 32-bit value for the token specified by TokenNumber\r | |
1823 | to the value specified by Value.\r | |
1824 | \r | |
1825 | If Guid is NULL, then ASSERT().\r | |
1826 | \r | |
1827 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
1828 | designates which namespace to set a value from.\r | |
1829 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1830 | @param[in] Value The 32-bit value to set.\r | |
1831 | \r | |
1832 | @return The status of the set operation.\r | |
1833 | \r | |
1834 | **/\r | |
1835 | RETURN_STATUS\r | |
1836 | EFIAPI\r | |
1837 | LibPcdSetEx32S (\r | |
1838 | IN CONST GUID *Guid,\r | |
1839 | IN UINTN TokenNumber,\r | |
1840 | IN UINT32 Value\r | |
1841 | );\r | |
1842 | \r | |
1843 | /**\r | |
1844 | This function provides a means by which to set a value for a given PCD token.\r | |
1845 | \r | |
1846 | Sets the 64-bit value for the token specified by TokenNumber\r | |
1847 | to the value specified by Value.\r | |
1848 | \r | |
1849 | If Guid is NULL, then ASSERT().\r | |
1850 | \r | |
1851 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
1852 | designates which namespace to set a value from.\r | |
1853 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1854 | @param[in] Value The 64-bit value to set.\r | |
1855 | \r | |
1856 | @return The status of the set operation.\r | |
1857 | \r | |
1858 | **/\r | |
1859 | RETURN_STATUS\r | |
1860 | EFIAPI\r | |
1861 | LibPcdSetEx64S (\r | |
1862 | IN CONST GUID *Guid,\r | |
1863 | IN UINTN TokenNumber,\r | |
1864 | IN UINT64 Value\r | |
1865 | );\r | |
1866 | \r | |
1867 | /**\r | |
1868 | This function provides a means by which to set a value for a given PCD token.\r | |
1869 | \r | |
1870 | Sets a buffer for the token specified by TokenNumber to the value specified by\r | |
1871 | Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r | |
1872 | support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r | |
1873 | TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r | |
1874 | was not actually performed.\r | |
1875 | \r | |
1876 | If Guid is NULL, then ASSERT().\r | |
1877 | If SizeOfBuffer is NULL, then ASSERT().\r | |
1878 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
1879 | \r | |
1880 | @param[in] Guid Pointer to a 128-bit unique value that\r | |
1881 | designates which namespace to set a value from.\r | |
1882 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1883 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
1884 | @param[in] Buffer A pointer to the buffer to set.\r | |
1885 | \r | |
1886 | @return The status of the set operation.\r | |
1887 | \r | |
1888 | **/\r | |
1889 | RETURN_STATUS\r | |
1890 | EFIAPI\r | |
1891 | LibPcdSetExPtrS (\r | |
1892 | IN CONST GUID *Guid,\r | |
1893 | IN UINTN TokenNumber,\r | |
1894 | IN OUT UINTN *SizeOfBuffer,\r | |
1895 | IN VOID *Buffer\r | |
1896 | );\r | |
1897 | \r | |
1898 | /**\r | |
1899 | This function provides a means by which to set a value for a given PCD token.\r | |
1900 | \r | |
1901 | Sets the boolean value for the token specified by TokenNumber\r | |
1902 | to the value specified by Value.\r | |
1903 | \r | |
1904 | If Guid is NULL, then ASSERT().\r | |
1905 | \r | |
1906 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
1907 | designates which namespace to set a value from.\r | |
1908 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1909 | @param[in] Value The boolean value to set.\r | |
1910 | \r | |
1911 | @return The status of the set operation.\r | |
1912 | \r | |
1913 | **/\r | |
1914 | RETURN_STATUS\r | |
1915 | EFIAPI\r | |
1916 | LibPcdSetExBoolS (\r | |
1917 | IN CONST GUID *Guid,\r | |
1918 | IN UINTN TokenNumber,\r | |
1919 | IN BOOLEAN Value\r | |
1920 | );\r | |
fb3df220 | 1921 | \r |
1922 | /**\r | |
b677694d | 1923 | This notification function serves two purposes.\r |
fb3df220 | 1924 | \r |
1a2f870c | 1925 | Firstly, it notifies the module that did the registration that the value of this\r |
b677694d | 1926 | PCD token has been set.\r |
1a2f870c | 1927 | Secondly, it provides a mechanism for the module that did the registration to intercept\r |
b677694d | 1928 | the set operation and override the value been set if necessary. After the invocation of\r |
1929 | the callback function, TokenData will be used by PCD service PEIM or driver to modify th\r | |
1930 | internal data in PCD database. \r | |
fb3df220 | 1931 | \r |
2a254b90 | 1932 | @param[in] CallBackGuid The PCD token GUID being set.\r |
1933 | @param[in] CallBackToken The PCD token number being set.\r | |
1934 | @param[in, out] TokenData A pointer to the token data being set.\r | |
1935 | @param[in] TokenDataSize The size, in bytes, of the data being set.\r | |
fb3df220 | 1936 | \r |
fb3df220 | 1937 | **/\r |
1938 | typedef\r | |
1939 | VOID\r | |
78bf8f2d | 1940 | (EFIAPI *PCD_CALLBACK)(\r |
fb3df220 | 1941 | IN CONST GUID *CallBackGuid, OPTIONAL\r |
1942 | IN UINTN CallBackToken,\r | |
1943 | IN OUT VOID *TokenData,\r | |
1944 | IN UINTN TokenDataSize\r | |
1945 | );\r | |
1946 | \r | |
1947 | \r | |
1948 | /**\r | |
64735d24 | 1949 | Set up a notification function that is called when a specified token is set.\r |
1950 | \r | |
fb3df220 | 1951 | When the token specified by TokenNumber and Guid is set, \r |
1952 | then notification function specified by NotificationFunction is called. \r | |
b677694d | 1953 | If Guid is NULL, then the default token space is used.\r |
fb3df220 | 1954 | If NotificationFunction is NULL, then ASSERT().\r |
1955 | \r | |
b677694d | 1956 | @param[in] Guid Pointer to a 128-bit unique value that designates which \r |
1957 | namespace to set a value from. If NULL, then the default \r | |
1958 | token space is used.\r | |
1959 | @param[in] TokenNumber The PCD token number to monitor.\r | |
fb287b56 | 1960 | @param[in] NotificationFunction The function to call when the token \r |
1961 | specified by Guid and TokenNumber is set.\r | |
fb3df220 | 1962 | \r |
1963 | **/\r | |
1964 | VOID\r | |
1965 | EFIAPI\r | |
1966 | LibPcdCallbackOnSet (\r | |
1967 | IN CONST GUID *Guid, OPTIONAL\r | |
1968 | IN UINTN TokenNumber,\r | |
1969 | IN PCD_CALLBACK NotificationFunction\r | |
1970 | );\r | |
1971 | \r | |
1972 | \r | |
1973 | /**\r | |
1974 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
64735d24 | 1975 | \r |
b677694d | 1976 | Disable a notification function that was previously established with LibPcdCallbackOnSet().\r |
64735d24 | 1977 | If NotificationFunction is NULL, then ASSERT().\r |
1978 | If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r | |
1979 | and NotificationFunction, then ASSERT().\r | |
1980 | \r | |
b677694d | 1981 | @param[in] Guid Specify the GUID token space.\r |
1982 | @param[in] TokenNumber Specify the token number.\r | |
fb3df220 | 1983 | @param[in] NotificationFunction The callback function to be unregistered.\r |
1984 | \r | |
fb3df220 | 1985 | **/\r |
1986 | VOID\r | |
1987 | EFIAPI\r | |
1988 | LibPcdCancelCallback (\r | |
1989 | IN CONST GUID *Guid, OPTIONAL\r | |
1990 | IN UINTN TokenNumber,\r | |
1991 | IN PCD_CALLBACK NotificationFunction\r | |
1992 | );\r | |
1993 | \r | |
1994 | \r | |
1995 | /**\r | |
64735d24 | 1996 | Retrieves the next token in a token space.\r |
1997 | \r | |
fb3df220 | 1998 | Retrieves the next PCD token number from the token space specified by Guid. \r |
1999 | If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r | |
2000 | then the first token number is returned. Otherwise, the token number that \r | |
2001 | follows TokenNumber in the token space is returned. If TokenNumber is the last \r | |
64735d24 | 2002 | token number in the token space, then 0 is returned. \r |
2003 | \r | |
2004 | If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r | |
fb3df220 | 2005 | \r |
2a254b90 | 2006 | @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r |
2007 | to set a value from. If NULL, then the default token space is used.\r | |
2008 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r | |
2009 | token number.\r | |
fb3df220 | 2010 | \r |
f73e0ad2 | 2011 | @return The next valid token number.\r |
fb3df220 | 2012 | \r |
2013 | **/\r | |
2014 | UINTN \r | |
2015 | EFIAPI\r | |
2016 | LibPcdGetNextToken (\r | |
2017 | IN CONST GUID *Guid, OPTIONAL\r | |
2018 | IN UINTN TokenNumber\r | |
2019 | );\r | |
2020 | \r | |
2021 | \r | |
2022 | \r | |
2023 | /**\r | |
64735d24 | 2024 | Used to retrieve the list of available PCD token space GUIDs.\r |
2025 | \r | |
b677694d | 2026 | Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r |
2027 | in the platform.\r | |
2028 | If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r | |
2029 | If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r | |
fb3df220 | 2030 | \r |
b677694d | 2031 | @param TokenSpaceGuid Pointer to the a PCD token space GUID\r |
fb3df220 | 2032 | \r |
f73e0ad2 | 2033 | @return The next valid token namespace.\r |
fb3df220 | 2034 | \r |
2035 | **/\r | |
b677694d | 2036 | GUID *\r |
fb3df220 | 2037 | EFIAPI\r |
2038 | LibPcdGetNextTokenSpace (\r | |
64735d24 | 2039 | IN CONST GUID *TokenSpaceGuid\r |
fb3df220 | 2040 | );\r |
2041 | \r | |
2042 | \r | |
2043 | /**\r | |
64735d24 | 2044 | Sets a value of a patchable PCD entry that is type pointer.\r |
2045 | \r | |
fb3df220 | 2046 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r |
d3057543 | 2047 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
2048 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r | |
fb3df220 | 2049 | NULL to indicate that the set operation was not actually performed. \r |
d3057543 | 2050 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r |
fb3df220 | 2051 | MaximumDatumSize and NULL must be returned.\r |
2052 | \r | |
2053 | If PatchVariable is NULL, then ASSERT().\r | |
d3057543 | 2054 | If SizeOfBuffer is NULL, then ASSERT().\r |
2055 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 2056 | \r |
f8308f0a | 2057 | @param[out] PatchVariable A pointer to the global variable in a module that is \r |
fb3df220 | 2058 | the target of the set operation.\r |
2059 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
2060 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
2061 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
f73e0ad2 | 2062 | \r |
502bfcef | 2063 | @return Return the pointer to the Buffer that was set.\r |
fb3df220 | 2064 | \r |
2065 | **/\r | |
2066 | VOID *\r | |
2067 | EFIAPI\r | |
2068 | LibPatchPcdSetPtr (\r | |
f8308f0a | 2069 | OUT VOID *PatchVariable,\r |
fb3df220 | 2070 | IN UINTN MaximumDatumSize,\r |
2071 | IN OUT UINTN *SizeOfBuffer,\r | |
2072 | IN CONST VOID *Buffer\r | |
2073 | );\r | |
2074 | \r | |
9a355841 SZ |
2075 | /**\r |
2076 | Sets a value of a patchable PCD entry that is type pointer.\r | |
2077 | \r | |
2078 | Sets the PCD entry specified by PatchVariable to the value specified\r | |
2079 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r | |
2080 | then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r | |
2081 | to indicate that the set operation was not actually performed.\r | |
2082 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
2083 | MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r | |
2084 | \r | |
2085 | If PatchVariable is NULL, then ASSERT().\r | |
2086 | If SizeOfBuffer is NULL, then ASSERT().\r | |
2087 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
2088 | \r | |
f8308f0a | 2089 | @param[out] PatchVariable A pointer to the global variable in a module that is\r |
9a355841 SZ |
2090 | the target of the set operation.\r |
2091 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
2092 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
2093 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
2094 | \r | |
2095 | @return The status of the set operation.\r | |
2096 | \r | |
2097 | **/\r | |
2098 | RETURN_STATUS\r | |
2099 | EFIAPI\r | |
2100 | LibPatchPcdSetPtrS (\r | |
f8308f0a LG |
2101 | OUT VOID *PatchVariable,\r |
2102 | IN UINTN MaximumDatumSize,\r | |
2103 | IN OUT UINTN *SizeOfBuffer,\r | |
2104 | IN CONST VOID *Buffer\r | |
2105 | );\r | |
2106 | \r | |
2107 | /**\r | |
2108 | Sets a value and size of a patchable PCD entry that is type pointer.\r | |
2109 | \r | |
2110 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r | |
2111 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r | |
2112 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r | |
2113 | NULL to indicate that the set operation was not actually performed. \r | |
2114 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r | |
2115 | MaximumDatumSize and NULL must be returned.\r | |
2116 | \r | |
2117 | If PatchVariable is NULL, then ASSERT().\r | |
2118 | If SizeOfPatchVariable is NULL, then ASSERT().\r | |
2119 | If SizeOfBuffer is NULL, then ASSERT().\r | |
2120 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
2121 | \r | |
2122 | @param[out] PatchVariable A pointer to the global variable in a module that is \r | |
2123 | the target of the set operation.\r | |
2124 | @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r | |
2125 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
2126 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
2127 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
2128 | \r | |
2129 | @return Return the pointer to the Buffer that was set.\r | |
2130 | \r | |
2131 | **/\r | |
2132 | VOID *\r | |
2133 | EFIAPI\r | |
2134 | LibPatchPcdSetPtrAndSize (\r | |
2135 | OUT VOID *PatchVariable,\r | |
2136 | OUT UINTN *SizeOfPatchVariable,\r | |
2137 | IN UINTN MaximumDatumSize,\r | |
2138 | IN OUT UINTN *SizeOfBuffer,\r | |
2139 | IN CONST VOID *Buffer\r | |
2140 | );\r | |
2141 | \r | |
2142 | /**\r | |
2143 | Sets a value and size of a patchable PCD entry that is type pointer.\r | |
2144 | \r | |
2145 | Sets the PCD entry specified by PatchVariable to the value specified\r | |
2146 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r | |
2147 | then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r | |
2148 | to indicate that the set operation was not actually performed.\r | |
2149 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
2150 | MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r | |
2151 | \r | |
2152 | If PatchVariable is NULL, then ASSERT().\r | |
2153 | If SizeOfPatchVariable is NULL, then ASSERT().\r | |
2154 | If SizeOfBuffer is NULL, then ASSERT().\r | |
2155 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
2156 | \r | |
2157 | @param[out] PatchVariable A pointer to the global variable in a module that is\r | |
2158 | the target of the set operation.\r | |
2159 | @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r | |
2160 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
2161 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
2162 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
2163 | \r | |
2164 | @return The status of the set operation.\r | |
2165 | \r | |
2166 | **/\r | |
2167 | RETURN_STATUS\r | |
2168 | EFIAPI\r | |
2169 | LibPatchPcdSetPtrAndSizeS (\r | |
2170 | OUT VOID *PatchVariable,\r | |
2171 | OUT UINTN *SizeOfPatchVariable,\r | |
9a355841 SZ |
2172 | IN UINTN MaximumDatumSize,\r |
2173 | IN OUT UINTN *SizeOfBuffer,\r | |
2174 | IN CONST VOID *Buffer\r | |
2175 | );\r | |
2176 | \r | |
96d6d004 SZ |
2177 | typedef enum {\r |
2178 | PCD_TYPE_8,\r | |
2179 | PCD_TYPE_16,\r | |
2180 | PCD_TYPE_32,\r | |
2181 | PCD_TYPE_64,\r | |
2182 | PCD_TYPE_BOOL,\r | |
2183 | PCD_TYPE_PTR\r | |
2184 | } PCD_TYPE;\r | |
2185 | \r | |
2186 | typedef struct {\r | |
2187 | ///\r | |
2188 | /// The returned information associated with the requested TokenNumber. If\r | |
2189 | /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.\r | |
2190 | ///\r | |
2191 | PCD_TYPE PcdType;\r | |
2192 | ///\r | |
2193 | /// The size of the data in bytes associated with the TokenNumber specified. If\r | |
2194 | /// TokenNumber is 0, then PcdSize is set 0.\r | |
2195 | ///\r | |
2196 | UINTN PcdSize;\r | |
2197 | ///\r | |
2198 | /// The null-terminated ASCII string associated with a given token. If the\r | |
2199 | /// TokenNumber specified was 0, then this field corresponds to the null-terminated\r | |
2200 | /// ASCII string associated with the token's namespace Guid. If NULL, there is no\r | |
2201 | /// name associated with this request.\r | |
2202 | ///\r | |
2203 | CHAR8 *PcdName;\r | |
2204 | } PCD_INFO;\r | |
2205 | \r | |
2206 | \r | |
2207 | /**\r | |
2208 | Retrieve additional information associated with a PCD token.\r | |
2209 | \r | |
2210 | This includes information such as the type of value the TokenNumber is associated with as well as possible\r | |
2211 | human readable name that is associated with the token.\r | |
2212 | \r | |
2213 | If TokenNumber is not in the default token space specified, then ASSERT().\r | |
2214 | \r | |
2215 | @param[in] TokenNumber The PCD token number.\r | |
2216 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r | |
2217 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r | |
2218 | **/\r | |
2219 | VOID\r | |
2220 | EFIAPI\r | |
2221 | LibPcdGetInfo (\r | |
2222 | IN UINTN TokenNumber,\r | |
2223 | OUT PCD_INFO *PcdInfo\r | |
2224 | );\r | |
2225 | \r | |
2226 | /**\r | |
2227 | Retrieve additional information associated with a PCD token.\r | |
2228 | \r | |
2229 | This includes information such as the type of value the TokenNumber is associated with as well as possible\r | |
2230 | human readable name that is associated with the token.\r | |
2231 | \r | |
2232 | If TokenNumber is not in the token space specified by Guid, then ASSERT().\r | |
2233 | \r | |
2234 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r | |
2235 | @param[in] TokenNumber The PCD token number.\r | |
2236 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r | |
2237 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r | |
2238 | **/\r | |
2239 | VOID\r | |
2240 | EFIAPI\r | |
2241 | LibPcdGetInfoEx (\r | |
2242 | IN CONST GUID *Guid,\r | |
2243 | IN UINTN TokenNumber,\r | |
2244 | OUT PCD_INFO *PcdInfo\r | |
2245 | );\r | |
2246 | \r | |
2247 | /**\r | |
2248 | Retrieve the currently set SKU Id.\r | |
2249 | \r | |
96d6d004 SZ |
2250 | @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r |
2251 | default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r | |
2252 | Id is returned.\r | |
2253 | **/\r | |
2254 | UINTN\r | |
2255 | EFIAPI\r | |
2256 | LibPcdGetSku (\r | |
2257 | VOID\r | |
2258 | );\r | |
2259 | \r | |
fb3df220 | 2260 | #endif\r |