From: "Gao, Liming" <liming.gao@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: [RFC] Collect DynamicHii PCD value in Platform.dsc file as the default setting for EFI variable and EFI VarStore
Date: Fri, 23 Jun 2017 12:05:44 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D74E0C9@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D74816B@shsmsx102.ccr.corp.intel.com>
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
parent reply other threads:[~2017-06-23 12:04 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4A89E2EF3DFEDB4C8BFDE51014F606A14D74816B@shsmsx102.ccr.corp.intel.com>]
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=4A89E2EF3DFEDB4C8BFDE51014F606A14D74E0C9@shsmsx102.ccr.corp.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