summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-14 05:39:13 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-14 05:39:13 +0000
commiteaf539d00fbff0a116b72347338c4439bc8afb05 (patch)
tree8316825de9120199d938546f9a074c743996adcc /MdeModulePkg/Core/Pei
parentff1fcef8426337298b156f73abbbe57d98408627 (diff)
downloadedk2-eaf539d00fbff0a116b72347338c4439bc8afb05.zip
edk2-eaf539d00fbff0a116b72347338c4439bc8afb05.tar.gz
edk2-eaf539d00fbff0a116b72347338c4439bc8afb05.tar.bz2
Change MAX_PPI_DESCRIPTORS to FixedPcd PcdPeiCoreMaxPpiSupported, the default value is 64. Maybe other platform requires more than 64 Ppi and set this Pcd value.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5061 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.h4
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.inf1
-rw-r--r--MdeModulePkg/Core/Pei/Ppi/Ppi.c10
3 files changed, 7 insertions, 8 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index 74d70ac..ca48a51 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -67,15 +67,13 @@ typedef union {
VOID *Raw;
} PEI_PPI_LIST_POINTERS;
-#define MAX_PPI_DESCRIPTORS 64
-
typedef struct {
INTN PpiListEnd;
INTN NotifyListEnd;
INTN DispatchListEnd;
INTN LastDispatchedInstall;
INTN LastDispatchedNotify;
- PEI_PPI_LIST_POINTERS PpiListPtrs[MAX_PPI_DESCRIPTORS];
+ PEI_PPI_LIST_POINTERS PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];
} PEI_PPI_DATABASE;
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf
index e7b89a6..486ae1f 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.inf
+++ b/MdeModulePkg/Core/Pei/PeiMain.inf
@@ -85,6 +85,7 @@
[FixedPcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
+ gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeimDispatch
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiCoreEntry
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize
diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
index 1e40022..feae0fb 100644
--- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
+++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
@@ -46,9 +46,9 @@ Returns:
--*/
{
if (OldCoreData == NULL) {
- PrivateData->PpiData.NotifyListEnd = MAX_PPI_DESCRIPTORS-1;
- PrivateData->PpiData.DispatchListEnd = MAX_PPI_DESCRIPTORS-1;
- PrivateData->PpiData.LastDispatchedNotify = MAX_PPI_DESCRIPTORS-1;
+ PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
+ PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
+ PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
}
return;
@@ -87,7 +87,7 @@ Returns:
Fixup = (UINTN)NewHandOffHob - OldCheckingBottom;
- for (Index = 0; Index < MAX_PPI_DESCRIPTORS; Index++) {
+ for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
if (Index < PrivateData->PpiData.PpiListEnd ||
Index > PrivateData->PpiData.NotifyListEnd) {
PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];
@@ -564,7 +564,7 @@ Returns:
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
PrivateData->PpiData.LastDispatchedInstall,
PrivateData->PpiData.PpiListEnd,
- MAX_PPI_DESCRIPTORS-1,
+ FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
PrivateData->PpiData.DispatchListEnd
);
PrivateData->PpiData.LastDispatchedInstall = TempValue;