From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael Kinney <michael.d.kinney@intel.com>,
Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting
Date: Fri, 16 Mar 2018 12:41:53 +0800 [thread overview]
Message-ID: <1521175314-6672-3-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1521175314-6672-1-git-send-email-liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
.../213_[defaultstores]_section_processing.md | 49 ++++++++++++
3_edk_ii_dsc_file_format/310_pcd_sections.md | 86 ++++++++++++++++++++--
.../313_[defaultstores]_section.md | 60 +++++++++++++++
3 files changed, 190 insertions(+), 5 deletions(-)
create mode 100644 2_dsc_overview/213_[defaultstores]_section_processing.md
create mode 100644 3_edk_ii_dsc_file_format/313_[defaultstores]_section.md
diff --git a/2_dsc_overview/213_[defaultstores]_section_processing.md b/2_dsc_overview/213_[defaultstores]_section_processing.md
new file mode 100644
index 0000000..88a7ad2
--- /dev/null
+++ b/2_dsc_overview/213_[defaultstores]_section_processing.md
@@ -0,0 +1,49 @@
+<!--- @file
+ 2.13 [DefaultStores] Section Processing
+
+ Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR>
+
+ Redistribution and use in source (original document form) and 'compiled'
+ forms (converted to PDF, epub, HTML and other formats) with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1) Redistributions of source code (original document form) must retain the
+ above copyright notice, this list of conditions and the following
+ disclaimer as the first lines of this file unmodified.
+
+ 2) Redistributions in compiled form (transformed to other DTDs, converted to
+ PDF, epub, HTML and other formats) must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL TIANOCORE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-->
+
+## 2.13 [DefaultStores] Section Processing
+
+The contents of this section are used to define DefaultStores names. Default
+store is UEFI HII concept. It is used to define HII default setting for the
+different store, such as standard default, manufacturing default. Platform
+can define the supported default store for DynamicHii/DynamicExHii PCD in this
+section, tag name to be used. This section is optional. By default, standard
+default will be used. Each entry below the section header is of the form:
+
+`Number | word`
+
+The following is an example of a `[DefaultStores]` section:
+
+```
+[DefaultStores]
+ 0 | Standard # UEFI Standard default
+ 1 | Manufacturing # UEFI Manufacturing default
+```
diff --git a/3_edk_ii_dsc_file_format/310_pcd_sections.md b/3_edk_ii_dsc_file_format/310_pcd_sections.md
index 18a243d..f79a0fd 100644
--- a/3_edk_ii_dsc_file_format/310_pcd_sections.md
+++ b/3_edk_ii_dsc_file_format/310_pcd_sections.md
@@ -1,7 +1,7 @@
<!--- @file
3.10 PCD Sections
- Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without
@@ -457,10 +457,12 @@ sections of the DSC file.
<PdvEntries> ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <VpdEntry>}
<PcdsHii> ::= "[PcdsDynamicHii" [<PdhAttribs>] "]" <EOL>
<PcdHiiEntries>*
-<PdhAttribs> ::= <attrs> ["," <TS> "PcdsDynamicHii <attrs>]* <PdvEntries>*
+<PdhAttribs> ::= <phattrs> ["," <TS> "PcdsDynamicHii <phattrs>]* <PdvEntries>*
<PcdHiiEntries> ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
<attrs> ::= "." <arch> ["." <SkuIds>]
+<phattrs> ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
<SkuIdS> ::= <Keyword> [<FS> <Keyword>]*
+<DefaultStore> ::= <Keyword>
<Keyword> ::= <UiName>
<UiName> ::= <Word>
<MinEntry> ::= <PcdName> [<FS> <PcdValue>] <EOL>
@@ -555,6 +557,42 @@ the `[Defines]` section. Use of the `SkuId` modifier for the `[PcdsDynamic*]`
section tag can be used as a conditional modifier or to groups sets of PCDs
according to the `SkuId` identifier.
+**_DefaultStore_**
+
+`DefaultStore` in the DSC file is used to specify DynamicHii/DynamicExHii PCD
+value as the default EFI variable for which default store. It is only valid in
+DynamicHii/DynamicExHii section. If it is not specified, DynamicHii/DynamicExHii
+PCD value will be used as the standard default EFI variable. For the different
+combination of SKU and DefaultStore, their inheritance is described as the below.
+
+SKU will inherit its parent SKU setting. DEFAULT SKU is the default parent SKU.
+DefaultStore is the subsection of SKU. It will first inherit from the same
+DefaultStore in its parent SKU, then inherit other DefaultStore in the same SKU.
+DefaultStore with the big default store ID will inherit the setting from one with
+the small default store ID. If there are more than one small default store ID,
+it will use the biggest one to be inherit. Here is the example. Four PcdsDynamicHii
+sections are defined.
+
+# Four PcdsDynamicHii section
+[PcdsDynamicHii.common.Default.Standard]
+[PcdsDynamicHii.common.Default.Manufacturing]
+[PcdsDynamicHii.common.Sku1.Standard]
+[PcdsDynamicHii.common.Sku1.Manufacturing]
+
+# DEFAULT Manufacturing setting based on two sections
+[PcdsDynamicHii.common.Default.Standard]
+[PcdsDynamicHii.common.Default.Manufacturing]
+
+# SKU1 Standard setting based on two sections
+[PcdsDynamicHii.common.Default.Standard]
+[PcdsDynamicHii.common.Sku1.Standard]
+
+# SKU1 Manufacturing setting based on four sections
+[PcdsDynamicHii.common.Default.Standard]
+[PcdsDynamicHii.common.Default.Manufacturing]
+[PcdsDynamicHii.common.Sku1.Standard]
+[PcdsDynamicHii.common.Sku1.Manufacturing]
+
**_PcdValues_**
PCD values are optional for `[PcdsDynamicDefault]` sections. The PCD values for
@@ -584,7 +622,7 @@ the _UEFI Specification_ for a description of these attributes.
gNoSuchTokenSpaceGuid.PcdOemBootOptionPath|0x2338|100|" " # VOID*
gNoSuchTokenSpaceGuid.PcdEnableFastBoot |0x239C|1 |FALSE # BOOLEAN
-[PcdsDynamicHii.IA32, PcdsDynamicHii.X64.Sku1]
+[PcdsDynamicHii.IA32, PcdsDynamicHii.X64.Sku1.Standard]
gEfiMyModulePkgTokenSpaceGuid.PcdChassisIntrution|0x0053 0x0065 0x0074 0x0075 0x0070|gSysConfigGuid|0x83|0x0
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|10 # Variable: L"Timeout"
```
@@ -633,11 +671,13 @@ sections of the DSC file.
{<TS> <VpdEntry>}
<PcdsExHii> ::= "[PcdsDynamicExHii" [<PdhAttribs>] "]" <EOL>
<PcdHiiEntries>*
-<PdhAttribs> ::= <attrs> ["," <TS> "PcdsDynamicExHii <attrs>]*
+<PdhAttribs> ::= <phattrs> ["," <TS> "PcdsDynamicExHii <phattrs>]*
<PdvEntries>*
<PcdHiiEntries> ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
<attrs> ::= "." <arch> ["." <SkuIds>]
+<phattrs> ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
<SkuIdS> ::= <Keyword> [<FS> <Keyword>]*
+<DefaultStore> ::= <Keyword>
<Keyword> ::= <UiName>
<UiName> ::= <Word>
<MinEntry> ::= <PcdName> [<FS> <PcdValue>] <EOL>
@@ -732,6 +772,42 @@ the `[Defines]` section. Use of the `SkuId` modifier for the `[PcdsDynamic*]`
section tag can be used as a conditional modifier or to groups sets of PCDs
according to the `SkuId` identifier.
+**_DefaultStore_**
+
+`DefaultStore` in the DSC file is used to specify DynamicHii/DynamicExHii PCD
+value as the default EFI variable for which default store. It is only valid in
+DynamicHii/DynamicExHii section. If it is not specified, DynamicHii/DynamicExHii
+PCD value will be used as the standard default EFI variable. For the different
+combination of SKU and DefaultStore, their inheritance is described as the below.
+
+SKU will inherit its parent SKU setting. DEFAULT SKU is the default parent SKU.
+DefaultStore is the subsection of SKU. It will first inherit from the same
+DefaultStore in its parent SKU, then inherit other DefaultStore in the same SKU.
+DefaultStore with the big default store ID will inherit the setting from one with
+the small default store ID. If there are more than one small default store ID,
+it will use the biggest one to be inherit. Here is the example. Four PcdsDynamicExHii
+sections are defined.
+
+# Four PcdsDynamicExHii section
+[PcdsDynamicExHii.common.Default.Standard]
+[PcdsDynamicExHii.common.Default.Manufacturing]
+[PcdsDynamicExHii.common.Sku1.Standard]
+[PcdsDynamicExHii.common.Sku1.Manufacturing]
+
+# DEFAULT Manufacturing setting based on two sections
+[PcdsDynamicExHii.common.Default.Standard]
+[PcdsDynamicExHii.common.Default.Manufacturing]
+
+# SKU1 Standard setting based on two sections
+[PcdsDynamicExHii.common.Default.Standard]
+[PcdsDynamicExHii.common.Sku1.Standard]
+
+# SKU1 Manufacturing setting based on four sections
+[PcdsDynamicExHii.common.Default.Standard]
+[PcdsDynamicExHii.common.Default.Manufacturing]
+[PcdsDynamicExHii.common.Sku1.Standard]
+[PcdsDynamicExHii.common.Sku1.Manufacturing]
+
**_PcdValues_**
PCD values are optional for `[PcdsDynamicExDefault]` sections. The PCD values
@@ -761,7 +837,7 @@ the _UEFI Specification_ for a description of these attributes.
gNoSuchTokenSpaceGuid.PcdOemBootOptionPath|0x2338|100|" " # VOID*
gNoSuchTokenSpaceGuid.PcdEnableFastBoot |0x239C|FALSE # BOOLEAN
-[PcdsDynamicExHii.IA32, PcdsDynamicExHii.X64.Sku1]
+[PcdsDynamicExHii.IA32, PcdsDynamicExHii.X64.Sku1.Standard]
gEfiMyModulePkgTokenSpaceGuid.PcdChassisIntrution|0x0053 0x0065 0x0074 0x0075 0x0070|gSysConfigGuid|0x83|0x0
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0 # Variable: L"Timeout"
```
diff --git a/3_edk_ii_dsc_file_format/313_[defaultstores]_section.md b/3_edk_ii_dsc_file_format/313_[defaultstores]_section.md
new file mode 100644
index 0000000..614ed01
--- /dev/null
+++ b/3_edk_ii_dsc_file_format/313_[defaultstores]_section.md
@@ -0,0 +1,60 @@
+<!--- @file
+ 3.13 [DefaultStores] Section
+
+ Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR>
+
+ Redistribution and use in source (original document form) and 'compiled'
+ forms (converted to PDF, epub, HTML and other formats) with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1) Redistributions of source code (original document form) must retain the
+ above copyright notice, this list of conditions and the following
+ disclaimer as the first lines of this file unmodified.
+
+ 2) Redistributions in compiled form (transformed to other DTDs, converted to
+ PDF, epub, HTML and other formats) must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL TIANOCORE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-->
+
+## 3.13 [DefaultStores] Section
+
+The `[DefaultStores]` section is optional in all EDK II DSC files.
+
+#### Summary
+
+Entries may appear in any order. This section lists numeric mappings to the
+Default Store User Interface Name, only valid values from this list can be
+specified in the PcdsDynamicHii/PcdsDynamicExHii section.
+
+If this section is not specified, the parsing tools will assume standard default
+be applied in PcdsDynamicHii/PcdsDynamicExHii section.
+
+#### Prototype
+
+```c
+<DefaultStore> ::= "[DefaultStores]" <EOL>
+ {<Statement>*}
+<Statement> ::= <TS> <Number> <FS> <UiName> <EOL>
+<UiName> ::= <Word>
+```
+
+#### Example
+
+```ini
+[DefaultStores]
+ 0 | Standard # UEFI Standard default
+ 1 | Manufacturing # UEFI Manufacturing default
+```
--
2.8.0.windows.1
next prev parent reply other threads:[~2018-03-16 4:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 4:41 [Patch 0/3] Update DscSpecification for structure PCD support Liming Gao
2018-03-16 4:41 ` [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID Liming Gao
2018-03-20 8:27 ` Zhu, Yonghong
2018-03-16 4:41 ` Liming Gao [this message]
2018-03-20 8:27 ` [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting Zhu, Yonghong
2018-03-16 4:41 ` [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax Liming Gao
2018-03-20 8:27 ` Zhu, Yonghong
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=1521175314-6672-3-git-send-email-liming.gao@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