]>
Commit | Line | Data |
---|---|---|
bbfaace4 | 1 | /** @file\r |
2 | A emptry template implementation of PCD Library.\r | |
3 | \r | |
9095d37b | 4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
bbfaace4 | 6 | \r |
7 | **/\r | |
8 | \r | |
afa22326 | 9 | #include <Base.h>\r |
10 | \r | |
bbfaace4 | 11 | #include <Library/DebugLib.h>\r |
12 | #include <Library/PcdLib.h>\r | |
13 | #include <Library/BaseMemoryLib.h>\r | |
14 | \r | |
bbfaace4 | 15 | /**\r |
efb23117 | 16 | This function provides a means by which SKU support can be established in the PCD infrastructure.\r |
17 | \r | |
bbfaace4 | 18 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r |
19 | \r | |
9095d37b | 20 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and\r |
efb23117 | 21 | set values associated with a PCD token.\r |
bbfaace4 | 22 | \r |
f73e0ad2 | 23 | @return Return the SKU ID that just be set.\r |
bbfaace4 | 24 | \r |
25 | **/\r | |
efb23117 | 26 | UINTN\r |
bbfaace4 | 27 | EFIAPI\r |
28 | LibPcdSetSku (\r | |
2f88bd3a | 29 | IN UINTN SkuId\r |
bbfaace4 | 30 | )\r |
31 | {\r | |
afa22326 | 32 | ASSERT (FALSE);\r |
bbfaace4 | 33 | \r |
cdebf6c6 | 34 | return 0;\r |
bbfaace4 | 35 | }\r |
36 | \r | |
bbfaace4 | 37 | /**\r |
efb23117 | 38 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b LG |
39 | \r |
40 | Returns the 8-bit value for the token specified by TokenNumber.\r | |
bbfaace4 | 41 | \r |
23a36779 | 42 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
bbfaace4 | 43 | \r |
9095d37b | 44 | @return Returns the 8-bit value for the token specified by TokenNumber.\r |
bbfaace4 | 45 | \r |
46 | **/\r | |
47 | UINT8\r | |
48 | EFIAPI\r | |
49 | LibPcdGet8 (\r | |
2f88bd3a | 50 | IN UINTN TokenNumber\r |
bbfaace4 | 51 | )\r |
52 | {\r | |
afa22326 | 53 | ASSERT (FALSE);\r |
cdebf6c6 | 54 | \r |
bbfaace4 | 55 | return 0;\r |
56 | }\r | |
57 | \r | |
bbfaace4 | 58 | /**\r |
efb23117 | 59 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b LG |
60 | \r |
61 | Returns the 16-bit value for the token specified by TokenNumber.\r | |
bbfaace4 | 62 | \r |
efb23117 | 63 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
bbfaace4 | 64 | \r |
9095d37b | 65 | @return Returns the 16-bit value for the token specified by TokenNumber.\r |
bbfaace4 | 66 | \r |
67 | **/\r | |
68 | UINT16\r | |
69 | EFIAPI\r | |
70 | LibPcdGet16 (\r | |
2f88bd3a | 71 | IN UINTN TokenNumber\r |
bbfaace4 | 72 | )\r |
73 | {\r | |
afa22326 | 74 | ASSERT (FALSE);\r |
cdebf6c6 | 75 | \r |
bbfaace4 | 76 | return 0;\r |
77 | }\r | |
78 | \r | |
bbfaace4 | 79 | /**\r |
efb23117 | 80 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b LG |
81 | \r |
82 | Returns the 32-bit value for the token specified by TokenNumber.\r | |
bbfaace4 | 83 | \r |
84 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
85 | \r | |
f73e0ad2 | 86 | @return Returns the 32-bit value for the token specified by TokenNumber.\r |
bbfaace4 | 87 | \r |
88 | **/\r | |
89 | UINT32\r | |
90 | EFIAPI\r | |
91 | LibPcdGet32 (\r | |
2f88bd3a | 92 | IN UINTN TokenNumber\r |
bbfaace4 | 93 | )\r |
94 | {\r | |
afa22326 | 95 | ASSERT (FALSE);\r |
cdebf6c6 | 96 | \r |
bbfaace4 | 97 | return 0;\r |
98 | }\r | |
99 | \r | |
bbfaace4 | 100 | /**\r |
efb23117 | 101 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b | 102 | \r |
bbfaace4 | 103 | Returns the 64-bit value for the token specified by TokenNumber.\r |
104 | \r | |
105 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
106 | \r | |
f73e0ad2 | 107 | @return Returns the 64-bit value for the token specified by TokenNumber.\r |
bbfaace4 | 108 | \r |
109 | **/\r | |
110 | UINT64\r | |
111 | EFIAPI\r | |
112 | LibPcdGet64 (\r | |
2f88bd3a | 113 | IN UINTN TokenNumber\r |
bbfaace4 | 114 | )\r |
115 | {\r | |
afa22326 | 116 | ASSERT (FALSE);\r |
cdebf6c6 | 117 | \r |
bbfaace4 | 118 | return 0;\r |
119 | }\r | |
120 | \r | |
bbfaace4 | 121 | /**\r |
efb23117 | 122 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b | 123 | \r |
bbfaace4 | 124 | Returns the pointer to the buffer of the token specified by TokenNumber.\r |
125 | \r | |
126 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
127 | \r | |
f73e0ad2 | 128 | @return Returns the pointer to the token specified by TokenNumber.\r |
bbfaace4 | 129 | \r |
130 | **/\r | |
131 | VOID *\r | |
132 | EFIAPI\r | |
133 | LibPcdGetPtr (\r | |
2f88bd3a | 134 | IN UINTN TokenNumber\r |
bbfaace4 | 135 | )\r |
136 | {\r | |
afa22326 | 137 | ASSERT (FALSE);\r |
cdebf6c6 | 138 | \r |
bbfaace4 | 139 | return 0;\r |
140 | }\r | |
141 | \r | |
bbfaace4 | 142 | /**\r |
efb23117 | 143 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b LG |
144 | \r |
145 | Returns the Boolean value of the token specified by TokenNumber.\r | |
bbfaace4 | 146 | \r |
147 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
148 | \r | |
9095d37b | 149 | @return Returns the Boolean value of the token specified by TokenNumber.\r |
bbfaace4 | 150 | \r |
151 | **/\r | |
9095d37b | 152 | BOOLEAN\r |
bbfaace4 | 153 | EFIAPI\r |
154 | LibPcdGetBool (\r | |
2f88bd3a | 155 | IN UINTN TokenNumber\r |
bbfaace4 | 156 | )\r |
157 | {\r | |
afa22326 | 158 | ASSERT (FALSE);\r |
cdebf6c6 | 159 | \r |
bbfaace4 | 160 | return 0;\r |
161 | }\r | |
162 | \r | |
bbfaace4 | 163 | /**\r |
efb23117 | 164 | This function provides a means by which to retrieve the size of a given PCD token.\r |
bbfaace4 | 165 | \r |
166 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
167 | \r | |
9095d37b | 168 | @return Returns the size of the token specified by TokenNumber.\r |
bbfaace4 | 169 | \r |
170 | **/\r | |
171 | UINTN\r | |
172 | EFIAPI\r | |
173 | LibPcdGetSize (\r | |
2f88bd3a | 174 | IN UINTN TokenNumber\r |
bbfaace4 | 175 | )\r |
176 | {\r | |
afa22326 | 177 | ASSERT (FALSE);\r |
cdebf6c6 | 178 | \r |
bbfaace4 | 179 | return 0;\r |
180 | }\r | |
181 | \r | |
bbfaace4 | 182 | /**\r |
efb23117 | 183 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b | 184 | \r |
bbfaace4 | 185 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r |
bbfaace4 | 186 | \r |
9095d37b LG |
187 | If Guid is NULL, then ASSERT().\r |
188 | \r | |
189 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
bbfaace4 | 190 | which namespace to retrieve a value from.\r |
191 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
192 | \r | |
f73e0ad2 | 193 | @return Return the UINT8.\r |
bbfaace4 | 194 | \r |
195 | **/\r | |
196 | UINT8\r | |
197 | EFIAPI\r | |
198 | LibPcdGetEx8 (\r | |
2f88bd3a MK |
199 | IN CONST GUID *Guid,\r |
200 | IN UINTN TokenNumber\r | |
bbfaace4 | 201 | )\r |
202 | {\r | |
afa22326 | 203 | ASSERT (FALSE);\r |
bbfaace4 | 204 | \r |
205 | return 0;\r | |
206 | }\r | |
207 | \r | |
bbfaace4 | 208 | /**\r |
efb23117 | 209 | This function provides a means by which to retrieve a value for a given PCD token.\r |
210 | \r | |
bbfaace4 | 211 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r |
bbfaace4 | 212 | \r |
9095d37b LG |
213 | If Guid is NULL, then ASSERT().\r |
214 | \r | |
215 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
bbfaace4 | 216 | which namespace to retrieve a value from.\r |
217 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
218 | \r | |
f73e0ad2 | 219 | @return Return the UINT16.\r |
bbfaace4 | 220 | \r |
221 | **/\r | |
222 | UINT16\r | |
223 | EFIAPI\r | |
224 | LibPcdGetEx16 (\r | |
2f88bd3a MK |
225 | IN CONST GUID *Guid,\r |
226 | IN UINTN TokenNumber\r | |
bbfaace4 | 227 | )\r |
228 | {\r | |
afa22326 | 229 | ASSERT (FALSE);\r |
bbfaace4 | 230 | \r |
231 | return 0;\r | |
232 | }\r | |
233 | \r | |
bbfaace4 | 234 | /**\r |
235 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
9095d37b | 236 | If Guid is NULL, then ASSERT().\r |
bbfaace4 | 237 | \r |
9095d37b | 238 | @param[in] Guid The pointer to a 128-bit unique value that designates\r |
bbfaace4 | 239 | which namespace to retrieve a value from.\r |
240 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
241 | \r | |
f73e0ad2 | 242 | @return Return the UINT32.\r |
bbfaace4 | 243 | \r |
244 | **/\r | |
245 | UINT32\r | |
246 | EFIAPI\r | |
247 | LibPcdGetEx32 (\r | |
2f88bd3a MK |
248 | IN CONST GUID *Guid,\r |
249 | IN UINTN TokenNumber\r | |
bbfaace4 | 250 | )\r |
251 | {\r | |
afa22326 | 252 | ASSERT (FALSE);\r |
bbfaace4 | 253 | \r |
254 | return 0;\r | |
255 | }\r | |
256 | \r | |
bbfaace4 | 257 | /**\r |
efb23117 | 258 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b | 259 | \r |
bbfaace4 | 260 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r |
bbfaace4 | 261 | \r |
9095d37b LG |
262 | If Guid is NULL, then ASSERT().\r |
263 | \r | |
264 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
efb23117 | 265 | which namespace to retrieve a value from.\r |
266 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
bbfaace4 | 267 | \r |
f73e0ad2 | 268 | @return Return the UINT64.\r |
bbfaace4 | 269 | \r |
270 | **/\r | |
271 | UINT64\r | |
272 | EFIAPI\r | |
273 | LibPcdGetEx64 (\r | |
2f88bd3a MK |
274 | IN CONST GUID *Guid,\r |
275 | IN UINTN TokenNumber\r | |
bbfaace4 | 276 | )\r |
277 | {\r | |
afa22326 | 278 | ASSERT (FALSE);\r |
bbfaace4 | 279 | \r |
280 | return 0;\r | |
281 | }\r | |
282 | \r | |
bbfaace4 | 283 | /**\r |
efb23117 | 284 | This function provides a means by which to retrieve a value for a given PCD token.\r |
9095d37b | 285 | \r |
efb23117 | 286 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r |
bbfaace4 | 287 | \r |
9095d37b LG |
288 | If Guid is NULL, then ASSERT().\r |
289 | \r | |
290 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
efb23117 | 291 | which namespace to retrieve a value from.\r |
292 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
bbfaace4 | 293 | \r |
f73e0ad2 | 294 | @return Return the VOID* pointer.\r |
bbfaace4 | 295 | \r |
296 | **/\r | |
297 | VOID *\r | |
298 | EFIAPI\r | |
299 | LibPcdGetExPtr (\r | |
2f88bd3a MK |
300 | IN CONST GUID *Guid,\r |
301 | IN UINTN TokenNumber\r | |
bbfaace4 | 302 | )\r |
303 | {\r | |
afa22326 | 304 | ASSERT (FALSE);\r |
bbfaace4 | 305 | \r |
306 | return 0;\r | |
307 | }\r | |
308 | \r | |
bbfaace4 | 309 | /**\r |
efb23117 | 310 | This function provides a means by which to retrieve a value for a given PCD token.\r |
bbfaace4 | 311 | \r |
9095d37b LG |
312 | Returns the Boolean value of the token specified by TokenNumber and Guid.\r |
313 | \r | |
314 | If Guid is NULL, then ASSERT().\r | |
315 | \r | |
316 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
efb23117 | 317 | which namespace to retrieve a value from.\r |
318 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
bbfaace4 | 319 | \r |
f73e0ad2 | 320 | @return Return the BOOLEAN.\r |
bbfaace4 | 321 | \r |
322 | **/\r | |
323 | BOOLEAN\r | |
324 | EFIAPI\r | |
325 | LibPcdGetExBool (\r | |
2f88bd3a MK |
326 | IN CONST GUID *Guid,\r |
327 | IN UINTN TokenNumber\r | |
bbfaace4 | 328 | )\r |
329 | {\r | |
afa22326 | 330 | ASSERT (FALSE);\r |
bbfaace4 | 331 | \r |
332 | return 0;\r | |
333 | }\r | |
334 | \r | |
bbfaace4 | 335 | /**\r |
efb23117 | 336 | This function provides a means by which to retrieve the size of a given PCD token.\r |
bbfaace4 | 337 | \r |
9095d37b LG |
338 | Returns the size of the token specified by TokenNumber and Guid.\r |
339 | \r | |
340 | If Guid is NULL, then ASSERT().\r | |
341 | \r | |
342 | @param[in] Guid The pointer to a 128-bit unique value that designates\r | |
efb23117 | 343 | which namespace to retrieve a value from.\r |
344 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
bbfaace4 | 345 | \r |
f73e0ad2 | 346 | @return Return the size.\r |
bbfaace4 | 347 | \r |
348 | **/\r | |
349 | UINTN\r | |
350 | EFIAPI\r | |
351 | LibPcdGetExSize (\r | |
2f88bd3a MK |
352 | IN CONST GUID *Guid,\r |
353 | IN UINTN TokenNumber\r | |
bbfaace4 | 354 | )\r |
355 | {\r | |
afa22326 | 356 | ASSERT (FALSE);\r |
bbfaace4 | 357 | \r |
358 | return 0;\r | |
359 | }\r | |
360 | \r | |
9a355841 SZ |
361 | /**\r |
362 | This function provides a means by which to set a value for a given PCD token.\r | |
363 | \r | |
364 | Sets the 8-bit value for the token specified by TokenNumber\r | |
365 | to the value specified by Value.\r | |
366 | \r | |
367 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
368 | @param[in] Value The 8-bit value to set.\r | |
369 | \r | |
370 | @return The status of the set operation.\r | |
371 | \r | |
372 | **/\r | |
373 | RETURN_STATUS\r | |
374 | EFIAPI\r | |
375 | LibPcdSet8S (\r | |
2f88bd3a MK |
376 | IN UINTN TokenNumber,\r |
377 | IN UINT8 Value\r | |
9a355841 SZ |
378 | )\r |
379 | {\r | |
380 | ASSERT (FALSE);\r | |
381 | \r | |
382 | return RETURN_INVALID_PARAMETER;\r | |
383 | }\r | |
384 | \r | |
385 | /**\r | |
386 | This function provides a means by which to set a value for a given PCD token.\r | |
387 | \r | |
388 | Sets the 16-bit value for the token specified by TokenNumber\r | |
389 | to the value specified by Value.\r | |
390 | \r | |
391 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
392 | @param[in] Value The 16-bit value to set.\r | |
393 | \r | |
394 | @return The status of the set operation.\r | |
395 | \r | |
396 | **/\r | |
397 | RETURN_STATUS\r | |
398 | EFIAPI\r | |
399 | LibPcdSet16S (\r | |
2f88bd3a MK |
400 | IN UINTN TokenNumber,\r |
401 | IN UINT16 Value\r | |
9a355841 SZ |
402 | )\r |
403 | {\r | |
404 | ASSERT (FALSE);\r | |
405 | \r | |
406 | return RETURN_INVALID_PARAMETER;\r | |
407 | }\r | |
408 | \r | |
409 | /**\r | |
410 | This function provides a means by which to set a value for a given PCD token.\r | |
411 | \r | |
412 | Sets the 32-bit value for the token specified by TokenNumber\r | |
413 | to the value specified by Value.\r | |
414 | \r | |
415 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
416 | @param[in] Value The 32-bit value to set.\r | |
417 | \r | |
418 | @return The status of the set operation.\r | |
419 | \r | |
420 | **/\r | |
421 | RETURN_STATUS\r | |
422 | EFIAPI\r | |
423 | LibPcdSet32S (\r | |
2f88bd3a MK |
424 | IN UINTN TokenNumber,\r |
425 | IN UINT32 Value\r | |
9a355841 SZ |
426 | )\r |
427 | {\r | |
428 | ASSERT (FALSE);\r | |
429 | \r | |
430 | return RETURN_INVALID_PARAMETER;\r | |
431 | }\r | |
432 | \r | |
433 | /**\r | |
434 | This function provides a means by which to set a value for a given PCD token.\r | |
435 | \r | |
436 | Sets the 64-bit value for the token specified by TokenNumber\r | |
437 | to the value specified by Value.\r | |
438 | \r | |
439 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
440 | @param[in] Value The 64-bit value to set.\r | |
441 | \r | |
442 | @return The status of the set operation.\r | |
443 | \r | |
444 | **/\r | |
445 | RETURN_STATUS\r | |
446 | EFIAPI\r | |
447 | LibPcdSet64S (\r | |
2f88bd3a MK |
448 | IN UINTN TokenNumber,\r |
449 | IN UINT64 Value\r | |
9a355841 SZ |
450 | )\r |
451 | {\r | |
452 | ASSERT (FALSE);\r | |
453 | \r | |
454 | return RETURN_INVALID_PARAMETER;\r | |
455 | }\r | |
456 | \r | |
457 | /**\r | |
458 | This function provides a means by which to set a value for a given PCD token.\r | |
459 | \r | |
460 | Sets a buffer for the token specified by TokenNumber to the value specified\r | |
461 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r | |
462 | support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r | |
463 | TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r | |
464 | was not actually performed.\r | |
465 | \r | |
466 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r | |
467 | maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.\r | |
468 | \r | |
469 | If SizeOfBuffer is NULL, then ASSERT().\r | |
470 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
471 | \r | |
472 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
473 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
474 | @param[in] Buffer A pointer to the buffer to set.\r | |
475 | \r | |
476 | @return The status of the set operation.\r | |
bbfaace4 | 477 | \r |
9a355841 SZ |
478 | **/\r |
479 | RETURN_STATUS\r | |
480 | EFIAPI\r | |
481 | LibPcdSetPtrS (\r | |
2f88bd3a MK |
482 | IN UINTN TokenNumber,\r |
483 | IN OUT UINTN *SizeOfBuffer,\r | |
484 | IN CONST VOID *Buffer\r | |
9a355841 SZ |
485 | )\r |
486 | {\r | |
487 | ASSERT (FALSE);\r | |
bbfaace4 | 488 | \r |
9a355841 SZ |
489 | return RETURN_INVALID_PARAMETER;\r |
490 | }\r | |
491 | \r | |
492 | /**\r | |
493 | This function provides a means by which to set a value for a given PCD token.\r | |
494 | \r | |
495 | Sets the boolean value for the token specified by TokenNumber\r | |
496 | to the value specified by Value.\r | |
497 | \r | |
498 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
499 | @param[in] Value The boolean value to set.\r | |
500 | \r | |
501 | @return The status of the set operation.\r | |
502 | \r | |
503 | **/\r | |
504 | RETURN_STATUS\r | |
505 | EFIAPI\r | |
506 | LibPcdSetBoolS (\r | |
2f88bd3a MK |
507 | IN UINTN TokenNumber,\r |
508 | IN BOOLEAN Value\r | |
9a355841 SZ |
509 | )\r |
510 | {\r | |
511 | ASSERT (FALSE);\r | |
512 | \r | |
513 | return RETURN_INVALID_PARAMETER;\r | |
514 | }\r | |
515 | \r | |
516 | /**\r | |
517 | This function provides a means by which to set a value for a given PCD token.\r | |
518 | \r | |
519 | Sets the 8-bit value for the token specified by TokenNumber\r | |
520 | to the value specified by Value.\r | |
521 | \r | |
522 | If Guid is NULL, then ASSERT().\r | |
523 | \r | |
524 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
525 | designates which namespace to set a value from.\r | |
526 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
527 | @param[in] Value The 8-bit value to set.\r | |
528 | \r | |
529 | @return The status of the set operation.\r | |
530 | \r | |
531 | **/\r | |
532 | RETURN_STATUS\r | |
533 | EFIAPI\r | |
534 | LibPcdSetEx8S (\r | |
2f88bd3a MK |
535 | IN CONST GUID *Guid,\r |
536 | IN UINTN TokenNumber,\r | |
537 | IN UINT8 Value\r | |
9a355841 SZ |
538 | )\r |
539 | {\r | |
540 | ASSERT (FALSE);\r | |
541 | \r | |
542 | return RETURN_INVALID_PARAMETER;\r | |
543 | }\r | |
544 | \r | |
545 | /**\r | |
546 | This function provides a means by which to set a value for a given PCD token.\r | |
547 | \r | |
548 | Sets the 16-bit value for the token specified by TokenNumber\r | |
549 | to the value specified by Value.\r | |
550 | \r | |
551 | If Guid is NULL, then ASSERT().\r | |
552 | \r | |
553 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
554 | designates which namespace to set a value from.\r | |
555 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
556 | @param[in] Value The 16-bit value to set.\r | |
557 | \r | |
558 | @return The status of the set operation.\r | |
559 | \r | |
560 | **/\r | |
561 | RETURN_STATUS\r | |
562 | EFIAPI\r | |
563 | LibPcdSetEx16S (\r | |
2f88bd3a MK |
564 | IN CONST GUID *Guid,\r |
565 | IN UINTN TokenNumber,\r | |
566 | IN UINT16 Value\r | |
9a355841 SZ |
567 | )\r |
568 | {\r | |
569 | ASSERT (FALSE);\r | |
570 | \r | |
571 | return RETURN_INVALID_PARAMETER;\r | |
572 | }\r | |
573 | \r | |
574 | /**\r | |
575 | This function provides a means by which to set a value for a given PCD token.\r | |
576 | \r | |
577 | Sets the 32-bit value for the token specified by TokenNumber\r | |
578 | to the value specified by Value.\r | |
579 | \r | |
580 | If Guid is NULL, then ASSERT().\r | |
581 | \r | |
582 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
583 | designates which namespace to set a value from.\r | |
584 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
585 | @param[in] Value The 32-bit value to set.\r | |
586 | \r | |
587 | @return The status of the set operation.\r | |
588 | \r | |
589 | **/\r | |
590 | RETURN_STATUS\r | |
591 | EFIAPI\r | |
592 | LibPcdSetEx32S (\r | |
2f88bd3a MK |
593 | IN CONST GUID *Guid,\r |
594 | IN UINTN TokenNumber,\r | |
595 | IN UINT32 Value\r | |
9a355841 SZ |
596 | )\r |
597 | {\r | |
598 | ASSERT (FALSE);\r | |
599 | \r | |
600 | return RETURN_INVALID_PARAMETER;\r | |
601 | }\r | |
602 | \r | |
603 | /**\r | |
604 | This function provides a means by which to set a value for a given PCD token.\r | |
605 | \r | |
606 | Sets the 64-bit value for the token specified by TokenNumber\r | |
607 | to the value specified by Value.\r | |
608 | \r | |
609 | If Guid is NULL, then ASSERT().\r | |
610 | \r | |
611 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
612 | designates which namespace to set a value from.\r | |
613 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
614 | @param[in] Value The 64-bit value to set.\r | |
615 | \r | |
616 | @return The status of the set operation.\r | |
617 | \r | |
618 | **/\r | |
619 | RETURN_STATUS\r | |
620 | EFIAPI\r | |
621 | LibPcdSetEx64S (\r | |
2f88bd3a MK |
622 | IN CONST GUID *Guid,\r |
623 | IN UINTN TokenNumber,\r | |
624 | IN UINT64 Value\r | |
9a355841 SZ |
625 | )\r |
626 | {\r | |
627 | ASSERT (FALSE);\r | |
628 | \r | |
629 | return RETURN_INVALID_PARAMETER;\r | |
630 | }\r | |
631 | \r | |
632 | /**\r | |
633 | This function provides a means by which to set a value for a given PCD token.\r | |
634 | \r | |
635 | Sets a buffer for the token specified by TokenNumber to the value specified by\r | |
636 | Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r | |
637 | support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r | |
638 | TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r | |
639 | was not actually performed.\r | |
640 | \r | |
641 | If Guid is NULL, then ASSERT().\r | |
642 | If SizeOfBuffer is NULL, then ASSERT().\r | |
643 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
644 | \r | |
645 | @param[in] Guid Pointer to a 128-bit unique value that\r | |
646 | designates which namespace to set a value from.\r | |
647 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
648 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
649 | @param[in] Buffer A pointer to the buffer to set.\r | |
650 | \r | |
651 | @return The status of the set operation.\r | |
652 | \r | |
653 | **/\r | |
654 | RETURN_STATUS\r | |
655 | EFIAPI\r | |
656 | LibPcdSetExPtrS (\r | |
2f88bd3a MK |
657 | IN CONST GUID *Guid,\r |
658 | IN UINTN TokenNumber,\r | |
659 | IN OUT UINTN *SizeOfBuffer,\r | |
660 | IN VOID *Buffer\r | |
9a355841 SZ |
661 | )\r |
662 | {\r | |
663 | ASSERT (FALSE);\r | |
664 | \r | |
665 | return RETURN_INVALID_PARAMETER;\r | |
666 | }\r | |
667 | \r | |
668 | /**\r | |
669 | This function provides a means by which to set a value for a given PCD token.\r | |
670 | \r | |
671 | Sets the boolean value for the token specified by TokenNumber\r | |
672 | to the value specified by Value.\r | |
673 | \r | |
674 | If Guid is NULL, then ASSERT().\r | |
675 | \r | |
676 | @param[in] Guid The pointer to a 128-bit unique value that\r | |
677 | designates which namespace to set a value from.\r | |
678 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
679 | @param[in] Value The boolean value to set.\r | |
680 | \r | |
681 | @return The status of the set operation.\r | |
682 | \r | |
683 | **/\r | |
684 | RETURN_STATUS\r | |
685 | EFIAPI\r | |
686 | LibPcdSetExBoolS (\r | |
2f88bd3a MK |
687 | IN CONST GUID *Guid,\r |
688 | IN UINTN TokenNumber,\r | |
689 | IN BOOLEAN Value\r | |
9a355841 SZ |
690 | )\r |
691 | {\r | |
692 | ASSERT (FALSE);\r | |
693 | \r | |
694 | return RETURN_INVALID_PARAMETER;\r | |
695 | }\r | |
bbfaace4 | 696 | \r |
697 | /**\r | |
efb23117 | 698 | Set up a notification function that is called when a specified token is set.\r |
9095d37b LG |
699 | \r |
700 | When the token specified by TokenNumber and Guid is set,\r | |
701 | then notification function specified by NotificationFunction is called.\r | |
702 | If Guid is NULL, then the default token space is used.\r | |
703 | \r | |
bbfaace4 | 704 | If NotificationFunction is NULL, then ASSERT().\r |
705 | \r | |
9095d37b LG |
706 | @param[in] Guid The pointer to a 128-bit unique value that designates which\r |
707 | namespace to set a value from. If NULL, then the default\r | |
efb23117 | 708 | token space is used.\r |
709 | @param[in] TokenNumber The PCD token number to monitor.\r | |
9095d37b | 710 | @param[in] NotificationFunction The function to call when the token\r |
efb23117 | 711 | specified by Guid and TokenNumber is set.\r |
bbfaace4 | 712 | \r |
bbfaace4 | 713 | **/\r |
714 | VOID\r | |
715 | EFIAPI\r | |
716 | LibPcdCallbackOnSet (\r | |
2f88bd3a MK |
717 | IN CONST GUID *Guid OPTIONAL,\r |
718 | IN UINTN TokenNumber,\r | |
719 | IN PCD_CALLBACK NotificationFunction\r | |
bbfaace4 | 720 | )\r |
721 | {\r | |
afa22326 | 722 | ASSERT (FALSE);\r |
bbfaace4 | 723 | }\r |
724 | \r | |
bbfaace4 | 725 | /**\r |
726 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
9095d37b LG |
727 | \r |
728 | Disable a notification function that was previously established with LibPcdCallbackOnSet().\r | |
729 | \r | |
bbfaace4 | 730 | If NotificationFunction is NULL, then ASSERT().\r |
9095d37b | 731 | If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,\r |
efb23117 | 732 | and NotificationFunction, then ASSERT().\r |
9095d37b | 733 | \r |
efb23117 | 734 | @param[in] Guid Specify the GUID token space.\r |
735 | @param[in] TokenNumber Specify the token number.\r | |
bbfaace4 | 736 | @param[in] NotificationFunction The callback function to be unregistered.\r |
737 | \r | |
bbfaace4 | 738 | **/\r |
739 | VOID\r | |
740 | EFIAPI\r | |
741 | LibPcdCancelCallback (\r | |
2f88bd3a MK |
742 | IN CONST GUID *Guid OPTIONAL,\r |
743 | IN UINTN TokenNumber,\r | |
744 | IN PCD_CALLBACK NotificationFunction\r | |
bbfaace4 | 745 | )\r |
746 | {\r | |
afa22326 | 747 | ASSERT (FALSE);\r |
bbfaace4 | 748 | }\r |
749 | \r | |
bbfaace4 | 750 | /**\r |
efb23117 | 751 | Retrieves the next token in a token space.\r |
9095d37b LG |
752 | \r |
753 | Retrieves the next PCD token number from the token space specified by Guid.\r | |
754 | If Guid is NULL, then the default token space is used. If TokenNumber is 0,\r | |
755 | then the first token number is returned. Otherwise, the token number that\r | |
756 | follows TokenNumber in the token space is returned. If TokenNumber is the last\r | |
757 | token number in the token space, then 0 is returned.\r | |
758 | \r | |
efb23117 | 759 | If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r |
bbfaace4 | 760 | \r |
9095d37b | 761 | @param[in] Guid The pointer to a 128-bit unique value that designates which namespace\r |
efb23117 | 762 | to set a value from. If NULL, then the default token space is used.\r |
9095d37b | 763 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD\r |
efb23117 | 764 | token number.\r |
bbfaace4 | 765 | \r |
f73e0ad2 | 766 | @return The next valid token number.\r |
bbfaace4 | 767 | \r |
768 | **/\r | |
9095d37b | 769 | UINTN\r |
bbfaace4 | 770 | EFIAPI\r |
771 | LibPcdGetNextToken (\r | |
2f88bd3a MK |
772 | IN CONST GUID *Guid OPTIONAL,\r |
773 | IN UINTN TokenNumber\r | |
bbfaace4 | 774 | )\r |
775 | {\r | |
afa22326 | 776 | ASSERT (FALSE);\r |
cdebf6c6 | 777 | \r |
bbfaace4 | 778 | return 0;\r |
779 | }\r | |
780 | \r | |
bbfaace4 | 781 | /**\r |
efb23117 | 782 | Used to retrieve the list of available PCD token space GUIDs.\r |
9095d37b | 783 | \r |
8f0dd97e | 784 | Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r |
785 | in the platform.\r | |
786 | If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r | |
787 | If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r | |
9095d37b | 788 | \r |
2fc59a00 | 789 | @param TokenSpaceGuid The pointer to a PCD token space GUID.\r |
bbfaace4 | 790 | \r |
f73e0ad2 | 791 | @return The next valid token namespace.\r |
bbfaace4 | 792 | \r |
793 | **/\r | |
9095d37b | 794 | GUID *\r |
bbfaace4 | 795 | EFIAPI\r |
796 | LibPcdGetNextTokenSpace (\r | |
efb23117 | 797 | IN CONST GUID *TokenSpaceGuid\r |
bbfaace4 | 798 | )\r |
799 | {\r | |
afa22326 | 800 | ASSERT (FALSE);\r |
cdebf6c6 | 801 | \r |
bbfaace4 | 802 | return NULL;\r |
803 | }\r | |
804 | \r | |
bbfaace4 | 805 | /**\r |
9638ba6d | 806 | Sets a value of a patchable PCD entry that is type pointer.\r |
9095d37b LG |
807 | \r |
808 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r | |
809 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r | |
810 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r | |
811 | NULL to indicate that the set operation was not actually performed.\r | |
812 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
bbfaace4 | 813 | MaximumDatumSize and NULL must be returned.\r |
9095d37b | 814 | \r |
bbfaace4 | 815 | If PatchVariable is NULL, then ASSERT().\r |
9638ba6d | 816 | If SizeOfBuffer is NULL, then ASSERT().\r |
817 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
bbfaace4 | 818 | \r |
9095d37b | 819 | @param[out] PatchVariable A pointer to the global variable in a module that is\r |
bbfaace4 | 820 | the target of the set operation.\r |
821 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
822 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
823 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
9095d37b | 824 | \r |
2fc59a00 | 825 | @return Return the pointer to the buffer that was set.\r |
bbfaace4 | 826 | \r |
827 | **/\r | |
828 | VOID *\r | |
829 | EFIAPI\r | |
830 | LibPatchPcdSetPtr (\r | |
2f88bd3a MK |
831 | OUT VOID *PatchVariable,\r |
832 | IN UINTN MaximumDatumSize,\r | |
833 | IN OUT UINTN *SizeOfBuffer,\r | |
834 | IN CONST VOID *Buffer\r | |
bbfaace4 | 835 | )\r |
836 | {\r | |
837 | ASSERT (PatchVariable != NULL);\r | |
838 | ASSERT (SizeOfBuffer != NULL);\r | |
9095d37b | 839 | \r |
bbfaace4 | 840 | if (*SizeOfBuffer > 0) {\r |
841 | ASSERT (Buffer != NULL);\r | |
842 | }\r | |
843 | \r | |
844 | if ((*SizeOfBuffer > MaximumDatumSize) ||\r | |
2f88bd3a MK |
845 | (*SizeOfBuffer == MAX_ADDRESS))\r |
846 | {\r | |
bbfaace4 | 847 | *SizeOfBuffer = MaximumDatumSize;\r |
848 | return NULL;\r | |
849 | }\r | |
9095d37b | 850 | \r |
bbfaace4 | 851 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r |
9095d37b | 852 | \r |
2f88bd3a | 853 | return (VOID *)Buffer;\r |
bbfaace4 | 854 | }\r |
855 | \r | |
9a355841 SZ |
856 | /**\r |
857 | Sets a value of a patchable PCD entry that is type pointer.\r | |
858 | \r | |
859 | Sets the PCD entry specified by PatchVariable to the value specified\r | |
860 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r | |
861 | then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r | |
862 | to indicate that the set operation was not actually performed.\r | |
863 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
864 | MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r | |
865 | \r | |
866 | If PatchVariable is NULL, then ASSERT().\r | |
867 | If SizeOfBuffer is NULL, then ASSERT().\r | |
868 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
869 | \r | |
f8308f0a | 870 | @param[out] PatchVariable A pointer to the global variable in a module that is\r |
9a355841 SZ |
871 | the target of the set operation.\r |
872 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
873 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
874 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
9095d37b | 875 | \r |
9a355841 SZ |
876 | @return The status of the set operation.\r |
877 | \r | |
878 | **/\r | |
879 | RETURN_STATUS\r | |
880 | EFIAPI\r | |
881 | LibPatchPcdSetPtrS (\r | |
2f88bd3a MK |
882 | OUT VOID *PatchVariable,\r |
883 | IN UINTN MaximumDatumSize,\r | |
884 | IN OUT UINTN *SizeOfBuffer,\r | |
885 | IN CONST VOID *Buffer\r | |
9a355841 SZ |
886 | )\r |
887 | {\r | |
888 | ASSERT (PatchVariable != NULL);\r | |
889 | ASSERT (SizeOfBuffer != NULL);\r | |
9095d37b | 890 | \r |
9a355841 SZ |
891 | if (*SizeOfBuffer > 0) {\r |
892 | ASSERT (Buffer != NULL);\r | |
893 | }\r | |
894 | \r | |
895 | if ((*SizeOfBuffer > MaximumDatumSize) ||\r | |
2f88bd3a MK |
896 | (*SizeOfBuffer == MAX_ADDRESS))\r |
897 | {\r | |
9a355841 SZ |
898 | *SizeOfBuffer = MaximumDatumSize;\r |
899 | return RETURN_INVALID_PARAMETER;\r | |
900 | }\r | |
901 | \r | |
902 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r | |
903 | \r | |
904 | return RETURN_SUCCESS;\r | |
905 | }\r | |
906 | \r | |
f8308f0a LG |
907 | /**\r |
908 | Sets a value and size of a patchable PCD entry that is type pointer.\r | |
9095d37b LG |
909 | \r |
910 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r | |
911 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r | |
912 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r | |
913 | NULL to indicate that the set operation was not actually performed.\r | |
914 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
f8308f0a | 915 | MaximumDatumSize and NULL must be returned.\r |
9095d37b | 916 | \r |
f8308f0a LG |
917 | If PatchVariable is NULL, then ASSERT().\r |
918 | If SizeOfPatchVariable is NULL, then ASSERT().\r | |
919 | If SizeOfBuffer is NULL, then ASSERT().\r | |
920 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
921 | \r | |
9095d37b | 922 | @param[out] PatchVariable A pointer to the global variable in a module that is\r |
f8308f0a LG |
923 | the target of the set operation.\r |
924 | @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r | |
925 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
926 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
927 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
9095d37b | 928 | \r |
f8308f0a LG |
929 | @return Return the pointer to the buffer been set.\r |
930 | \r | |
931 | **/\r | |
932 | VOID *\r | |
933 | EFIAPI\r | |
934 | LibPatchPcdSetPtrAndSize (\r | |
2f88bd3a MK |
935 | OUT VOID *PatchVariable,\r |
936 | OUT UINTN *SizeOfPatchVariable,\r | |
937 | IN UINTN MaximumDatumSize,\r | |
938 | IN OUT UINTN *SizeOfBuffer,\r | |
939 | IN CONST VOID *Buffer\r | |
f8308f0a LG |
940 | )\r |
941 | {\r | |
942 | ASSERT (PatchVariable != NULL);\r | |
943 | ASSERT (SizeOfPatchVariable != NULL);\r | |
944 | ASSERT (SizeOfBuffer != NULL);\r | |
9095d37b | 945 | \r |
f8308f0a LG |
946 | if (*SizeOfBuffer > 0) {\r |
947 | ASSERT (Buffer != NULL);\r | |
948 | }\r | |
949 | \r | |
950 | if ((*SizeOfBuffer > MaximumDatumSize) ||\r | |
2f88bd3a MK |
951 | (*SizeOfBuffer == MAX_ADDRESS))\r |
952 | {\r | |
f8308f0a LG |
953 | *SizeOfBuffer = MaximumDatumSize;\r |
954 | return NULL;\r | |
955 | }\r | |
9095d37b | 956 | \r |
f8308f0a LG |
957 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r |
958 | *SizeOfPatchVariable = *SizeOfBuffer;\r | |
9095d37b | 959 | \r |
2f88bd3a | 960 | return (VOID *)Buffer;\r |
f8308f0a LG |
961 | }\r |
962 | \r | |
963 | /**\r | |
964 | Sets a value and size of a patchable PCD entry that is type pointer.\r | |
965 | \r | |
966 | Sets the PCD entry specified by PatchVariable to the value specified\r | |
967 | by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r | |
968 | then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r | |
969 | to indicate that the set operation was not actually performed.\r | |
970 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r | |
971 | MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r | |
972 | \r | |
973 | If PatchVariable is NULL, then ASSERT().\r | |
974 | If SizeOfPatchVariable is NULL, then ASSERT().\r | |
975 | If SizeOfBuffer is NULL, then ASSERT().\r | |
976 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r | |
977 | \r | |
978 | @param[out] PatchVariable A pointer to the global variable in a module that is\r | |
979 | the target of the set operation.\r | |
980 | @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r | |
981 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
982 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
983 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
9095d37b | 984 | \r |
f8308f0a LG |
985 | @return The status of the set operation.\r |
986 | \r | |
987 | **/\r | |
988 | RETURN_STATUS\r | |
989 | EFIAPI\r | |
990 | LibPatchPcdSetPtrAndSizeS (\r | |
2f88bd3a MK |
991 | OUT VOID *PatchVariable,\r |
992 | OUT UINTN *SizeOfPatchVariable,\r | |
993 | IN UINTN MaximumDatumSize,\r | |
994 | IN OUT UINTN *SizeOfBuffer,\r | |
995 | IN CONST VOID *Buffer\r | |
f8308f0a LG |
996 | )\r |
997 | {\r | |
998 | ASSERT (PatchVariable != NULL);\r | |
999 | ASSERT (SizeOfPatchVariable != NULL);\r | |
1000 | ASSERT (SizeOfBuffer != NULL);\r | |
9095d37b | 1001 | \r |
f8308f0a LG |
1002 | if (*SizeOfBuffer > 0) {\r |
1003 | ASSERT (Buffer != NULL);\r | |
1004 | }\r | |
1005 | \r | |
1006 | if ((*SizeOfBuffer > MaximumDatumSize) ||\r | |
2f88bd3a MK |
1007 | (*SizeOfBuffer == MAX_ADDRESS))\r |
1008 | {\r | |
f8308f0a LG |
1009 | *SizeOfBuffer = MaximumDatumSize;\r |
1010 | return RETURN_INVALID_PARAMETER;\r | |
1011 | }\r | |
1012 | \r | |
1013 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r | |
1014 | *SizeOfPatchVariable = *SizeOfBuffer;\r | |
1015 | \r | |
1016 | return RETURN_SUCCESS;\r | |
1017 | }\r | |
1018 | \r | |
96d6d004 SZ |
1019 | /**\r |
1020 | Retrieve additional information associated with a PCD token.\r | |
1021 | \r | |
1022 | This includes information such as the type of value the TokenNumber is associated with as well as possible\r | |
1023 | human readable name that is associated with the token.\r | |
1024 | \r | |
1025 | If TokenNumber is not in the default token space specified, then ASSERT().\r | |
1026 | \r | |
1027 | @param[in] TokenNumber The PCD token number.\r | |
1028 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r | |
1029 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r | |
1030 | **/\r | |
1031 | VOID\r | |
1032 | EFIAPI\r | |
1033 | LibPcdGetInfo (\r | |
2f88bd3a MK |
1034 | IN UINTN TokenNumber,\r |
1035 | OUT PCD_INFO *PcdInfo\r | |
96d6d004 SZ |
1036 | )\r |
1037 | {\r | |
1038 | ASSERT (FALSE);\r | |
1039 | }\r | |
1040 | \r | |
1041 | /**\r | |
1042 | Retrieve additional information associated with a PCD token.\r | |
1043 | \r | |
1044 | This includes information such as the type of value the TokenNumber is associated with as well as possible\r | |
1045 | human readable name that is associated with the token.\r | |
1046 | \r | |
1047 | If TokenNumber is not in the token space specified by Guid, then ASSERT().\r | |
1048 | \r | |
1049 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r | |
1050 | @param[in] TokenNumber The PCD token number.\r | |
1051 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r | |
1052 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r | |
1053 | **/\r | |
1054 | VOID\r | |
1055 | EFIAPI\r | |
1056 | LibPcdGetInfoEx (\r | |
2f88bd3a MK |
1057 | IN CONST GUID *Guid,\r |
1058 | IN UINTN TokenNumber,\r | |
1059 | OUT PCD_INFO *PcdInfo\r | |
96d6d004 SZ |
1060 | )\r |
1061 | {\r | |
1062 | ASSERT (FALSE);\r | |
1063 | }\r | |
1064 | \r | |
1065 | /**\r | |
1066 | Retrieve the currently set SKU Id.\r | |
1067 | \r | |
96d6d004 SZ |
1068 | @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r |
1069 | default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r | |
1070 | Id is returned.\r | |
1071 | **/\r | |
1072 | UINTN\r | |
1073 | EFIAPI\r | |
1074 | LibPcdGetSku (\r | |
1075 | VOID\r | |
1076 | )\r | |
1077 | {\r | |
1078 | ASSERT (FALSE);\r | |
1079 | \r | |
1080 | return 0;\r | |
1081 | }\r |