From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 79B462115C319 for ; Tue, 5 Jun 2018 00:32:39 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2018 00:32:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,478,1520924400"; d="scan'208";a="234456734" Received: from shwde7172.ccr.corp.intel.com ([10.239.158.42]) by fmsmga005.fm.intel.com with ESMTP; 05 Jun 2018 00:32:37 -0700 From: Liming Gao To: edk2-devel@lists.01.org Date: Tue, 5 Jun 2018 15:32:35 +0800 Message-Id: <1528183955-9128-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [Patch] FDF spec: Add the syntax to describe structure pcd usage X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 07:32:39 -0000 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 - \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. "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" ] - ::= "SET" + ::= "SET" {} {} ::= {} {} {} {} {} {} {} ::= [ "FvBaseAddress" ] 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. * ::= "." - ::= "SET" + ::= "SET" {} {} ::= {} {} {} {} {} {} {} ::= "CAPSULE_GUID" -- 2.8.0.windows.1