public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Feng, Bob C" <bob.c.feng@intel.com>
To: edk2-devel@lists.01.org
Cc: Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [Patch] Document: Add PCD flexible format value EBNF in Fdf.
Date: Tue,  5 Mar 2019 16:15:42 +0800	[thread overview]
Message-ID: <20190305081542.24744-1-bob.c.feng@intel.com> (raw)

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.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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 +--
 .../37_[capsule]_sections.md                  |  4 +--
 4 files changed, 27 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>}
-- 
2.20.1.windows.1



             reply	other threads:[~2019-03-05  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05  8:15 Feng, Bob C [this message]
2019-03-06  8:40 ` [Patch] Document: Add PCD flexible format value EBNF in Fdf Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190305081542.24744-1-bob.c.feng@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox