BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=541
This patch is to add flexible PCD value format EBNF into Fdf spec. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.f...@intel.com> Cc: Liming Gao <liming....@intel.com> Cc: Yonghong Zhu <yonghong....@intel.com> --- 3_edk_ii_fdf_file_format/32_fdf_definition.md | 25 +++++++++++++++++++++---- 3_edk_ii_fdf_file_format/35_[fd]_sections.md | 4 ++-- 3_edk_ii_fdf_file_format/36_[fv]_sections.md | 4 ++-- 3_edk_ii_fdf_file_format/37_[capsule]_sections.md | 4 ++-- README.md | 1 + 5 files changed, 28 insertions(+), 10 deletions(-) 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 db098cf..2b044ab 100644 --- a/3_edk_ii_fdf_file_format/32_fdf_definition.md +++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md @@ -1,9 +1,9 @@ <!--- @file 3.2 FDF Definition - Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006-2019, Intel Corporation. All rights reserved.<BR> Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met: @@ -122,15 +122,17 @@ The following are common definitions used by multiple section types. <AsciiString> ::= [ <TS>* <AsciiChars>* ]* <EmptyString> ::= <DblQuote> <DblQuote> <CFlags> ::= <AsciiString> <PrintChars> ::= {<TS>} {<CChars>} <QuotedString> ::= <DblQuote> <PrintChars>* <DblQuote> -<CString> ::= ["L"] <QuotedString> +<CString> ::= ["L"] {<QuotedString>} {<SglQuotedString>} +<SglQuotedString> ::= <SglQuote> <PrintChars>* <SglQuote> +<SglQuote> ::= 0x27 <NormalizedString> ::= <DblQuote> [{<Word>} {<Space>}]+ <DblQuote> <GlobalComment> ::= <WS> "#" [<AsciiString>] <EOL>+ <Comment> ::= "#" <AsciiString> <EOL>+ -<UnicodeString> ::= "L" <QuotedString> +<UnicodeString> ::= "L" {<QuotedString>} {<SglQuotedString>} <HexDigit> ::= (a-fA-F0-9) <HexByte> ::= {"0x"} {"0X"} [<HexDigit>] <HexDigit> <HexNumber> ::= {"0x"} {"0X"} <HexDigit>+ <HexVersion> ::= "0x" [0]* <Major> <Minor> <Major> ::= <HexDigit>? <HexDigit>? <HexDigit>? @@ -181,11 +183,11 @@ The following are common definitions used by multiple section types. <PcdCName> ::= <CName> <TokenSpaceGuidCName> ::= <CName> <Field> ::= <CName> <PCDVAL> ::= "PCD(" <PcdName> ")" <UINT8> ::= {"0x"} {"0X"} (\x0 - \xFF) -<UINT16> ::= "0x"} {"0X"} (\x0 - \xFFFF) +<UINT16> ::= {"0x"} {"0X"} (\x0 - \xFFFF) <UINT32> ::= {"0x"} {"0X"} (\x0 - \xFFFFFFFF) <UINT64> ::= {"0x"} {"0X"} (\x0 - \xFFFFFFFFFFFFFFFF) <UINT8z> ::= {"0x"} {"0X"} <HexDigit> <HexDigit> <UINT16z> ::= {"0x"} {"0X"} <HexDigit> <HexDigit> <HexDigit> <HexDigit> @@ -233,10 +235,25 @@ The following are common definitions used by multiple section types. {"128M"} {"256M"} {"512M"} {"1G"} {"2G"} <FfsAlignmentValues> ::= {"Auto"} {"8"} {"16"} {"32"} {"64"} {"128"} {"512"} {"1K"} {"4K"} {"32K"} {"64K"} {"128K"} {"256K"} {"512K"} {"1M"} {"2M"} {"4M"} {"8M"} {"16M"} +<Array> ::= "{" {<Array>} {[<Lable>] <ArrayVal>[<CommaSpace> [<Lable>] <ArrayVal>]* } "}" +<Lable> ::= "LABEL(" <CName> ")" +<OffsetOf> ::= "OFFSET_OF(" <CName> ")" +<ArrayVal> ::= {<Num8Array>} {<GuidStr>} {<DevicePath>} 1 +<Num8Array> ::= {<NonNumType>} {<ShortNum>} {<UINT8>} +<NonNumType> ::= {<BoolVal>} {<UnicodeString>} {<CString>}{<Offset>} {<UintMac>} +<ShortNum> ::= (0-255) +<UintMac> ::= {<Uint8Mac>} {<Uint16Mac>} {<Uint32Mac>} {<Uint64Mac>} +<Uint8Mac> ::= "UINT8(" <Num8Array> ")" +<Uint16Mac> ::= "UINT16(" <Num16Array> ")" +<Uint32Mac> ::= "UINT32(" <Num32Array> ")" +<Uint64Mac> ::= "UINT64(" <Num64Array> ")" +<Num16Array> ::= {<NonNumType>} {<IntNum>} {<UINT16>} +<Num32Array> ::= {<NonNumType>} {<LongNum>} {<UINT32>} +<Num64Array> ::= {<NonNumType>} {<LongLongNum>} {<UINT64>} ``` ********** **Note:** When using the characters "|" or "||" in an expression, the expression must be encapsulated in open "(" and close ")" parenthesis. 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 e46fd7b..d8fde52 100644 --- a/3_edk_ii_fdf_file_format/35_[fd]_sections.md +++ b/3_edk_ii_fdf_file_format/35_[fd]_sections.md @@ -1,9 +1,9 @@ <!--- @file 3.5 [FD] Sections - Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006-2019, Intel Corporation. All rights reserved.<BR> Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met: @@ -66,11 +66,11 @@ Conditional statements may be used anywhere within this section. <BlockStatements> ::= <TS> "BlockSize" <Eq> <UINT32> [<SetPcd>] <EOL> [<TS> "NumBlocks" <Eq> <UINT32> <EOL>] <SetStatements> ::= <TS> "SET" {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL> <VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>} - {<CString>} {<UnicodeString>} {<Expression>} + {<CString>} {<UnicodeString>} {<Expression>}{<Array>}{<OffsetOf>} <RegionLayout> ::= <TS> <Offset> <FS> <Size> <EOL> [<TS> <PcdOffset> [<FS> <PcdSize>] <EOL>] [<RegionType>] <Offset> ::= {<HexNumber>} {<Expression>} <Size> ::= {<HexNumber>} {<Expression>} 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 2b21906..7448f3c 100644 --- a/3_edk_ii_fdf_file_format/36_[fv]_sections.md +++ b/3_edk_ii_fdf_file_format/36_[fv]_sections.md @@ -1,9 +1,9 @@ <!--- @file 3.6 [FV] Sections - Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006-2019, Intel Corporation. All rights reserved.<BR> Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met: @@ -90,11 +90,11 @@ Conditional statements may be used anywhere within this section. <BlockStatements> ::= <FixedBlocks> <FixedBlocks> ::= [<TS> "BlockSize" <Eq> <UINT32> <EOL>] [<TS> "NumBlocks" <Eq> <UINT32> <EOL>] <SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL> <VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>} - {<CString>} {<UnicodeString>} {<Expression>} + {<CString>} {<UnicodeString>} {<Expression>}{<Array>}{<OffsetOf>} <FvAlignment> ::= [<TS> "FvBaseAddress" <Eq> <UINT64> <EOL>] [<TS> "FvForceRebase" <Eq> <TrueFalse> <EOL>] <TS> "FvAlignment" <Eq> <FvAlignmentValues> <EOL> <FvAttributes> ::= [<TS> "MEMORY_MAPPED" <Eq> <TrueFalse> <EOL>] 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 c20c73a..7dc975d 100644 --- a/3_edk_ii_fdf_file_format/37_[capsule]_sections.md +++ b/3_edk_ii_fdf_file_format/37_[capsule]_sections.md @@ -1,9 +1,9 @@ <!--- @file 3.7 [Capsule] Sections - Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006-2019, Intel Corporation. All rights reserved.<BR> Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met: @@ -49,11 +49,11 @@ Conditional statements may be used anywhere within this section. <UefiTokens> <CapsuleStmts>* <UiCapsuleName> ::= "." <Word> <SetStatements> ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL> <VALUE> ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>} - {<CString>} {<UnicodeString>} {<Expression>} + {<CString>} {<UnicodeString>} {<Expression>}{<Array>}{<OffsetOf>} <UefiTokens> ::= <TS> "CAPSULE_GUID" <Eq> <NamedGuidOrPcd> <EOL> [<TS> "CAPSULE_HEADER_SIZE" <Eq> <Bytes> <EOL>] [<TS> "CAPSULE_FLAGS" <Eq> <Flags> <EOL>] [<TS> "CAPSULE_HEADER_INIT_VERSION" <Eq> <Hex2> <EOL>] <CapsuleStmts> ::= {<MacroDefinition>} {<SetStatements>} diff --git a/README.md b/README.md index 7c7face..379ef42 100644 --- a/README.md +++ b/README.md @@ -215,5 +215,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved. | | clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec | | | | document WEAK_ALIGNMENT attribute | | | | support varstore template generation with a [FV] section | | | | [#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=1110) Extend exclamation statement's keyword to case-insensitive | | | | [#551] (https://bugzilla.tianocore.org/show_bug.cgi?id=551) Add PI1.5 standalone SMM support in FDF file | | +| | Add flexible PCD value format into spec | | \ No newline at end of file -- 2.20.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel