public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Gao, Liming" <liming.gao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [Patch 3/3] DscSpecification: Add structure PCD field value assignment syntax
Date: Tue, 20 Mar 2018 08:27:28 +0000	[thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D51FBA493@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1521175314-6672-4-git-send-email-liming.gao@intel.com>

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



      reply	other threads:[~2018-03-20  8:21 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 ` [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 message]

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=B9726D6DCCFB8B4CA276A9169B02216D51FBA493@SHSMSX103.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