[edk2] [Patch] edk2 Dscspec: Add the syntax to initialize structure PCD with C style value

Liming Gao liming.gao at intel.com
Tue Dec 4 19:59:03 PST 2018


https://bugzilla.tianocore.org/show_bug.cgi?id=1292

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
---
 3_edk_ii_dsc_file_format/33_platform_dsc_definition.md | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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..4c7fa99 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
@@ -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



More information about the edk2-devel mailing list