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