Hi Ken, On 01/23/20 02:37, Ken Taylor wrote:
> If I try to get the size of a DynamicEx PCD in the context of a BIOS > build for which that PCD is undefined, the call locks up. I expected > to just get a size of 0, since the PCD is not defined in the build > context of the PCD DXE service. Is this a problem that's been fixed > since my BIOS source code was cut? What can I do for older builds > that haven't been fixed (and probably never will)? Do I have to just > accept that I'm going to get garbage or lockup if I run my shell > utility on some builds? Do I have to write a DXE driver and expose a > protocol, just so I can know if that PCD exists and is properly > defined? I think the ASSERT() that you run into is the one in GetExPcdTokenNumber(), file "MdeModulePkg/Universal/PCD/Dxe/Service.c": > MatchGuid = ScanGuid (GuidTable, mDxeGuidTableSize, Guid); > // > // We need to ASSERT here. If GUID can't be found in GuidTable, this is a > // error in the BUILD system. > // > ASSERT (MatchGuid != NULL); Can you try the following: - Locate EFI_PCD_PROTOCOL. - Call EFI_PCD_PROTOCOL.GetNextTokenSpace() in a loop, until you find the GUID of your own token space GUID, or the function returns an error. - If your token space GUID has been found, call PcdGetEx8(). Thanks, Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53436): https://edk2.groups.io/g/devel/message/53436 Mute This Topic: https://groups.io/mt/70044584/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-