mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
f78c8bf2c6
commit
da0df6ca8f
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue