Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays.
Do some minor clean ups to INF files git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9868 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -75,7 +75,7 @@ DiscoverPeimsAndOrderWithApriori (
|
||||
//
|
||||
// Go ahead to scan this Fv, and cache FileHandles within it.
|
||||
//
|
||||
for (PeimCount = 0; PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv); PeimCount++) {
|
||||
for (PeimCount = 0; PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv); PeimCount++) {
|
||||
Status = FvPpi->FindFileByType (FvPpi, PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, CoreFileHandle->FvHandle, &FileHandle);
|
||||
if (Status != EFI_SUCCESS) {
|
||||
break;
|
||||
@@ -88,7 +88,7 @@ DiscoverPeimsAndOrderWithApriori (
|
||||
// Check whether the count of Peims exceeds the max support PEIMs in a FV image
|
||||
// If more Peims are required in a FV image, PcdPeiCoreMaxPeimPerFv can be set to a larger value in DSC file.
|
||||
//
|
||||
ASSERT (PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv));
|
||||
ASSERT (PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv));
|
||||
|
||||
//
|
||||
// Get Apriori File handle
|
||||
@@ -293,7 +293,7 @@ PeiDispatcher (
|
||||
SaveCurrentFileHandle = Private->CurrentFileHandle;
|
||||
|
||||
for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) {
|
||||
for (Index2 = 0; (Index2 < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
|
||||
for (Index2 = 0; (Index2 < PcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
|
||||
if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) {
|
||||
PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2];
|
||||
Status = PeiLoadImage (
|
||||
@@ -379,7 +379,7 @@ PeiDispatcher (
|
||||
// Start to dispatch all modules within the current Fv.
|
||||
//
|
||||
for (PeimCount = Private->CurrentPeimCount;
|
||||
(PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
|
||||
(PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
|
||||
PeimCount++) {
|
||||
Private->CurrentPeimCount = PeimCount;
|
||||
PeimFileHandle = Private->CurrentFileHandle = Private->CurrentFvFileHandles[PeimCount];
|
||||
|
@@ -368,8 +368,8 @@ FirmwareVolmeInfoPpiNotifyCallback (
|
||||
Status = EFI_SUCCESS;
|
||||
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
|
||||
|
||||
if (PrivateData->FvCount >= FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) {
|
||||
DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, FixedPcdGet32 (PcdPeiCoreMaxFvSupported)));
|
||||
if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {
|
||||
DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));
|
||||
DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
@@ -1417,7 +1417,7 @@ PeiReinitializeFv (
|
||||
//
|
||||
// Fixup all FvPpi pointers for the implementation in flash to permanent memory.
|
||||
//
|
||||
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxFvSupported); Index ++) {
|
||||
for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxFvSupported); Index ++) {
|
||||
if (PrivateData->Fv[Index].FvPpi == OldFfs2FvPpi) {
|
||||
PrivateData->Fv[Index].FvPpi = &mPeiFfs2FvPpi;
|
||||
}
|
||||
@@ -1452,7 +1452,7 @@ AddUnknownFormatFvInfo (
|
||||
{
|
||||
PEI_CORE_UNKNOW_FORMAT_FV_INFO *NewUnknownFv;
|
||||
|
||||
if (PrivateData->UnknownFvInfoCount + 1 >= FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) {
|
||||
if (PrivateData->UnknownFvInfoCount + 1 >= PcdGet32 (PcdPeiCoreMaxPeimPerFv)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
EFI PEI Core PPI services
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2010, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,9 +30,9 @@ InitializePpiServices (
|
||||
)
|
||||
{
|
||||
if (OldCoreData == NULL) {
|
||||
PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
PrivateData->PpiData.NotifyListEnd = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
PrivateData->PpiData.DispatchListEnd = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
PrivateData->PpiData.LastDispatchedNotify = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ ConvertPpiPointers (
|
||||
UINT8 Index;
|
||||
PEI_PPI_LIST_POINTERS *PpiPointer;
|
||||
|
||||
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
|
||||
for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
|
||||
if (Index < PrivateData->PpiData.PpiListEnd ||
|
||||
Index > PrivateData->PpiData.NotifyListEnd) {
|
||||
PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];
|
||||
@@ -254,7 +254,7 @@ PeiReInstallPpi (
|
||||
// Remove the old PPI from the database, add the new one.
|
||||
//
|
||||
DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));
|
||||
ASSERT (Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported));
|
||||
ASSERT (Index < (INTN)(PcdGet32 (PcdPeiCoreMaxPpiSupported)));
|
||||
PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi;
|
||||
|
||||
//
|
||||
@@ -512,7 +512,7 @@ ProcessNotifyList (
|
||||
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
|
||||
PrivateData->PpiData.LastDispatchedInstall,
|
||||
PrivateData->PpiData.PpiListEnd,
|
||||
FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
|
||||
PcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
|
||||
PrivateData->PpiData.DispatchListEnd
|
||||
);
|
||||
PrivateData->PpiData.LastDispatchedInstall = TempValue;
|
||||
|
Reference in New Issue
Block a user