public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC] Collect DynamicHii PCD value in Platform.dsc file as the default setting for EFI variable and EFI VarStore
       [not found] <4A89E2EF3DFEDB4C8BFDE51014F606A14D74816B@shsmsx102.ccr.corp.intel.com>
@ 2017-06-23 12:05 ` Gao, Liming
  0 siblings, 0 replies; only message in thread
From: Gao, Liming @ 2017-06-23 12:05 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Requirement:

In current working model, to change the default setting in HII VarStore, VFR source files have to be modified. There is no platform override way. This requirement is to move such configure setting to platform DSC, and provide the centralized setting in platform DSC. The idea is to use DynamicHii PCD setting in Platform DSC file as the EFI Variable and HII EFI VarStore default setting, because DynamicHii PCD has specified the relationship between PCD and EFI variable.



Dependency:

1)      [RFC] StructuredPcd Value assignment in DEC/DSC

2)      [RFC] VFR BIT and UNION extension in Varstore structure



Proposal with below 4 changes:

1.       Extend PcdsDynamicHii section in DSC file with DefaultStoreName. DefaultStore is UEFI HII Default ID. New [DefaultStores] section is introduced to list the map between DefaultStore name and DefaultId value. PcdsDynamicHii can specify the default settings for the different DefaultStore. If DefaultStoreName is not specified, the setting will target for Standard default. Default Store setting is specified for HII EFI VarStore. They will not be built into PCD data base except for  Standard default.


        Example in DSC file that PcdSetupConOutBuffer value will be used as SetupConsoleConfig variable and HII EFI varstore:
[DefaultStores]
  0 | Standard        # UEFI Standard default
  1 | Manufacturing   # UEFI Manufacturing default
[PcdsDynamicHii.common.DEFAULT]
[PcdsDynamicHii.common.DEFAULT.Standard]
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutBuffer|L"SetupConsoleConfig"|gEfiNt32PkgTokenSpaceGuid|0x0|{0xFF}|NV,BS
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutBuffer.Column|80
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutBuffer.Row|25


2.       Introduce new PCD VOID* PcdNvStoreDefaultValueBuffer to store the default setting in MdeModulePkg

a.       PcdNvStoreDefaultValueBuffer value is auto generated by build. BaseTools will collect PCD default settings in all PcdsDynamicHii section, and save them as the normal variable storage format, then assign it to PcdNvStoreDefaultValueBuffer.

b.      PcdNvStoreDefaultValueBuffer value will include the default setting for each SkuId and DefaultId. The default setting for SkuId 0 and Defaultd 0 is stored as the whole copy. Other default setting are stored as the delta compared to the full setting. This way can save its buffer size.

c.       PcdNvStoreDefaultValueBuffer must be configured as DynamicExVPD in platform DSC, and be placed into VPD region. Then, it can be kept as the read only data in BIOS image.



3.       Introduce new PCD UINT16 PcdSetNvStoreDefaultId to enable the default variable setting in MdeModulePkg

a.       PcdSetNvStoreDefaultId is configured as DynamicDefault. Its value is the default store ID value. The default value is zero as Standard default.

b.      Once PcdSetNvStoreDefaultId is set, PcdPeim will read the matched default setting from PcdNvStoreDefaultValueBuffer, and build the variable hob to store the default EFI variable settings with the normal variable storage format (gEfiVariableGuid).

c.       PlatformPei must SetSkuId() first, then set  PcdSetNvStoreDefaultId. Otherwise, the default variable setting may not be matched.

d.      If the matched VariableHob is found, Variable RuntimeDxe driver will consume VariableHob and write them into NV region. This logic is ready now. The enhancement is to support the variable hob with gEfiVariableGuid even if AuthVariable is used.


4.       Enhance HiiDataBaseDxe to consume PcdNvStoreDefaultValueBuffer to get the default setting and patch IFR default setting in the installed HII packages.

a.       The patched HII package lists will be applied when Reset to default is trigged in UI page after ReadyToBoot

b.      Report System Configuration table with the patched HII package lists at  ReadyToBoot

c.       ExportPackageLists() API reports the patched HII package lists based on current SkuId

Thanks
Liming


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-23 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4A89E2EF3DFEDB4C8BFDE51014F606A14D74816B@shsmsx102.ccr.corp.intel.com>
2017-06-23 12:05 ` [RFC] Collect DynamicHii PCD value in Platform.dsc file as the default setting for EFI variable and EFI VarStore Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox