* [Patch] FDF spec: Add the syntax to describe structure pcd usage
@ 2018-06-05 7:32 Liming Gao
2018-06-14 7:53 ` Zhu, Yonghong
0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2018-06-05 7:32 UTC (permalink / raw)
To: edk2-devel
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
2_fdf_design_discussion/21_processing_overview.md | 1 +
2_fdf_design_discussion/22_flash_description_file_format.md | 6 +++---
2_fdf_design_discussion/24_[fd]_sections.md | 5 +++--
3_edk_ii_fdf_file_format/32_fdf_definition.md | 2 ++
3_edk_ii_fdf_file_format/35_[fd]_sections.md | 8 ++++----
3_edk_ii_fdf_file_format/36_[fv]_sections.md | 2 +-
3_edk_ii_fdf_file_format/37_[capsule]_sections.md | 2 +-
7 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/2_fdf_design_discussion/21_processing_overview.md b/2_fdf_design_discussion/21_processing_overview.md
index 7a045dd..68d70f0 100644
--- a/2_fdf_design_discussion/21_processing_overview.md
+++ b/2_fdf_design_discussion/21_processing_overview.md
@@ -108,6 +108,7 @@ FDF file.
The PCDs used in the FDF file must be specified as:
`PcdTokenSpaceGuidCName.PcdCName`
+or `PcdTokenSpaceGuidCName.PcdCName.PcdFieldName`
### 2.1.2 Precedence of PCD Values
diff --git a/2_fdf_design_discussion/22_flash_description_file_format.md b/2_fdf_design_discussion/22_flash_description_file_format.md
index 368ce32..f266460 100644
--- a/2_fdf_design_discussion/22_flash_description_file_format.md
+++ b/2_fdf_design_discussion/22_flash_description_file_format.md
@@ -492,9 +492,9 @@ Unique PCDs are identified using the format to identify the named PCD:
`PcdTokenSpaceGuidCName.PcdCName`
-The PCD's Name (`PcdName`) is defined as PCD Token Space Guid C name and the
-PCD C name - separated by a period "." character. PCD C names are used in C
-code and must follow the C variable name rules.
+The PCD's Name (`PcdName`) is defined as PCD Token Space Guid C name, the
+PCD C name and the optional field name - separated by a period "." character.
+PCD C names are used in C code and must follow the C variable name rules.
A PCD's values are positional with in the FDF file, and may be set by either
the automatic setting grammar defined in this specification, or through `SET`
diff --git a/2_fdf_design_discussion/24_[fd]_sections.md b/2_fdf_design_discussion/24_[fd]_sections.md
index 04053a0..e532041 100644
--- a/2_fdf_design_discussion/24_[fd]_sections.md
+++ b/2_fdf_design_discussion/24_[fd]_sections.md
@@ -145,10 +145,11 @@ region, so the `SET` statement can occur anywhere within an FD section.
`SET PcdName = VALUE`
-Additionally, a PCD Name is made up of two parts, separated by a period "."
-character. The format for a `PcdName` is:
+Additionally, a PCD Name is made up of two parts or three parts, separated
+by a period "." character. The format for a `PcdName` is:
`PcdTokenSpaceGuidCName.PcdCName`
+or `PcdTokenSpaceGuidCName.PcdCName.PcdFieldName`
The following is an example of the `SET` statement:
diff --git a/3_edk_ii_fdf_file_format/32_fdf_definition.md b/3_edk_ii_fdf_file_format/32_fdf_definition.md
index 1379db4..6506a3d 100644
--- a/3_edk_ii_fdf_file_format/32_fdf_definition.md
+++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md
@@ -174,9 +174,11 @@ The following are common definitions used by multiple section types.
<BoolType> ::= {<TRUE>} {<FALSE>}
<MACRO> ::= (A-Z)(A-Z0-9_)*
<MACROVAL> ::= "$(" <MACRO> ")"
+<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
<PcdName> ::= <TokenSpaceGuidCName> "." <PcdCName>
<PcdCName> ::= <CName>
<TokenSpaceGuidCName> ::= <CName>
+<Field> ::= <CName>
<PCDVAL> ::= "PCD(" <PcdName> ")"
<UINT8> ::= {"0x"} {"0X"} (\x0 - \xFF)
<UINT16> ::= "0x"} {"0X"} (\x0 - \xFFFF)
diff --git a/3_edk_ii_fdf_file_format/35_[fd]_sections.md b/3_edk_ii_fdf_file_format/35_[fd]_sections.md
index 6c87ebd..f0003e7 100644
--- a/3_edk_ii_fdf_file_format/35_[fd]_sections.md
+++ b/3_edk_ii_fdf_file_format/35_[fd]_sections.md
@@ -62,11 +62,11 @@ Conditional statements may be used anywhere within this section.
<TS> "Size" <Eq> <UINT64> [<SetPcd>] <EOL>
<TS> "ErasePolarity" <Eq> {"0"} {"1"} <EOL>
<BlockStatements>+
-<SetPcd> ::= <FS> <PcdName>
+<SetPcd> ::= <FS> {<PcdName>} {<PcdFieldName>}
<BlockStatements> ::= <TS> "BlockSize" <Eq> <UINT32> [<SetPcd>]
<EOL>
[<TS> "NumBlocks" <Eq> <UINT32> <EOL>]
-<SetStatements> ::= <TS> "SET" <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<RegionLayout> ::= <TS> <Offset> <FS> <Size> <EOL>
@@ -86,8 +86,8 @@ Conditional statements may be used anywhere within this section.
<InfFile> ::= <PATH> <Word> ".inf" [<FS> <RelocFlags>]
<RelocFlags> ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
<CapsuleRegion> ::= <TS> "CAPSULE" <Eq> UiCapsuleName <EOL>
-<PcdOffset> ::= <PcdName>
-<PcdSize> ::= <PcdName>
+<PcdOffset> ::= {<PcdName>} {<PcdFieldName>}
+<PcdSize> ::= {<PcdName>} {<PcdFieldName>}
<FvType> ::= <TS> "FV" <Eq> <FvNameOrFilename> <EOL>
<FileType> ::= <TS> "FILE" <Eq> <BinaryFile> <EOL>
<DataType> ::= <TS> "DATA" <Eq>
diff --git a/3_edk_ii_fdf_file_format/36_[fv]_sections.md b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
index b4f292a..633b4a7 100644
--- a/3_edk_ii_fdf_file_format/36_[fv]_sections.md
+++ b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
@@ -86,7 +86,7 @@ Conditional statements may be used anywhere within this section.
<BlockStatements> ::= <FixedBlocks>
<FixedBlocks> ::= [<TS> "BlockSize" <Eq> <UINT32> <EOL>]
[<TS> "NumBlocks" <Eq> <UINT32> <EOL>]
-<SetStatements> ::= <TS> "SET" <MTS> <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<FvAlignment> ::= [<TS> "FvBaseAddress" <Eq> <UINT64> <EOL>]
diff --git a/3_edk_ii_fdf_file_format/37_[capsule]_sections.md b/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
index 6606d56..fe8721c 100644
--- a/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
+++ b/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
@@ -49,7 +49,7 @@ Conditional statements may be used anywhere within this section.
<UefiTokens>
<CapsuleStmts>*
<UiCapsuleName> ::= "." <Word>
-<SetStatements> ::= <TS> "SET" <MTS> <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<UefiTokens> ::= <TS> "CAPSULE_GUID" <Eq> <GuidValue> <EOL>
--
2.8.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] FDF spec: Add the syntax to describe structure pcd usage
2018-06-05 7:32 [Patch] FDF spec: Add the syntax to describe structure pcd usage Liming Gao
@ 2018-06-14 7:53 ` Zhu, Yonghong
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2018-06-14 7:53 UTC (permalink / raw)
To: Gao, Liming, edk2-devel@lists.01.org
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: Gao, Liming
Sent: Tuesday, June 05, 2018 3:33 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch] FDF spec: Add the syntax to describe structure pcd usage
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
2_fdf_design_discussion/21_processing_overview.md | 1 +
2_fdf_design_discussion/22_flash_description_file_format.md | 6 +++---
2_fdf_design_discussion/24_[fd]_sections.md | 5 +++--
3_edk_ii_fdf_file_format/32_fdf_definition.md | 2 ++
3_edk_ii_fdf_file_format/35_[fd]_sections.md | 8 ++++----
3_edk_ii_fdf_file_format/36_[fv]_sections.md | 2 +-
3_edk_ii_fdf_file_format/37_[capsule]_sections.md | 2 +-
7 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/2_fdf_design_discussion/21_processing_overview.md b/2_fdf_design_discussion/21_processing_overview.md
index 7a045dd..68d70f0 100644
--- a/2_fdf_design_discussion/21_processing_overview.md
+++ b/2_fdf_design_discussion/21_processing_overview.md
@@ -108,6 +108,7 @@ FDF file.
The PCDs used in the FDF file must be specified as:
`PcdTokenSpaceGuidCName.PcdCName`
+or `PcdTokenSpaceGuidCName.PcdCName.PcdFieldName`
### 2.1.2 Precedence of PCD Values
diff --git a/2_fdf_design_discussion/22_flash_description_file_format.md b/2_fdf_design_discussion/22_flash_description_file_format.md
index 368ce32..f266460 100644
--- a/2_fdf_design_discussion/22_flash_description_file_format.md
+++ b/2_fdf_design_discussion/22_flash_description_file_format.md
@@ -492,9 +492,9 @@ Unique PCDs are identified using the format to identify the named PCD:
`PcdTokenSpaceGuidCName.PcdCName`
-The PCD's Name (`PcdName`) is defined as PCD Token Space Guid C name and the -PCD C name - separated by a period "." character. PCD C names are used in C -code and must follow the C variable name rules.
+The PCD's Name (`PcdName`) is defined as PCD Token Space Guid C name,
+the PCD C name and the optional field name - separated by a period "." character.
+PCD C names are used in C code and must follow the C variable name rules.
A PCD's values are positional with in the FDF file, and may be set by either the automatic setting grammar defined in this specification, or through `SET` diff --git a/2_fdf_design_discussion/24_[fd]_sections.md b/2_fdf_design_discussion/24_[fd]_sections.md
index 04053a0..e532041 100644
--- a/2_fdf_design_discussion/24_[fd]_sections.md
+++ b/2_fdf_design_discussion/24_[fd]_sections.md
@@ -145,10 +145,11 @@ region, so the `SET` statement can occur anywhere within an FD section.
`SET PcdName = VALUE`
-Additionally, a PCD Name is made up of two parts, separated by a period "."
-character. The format for a `PcdName` is:
+Additionally, a PCD Name is made up of two parts or three parts,
+separated by a period "." character. The format for a `PcdName` is:
`PcdTokenSpaceGuidCName.PcdCName`
+or `PcdTokenSpaceGuidCName.PcdCName.PcdFieldName`
The following is an example of the `SET` statement:
diff --git a/3_edk_ii_fdf_file_format/32_fdf_definition.md b/3_edk_ii_fdf_file_format/32_fdf_definition.md
index 1379db4..6506a3d 100644
--- a/3_edk_ii_fdf_file_format/32_fdf_definition.md
+++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md
@@ -174,9 +174,11 @@ The following are common definitions used by multiple section types.
<BoolType> ::= {<TRUE>} {<FALSE>}
<MACRO> ::= (A-Z)(A-Z0-9_)*
<MACROVAL> ::= "$(" <MACRO> ")"
+<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
<PcdName> ::= <TokenSpaceGuidCName> "." <PcdCName>
<PcdCName> ::= <CName>
<TokenSpaceGuidCName> ::= <CName>
+<Field> ::= <CName>
<PCDVAL> ::= "PCD(" <PcdName> ")"
<UINT8> ::= {"0x"} {"0X"} (\x0 - \xFF)
<UINT16> ::= "0x"} {"0X"} (\x0 - \xFFFF)
diff --git a/3_edk_ii_fdf_file_format/35_[fd]_sections.md b/3_edk_ii_fdf_file_format/35_[fd]_sections.md
index 6c87ebd..f0003e7 100644
--- a/3_edk_ii_fdf_file_format/35_[fd]_sections.md
+++ b/3_edk_ii_fdf_file_format/35_[fd]_sections.md
@@ -62,11 +62,11 @@ Conditional statements may be used anywhere within this section.
<TS> "Size" <Eq> <UINT64> [<SetPcd>] <EOL>
<TS> "ErasePolarity" <Eq> {"0"} {"1"} <EOL>
<BlockStatements>+
-<SetPcd> ::= <FS> <PcdName>
+<SetPcd> ::= <FS> {<PcdName>} {<PcdFieldName>}
<BlockStatements> ::= <TS> "BlockSize" <Eq> <UINT32> [<SetPcd>]
<EOL>
[<TS> "NumBlocks" <Eq> <UINT32> <EOL>]
-<SetStatements> ::= <TS> "SET" <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<RegionLayout> ::= <TS> <Offset> <FS> <Size> <EOL>
@@ -86,8 +86,8 @@ Conditional statements may be used anywhere within this section.
<InfFile> ::= <PATH> <Word> ".inf" [<FS> <RelocFlags>]
<RelocFlags> ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
<CapsuleRegion> ::= <TS> "CAPSULE" <Eq> UiCapsuleName <EOL>
-<PcdOffset> ::= <PcdName>
-<PcdSize> ::= <PcdName>
+<PcdOffset> ::= {<PcdName>} {<PcdFieldName>}
+<PcdSize> ::= {<PcdName>} {<PcdFieldName>}
<FvType> ::= <TS> "FV" <Eq> <FvNameOrFilename> <EOL>
<FileType> ::= <TS> "FILE" <Eq> <BinaryFile> <EOL>
<DataType> ::= <TS> "DATA" <Eq>
diff --git a/3_edk_ii_fdf_file_format/36_[fv]_sections.md b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
index b4f292a..633b4a7 100644
--- a/3_edk_ii_fdf_file_format/36_[fv]_sections.md
+++ b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
@@ -86,7 +86,7 @@ Conditional statements may be used anywhere within this section.
<BlockStatements> ::= <FixedBlocks>
<FixedBlocks> ::= [<TS> "BlockSize" <Eq> <UINT32> <EOL>]
[<TS> "NumBlocks" <Eq> <UINT32> <EOL>]
-<SetStatements> ::= <TS> "SET" <MTS> <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<FvAlignment> ::= [<TS> "FvBaseAddress" <Eq> <UINT64> <EOL>]
diff --git a/3_edk_ii_fdf_file_format/37_[capsule]_sections.md b/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
index 6606d56..fe8721c 100644
--- a/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
+++ b/3_edk_ii_fdf_file_format/37_[capsule]_sections.md
@@ -49,7 +49,7 @@ Conditional statements may be used anywhere within this section.
<UefiTokens>
<CapsuleStmts>*
<UiCapsuleName> ::= "." <Word>
-<SetStatements> ::= <TS> "SET" <MTS> <PcdName> <Eq> <VALUE> <EOL>
+<SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
<VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
{<CString>} {<UnicodeString>} {<Expression>}
<UefiTokens> ::= <TS> "CAPSULE_GUID" <Eq> <GuidValue> <EOL>
--
2.8.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-14 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 7:32 [Patch] FDF spec: Add the syntax to describe structure pcd usage Liming Gao
2018-06-14 7:53 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox