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