From: guo.guo@intel.com
To: devel@edk2.groups.io
Cc: Gua Guo <gua.guo@intel.com>
Subject: [PATCH] MdeModulePkg/PCD: Pcd initialize DXE have assert
Date: Fri, 6 May 2022 05:29:51 +0800 [thread overview]
Message-ID: <1ee1661a007ada580eb29579198e5f4b4c074b1b.1651786183.git.gua.guo@intel.com> (raw)
From: Gua Guo <gua.guo@intel.com>
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: Gua Guo <gua.guo@intel.com>
---
MdeModulePkg/Universal/PCD/Dxe/Service.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index 3965846b93..5ade8d988b 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -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)) {
--
2.31.1.windows.1
next reply other threads:[~2022-05-05 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 21:29 guo.guo [this message]
2022-05-08 14:43 ` 回复: [edk2-devel] [PATCH] MdeModulePkg/PCD: Pcd initialize DXE have assert gaoliming
2022-05-09 1:31 ` Guo, Gua
2022-05-09 14:32 ` 回复: " gaoliming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ee1661a007ada580eb29579198e5f4b4c074b1b.1651786183.git.gua.guo@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox