]>
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 |
17 | Copyright (c) 2006 - 2008, Intel Corporation\r | |
18 | All rights reserved. This program and the accompanying materials\r | |
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 | |
351 | \r | |
64735d24 | 352 | /**\r |
353 | Retrieves an 8-bit PCD token value based on a token name.\r | |
354 | \r | |
355 | Returns the 8-bit value for the token specified by TokenName.\r | |
356 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
357 | \r | |
358 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
359 | \r | |
360 | @return 8-bit value for the token specified by TokenName.\r | |
361 | \r | |
362 | **/\r | |
fb3df220 | 363 | #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName\r |
64735d24 | 364 | \r |
365 | \r | |
366 | /**\r | |
367 | Retrieves a 16-bit PCD token value based on a token name.\r | |
368 | \r | |
369 | Returns the 16-bit value for the token specified by TokenName.\r | |
370 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
371 | \r | |
372 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
373 | \r | |
374 | @return 16-bit value for the token specified by TokenName.\r | |
375 | \r | |
376 | **/\r | |
fb3df220 | 377 | #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName\r |
64735d24 | 378 | \r |
379 | \r | |
380 | /**\r | |
381 | Retrieves a 32-bit PCD token value based on a token name.\r | |
382 | \r | |
383 | Returns the 32-bit value for the token specified by TokenName.\r | |
384 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
385 | \r | |
386 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
387 | \r | |
388 | @return 32-bit value for the token specified by TokenName.\r | |
389 | \r | |
390 | **/\r | |
fb3df220 | 391 | #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName\r |
64735d24 | 392 | \r |
393 | \r | |
394 | /**\r | |
395 | Retrieves a 64-bit PCD token value based on a token name.\r | |
396 | \r | |
397 | Returns the 64-bit value for the token specified by TokenName.\r | |
398 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
399 | \r | |
400 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
401 | \r | |
402 | @return 64-bit value for the token specified by TokenName.\r | |
403 | \r | |
404 | **/\r | |
fb3df220 | 405 | #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName\r |
64735d24 | 406 | \r |
407 | \r | |
408 | /**\r | |
409 | Retrieves a pointer to a PCD token buffer based on a token name.\r | |
410 | \r | |
411 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
412 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
413 | \r | |
414 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
415 | \r | |
416 | @return A pointer to the buffer.\r | |
417 | \r | |
418 | **/\r | |
fb3df220 | 419 | #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName\r |
64735d24 | 420 | \r |
421 | \r | |
422 | /**\r | |
423 | Retrieves a Boolean PCD token value based on a token name.\r | |
424 | \r | |
425 | Returns the Boolean value for the token specified by TokenName.\r | |
426 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
427 | \r | |
428 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
429 | \r | |
430 | @return A Boolean PCD token value.\r | |
431 | \r | |
432 | **/\r | |
fb3df220 | 433 | #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r |
434 | \r | |
64735d24 | 435 | \r |
436 | /**\r | |
437 | Sets an 8-bit PCD token value based on a token name.\r | |
438 | \r | |
439 | Sets the 8-bit value for the token specified by TokenName. Value is returned.\r | |
440 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
441 | \r | |
442 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
443 | @param Value The 8-bit value to set.\r | |
444 | \r | |
7b5b3124 | 445 | @return Return the Value that was set.\r |
64735d24 | 446 | \r |
447 | **/\r | |
fb3df220 | 448 | #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))\r |
64735d24 | 449 | \r |
450 | \r | |
451 | /**\r | |
452 | Sets a 16-bit PCD token value based on a token name.\r | |
453 | \r | |
454 | Sets the 16-bit value for the token specified by TokenName. Value is returned.\r | |
455 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
456 | \r | |
457 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
458 | @param Value The 16-bit value to set.\r | |
459 | \r | |
7b5b3124 | 460 | @return Return the Value that was set.\r |
64735d24 | 461 | \r |
462 | **/\r | |
fb3df220 | 463 | #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))\r |
64735d24 | 464 | \r |
465 | \r | |
466 | /**\r | |
467 | Sets a 32-bit PCD token value based on a token name.\r | |
468 | \r | |
469 | Sets the 32-bit value for the token specified by TokenName. Value is returned.\r | |
470 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
471 | \r | |
472 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
473 | @param Value The 32-bit value to set.\r | |
474 | \r | |
7b5b3124 | 475 | @return Return the Value that was set.\r |
64735d24 | 476 | \r |
477 | **/\r | |
fb3df220 | 478 | #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))\r |
64735d24 | 479 | \r |
480 | \r | |
481 | /**\r | |
482 | Sets a 64-bit PCD token value based on a token name.\r | |
483 | \r | |
484 | Sets the 64-bit value for the token specified by TokenName. Value is returned.\r | |
485 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
486 | \r | |
487 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
488 | @param Value The 64-bit value to set.\r | |
489 | \r | |
7b5b3124 | 490 | @return Return the Value that was set.\r |
64735d24 | 491 | \r |
492 | **/\r | |
fb3df220 | 493 | #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))\r |
64735d24 | 494 | \r |
495 | \r | |
496 | /**\r | |
497 | Sets a pointer to a PCD token buffer based on a token name.\r | |
498 | \r | |
499 | Sets the buffer for the token specified by TokenName. Buffer is returned. \r | |
500 | If SizeOfBuffer is greater than the maximum size supported by TokenName, \r | |
501 | then set SizeOfBuffer to the maximum size supported by TokenName and return NULL \r | |
502 | to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
503 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported \r | |
504 | by TokenName and NULL must be returned.\r | |
505 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
506 | \r | |
507 | If SizeOfBuffer is NULL, then ASSERT().\r | |
508 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
509 | \r | |
510 | @param TokenName The name of the PCD token to set the current value for.\r | |
511 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
512 | @param Buffer A pointer to the buffer to set.\r | |
513 | \r | |
7b5b3124 | 514 | @return Return the pointer to the Buffer that was set.\r |
64735d24 | 515 | \r |
516 | **/\r | |
fb3df220 | 517 | #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \\r |
518 | _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))\r | |
64735d24 | 519 | \r |
520 | /**\r | |
521 | Sets a Boolean PCD token value based on a token name.\r | |
522 | \r | |
523 | Sets the Boolean value for the token specified by TokenName. Value is returned. \r | |
524 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
525 | \r | |
526 | @param TokenName The name of the PCD token to set the current value for.\r | |
527 | @param Buffer The Boolean value to set.\r | |
528 | \r | |
7b5b3124 | 529 | @return Return the Value that was set.\r |
64735d24 | 530 | \r |
531 | **/\r | |
fb3df220 | 532 | #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))\r |
533 | \r | |
64735d24 | 534 | \r |
535 | /**\r | |
536 | Retrieves an 8-bit PCD token value based on a GUID and a token name.\r | |
537 | \r | |
538 | Returns the 8-bit value for the token specified by Guid and TokenName.\r | |
539 | If TokenName is not a valid token in the token space specified by Guid, \r | |
540 | then the module will not build.\r | |
541 | \r | |
542 | If Guid is NULL, then ASSERT().\r | |
543 | \r | |
544 | @param Guid Pointer to a 128-bit unique value that designates \r | |
545 | which namespace to retrieve a value from.\r | |
546 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
547 | \r | |
548 | @return An 8-bit PCD token value.\r | |
549 | \r | |
550 | **/\r | |
fb3df220 | 551 | #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 552 | \r |
553 | \r | |
554 | /**\r | |
555 | Retrieves a 16-bit PCD token value based on a GUID and a token name.\r | |
556 | \r | |
557 | Returns the 16-bit value for the token specified by Guid and TokenName.\r | |
558 | If TokenName is not a valid token in the token space specified by Guid, \r | |
559 | then the module will not build.\r | |
560 | \r | |
561 | If Guid is NULL, then ASSERT().\r | |
562 | \r | |
563 | @param Guid Pointer to a 128-bit unique value that designates \r | |
564 | which namespace to retrieve a value from.\r | |
565 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
566 | \r | |
567 | @return A 16-bit PCD token value.\r | |
568 | \r | |
569 | **/\r | |
fb3df220 | 570 | #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 571 | \r |
572 | \r | |
573 | /**\r | |
574 | Retrieves a 32-bit PCD token value based on a GUID and a token name.\r | |
575 | \r | |
576 | Returns the 32-bit value for the token specified by Guid and TokenName.\r | |
577 | If TokenName is not a valid token in the token space specified by Guid, \r | |
578 | then the module will not build.\r | |
579 | \r | |
580 | If Guid is NULL, then ASSERT().\r | |
581 | \r | |
582 | @param Guid Pointer to a 128-bit unique value that designates \r | |
583 | which namespace to retrieve a value from.\r | |
584 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
585 | \r | |
586 | @return A 32-bit PCD token value.\r | |
587 | \r | |
588 | **/\r | |
fb3df220 | 589 | #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 590 | \r |
591 | \r | |
592 | /**\r | |
593 | Retrieves a 64-bit PCD token value based on a GUID and a token name.\r | |
594 | \r | |
595 | Returns the 64-bit value for the token specified by Guid and TokenName.\r | |
596 | If TokenName is not a valid token in the token space specified by Guid, \r | |
597 | then the module will not build.\r | |
598 | \r | |
599 | If Guid is NULL, then ASSERT().\r | |
600 | \r | |
601 | @param Guid Pointer to a 128-bit unique value that designates \r | |
602 | which namespace to retrieve a value from.\r | |
603 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
604 | \r | |
605 | @return A 64-bit PCD token value.\r | |
606 | \r | |
607 | **/\r | |
fb3df220 | 608 | #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 609 | \r |
610 | \r | |
611 | /**\r | |
612 | Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r | |
613 | \r | |
614 | Returns a pointer to the buffer for the token specified by Guid and TokenName.\r | |
615 | If TokenName is not a valid token in the token space specified by Guid, \r | |
616 | then the module will not build.\r | |
617 | \r | |
618 | If Guid is NULL, then ASSERT().\r | |
619 | \r | |
620 | @param Guid Pointer to a 128-bit unique value that designates \r | |
621 | which namespace to retrieve a value from.\r | |
622 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
623 | \r | |
624 | @return A pointer to a PCD token buffer.\r | |
625 | \r | |
626 | **/\r | |
fb3df220 | 627 | #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 628 | \r |
629 | \r | |
630 | /**\r | |
631 | Retrieves a Boolean PCD token value based on a GUID and a token name.\r | |
632 | \r | |
633 | Returns the Boolean value for the token specified by Guid and TokenName.\r | |
634 | If TokenName is not a valid token in the token space specified by Guid, \r | |
635 | then the module will not build.\r | |
636 | \r | |
637 | If Guid is NULL, then ASSERT().\r | |
638 | \r | |
639 | @param Guid Pointer to a 128-bit unique value that designates \r | |
640 | which namespace to retrieve a value from.\r | |
641 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
642 | \r | |
643 | @return A Boolean PCD token value.\r | |
644 | \r | |
645 | **/\r | |
fb3df220 | 646 | #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), _PCD_TOKEN_##TokenName)\r |
647 | \r | |
64735d24 | 648 | \r |
649 | /**\r | |
650 | Sets an 8-bit PCD token value based on a GUID and a token name.\r | |
651 | \r | |
652 | Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
653 | If TokenName is not a valid token in the token space specified by Guid, \r | |
654 | then the module will not build.\r | |
655 | \r | |
656 | If Guid is NULL, then ASSERT().\r | |
657 | \r | |
658 | @param Guid Pointer to a 128-bit unique value that designates \r | |
659 | which namespace to retrieve a value from.\r | |
660 | @param TokenName The name of the PCD token to set the current value for.\r | |
661 | @param Value The 8-bit value to set. \r | |
662 | \r | |
7b5b3124 | 663 | @return Return the Value that was set.\r |
64735d24 | 664 | \r |
665 | **/\r | |
fb3df220 | 666 | #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 667 | \r |
668 | \r | |
669 | /**\r | |
670 | Sets a 16-bit PCD token value based on a GUID and a token name.\r | |
671 | \r | |
672 | Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
673 | If TokenName is not a valid token in the token space specified by Guid, \r | |
674 | then the module will not build.\r | |
675 | \r | |
676 | If Guid is NULL, then ASSERT().\r | |
677 | \r | |
678 | @param Guid Pointer to a 128-bit unique value that designates \r | |
679 | which namespace to retrieve a value from.\r | |
680 | @param TokenName The name of the PCD token to set the current value for.\r | |
681 | @param Value The 16-bit value to set. \r | |
682 | \r | |
7b5b3124 | 683 | @return Return the Value that was set.\r |
64735d24 | 684 | \r |
685 | **/\r | |
fb3df220 | 686 | #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 687 | \r |
688 | \r | |
689 | /**\r | |
690 | Sets a 32-bit PCD token value based on a GUID and a token name.\r | |
691 | \r | |
692 | Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
693 | If TokenName is not a valid token in the token space specified by Guid, \r | |
694 | then the module will not build.\r | |
695 | \r | |
696 | If Guid is NULL, then ASSERT().\r | |
697 | \r | |
698 | @param Guid Pointer to a 128-bit unique value that designates \r | |
699 | which namespace to retrieve a value from.\r | |
700 | @param TokenName The name of the PCD token to set the current value for.\r | |
701 | @param Value The 32-bit value to set. \r | |
702 | \r | |
7b5b3124 | 703 | @return Return the Value that was set.\r |
64735d24 | 704 | \r |
705 | **/\r | |
fb3df220 | 706 | #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 707 | \r |
708 | \r | |
709 | /**\r | |
710 | Sets a 64-bit PCD token value based on a GUID and a token name.\r | |
711 | \r | |
712 | Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
713 | If TokenName is not a valid token in the token space specified by Guid, \r | |
714 | then the module will not build.\r | |
715 | \r | |
716 | If Guid is NULL, then ASSERT().\r | |
717 | \r | |
718 | @param Guid Pointer to a 128-bit unique value that designates \r | |
719 | which namespace to retrieve a value from.\r | |
720 | @param TokenName The name of the PCD token to set the current value for.\r | |
721 | @param Value The 64-bit value to set. \r | |
722 | \r | |
7b5b3124 | 723 | @return Return the Value that was set.\r |
64735d24 | 724 | \r |
725 | **/\r | |
fb3df220 | 726 | #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 727 | \r |
728 | \r | |
729 | /**\r | |
730 | Sets a pointer to a PCD token buffer based on a GUID and a token name.\r | |
731 | \r | |
732 | Sets the buffer for the token specified by Guid and TokenName. Buffer is returned. \r | |
733 | If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, \r | |
734 | then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return \r | |
735 | NULL to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
736 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by\r | |
737 | Guid and TokenName and NULL must be returned.\r | |
738 | If TokenName is not a valid token in the token space specified by Guid, \r | |
739 | then the module will not build.\r | |
740 | \r | |
741 | If Guid is NULL, then ASSERT().\r | |
742 | If SizeOfBuffer is NULL, then ASSERT().\r | |
743 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
744 | \r | |
745 | @param Guid Pointer to a 128-bit unique value that designates \r | |
746 | which namespace to retrieve a value from.\r | |
747 | @param TokenName The name of the PCD token to set the current value for.\r | |
748 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. \r | |
7b5b3124 | 749 | @param Buffer Pointer to the buffer to set.\r |
64735d24 | 750 | \r |
7b5b3124 | 751 | @return Return the pointer to the Buffer that was set.\r |
64735d24 | 752 | \r |
753 | **/\r | |
fb3df220 | 754 | #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \\r |
755 | LibPcdSetExPtr ((Guid), _PCD_TOKEN_##TokenName, (SizeOfBuffer), (Buffer))\r | |
64735d24 | 756 | \r |
757 | \r | |
758 | /**\r | |
759 | Sets a Boolean PCD token value based on a GUID and a token name.\r | |
760 | \r | |
761 | Sets the Boolean value for the token specified by Guid and TokenName. Value is returned. \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 set the current value for. \r | |
770 | @param Value The Boolean value to set.\r | |
771 | \r | |
7b5b3124 | 772 | @return Return the Value that was set.\r |
64735d24 | 773 | \r |
774 | **/ \r | |
fb3df220 | 775 | #define PcdSetExBool(Guid, TokenName, Value) \\r |
776 | LibPcdSetExBool((Guid), _PCD_TOKEN_##TokenName, (Value))\r | |
777 | \r | |
778 | \r | |
779 | /**\r | |
64735d24 | 780 | This function provides a means by which SKU support can be established in the PCD infrastructure.\r |
781 | \r | |
fb3df220 | 782 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r |
b677694d | 783 | If SkuId >= PCD_MAX_SKU_ID, then ASSERT(). \r |
fb3df220 | 784 | \r |
b677694d | 785 | @param SkuId The SKU value that will be used when the PCD service retrieves and sets values\r |
786 | associated with a PCD token.\r | |
fb3df220 | 787 | \r |
1a2f870c | 788 | @return Return the SKU ID that was set.\r |
fb3df220 | 789 | \r |
790 | **/\r | |
791 | UINTN\r | |
792 | EFIAPI\r | |
793 | LibPcdSetSku (\r | |
794 | IN UINTN SkuId\r | |
795 | );\r | |
796 | \r | |
797 | \r | |
798 | /**\r | |
64735d24 | 799 | This function provides a means by which to retrieve a value for a given PCD token.\r |
800 | \r | |
fb3df220 | 801 | Returns the 8-bit value for the token specified by TokenNumber. \r |
802 | \r | |
2a254b90 | 803 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 804 | \r |
f73e0ad2 | 805 | @return Returns the 8-bit value for the token specified by TokenNumber. \r |
fb3df220 | 806 | \r |
807 | **/\r | |
808 | UINT8\r | |
809 | EFIAPI\r | |
810 | LibPcdGet8 (\r | |
811 | IN UINTN TokenNumber\r | |
812 | );\r | |
813 | \r | |
814 | \r | |
815 | /**\r | |
64735d24 | 816 | This function provides a means by which to retrieve a value for a given PCD token.\r |
817 | \r | |
fb3df220 | 818 | Returns the 16-bit value for the token specified by TokenNumber. \r |
819 | \r | |
2a254b90 | 820 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 821 | \r |
f73e0ad2 | 822 | @return Returns the 16-bit value for the token specified by TokenNumber. \r |
fb3df220 | 823 | \r |
824 | **/\r | |
825 | UINT16\r | |
826 | EFIAPI\r | |
827 | LibPcdGet16 (\r | |
828 | IN UINTN TokenNumber\r | |
829 | );\r | |
830 | \r | |
831 | \r | |
832 | /**\r | |
64735d24 | 833 | This function provides a means by which to retrieve a value for a given PCD token.\r |
834 | \r | |
fb3df220 | 835 | Returns the 32-bit value for the token specified by TokenNumber. \r |
836 | \r | |
837 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
838 | \r | |
f73e0ad2 | 839 | @return Returns the 32-bit value for the token specified by TokenNumber.\r |
fb3df220 | 840 | \r |
841 | **/\r | |
842 | UINT32\r | |
843 | EFIAPI\r | |
844 | LibPcdGet32 (\r | |
845 | IN UINTN TokenNumber\r | |
846 | );\r | |
847 | \r | |
848 | \r | |
849 | /**\r | |
64735d24 | 850 | This function provides a means by which to retrieve a value for a given PCD token.\r |
851 | \r | |
fb3df220 | 852 | Returns the 64-bit value for the token specified by TokenNumber.\r |
853 | \r | |
854 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
855 | \r | |
f73e0ad2 | 856 | @return Returns the 64-bit value for the token specified by TokenNumber.\r |
fb3df220 | 857 | \r |
858 | **/\r | |
859 | UINT64\r | |
860 | EFIAPI\r | |
861 | LibPcdGet64 (\r | |
862 | IN UINTN TokenNumber\r | |
863 | );\r | |
864 | \r | |
865 | \r | |
866 | /**\r | |
64735d24 | 867 | This function provides a means by which to retrieve a value for a given PCD token.\r |
868 | \r | |
fb3df220 | 869 | Returns the pointer to the buffer of the token specified by TokenNumber.\r |
870 | \r | |
871 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
872 | \r | |
f73e0ad2 | 873 | @return Returns the pointer to the token specified by TokenNumber.\r |
fb3df220 | 874 | \r |
875 | **/\r | |
876 | VOID *\r | |
877 | EFIAPI\r | |
878 | LibPcdGetPtr (\r | |
879 | IN UINTN TokenNumber\r | |
880 | );\r | |
881 | \r | |
882 | \r | |
883 | /**\r | |
64735d24 | 884 | This function provides a means by which to retrieve a value for a given PCD token.\r |
885 | \r | |
fb3df220 | 886 | Returns the Boolean value of the token specified by TokenNumber. \r |
887 | \r | |
888 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
889 | \r | |
f73e0ad2 | 890 | @return Returns the Boolean value of the token specified by TokenNumber. \r |
fb3df220 | 891 | \r |
892 | **/\r | |
893 | BOOLEAN \r | |
894 | EFIAPI\r | |
895 | LibPcdGetBool (\r | |
896 | IN UINTN TokenNumber\r | |
897 | );\r | |
898 | \r | |
899 | \r | |
900 | /**\r | |
64735d24 | 901 | This function provides a means by which to retrieve the size of a given PCD token.\r |
fb3df220 | 902 | \r |
903 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
904 | \r | |
f73e0ad2 | 905 | @return Returns the size of the token specified by TokenNumber. \r |
fb3df220 | 906 | \r |
907 | **/\r | |
908 | UINTN\r | |
909 | EFIAPI\r | |
910 | LibPcdGetSize (\r | |
911 | IN UINTN TokenNumber\r | |
912 | );\r | |
913 | \r | |
914 | \r | |
915 | /**\r | |
64735d24 | 916 | This function provides a means by which to retrieve a value for a given PCD token.\r |
917 | \r | |
fb3df220 | 918 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 919 | \r |
fb3df220 | 920 | If Guid is NULL, then ASSERT(). \r |
921 | \r | |
b677694d | 922 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
923 | which namespace to retrieve a value from.\r | |
924 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 925 | \r |
f73e0ad2 | 926 | @return Return the UINT8.\r |
fb3df220 | 927 | \r |
928 | **/\r | |
929 | UINT8\r | |
930 | EFIAPI\r | |
931 | LibPcdGetEx8 (\r | |
932 | IN CONST GUID *Guid,\r | |
933 | IN UINTN TokenNumber\r | |
934 | );\r | |
935 | \r | |
936 | \r | |
937 | /**\r | |
64735d24 | 938 | This function provides a means by which to retrieve a value for a given PCD token.\r |
939 | \r | |
fb3df220 | 940 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 941 | \r |
fb3df220 | 942 | If Guid is NULL, then ASSERT(). \r |
943 | \r | |
b677694d | 944 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
945 | which namespace to retrieve a value from.\r | |
946 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 947 | \r |
f73e0ad2 | 948 | @return Return the UINT16.\r |
fb3df220 | 949 | \r |
950 | **/\r | |
951 | UINT16\r | |
952 | EFIAPI\r | |
953 | LibPcdGetEx16 (\r | |
954 | IN CONST GUID *Guid,\r | |
955 | IN UINTN TokenNumber\r | |
956 | );\r | |
957 | \r | |
958 | \r | |
959 | /**\r | |
960 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
961 | If Guid is NULL, then ASSERT(). \r | |
962 | \r | |
b677694d | 963 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
964 | which namespace to retrieve a value from.\r | |
965 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 966 | \r |
f73e0ad2 | 967 | @return Return the UINT32.\r |
fb3df220 | 968 | \r |
969 | **/\r | |
970 | UINT32\r | |
971 | EFIAPI\r | |
972 | LibPcdGetEx32 (\r | |
973 | IN CONST GUID *Guid,\r | |
974 | IN UINTN TokenNumber\r | |
975 | );\r | |
976 | \r | |
977 | \r | |
978 | /**\r | |
64735d24 | 979 | This function provides a means by which to retrieve a value for a given PCD token.\r |
980 | \r | |
fb3df220 | 981 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 982 | \r |
fb3df220 | 983 | If Guid is NULL, then ASSERT(). \r |
984 | \r | |
fb287b56 | 985 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
986 | which namespace to retrieve a value from.\r | |
987 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 988 | \r |
f73e0ad2 | 989 | @return Return the UINT64.\r |
fb3df220 | 990 | \r |
991 | **/\r | |
992 | UINT64\r | |
993 | EFIAPI\r | |
994 | LibPcdGetEx64 (\r | |
995 | IN CONST GUID *Guid,\r | |
996 | IN UINTN TokenNumber\r | |
997 | );\r | |
998 | \r | |
999 | \r | |
1000 | /**\r | |
64735d24 | 1001 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1002 | \r | |
fb3df220 | 1003 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r |
64735d24 | 1004 | \r |
fb3df220 | 1005 | If Guid is NULL, then ASSERT(). \r |
1006 | \r | |
fb287b56 | 1007 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1008 | which namespace to retrieve a value from.\r | |
1009 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1010 | \r |
f73e0ad2 | 1011 | @return Return the VOID* pointer.\r |
fb3df220 | 1012 | \r |
1013 | **/\r | |
1014 | VOID *\r | |
1015 | EFIAPI\r | |
1016 | LibPcdGetExPtr (\r | |
1017 | IN CONST GUID *Guid,\r | |
1018 | IN UINTN TokenNumber\r | |
1019 | );\r | |
1020 | \r | |
1021 | \r | |
1022 | /**\r | |
64735d24 | 1023 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1024 | \r | |
fb3df220 | 1025 | Returns the Boolean value of the token specified by TokenNumber and Guid. \r |
64735d24 | 1026 | \r |
fb3df220 | 1027 | If Guid is NULL, then ASSERT(). \r |
1028 | \r | |
fb287b56 | 1029 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1030 | which namespace to retrieve a value from.\r | |
1031 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1032 | \r |
f73e0ad2 | 1033 | @return Return the BOOLEAN.\r |
fb3df220 | 1034 | \r |
1035 | **/\r | |
1036 | BOOLEAN\r | |
1037 | EFIAPI\r | |
1038 | LibPcdGetExBool (\r | |
1039 | IN CONST GUID *Guid,\r | |
1040 | IN UINTN TokenNumber\r | |
1041 | );\r | |
1042 | \r | |
1043 | \r | |
1044 | /**\r | |
64735d24 | 1045 | This function provides a means by which to retrieve the size of a given PCD token.\r |
1046 | \r | |
fb3df220 | 1047 | Returns the size of the token specified by TokenNumber and Guid. \r |
64735d24 | 1048 | \r |
fb3df220 | 1049 | If Guid is NULL, then ASSERT(). \r |
1050 | \r | |
fb287b56 | 1051 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1052 | which namespace to retrieve a value from.\r | |
1053 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1054 | \r |
f73e0ad2 | 1055 | @return Return the size.\r |
fb3df220 | 1056 | \r |
1057 | **/\r | |
1058 | UINTN\r | |
1059 | EFIAPI\r | |
1060 | LibPcdGetExSize (\r | |
1061 | IN CONST GUID *Guid,\r | |
1062 | IN UINTN TokenNumber\r | |
1063 | );\r | |
1064 | \r | |
1065 | \r | |
1066 | /**\r | |
64735d24 | 1067 | This function provides a means by which to set a value for a given PCD token.\r |
1068 | \r | |
fb3df220 | 1069 | Sets the 8-bit value for the token specified by TokenNumber \r |
1070 | to the value specified by Value. Value is returned.\r | |
1071 | \r | |
fb287b56 | 1072 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1073 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1074 | \r |
502bfcef | 1075 | @return Return the Value that was set.\r |
fb3df220 | 1076 | \r |
1077 | **/\r | |
1078 | UINT8\r | |
1079 | EFIAPI\r | |
1080 | LibPcdSet8 (\r | |
1081 | IN UINTN TokenNumber,\r | |
1082 | IN UINT8 Value\r | |
1083 | );\r | |
1084 | \r | |
1085 | \r | |
1086 | /**\r | |
64735d24 | 1087 | This function provides a means by which to set a value for a given PCD token.\r |
1088 | \r | |
fb3df220 | 1089 | Sets the 16-bit value for the token specified by TokenNumber \r |
1090 | to the value specified by Value. Value is returned.\r | |
1091 | \r | |
fb287b56 | 1092 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1093 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1094 | \r |
502bfcef | 1095 | @return Return the Value that was set.\r |
fb3df220 | 1096 | \r |
1097 | **/\r | |
1098 | UINT16\r | |
1099 | EFIAPI\r | |
1100 | LibPcdSet16 (\r | |
1101 | IN UINTN TokenNumber,\r | |
1102 | IN UINT16 Value\r | |
1103 | );\r | |
1104 | \r | |
1105 | \r | |
1106 | /**\r | |
64735d24 | 1107 | This function provides a means by which to set a value for a given PCD token.\r |
1108 | \r | |
fb3df220 | 1109 | Sets the 32-bit value for the token specified by TokenNumber \r |
1110 | to the value specified by Value. Value is returned.\r | |
1111 | \r | |
fb287b56 | 1112 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1113 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1114 | \r |
502bfcef | 1115 | @return Return the Value that was set.\r |
fb3df220 | 1116 | \r |
1117 | **/\r | |
1118 | UINT32\r | |
1119 | EFIAPI\r | |
1120 | LibPcdSet32 (\r | |
1121 | IN UINTN TokenNumber,\r | |
1122 | IN UINT32 Value\r | |
1123 | );\r | |
1124 | \r | |
1125 | \r | |
1126 | /**\r | |
64735d24 | 1127 | This function provides a means by which to set a value for a given PCD token.\r |
1128 | \r | |
fb3df220 | 1129 | Sets the 64-bit value for the token specified by TokenNumber \r |
1130 | to the value specified by Value. Value is returned.\r | |
1131 | \r | |
fb287b56 | 1132 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1133 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1134 | \r |
502bfcef | 1135 | @return Return the Value that was set.\r |
fb3df220 | 1136 | \r |
1137 | **/\r | |
1138 | UINT64\r | |
1139 | EFIAPI\r | |
1140 | LibPcdSet64 (\r | |
1141 | IN UINTN TokenNumber,\r | |
1142 | IN UINT64 Value\r | |
1143 | );\r | |
1144 | \r | |
1145 | \r | |
1146 | /**\r | |
64735d24 | 1147 | This function provides a means by which to set a value for a given PCD token.\r |
1148 | \r | |
fb3df220 | 1149 | Sets a buffer for the token specified by TokenNumber to the value \r |
d3057543 | 1150 | specified by Buffer and SizeOfBuffer. Buffer is returned. \r |
1151 | If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r | |
1152 | then set SizeOfBuffer to the maximum size supported by TokenNumber and \r | |
fb3df220 | 1153 | return NULL to indicate that the set operation was not actually performed. \r |
1154 | \r | |
d3057543 | 1155 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the \r |
fb3df220 | 1156 | maximum size supported by TokenName and NULL must be returned.\r |
1157 | \r | |
d3057543 | 1158 | If SizeOfBuffer is NULL, then ASSERT().\r |
1159 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1160 | \r |
2a254b90 | 1161 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
2616448e | 1162 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r |
64735d24 | 1163 | @param[in] Buffer A pointer to the buffer to set.\r |
fb3df220 | 1164 | \r |
502bfcef | 1165 | @return Return the pointer for the Buffer that was set.\r |
fb3df220 | 1166 | \r |
1167 | **/\r | |
64735d24 | 1168 | VOID *\r |
fb3df220 | 1169 | EFIAPI\r |
1170 | LibPcdSetPtr (\r | |
64735d24 | 1171 | IN UINTN TokenNumber,\r |
1172 | IN OUT UINTN *SizeOfBuffer,\r | |
b52f6a1a | 1173 | IN CONST VOID *Buffer\r |
fb3df220 | 1174 | );\r |
1175 | \r | |
1176 | \r | |
1177 | /**\r | |
64735d24 | 1178 | This function provides a means by which to set a value for a given PCD token.\r |
1179 | \r | |
fb3df220 | 1180 | Sets the Boolean value for the token specified by TokenNumber \r |
1181 | to the value specified by Value. Value is returned.\r | |
1182 | \r | |
fb287b56 | 1183 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1184 | @param[in] Value The boolean value to set.\r | |
fb3df220 | 1185 | \r |
502bfcef | 1186 | @return Return the Value that was set.\r |
fb3df220 | 1187 | \r |
1188 | **/\r | |
1189 | BOOLEAN\r | |
1190 | EFIAPI\r | |
1191 | LibPcdSetBool (\r | |
1192 | IN UINTN TokenNumber,\r | |
1193 | IN BOOLEAN Value\r | |
1194 | );\r | |
1195 | \r | |
1196 | \r | |
1197 | /**\r | |
64735d24 | 1198 | This function provides a means by which to set a value for a given PCD token.\r |
1199 | \r | |
fb3df220 | 1200 | Sets the 8-bit value for the token specified by TokenNumber and \r |
1201 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1202 | \r |
fb3df220 | 1203 | If Guid is NULL, then ASSERT().\r |
1204 | \r | |
fb287b56 | 1205 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1206 | designates which namespace to set a value from.\r | |
1207 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1208 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1209 | \r |
502bfcef | 1210 | @return Return the Value that was set.\r |
fb3df220 | 1211 | \r |
1212 | **/\r | |
1213 | UINT8\r | |
1214 | EFIAPI\r | |
1215 | LibPcdSetEx8 (\r | |
1216 | IN CONST GUID *Guid,\r | |
1217 | IN UINTN TokenNumber,\r | |
1218 | IN UINT8 Value\r | |
1219 | );\r | |
1220 | \r | |
1221 | \r | |
1222 | /**\r | |
64735d24 | 1223 | This function provides a means by which to set a value for a given PCD token.\r |
1224 | \r | |
fb3df220 | 1225 | Sets the 16-bit value for the token specified by TokenNumber and \r |
1226 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1227 | \r |
fb3df220 | 1228 | If Guid is NULL, then ASSERT().\r |
1229 | \r | |
fb287b56 | 1230 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1231 | designates which namespace to set a value from.\r | |
1232 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1233 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1234 | \r |
502bfcef | 1235 | @return Return the Value that was set.\r |
fb3df220 | 1236 | \r |
1237 | **/\r | |
1238 | UINT16\r | |
1239 | EFIAPI\r | |
1240 | LibPcdSetEx16 (\r | |
1241 | IN CONST GUID *Guid,\r | |
1242 | IN UINTN TokenNumber,\r | |
1243 | IN UINT16 Value\r | |
1244 | );\r | |
1245 | \r | |
1246 | \r | |
1247 | /**\r | |
64735d24 | 1248 | This function provides a means by which to set a value for a given PCD token.\r |
1249 | \r | |
fb3df220 | 1250 | Sets the 32-bit value for the token specified by TokenNumber and \r |
1251 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1252 | \r |
fb3df220 | 1253 | If Guid is NULL, then ASSERT().\r |
1254 | \r | |
fb287b56 | 1255 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1256 | designates which namespace to set a value from.\r | |
1257 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1258 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1259 | \r |
502bfcef | 1260 | @return Return the Value that was set.\r |
fb3df220 | 1261 | \r |
1262 | **/\r | |
1263 | UINT32\r | |
1264 | EFIAPI\r | |
1265 | LibPcdSetEx32 (\r | |
1266 | IN CONST GUID *Guid,\r | |
1267 | IN UINTN TokenNumber,\r | |
1268 | IN UINT32 Value\r | |
1269 | );\r | |
1270 | \r | |
1271 | \r | |
1272 | /**\r | |
64735d24 | 1273 | This function provides a means by which to set a value for a given PCD token.\r |
1274 | \r | |
fb3df220 | 1275 | Sets the 64-bit value for the token specified by TokenNumber and \r |
1276 | Guid to the value specified by Value. Value is returned.\r | |
1277 | If Guid is NULL, then ASSERT().\r | |
1278 | \r | |
fb287b56 | 1279 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1280 | designates which namespace to set a value from.\r | |
1281 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1282 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1283 | \r |
502bfcef | 1284 | @return Return the Value that was set.\r |
fb3df220 | 1285 | \r |
1286 | **/\r | |
1287 | UINT64\r | |
1288 | EFIAPI\r | |
1289 | LibPcdSetEx64 (\r | |
1290 | IN CONST GUID *Guid,\r | |
1291 | IN UINTN TokenNumber,\r | |
1292 | IN UINT64 Value\r | |
1293 | );\r | |
1294 | \r | |
1295 | \r | |
1296 | /**\r | |
64735d24 | 1297 | This function provides a means by which to set a value for a given PCD token.\r |
1298 | \r | |
fb3df220 | 1299 | Sets a buffer for the token specified by TokenNumber to the value specified by \r |
d3057543 | 1300 | Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
1301 | the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r | |
fb3df220 | 1302 | supported by TokenNumber and return NULL to indicate that the set operation \r |
1303 | was not actually performed. \r | |
1304 | \r | |
1305 | If Guid is NULL, then ASSERT().\r | |
d3057543 | 1306 | If SizeOfBuffer is NULL, then ASSERT().\r |
1307 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1308 | \r |
fb287b56 | 1309 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1310 | designates which namespace to set a value from.\r | |
1311 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1312 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
1313 | @param[in] Buffer A pointer to the buffer to set.\r | |
fb3df220 | 1314 | \r |
502bfcef | 1315 | @return Return the pointer to the Buffer that was set.\r |
fb3df220 | 1316 | \r |
1317 | **/\r | |
1318 | VOID *\r | |
1319 | EFIAPI\r | |
1320 | LibPcdSetExPtr (\r | |
1321 | IN CONST GUID *Guid,\r | |
1322 | IN UINTN TokenNumber,\r | |
1323 | IN OUT UINTN *SizeOfBuffer,\r | |
1324 | IN VOID *Buffer\r | |
1325 | );\r | |
1326 | \r | |
1327 | \r | |
1328 | /**\r | |
64735d24 | 1329 | This function provides a means by which to set a value for a given PCD token.\r |
1330 | \r | |
fb3df220 | 1331 | Sets the Boolean value for the token specified by TokenNumber and \r |
1332 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1333 | \r |
fb3df220 | 1334 | If Guid is NULL, then ASSERT().\r |
1335 | \r | |
fb287b56 | 1336 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1337 | designates which namespace to set a value from.\r | |
1338 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1339 | @param[in] Value The Boolean value to set.\r | |
fb3df220 | 1340 | \r |
502bfcef | 1341 | @return Return the Value that was set.\r |
fb3df220 | 1342 | \r |
1343 | **/\r | |
1344 | BOOLEAN\r | |
1345 | EFIAPI\r | |
1346 | LibPcdSetExBool (\r | |
1347 | IN CONST GUID *Guid,\r | |
1348 | IN UINTN TokenNumber,\r | |
1349 | IN BOOLEAN Value\r | |
1350 | );\r | |
1351 | \r | |
1352 | \r | |
1353 | /**\r | |
b677694d | 1354 | This notification function serves two purposes.\r |
fb3df220 | 1355 | \r |
1a2f870c | 1356 | Firstly, it notifies the module that did the registration that the value of this\r |
b677694d | 1357 | PCD token has been set.\r |
1a2f870c | 1358 | Secondly, it provides a mechanism for the module that did the registration to intercept\r |
b677694d | 1359 | the set operation and override the value been set if necessary. After the invocation of\r |
1360 | the callback function, TokenData will be used by PCD service PEIM or driver to modify th\r | |
1361 | internal data in PCD database. \r | |
fb3df220 | 1362 | \r |
2a254b90 | 1363 | @param[in] CallBackGuid The PCD token GUID being set.\r |
1364 | @param[in] CallBackToken The PCD token number being set.\r | |
1365 | @param[in, out] TokenData A pointer to the token data being set.\r | |
1366 | @param[in] TokenDataSize The size, in bytes, of the data being set.\r | |
fb3df220 | 1367 | \r |
fb3df220 | 1368 | **/\r |
1369 | typedef\r | |
1370 | VOID\r | |
78bf8f2d | 1371 | (EFIAPI *PCD_CALLBACK)(\r |
fb3df220 | 1372 | IN CONST GUID *CallBackGuid, OPTIONAL\r |
1373 | IN UINTN CallBackToken,\r | |
1374 | IN OUT VOID *TokenData,\r | |
1375 | IN UINTN TokenDataSize\r | |
1376 | );\r | |
1377 | \r | |
1378 | \r | |
1379 | /**\r | |
64735d24 | 1380 | Set up a notification function that is called when a specified token is set.\r |
1381 | \r | |
fb3df220 | 1382 | When the token specified by TokenNumber and Guid is set, \r |
1383 | then notification function specified by NotificationFunction is called. \r | |
b677694d | 1384 | If Guid is NULL, then the default token space is used.\r |
fb3df220 | 1385 | If NotificationFunction is NULL, then ASSERT().\r |
1386 | \r | |
b677694d | 1387 | @param[in] Guid Pointer to a 128-bit unique value that designates which \r |
1388 | namespace to set a value from. If NULL, then the default \r | |
1389 | token space is used.\r | |
1390 | @param[in] TokenNumber The PCD token number to monitor.\r | |
fb287b56 | 1391 | @param[in] NotificationFunction The function to call when the token \r |
1392 | specified by Guid and TokenNumber is set.\r | |
fb3df220 | 1393 | \r |
1394 | **/\r | |
1395 | VOID\r | |
1396 | EFIAPI\r | |
1397 | LibPcdCallbackOnSet (\r | |
1398 | IN CONST GUID *Guid, OPTIONAL\r | |
1399 | IN UINTN TokenNumber,\r | |
1400 | IN PCD_CALLBACK NotificationFunction\r | |
1401 | );\r | |
1402 | \r | |
1403 | \r | |
1404 | /**\r | |
1405 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
64735d24 | 1406 | \r |
b677694d | 1407 | Disable a notification function that was previously established with LibPcdCallbackOnSet().\r |
64735d24 | 1408 | If NotificationFunction is NULL, then ASSERT().\r |
1409 | If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r | |
1410 | and NotificationFunction, then ASSERT().\r | |
1411 | \r | |
b677694d | 1412 | @param[in] Guid Specify the GUID token space.\r |
1413 | @param[in] TokenNumber Specify the token number.\r | |
fb3df220 | 1414 | @param[in] NotificationFunction The callback function to be unregistered.\r |
1415 | \r | |
fb3df220 | 1416 | **/\r |
1417 | VOID\r | |
1418 | EFIAPI\r | |
1419 | LibPcdCancelCallback (\r | |
1420 | IN CONST GUID *Guid, OPTIONAL\r | |
1421 | IN UINTN TokenNumber,\r | |
1422 | IN PCD_CALLBACK NotificationFunction\r | |
1423 | );\r | |
1424 | \r | |
1425 | \r | |
1426 | /**\r | |
64735d24 | 1427 | Retrieves the next token in a token space.\r |
1428 | \r | |
fb3df220 | 1429 | Retrieves the next PCD token number from the token space specified by Guid. \r |
1430 | If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r | |
1431 | then the first token number is returned. Otherwise, the token number that \r | |
1432 | follows TokenNumber in the token space is returned. If TokenNumber is the last \r | |
64735d24 | 1433 | token number in the token space, then 0 is returned. \r |
1434 | \r | |
1435 | If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r | |
fb3df220 | 1436 | \r |
2a254b90 | 1437 | @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r |
1438 | to set a value from. If NULL, then the default token space is used.\r | |
1439 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r | |
1440 | token number.\r | |
fb3df220 | 1441 | \r |
f73e0ad2 | 1442 | @return The next valid token number.\r |
fb3df220 | 1443 | \r |
1444 | **/\r | |
1445 | UINTN \r | |
1446 | EFIAPI\r | |
1447 | LibPcdGetNextToken (\r | |
1448 | IN CONST GUID *Guid, OPTIONAL\r | |
1449 | IN UINTN TokenNumber\r | |
1450 | );\r | |
1451 | \r | |
1452 | \r | |
1453 | \r | |
1454 | /**\r | |
64735d24 | 1455 | Used to retrieve the list of available PCD token space GUIDs.\r |
1456 | \r | |
b677694d | 1457 | Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r |
1458 | in the platform.\r | |
1459 | If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r | |
1460 | If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r | |
fb3df220 | 1461 | \r |
b677694d | 1462 | @param TokenSpaceGuid Pointer to the a PCD token space GUID\r |
fb3df220 | 1463 | \r |
f73e0ad2 | 1464 | @return The next valid token namespace.\r |
fb3df220 | 1465 | \r |
1466 | **/\r | |
b677694d | 1467 | GUID *\r |
fb3df220 | 1468 | EFIAPI\r |
1469 | LibPcdGetNextTokenSpace (\r | |
64735d24 | 1470 | IN CONST GUID *TokenSpaceGuid\r |
fb3df220 | 1471 | );\r |
1472 | \r | |
1473 | \r | |
1474 | /**\r | |
64735d24 | 1475 | Sets a value of a patchable PCD entry that is type pointer.\r |
1476 | \r | |
fb3df220 | 1477 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r |
d3057543 | 1478 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
1479 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r | |
fb3df220 | 1480 | NULL to indicate that the set operation was not actually performed. \r |
d3057543 | 1481 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r |
fb3df220 | 1482 | MaximumDatumSize and NULL must be returned.\r |
1483 | \r | |
1484 | If PatchVariable is NULL, then ASSERT().\r | |
d3057543 | 1485 | If SizeOfBuffer is NULL, then ASSERT().\r |
1486 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1487 | \r |
1488 | @param[in] PatchVariable A pointer to the global variable in a module that is \r | |
1489 | the target of the set operation.\r | |
1490 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
1491 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
1492 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
f73e0ad2 | 1493 | \r |
502bfcef | 1494 | @return Return the pointer to the Buffer that was set.\r |
fb3df220 | 1495 | \r |
1496 | **/\r | |
1497 | VOID *\r | |
1498 | EFIAPI\r | |
1499 | LibPatchPcdSetPtr (\r | |
1500 | IN VOID *PatchVariable,\r | |
1501 | IN UINTN MaximumDatumSize,\r | |
1502 | IN OUT UINTN *SizeOfBuffer,\r | |
1503 | IN CONST VOID *Buffer\r | |
1504 | );\r | |
1505 | \r | |
1506 | #endif\r |