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
This commit is contained in:
lgao4 2008-04-14 05:39:13 +00:00
parent ff1fcef842
commit eaf539d00f
4 changed files with 8 additions and 8 deletions

View File

@ -67,15 +67,13 @@ typedef union {
VOID *Raw; VOID *Raw;
} PEI_PPI_LIST_POINTERS; } PEI_PPI_LIST_POINTERS;
#define MAX_PPI_DESCRIPTORS 64
typedef struct { typedef struct {
INTN PpiListEnd; INTN PpiListEnd;
INTN NotifyListEnd; INTN NotifyListEnd;
INTN DispatchListEnd; INTN DispatchListEnd;
INTN LastDispatchedInstall; INTN LastDispatchedInstall;
INTN LastDispatchedNotify; INTN LastDispatchedNotify;
PEI_PPI_LIST_POINTERS PpiListPtrs[MAX_PPI_DESCRIPTORS]; PEI_PPI_LIST_POINTERS PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];
} PEI_PPI_DATABASE; } PEI_PPI_DATABASE;

View File

@ -85,6 +85,7 @@
[FixedPcd.common] [FixedPcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeimDispatch gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeimDispatch
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiCoreEntry gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiCoreEntry
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize

View File

@ -46,9 +46,9 @@ Returns:
--*/ --*/
{ {
if (OldCoreData == NULL) { if (OldCoreData == NULL) {
PrivateData->PpiData.NotifyListEnd = MAX_PPI_DESCRIPTORS-1; PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
PrivateData->PpiData.DispatchListEnd = MAX_PPI_DESCRIPTORS-1; PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
PrivateData->PpiData.LastDispatchedNotify = MAX_PPI_DESCRIPTORS-1; PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
} }
return; return;
@ -87,7 +87,7 @@ Returns:
Fixup = (UINTN)NewHandOffHob - OldCheckingBottom; Fixup = (UINTN)NewHandOffHob - OldCheckingBottom;
for (Index = 0; Index < MAX_PPI_DESCRIPTORS; Index++) { for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
if (Index < PrivateData->PpiData.PpiListEnd || if (Index < PrivateData->PpiData.PpiListEnd ||
Index > PrivateData->PpiData.NotifyListEnd) { Index > PrivateData->PpiData.NotifyListEnd) {
PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index]; PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];
@ -564,7 +564,7 @@ Returns:
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
PrivateData->PpiData.LastDispatchedInstall, PrivateData->PpiData.LastDispatchedInstall,
PrivateData->PpiData.PpiListEnd, PrivateData->PpiData.PpiListEnd,
MAX_PPI_DESCRIPTORS-1, FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
PrivateData->PpiData.DispatchListEnd PrivateData->PpiData.DispatchListEnd
); );
PrivateData->PpiData.LastDispatchedInstall = TempValue; PrivateData->PpiData.LastDispatchedInstall = TempValue;

View File

@ -138,6 +138,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|6|UINT32|0x00010030 gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|6|UINT32|0x00010030
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32|UINT32|0x00010031 gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32|UINT32|0x00010031
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize|0x20000|UINT32|0x00010032 gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize|0x20000|UINT32|0x00010032
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported|64|UINT32|0x00010033
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400|UINT32|0x30000003 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400|UINT32|0x30000003