#include <Library/BaseMemoryLib.h>\r
#include <Library/CacheMaintenanceLib.h>\r
#include <Library/TimerLib.h>\r
+#include <Library/PcdLib.h>\r
#include <IndustryStandard/PeImage.h>\r
#include <Library/PeiServicesTablePointerLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
} PEI_PPI_DATABASE;\r
\r
\r
-#define PEI_CORE_MAX_FV_SUPPORTED 4\r
-#define PEI_CORE_MAX_PEIM_PER_FV 32\r
-\r
//\r
// PEI_CORE_FV_HANDE.PeimState\r
// Do not change these values as there is code doing math to change states.\r
\r
typedef struct {\r
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;\r
- UINT8 PeimState[PEI_CORE_MAX_PEIM_PER_FV]; \r
- EFI_PEI_FILE_HANDLE FvFileHandles[PEI_CORE_MAX_PEIM_PER_FV];\r
+ UINT8 PeimState[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)]; \r
+ EFI_PEI_FILE_HANDLE FvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
BOOLEAN ScanFv;\r
} PEI_CORE_FV_HANDLE;\r
\r
EFI_PEI_SERVICES *PS; // Point to ServiceTableShadow\r
PEI_PPI_DATABASE PpiData;\r
UINTN FvCount;\r
- PEI_CORE_FV_HANDLE Fv[PEI_CORE_MAX_FV_SUPPORTED];\r
- EFI_PEI_FILE_HANDLE CurrentFvFileHandles[PEI_CORE_MAX_PEIM_PER_FV];\r
+ PEI_CORE_FV_HANDLE Fv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
+ EFI_PEI_FILE_HANDLE CurrentFvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
UINTN AprioriCount;\r
UINTN CurrentPeimFvCount; \r
UINTN CurrentPeimCount;\r
EFI_PEI_FILE_HANDLE CurrentFileHandle;\r
UINTN AllFvCount;\r
- EFI_PEI_FV_HANDLE AllFv[PEI_CORE_MAX_FV_SUPPORTED];\r
+ EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
EFI_PEI_HOB_POINTERS HobList;\r
BOOLEAN SwitchStackSignal;\r
BOOLEAN PeiMemoryInstalled;\r
\r
DependencyExpression - Pointer to a dependency expression. The Grammar adheres to\r
the BNF described above and is stored in postfix notation.\r
- Runnable - is True if the driver can be scheduled and False if the driver\r
- cannot be scheduled. This is the value that the schedulers\r
- should use for deciding the state of the driver.\r
\r
Returns:\r
\r
;\r
\r
\r
-EFI_STATUS\r
-FindNextPeim (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r
- IN OUT EFI_FFS_FILE_HEADER **PeimFileHeader\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Given the input file pointer, search for the next matching file in the\r
- FFS volume. The search starts from FileHeader inside\r
- the Firmware Volume defined by FwVolHeader.\r
-\r
-Arguments:\r
- PeiServices - Pointer to the PEI Core Services Table.\r
-\r
- FwVolHeader - Pointer to the FV header of the volume to search.\r
- This parameter must point to a valid FFS volume.\r
-\r
- PeimFileHeader - Pointer to the current file from which to begin searching.\r
- This pointer will be updated upon return to reflect the file found.\r
-\r
-Returns:\r
- EFI_NOT_FOUND - No files matching the search criteria were found\r
- EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
BOOLEAN\r
Dispatched (\r
IN UINT8 CurrentPeim,\r