Laszlo, UefiCpuPkg/PiSmmCpuDxeSmm driver and UefiCpuPkg/Library/SmmCpuFeatuersLib have no such requirement on gEfiVariableArchProtocolGuid to access HII type PCD. In fact, our platform SmmCpuFeaturesLib instance (linked by PiSmmCpuDxeSmm) is trying to read HII type PCD.
The correct solution is to add gEfiVariableArchProtocolGuid dependency in platform SmmCpuFeaturesLib instance and this dependency will be inherited by PiSmmCpuDxeSmm driver. We will drop this patch #48 eventually. It has been reverted suggested by you! :-) Thanks your support on it. Jeff -----Original Message----- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Tuesday, August 30, 2016 9:46 PM To: Fan, Jeff; Zeng, Star; edk2-de...@ml01.01.org Cc: Kinney, Michael D; Justen, Jordan L; Tian, Feng Subject: Re: [edk2] [Patch v5 48/48] UefiCpuPkg/PiSmmCpuDxeSmm: Add gEfiVariableArchProtocolGuid dependency On 08/25/16 10:00, Fan, Jeff wrote: > Laszlo, > > After discussed with Star, I understood OVMF's circle dependency on Variable > Arch protocol and SMM CPU driver. > > I will defer to check-in this patch till found the better solution. Thank you! > Before the proper fix adopted, our platforms might not set the HII types > dynamic PCDs used by PiSmmCpuDxeSmm driver. If I understand correctly, such dynamic PCDs are stored in UEFI variables, which are in turn exposed via HII (forms). Based on "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf", point 2.3 (b). It seems to me that "Default Storage" vs. "Variable Storage" is only separated in the platform DSC file; the declaration for the dynamic PCDs in question should be identical in the package DEC file. So maybe PiSmmCpuDxeSmm should only read the new dynamic PCDs, and if those are expected to come from UEFI variables, then the platform could plug a NULL library instance into PiSmmCpuDxeSmm that "imbued" PiSmmCpuDxeSmm with a depex on gEfiVariableArchProtocolGuid. Alternatively, maybe SmmCpuPlatformHookLib could be extended with a new function (or functions) for querying these dynamic settings. OvmfPkg could provide a library instance that returned constant defaults (or even dynamic PCDs, but without variable access). And UefiCpuPkg could provide a library instance with variable-backed PCDs, plus the depex. Thanks! Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel