Re: [edk2] [Patch] FDF spec: Add the syntax to describe structure pcd usage
Reviewed-by: Yonghong Zhu 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 Subject: [Patch] FDF spec: Add the syntax to describe structure pcd usage Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu --- 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. ::= {} {} ::= (A-Z)(A-Z0-9_)* ::= "$(" ")" + ::= "." "." ::= "." ::= ::= +::= ::= "PCD(" ")" ::= {"0x"} {"0X"} (\x0 - \xFF) ::= "0x"} {"0X"} (\x0 - \x) 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. "Size" [] "ErasePolarity" {"0"} {"1"} + - ::= + ::= {} {} ::= "BlockSize" [] [ "NumBlocks" ] -::= "SET" +::= "SET" {} {} ::= {} {} {} {} {} {} {} ::= @@ -86,8 +86,8 @@ Conditional statements may be used anywhere within this section. ::= ".inf" [ ] ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"} ::= "CAPSULE" UiCapsuleName -::= - ::= +::= {} {} + ::= {} {} ::= "FV" ::= "FILE" ::= "DATA" 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_ed
[edk2] [Patch] FDF spec: Add the syntax to describe structure pcd usage
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu --- 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. ::= {} {} ::= (A-Z)(A-Z0-9_)* ::= "$(" ")" + ::= "." "." ::= "." ::= ::= +::= ::= "PCD(" ")" ::= {"0x"} {"0X"} (\x0 - \xFF) ::= "0x"} {"0X"} (\x0 - \x) 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. "Size" [] "ErasePolarity" {"0"} {"1"} + - ::= + ::= {} {} ::= "BlockSize" [] [ "NumBlocks" ] -::= "SET" +::= "SET" {} {} ::= {} {} {} {} {} {} {} ::= @@ -86,8 +86,8 @@ Conditional statements may be used anywhere within this section. ::= ".inf" [ ] ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"} ::= "CAPSULE" UiCapsuleName -::= - ::= +::= {} {} + ::= {} {} ::= "FV" ::= "FILE" ::= "DATA" 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. ::= ::= [ "BlockSize" ] [ "NumBlocks" ] - ::=