Commit a658ed30 authored by Gua Guo's avatar Gua Guo Committed by mergify[bot]
Browse files

MdeModulePkg/PCD: Pcd initialize DXE have assert

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3917



When PlatformPkg.dsc has multiple SKU IDs but didn't exist delta PCD,
System will hang on BuildPcdDxeDataBase.

Ideally, if didn't exist delta PCD by different SKU ID,
UpdatePcdDatabase () shouldn't return EFI_NOT_FOUND.
Signed-off-by: default avatarGua Guo <gua.guo@intel.com>
Reviewed-by: default avatarLiming Gao <gaoliming@byosoft.com.cn>
parent 29ae55a0
......@@ -817,6 +817,11 @@ UpdatePcdDatabase (
//
Index = (mPcdDatabase.DxeDb->Length + 7) & (~7);
SkuDelta = NULL;
if (Index == mDxePcdDbSize) {
return EFI_SUCCESS;
}
while (Index < mDxePcdDbSize) {
SkuDelta = (PCD_DATABASE_SKU_DELTA *)((UINT8 *)mDxePcdDbBinary + Index);
if ((SkuDelta->SkuId == SkuId) && (SkuDelta->SkuIdCompared == 0)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment