MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctly

When DynamicEx PCD is only used in PEI code, but not DXE code,
current implementation of DxePcdGetNextTokenSpace does not assign
TmpTokenSpaceBufferCount correctly, but leaves it as initial value,
then DxePcdGetNextTokenSpace may return incorrect token space guid
and status.

This patch is to fix this issue.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit da0df6ca8f)
This commit is contained in:
Star Zeng
2017-05-18 16:34:37 +08:00
parent 2d18c3a917
commit 3ecfa5668f

View File

@@ -1296,6 +1296,7 @@ DxePcdGetNextTokenSpace (
(EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset) (EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset)
); );
CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize); CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
TmpTokenSpaceBufferCount = PeiTokenSpaceTableSize;
FreePool (PeiTokenSpaceTable); FreePool (PeiTokenSpaceTable);
} }