diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-25 08:11:42 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-25 08:11:42 +0000 |
commit | 3d53ba8b4506647f28adb2acb09923c539bf3ad3 (patch) | |
tree | e91ed225cc74e1625fa54341460680b3a61ab090 /MdeModulePkg/Universal | |
parent | 7c2228d2cbe543cf6f2a3fa8b2b0802d60aefcb7 (diff) | |
download | edk2-3d53ba8b4506647f28adb2acb09923c539bf3ad3.zip edk2-3d53ba8b4506647f28adb2acb09923c539bf3ad3.tar.gz edk2-3d53ba8b4506647f28adb2acb09923c539bf3ad3.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Service.c | 62 |
1 files changed, 18 insertions, 44 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 64bbe4c..9c497e9 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -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) {
@@ -1191,36 +1194,7 @@ 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);
+ return SizeTableIdx;
}
/**
|