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.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 C2D56211B15A6 for ; Mon, 7 Jan 2019 21:52:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2019 21:52:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,453,1539673200"; d="scan'208";a="309908694" Received: from lgao4-mobl1.ccr.corp.intel.com ([10.239.196.2]) by fmsmga005.fm.intel.com with ESMTP; 07 Jan 2019 21:52:02 -0800 From: Liming Gao To: edk2-devel@lists.01.org Date: Tue, 8 Jan 2019 13:37:00 +0800 Message-Id: <20190108053700.10464-1-liming.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [Patch v3] Dec Spec: Support the syntax of the structure array for structure PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 05:52:04 -0000 In V2, update array style to more than one dimension array. In V3, Update Pcd Field value assignment with array index. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1292 1. Support the syntax of the structure array for structure PCD 2. Add the syntax to initialize structure PCD with C style value Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Bob Feng --- 3_edk_ii_dec_file_format/310_pcd_sections.md | 2 +- .../32_package_declaration_dec_definitions.md | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/3_edk_ii_dec_file_format/310_pcd_sections.md b/3_edk_ii_dec_file_format/310_pcd_sections.md index 42beee9..2711788 100644 --- a/3_edk_ii_dec_file_format/310_pcd_sections.md +++ b/3_edk_ii_dec_file_format/310_pcd_sections.md @@ -125,7 +125,7 @@ PCDs listed in `PcdsFeatureFlag` sections must only be listed in ::= {} {} "UINT32" ::= ::= {} {} "UINT64" - ::= "{" + ::= {} {} "{" "}" ::= "" diff --git a/3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md b/3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md index a3120f3..dc18fb0 100644 --- a/3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md +++ b/3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md @@ -87,6 +87,7 @@ DEC file (for example, `` statements are not permitted). ::= (a-zA-Z_) ::= * ::= # A valid C variable name. + ::= ["["[]"]"]+ # A valid C variable array name. ::= (0x21 - 0x7E) ::= [{0x21} {(0x23 - 0x26)} {(0x28 - 0x5B)} {(0x5D - 0x7E)} {}]* @@ -166,7 +167,7 @@ DEC file (for example, `` statements are not permitted). ::= (A-Z)(A-Z0-9_)* ::= "$(" ")" ::= "." - ::= "." "." + ::= "." ["[""]"]* "." ::= ::= ::= @@ -208,7 +209,7 @@ DEC file (for example, `` statements are not permitted). ::= {} {} {} ::= "{" {} {[] [ [] ]* } "}" - ::= {} {} {} + ::= {} {} {} {} ::= {}{} {} {} {} ::= {} {} {} @@ -216,6 +217,7 @@ DEC file (for example, `` statements are not permitted). ::= {} {} {} ::= {} {} {} ::= "GUID(" ")" + ::= "CODE(" ")" ::= { } {} {} ::= "DEVICE_PATH(" ")" @@ -326,6 +328,11 @@ All C data arrays used in PCD value fields must be byte arrays. The C format GUID style is a special case that is permitted in some fields that use the `` nomenclature. +**_CData_** + +All C data used in PCD value CODE syntax can be C style value to initialize +C structure or Array in C source code. + **_EOL_** The DOS End Of Line: "0x0D 0x0A" character sequence must be used for all EDK II -- 2.13.0.windows.1