Merge GetSizeTableIndexA to GetSizeTableIndex function because it only be invoked by GetSizeTableIndex.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7675 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2009-02-25 08:11:42 +00:00
parent 7c2228d2cb
commit 3d53ba8b45
1 changed files with 18 additions and 44 deletions

View File

@ -1128,33 +1128,36 @@ GetSkuIdArray (
}
/**
Get index of PCD entry in size table.
Wrapper function of getting index of PCD entry in size table.
@param LocalTokenNumberTableIdx Index of this PCD in local token number table.
@param LocalTokenNumberTable Pointer to local token number table in PCD database.
@param IsPeiDb If TRUE, the pcd entry is initialized in PEI phase,
If FALSE, the pcd entry is initialized in DXE phase.
@return index of PCD entry in size table.
**/
UINTN
GetSizeTableIndexA (
IN UINTN LocalTokenNumberTableIdx,
IN UINT32 *LocalTokenNumberTable,
IN BOOLEAN IsPeiDb
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
IN BOOLEAN IsPeiDb
)
{
UINTN Index;
UINTN SizeTableIdx;
UINTN LocalTokenNumber;
SKU_ID *SkuIdTable;
UINT32 *LocalTokenNumberTable;
UINTN LocalTokenNumber;
UINTN Index;
UINTN SizeTableIdx;
SKU_ID *SkuIdTable;
if (IsPeiDb) {
LocalTokenNumberTable = mPcdDatabase->PeiDb.Init.LocalTokenNumberTable;
} else {
LocalTokenNumberTable = mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
}
SizeTableIdx = 0;
for (Index=0; Index<LocalTokenNumberTableIdx; Index++) {
for (Index = 0; Index < LocalTokenNumberTableIdx; Index ++) {
LocalTokenNumber = LocalTokenNumberTable[Index];
if ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER) {
@ -1194,35 +1197,6 @@ GetSizeTableIndexA (
return SizeTableIdx;
}
/**
Wrapper function of getting index of PCD entry in size table.
@param LocalTokenNumberTableIdx Index of this PCD in local token number table.
@param IsPeiDb If TRUE, the pcd entry is initialized in PEI phase,
If FALSE, the pcd entry is initialized in DXE phase.
@return index of PCD entry in size table.
**/
UINTN
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
IN BOOLEAN IsPeiDb
)
{
UINT32 *LocalTokenNumberTable;
if (IsPeiDb) {
LocalTokenNumberTable = mPcdDatabase->PeiDb.Init.LocalTokenNumberTable;
} else {
LocalTokenNumberTable = mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
}
return GetSizeTableIndexA (LocalTokenNumberTableIdx,
LocalTokenNumberTable,
IsPeiDb);
}
/**
Get size of POINTER type PCD value.