* [Patch v2] Dsc Spec: Add the syntax to initialize structure PCD with C style value
@ 2019-01-08 5:53 Liming Gao
2019-01-08 7:41 ` Feng, Bob C
0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2019-01-08 5:53 UTC (permalink / raw)
To: edk2-devel
In V2:
Update Pcd Field value assignment with array index.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1292
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
---
3_edk_ii_dsc_file_format/33_platform_dsc_definition.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 0ff9d9d..07f10d6 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -192,7 +192,7 @@ The following are common definitions used by multiple section types.
<BoolType> ::= {<BoolVal>} {"{"<BoolVal>"}"}
<MACRO> ::= (A-Z)(A-Z0-9_)*
<MACROVAL> ::= "$(" <MACRO> ")"
-<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
+<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> ["["<Number>"]"]* "." <Field>
<PcdName> ::= <TokenSpaceGuidCName> "." <PcdCName>
<PcdCName> ::= <CName>
<TokenSpaceGuidCName> ::= <CName>
@@ -239,10 +239,11 @@ The following are common definitions used by multiple section types.
<StringVal> ::= {<UnicodeString>} {<CString>} {<Array>}
<Array> ::= "{" {<Array>} {[<Lable>] <ArrayVal>
[<CommaSpace> [<Lable>] <ArrayVal>]* } "}"
-<ArrayVal> ::= {<Num8Array>} {<GuidStr>} {<DevicePath>}
+<ArrayVal> ::= {<Num8Array>} {<GuidStr>} {<DevicePath>} {<CodeStr>}
<NonNumType> ::= {<BoolVal>} {<UnicodeString>} {<CString>}
{<Offset>} {<UintMac>}
<GuidStr> ::= "GUID(" <GuidVal> ")"
+<CodeStr> ::= "CODE(" <CData> ")"
<GuidVal> ::= {<DblQuote> <RegistryFormatGUID> <DblQuote>}
{<CFormatGUID>} {<CName>}
<DevicePath> ::= "DEVICE_PATH(" <DevicePathStr> ")"
@@ -345,6 +346,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
`<CArray>` 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 must be used for all EDK II
--
2.13.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch v2] Dsc Spec: Add the syntax to initialize structure PCD with C style value
2019-01-08 5:53 [Patch v2] Dsc Spec: Add the syntax to initialize structure PCD with C style value Liming Gao
@ 2019-01-08 7:41 ` Feng, Bob C
0 siblings, 0 replies; 2+ messages in thread
From: Feng, Bob C @ 2019-01-08 7:41 UTC (permalink / raw)
To: Gao, Liming, edk2-devel@lists.01.org
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Gao, Liming
Sent: Tuesday, January 8, 2019 1:53 PM
To: edk2-devel@lists.01.org
Cc: Feng, Bob C <bob.c.feng@intel.com>
Subject: [Patch v2] Dsc Spec: Add the syntax to initialize structure PCD with C style value
In V2:
Update Pcd Field value assignment with array index.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1292
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
---
3_edk_ii_dsc_file_format/33_platform_dsc_definition.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 0ff9d9d..07f10d6 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -192,7 +192,7 @@ The following are common definitions used by multiple section types.
<BoolType> ::= {<BoolVal>} {"{"<BoolVal>"}"}
<MACRO> ::= (A-Z)(A-Z0-9_)*
<MACROVAL> ::= "$(" <MACRO> ")"
-<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
+<PcdFieldName> ::= <TokenSpaceGuidCName> "." <PcdCName> ["["<Number>"]"]* "." <Field>
<PcdName> ::= <TokenSpaceGuidCName> "." <PcdCName>
<PcdCName> ::= <CName>
<TokenSpaceGuidCName> ::= <CName>
@@ -239,10 +239,11 @@ The following are common definitions used by multiple section types.
<StringVal> ::= {<UnicodeString>} {<CString>} {<Array>}
<Array> ::= "{" {<Array>} {[<Lable>] <ArrayVal>
[<CommaSpace> [<Lable>] <ArrayVal>]* } "}"
-<ArrayVal> ::= {<Num8Array>} {<GuidStr>} {<DevicePath>}
+<ArrayVal> ::= {<Num8Array>} {<GuidStr>} {<DevicePath>} {<CodeStr>}
<NonNumType> ::= {<BoolVal>} {<UnicodeString>} {<CString>}
{<Offset>} {<UintMac>}
<GuidStr> ::= "GUID(" <GuidVal> ")"
+<CodeStr> ::= "CODE(" <CData> ")"
<GuidVal> ::= {<DblQuote> <RegistryFormatGUID> <DblQuote>}
{<CFormatGUID>} {<CName>}
<DevicePath> ::= "DEVICE_PATH(" <DevicePathStr> ")"
@@ -345,6 +346,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 `<CArray>` 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 must be used for all EDK II
--
2.13.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-08 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 5:53 [Patch v2] Dsc Spec: Add the syntax to initialize structure PCD with C style value Liming Gao
2019-01-08 7:41 ` Feng, Bob C
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox