]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Provides library services to get and set Platform Configuration Database entries.\r |
3 | \r | |
4 | PCD Library Class provides PCD usage macro interface for all PCD types.\r | |
5 | It should be included at any module who use PCD. If module use dynamic/dynamicex\r | |
6 | PCD, module should be linked to PEIM/DXE library instance to access that PCD.\r | |
7 | If module uses PatchableInModule type PCD, also need library instance produce\r | |
8 | LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, macro interface is\r | |
9 | translated to an variable or macro which is auto-generated by build tool in\r | |
10 | module's autogen.h/autogen.c.\r | |
64735d24 | 11 | The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are \r |
12 | only available prior to ExitBootServices(). If access to PCD values are required \r | |
13 | at runtime, then their values must be collected prior to ExitBootServices().\r | |
14 | There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),\r | |
15 | PatchPcdGetXX(), and PatchPcdSetXX().\r | |
50a64e5b | 16 | \r |
17 | Copyright (c) 2006 - 2008, Intel Corporation\r | |
18 | All rights reserved. This program and the accompanying materials\r | |
19 | are licensed and made available under the terms and conditions of the BSD License\r | |
20 | which accompanies this distribution. The full text of the license may be found at\r | |
21 | http://opensource.org/licenses/bsd-license.php\r | |
22 | \r | |
23 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
24 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
fb3df220 | 25 | \r |
fb3df220 | 26 | **/\r |
27 | \r | |
28 | #ifndef __PCD_LIB_H__\r | |
29 | #define __PCD_LIB_H__\r | |
30 | \r | |
c3665990 | 31 | #define PCD_MAX_SKU_ID 0x100\r |
fb3df220 | 32 | \r |
64735d24 | 33 | \r |
34 | /**\r | |
35 | Retrieves a token number based on a token name.\r | |
36 | \r | |
37 | Returns the token number associated with the PCD token specified by TokenName.\r | |
38 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
39 | If TokenName is not a feature flag, then the module will not build.\r | |
40 | \r | |
41 | @param TokenName The name of the PCD token to retrieve the token number for.\r | |
42 | \r | |
43 | @return The token number associated with the PCD.\r | |
44 | \r | |
45 | **/\r | |
fb3df220 | 46 | #define PcdToken(TokenName) _PCD_TOKEN_##TokenName\r |
47 | \r | |
48 | \r | |
64735d24 | 49 | /**\r |
50 | Retrieves a Boolean PCD feature flag based on a token name.\r | |
51 | \r | |
52 | Returns the Boolean value for the PCD feature flag specified by TokenName.\r | |
53 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
54 | If TokenName is not a feature flag, then the module will not build.\r | |
55 | \r | |
56 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
57 | \r | |
58 | @return Boolean value for the PCD feature flag.\r | |
59 | \r | |
60 | **/\r | |
fb3df220 | 61 | #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r |
62 | \r | |
63 | \r | |
64735d24 | 64 | /**\r |
65 | Retrieves an 8-bit fixed PCD token value based on a token name.\r | |
66 | \r | |
67 | Returns the 8-bit value for the token specified by TokenName.\r | |
68 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
69 | If TokenName is not a feature flag, then the module will not build.\r | |
70 | \r | |
71 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
72 | \r | |
73 | @return 8-bit value for the token specified by TokenName.\r | |
74 | \r | |
75 | **/\r | |
fb3df220 | 76 | #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 77 | \r |
78 | \r | |
79 | /**\r | |
80 | Retrieves a 16-bit fixed PCD token value based on a token name.\r | |
81 | \r | |
82 | Returns the 16-bit value for the token specified by TokenName.\r | |
83 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
84 | If TokenName is not a feature flag, then the module will not build.\r | |
85 | \r | |
86 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
87 | \r | |
88 | @return 16-bit value for the token specified by TokenName.\r | |
89 | \r | |
90 | **/\r | |
fb3df220 | 91 | #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 92 | \r |
93 | \r | |
94 | /**\r | |
95 | Retrieves a 32-bit fixed PCD token value based on a token name.\r | |
96 | \r | |
97 | Returns the 32-bit value for the token specified by TokenName.\r | |
98 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
99 | If TokenName is not a feature flag, then the module will not build.\r | |
100 | \r | |
101 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
102 | \r | |
103 | @return 32-bit value for the token specified by TokenName.\r | |
104 | \r | |
105 | **/\r | |
fb3df220 | 106 | #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 107 | \r |
108 | \r | |
109 | /**\r | |
110 | Retrieves a 64-bit fixed PCD token value based on a token name.\r | |
111 | \r | |
112 | Returns the 64-bit value for the token specified by TokenName.\r | |
113 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
114 | If TokenName is not a feature flag, then the module will not build.\r | |
115 | \r | |
116 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
117 | \r | |
118 | @return 64-bit value for the token specified by TokenName.\r | |
119 | \r | |
120 | **/\r | |
fb3df220 | 121 | #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName\r |
64735d24 | 122 | \r |
123 | \r | |
124 | /**\r | |
125 | Retrieves a Boolean fixed PCD token value based on a token name.\r | |
126 | \r | |
127 | Returns the Boolean value for the token specified by TokenName.\r | |
128 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
129 | If TokenName is not a feature flag, then the module will not build.\r | |
130 | \r | |
131 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
132 | \r | |
133 | @return The Boolean value for the token. \r | |
134 | \r | |
135 | **/\r | |
fb3df220 | 136 | #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName\r |
137 | \r | |
138 | \r | |
64735d24 | 139 | /**\r |
140 | Retrieves a pointer to a fixed PCD token buffer based on a token name.\r | |
141 | \r | |
142 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
143 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
144 | If TokenName is not a feature flag, then the module will not build.\r | |
145 | \r | |
146 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
147 | \r | |
148 | @return A pointer to the buffer. \r | |
149 | \r | |
150 | **/\r | |
fb3df220 | 151 | #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)\r |
152 | \r | |
153 | \r | |
64735d24 | 154 | /**\r |
155 | Retrieves an 8-bit binary patchable PCD token value based on a token name.\r | |
156 | \r | |
157 | Returns the 8-bit value for the token specified by TokenName.\r | |
158 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
159 | If TokenName is not a feature flag, then the module will not build.\r | |
160 | \r | |
161 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
162 | \r | |
163 | @return An 8-bit binary patchable PCD token value.\r | |
164 | \r | |
165 | **/\r | |
fb3df220 | 166 | #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 167 | \r |
168 | /**\r | |
169 | Retrieves a 16-bit binary patchable PCD token value based on a token name.\r | |
170 | \r | |
171 | Returns the 16-bit value for the token specified by TokenName.\r | |
172 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
173 | If TokenName is not a feature flag, then the module will not build.\r | |
174 | \r | |
175 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
176 | \r | |
177 | @return A 16-bit binary patchable PCD token value.\r | |
178 | \r | |
179 | **/\r | |
fb3df220 | 180 | #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 181 | \r |
182 | \r | |
183 | /**\r | |
184 | Retrieves a 32-bit binary patchable PCD token value based on a token name.\r | |
185 | \r | |
186 | Returns the 32-bit value for the token specified by TokenName.\r | |
187 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
188 | If TokenName is not a feature flag, then the module will not build.\r | |
189 | \r | |
190 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
191 | \r | |
192 | @return A 32-bit binary patchable PCD token value.\r | |
193 | \r | |
194 | **/\r | |
fb3df220 | 195 | #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 196 | \r |
197 | \r | |
198 | /**\r | |
199 | Retrieves a 64-bit binary patchable PCD token value based on a token name.\r | |
200 | \r | |
201 | Returns the 64-bit value for the token specified by TokenName.\r | |
202 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
203 | If TokenName is not a feature flag, then the module will not build.\r | |
204 | \r | |
205 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
206 | \r | |
207 | @return A 64-bit binary patchable PCD token value.\r | |
208 | \r | |
209 | **/\r | |
fb3df220 | 210 | #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 211 | \r |
212 | \r | |
213 | /**\r | |
214 | Retrieves a Boolean binary patchable PCD token value based on a token name.\r | |
215 | \r | |
216 | Returns the Boolean value for the token specified by TokenName.\r | |
217 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
218 | If TokenName is not a feature flag, then the module will not build.\r | |
219 | \r | |
220 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
221 | \r | |
222 | @return The Boolean value for the token.\r | |
223 | \r | |
224 | **/\r | |
fb3df220 | 225 | #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName\r |
64735d24 | 226 | \r |
227 | \r | |
228 | /**\r | |
229 | Retrieves a pointer to a binary patchable PCD token buffer based on a token name.\r | |
230 | \r | |
231 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
232 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
233 | If TokenName is not a feature flag, then the module will not build.\r | |
234 | \r | |
235 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
236 | \r | |
237 | @return A pointer to the buffer for the token.\r | |
238 | \r | |
239 | **/\r | |
fb3df220 | 240 | #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)\r |
241 | \r | |
64735d24 | 242 | \r |
243 | /**\r | |
244 | Sets an 8-bit binary patchable PCD token value based on a token name.\r | |
245 | \r | |
246 | Sets the 8-bit value for the token specified by TokenName. Value is returned.\r | |
247 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
248 | If TokenName is not a feature flag, then the module will not build.\r | |
249 | \r | |
250 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
251 | @param Value The 8-bit value to set.\r | |
252 | \r | |
253 | @return Value.\r | |
254 | \r | |
255 | **/\r | |
fb3df220 | 256 | #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 257 | \r |
258 | \r | |
259 | /**\r | |
260 | Sets a 16-bit binary patchable PCD token value based on a token name.\r | |
261 | \r | |
262 | Sets the 16-bit value for the token specified by TokenName. Value is returned.\r | |
263 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
264 | If TokenName is not a feature flag, then the module will not build.\r | |
265 | \r | |
266 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
267 | @param Value The 16-bit value to set.\r | |
268 | \r | |
269 | @return Value.\r | |
270 | \r | |
271 | **/\r | |
fb3df220 | 272 | #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 273 | \r |
274 | \r | |
275 | /**\r | |
276 | Sets a 32-bit binary patchable PCD token value based on a token name.\r | |
277 | \r | |
278 | Sets the 32-bit value for the token specified by TokenName. Value is returned.\r | |
279 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
280 | If TokenName is not a feature flag, then the module will not build.\r | |
281 | \r | |
282 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
283 | @param Value The 32-bit value to set.\r | |
284 | \r | |
285 | @return Value.\r | |
286 | \r | |
287 | **/\r | |
fb3df220 | 288 | #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 289 | \r |
290 | \r | |
291 | /**\r | |
292 | Sets a 64-bit binary patchable PCD token value based on a token name.\r | |
293 | \r | |
294 | Sets the 64-bit value for the token specified by TokenName. Value is returned.\r | |
295 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
296 | If TokenName is not a feature flag, then the module will not build.\r | |
297 | \r | |
298 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
299 | @param Value The 64-bit value to set.\r | |
300 | \r | |
301 | @return Value.\r | |
302 | \r | |
303 | **/\r | |
fb3df220 | 304 | #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 305 | \r |
306 | \r | |
307 | /**\r | |
308 | Sets a Boolean binary patchable PCD token value based on a token name.\r | |
309 | \r | |
310 | Sets the Boolean value for the token specified by TokenName. Value is returned.\r | |
311 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
312 | If TokenName is not a feature flag, then the module will not build.\r | |
313 | \r | |
314 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
315 | @param Value The boolean value to set.\r | |
316 | \r | |
317 | @return Value.\r | |
318 | \r | |
319 | **/\r | |
fb3df220 | 320 | #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r |
64735d24 | 321 | \r |
322 | \r | |
323 | /**\r | |
324 | Sets a pointer to a binary patchable PCD token buffer based on a token name.\r | |
325 | \r | |
326 | Sets the buffer for the token specified by TokenName. Buffer is returned. \r | |
327 | If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer\r | |
328 | to the maximum size supported by TokenName and return NULL to indicate that the set operation \r | |
329 | was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be \r | |
330 | set to the maximum size supported by TokenName and NULL must be returned.\r | |
331 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
332 | If TokenName is not a feature flag, then the module will not build.\r | |
333 | \r | |
334 | If SizeOfBuffer is NULL, then ASSERT().\r | |
335 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
336 | \r | |
337 | @param TokenName The name of the binary patchable PCD token to set the current value for.\r | |
338 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
339 | @param Buffer Pointer to the value to set.\r | |
340 | \r | |
341 | @return Value.\r | |
342 | \r | |
343 | **/\r | |
fb3df220 | 344 | #define PatchPcdSetPtr(TokenName, Size, Buffer) \\r |
345 | LibPatchPcdSetPtr ( \\r | |
346 | _gPcd_BinaryPatch_##TokenName, \\r | |
347 | (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \\r | |
348 | (Size), \\r | |
349 | (Buffer) \\r | |
350 | )\r | |
351 | \r | |
64735d24 | 352 | /**\r |
353 | Retrieves an 8-bit PCD token value based on a token name.\r | |
354 | \r | |
355 | Returns the 8-bit value for the token specified by TokenName.\r | |
356 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
357 | \r | |
358 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
359 | \r | |
360 | @return 8-bit value for the token specified by TokenName.\r | |
361 | \r | |
362 | **/\r | |
fb3df220 | 363 | #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName\r |
64735d24 | 364 | \r |
365 | \r | |
366 | /**\r | |
367 | Retrieves a 16-bit PCD token value based on a token name.\r | |
368 | \r | |
369 | Returns the 16-bit value for the token specified by TokenName.\r | |
370 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
371 | \r | |
372 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
373 | \r | |
374 | @return 16-bit value for the token specified by TokenName.\r | |
375 | \r | |
376 | **/\r | |
fb3df220 | 377 | #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName\r |
64735d24 | 378 | \r |
379 | \r | |
380 | /**\r | |
381 | Retrieves a 32-bit PCD token value based on a token name.\r | |
382 | \r | |
383 | Returns the 32-bit value for the token specified by TokenName.\r | |
384 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
385 | \r | |
386 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
387 | \r | |
388 | @return 32-bit value for the token specified by TokenName.\r | |
389 | \r | |
390 | **/\r | |
fb3df220 | 391 | #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName\r |
64735d24 | 392 | \r |
393 | \r | |
394 | /**\r | |
395 | Retrieves a 64-bit PCD token value based on a token name.\r | |
396 | \r | |
397 | Returns the 64-bit value for the token specified by TokenName.\r | |
398 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
399 | \r | |
400 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
401 | \r | |
402 | @return 64-bit value for the token specified by TokenName.\r | |
403 | \r | |
404 | **/\r | |
fb3df220 | 405 | #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName\r |
64735d24 | 406 | \r |
407 | \r | |
408 | /**\r | |
409 | Retrieves a pointer to a PCD token buffer based on a token name.\r | |
410 | \r | |
411 | Returns a pointer to the buffer for the token specified by TokenName.\r | |
412 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
413 | \r | |
414 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
415 | \r | |
416 | @return A pointer to the buffer.\r | |
417 | \r | |
418 | **/\r | |
fb3df220 | 419 | #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName\r |
64735d24 | 420 | \r |
421 | \r | |
422 | /**\r | |
423 | Retrieves a Boolean PCD token value based on a token name.\r | |
424 | \r | |
425 | Returns the Boolean value for the token specified by TokenName.\r | |
426 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
427 | \r | |
428 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
429 | \r | |
430 | @return A Boolean PCD token value.\r | |
431 | \r | |
432 | **/\r | |
fb3df220 | 433 | #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r |
434 | \r | |
64735d24 | 435 | \r |
436 | /**\r | |
437 | Sets an 8-bit PCD token value based on a token name.\r | |
438 | \r | |
439 | Sets the 8-bit value for the token specified by TokenName. Value is returned.\r | |
440 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
441 | \r | |
442 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
443 | @param Value The 8-bit value to set.\r | |
444 | \r | |
445 | @return Value.\r | |
446 | \r | |
447 | **/\r | |
fb3df220 | 448 | #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))\r |
64735d24 | 449 | \r |
450 | \r | |
451 | /**\r | |
452 | Sets a 16-bit PCD token value based on a token name.\r | |
453 | \r | |
454 | Sets the 16-bit value for the token specified by TokenName. Value is returned.\r | |
455 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
456 | \r | |
457 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
458 | @param Value The 16-bit value to set.\r | |
459 | \r | |
460 | @return Value.\r | |
461 | \r | |
462 | **/\r | |
fb3df220 | 463 | #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))\r |
64735d24 | 464 | \r |
465 | \r | |
466 | /**\r | |
467 | Sets a 32-bit PCD token value based on a token name.\r | |
468 | \r | |
469 | Sets the 32-bit value for the token specified by TokenName. Value is returned.\r | |
470 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
471 | \r | |
472 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
473 | @param Value The 32-bit value to set.\r | |
474 | \r | |
475 | @return Value.\r | |
476 | \r | |
477 | **/\r | |
fb3df220 | 478 | #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))\r |
64735d24 | 479 | \r |
480 | \r | |
481 | /**\r | |
482 | Sets a 64-bit PCD token value based on a token name.\r | |
483 | \r | |
484 | Sets the 64-bit value for the token specified by TokenName. Value is returned.\r | |
485 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
486 | \r | |
487 | @param TokenName The name of the PCD token to retrieve a current value for.\r | |
488 | @param Value The 64-bit value to set.\r | |
489 | \r | |
490 | @return Value.\r | |
491 | \r | |
492 | **/\r | |
fb3df220 | 493 | #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))\r |
64735d24 | 494 | \r |
495 | \r | |
496 | /**\r | |
497 | Sets a pointer to a PCD token buffer based on a token name.\r | |
498 | \r | |
499 | Sets the buffer for the token specified by TokenName. Buffer is returned. \r | |
500 | If SizeOfBuffer is greater than the maximum size supported by TokenName, \r | |
501 | then set SizeOfBuffer to the maximum size supported by TokenName and return NULL \r | |
502 | to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
503 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported \r | |
504 | by TokenName and NULL must be returned.\r | |
505 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
506 | \r | |
507 | If SizeOfBuffer is NULL, then ASSERT().\r | |
508 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
509 | \r | |
510 | @param TokenName The name of the PCD token to set the current value for.\r | |
511 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
512 | @param Buffer A pointer to the buffer to set.\r | |
513 | \r | |
514 | @return Buffer.\r | |
515 | \r | |
516 | **/\r | |
fb3df220 | 517 | #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \\r |
518 | _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))\r | |
64735d24 | 519 | \r |
520 | /**\r | |
521 | Sets a Boolean PCD token value based on a token name.\r | |
522 | \r | |
523 | Sets the Boolean value for the token specified by TokenName. Value is returned. \r | |
524 | If TokenName is not a valid token in the token space, then the module will not build.\r | |
525 | \r | |
526 | @param TokenName The name of the PCD token to set the current value for.\r | |
527 | @param Buffer The Boolean value to set.\r | |
528 | \r | |
529 | @return Value. \r | |
530 | \r | |
531 | **/\r | |
fb3df220 | 532 | #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))\r |
533 | \r | |
64735d24 | 534 | \r |
535 | /**\r | |
536 | Retrieves an 8-bit PCD token value based on a GUID and a token name.\r | |
537 | \r | |
538 | Returns the 8-bit value for the token specified by Guid and TokenName.\r | |
539 | If TokenName is not a valid token in the token space specified by Guid, \r | |
540 | then the module will not build.\r | |
541 | \r | |
542 | If Guid is NULL, then ASSERT().\r | |
543 | \r | |
544 | @param Guid Pointer to a 128-bit unique value that designates \r | |
545 | which namespace to retrieve a value from.\r | |
546 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
547 | \r | |
548 | @return An 8-bit PCD token value.\r | |
549 | \r | |
550 | **/\r | |
fb3df220 | 551 | #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 552 | \r |
553 | \r | |
554 | /**\r | |
555 | Retrieves a 16-bit PCD token value based on a GUID and a token name.\r | |
556 | \r | |
557 | Returns the 16-bit value for the token specified by Guid and TokenName.\r | |
558 | If TokenName is not a valid token in the token space specified by Guid, \r | |
559 | then the module will not build.\r | |
560 | \r | |
561 | If Guid is NULL, then ASSERT().\r | |
562 | \r | |
563 | @param Guid Pointer to a 128-bit unique value that designates \r | |
564 | which namespace to retrieve a value from.\r | |
565 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
566 | \r | |
567 | @return A 16-bit PCD token value.\r | |
568 | \r | |
569 | **/\r | |
fb3df220 | 570 | #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 571 | \r |
572 | \r | |
573 | /**\r | |
574 | Retrieves a 32-bit PCD token value based on a GUID and a token name.\r | |
575 | \r | |
576 | Returns the 32-bit value for the token specified by Guid and TokenName.\r | |
577 | If TokenName is not a valid token in the token space specified by Guid, \r | |
578 | then the module will not build.\r | |
579 | \r | |
580 | If Guid is NULL, then ASSERT().\r | |
581 | \r | |
582 | @param Guid Pointer to a 128-bit unique value that designates \r | |
583 | which namespace to retrieve a value from.\r | |
584 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
585 | \r | |
586 | @return A 32-bit PCD token value.\r | |
587 | \r | |
588 | **/\r | |
fb3df220 | 589 | #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 590 | \r |
591 | \r | |
592 | /**\r | |
593 | Retrieves a 64-bit PCD token value based on a GUID and a token name.\r | |
594 | \r | |
595 | Returns the 64-bit value for the token specified by Guid and TokenName.\r | |
596 | If TokenName is not a valid token in the token space specified by Guid, \r | |
597 | then the module will not build.\r | |
598 | \r | |
599 | If Guid is NULL, then ASSERT().\r | |
600 | \r | |
601 | @param Guid Pointer to a 128-bit unique value that designates \r | |
602 | which namespace to retrieve a value from.\r | |
603 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
604 | \r | |
605 | @return A 64-bit PCD token value.\r | |
606 | \r | |
607 | **/\r | |
fb3df220 | 608 | #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 609 | \r |
610 | \r | |
611 | /**\r | |
612 | Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r | |
613 | \r | |
614 | Returns a pointer to the buffer for the token specified by Guid and TokenName.\r | |
615 | If TokenName is not a valid token in the token space specified by Guid, \r | |
616 | then the module will not build.\r | |
617 | \r | |
618 | If Guid is NULL, then ASSERT().\r | |
619 | \r | |
620 | @param Guid Pointer to a 128-bit unique value that designates \r | |
621 | which namespace to retrieve a value from.\r | |
622 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
623 | \r | |
624 | @return A pointer to a PCD token buffer.\r | |
625 | \r | |
626 | **/\r | |
fb3df220 | 627 | #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), _PCD_TOKEN_##TokenName)\r |
64735d24 | 628 | \r |
629 | \r | |
630 | /**\r | |
631 | Retrieves a Boolean PCD token value based on a GUID and a token name.\r | |
632 | \r | |
633 | Returns the Boolean value for the token specified by Guid and TokenName.\r | |
634 | If TokenName is not a valid token in the token space specified by Guid, \r | |
635 | then the module will not build.\r | |
636 | \r | |
637 | If Guid is NULL, then ASSERT().\r | |
638 | \r | |
639 | @param Guid Pointer to a 128-bit unique value that designates \r | |
640 | which namespace to retrieve a value from.\r | |
641 | @param TokenName The name of the PCD token to retrieve a current value for. \r | |
642 | \r | |
643 | @return A Boolean PCD token value.\r | |
644 | \r | |
645 | **/\r | |
fb3df220 | 646 | #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), _PCD_TOKEN_##TokenName)\r |
647 | \r | |
64735d24 | 648 | \r |
649 | /**\r | |
650 | Sets an 8-bit PCD token value based on a GUID and a token name.\r | |
651 | \r | |
652 | Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
653 | If TokenName is not a valid token in the token space specified by Guid, \r | |
654 | then the module will not build.\r | |
655 | \r | |
656 | If Guid is NULL, then ASSERT().\r | |
657 | \r | |
658 | @param Guid Pointer to a 128-bit unique value that designates \r | |
659 | which namespace to retrieve a value from.\r | |
660 | @param TokenName The name of the PCD token to set the current value for.\r | |
661 | @param Value The 8-bit value to set. \r | |
662 | \r | |
663 | @return Value. \r | |
664 | \r | |
665 | **/\r | |
fb3df220 | 666 | #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 667 | \r |
668 | \r | |
669 | /**\r | |
670 | Sets a 16-bit PCD token value based on a GUID and a token name.\r | |
671 | \r | |
672 | Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
673 | If TokenName is not a valid token in the token space specified by Guid, \r | |
674 | then the module will not build.\r | |
675 | \r | |
676 | If Guid is NULL, then ASSERT().\r | |
677 | \r | |
678 | @param Guid Pointer to a 128-bit unique value that designates \r | |
679 | which namespace to retrieve a value from.\r | |
680 | @param TokenName The name of the PCD token to set the current value for.\r | |
681 | @param Value The 16-bit value to set. \r | |
682 | \r | |
683 | @return Value. \r | |
684 | \r | |
685 | **/\r | |
fb3df220 | 686 | #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 687 | \r |
688 | \r | |
689 | /**\r | |
690 | Sets a 32-bit PCD token value based on a GUID and a token name.\r | |
691 | \r | |
692 | Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
693 | If TokenName is not a valid token in the token space specified by Guid, \r | |
694 | then the module will not build.\r | |
695 | \r | |
696 | If Guid is NULL, then ASSERT().\r | |
697 | \r | |
698 | @param Guid Pointer to a 128-bit unique value that designates \r | |
699 | which namespace to retrieve a value from.\r | |
700 | @param TokenName The name of the PCD token to set the current value for.\r | |
701 | @param Value The 32-bit value to set. \r | |
702 | \r | |
703 | @return Value. \r | |
704 | \r | |
705 | **/\r | |
fb3df220 | 706 | #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 707 | \r |
708 | \r | |
709 | /**\r | |
710 | Sets a 64-bit PCD token value based on a GUID and a token name.\r | |
711 | \r | |
712 | Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.\r | |
713 | If TokenName is not a valid token in the token space specified by Guid, \r | |
714 | then the module will not build.\r | |
715 | \r | |
716 | If Guid is NULL, then ASSERT().\r | |
717 | \r | |
718 | @param Guid Pointer to a 128-bit unique value that designates \r | |
719 | which namespace to retrieve a value from.\r | |
720 | @param TokenName The name of the PCD token to set the current value for.\r | |
721 | @param Value The 64-bit value to set. \r | |
722 | \r | |
723 | @return Value. \r | |
724 | \r | |
725 | **/\r | |
fb3df220 | 726 | #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), _PCD_TOKEN_##TokenName, (Value))\r |
64735d24 | 727 | \r |
728 | \r | |
729 | /**\r | |
730 | Sets a pointer to a PCD token buffer based on a GUID and a token name.\r | |
731 | \r | |
732 | Sets the buffer for the token specified by Guid and TokenName. Buffer is returned. \r | |
733 | If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, \r | |
734 | then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return \r | |
735 | NULL to indicate that the set operation was not actually performed. If SizeOfBuffer \r | |
736 | is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by\r | |
737 | Guid and TokenName and NULL must be returned.\r | |
738 | If TokenName is not a valid token in the token space specified by Guid, \r | |
739 | then the module will not build.\r | |
740 | \r | |
741 | If Guid is NULL, then ASSERT().\r | |
742 | If SizeOfBuffer is NULL, then ASSERT().\r | |
743 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
744 | \r | |
745 | @param Guid Pointer to a 128-bit unique value that designates \r | |
746 | which namespace to retrieve a value from.\r | |
747 | @param TokenName The name of the PCD token to set the current value for.\r | |
748 | @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. \r | |
749 | @param Value Pointer to the buffer to set.\r | |
750 | \r | |
751 | @return Buffer. \r | |
752 | \r | |
753 | **/\r | |
fb3df220 | 754 | #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \\r |
755 | LibPcdSetExPtr ((Guid), _PCD_TOKEN_##TokenName, (SizeOfBuffer), (Buffer))\r | |
64735d24 | 756 | \r |
757 | \r | |
758 | /**\r | |
759 | Sets a Boolean PCD token value based on a GUID and a token name.\r | |
760 | \r | |
761 | Sets the Boolean value for the token specified by Guid and TokenName. Value is returned. \r | |
762 | If TokenName is not a valid token in the token space specified by Guid, \r | |
763 | then the module will not build.\r | |
764 | \r | |
765 | If Guid is NULL, then ASSERT().\r | |
766 | \r | |
767 | @param Guid Pointer to a 128-bit unique value that designates \r | |
768 | which namespace to retrieve a value from.\r | |
769 | @param TokenName The name of the PCD token to set the current value for. \r | |
770 | @param Value The Boolean value to set.\r | |
771 | \r | |
772 | @return Value. \r | |
773 | \r | |
774 | **/ \r | |
fb3df220 | 775 | #define PcdSetExBool(Guid, TokenName, Value) \\r |
776 | LibPcdSetExBool((Guid), _PCD_TOKEN_##TokenName, (Value))\r | |
777 | \r | |
778 | \r | |
779 | /**\r | |
64735d24 | 780 | This function provides a means by which SKU support can be established in the PCD infrastructure.\r |
781 | \r | |
fb3df220 | 782 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r |
783 | \r | |
784 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and \r | |
fb287b56 | 785 | set values associated with a PCD token.\r |
64735d24 | 786 | \r |
787 | If SkuId >= 0x100, then ASSERT(). \r | |
fb3df220 | 788 | \r |
f73e0ad2 | 789 | @return Return the SKU ID that just be set.\r |
fb3df220 | 790 | \r |
791 | **/\r | |
792 | UINTN\r | |
793 | EFIAPI\r | |
794 | LibPcdSetSku (\r | |
795 | IN UINTN SkuId\r | |
796 | );\r | |
797 | \r | |
798 | \r | |
799 | /**\r | |
64735d24 | 800 | This function provides a means by which to retrieve a value for a given PCD token.\r |
801 | \r | |
fb3df220 | 802 | Returns the 8-bit value for the token specified by TokenNumber. \r |
803 | \r | |
2a254b90 | 804 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 805 | \r |
f73e0ad2 | 806 | @return Returns the 8-bit value for the token specified by TokenNumber. \r |
fb3df220 | 807 | \r |
808 | **/\r | |
809 | UINT8\r | |
810 | EFIAPI\r | |
811 | LibPcdGet8 (\r | |
812 | IN UINTN TokenNumber\r | |
813 | );\r | |
814 | \r | |
815 | \r | |
816 | /**\r | |
64735d24 | 817 | This function provides a means by which to retrieve a value for a given PCD token.\r |
818 | \r | |
fb3df220 | 819 | Returns the 16-bit value for the token specified by TokenNumber. \r |
820 | \r | |
2a254b90 | 821 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
fb3df220 | 822 | \r |
f73e0ad2 | 823 | @return Returns the 16-bit value for the token specified by TokenNumber. \r |
fb3df220 | 824 | \r |
825 | **/\r | |
826 | UINT16\r | |
827 | EFIAPI\r | |
828 | LibPcdGet16 (\r | |
829 | IN UINTN TokenNumber\r | |
830 | );\r | |
831 | \r | |
832 | \r | |
833 | /**\r | |
64735d24 | 834 | This function provides a means by which to retrieve a value for a given PCD token.\r |
835 | \r | |
fb3df220 | 836 | Returns the 32-bit value for the token specified by TokenNumber. \r |
837 | \r | |
838 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
839 | \r | |
f73e0ad2 | 840 | @return Returns the 32-bit value for the token specified by TokenNumber.\r |
fb3df220 | 841 | \r |
842 | **/\r | |
843 | UINT32\r | |
844 | EFIAPI\r | |
845 | LibPcdGet32 (\r | |
846 | IN UINTN TokenNumber\r | |
847 | );\r | |
848 | \r | |
849 | \r | |
850 | /**\r | |
64735d24 | 851 | This function provides a means by which to retrieve a value for a given PCD token.\r |
852 | \r | |
fb3df220 | 853 | Returns the 64-bit value for the token specified by TokenNumber.\r |
854 | \r | |
855 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
856 | \r | |
f73e0ad2 | 857 | @return Returns the 64-bit value for the token specified by TokenNumber.\r |
fb3df220 | 858 | \r |
859 | **/\r | |
860 | UINT64\r | |
861 | EFIAPI\r | |
862 | LibPcdGet64 (\r | |
863 | IN UINTN TokenNumber\r | |
864 | );\r | |
865 | \r | |
866 | \r | |
867 | /**\r | |
64735d24 | 868 | This function provides a means by which to retrieve a value for a given PCD token.\r |
869 | \r | |
fb3df220 | 870 | Returns the pointer to the buffer of the token specified by TokenNumber.\r |
871 | \r | |
872 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
873 | \r | |
f73e0ad2 | 874 | @return Returns the pointer to the token specified by TokenNumber.\r |
fb3df220 | 875 | \r |
876 | **/\r | |
877 | VOID *\r | |
878 | EFIAPI\r | |
879 | LibPcdGetPtr (\r | |
880 | IN UINTN TokenNumber\r | |
881 | );\r | |
882 | \r | |
883 | \r | |
884 | /**\r | |
64735d24 | 885 | This function provides a means by which to retrieve a value for a given PCD token.\r |
886 | \r | |
fb3df220 | 887 | Returns the Boolean value of the token specified by TokenNumber. \r |
888 | \r | |
889 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
890 | \r | |
f73e0ad2 | 891 | @return Returns the Boolean value of the token specified by TokenNumber. \r |
fb3df220 | 892 | \r |
893 | **/\r | |
894 | BOOLEAN \r | |
895 | EFIAPI\r | |
896 | LibPcdGetBool (\r | |
897 | IN UINTN TokenNumber\r | |
898 | );\r | |
899 | \r | |
900 | \r | |
901 | /**\r | |
64735d24 | 902 | This function provides a means by which to retrieve the size of a given PCD token.\r |
fb3df220 | 903 | \r |
904 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
905 | \r | |
f73e0ad2 | 906 | @return Returns the size of the token specified by TokenNumber. \r |
fb3df220 | 907 | \r |
908 | **/\r | |
909 | UINTN\r | |
910 | EFIAPI\r | |
911 | LibPcdGetSize (\r | |
912 | IN UINTN TokenNumber\r | |
913 | );\r | |
914 | \r | |
915 | \r | |
916 | /**\r | |
64735d24 | 917 | This function provides a means by which to retrieve a value for a given PCD token.\r |
918 | \r | |
fb3df220 | 919 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 920 | \r |
fb3df220 | 921 | If Guid is NULL, then ASSERT(). \r |
922 | \r | |
923 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
924 | which namespace to retrieve a value from.\r | |
925 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
926 | \r | |
f73e0ad2 | 927 | @return Return the UINT8.\r |
fb3df220 | 928 | \r |
929 | **/\r | |
930 | UINT8\r | |
931 | EFIAPI\r | |
932 | LibPcdGetEx8 (\r | |
933 | IN CONST GUID *Guid,\r | |
934 | IN UINTN TokenNumber\r | |
935 | );\r | |
936 | \r | |
937 | \r | |
938 | /**\r | |
64735d24 | 939 | This function provides a means by which to retrieve a value for a given PCD token.\r |
940 | \r | |
fb3df220 | 941 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 942 | \r |
fb3df220 | 943 | If Guid is NULL, then ASSERT(). \r |
944 | \r | |
945 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
946 | which namespace to retrieve a value from.\r | |
947 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
948 | \r | |
f73e0ad2 | 949 | @return Return the UINT16.\r |
fb3df220 | 950 | \r |
951 | **/\r | |
952 | UINT16\r | |
953 | EFIAPI\r | |
954 | LibPcdGetEx16 (\r | |
955 | IN CONST GUID *Guid,\r | |
956 | IN UINTN TokenNumber\r | |
957 | );\r | |
958 | \r | |
959 | \r | |
960 | /**\r | |
961 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
962 | If Guid is NULL, then ASSERT(). \r | |
963 | \r | |
964 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
965 | which namespace to retrieve a value from.\r | |
966 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
967 | \r | |
f73e0ad2 | 968 | @return Return the UINT32.\r |
fb3df220 | 969 | \r |
970 | **/\r | |
971 | UINT32\r | |
972 | EFIAPI\r | |
973 | LibPcdGetEx32 (\r | |
974 | IN CONST GUID *Guid,\r | |
975 | IN UINTN TokenNumber\r | |
976 | );\r | |
977 | \r | |
978 | \r | |
979 | /**\r | |
64735d24 | 980 | This function provides a means by which to retrieve a value for a given PCD token.\r |
981 | \r | |
fb3df220 | 982 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r |
64735d24 | 983 | \r |
fb3df220 | 984 | If Guid is NULL, then ASSERT(). \r |
985 | \r | |
fb287b56 | 986 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
987 | which namespace to retrieve a value from.\r | |
988 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 989 | \r |
f73e0ad2 | 990 | @return Return the UINT64.\r |
fb3df220 | 991 | \r |
992 | **/\r | |
993 | UINT64\r | |
994 | EFIAPI\r | |
995 | LibPcdGetEx64 (\r | |
996 | IN CONST GUID *Guid,\r | |
997 | IN UINTN TokenNumber\r | |
998 | );\r | |
999 | \r | |
1000 | \r | |
1001 | /**\r | |
64735d24 | 1002 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1003 | \r | |
fb3df220 | 1004 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r |
64735d24 | 1005 | \r |
fb3df220 | 1006 | If Guid is NULL, then ASSERT(). \r |
1007 | \r | |
fb287b56 | 1008 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1009 | which namespace to retrieve a value from.\r | |
1010 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1011 | \r |
f73e0ad2 | 1012 | @return Return the VOID* pointer.\r |
fb3df220 | 1013 | \r |
1014 | **/\r | |
1015 | VOID *\r | |
1016 | EFIAPI\r | |
1017 | LibPcdGetExPtr (\r | |
1018 | IN CONST GUID *Guid,\r | |
1019 | IN UINTN TokenNumber\r | |
1020 | );\r | |
1021 | \r | |
1022 | \r | |
1023 | /**\r | |
64735d24 | 1024 | This function provides a means by which to retrieve a value for a given PCD token.\r |
1025 | \r | |
fb3df220 | 1026 | Returns the Boolean value of the token specified by TokenNumber and Guid. \r |
64735d24 | 1027 | \r |
fb3df220 | 1028 | If Guid is NULL, then ASSERT(). \r |
1029 | \r | |
fb287b56 | 1030 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1031 | which namespace to retrieve a value from.\r | |
1032 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1033 | \r |
f73e0ad2 | 1034 | @return Return the BOOLEAN.\r |
fb3df220 | 1035 | \r |
1036 | **/\r | |
1037 | BOOLEAN\r | |
1038 | EFIAPI\r | |
1039 | LibPcdGetExBool (\r | |
1040 | IN CONST GUID *Guid,\r | |
1041 | IN UINTN TokenNumber\r | |
1042 | );\r | |
1043 | \r | |
1044 | \r | |
1045 | /**\r | |
64735d24 | 1046 | This function provides a means by which to retrieve the size of a given PCD token.\r |
1047 | \r | |
fb3df220 | 1048 | Returns the size of the token specified by TokenNumber and Guid. \r |
64735d24 | 1049 | \r |
fb3df220 | 1050 | If Guid is NULL, then ASSERT(). \r |
1051 | \r | |
fb287b56 | 1052 | @param[in] Guid Pointer to a 128-bit unique value that designates \r |
1053 | which namespace to retrieve a value from.\r | |
1054 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
fb3df220 | 1055 | \r |
f73e0ad2 | 1056 | @return Return the size.\r |
fb3df220 | 1057 | \r |
1058 | **/\r | |
1059 | UINTN\r | |
1060 | EFIAPI\r | |
1061 | LibPcdGetExSize (\r | |
1062 | IN CONST GUID *Guid,\r | |
1063 | IN UINTN TokenNumber\r | |
1064 | );\r | |
1065 | \r | |
1066 | \r | |
1067 | /**\r | |
64735d24 | 1068 | This function provides a means by which to set a value for a given PCD token.\r |
1069 | \r | |
fb3df220 | 1070 | Sets the 8-bit value for the token specified by TokenNumber \r |
1071 | to the value specified by Value. Value is returned.\r | |
1072 | \r | |
fb287b56 | 1073 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1074 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1075 | \r |
f73e0ad2 | 1076 | @return Return the value been set.\r |
fb3df220 | 1077 | \r |
1078 | **/\r | |
1079 | UINT8\r | |
1080 | EFIAPI\r | |
1081 | LibPcdSet8 (\r | |
1082 | IN UINTN TokenNumber,\r | |
1083 | IN UINT8 Value\r | |
1084 | );\r | |
1085 | \r | |
1086 | \r | |
1087 | /**\r | |
64735d24 | 1088 | This function provides a means by which to set a value for a given PCD token.\r |
1089 | \r | |
fb3df220 | 1090 | Sets the 16-bit value for the token specified by TokenNumber \r |
1091 | to the value specified by Value. Value is returned.\r | |
1092 | \r | |
fb287b56 | 1093 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1094 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1095 | \r |
f73e0ad2 | 1096 | @return Return the value been set.\r |
fb3df220 | 1097 | \r |
1098 | **/\r | |
1099 | UINT16\r | |
1100 | EFIAPI\r | |
1101 | LibPcdSet16 (\r | |
1102 | IN UINTN TokenNumber,\r | |
1103 | IN UINT16 Value\r | |
1104 | );\r | |
1105 | \r | |
1106 | \r | |
1107 | /**\r | |
64735d24 | 1108 | This function provides a means by which to set a value for a given PCD token.\r |
1109 | \r | |
fb3df220 | 1110 | Sets the 32-bit value for the token specified by TokenNumber \r |
1111 | to the value specified by Value. Value is returned.\r | |
1112 | \r | |
fb287b56 | 1113 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1114 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1115 | \r |
f73e0ad2 | 1116 | @return Return the value been set.\r |
fb3df220 | 1117 | \r |
1118 | **/\r | |
1119 | UINT32\r | |
1120 | EFIAPI\r | |
1121 | LibPcdSet32 (\r | |
1122 | IN UINTN TokenNumber,\r | |
1123 | IN UINT32 Value\r | |
1124 | );\r | |
1125 | \r | |
1126 | \r | |
1127 | /**\r | |
64735d24 | 1128 | This function provides a means by which to set a value for a given PCD token.\r |
1129 | \r | |
fb3df220 | 1130 | Sets the 64-bit value for the token specified by TokenNumber \r |
1131 | to the value specified by Value. Value is returned.\r | |
1132 | \r | |
fb287b56 | 1133 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1134 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1135 | \r |
f73e0ad2 | 1136 | @return Return the value been set.\r |
fb3df220 | 1137 | \r |
1138 | **/\r | |
1139 | UINT64\r | |
1140 | EFIAPI\r | |
1141 | LibPcdSet64 (\r | |
1142 | IN UINTN TokenNumber,\r | |
1143 | IN UINT64 Value\r | |
1144 | );\r | |
1145 | \r | |
1146 | \r | |
1147 | /**\r | |
64735d24 | 1148 | This function provides a means by which to set a value for a given PCD token.\r |
1149 | \r | |
fb3df220 | 1150 | Sets a buffer for the token specified by TokenNumber to the value \r |
d3057543 | 1151 | specified by Buffer and SizeOfBuffer. Buffer is returned. \r |
1152 | If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r | |
1153 | then set SizeOfBuffer to the maximum size supported by TokenNumber and \r | |
fb3df220 | 1154 | return NULL to indicate that the set operation was not actually performed. \r |
1155 | \r | |
d3057543 | 1156 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the \r |
fb3df220 | 1157 | maximum size supported by TokenName and NULL must be returned.\r |
1158 | \r | |
d3057543 | 1159 | If SizeOfBuffer is NULL, then ASSERT().\r |
1160 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1161 | \r |
2a254b90 | 1162 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
2616448e | 1163 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r |
64735d24 | 1164 | @param[in] Buffer A pointer to the buffer to set.\r |
fb3df220 | 1165 | \r |
f73e0ad2 | 1166 | @return Return the pointer for the buffer been set.\r |
fb3df220 | 1167 | \r |
1168 | **/\r | |
64735d24 | 1169 | VOID *\r |
fb3df220 | 1170 | EFIAPI\r |
1171 | LibPcdSetPtr (\r | |
64735d24 | 1172 | IN UINTN TokenNumber,\r |
1173 | IN OUT UINTN *SizeOfBuffer,\r | |
b52f6a1a | 1174 | IN CONST VOID *Buffer\r |
fb3df220 | 1175 | );\r |
1176 | \r | |
1177 | \r | |
1178 | /**\r | |
64735d24 | 1179 | This function provides a means by which to set a value for a given PCD token.\r |
1180 | \r | |
fb3df220 | 1181 | Sets the Boolean value for the token specified by TokenNumber \r |
1182 | to the value specified by Value. Value is returned.\r | |
1183 | \r | |
fb287b56 | 1184 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
1185 | @param[in] Value The boolean value to set.\r | |
fb3df220 | 1186 | \r |
f73e0ad2 | 1187 | @return Return the value been set.\r |
fb3df220 | 1188 | \r |
1189 | **/\r | |
1190 | BOOLEAN\r | |
1191 | EFIAPI\r | |
1192 | LibPcdSetBool (\r | |
1193 | IN UINTN TokenNumber,\r | |
1194 | IN BOOLEAN Value\r | |
1195 | );\r | |
1196 | \r | |
1197 | \r | |
1198 | /**\r | |
64735d24 | 1199 | This function provides a means by which to set a value for a given PCD token.\r |
1200 | \r | |
fb3df220 | 1201 | Sets the 8-bit value for the token specified by TokenNumber and \r |
1202 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1203 | \r |
fb3df220 | 1204 | If Guid is NULL, then ASSERT().\r |
1205 | \r | |
fb287b56 | 1206 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1207 | designates which namespace to set a value from.\r | |
1208 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1209 | @param[in] Value The 8-bit value to set.\r | |
fb3df220 | 1210 | \r |
f73e0ad2 | 1211 | @return Return the value been set.\r |
fb3df220 | 1212 | \r |
1213 | **/\r | |
1214 | UINT8\r | |
1215 | EFIAPI\r | |
1216 | LibPcdSetEx8 (\r | |
1217 | IN CONST GUID *Guid,\r | |
1218 | IN UINTN TokenNumber,\r | |
1219 | IN UINT8 Value\r | |
1220 | );\r | |
1221 | \r | |
1222 | \r | |
1223 | /**\r | |
64735d24 | 1224 | This function provides a means by which to set a value for a given PCD token.\r |
1225 | \r | |
fb3df220 | 1226 | Sets the 16-bit value for the token specified by TokenNumber and \r |
1227 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1228 | \r |
fb3df220 | 1229 | If Guid is NULL, then ASSERT().\r |
1230 | \r | |
fb287b56 | 1231 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1232 | designates which namespace to set a value from.\r | |
1233 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1234 | @param[in] Value The 16-bit value to set.\r | |
fb3df220 | 1235 | \r |
f73e0ad2 | 1236 | @return Return the value been set.\r |
fb3df220 | 1237 | \r |
1238 | **/\r | |
1239 | UINT16\r | |
1240 | EFIAPI\r | |
1241 | LibPcdSetEx16 (\r | |
1242 | IN CONST GUID *Guid,\r | |
1243 | IN UINTN TokenNumber,\r | |
1244 | IN UINT16 Value\r | |
1245 | );\r | |
1246 | \r | |
1247 | \r | |
1248 | /**\r | |
64735d24 | 1249 | This function provides a means by which to set a value for a given PCD token.\r |
1250 | \r | |
fb3df220 | 1251 | Sets the 32-bit value for the token specified by TokenNumber and \r |
1252 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1253 | \r |
fb3df220 | 1254 | If Guid is NULL, then ASSERT().\r |
1255 | \r | |
fb287b56 | 1256 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1257 | designates which namespace to set a value from.\r | |
1258 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1259 | @param[in] Value The 32-bit value to set.\r | |
fb3df220 | 1260 | \r |
f73e0ad2 | 1261 | @return Return the value been set.\r |
fb3df220 | 1262 | \r |
1263 | **/\r | |
1264 | UINT32\r | |
1265 | EFIAPI\r | |
1266 | LibPcdSetEx32 (\r | |
1267 | IN CONST GUID *Guid,\r | |
1268 | IN UINTN TokenNumber,\r | |
1269 | IN UINT32 Value\r | |
1270 | );\r | |
1271 | \r | |
1272 | \r | |
1273 | /**\r | |
64735d24 | 1274 | This function provides a means by which to set a value for a given PCD token.\r |
1275 | \r | |
fb3df220 | 1276 | Sets the 64-bit value for the token specified by TokenNumber and \r |
1277 | Guid to the value specified by Value. Value is returned.\r | |
1278 | If Guid is NULL, then ASSERT().\r | |
1279 | \r | |
fb287b56 | 1280 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1281 | designates which namespace to set a value from.\r | |
1282 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1283 | @param[in] Value The 64-bit value to set.\r | |
fb3df220 | 1284 | \r |
f73e0ad2 | 1285 | @return Return the value been set.\r |
fb3df220 | 1286 | \r |
1287 | **/\r | |
1288 | UINT64\r | |
1289 | EFIAPI\r | |
1290 | LibPcdSetEx64 (\r | |
1291 | IN CONST GUID *Guid,\r | |
1292 | IN UINTN TokenNumber,\r | |
1293 | IN UINT64 Value\r | |
1294 | );\r | |
1295 | \r | |
1296 | \r | |
1297 | /**\r | |
64735d24 | 1298 | This function provides a means by which to set a value for a given PCD token.\r |
1299 | \r | |
fb3df220 | 1300 | Sets a buffer for the token specified by TokenNumber to the value specified by \r |
d3057543 | 1301 | Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
1302 | the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r | |
fb3df220 | 1303 | supported by TokenNumber and return NULL to indicate that the set operation \r |
1304 | was not actually performed. \r | |
1305 | \r | |
1306 | If Guid is NULL, then ASSERT().\r | |
d3057543 | 1307 | If SizeOfBuffer is NULL, then ASSERT().\r |
1308 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1309 | \r |
fb287b56 | 1310 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1311 | designates which namespace to set a value from.\r | |
1312 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1313 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
1314 | @param[in] Buffer A pointer to the buffer to set.\r | |
fb3df220 | 1315 | \r |
f73e0ad2 | 1316 | @return Return the pinter to the buffer been set.\r |
fb3df220 | 1317 | \r |
1318 | **/\r | |
1319 | VOID *\r | |
1320 | EFIAPI\r | |
1321 | LibPcdSetExPtr (\r | |
1322 | IN CONST GUID *Guid,\r | |
1323 | IN UINTN TokenNumber,\r | |
1324 | IN OUT UINTN *SizeOfBuffer,\r | |
1325 | IN VOID *Buffer\r | |
1326 | );\r | |
1327 | \r | |
1328 | \r | |
1329 | /**\r | |
64735d24 | 1330 | This function provides a means by which to set a value for a given PCD token.\r |
1331 | \r | |
fb3df220 | 1332 | Sets the Boolean value for the token specified by TokenNumber and \r |
1333 | Guid to the value specified by Value. Value is returned.\r | |
64735d24 | 1334 | \r |
fb3df220 | 1335 | If Guid is NULL, then ASSERT().\r |
1336 | \r | |
fb287b56 | 1337 | @param[in] Guid Pointer to a 128-bit unique value that \r |
1338 | designates which namespace to set a value from.\r | |
1339 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
1340 | @param[in] Value The Boolean value to set.\r | |
fb3df220 | 1341 | \r |
f73e0ad2 | 1342 | @return Return the value been set.\r |
fb3df220 | 1343 | \r |
1344 | **/\r | |
1345 | BOOLEAN\r | |
1346 | EFIAPI\r | |
1347 | LibPcdSetExBool (\r | |
1348 | IN CONST GUID *Guid,\r | |
1349 | IN UINTN TokenNumber,\r | |
1350 | IN BOOLEAN Value\r | |
1351 | );\r | |
1352 | \r | |
1353 | \r | |
1354 | /**\r | |
1355 | When the token specified by TokenNumber and Guid is set, \r | |
1356 | then notification function specified by NotificationFunction is called. \r | |
1357 | If Guid is NULL, then the default token space is used. \r | |
1358 | If NotificationFunction is NULL, then ASSERT().\r | |
1359 | \r | |
1360 | This notification function serves two purposes. Firstly, it notifies the module which \r | |
1361 | did the registration that the value of this PCD token has been set. Secondly, \r | |
1362 | it provides a mechanism for the module which did the registration to intercept \r | |
1363 | the set operation and override the value been set if necessary. After the invocation \r | |
1364 | of the callback function, TokenData will be used by PCD service PEIM or driver to \r | |
1365 | modify the internal data in PCD database. \r | |
1366 | \r | |
1367 | \r | |
2a254b90 | 1368 | @param[in] CallBackGuid The PCD token GUID being set.\r |
1369 | @param[in] CallBackToken The PCD token number being set.\r | |
1370 | @param[in, out] TokenData A pointer to the token data being set.\r | |
1371 | @param[in] TokenDataSize The size, in bytes, of the data being set.\r | |
fb3df220 | 1372 | \r |
fb3df220 | 1373 | **/\r |
1374 | typedef\r | |
1375 | VOID\r | |
78bf8f2d | 1376 | (EFIAPI *PCD_CALLBACK)(\r |
fb3df220 | 1377 | IN CONST GUID *CallBackGuid, OPTIONAL\r |
1378 | IN UINTN CallBackToken,\r | |
1379 | IN OUT VOID *TokenData,\r | |
1380 | IN UINTN TokenDataSize\r | |
1381 | );\r | |
1382 | \r | |
1383 | \r | |
1384 | /**\r | |
64735d24 | 1385 | Set up a notification function that is called when a specified token is set.\r |
1386 | \r | |
fb3df220 | 1387 | When the token specified by TokenNumber and Guid is set, \r |
1388 | then notification function specified by NotificationFunction is called. \r | |
1389 | If Guid is NULL, then the default token space is used. \r | |
64735d24 | 1390 | \r |
fb3df220 | 1391 | If NotificationFunction is NULL, then ASSERT().\r |
1392 | \r | |
fb287b56 | 1393 | @param[in] Guid Pointer to a 128-bit unique value that designates which \r |
1394 | namespace to set a value from. If NULL, then the default \r | |
1395 | token space is used.\r | |
1396 | @param[in] TokenNumber The PCD token number to monitor.\r | |
1397 | @param[in] NotificationFunction The function to call when the token \r | |
1398 | specified by Guid and TokenNumber is set.\r | |
fb3df220 | 1399 | \r |
1400 | **/\r | |
1401 | VOID\r | |
1402 | EFIAPI\r | |
1403 | LibPcdCallbackOnSet (\r | |
1404 | IN CONST GUID *Guid, OPTIONAL\r | |
1405 | IN UINTN TokenNumber,\r | |
1406 | IN PCD_CALLBACK NotificationFunction\r | |
1407 | );\r | |
1408 | \r | |
1409 | \r | |
1410 | /**\r | |
1411 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
64735d24 | 1412 | \r |
1413 | Disable a notification function that was previously established with LibPcdCallbackOnSet(). \r | |
1414 | \r | |
1415 | If NotificationFunction is NULL, then ASSERT().\r | |
1416 | If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r | |
1417 | and NotificationFunction, then ASSERT().\r | |
1418 | \r | |
fb287b56 | 1419 | @param[in] Guid Specify the GUID token space.\r |
1420 | @param[in] TokenNumber Specify the token number.\r | |
fb3df220 | 1421 | @param[in] NotificationFunction The callback function to be unregistered.\r |
1422 | \r | |
fb3df220 | 1423 | **/\r |
1424 | VOID\r | |
1425 | EFIAPI\r | |
1426 | LibPcdCancelCallback (\r | |
1427 | IN CONST GUID *Guid, OPTIONAL\r | |
1428 | IN UINTN TokenNumber,\r | |
1429 | IN PCD_CALLBACK NotificationFunction\r | |
1430 | );\r | |
1431 | \r | |
1432 | \r | |
1433 | /**\r | |
64735d24 | 1434 | Retrieves the next token in a token space.\r |
1435 | \r | |
fb3df220 | 1436 | Retrieves the next PCD token number from the token space specified by Guid. \r |
1437 | If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r | |
1438 | then the first token number is returned. Otherwise, the token number that \r | |
1439 | follows TokenNumber in the token space is returned. If TokenNumber is the last \r | |
64735d24 | 1440 | token number in the token space, then 0 is returned. \r |
1441 | \r | |
1442 | If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r | |
fb3df220 | 1443 | \r |
2a254b90 | 1444 | @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r |
1445 | to set a value from. If NULL, then the default token space is used.\r | |
1446 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r | |
1447 | token number.\r | |
fb3df220 | 1448 | \r |
f73e0ad2 | 1449 | @return The next valid token number.\r |
fb3df220 | 1450 | \r |
1451 | **/\r | |
1452 | UINTN \r | |
1453 | EFIAPI\r | |
1454 | LibPcdGetNextToken (\r | |
1455 | IN CONST GUID *Guid, OPTIONAL\r | |
1456 | IN UINTN TokenNumber\r | |
1457 | );\r | |
1458 | \r | |
1459 | \r | |
1460 | \r | |
1461 | /**\r | |
64735d24 | 1462 | Used to retrieve the list of available PCD token space GUIDs.\r |
1463 | \r | |
fb3df220 | 1464 | Retrieves the next PCD token space from a token space specified by Guid.\r |
1465 | Guid of NULL is reserved to mark the default local token namespace on the current\r | |
1466 | platform. If Guid is NULL, then the GUID of the first non-local token space of the \r | |
1467 | current platform is returned. If Guid is the last non-local token space, \r | |
1468 | then NULL is returned. \r | |
1469 | \r | |
1470 | If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().\r | |
1471 | \r | |
1472 | \r | |
1473 | \r | |
fb287b56 | 1474 | @param[in] Guid Pointer to a 128-bit unique value that designates from which namespace \r |
1475 | to start the search.\r | |
fb3df220 | 1476 | \r |
f73e0ad2 | 1477 | @return The next valid token namespace.\r |
fb3df220 | 1478 | \r |
1479 | **/\r | |
1480 | GUID * \r | |
1481 | EFIAPI\r | |
1482 | LibPcdGetNextTokenSpace (\r | |
64735d24 | 1483 | IN CONST GUID *TokenSpaceGuid\r |
fb3df220 | 1484 | );\r |
1485 | \r | |
1486 | \r | |
1487 | /**\r | |
64735d24 | 1488 | Sets a value of a patchable PCD entry that is type pointer.\r |
1489 | \r | |
fb3df220 | 1490 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r |
d3057543 | 1491 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r |
1492 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r | |
fb3df220 | 1493 | NULL to indicate that the set operation was not actually performed. \r |
d3057543 | 1494 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r |
fb3df220 | 1495 | MaximumDatumSize and NULL must be returned.\r |
1496 | \r | |
1497 | If PatchVariable is NULL, then ASSERT().\r | |
d3057543 | 1498 | If SizeOfBuffer is NULL, then ASSERT().\r |
1499 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
fb3df220 | 1500 | \r |
1501 | @param[in] PatchVariable A pointer to the global variable in a module that is \r | |
1502 | the target of the set operation.\r | |
1503 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
1504 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
1505 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
f73e0ad2 | 1506 | \r |
9638ba6d | 1507 | @return Return the pointer to the buffer been set.\r |
fb3df220 | 1508 | \r |
1509 | **/\r | |
1510 | VOID *\r | |
1511 | EFIAPI\r | |
1512 | LibPatchPcdSetPtr (\r | |
1513 | IN VOID *PatchVariable,\r | |
1514 | IN UINTN MaximumDatumSize,\r | |
1515 | IN OUT UINTN *SizeOfBuffer,\r | |
1516 | IN CONST VOID *Buffer\r | |
1517 | );\r | |
1518 | \r | |
1519 | #endif\r |