TianoCore EDK2 master
Loading...
Searching...
No Matches
PcdLib.c
Go to the documentation of this file.
1
9#include <Base.h>
10
11#include <Library/DebugLib.h>
12#include <Library/PcdLib.h>
14
27EFIAPI
29 IN UINTN SkuId
30 )
31{
32 ASSERT (FALSE);
33
34 return 0;
35}
36
47UINT8
48EFIAPI
50 IN UINTN TokenNumber
51 )
52{
53 ASSERT (FALSE);
54
55 return 0;
56}
57
68UINT16
69EFIAPI
71 IN UINTN TokenNumber
72 )
73{
74 ASSERT (FALSE);
75
76 return 0;
77}
78
89UINT32
90EFIAPI
92 IN UINTN TokenNumber
93 )
94{
95 ASSERT (FALSE);
96
97 return 0;
98}
99
110UINT64
111EFIAPI
113 IN UINTN TokenNumber
114 )
115{
116 ASSERT (FALSE);
117
118 return 0;
119}
120
131VOID *
132EFIAPI
134 IN UINTN TokenNumber
135 )
136{
137 ASSERT (FALSE);
138
139 return 0;
140}
141
152BOOLEAN
153EFIAPI
155 IN UINTN TokenNumber
156 )
157{
158 ASSERT (FALSE);
159
160 return 0;
161}
162
171UINTN
172EFIAPI
174 IN UINTN TokenNumber
175 )
176{
177 ASSERT (FALSE);
178
179 return 0;
180}
181
196UINT8
197EFIAPI
199 IN CONST GUID *Guid,
200 IN UINTN TokenNumber
201 )
202{
203 ASSERT (FALSE);
204
205 return 0;
206}
207
222UINT16
223EFIAPI
225 IN CONST GUID *Guid,
226 IN UINTN TokenNumber
227 )
228{
229 ASSERT (FALSE);
230
231 return 0;
232}
233
245UINT32
246EFIAPI
248 IN CONST GUID *Guid,
249 IN UINTN TokenNumber
250 )
251{
252 ASSERT (FALSE);
253
254 return 0;
255}
256
271UINT64
272EFIAPI
274 IN CONST GUID *Guid,
275 IN UINTN TokenNumber
276 )
277{
278 ASSERT (FALSE);
279
280 return 0;
281}
282
297VOID *
298EFIAPI
300 IN CONST GUID *Guid,
301 IN UINTN TokenNumber
302 )
303{
304 ASSERT (FALSE);
305
306 return 0;
307}
308
323BOOLEAN
324EFIAPI
326 IN CONST GUID *Guid,
327 IN UINTN TokenNumber
328 )
329{
330 ASSERT (FALSE);
331
332 return 0;
333}
334
349UINTN
350EFIAPI
352 IN CONST GUID *Guid,
353 IN UINTN TokenNumber
354 )
355{
356 ASSERT (FALSE);
357
358 return 0;
359}
360
373RETURN_STATUS
374EFIAPI
376 IN UINTN TokenNumber,
377 IN UINT8 Value
378 )
379{
380 ASSERT (FALSE);
381
383}
384
397RETURN_STATUS
398EFIAPI
400 IN UINTN TokenNumber,
401 IN UINT16 Value
402 )
403{
404 ASSERT (FALSE);
405
407}
408
421RETURN_STATUS
422EFIAPI
424 IN UINTN TokenNumber,
425 IN UINT32 Value
426 )
427{
428 ASSERT (FALSE);
429
431}
432
445RETURN_STATUS
446EFIAPI
448 IN UINTN TokenNumber,
449 IN UINT64 Value
450 )
451{
452 ASSERT (FALSE);
453
455}
456
479RETURN_STATUS
480EFIAPI
482 IN UINTN TokenNumber,
483 IN OUT UINTN *SizeOfBuffer,
484 IN CONST VOID *Buffer
485 )
486{
487 ASSERT (FALSE);
488
490}
491
504RETURN_STATUS
505EFIAPI
507 IN UINTN TokenNumber,
508 IN BOOLEAN Value
509 )
510{
511 ASSERT (FALSE);
512
514}
515
532RETURN_STATUS
533EFIAPI
535 IN CONST GUID *Guid,
536 IN UINTN TokenNumber,
537 IN UINT8 Value
538 )
539{
540 ASSERT (FALSE);
541
543}
544
561RETURN_STATUS
562EFIAPI
564 IN CONST GUID *Guid,
565 IN UINTN TokenNumber,
566 IN UINT16 Value
567 )
568{
569 ASSERT (FALSE);
570
572}
573
590RETURN_STATUS
591EFIAPI
593 IN CONST GUID *Guid,
594 IN UINTN TokenNumber,
595 IN UINT32 Value
596 )
597{
598 ASSERT (FALSE);
599
601}
602
619RETURN_STATUS
620EFIAPI
622 IN CONST GUID *Guid,
623 IN UINTN TokenNumber,
624 IN UINT64 Value
625 )
626{
627 ASSERT (FALSE);
628
630}
631
654RETURN_STATUS
655EFIAPI
657 IN CONST GUID *Guid,
658 IN UINTN TokenNumber,
659 IN OUT UINTN *SizeOfBuffer,
660 IN VOID *Buffer
661 )
662{
663 ASSERT (FALSE);
664
666}
667
684RETURN_STATUS
685EFIAPI
687 IN CONST GUID *Guid,
688 IN UINTN TokenNumber,
689 IN BOOLEAN Value
690 )
691{
692 ASSERT (FALSE);
693
695}
696
714VOID
715EFIAPI
717 IN CONST GUID *Guid OPTIONAL,
718 IN UINTN TokenNumber,
720 )
721{
722 ASSERT (FALSE);
723}
724
739VOID
740EFIAPI
742 IN CONST GUID *Guid OPTIONAL,
743 IN UINTN TokenNumber,
745 )
746{
747 ASSERT (FALSE);
748}
749
769UINTN
770EFIAPI
772 IN CONST GUID *Guid OPTIONAL,
773 IN UINTN TokenNumber
774 )
775{
776 ASSERT (FALSE);
777
778 return 0;
779}
780
794GUID *
795EFIAPI
797 IN CONST GUID *TokenSpaceGuid
798 )
799{
800 ASSERT (FALSE);
801
802 return NULL;
803}
804
828VOID *
829EFIAPI
831 OUT VOID *PatchVariable,
832 IN UINTN MaximumDatumSize,
833 IN OUT UINTN *SizeOfBuffer,
834 IN CONST VOID *Buffer
835 )
836{
837 ASSERT (PatchVariable != NULL);
838 ASSERT (SizeOfBuffer != NULL);
839
840 if (*SizeOfBuffer > 0) {
841 ASSERT (Buffer != NULL);
842 }
843
844 if ((*SizeOfBuffer > MaximumDatumSize) ||
845 (*SizeOfBuffer == MAX_ADDRESS))
846 {
847 *SizeOfBuffer = MaximumDatumSize;
848 return NULL;
849 }
850
851 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
852
853 return (VOID *)Buffer;
854}
855
879RETURN_STATUS
880EFIAPI
882 OUT VOID *PatchVariable,
883 IN UINTN MaximumDatumSize,
884 IN OUT UINTN *SizeOfBuffer,
885 IN CONST VOID *Buffer
886 )
887{
888 ASSERT (PatchVariable != NULL);
889 ASSERT (SizeOfBuffer != NULL);
890
891 if (*SizeOfBuffer > 0) {
892 ASSERT (Buffer != NULL);
893 }
894
895 if ((*SizeOfBuffer > MaximumDatumSize) ||
896 (*SizeOfBuffer == MAX_ADDRESS))
897 {
898 *SizeOfBuffer = MaximumDatumSize;
900 }
901
902 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
903
904 return RETURN_SUCCESS;
905}
906
932VOID *
933EFIAPI
935 OUT VOID *PatchVariable,
936 OUT UINTN *SizeOfPatchVariable,
937 IN UINTN MaximumDatumSize,
938 IN OUT UINTN *SizeOfBuffer,
939 IN CONST VOID *Buffer
940 )
941{
942 ASSERT (PatchVariable != NULL);
943 ASSERT (SizeOfPatchVariable != NULL);
944 ASSERT (SizeOfBuffer != NULL);
945
946 if (*SizeOfBuffer > 0) {
947 ASSERT (Buffer != NULL);
948 }
949
950 if ((*SizeOfBuffer > MaximumDatumSize) ||
951 (*SizeOfBuffer == MAX_ADDRESS))
952 {
953 *SizeOfBuffer = MaximumDatumSize;
954 return NULL;
955 }
956
957 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
958 *SizeOfPatchVariable = *SizeOfBuffer;
959
960 return (VOID *)Buffer;
961}
962
988RETURN_STATUS
989EFIAPI
991 OUT VOID *PatchVariable,
992 OUT UINTN *SizeOfPatchVariable,
993 IN UINTN MaximumDatumSize,
994 IN OUT UINTN *SizeOfBuffer,
995 IN CONST VOID *Buffer
996 )
997{
998 ASSERT (PatchVariable != NULL);
999 ASSERT (SizeOfPatchVariable != NULL);
1000 ASSERT (SizeOfBuffer != NULL);
1001
1002 if (*SizeOfBuffer > 0) {
1003 ASSERT (Buffer != NULL);
1004 }
1005
1006 if ((*SizeOfBuffer > MaximumDatumSize) ||
1007 (*SizeOfBuffer == MAX_ADDRESS))
1008 {
1009 *SizeOfBuffer = MaximumDatumSize;
1011 }
1012
1013 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1014 *SizeOfPatchVariable = *SizeOfBuffer;
1015
1016 return RETURN_SUCCESS;
1017}
1018
1031VOID
1032EFIAPI
1034 IN UINTN TokenNumber,
1035 OUT PCD_INFO *PcdInfo
1036 )
1037{
1038 ASSERT (FALSE);
1039}
1040
1054VOID
1055EFIAPI
1057 IN CONST GUID *Guid,
1058 IN UINTN TokenNumber,
1059 OUT PCD_INFO *PcdInfo
1060 )
1061{
1062 ASSERT (FALSE);
1063}
1064
1072UINTN
1073EFIAPI
1075 VOID
1076 )
1077{
1078 ASSERT (FALSE);
1079
1080 return 0;
1081}
UINT64 UINTN
#define MAX_ADDRESS
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS EFIAPI NotificationFunction(IN EFI_KEY_DATA *KeyData)
Definition: DriverSample.c:117
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define RETURN_SUCCESS
Definition: Base.h:1066
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define RETURN_INVALID_PARAMETER
Definition: Base.h:1076
VOID EFIAPI LibPcdCallbackOnSet(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber, IN PCD_CALLBACK NotificationFunction)
Definition: PcdLib.c:716
RETURN_STATUS EFIAPI LibPcdSetEx16S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT16 Value)
Definition: PcdLib.c:563
RETURN_STATUS EFIAPI LibPcdSet8S(IN UINTN TokenNumber, IN UINT8 Value)
Definition: PcdLib.c:375
RETURN_STATUS EFIAPI LibPatchPcdSetPtrS(OUT VOID *PatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
Definition: PcdLib.c:881
UINTN EFIAPI LibPcdGetNextToken(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber)
Definition: PcdLib.c:771
UINT32 EFIAPI LibPcdGetEx32(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:247
UINT8 EFIAPI LibPcdGetEx8(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:198
VOID EFIAPI LibPcdGetInfoEx(IN CONST GUID *Guid, IN UINTN TokenNumber, OUT PCD_INFO *PcdInfo)
Definition: PcdLib.c:1056
RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS(OUT VOID *PatchVariable, OUT UINTN *SizeOfPatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
Definition: PcdLib.c:990
UINT16 EFIAPI LibPcdGet16(IN UINTN TokenNumber)
Definition: PcdLib.c:70
UINT64 EFIAPI LibPcdGetEx64(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:273
UINT16 EFIAPI LibPcdGetEx16(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:224
RETURN_STATUS EFIAPI LibPcdSetExPtrS(IN CONST GUID *Guid, IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN VOID *Buffer)
Definition: PcdLib.c:656
VOID EFIAPI LibPcdGetInfo(IN UINTN TokenNumber, OUT PCD_INFO *PcdInfo)
Definition: PcdLib.c:1033
UINTN EFIAPI LibPcdGetSize(IN UINTN TokenNumber)
Definition: PcdLib.c:173
RETURN_STATUS EFIAPI LibPcdSetPtrS(IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
Definition: PcdLib.c:481
UINT64 EFIAPI LibPcdGet64(IN UINTN TokenNumber)
Definition: PcdLib.c:112
UINTN EFIAPI LibPcdGetSku(VOID)
Definition: PcdLib.c:1074
GUID *EFIAPI LibPcdGetNextTokenSpace(IN CONST GUID *TokenSpaceGuid)
Definition: PcdLib.c:796
RETURN_STATUS EFIAPI LibPcdSetEx8S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT8 Value)
Definition: PcdLib.c:534
RETURN_STATUS EFIAPI LibPcdSetExBoolS(IN CONST GUID *Guid, IN UINTN TokenNumber, IN BOOLEAN Value)
Definition: PcdLib.c:686
RETURN_STATUS EFIAPI LibPcdSetEx64S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT64 Value)
Definition: PcdLib.c:621
VOID *EFIAPI LibPatchPcdSetPtrAndSize(OUT VOID *PatchVariable, OUT UINTN *SizeOfPatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
Definition: PcdLib.c:934
UINT8 EFIAPI LibPcdGet8(IN UINTN TokenNumber)
Definition: PcdLib.c:49
VOID *EFIAPI LibPatchPcdSetPtr(OUT VOID *PatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
Definition: PcdLib.c:830
RETURN_STATUS EFIAPI LibPcdSet32S(IN UINTN TokenNumber, IN UINT32 Value)
Definition: PcdLib.c:423
RETURN_STATUS EFIAPI LibPcdSet16S(IN UINTN TokenNumber, IN UINT16 Value)
Definition: PcdLib.c:399
VOID EFIAPI LibPcdCancelCallback(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber, IN PCD_CALLBACK NotificationFunction)
Definition: PcdLib.c:741
UINT32 EFIAPI LibPcdGet32(IN UINTN TokenNumber)
Definition: PcdLib.c:91
RETURN_STATUS EFIAPI LibPcdSetEx32S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT32 Value)
Definition: PcdLib.c:592
VOID *EFIAPI LibPcdGetExPtr(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:299
VOID *EFIAPI LibPcdGetPtr(IN UINTN TokenNumber)
Definition: PcdLib.c:133
RETURN_STATUS EFIAPI LibPcdSet64S(IN UINTN TokenNumber, IN UINT64 Value)
Definition: PcdLib.c:447
UINTN EFIAPI LibPcdGetExSize(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:351
UINTN EFIAPI LibPcdSetSku(IN UINTN SkuId)
Definition: PcdLib.c:28
BOOLEAN EFIAPI LibPcdGetBool(IN UINTN TokenNumber)
Definition: PcdLib.c:154
RETURN_STATUS EFIAPI LibPcdSetBoolS(IN UINTN TokenNumber, IN BOOLEAN Value)
Definition: PcdLib.c:506
BOOLEAN EFIAPI LibPcdGetExBool(IN CONST GUID *Guid, IN UINTN TokenNumber)
Definition: PcdLib.c:325
VOID(EFIAPI * PCD_CALLBACK)(IN CONST GUID *CallBackGuid OPTIONAL, IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDataSize)
Definition: PcdLib.h:1363
Definition: Base.h:213