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

Reply via email to