From nobody Fri Nov 1 10:40:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517414457552202.82853288062245; Wed, 31 Jan 2018 08:00:57 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B4CF42232BE16; Wed, 31 Jan 2018 07:55:19 -0800 (PST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 D65B9223648B2 for ; Wed, 31 Jan 2018 07:55:17 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 08:00:54 -0800 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga005.fm.intel.com with ESMTP; 31 Jan 2018 08:00:53 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="200132438" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Thu, 1 Feb 2018 00:00:45 +0800 Message-Id: <1517414448-4012-2-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 In-Reply-To: <1517414448-4012-1-git-send-email-yonghong.zhu@intel.com> References: <1517414448-4012-1-git-send-email-yonghong.zhu@intel.com> Subject: [edk2] [Patch] DEC spec: Add flexible PCD value format into spec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Kevin W Shaw , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 3_edk_ii_dec_file_format/310_pcd_sections.md | 14 ++--- .../32_package_declaration_dec_definitions.md | 70 +++++++++++++++++-= ---- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/3_edk_ii_dec_file_format/310_pcd_sections.md b/3_edk_ii_dec_fi= le_format/310_pcd_sections.md index 488f17f..36c32ff 100644 --- a/3_edk_ii_dec_file_format/310_pcd_sections.md +++ b/3_edk_ii_dec_file_format/310_pcd_sections.md @@ -113,24 +113,24 @@ PCDs listed in `PcdsFeatureFlag` sections must only b= e listed in [ ] [] ::=3D {} {} {} ::=3D {} {} {} {} ::=3D - ::=3D "BOOLEAN" + ::=3D "BOOLEAN" ::=3D {} {} ::=3D - ::=3D "UINT8" + ::=3D {} {} "UINT8" ::=3D - ::=3D "UINT16" + ::=3D {} {} "UINT16" ::=3D - ::=3D "UINT32" + ::=3D {} {} "UINT32" ::=3D - ::=3D "UINT64" + ::=3D {} {} "UINT64" ::=3D ::=3D "VOID*" - ::=3D {} {} - ::=3D + ::=3D {} {} + ::=3D {} {} ::=3D {+} {} {+} ::=3D "#" "@Prompt ::=3D "#" "@ValidRange" ::=3D [ ] ::=3D "#" "@ValidList" diff --git a/3_edk_ii_dec_file_format/32_package_declaration_dec_definition= s.md b/3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md index 8e473f2..d7f9067 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 @@ -86,15 +86,16 @@ DEC file (for example, `` statements are no= t permitted). ::=3D (0-9) ::=3D (a-zA-Z_) ::=3D * ::=3D # A valid C variable name. ::=3D (0x21 - 0x7E) - ::=3D [{0x21} {(0x23 - 0x5B)} {(0x5D - 0x7E)} - {}]* + ::=3D [{0x21} {(0x23 - 0x26)} {(0x28 - 0x5B)} + {(0x5D - 0x7E)} {}]* ::=3D 0x22 + ::=3D 0x27 ::=3D "\" {"n"} {"t"} {"f"} {"r"} {"b"} {"0"} {"\"} - {} + {} {} ::=3D {} {} ::=3D * ::=3D + ::=3D 0x09 ::=3D 0x20 @@ -112,15 +113,16 @@ DEC file (for example, `` statements are = not permitted). ::=3D [ * * ]* ::=3D ::=3D ::=3D {} {} ::=3D * - ::=3D ["L"] + ::=3D * + ::=3D {} {} ::=3D [{} {}]+ ::=3D "#" [ ] + ::=3D "#" + - ::=3D "L" + ::=3D "L" {} {} ::=3D (a-fA-F0-9) ::=3D {"0x"} {"0X"} [] ::=3D {"0x"} {"0X"} + ::=3D "0x" [0]* ::=3D ? ? ? @@ -157,11 +159,12 @@ DEC file (for example, `` statements are = not permitted). ::=3D {} {} ::=3D {"TRUE"} {"true"} {"True"} {"0x1"} {"0x01"} {"1"} ::=3D {"FALSE"} {"false"} {"False"} {"0x0"} {"0x00"} {"0"} - ::=3D {} {} + ::=3D {} {} + ::=3D {} {"{""}"} ::=3D (A-Z)(A-Z0-9_)* ::=3D "$(" ")" ::=3D "." ::=3D ::=3D @@ -182,14 +185,45 @@ DEC file (for example, `` statements are = not permitted). ::=3D (0-255) ::=3D (0-65535) ::=3D (0-4294967295) ::=3D (0-18446744073709551615) - ::=3D {} {} - ::=3D {} {} - ::=3D {} {} - ::=3D {} {} + ::=3D {} {} {} + {} {} + ::=3D {} {} {} + {} {} + ::=3D {} {} {} + {} {} + ::=3D {} {} {} + {} {} + ::=3D {} {"{""}"} + ::=3D {} + {"{" [ ]*"}"} + ::=3D {} + {"{" [ ]*"}"} + ::=3D {} + {"{" [ ]*"}"} + ::=3D {} {} {} + ::=3D "{"[] =20 + [ [] ]*"}" + ::=3D {} {} {}=20 + ::=3D {} {} {} {} + {} {} + ::=3D "GUID(" ")" + ::=3D { } + {} {} + ::=3D "DEVICE_PATH(" ")" + ::=3D A double quoted string that follow the device = path + as string format defined in UEFI Specification 2= .6 + Section 9.6 + ::=3D {} {} {} {} + ::=3D "UINT8(" ")" + ::=3D "UINT16(" ")" + ::=3D "UINT32(" ")" + ::=3D "UINT64(" ")" + ::=3D "LABEL(" ")" + ::=3D "OFFSET_OF(" ")" ::=3D {"BASE"} {"SEC"} {"PEI_CORE"} {"PEIM"} {"DXE_CORE"} {"DXE_DRIVER"} {"SMM_CORE"} {"DXE_RUNTIME_DRIVER"} {"DXE_SAL_DRIVER"} {"DXE_SMM_DRIVER"} {"UEFI_DRIVER"} {"UEFI_APPLICATION"} {"USER_DEFINED"} @@ -200,10 +234,18 @@ DEC file (for example, `` statements are = not permitted). ::=3D (a-zA-Z)(a-zA-Z0-9)* ::=3D {"IA32"} {"X64"} {"IPF"} {"EBC"} {} ``` =20 ********** +**Note:** When using CString, UnicodeString or byte array format as +UINT8/UINT16/UINT32/UINT64 values, please make sure they fit in the +target type's size, otherwise tool would report failure. +********** +**Note:** LABEL() macro in byte arrays to tag the byte offset of a +location in a byte array. OFFSET_OF() macro in byte arrays that returns +the byte offset of a LABEL() declared in a byte array. +********** **Note:** When using the characters "|" or "||" in an expression, the expression must be encapsulated in open "(" and close ")" parenthesis. ********** **Note:** Comments may appear anywhere within a DEC file, provided they fo= llow the rules that a comment may not be enclosed within Section headers, and t= hat @@ -233,14 +275,14 @@ must cause a build break. ********** =20 **_UnicodeString_** =20 When the `` element (these characters are string literals as -defined by the C99 specification: L"string", not actual Unicode characters= ) is -included in a value, the build tools may be required to expand the ASCII s= tring -between the quotation marks into a valid UCS-2 character format string. The -build tools parser must treat all content between the field separators +defined by the C99 specification: L"string"/L'string', not actual Unicode +characters) is included in a value, the build tools may be required to exp= and +the ASCII string between the quotation marks into a valid UCS-2 character = format +string. The build tools parser must treat all content between the field se= parators (excluding white space characters around the field separators) as ASCII li= teral content when generating the AutoGen.c and AutoGen.h files. =20 **_Comments_** =20 --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel