TianoCore EDK2 master
Loading...
Searching...
No Matches
Pcd.c
Go to the documentation of this file.
1
10#include "Service.h"
11
18
26
34
41
48
53};
54
61
79};
80
89};
90
98};
99
100EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
101 {
102 EFI_PEI_PPI_DESCRIPTOR_PPI,
103 &gPcdPpiGuid,
105 },
106 {
107 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
108 &gEfiPeiPcdPpiGuid,
110 }
111};
112
113EFI_PEI_PPI_DESCRIPTOR mPpiList2[] = {
114 {
115 EFI_PEI_PPI_DESCRIPTOR_PPI,
116 &gGetPcdInfoPpiGuid,
118 },
119 {
120 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
121 &gEfiGetPcdInfoPpiGuid,
123 }
124};
125
138VOID
139EFIAPI
141 IN CONST EFI_GUID *CallBackGuid OPTIONAL,
142 IN UINTN CallBackToken,
143 IN OUT VOID *TokenData,
144 IN UINTN TokenDataSize
145 )
146{
147 EFI_STATUS Status;
148 UINT16 DefaultId;
149 SKU_ID SkuId;
150 UINTN FullSize;
151 UINTN Index;
152 UINT8 *DataBuffer;
153 UINT8 *VarStoreHobData;
154 UINT8 *BufferEnd;
155 BOOLEAN IsFound;
156 VARIABLE_STORE_HEADER *NvStoreBuffer;
157 PCD_DEFAULT_DATA *DataHeader;
158 PCD_DEFAULT_INFO *DefaultInfo;
159 PCD_DATA_DELTA *DeltaData;
160
161 DefaultId = *(UINT16 *)TokenData;
162 SkuId = GetPcdDatabase ()->SystemSkuId;
163 IsFound = FALSE;
164
165 if (PeiPcdGetSizeEx (&gEfiMdeModulePkgTokenSpaceGuid, PcdToken (PcdNvStoreDefaultValueBuffer)) > sizeof (PCD_NV_STORE_DEFAULT_BUFFER_HEADER)) {
166 DataBuffer = (UINT8 *)PeiPcdGetPtrEx (&gEfiMdeModulePkgTokenSpaceGuid, PcdToken (PcdNvStoreDefaultValueBuffer));
167 FullSize = ((PCD_NV_STORE_DEFAULT_BUFFER_HEADER *)DataBuffer)->Length;
168 DataHeader = (PCD_DEFAULT_DATA *)(DataBuffer + sizeof (PCD_NV_STORE_DEFAULT_BUFFER_HEADER));
169 //
170 // The first section data includes NV storage default setting.
171 //
172 NvStoreBuffer = (VARIABLE_STORE_HEADER *)((UINT8 *)DataHeader + sizeof (DataHeader->DataSize) + DataHeader->HeaderSize);
173 VarStoreHobData = (UINT8 *)BuildGuidHob (&NvStoreBuffer->Signature, NvStoreBuffer->Size);
174 ASSERT (VarStoreHobData != NULL);
175 CopyMem (VarStoreHobData, NvStoreBuffer, NvStoreBuffer->Size);
176 //
177 // Find the matched SkuId and DefaultId in the first section
178 //
179 DefaultInfo = &(DataHeader->DefaultInfo[0]);
180 BufferEnd = (UINT8 *)DataHeader + sizeof (DataHeader->DataSize) + DataHeader->HeaderSize;
181 while ((UINT8 *)DefaultInfo < BufferEnd) {
182 if ((DefaultInfo->DefaultId == DefaultId) && (DefaultInfo->SkuId == SkuId)) {
183 IsFound = TRUE;
184 break;
185 }
186
187 DefaultInfo++;
188 }
189
190 //
191 // Find the matched SkuId and DefaultId in the remaining section
192 //
193 Index = sizeof (PCD_NV_STORE_DEFAULT_BUFFER_HEADER) + ((DataHeader->DataSize + 7) & (~7));
194 DataHeader = (PCD_DEFAULT_DATA *)(DataBuffer + Index);
195 while (!IsFound && Index < FullSize && DataHeader->DataSize != 0xFFFFFFFF) {
196 DefaultInfo = &(DataHeader->DefaultInfo[0]);
197 BufferEnd = (UINT8 *)DataHeader + sizeof (DataHeader->DataSize) + DataHeader->HeaderSize;
198 while ((UINT8 *)DefaultInfo < BufferEnd) {
199 if ((DefaultInfo->DefaultId == DefaultId) && (DefaultInfo->SkuId == SkuId)) {
200 IsFound = TRUE;
201 break;
202 }
203
204 DefaultInfo++;
205 }
206
207 if (IsFound) {
208 DeltaData = (PCD_DATA_DELTA *)BufferEnd;
209 BufferEnd = (UINT8 *)DataHeader + DataHeader->DataSize;
210 while ((UINT8 *)DeltaData < BufferEnd) {
211 *(VarStoreHobData + DeltaData->Offset) = (UINT8)DeltaData->Value;
212 DeltaData++;
213 }
214
215 break;
216 }
217
218 Index = (Index + DataHeader->DataSize + 7) & (~7);
219 DataHeader = (PCD_DEFAULT_DATA *)(DataBuffer + Index);
220 }
221 }
222
224 &gEfiMdeModulePkgTokenSpaceGuid,
225 PcdToken (PcdSetNvStoreDefaultId),
227 );
228 ASSERT_EFI_ERROR (Status);
229}
230
241EFIAPI
243 IN EFI_PEI_SERVICES **PeiServices,
244 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
245 IN VOID *Ppi
246 )
247{
248 PEI_PCD_DATABASE *Database;
249 EFI_BOOT_MODE BootMode;
250 EFI_STATUS Status;
251 UINTN Instance;
252 EFI_PEI_FV_HANDLE VolumeHandle;
253 EFI_PEI_FILE_HANDLE FileHandle;
254 VOID *PcdDb;
255 UINT32 Length;
256 PEI_PCD_DATABASE *PeiPcdDb;
257
258 Status = PeiServicesGetBootMode (&BootMode);
259 ASSERT_EFI_ERROR (Status);
260
261 //
262 // Don't need to report it on S3 boot.
263 //
264 if (BootMode == BOOT_ON_S3_RESUME) {
265 return EFI_SUCCESS;
266 }
267
268 PeiPcdDb = GetPcdDatabase ();
269 if (PeiPcdDb->SystemSkuId != (SKU_ID)0) {
270 //
271 // SkuId has been set. Don't need to report it to DXE phase.
272 //
273 return EFI_SUCCESS;
274 }
275
276 //
277 // Get full PCD database from PcdPeim FileHandle
278 //
279 Instance = 0;
280 FileHandle = NULL;
281 while (TRUE) {
282 //
283 // Traverse all firmware volume instances
284 //
285 Status = PeiServicesFfsFindNextVolume (Instance, &VolumeHandle);
286 //
287 // Error should not happen
288 //
289 ASSERT_EFI_ERROR (Status);
290
291 //
292 // Find PcdDb file from the beginning in this firmware volume.
293 //
294 FileHandle = NULL;
295 Status = PeiServicesFfsFindFileByName (&gEfiCallerIdGuid, VolumeHandle, &FileHandle);
296 if (!EFI_ERROR (Status)) {
297 //
298 // Find PcdPeim FileHandle in this volume
299 //
300 break;
301 }
302
303 //
304 // We cannot find PcdPeim in this firmware volume, then search the next volume.
305 //
306 Instance++;
307 }
308
309 //
310 // Find PEI PcdDb and Build second PcdDB GuidHob
311 //
312 Status = PeiServicesFfsFindSectionData (EFI_SECTION_RAW, FileHandle, &PcdDb);
313 ASSERT_EFI_ERROR (Status);
314 Length = PeiPcdDb->LengthForAllSkus;
315 Database = BuildGuidHob (&gPcdDataBaseHobGuid, Length);
316 CopyMem (Database, PcdDb, Length);
317
318 return EFI_SUCCESS;
319}
320
321EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiSignalPpiNotifyList[] = {
322 {
323 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
324 &gEfiEndOfPeiSignalPpiGuid,
326 }
327};
328
341EFIAPI
343 IN EFI_PEI_FILE_HANDLE FileHandle,
344 IN CONST EFI_PEI_SERVICES **PeiServices
345 )
346{
347 EFI_STATUS Status;
348
349 Status = PeiServicesRegisterForShadow (FileHandle);
350 if (Status == EFI_ALREADY_STARTED) {
351 //
352 // This is now starting in memory, the second time starting.
353 //
354 EFI_PEI_PPI_DESCRIPTOR *OldPpiList;
355 EFI_PEI_PPI_DESCRIPTOR *OldPpiList2;
356 VOID *Ppi;
357 VOID *Ppi2;
358
359 OldPpiList = NULL;
360 Status = PeiServicesLocatePpi (
361 &gPcdPpiGuid,
362 0,
363 &OldPpiList,
364 &Ppi
365 );
366 ASSERT_EFI_ERROR (Status);
367
368 if (OldPpiList != NULL) {
369 Status = PeiServicesReInstallPpi (OldPpiList, &mPpiList[0]);
370 ASSERT_EFI_ERROR (Status);
371 }
372
373 OldPpiList2 = NULL;
374 Status = PeiServicesLocatePpi (
375 &gGetPcdInfoPpiGuid,
376 0,
377 &OldPpiList2,
378 &Ppi2
379 );
380 ASSERT_EFI_ERROR (Status);
381
382 if (OldPpiList2 != NULL) {
383 Status = PeiServicesReInstallPpi (OldPpiList2, &mPpiList2[0]);
384 ASSERT_EFI_ERROR (Status);
385 }
386
387 OldPpiList = NULL;
388 Status = PeiServicesLocatePpi (
389 &gEfiPeiPcdPpiGuid,
390 0,
391 &OldPpiList,
392 &Ppi
393 );
394 ASSERT_EFI_ERROR (Status);
395
396 if (OldPpiList != NULL) {
397 Status = PeiServicesReInstallPpi (OldPpiList, &mPpiList[1]);
398 ASSERT_EFI_ERROR (Status);
399 }
400
401 OldPpiList2 = NULL;
402 Status = PeiServicesLocatePpi (
403 &gEfiGetPcdInfoPpiGuid,
404 0,
405 &OldPpiList2,
406 &Ppi2
407 );
408 ASSERT_EFI_ERROR (Status);
409
410 if (OldPpiList2 != NULL) {
411 Status = PeiServicesReInstallPpi (OldPpiList2, &mPpiList2[1]);
412 ASSERT_EFI_ERROR (Status);
413 }
414
415 return Status;
416 }
417
418 BuildPcdDatabase (FileHandle);
419
420 //
421 // Install PCD_PPI and EFI_PEI_PCD_PPI.
422 //
423 Status = PeiServicesInstallPpi (&mPpiList[0]);
424 ASSERT_EFI_ERROR (Status);
425
426 //
427 // Install GET_PCD_INFO_PPI and EFI_GET_PCD_INFO_PPI.
428 //
429 Status = PeiServicesInstallPpi (&mPpiList2[0]);
430 ASSERT_EFI_ERROR (Status);
431
432 Status = PeiServicesNotifyPpi (&mEndOfPeiSignalPpiNotifyList[0]);
433 ASSERT_EFI_ERROR (Status);
434
435 Status = PeiRegisterCallBackOnSet (
436 &gEfiMdeModulePkgTokenSpaceGuid,
437 PcdToken (PcdSetNvStoreDefaultId),
439 );
440 ASSERT_EFI_ERROR (Status);
441
442 return Status;
443}
444
459EFIAPI
461 IN UINTN TokenNumber,
462 OUT EFI_PCD_INFO *PcdInfo
463 )
464{
465 return PeiGetPcdInfo (NULL, TokenNumber, PcdInfo);
466}
467
483EFIAPI
485 IN CONST EFI_GUID *Guid,
486 IN UINTN TokenNumber,
487 OUT EFI_PCD_INFO *PcdInfo
488 )
489{
490 return PeiGetPcdInfo (Guid, TokenNumber, PcdInfo);
491}
492
500UINTN
501EFIAPI
503 VOID
504 )
505{
506 return (UINTN)GetPcdDatabase ()->SystemSkuId;
507}
508
530VOID
531EFIAPI
533 IN UINTN SkuId
534 )
535{
536 PEI_PCD_DATABASE *PeiPcdDb;
537 SKU_ID *SkuIdTable;
538 UINTN Index;
539 EFI_STATUS Status;
540 UINTN Instance;
541 EFI_PEI_FV_HANDLE VolumeHandle;
542 EFI_PEI_FILE_HANDLE FileHandle;
543 VOID *PcdDb;
544 UINT32 Length;
545 PCD_DATABASE_SKU_DELTA *SkuDelta;
546 PCD_DATA_DELTA *SkuDeltaData;
547
548 DEBUG ((DEBUG_INFO, "PcdPei - SkuId 0x%lx is to be set.\n", (SKU_ID)SkuId));
549
550 PeiPcdDb = GetPcdDatabase ();
551
552 if (SkuId == PeiPcdDb->SystemSkuId) {
553 //
554 // The input SKU Id is equal to current SKU Id, return directly.
555 //
556 DEBUG ((DEBUG_INFO, "PcdPei - SkuId is same to current system Sku.\n"));
557 return;
558 }
559
560 if (PeiPcdDb->SystemSkuId != (SKU_ID)0) {
561 DEBUG ((DEBUG_ERROR, "PcdPei - The SKU Id could be changed only once."));
562 DEBUG ((
563 DEBUG_ERROR,
564 "PcdPei - The SKU Id was set to 0x%lx already, it could not be set to 0x%lx any more.",
565 PeiPcdDb->SystemSkuId,
566 (SKU_ID)SkuId
567 ));
568 ASSERT (FALSE);
569 return;
570 }
571
572 SkuIdTable = (SKU_ID *)((UINT8 *)PeiPcdDb + PeiPcdDb->SkuIdTableOffset);
573 for (Index = 0; Index < SkuIdTable[0]; Index++) {
574 if (SkuId == SkuIdTable[Index + 1]) {
575 DEBUG ((DEBUG_INFO, "PcdPei - SkuId is found in SkuId table.\n"));
576 break;
577 }
578 }
579
580 if (Index < SkuIdTable[0]) {
581 //
582 // Get full PCD database from PcdPeim FileHandle
583 //
584 Instance = 0;
585 FileHandle = NULL;
586 while (TRUE) {
587 //
588 // Traverse all firmware volume instances
589 //
590 Status = PeiServicesFfsFindNextVolume (Instance, &VolumeHandle);
591 //
592 // Error should not happen
593 //
594 ASSERT_EFI_ERROR (Status);
595
596 //
597 // Find PcdDb file from the beginning in this firmware volume.
598 //
599 FileHandle = NULL;
600 Status = PeiServicesFfsFindFileByName (&gEfiCallerIdGuid, VolumeHandle, &FileHandle);
601 if (!EFI_ERROR (Status)) {
602 //
603 // Find PcdPeim FileHandle in this volume
604 //
605 break;
606 }
607
608 //
609 // We cannot find PcdPeim in this firmware volume, then search the next volume.
610 //
611 Instance++;
612 }
613
614 //
615 // Find the delta data between the different Skus
616 //
617 Status = PeiServicesFfsFindSectionData (EFI_SECTION_RAW, FileHandle, &PcdDb);
618 ASSERT_EFI_ERROR (Status);
619 Length = PeiPcdDb->LengthForAllSkus;
620 Index = (PeiPcdDb->Length + 7) & (~7);
621 SkuDelta = NULL;
622 while (Index < Length) {
623 SkuDelta = (PCD_DATABASE_SKU_DELTA *)((UINT8 *)PcdDb + Index);
624 if ((SkuDelta->SkuId == SkuId) && (SkuDelta->SkuIdCompared == 0)) {
625 break;
626 }
627
628 Index = (Index + SkuDelta->Length + 7) & (~7);
629 }
630
631 //
632 // Patch the delta data into current PCD database
633 //
634 if ((Index < Length) && (SkuDelta != NULL)) {
635 SkuDeltaData = (PCD_DATA_DELTA *)(SkuDelta + 1);
636 while ((UINT8 *)SkuDeltaData < (UINT8 *)SkuDelta + SkuDelta->Length) {
637 *((UINT8 *)PeiPcdDb + SkuDeltaData->Offset) = (UINT8)SkuDeltaData->Value;
638 SkuDeltaData++;
639 }
640
641 PeiPcdDb->SystemSkuId = (SKU_ID)SkuId;
642 DEBUG ((DEBUG_INFO, "PcdPei - Set current SKU Id to 0x%lx.\n", (SKU_ID)SkuId));
643 return;
644 }
645 }
646
647 //
648 // Invalid input SkuId, the default SKU Id will be still used for the system.
649 //
650 DEBUG ((DEBUG_ERROR, "PcdPei - Invalid input SkuId, the default SKU Id will be still used.\n"));
651
652 return;
653}
654
666UINT8
667EFIAPI
669 IN UINTN TokenNumber
670 )
671{
672 return *((UINT8 *)GetWorker (TokenNumber, sizeof (UINT8)));
673}
674
686UINT16
687EFIAPI
689 IN UINTN TokenNumber
690 )
691{
692 return ReadUnaligned16 (GetWorker (TokenNumber, sizeof (UINT16)));
693}
694
706UINT32
707EFIAPI
709 IN UINTN TokenNumber
710 )
711{
712 return ReadUnaligned32 (GetWorker (TokenNumber, sizeof (UINT32)));
713}
714
726UINT64
727EFIAPI
729 IN UINTN TokenNumber
730 )
731{
732 return ReadUnaligned64 (GetWorker (TokenNumber, sizeof (UINT64)));
733}
734
748VOID *
749EFIAPI
751 IN UINTN TokenNumber
752 )
753{
754 return GetWorker (TokenNumber, 0);
755}
756
770BOOLEAN
771EFIAPI
773 IN UINTN TokenNumber
774 )
775{
776 return *((BOOLEAN *)GetWorker (TokenNumber, sizeof (BOOLEAN)));
777}
778
790UINTN
791EFIAPI
793 IN UINTN TokenNumber
794 )
795{
796 PEI_PCD_DATABASE *PeiPcdDb;
797 UINTN Size;
798 UINTN MaxSize;
799 UINT32 LocalTokenCount;
800
801 PeiPcdDb = GetPcdDatabase ();
802 LocalTokenCount = PeiPcdDb->LocalTokenCount;
803 //
804 // TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
805 // We have to decrement TokenNumber by 1 to make it usable
806 // as the array index.
807 //
808 TokenNumber--;
809
810 // EBC compiler is very choosy. It may report warning about comparison
811 // between UINTN and 0 . So we add 1 in each size of the
812 // comparison.
813 ASSERT (TokenNumber + 1 < (LocalTokenCount + 1));
814
815 Size = (*((UINT32 *)((UINT8 *)PeiPcdDb + PeiPcdDb->LocalTokenNumberTableOffset) + TokenNumber) & PCD_DATUM_TYPE_ALL_SET) >> PCD_DATUM_TYPE_SHIFT;
816
817 if (Size == 0) {
818 //
819 // For pointer type, we need to scan the SIZE_TABLE to get the current size.
820 //
821 return GetPtrTypeSize (TokenNumber, &MaxSize, PeiPcdDb);
822 } else {
823 return Size;
824 }
825}
826
841UINT8
842EFIAPI
844 IN CONST EFI_GUID *Guid,
845 IN UINTN ExTokenNumber
846 )
847{
848 return *((UINT8 *)ExGetWorker (Guid, ExTokenNumber, sizeof (UINT8)));
849}
850
865UINT16
866EFIAPI
868 IN CONST EFI_GUID *Guid,
869 IN UINTN ExTokenNumber
870 )
871{
872 return ReadUnaligned16 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT16)));
873}
874
889UINT32
890EFIAPI
892 IN CONST EFI_GUID *Guid,
893 IN UINTN ExTokenNumber
894 )
895{
896 return ReadUnaligned32 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT32)));
897}
898
913UINT64
914EFIAPI
916 IN CONST EFI_GUID *Guid,
917 IN UINTN ExTokenNumber
918 )
919{
920 return ReadUnaligned64 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT64)));
921}
922
937VOID *
938EFIAPI
940 IN CONST EFI_GUID *Guid,
941 IN UINTN ExTokenNumber
942 )
943{
944 return ExGetWorker (Guid, ExTokenNumber, 0);
945}
946
961BOOLEAN
962EFIAPI
964 IN CONST EFI_GUID *Guid,
965 IN UINTN ExTokenNumber
966 )
967{
968 return *((BOOLEAN *)ExGetWorker (Guid, ExTokenNumber, sizeof (BOOLEAN)));
969}
970
983UINTN
984EFIAPI
986 IN CONST EFI_GUID *Guid,
987 IN UINTN ExTokenNumber
988 )
989{
990 return PeiPcdGetSize (GetExPcdTokenNumber (Guid, ExTokenNumber));
991}
992
1011EFIAPI
1013 IN UINTN TokenNumber,
1014 IN UINT8 Value
1015 )
1016{
1017 return SetValueWorker (TokenNumber, &Value, sizeof (Value));
1018}
1019
1038EFIAPI
1040 IN UINTN TokenNumber,
1041 IN UINT16 Value
1042 )
1043{
1044 return SetValueWorker (TokenNumber, &Value, sizeof (Value));
1045}
1046
1065EFIAPI
1067 IN UINTN TokenNumber,
1068 IN UINT32 Value
1069 )
1070{
1071 return SetValueWorker (TokenNumber, &Value, sizeof (Value));
1072}
1073
1092EFIAPI
1094 IN UINTN TokenNumber,
1095 IN UINT64 Value
1096 )
1097{
1098 return SetValueWorker (TokenNumber, &Value, sizeof (Value));
1099}
1100
1123EFIAPI
1125 IN UINTN TokenNumber,
1126 IN OUT UINTN *SizeOfBuffer,
1127 IN VOID *Buffer
1128 )
1129{
1130 return SetWorker (TokenNumber, Buffer, SizeOfBuffer, TRUE);
1131}
1132
1151EFIAPI
1153 IN UINTN TokenNumber,
1154 IN BOOLEAN Value
1155 )
1156{
1157 return SetValueWorker (TokenNumber, &Value, sizeof (Value));
1158}
1159
1179EFIAPI
1181 IN CONST EFI_GUID *Guid,
1182 IN UINTN ExTokenNumber,
1183 IN UINT8 Value
1184 )
1185{
1186 return ExSetValueWorker (ExTokenNumber, Guid, &Value, sizeof (Value));
1187}
1188
1208EFIAPI
1210 IN CONST EFI_GUID *Guid,
1211 IN UINTN ExTokenNumber,
1212 IN UINT16 Value
1213 )
1214{
1215 return ExSetValueWorker (ExTokenNumber, Guid, &Value, sizeof (Value));
1216}
1217
1237EFIAPI
1239 IN CONST EFI_GUID *Guid,
1240 IN UINTN ExTokenNumber,
1241 IN UINT32 Value
1242 )
1243{
1244 return ExSetValueWorker (ExTokenNumber, Guid, &Value, sizeof (Value));
1245}
1246
1266EFIAPI
1268 IN CONST EFI_GUID *Guid,
1269 IN UINTN ExTokenNumber,
1270 IN UINT64 Value
1271 )
1272{
1273 return ExSetValueWorker (ExTokenNumber, Guid, &Value, sizeof (Value));
1274}
1275
1299EFIAPI
1301 IN CONST EFI_GUID *Guid,
1302 IN UINTN ExTokenNumber,
1303 IN OUT UINTN *SizeOfBuffer,
1304 IN VOID *Value
1305 )
1306{
1307 return ExSetWorker (ExTokenNumber, Guid, Value, SizeOfBuffer, TRUE);
1308}
1309
1329EFIAPI
1331 IN CONST EFI_GUID *Guid,
1332 IN UINTN ExTokenNumber,
1333 IN BOOLEAN Value
1334 )
1335{
1336 return ExSetValueWorker (ExTokenNumber, Guid, &Value, sizeof (Value));
1337}
1338
1352EFIAPI
1354 IN CONST EFI_GUID *Guid OPTIONAL,
1355 IN UINTN ExTokenNumber,
1356 IN PCD_PPI_CALLBACK CallBackFunction
1357 )
1358{
1359 if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) {
1360 return EFI_UNSUPPORTED;
1361 }
1362
1363 if (CallBackFunction == NULL) {
1364 return EFI_INVALID_PARAMETER;
1365 }
1366
1367 return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, TRUE);
1368}
1369
1383EFIAPI
1385 IN CONST EFI_GUID *Guid OPTIONAL,
1386 IN UINTN ExTokenNumber,
1387 IN PCD_PPI_CALLBACK CallBackFunction
1388 )
1389{
1390 if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) {
1391 return EFI_UNSUPPORTED;
1392 }
1393
1394 if (CallBackFunction == NULL) {
1395 return EFI_INVALID_PARAMETER;
1396 }
1397
1398 return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, FALSE);
1399}
1400
1427EFIAPI
1429 IN CONST EFI_GUID *Guid OPTIONAL,
1430 IN OUT UINTN *TokenNumber
1431 )
1432{
1433 UINTN GuidTableIdx;
1434 PEI_PCD_DATABASE *PeiPcdDb;
1435 EFI_GUID *MatchGuid;
1436 EFI_GUID *GuidTable;
1437 DYNAMICEX_MAPPING *ExMapTable;
1438 UINTN Index;
1439 BOOLEAN Found;
1440 BOOLEAN PeiExMapTableEmpty;
1441 UINTN PeiNexTokenNumber;
1442
1443 if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) {
1444 return EFI_UNSUPPORTED;
1445 }
1446
1447 PeiPcdDb = GetPcdDatabase ();
1448 PeiNexTokenNumber = PeiPcdDb->LocalTokenCount - PeiPcdDb->ExTokenCount;
1449 GuidTable = (EFI_GUID *)((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset);
1450
1451 if (PeiPcdDb->ExTokenCount == 0) {
1452 PeiExMapTableEmpty = TRUE;
1453 } else {
1454 PeiExMapTableEmpty = FALSE;
1455 }
1456
1457 if (Guid == NULL) {
1458 if (*TokenNumber > PeiNexTokenNumber) {
1459 return EFI_NOT_FOUND;
1460 }
1461
1462 (*TokenNumber)++;
1463 if (*TokenNumber > PeiNexTokenNumber) {
1464 *TokenNumber = PCD_INVALID_TOKEN_NUMBER;
1465 return EFI_NOT_FOUND;
1466 }
1467
1468 return EFI_SUCCESS;
1469 } else {
1470 if (PeiExMapTableEmpty) {
1471 return EFI_NOT_FOUND;
1472 }
1473
1474 MatchGuid = ScanGuid (GuidTable, PeiPcdDb->GuidTableCount * sizeof (EFI_GUID), Guid);
1475
1476 if (MatchGuid == NULL) {
1477 return EFI_NOT_FOUND;
1478 }
1479
1480 GuidTableIdx = MatchGuid - GuidTable;
1481
1482 ExMapTable = (DYNAMICEX_MAPPING *)((UINT8 *)PeiPcdDb + PeiPcdDb->ExMapTableOffset);
1483
1484 Found = FALSE;
1485 //
1486 // Locate the GUID in ExMapTable first.
1487 //
1488 for (Index = 0; Index < PeiPcdDb->ExTokenCount; Index++) {
1489 if (ExMapTable[Index].ExGuidIndex == GuidTableIdx) {
1490 Found = TRUE;
1491 break;
1492 }
1493 }
1494
1495 if (Found) {
1496 //
1497 // If given token number is PCD_INVALID_TOKEN_NUMBER, then return the first
1498 // token number in found token space.
1499 //
1500 if (*TokenNumber == PCD_INVALID_TOKEN_NUMBER) {
1501 *TokenNumber = ExMapTable[Index].ExTokenNumber;
1502 return EFI_SUCCESS;
1503 }
1504
1505 for ( ; Index < PeiPcdDb->ExTokenCount; Index++) {
1506 if ((ExMapTable[Index].ExTokenNumber == *TokenNumber) && (ExMapTable[Index].ExGuidIndex == GuidTableIdx)) {
1507 break;
1508 }
1509 }
1510
1511 while (Index < PeiPcdDb->ExTokenCount) {
1512 Index++;
1513 if (Index == PeiPcdDb->ExTokenCount) {
1514 //
1515 // Exceed the length of ExMap Table
1516 //
1517 *TokenNumber = PCD_INVALID_TOKEN_NUMBER;
1518 return EFI_NOT_FOUND;
1519 } else if (ExMapTable[Index].ExGuidIndex == GuidTableIdx) {
1520 //
1521 // Found the next match
1522 //
1523 *TokenNumber = ExMapTable[Index].ExTokenNumber;
1524 return EFI_SUCCESS;
1525 }
1526 }
1527 }
1528 }
1529
1530 return EFI_NOT_FOUND;
1531}
1532
1550EFIAPI
1552 IN OUT CONST EFI_GUID **Guid
1553 )
1554{
1555 UINTN GuidTableIdx;
1556 EFI_GUID *MatchGuid;
1557 PEI_PCD_DATABASE *PeiPcdDb;
1558 DYNAMICEX_MAPPING *ExMapTable;
1559 UINTN Index;
1560 UINTN Index2;
1561 BOOLEAN Found;
1562 BOOLEAN PeiExMapTableEmpty;
1563 EFI_GUID *GuidTable;
1564
1565 if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) {
1566 return EFI_UNSUPPORTED;
1567 }
1568
1569 ASSERT (Guid != NULL);
1570
1571 PeiPcdDb = GetPcdDatabase ();
1572
1573 if (PeiPcdDb->ExTokenCount == 0) {
1574 PeiExMapTableEmpty = TRUE;
1575 } else {
1576 PeiExMapTableEmpty = FALSE;
1577 }
1578
1579 if (PeiExMapTableEmpty) {
1580 return EFI_NOT_FOUND;
1581 }
1582
1583 ExMapTable = (DYNAMICEX_MAPPING *)((UINT8 *)PeiPcdDb + PeiPcdDb->ExMapTableOffset);
1584 GuidTable = (EFI_GUID *)((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset);
1585
1586 if (*Guid == NULL) {
1587 //
1588 // return the first Token Space Guid.
1589 //
1590 *Guid = GuidTable + ExMapTable[0].ExGuidIndex;
1591 return EFI_SUCCESS;
1592 }
1593
1594 MatchGuid = ScanGuid (GuidTable, PeiPcdDb->GuidTableCount * sizeof (GuidTable[0]), *Guid);
1595
1596 if (MatchGuid == NULL) {
1597 return EFI_NOT_FOUND;
1598 }
1599
1600 GuidTableIdx = MatchGuid - GuidTable;
1601
1602 Found = FALSE;
1603 for (Index = 0; Index < PeiPcdDb->ExTokenCount; Index++) {
1604 if (ExMapTable[Index].ExGuidIndex == GuidTableIdx) {
1605 Found = TRUE;
1606 break;
1607 }
1608 }
1609
1610 if (Found) {
1611 Index++;
1612 for ( ; Index < PeiPcdDb->ExTokenCount; Index++ ) {
1613 if (ExMapTable[Index].ExGuidIndex != GuidTableIdx) {
1614 Found = FALSE;
1615 for (Index2 = 0; Index2 < Index; Index2++) {
1616 if (ExMapTable[Index2].ExGuidIndex == ExMapTable[Index].ExGuidIndex) {
1617 //
1618 // This token namespace should have been found and output at preceding getting.
1619 //
1620 Found = TRUE;
1621 break;
1622 }
1623 }
1624
1625 if (!Found) {
1626 *Guid = (EFI_GUID *)((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset) + ExMapTable[Index].ExGuidIndex;
1627 return EFI_SUCCESS;
1628 }
1629 }
1630 }
1631
1632 *Guid = NULL;
1633 }
1634
1635 return EFI_NOT_FOUND;
1636}
1637
1651UINTN
1653 IN UINTN LocalTokenNumberTableIdx,
1654 OUT UINTN *MaxSize,
1655 IN PEI_PCD_DATABASE *Database
1656 )
1657{
1658 INTN SizeTableIdx;
1659 UINTN LocalTokenNumber;
1660 SIZE_INFO *SizeTable;
1661
1662 SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, Database);
1663
1664 LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx);
1665
1666 ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER);
1667
1668 SizeTable = (SIZE_INFO *)((UINT8 *)Database + Database->SizeTableOffset);
1669
1670 *MaxSize = SizeTable[SizeTableIdx];
1671 //
1672 // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
1673 // PCD entry.
1674 //
1675 if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
1676 //
1677 // We have only two entry for VPD enabled PCD entry:
1678 // 1) MAX Size.
1679 // 2) Current Size
1680 // We consider current size is equal to MAX size.
1681 //
1682 return *MaxSize;
1683 } else {
1684 //
1685 // We have only two entry for Non-Sku enabled PCD entry:
1686 // 1) MAX SIZE
1687 // 2) Current Size
1688 //
1689 return SizeTable[SizeTableIdx + 1];
1690 }
1691}
1692
1707BOOLEAN
1709 IN UINTN LocalTokenNumberTableIdx,
1710 IN OUT UINTN *CurrentSize,
1711 IN PEI_PCD_DATABASE *Database
1712 )
1713{
1714 INTN SizeTableIdx;
1715 UINTN LocalTokenNumber;
1716 SIZE_INFO *SizeTable;
1717 UINTN MaxSize;
1718
1719 SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, Database);
1720
1721 LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx);
1722
1723 ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER);
1724
1725 SizeTable = (SIZE_INFO *)((UINT8 *)Database + Database->SizeTableOffset);
1726
1727 MaxSize = SizeTable[SizeTableIdx];
1728 //
1729 // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
1730 // PCD entry.
1731 //
1732 if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
1733 //
1734 // We shouldn't come here as we don't support SET for VPD
1735 //
1736 ASSERT (FALSE);
1737 return FALSE;
1738 } else {
1739 if ((*CurrentSize > MaxSize) ||
1740 (*CurrentSize == MAX_ADDRESS))
1741 {
1742 *CurrentSize = MaxSize;
1743 return FALSE;
1744 }
1745
1746 //
1747 // We have only two entry for Non-Sku enabled PCD entry:
1748 // 1) MAX SIZE
1749 // 2) Current Size
1750 //
1751 SizeTable[SizeTableIdx + 1] = (SIZE_INFO)*CurrentSize;
1752 return TRUE;
1753 }
1754}
UINT64 UINTN
INT64 INTN
#define MAX_ADDRESS
VOID *EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
Definition: HobLib.c:336
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
Definition: Unaligned.c:204
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
Definition: Unaligned.c:29
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
Definition: Unaligned.c:145
VOID *EFIAPI ScanGuid(IN CONST VOID *Buffer, IN UINTN Length, IN CONST GUID *Guid)
Definition: MemLibGuid.c:115
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
GET_PCD_INFO_PROTOCOL mGetPcdInfoInstance
Definition: Pcd.c:90
EFI_GET_PCD_INFO_PROTOCOL mEfiGetPcdInfoInstance
Definition: Pcd.c:100
EFI_STATUS EFIAPI PeiServicesFfsFindSectionData(IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
EFI_STATUS EFIAPI PeiServicesFfsFindNextVolume(IN UINTN Instance, IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
EFI_STATUS EFIAPI PeiServicesGetBootMode(OUT EFI_BOOT_MODE *BootMode)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
EFI_STATUS EFIAPI PeiServicesFfsFindFileByName(IN CONST EFI_GUID *FileName, IN CONST EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
EFI_STATUS EFIAPI PeiServicesNotifyPpi(IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
EFI_STATUS EFIAPI PeiServicesReInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
EFI_STATUS EFIAPI PeiServicesRegisterForShadow(IN EFI_PEI_FILE_HANDLE FileHandle)
EFI_STATUS ExSetValueWorker(IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN SetSize)
Definition: Service.c:1320
UINTN GetExPcdTokenNumber(IN CONST EFI_GUID *Guid, IN UINT32 ExTokenNumber)
Definition: Service.c:1585
VOID * GetWorker(IN UINTN TokenNumber, IN UINTN GetSize)
Definition: Service.c:366
UINTN GetSizeTableIndex(IN UINTN LocalTokenNumberTableIdx, IN BOOLEAN IsPeiDb)
Definition: Service.c:1651
VOID * ExGetWorker(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINTN GetSize)
Definition: Service.c:1299
EFI_STATUS ExSetWorker(IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, IN VOID *Data, IN OUT UINTN *SetSize, IN BOOLEAN PtrType)
Definition: Service.c:1349
UINTN GetPtrTypeSize(IN UINTN LocalTokenNumberTableIdx, OUT UINTN *MaxSize)
Definition: Service.c:1709
EFI_STATUS SetValueWorker(IN UINTN TokenNumber, IN VOID *Data, IN UINTN Size)
Definition: Service.c:1082
EFI_STATUS SetWorker(IN UINTN TokenNumber, IN VOID *Data, IN OUT UINTN *Size, IN BOOLEAN PtrType)
Definition: Service.c:1108
PEI_PCD_DATABASE * GetPcdDatabase(VOID)
Definition: Service.c:1020
EFI_STATUS PeiRegisterCallBackWorker(IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid OPTIONAL, IN PCD_PPI_CALLBACK CallBackFunction, IN BOOLEAN Register)
Definition: Service.c:302
PEI_PCD_DATABASE * BuildPcdDatabase(IN EFI_PEI_FILE_HANDLE FileHandle)
Definition: Service.c:422
EFI_STATUS PeiGetPcdInfo(IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo)
Definition: Service.c:231
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define PcdToken(TokenName)
Definition: PcdLib.h:36
#define FeaturePcdGet(TokenName)
Definition: PcdLib.h:50
EFI_STATUS EFIAPI PeiPcdSetPtr(IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN VOID *Buffer)
Definition: Pcd.c:1124
VOID EFIAPI PcdSetNvStoreDefaultIdCallBack(IN CONST EFI_GUID *CallBackGuid OPTIONAL, IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDataSize)
Definition: Pcd.c:140
EFI_STATUS EFIAPI PeiPcdGetNextTokenSpace(IN OUT CONST EFI_GUID **Guid)
Definition: Pcd.c:1551
VOID EFIAPI PeiPcdSetSku(IN UINTN SkuId)
Definition: Pcd.c:532
UINT64 EFIAPI PeiPcdGet64(IN UINTN TokenNumber)
Definition: Pcd.c:728
EFI_STATUS EFIAPI PeiPcdSet64Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINT64 Value)
Definition: Pcd.c:1267
EFI_STATUS EFIAPI PeiPcdSetBoolEx(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN BOOLEAN Value)
Definition: Pcd.c:1330
VOID *EFIAPI PeiPcdGetPtr(IN UINTN TokenNumber)
Definition: Pcd.c:750
UINT64 EFIAPI PeiPcdGet64Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:915
UINTN EFIAPI PeiPcdGetSizeEx(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:985
EFI_STATUS EFIAPI PeiPcdGetNextToken(IN CONST EFI_GUID *Guid OPTIONAL, IN OUT UINTN *TokenNumber)
Definition: Pcd.c:1428
VOID *EFIAPI PeiPcdGetPtrEx(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:939
BOOLEAN EFIAPI PeiPcdGetBoolEx(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:963
EFI_STATUS EFIAPI PeiPcdSetBool(IN UINTN TokenNumber, IN BOOLEAN Value)
Definition: Pcd.c:1152
UINT8 EFIAPI PeiPcdGet8(IN UINTN TokenNumber)
Definition: Pcd.c:668
EFI_STATUS EFIAPI PeiPcdSet8(IN UINTN TokenNumber, IN UINT8 Value)
Definition: Pcd.c:1012
EFI_STATUS EFIAPI PcdUnRegisterCallBackOnSet(IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN ExTokenNumber, IN PCD_PPI_CALLBACK CallBackFunction)
Definition: Pcd.c:1384
PCD_PPI mPcdPpiInstance
Definition: Pcd.c:16
UINT8 EFIAPI PeiPcdGet8Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:843
EFI_STATUS EFIAPI PeiPcdSet32(IN UINTN TokenNumber, IN UINT32 Value)
Definition: Pcd.c:1066
EFI_STATUS EFIAPI PeiPcdSet16(IN UINTN TokenNumber, IN UINT16 Value)
Definition: Pcd.c:1039
UINT16 EFIAPI PeiPcdGet16Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:867
EFI_STATUS EFIAPI PeiPcdSet32Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINT32 Value)
Definition: Pcd.c:1238
EFI_STATUS EFIAPI PeiPcdSetPtrEx(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN OUT UINTN *SizeOfBuffer, IN VOID *Value)
Definition: Pcd.c:1300
EFI_STATUS EFIAPI PeiPcdSet16Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINT16 Value)
Definition: Pcd.c:1209
EFI_PEI_PCD_PPI mEfiPcdPpiInstance
Definition: Pcd.c:59
BOOLEAN EFIAPI PeiPcdGetBool(IN UINTN TokenNumber)
Definition: Pcd.c:772
UINTN EFIAPI PeiPcdGetSize(IN UINTN TokenNumber)
Definition: Pcd.c:792
UINT32 EFIAPI PeiPcdGet32(IN UINTN TokenNumber)
Definition: Pcd.c:708
UINT16 EFIAPI PeiPcdGet16(IN UINTN TokenNumber)
Definition: Pcd.c:688
EFI_STATUS EFIAPI EndOfPeiSignalPpiNotifyCallback(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
Definition: Pcd.c:242
EFI_STATUS EFIAPI PeiPcdSet8Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINT8 Value)
Definition: Pcd.c:1180
EFI_STATUS EFIAPI PeiPcdSet64(IN UINTN TokenNumber, IN UINT64 Value)
Definition: Pcd.c:1093
EFI_STATUS EFIAPI PcdPeimInit(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
Definition: Pcd.c:342
UINT32 EFIAPI PeiPcdGet32Ex(IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber)
Definition: Pcd.c:891
UINTN EFIAPI PeiGetPcdInfoGetSku(VOID)
Definition: Pcd.c:502
EFI_STATUS EFIAPI PeiRegisterCallBackOnSet(IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN ExTokenNumber, IN PCD_PPI_CALLBACK CallBackFunction)
Definition: Pcd.c:1353
EFI_STATUS EFIAPI PeiGetPcdInfoGetInfoEx(IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo)
Definition: Pcd.c:484
EFI_STATUS EFIAPI PeiGetPcdInfoGetInfo(IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo)
Definition: Pcd.c:460
BOOLEAN SetPtrTypeSize(IN UINTN LocalTokenNumberTableIdx, IN OUT UINTN *CurrentSize, IN PEI_PCD_DATABASE *Database)
Definition: Pcd.c:1708
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
VOID * EFI_PEI_FV_HANDLE
Definition: PiPeiCis.h:21
VOID(EFIAPI * PCD_PPI_CALLBACK)(IN CONST EFI_GUID *CallBackGuid OPTIONAL, IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDataSize)
Definition: Pcd.h:649
EFI_STATUS(EFIAPI * EFI_PEI_PCD_PPI_CANCEL_CALLBACK)(IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction)
Definition: PiPcd.h:357
EFI_STATUS(EFIAPI * EFI_PEI_PCD_PPI_CALLBACK_ON_SET)(IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction)
Definition: PiPcd.h:335
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
Definition: Base.h:213
Definition: Pcd.h:753