public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/3] Update DscSpecification for structure PCD support
@ 2018-03-16  4:41 Liming Gao
  2018-03-16  4:41 ` [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID Liming Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Liming Gao @ 2018-03-16  4:41 UTC (permalink / raw)
  To: edk2-devel

Liming Gao (3):
  DSCSpecification: Add syntax to support SKU ID inherit from another
    SKU ID
  DscSpecification: Add DefaultStores section to describe the default
    setting
  DscSpecification: Add structure PCD field value assignment syntax

 .../213_[defaultstores]_section_processing.md      |  49 ++++++++++
 2_dsc_overview/25_[skuids]_section_processing.md   |  11 ++-
 2_dsc_overview/28_pcd_section_processing.md        |  10 +-
 3_edk_ii_dsc_file_format/310_pcd_sections.md       | 105 ++++++++++++++++++---
 .../313_[defaultstores]_section.md                 |  60 ++++++++++++
 .../33_platform_dsc_definition.md                  |   6 +-
 3_edk_ii_dsc_file_format/37_[skuids]_section.md    |  10 +-
 7 files changed, 225 insertions(+), 26 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

-- 
2.8.0.windows.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID
  2018-03-16  4:41 [Patch 0/3] Update DscSpecification for structure PCD support Liming Gao
@ 2018-03-16  4:41 ` Liming Gao
  2018-03-20  8:27   ` Zhu, Yonghong
  2018-03-16  4:41 ` [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting Liming Gao
  2018-03-16  4:41 ` [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax Liming Gao
  2 siblings, 1 reply; 7+ messages in thread
From: Liming Gao @ 2018-03-16  4:41 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael Kinney, Yonghong Zhu

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>
---
 2_dsc_overview/25_[skuids]_section_processing.md | 11 +++++++----
 3_edk_ii_dsc_file_format/37_[skuids]_section.md  | 10 ++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/25_[skuids]_section_processing.md b/2_dsc_overview/25_[skuids]_section_processing.md
index afd102e..70b98b1 100644
--- a/2_dsc_overview/25_[skuids]_section_processing.md
+++ b/2_dsc_overview/25_[skuids]_section_processing.md
@@ -34,16 +34,19 @@
 The contents of this section are used to define valid `SKUID_IDENTIFIER` names.
 Since a platform may support different SKUs, and different SKUs may implement
 different methods for handing platform configuration data (PCD) the user can
-define, in this section, tag names to use. Use `0` for the `DEFAULT` SKU
-identifier. Each entry below the section header is of the form:
+define, in this section, tag names to use. One SKU may override some settings 
+in another SKU setting, and inherit other setting from it. If not specified, 
+SKU will inherit DEFAULT SKU setting. Use `0` for the `DEFAULT` SKU identifier. 
+Each entry below the section header is of the form:
 
-`Number | word`
+`Number | word [|word]`
 
 The following is an example of a `[SkuIds]` section:
 
 ```
 [SkuIds]
+  0|DEFAULT
   1|Sku_Two
   22|Sku1
-  5|SkuSeven
+  5|SkuSeven | Sku1  #SkuSeven inherits Sku1 setting.
 ```
diff --git a/3_edk_ii_dsc_file_format/37_[skuids]_section.md b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
index 756ded2..8e70b33 100644
--- a/3_edk_ii_dsc_file_format/37_[skuids]_section.md
+++ b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
@@ -37,8 +37,9 @@ The `[SkuIds]` section is optional in all EDK II DSC files.
 
 Entries may appear in any order. This section lists numeric mappings to the SKU
 ID User Interface Name, only valid values from this list can be specified in
-the defines section. Use of the `!include` statement is supported; it is
-recommended that a ".txt" extension be used.
+the defines section. If one SKU inherits from none DEFAULT SKU, it can specify 
+its parent SKU User Name after its definition. Use of the `!include` statement 
+is supported; it is recommended that a ".txt" extension be used.
 
 If this section is not specified, the parsing tools will assume a SkuId of 0,
 with a `UiName` of "DEFAULT". The default entry must not be re-defined.
@@ -51,7 +52,7 @@ The `!include` file can only contain an ASCII (not Unicode) list of
 ```c
 <SkuId>     ::= "[SkuIds]" <EOL>
                 {<Statement>*} {<IncludeStatement>}
-<Statement> ::= <TS> <Number> <FS> <UiName> <EOL>
+<Statement> ::= <TS> <Number> <FS> <UiName> [<FS> <UiName>] <EOL>
 <UiName>    ::= <Word>
 ```
 
@@ -60,5 +61,6 @@ The `!include` file can only contain an ASCII (not Unicode) list of
 ```ini
 [SkuIds]
   0|DEFAULT # The entry: 0|DEFAULT is reserved and always required.
-  1|SkuTwo
+  1|SkuOne
+  2|SkuTwo|SkuOne # SkuTwo setting inherits from SkuOne
 ```
-- 
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting
  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-16  4:41 ` Liming Gao
  2018-03-20  8:27   ` Zhu, Yonghong
  2018-03-16  4:41 ` [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax Liming Gao
  2 siblings, 1 reply; 7+ messages in thread
From: Liming Gao @ 2018-03-16  4:41 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael Kinney, Yonghong Zhu

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax
  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-16  4:41 ` [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting Liming Gao
@ 2018-03-16  4:41 ` Liming Gao
  2018-03-20  8:27   ` Zhu, Yonghong
  2 siblings, 1 reply; 7+ messages in thread
From: Liming Gao @ 2018-03-16  4:41 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael Kinney, Yonghong Zhu

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>
---
 2_dsc_overview/28_pcd_section_processing.md           | 10 ++++++----
 3_edk_ii_dsc_file_format/310_pcd_sections.md          | 19 +++++++++++--------
 .../33_platform_dsc_definition.md                     |  6 +++++-
 3 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 1adde81..4c5d952 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -1,7 +1,7 @@
 <!--- @file
   2.8 PCD Section Processing
 
-  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
@@ -283,8 +283,9 @@ Unique PCDs are identified using the format to identify the named PCD:
 `TokenSpaceGuidCName.PcdCName`
 
 The content for a PCD in this section is the PCD's Name (PCD Token Space Guid
-C name, the PCD C name - separated by a period character,) and Default value.
-Field entries on a line are separated by the pipe "|" character.
+C name, the PCD C name and the optional field name - separated by a period 
+character) and Default value. Field entries on a line are separated by the 
+pipe "|" character.
 
 This specification prohibits setting different PCD access methods for a single
 PCD in different modules. The access methods here are `PcdsFixedAtBuild`,
@@ -373,7 +374,8 @@ prohibited in this type of platform description file.
 **Note:** PCD values within a section are positional, (last wins) if a PCD is
 listed more than one time within a section. List a PCD in one of the other
 access methods is allowed, provided a single access method must be used for all
-instances of the PCD.
+instances of the PCD. If PCD field value is listed, it will override PCD value 
+even if PCD value is after PCD field value.
 **********
 
 #### 2.8.3.9 Library Instances
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 f79a0fd..4eaa15c 100644
--- a/3_edk_ii_dsc_file_format/310_pcd_sections.md
+++ b/3_edk_ii_dsc_file_format/310_pcd_sections.md
@@ -107,6 +107,9 @@ value. If not provided, the maximum length will be calculated as the largest of
 the size of the data in the DSC file, the size of the data in the INF file or
 the size of the data in the DEC file that declares the PCD.
 
+PCDs with a C strucutre type is also a VOID* PCD. Its value can be specified like
+normal VOID* PCD, and also be specified by its structure field.
+
 Refer to the _EDK II Build Specification_ for the description of the PCD
 processing rules.
 
@@ -218,7 +221,7 @@ fields that are separated by the pipe character, "|".
 <SkuIdS>        ::= <Keyword> [<FS> <Keyword>]*
 <Keyword>       ::= <UiName>
 <UiName>        ::= <Word>
-<FabStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>}
+<FabStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>} {<PcdFieldEntry>}
 <PcdEntry>      ::= <TS> <PcdName> [<FS> <PcdValue>] <EOL>
 <PcdValue>      ::= if (pcddatumtype == "BOOLEAN"):
                       {<BoolType>} {<Expression>}
@@ -326,7 +329,7 @@ of the DSC file.
 <SkuIdS>        ::= <Keyword> [<FS> <Keyword>]*
 <Keyword>       ::= <UiName>
 <UiName>        ::= <Word>
-<PimStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>}
+<PimStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>} {<PcdFieldEntry>}
 <PcdEntry>      ::= <TS> <PcdName> [<FS> <PcdValue>] <EOL>
 <PcdValue>      ::= if (pcddatumtype == "BOOLEAN"):
                       {<BoolType>} {<Expression>}
@@ -449,16 +452,16 @@ sections of the DSC file.
 <PcdsDefault>    ::= "[PcdsDynamicDefault" [<PddAttribs>] "]" <EOL>
                      <PddEntries>*
 <PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>}
-                     {<TS> <MinEntry>}
+                     {<TS> <MinEntry>} {<TS> <PcdFieldEntry>}
 <PddAttribs>     ::= <attrs> ["," <TS> "PcdsDynamicDefault" <attrs>]*
 <PcdsVpd>        ::= "[PcdsDynamicVpd" [<PdvAttribs>] "]" <EOL>
                      <PdvEntries>*
 <PdvAttribs>     ::= <attrs> [ "," <TS> "PcdsDynamicVpd" <attrs>]*
-<PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <VpdEntry>}
+<PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <VpdEntry>} {<TS> <PcdFieldEntry>}
 <PcdsHii>        ::= "[PcdsDynamicHii" [<PdhAttribs>] "]" <EOL>
                      <PcdHiiEntries>*
 <PdhAttribs>     ::= <phattrs> ["," <TS> "PcdsDynamicHii <phattrs>]* <PdvEntries>*
-<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
+<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>} {<TS> <PcdFieldEntry>}
 <attrs>          ::= "." <arch> ["." <SkuIds>]
 <phattrs>        ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
 <SkuIdS>         ::= <Keyword> [<FS> <Keyword>]*
@@ -662,18 +665,18 @@ sections of the DSC file.
 <Pcds>           ::= {<PcdsExDefault>} {<PcdsExVpd>} {<PcdsExHii>}
 <PcdsExDefault>  ::= "[PcdsDynamicExDefault" [<PddAttribs>] "]" <EOL>
                      <PddEntries>*
-<PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <MinEntry>}
+<PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <MinEntry>} {<TS> <PcdFieldEntry>}
 <PddAttribs>     ::= <attrs> ["," <TS> "PcdsDynamicExDefault" <attrs>]*
 <PcdsExVpd>      ::= "[PcdsDynamicExVpd" [<PdvAttribs>] "]" <EOL>
                      <PdvEntries>*
 <PdvAttribs>     ::= <attrs> [ "," <TS> "PcdsDynamicExVpd" <attrs>]*
 <PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>}
-                     {<TS> <VpdEntry>}
+                     {<TS> <VpdEntry>} {<TS> <PcdFieldEntry>}
 <PcdsExHii>      ::= "[PcdsDynamicExHii" [<PdhAttribs>] "]" <EOL>
                      <PcdHiiEntries>*
 <PdhAttribs>     ::= <phattrs> ["," <TS> "PcdsDynamicExHii <phattrs>]*
                      <PdvEntries>*
-<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
+<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>} {<TS> <PcdFieldEntry>}
 <attrs>          ::= "." <arch> ["." <SkuIds>]
 <phattrs>        ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
 <SkuIdS>         ::= <Keyword> [<FS> <Keyword>]*
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 5b1c0d4..313fc20 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -1,7 +1,7 @@
 <!--- @file
   3.3 Platform DSC Definition
 
-  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
@@ -192,9 +192,13 @@ The following are common definitions used by multiple section types.
 <BoolType>             ::= {<BoolVal>} {"{"<BoolVal>"}"}
 <MACRO>                ::= (A-Z)(A-Z0-9_)*
 <MACROVAL>             ::= "$(" <MACRO> ")"
+<PcdFieldName>         ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
 <PcdName>              ::= <TokenSpaceGuidCName> "." <PcdCName>
 <PcdCName>             ::= <CName>
 <TokenSpaceGuidCName>  ::= <CName>
+<Field>                ::= <CName>
+<PcdFieldEntry>        ::= <PcdFieldName> <FS> <PcdFieldValue> <EOL>
+<PcdFieldValue>        ::= {<BoolType>} {<NumValUint8>} {<NumValUint16>} {<NumValUint32>} {<NumValUint64>} {<StringVal>} {<MACROVAL>} {<Expression>}
 <PCDVAL>               ::= "PCD(" <PcdName> ")"
 <UINT8>                ::= {"0x"} {"0X"} (\x0 - \xFF)
 <UINT16>               ::= {"0x"} {"0X"} (\x0 - \xFFFF)
-- 
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID
  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
  0 siblings, 0 replies; 7+ messages in thread
From: Zhu, Yonghong @ 2018-03-20  8:27 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Zhu, Yonghong

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Gao, Liming 
Sent: Friday, March 16, 2018 12:42 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID

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>
---
 2_dsc_overview/25_[skuids]_section_processing.md | 11 +++++++----  3_edk_ii_dsc_file_format/37_[skuids]_section.md  | 10 ++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/25_[skuids]_section_processing.md b/2_dsc_overview/25_[skuids]_section_processing.md
index afd102e..70b98b1 100644
--- a/2_dsc_overview/25_[skuids]_section_processing.md
+++ b/2_dsc_overview/25_[skuids]_section_processing.md
@@ -34,16 +34,19 @@
 The contents of this section are used to define valid `SKUID_IDENTIFIER` names.
 Since a platform may support different SKUs, and different SKUs may implement  different methods for handing platform configuration data (PCD) the user can -define, in this section, tag names to use. Use `0` for the `DEFAULT` SKU -identifier. Each entry below the section header is of the form:
+define, in this section, tag names to use. One SKU may override some 
+settings in another SKU setting, and inherit other setting from it. If 
+not specified, SKU will inherit DEFAULT SKU setting. Use `0` for the `DEFAULT` SKU identifier.
+Each entry below the section header is of the form:
 
-`Number | word`
+`Number | word [|word]`
 
 The following is an example of a `[SkuIds]` section:
 
 ```
 [SkuIds]
+  0|DEFAULT
   1|Sku_Two
   22|Sku1
-  5|SkuSeven
+  5|SkuSeven | Sku1  #SkuSeven inherits Sku1 setting.
 ```
diff --git a/3_edk_ii_dsc_file_format/37_[skuids]_section.md b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
index 756ded2..8e70b33 100644
--- a/3_edk_ii_dsc_file_format/37_[skuids]_section.md
+++ b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
@@ -37,8 +37,9 @@ The `[SkuIds]` section is optional in all EDK II DSC files.
 
 Entries may appear in any order. This section lists numeric mappings to the SKU  ID User Interface Name, only valid values from this list can be specified in -the defines section. Use of the `!include` statement is supported; it is -recommended that a ".txt" extension be used.
+the defines section. If one SKU inherits from none DEFAULT SKU, it can 
+specify its parent SKU User Name after its definition. Use of the 
+`!include` statement is supported; it is recommended that a ".txt" extension be used.
 
 If this section is not specified, the parsing tools will assume a SkuId of 0,  with a `UiName` of "DEFAULT". The default entry must not be re-defined.
@@ -51,7 +52,7 @@ The `!include` file can only contain an ASCII (not Unicode) list of  ```c
 <SkuId>     ::= "[SkuIds]" <EOL>
                 {<Statement>*} {<IncludeStatement>} -<Statement> ::= <TS> <Number> <FS> <UiName> <EOL>
+<Statement> ::= <TS> <Number> <FS> <UiName> [<FS> <UiName>] <EOL>
 <UiName>    ::= <Word>
 ```
 
@@ -60,5 +61,6 @@ The `!include` file can only contain an ASCII (not Unicode) list of  ```ini  [SkuIds]
   0|DEFAULT # The entry: 0|DEFAULT is reserved and always required.
-  1|SkuTwo
+  1|SkuOne
+  2|SkuTwo|SkuOne # SkuTwo setting inherits from SkuOne
 ```
--
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax
  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
  0 siblings, 0 replies; 7+ messages in thread
From: Zhu, Yonghong @ 2018-03-20  8:27 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Zhu, Yonghong

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Gao, Liming 
Sent: Friday, March 16, 2018 12:42 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax

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>
---
 2_dsc_overview/28_pcd_section_processing.md           | 10 ++++++----
 3_edk_ii_dsc_file_format/310_pcd_sections.md          | 19 +++++++++++--------
 .../33_platform_dsc_definition.md                     |  6 +++++-
 3 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 1adde81..4c5d952 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -1,7 +1,7 @@
 <!--- @file
   2.8 PCD Section Processing
 
-  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 @@ -283,8 +283,9 @@ Unique PCDs are identified using the format to identify the named PCD:
 `TokenSpaceGuidCName.PcdCName`
 
 The content for a PCD in this section is the PCD's Name (PCD Token Space Guid -C name, the PCD C name - separated by a period character,) and Default value.
-Field entries on a line are separated by the pipe "|" character.
+C name, the PCD C name and the optional field name - separated by a 
+period
+character) and Default value. Field entries on a line are separated by 
+the pipe "|" character.
 
 This specification prohibits setting different PCD access methods for a single  PCD in different modules. The access methods here are `PcdsFixedAtBuild`, @@ -373,7 +374,8 @@ prohibited in this type of platform description file.
 **Note:** PCD values within a section are positional, (last wins) if a PCD is  listed more than one time within a section. List a PCD in one of the other  access methods is allowed, provided a single access method must be used for all -instances of the PCD.
+instances of the PCD. If PCD field value is listed, it will override 
+PCD value even if PCD value is after PCD field value.
 **********
 
 #### 2.8.3.9 Library Instances
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 f79a0fd..4eaa15c 100644
--- a/3_edk_ii_dsc_file_format/310_pcd_sections.md
+++ b/3_edk_ii_dsc_file_format/310_pcd_sections.md
@@ -107,6 +107,9 @@ value. If not provided, the maximum length will be calculated as the largest of  the size of the data in the DSC file, the size of the data in the INF file or  the size of the data in the DEC file that declares the PCD.
 
+PCDs with a C strucutre type is also a VOID* PCD. Its value can be 
+specified like normal VOID* PCD, and also be specified by its structure field.
+
 Refer to the _EDK II Build Specification_ for the description of the PCD  processing rules.
 
@@ -218,7 +221,7 @@ fields that are separated by the pipe character, "|".
 <SkuIdS>        ::= <Keyword> [<FS> <Keyword>]*
 <Keyword>       ::= <UiName>
 <UiName>        ::= <Word>
-<FabStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>}
+<FabStatements> ::= {<MacroDefinition>} {<IncludeStatement>} 
+{<PcdEntry>} {<PcdFieldEntry>}
 <PcdEntry>      ::= <TS> <PcdName> [<FS> <PcdValue>] <EOL>
 <PcdValue>      ::= if (pcddatumtype == "BOOLEAN"):
                       {<BoolType>} {<Expression>} @@ -326,7 +329,7 @@ of the DSC file.
 <SkuIdS>        ::= <Keyword> [<FS> <Keyword>]*
 <Keyword>       ::= <UiName>
 <UiName>        ::= <Word>
-<PimStatements> ::= {<MacroDefinition>} {<IncludeStatement>} {<PcdEntry>}
+<PimStatements> ::= {<MacroDefinition>} {<IncludeStatement>} 
+{<PcdEntry>} {<PcdFieldEntry>}
 <PcdEntry>      ::= <TS> <PcdName> [<FS> <PcdValue>] <EOL>
 <PcdValue>      ::= if (pcddatumtype == "BOOLEAN"):
                       {<BoolType>} {<Expression>} @@ -449,16 +452,16 @@ sections of the DSC file.
 <PcdsDefault>    ::= "[PcdsDynamicDefault" [<PddAttribs>] "]" <EOL>
                      <PddEntries>*
 <PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>}
-                     {<TS> <MinEntry>}
+                     {<TS> <MinEntry>} {<TS> <PcdFieldEntry>}
 <PddAttribs>     ::= <attrs> ["," <TS> "PcdsDynamicDefault" <attrs>]*
 <PcdsVpd>        ::= "[PcdsDynamicVpd" [<PdvAttribs>] "]" <EOL>
                      <PdvEntries>*
 <PdvAttribs>     ::= <attrs> [ "," <TS> "PcdsDynamicVpd" <attrs>]*
-<PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <VpdEntry>}
+<PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <VpdEntry>} {<TS> <PcdFieldEntry>}
 <PcdsHii>        ::= "[PcdsDynamicHii" [<PdhAttribs>] "]" <EOL>
                      <PcdHiiEntries>*
 <PdhAttribs>     ::= <phattrs> ["," <TS> "PcdsDynamicHii <phattrs>]* <PdvEntries>*
-<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
+<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> 
+<HiiEntry>} {<TS> <PcdFieldEntry>}
 <attrs>          ::= "." <arch> ["." <SkuIds>]
 <phattrs>        ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
 <SkuIdS>         ::= <Keyword> [<FS> <Keyword>]*
@@ -662,18 +665,18 @@ sections of the DSC file.
 <Pcds>           ::= {<PcdsExDefault>} {<PcdsExVpd>} {<PcdsExHii>}
 <PcdsExDefault>  ::= "[PcdsDynamicExDefault" [<PddAttribs>] "]" <EOL>
                      <PddEntries>*
-<PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <MinEntry>}
+<PddEntries>     ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <MinEntry>} {<TS> <PcdFieldEntry>}
 <PddAttribs>     ::= <attrs> ["," <TS> "PcdsDynamicExDefault" <attrs>]*
 <PcdsExVpd>      ::= "[PcdsDynamicExVpd" [<PdvAttribs>] "]" <EOL>
                      <PdvEntries>*
 <PdvAttribs>     ::= <attrs> [ "," <TS> "PcdsDynamicExVpd" <attrs>]*
 <PdvEntries>     ::= {<MacroDefinition>} {<IncludeStatement>}
-                     {<TS> <VpdEntry>}
+                     {<TS> <VpdEntry>} {<TS> <PcdFieldEntry>}
 <PcdsExHii>      ::= "[PcdsDynamicExHii" [<PdhAttribs>] "]" <EOL>
                      <PcdHiiEntries>*
 <PdhAttribs>     ::= <phattrs> ["," <TS> "PcdsDynamicExHii <phattrs>]*
                      <PdvEntries>*
-<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> <HiiEntry>}
+<PcdHiiEntries>  ::= {<MacroDefinition>} {<IncludeStatement>} {<TS> 
+<HiiEntry>} {<TS> <PcdFieldEntry>}
 <attrs>          ::= "." <arch> ["." <SkuIds>]
 <phattrs>        ::= "." <arch> ["." <SkuIds>]["." <DefaultStore>]
 <SkuIdS>         ::= <Keyword> [<FS> <Keyword>]*
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 5b1c0d4..313fc20 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -1,7 +1,7 @@
 <!--- @file
   3.3 Platform DSC Definition
 
-  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 @@ -192,9 +192,13 @@ The following are common definitions used by multiple section types.
 <BoolType>             ::= {<BoolVal>} {"{"<BoolVal>"}"}
 <MACRO>                ::= (A-Z)(A-Z0-9_)*
 <MACROVAL>             ::= "$(" <MACRO> ")"
+<PcdFieldName>         ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
 <PcdName>              ::= <TokenSpaceGuidCName> "." <PcdCName>
 <PcdCName>             ::= <CName>
 <TokenSpaceGuidCName>  ::= <CName>
+<Field>                ::= <CName>
+<PcdFieldEntry>        ::= <PcdFieldName> <FS> <PcdFieldValue> <EOL>
+<PcdFieldValue>        ::= {<BoolType>} {<NumValUint8>} {<NumValUint16>} {<NumValUint32>} {<NumValUint64>} {<StringVal>} {<MACROVAL>} {<Expression>}
 <PCDVAL>               ::= "PCD(" <PcdName> ")"
 <UINT8>                ::= {"0x"} {"0X"} (\x0 - \xFF)
 <UINT16>               ::= {"0x"} {"0X"} (\x0 - \xFFFF)
--
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting
  2018-03-16  4:41 ` [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting Liming Gao
@ 2018-03-20  8:27   ` Zhu, Yonghong
  0 siblings, 0 replies; 7+ messages in thread
From: Zhu, Yonghong @ 2018-03-20  8:27 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Zhu, Yonghong

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Gao, Liming 
Sent: Friday, March 16, 2018 12:42 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-20  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Patch 2/3] DscSpecification: Add DefaultStores section to describe the default setting Liming Gao
2018-03-20  8:27   ` 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

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