public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch V3] FDF Spec: clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec
@ 2018-06-22  2:08 Yonghong Zhu
  2018-06-22  6:21 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-06-22  2:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Michael Kinney, Kevin W Shaw

V3: recreate the patch base on latest version

<NamedGuidOrPcd>::= {"PCD(" <PcdName> ")"} {<RegistryFormatGUID>} {<GuidCName>}
<NamedGuid>     ::= {<NamedGuidOrPcd>} {"$(NAMED_GUID)"}

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 3_edk_ii_fdf_file_format/32_fdf_definition.md      |  5 ++++
 3_edk_ii_fdf_file_format/36_[fv]_sections.md       | 23 ++++++-----------
 3_edk_ii_fdf_file_format/37_[capsule]_sections.md  | 29 ++++++++--------------
 .../38_[fmppayload]_sections.md                    |  4 +--
 3_edk_ii_fdf_file_format/39_[rule]_sections.md     | 21 ++++++----------
 README.md                                          |  1 +
 6 files changed, 33 insertions(+), 50 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 9313f73..39d211d 100644
--- a/3_edk_ii_fdf_file_format/32_fdf_definition.md
+++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md
@@ -136,10 +136,11 @@ The following are common definitions used by multiple section types.
 <Major>                ::= <HexDigit>? <HexDigit>? <HexDigit>?
                            <HexDigit>
 <Minor>                ::= <HexDigit> <HexDigit> <HexDigit> <HexDigit>
 <DecimalVersion>       ::= {"0"} {(1-9) [(0-9)]*} ["." (0-9)+]
 <VersionVal>           ::= {<HexVersion>} {(0-9)+ "." (0-99)}
+<NamedGuidOrPcd>       ::= {"PCD(" <PcdName> ")"} {<RegistryFormatGUID>} {<GuidCName>}
 <GUID>                 ::= {<RegistryFormatGUID>} {<CFormatGUID>}
 <RegistryFormatGUID>   ::= <RHex8> "-" <RHex4> "-" <RHex4> "-" <RHex4> "-"
                            <RHex12>
 <RHex4>                ::= <HexDigit> <HexDigit> <HexDigit> <HexDigit>
 <RHex8>                ::= <RHex4> <RHex4>
@@ -172,10 +173,11 @@ The following are common definitions used by multiple section types.
                            {"0x01"} {"1"}
 <FALSE>                ::= {"FALSE"} {"false"} {"False"} {"0x0"} {"0x00"} {"0"}
 <BoolType>             ::= {<TRUE>} {<FALSE>}
 <MACRO>                ::= (A-Z)(A-Z0-9_)*
 <MACROVAL>             ::= "$(" <MACRO> ")"
+<GuidCName>            ::= <CName>
 <PcdFieldName>         ::= <TokenSpaceGuidCName> "." <PcdCName> "." <Field>
 <PcdName>              ::= <TokenSpaceGuidCName> "." <PcdCName>
 <PcdCName>             ::= <CName>
 <TokenSpaceGuidCName>  ::= <CName>
 <Field>                ::= <CName>
@@ -240,10 +242,13 @@ expression must be encapsulated in open "(" and close ")" parenthesis.
 **********
 **Note:** Comments may appear anywhere within a FDF file, provided they follow
 the rules that a comment may not be enclosed within Section headers, and that
 in line comments must appear at the end of a statement.
 **********
+**Note:** The PCD item used in `<NamedGuidOrPcd>` must be defined as FixedAtBuild
+type and VOID* datum type, and the size of the PCD must be 16 bytes.
+**********
 
 ### Parameter Definitions
 
 **_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 633b4a7..2f79d1c 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-2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006-2018, 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:
 
@@ -107,12 +107,12 @@ Conditional statements may be used anywhere within this section.
                         [<TS> "READ_LOCK_STATUS" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_ENABLED_CAP" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_DISABLED_CAP" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_STATUS" <Eq> <TrueFalse> <EOL>]
                         [<TS> "ERASE_POLARITY" <Eq> {"0"} {"1"} <EOL>]
-<FileSystemGuid>    ::= <TS> "FileSystemGuid" <Eq> <NamedGuid> <EOL>
-<FvNameGuid>        ::= <TS> "FvNameGuid" <Eq> <NamedGuid> <EOL>
+<FileSystemGuid>    ::= <TS> "FileSystemGuid" <Eq> <NamedGuidOrPcd> <EOL>
+<FvNameGuid>        ::= <TS> "FvNameGuid" <Eq> <NamedGuidOrPcd> <EOL>
 <FvUsedSize>        ::= <TS> "FvUsedSizeEnable" <Eq> <TrueFalse> <EOL>
 <FvNameString>      ::= <TS> "FvNameString" <Eq> <TrueFalse> <EOL>
 <PeiAprioriSection> ::= <TS> "APRIORI" <MTS> "PEI" <MTS>
                         "{" <EOL>
                         <MacroDefinition>*
@@ -139,23 +139,21 @@ Conditional statements may be used anywhere within this section.
                         <PATH> <Word> ".inf" [<FS> <RelocFlags>] <EOL> else:
                         <PATH> <Word> ".inf" <EOL>
 <RelocFlags>        ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
 <FileStatements>    ::= {<type1>} {<type2>} {<type3>} {<type4>}
                         {<type5>} <EOL>
-<type1>             ::= <TS> "FILE" <MTS> <FvType1> <Eq> <NamedGuid> <Options1>
-<type2>             ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuid> <Options2>
+<type1>             ::= <TS> "FILE" <MTS> <FvType1> <Eq> <NamedGuidOrPcd> <Options1>
+<type2>             ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuidOrPcd> <Options2>
 <type3>             ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuidOrPcd>
                         <Options2>
-<type4>             ::= <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq> [<NamedGuid>]
+<type4>             ::= <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq> [<NamedGuidOrPcd>]
                         <Options2>
 <type5>             ::= <TS> "FILE" <MTS> "FV_IMAGE" <Eq>
                         <NamedGuidOrPcd> <Options2>
 <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"}
 <FvType2>           ::= {"FREEFORM"} {"PEI_DXE_COMBO"} {"DRIVER"}
                         {"DXE_CORE"} {"APPLICATION"} {"SMM_CORE"} {"SMM"}
-<NamedGuidOrPcd>    ::= {<NamedGuid>} {"PCD(" <PcdName> ")"}
-<NamedGuid>         ::= {<RegistryFormatGUID>} {"$(NAMED_GUID)"} {<GuidCName>}
 <Options1>          ::= [<Use>] [<FileOpts>] <RelocFlags> <MTS>
                         "{" [<EOL>]
                         {<Filename>} {<SectionData>} <TS> <TS> "}" [<EOL>]
 <Options2>          ::= [<Use>] [<FileOpts>] <MTS>
                         "{" [<EOL>]
@@ -204,11 +202,11 @@ Conditional statements may be used anywhere within this section.
                         <SectionOrFile>
 <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"} {"RAW"}
                         {"FV_IMAGE"} {"DXE_DEPEX"} {"SMM_DEPEX"}
                         {"UI"} {"PEI_DEPEX"} {"VERSION"}
 <SubTypeGuid>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] <STG_Data>
-<STG_Data>          ::= "SUBTYPE_GUID" <MTS> <GuidValue> <Eq>
+<STG_Data>          ::= "SUBTYPE_GUID" <MTS> <NamedGuidOrPcd> <Eq>
                         <NormalFile> <EOL>
 <ChkReloc>          ::= if ((LeafSectionType == "PE32"
                         || LeafSectionType == "TE")
                         && (MODULE_TYPE == "SEC"
                         || MODULE_TYPE == "PEI_CORE"
@@ -221,11 +219,11 @@ Conditional statements may be used anywhere within this section.
                         "{" <EOL>
                         <EncapSec>*
                         <LeafSections>*
                         <TS> "}" [<EOL>]
 <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
-<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuid> <MTS>
+<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuidOrPcd> <MTS>
                         [<GuidedOptions>]
                         "{" <EOL>
                         <EncapSec>*
                         <LeafSections>*
                         <TS> "}" [<EOL>]
@@ -263,11 +261,10 @@ Conditional statements may be used anywhere within this section.
                         [<TS> <DepInstruct> {<EOL>} {<MTS>}]
                         [<TS> "end" {<EOL>} {<MTS>}]
 <BoolStmt>          ::= {<Bool>} {<BoolExpress>}
                         {<GuidCName>} {<EOL>} {<MTS>}
 <Bool>              ::= {"TRUE"} {"FALSE"} {<GuidCName>}
-<GuidCName>         ::= <CName> # A Guid C Name
 <BoolExpress>       ::= [<Not>] <GuidCName> [<OP> [<Not>] <GuidCName> ]*
 <Not>               ::= "NOT" <MTS>
 <OP>                ::= <MTS> {"AND"} {"OR"} <MTS>
 <DepInstruct>       ::= "push" <MTS> <Filename>
 <DxeDepexExp>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] "DXE_DEPEX_EXP"
@@ -315,14 +312,10 @@ This is short hand notation refering to content that will be placed in a
 Section of type: EFI_SECTION_FREEFORM_SUBTYPE_GUID. A single
 
 `EFI_SECTION_FREEFORM_SUBTYPE_GUID` section is permitted in an FFS File of type
 `EFI_FV_FILETYPE_FREEFORM`
 
-**_GuidCName_**
-
-A word that is a valid C variable for a GUID.
-
 **_Expression_**
 
 Refer to the EDK II Expression Syntax Specification for more information.
 
 **_COMPRESS_**
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 fe8721c..03a16ca 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-2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006-2018, 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:
 
@@ -50,19 +50,16 @@ Conditional statements may be used anywhere within this section.
                         <CapsuleStmts>*
 <UiCapsuleName>     ::= "." <Word>
 <SetStatements>     ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>} <Eq> <VALUE> <EOL>
 <VALUE>             ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
                         {<CString>} {<UnicodeString>} {<Expression>}
-<UefiTokens>        ::= <TS> "CAPSULE_GUID" <Eq> <GuidValue> <EOL>
+<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>}
                         {<CapsuleData>}
-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
-<GuidCName>         ::= <CName>
-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
 <Flags>             ::= <FlagName>
 <FlagName>          ::= {"PersistAcrossReset"}
                         {"PersistAcrossReset" "," "InitiateReset"}
                         {"PersistAcrossReset" "," "PopulateSystemTable"}
                         {"PersistAcrossReset" "," "PopulateSystemTable"
@@ -101,22 +98,20 @@ Conditional statements may be used anywhere within this section.
 <RelocFlags>        ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
 <KeyString>         ::= <Target> "_" <TagName> "_" <TargetArch>
 <Target>            ::= {Target} {"$(TARGET)"}
 <TagName>           ::= {TagName} {"$(TOOL_CHAIN_TAG)"}
 <FileStatements>    ::= <TS> {<type1>} {<type2>} {<type3>} {<type4>}
-<type1>             ::= "FILE" <FvType1> <Eq> <NamedGuid> <Options1>
-<type2>             ::= "FILE" <FvType2> <Eq> <NamedGuid> <Options2>
+<type1>             ::= "FILE" <FvType1> <Eq> <NamedGuidOrPcd> <Options1>
+<type2>             ::= "FILE" <FvType2> <Eq> <NamedGuidOrPcd> <Options2>
 <type3>             ::= "FILE" "RAW" <Eq> <NamedGuidOrPcd>
                         <Options2>
-<type4>             ::= "FILE" "NON_FFS_FILE" <Eq> [<NamedGuid>] <Options2>
+<type4>             ::= "FILE" "NON_FFS_FILE" <Eq> [<NamedGuidOrPcd>] <Options2>
 <type5>             ::= "FILE" "FV_IMAGE" <Eq> <NamedGuidOrPcd>
                         <Options2>
 <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"}
 <FvType2>           ::= {"FREEFORM"} {"PEI_DXE_COMBO"} {"DRIVER"}
                         {"DXE_CORE"} {"APPLICATION"} {"SMM_CORE"} {"SMM"}
-<NamedGuid>         ::= {<RegistryFormatGUID>} {"$(NAMED_GUID)"}
-<NamedGuidOrPcd>    ::= {<NamedGuid>} {"PCD(" <PcdName> ")"}
 <Options1>          ::= [<Use>] [<FileOpts>] [<RelocFlags>]
                         "{" [<EOL>]
                         <TS> {<Filename>} {<SectionData>} [<EOL>] <TS> "}"
                         <EOL>
 <Options2>          ::= [<Use>] [<FileOpts>]
@@ -197,15 +192,12 @@ Conditional statements may be used anywhere within this section.
 <SecData>           ::= <LeafSecType> [<ChkReloc>] <SectionOrFile>
 <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"} {"RAW"}
                         {"FV_IMAGE"} {"DXE_DEPEX"} {"SMM_DEPEX"}
                         {"UI"} {"PEI_DEPEX"} {"VERSION"}
 <SubTypeGuid>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] <SgData>
-<SgData>            ::= "SUBTYPE_GUID" <MTS> <GuidValue> <Eq>
+<SgData>            ::= "SUBTYPE_GUID" <MTS> <NamedGuidOrPcd> <Eq>
                         <NormalFile> <EOL>
-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
-<GuidCName>         ::= <CName>
-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
 <ChkReloc>          ::= if ((LeafSecType == "PE32"
                         || LeafSecType == "TE")
                         && (MODULE_TYPE == "SEC"
                         || MODULE_TYPE == "PEI_CORE"
                         || MODULE_TYPE == "PEIM")): [<RelocFlags>]
@@ -219,11 +211,11 @@ Conditional statements may be used anywhere within this section.
                         [<DxeAprioriSection>]
                         <EncapSec>*
                         <LeafSections>*
                         <TS> "}" <EOL>
 <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
-<GuidedSection>     ::= "GUIDED" <NamedGuid> [<GuidedOptions>]
+<GuidedSection>     ::= "GUIDED" <NamedGuidOrPcd> [<GuidedOptions>]
                         "{" <EOL>
                         <MacroDefinition>*
                         [<PeiAprioriSection>]
                         [<DxeAprioriSection>]
                         <EncapSec>*
@@ -254,11 +246,11 @@ Conditional statements may be used anywhere within this section.
                         [<TS> "READ_LOCK_CAP" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_LOCK_STATUS" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_ENABLED_CAP" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_DISABLED_CAP" <Eq> <TrueFalse> <EOL>]
                         [<TS> "READ_STATUS" <Eq> <TrueFalse> <EOL>]
-<FileSystemGuid>    ::= "FileSystemGuid" <Eq> <NamedGuid>
+<FileSystemGuid>    ::= "FileSystemGuid" <Eq> <NamedGuidOrPcd>
 <DepexExpSection>   ::= if ( COMPONENT_TYPE == "LIBRARY"
                         || LIBRARY_CLASS is declared in defines section of the
                         INF
                         || MODULE_TYPE == "USER_DEFINED" ):
                         [<Depex>]
@@ -286,11 +278,10 @@ Conditional statements may be used anywhere within this section.
                         [<DepInstruct> {<EOL>} {<MTS>}]*
                         ["end"] [<EOL>]
 <BoolStmt>          ::= {<Boolean>} {<BoolExpress>}
                         {<GuidCName>} <EOL>
 <Boolean>           ::= {"TRUE"} {"FALSE"} {<GuidCName>}
-<GuidCName>         ::= <CName> # A Guid C Name
 <BoolExpress>       ::= <GuidCName> [<OP> ["NOT"] <GuidCName> ]*
 <OP>                ::= <MTS> {"AND"} {"OR"} <MTS>
 <DepInstruct>       ::= "push" <Filename>
 <DxeDepexExp>       ::= "SECTION" <MTS> [<FfsAlignment>] <DxeExp>
 <DxeExp>            ::= "DXE_DEPEX_EXP" <Eq> <MTS>
@@ -321,14 +312,14 @@ environment variable.
 
 **_TargetArch_**
 
 Only specific architectures are permitted - use of "common" is prohibited.
 
-**_GuidValue_**
+**_NamedGuidOrPcd_**
 
 When specifying the CAPSULE_GUID value for an FMP Capsule, the GUID value must
-be set to 6dcbd5ed-e82d-4c44-bda1-7194199ad92a.
+be same as 6dcbd5ed-e82d-4c44-bda1-7194199ad92a.
 
 #### Parameters
 
 **_UiCapsuleName_**
 
diff --git a/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md b/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
index dceb77d..494122b 100644
--- a/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
+++ b/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
@@ -47,15 +47,15 @@ statement, if present, provides the information for VendorCode in an
 <FmpPayload>       ::= "[FmpPayload" "." <UiFmpName> "]" <EOL>
                        <FmpTokens>
                        <FmpFileData>{1,2}
 <UiFmpName>        ::= <Word>
 <FmpTokens>        ::= [<TS> "IMAGE_HEADER_INIT_VERSION" <Eq> <Hex2> <EOL>]
-                       <TS> "IMAGE_TYPE_ID" <Eq> <RegistryFormatGUID> <EOL>
+                       <TS> "IMAGE_TYPE_ID" <Eq> <NamedGuidOrPcd> <EOL>
                        [<TS> "IMAGE_INDEX" <Eq> <Hex2> <EOL>]
                        [<TS> "HARDWARE_INSTANCE" <Eq> <Hex2> <EOL>]
                        [<TS> "MONOTONIC_COUNT"<Eq> <NumValUint64> <EOL>]
-                       [<TS> "CERTIFICATE_GUID"<Eq> <RegistryFormatGUID><EOL>]
+                       [<TS> "CERTIFICATE_GUID"<Eq> <NamedGuidOrPcd><EOL>]
 <FmpFileData>      ::= <FileStatements>*
                        <FvStatements>*
                        <FdStatenents>*
 <FileStatements>   ::= <TS> "FILE" <Space> "DATA" <Eq> <Filename> <EOL>
 <FvStatements>     ::= "FV" <Eq> <FvNameOrFilename> <EOL>
diff --git a/3_edk_ii_fdf_file_format/39_[rule]_sections.md b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
index d9f974a..e23b474 100644
--- a/3_edk_ii_fdf_file_format/39_[rule]_sections.md
+++ b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
@@ -1,9 +1,9 @@
 <!--- @file
   3.9 [Rule] Sections
 
-  Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006-2018, 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:
 
@@ -100,22 +100,15 @@ Conditional statements may be used anywhere within this section.
                         <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq>
                         [<NamedGuid>] [<Options>] <EOL>
 <FileStatement1>    ::= <NamedGuid> [<RelocFlags> <MTS>] [<Options>] <EOL>
 <FileStatement2>    ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuid>
                         [<Options>] <EOL>
-<FileStatement3>    ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuidOrPcd>
+<FileStatement3>    ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuid>
                         [<Options>] <EOL>
 <FileStatement4>    ::= <TS> "FILE" <MTS> "FV_IMAGE" <Eq>
-                        <NamedGuidOrPcd> [<Options>] <EOL>
-<NamedGuid>         ::= {"$(NAMED_GUID)"} {<RegistryFormatGUID>}
-                        {<Sym>} <MTS>
-<Sym>               ::= "$(" <Word> ")"
-<NamedGuidOrPcd>    ::= <NamedGuid> <MTS>
-                        {"PCD(" <PcdName> ")"} {<GuidValue>} <MTS>
-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
-<GuidCName>         ::= <CName>
-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
+                        <NamedGuid> [<Options>] <EOL>
+<NamedGuid>         ::= {"$(NAMED_GUID)"} {<NamedGuidOrPcd>}
 <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"} {"PEI_DXE_COMBO"}
 <FvType2>           ::= {"FREEFORM"} {"DRIVER"} {"DXE_CORE"}
                         {"APPLICATION"} {"SMM_CORE"} {"SMM"}
 <RelocFlags>        ::= {"RELOCS_STRIPPED" <MTS>}
                         {"RELOCS_RETAINED" <MTS>}
@@ -131,11 +124,11 @@ Conditional statements may be used anywhere within this section.
 <FileSpec>          ::= {<SimpleFile>} {<ComplexFile>} {<SbtGuid>}
 <SimpleFile>        ::= <LeafSecType> [<FileOpts>] <VarFile> <EOL>
 <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"}
                         {"FV_IMAGE"} {"RAW"} {"DXE_DEPEX"} {"UI"}
                         {"PEI_DEPEX"} {"SMM_DEPEX"} {"VERSION"}
-<SbtGuid>           ::= "SUBTYPE_GUID" <MTS> <GuidValue> <MTS> <FName> <EOL>
+<SbtGuid>           ::= "SUBTYPE_GUID" <MTS> <NamedGuid> <MTS> <FName> <EOL>
 <VarFile>           ::= {<FilenameVariable>} {<FName>} {<Ext>}
 <FName>             ::= [<PATH>] <Word> "." <Word>
 <FilenameVariable>  ::= "$(INF_OUTPUT)/$(MODULE_NAME)" "." <Word>
 <ComplexFile>       ::= "{" <EOL>
                         <EncapSection>*
@@ -146,11 +139,11 @@ Conditional statements may be used anywhere within this section.
                         "{" [<EOL>]
                         <EncapSec>*
                         <LeafSections> <EOL>*
                         <TS> "}" <EOL>
 <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
-<GuidedSection>     ::= "GUIDED" <MTS> "$(NAMED_GUID)" <MTS> [<GAttr>]
+<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuid> <MTS> [<GAttr>]
                         "{" <EOL>
                         <EncapSec>*
                         <LeafSections>*
                         <TS> "}" <EOL>
 <GAttr>             ::= [<GuidAttrPR>] [<GuidAttrASV>] [<GuidHeaderSize>]
@@ -170,11 +163,11 @@ Conditional statements may be used anywhere within this section.
 <SmmDepSec>         ::= "SMM_DEPEX" <MTS> <DdFileType> [<FileOrExt>] <EOL>
 <UiSec>             ::= "UI" <MTS> <UiFileType> [<FileOrExt>] <EOL>
 <VerSec>            ::= "VERSION" <MTS> <VerFileType> [<FileOrExt>] <EOL>
 <PeiDepSec>         ::= "PEI_DEPEX" <MTS> <PdFileType>
                         [<FileOrExt>] <EOL>
-<SubtypeGuidSec>    ::= "SUBTYPE_GUID" <MTS> <GuidValue> <MTS>
+<SubtypeGuidSec>    ::= "SUBTYPE_GUID" <MTS> <NamedGuid> <MTS>
                         <File> <EOL>
 <FileOrExt>         ::= {<VarFile>} {<Ext>} <MTS>
 <FileOrExtOrPcd>    ::= {<VarFile>} {<Ext>} {"PCD(" <PcdName> ")"}
 <Ext>               ::= <FS> "." [a-zA-Z][a-zA-Z0-9]{0,}
 <C16FileType>       ::= "COMPAT16" [<FfsAlignment>]
diff --git a/README.md b/README.md
index 042e2ca..c2767fb 100644
--- a/README.md
+++ b/README.md
@@ -210,5 +210,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | [#585](https://bugzilla.tianocore.org/show_bug.cgi?id=585) FDF Spec: Update the FDF_SPECIFICATION version to 0x0001001B or 1.27                                            |               |
 | 1.28       | Update version to 1.28                                                                                                                                                     | March 2018    |
 |            | Per PI 1.6 to extend FFS alignment to 16M                                                                                                                                  |               |
 |            | Per PI 1.6 to support FV extended header entry contain the used size of FV                                                                                                 |               |
 |            | Add !error statement section                                                                                                                                               |               |
+|            | clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec                                                                                                                |               |
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch V3] FDF Spec: clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec
  2018-06-22  2:08 [Patch V3] FDF Spec: clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec Yonghong Zhu
@ 2018-06-22  6:21 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-06-22  6:21 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Shaw, Kevin W

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Friday, June 22, 2018 10:09 AM
>To: edk2-devel@lists.01.org
>Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Shaw, Kevin W
><kevin.w.shaw@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [edk2] [Patch V3] FDF Spec: clean up the <NamedGuidOrPcd> and
><NamedGuid> usage in spec
>
>V3: recreate the patch base on latest version
>
><NamedGuidOrPcd>::= {"PCD(" <PcdName> ")"} {<RegistryFormatGUID>}
>{<GuidCName>}
><NamedGuid>     ::= {<NamedGuidOrPcd>} {"$(NAMED_GUID)"}
>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Michael Kinney <michael.d.kinney@intel.com>
>Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> 3_edk_ii_fdf_file_format/32_fdf_definition.md      |  5 ++++
> 3_edk_ii_fdf_file_format/36_[fv]_sections.md       | 23 ++++++-----------
> 3_edk_ii_fdf_file_format/37_[capsule]_sections.md  | 29 ++++++++-----------
>---
> .../38_[fmppayload]_sections.md                    |  4 +--
> 3_edk_ii_fdf_file_format/39_[rule]_sections.md     | 21 ++++++----------
> README.md                                          |  1 +
> 6 files changed, 33 insertions(+), 50 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 9313f73..39d211d 100644
>--- a/3_edk_ii_fdf_file_format/32_fdf_definition.md
>+++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md
>@@ -136,10 +136,11 @@ The following are common definitions used by
>multiple section types.
> <Major>                ::= <HexDigit>? <HexDigit>? <HexDigit>?
>                            <HexDigit>
> <Minor>                ::= <HexDigit> <HexDigit> <HexDigit> <HexDigit>
> <DecimalVersion>       ::= {"0"} {(1-9) [(0-9)]*} ["." (0-9)+]
> <VersionVal>           ::= {<HexVersion>} {(0-9)+ "." (0-99)}
>+<NamedGuidOrPcd>       ::= {"PCD(" <PcdName> ")"} {<RegistryFormatGUID>}
>{<GuidCName>}
> <GUID>                 ::= {<RegistryFormatGUID>} {<CFormatGUID>}
> <RegistryFormatGUID>   ::= <RHex8> "-" <RHex4> "-" <RHex4> "-" <RHex4> "-
>"
>                            <RHex12>
> <RHex4>                ::= <HexDigit> <HexDigit> <HexDigit> <HexDigit>
> <RHex8>                ::= <RHex4> <RHex4>
>@@ -172,10 +173,11 @@ The following are common definitions used by
>multiple section types.
>                            {"0x01"} {"1"}
> <FALSE>                ::= {"FALSE"} {"false"} {"False"} {"0x0"} {"0x00"} {"0"}
> <BoolType>             ::= {<TRUE>} {<FALSE>}
> <MACRO>                ::= (A-Z)(A-Z0-9_)*
> <MACROVAL>             ::= "$(" <MACRO> ")"
>+<GuidCName>            ::= <CName>
> <PcdFieldName>         ::= <TokenSpaceGuidCName> "." <PcdCName> "."
><Field>
> <PcdName>              ::= <TokenSpaceGuidCName> "." <PcdCName>
> <PcdCName>             ::= <CName>
> <TokenSpaceGuidCName>  ::= <CName>
> <Field>                ::= <CName>
>@@ -240,10 +242,13 @@ expression must be encapsulated in open "(" and
>close ")" parenthesis.
> **********
> **Note:** Comments may appear anywhere within a FDF file, provided they
>follow
> the rules that a comment may not be enclosed within Section headers, and
>that
> in line comments must appear at the end of a statement.
> **********
>+**Note:** The PCD item used in `<NamedGuidOrPcd>` must be defined as
>FixedAtBuild
>+type and VOID* datum type, and the size of the PCD must be 16 bytes.
>+**********
>
> ### Parameter Definitions
>
> **_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 633b4a7..2f79d1c 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-2017, Intel Corporation. All rights reserved.<BR>
>+  Copyright (c) 2006-2018, 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:
>
>@@ -107,12 +107,12 @@ Conditional statements may be used anywhere
>within this section.
>                         [<TS> "READ_LOCK_STATUS" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_ENABLED_CAP" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_DISABLED_CAP" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_STATUS" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "ERASE_POLARITY" <Eq> {"0"} {"1"} <EOL>]
>-<FileSystemGuid>    ::= <TS> "FileSystemGuid" <Eq> <NamedGuid> <EOL>
>-<FvNameGuid>        ::= <TS> "FvNameGuid" <Eq> <NamedGuid> <EOL>
>+<FileSystemGuid>    ::= <TS> "FileSystemGuid" <Eq> <NamedGuidOrPcd>
><EOL>
>+<FvNameGuid>        ::= <TS> "FvNameGuid" <Eq> <NamedGuidOrPcd> <EOL>
> <FvUsedSize>        ::= <TS> "FvUsedSizeEnable" <Eq> <TrueFalse> <EOL>
> <FvNameString>      ::= <TS> "FvNameString" <Eq> <TrueFalse> <EOL>
> <PeiAprioriSection> ::= <TS> "APRIORI" <MTS> "PEI" <MTS>
>                         "{" <EOL>
>                         <MacroDefinition>*
>@@ -139,23 +139,21 @@ Conditional statements may be used anywhere
>within this section.
>                         <PATH> <Word> ".inf" [<FS> <RelocFlags>] <EOL> else:
>                         <PATH> <Word> ".inf" <EOL>
> <RelocFlags>        ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
> <FileStatements>    ::= {<type1>} {<type2>} {<type3>} {<type4>}
>                         {<type5>} <EOL>
>-<type1>             ::= <TS> "FILE" <MTS> <FvType1> <Eq> <NamedGuid>
><Options1>
>-<type2>             ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuid>
><Options2>
>+<type1>             ::= <TS> "FILE" <MTS> <FvType1> <Eq> <NamedGuidOrPcd>
><Options1>
>+<type2>             ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuidOrPcd>
><Options2>
> <type3>             ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuidOrPcd>
>                         <Options2>
>-<type4>             ::= <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq> [<NamedGuid>]
>+<type4>             ::= <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq>
>[<NamedGuidOrPcd>]
>                         <Options2>
> <type5>             ::= <TS> "FILE" <MTS> "FV_IMAGE" <Eq>
>                         <NamedGuidOrPcd> <Options2>
> <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"}
> <FvType2>           ::= {"FREEFORM"} {"PEI_DXE_COMBO"} {"DRIVER"}
>                         {"DXE_CORE"} {"APPLICATION"} {"SMM_CORE"} {"SMM"}
>-<NamedGuidOrPcd>    ::= {<NamedGuid>} {"PCD(" <PcdName> ")"}
>-<NamedGuid>         ::= {<RegistryFormatGUID>} {"$(NAMED_GUID)"}
>{<GuidCName>}
> <Options1>          ::= [<Use>] [<FileOpts>] <RelocFlags> <MTS>
>                         "{" [<EOL>]
>                         {<Filename>} {<SectionData>} <TS> <TS> "}" [<EOL>]
> <Options2>          ::= [<Use>] [<FileOpts>] <MTS>
>                         "{" [<EOL>]
>@@ -204,11 +202,11 @@ Conditional statements may be used anywhere
>within this section.
>                         <SectionOrFile>
> <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"} {"RAW"}
>                         {"FV_IMAGE"} {"DXE_DEPEX"} {"SMM_DEPEX"}
>                         {"UI"} {"PEI_DEPEX"} {"VERSION"}
> <SubTypeGuid>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] <STG_Data>
>-<STG_Data>          ::= "SUBTYPE_GUID" <MTS> <GuidValue> <Eq>
>+<STG_Data>          ::= "SUBTYPE_GUID" <MTS> <NamedGuidOrPcd> <Eq>
>                         <NormalFile> <EOL>
> <ChkReloc>          ::= if ((LeafSectionType == "PE32"
>                         || LeafSectionType == "TE")
>                         && (MODULE_TYPE == "SEC"
>                         || MODULE_TYPE == "PEI_CORE"
>@@ -221,11 +219,11 @@ Conditional statements may be used anywhere
>within this section.
>                         "{" <EOL>
>                         <EncapSec>*
>                         <LeafSections>*
>                         <TS> "}" [<EOL>]
> <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
>-<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuid> <MTS>
>+<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuidOrPcd> <MTS>
>                         [<GuidedOptions>]
>                         "{" <EOL>
>                         <EncapSec>*
>                         <LeafSections>*
>                         <TS> "}" [<EOL>]
>@@ -263,11 +261,10 @@ Conditional statements may be used anywhere
>within this section.
>                         [<TS> <DepInstruct> {<EOL>} {<MTS>}]
>                         [<TS> "end" {<EOL>} {<MTS>}]
> <BoolStmt>          ::= {<Bool>} {<BoolExpress>}
>                         {<GuidCName>} {<EOL>} {<MTS>}
> <Bool>              ::= {"TRUE"} {"FALSE"} {<GuidCName>}
>-<GuidCName>         ::= <CName> # A Guid C Name
> <BoolExpress>       ::= [<Not>] <GuidCName> [<OP> [<Not>]
><GuidCName> ]*
> <Not>               ::= "NOT" <MTS>
> <OP>                ::= <MTS> {"AND"} {"OR"} <MTS>
> <DepInstruct>       ::= "push" <MTS> <Filename>
> <DxeDepexExp>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>]
>"DXE_DEPEX_EXP"
>@@ -315,14 +312,10 @@ This is short hand notation refering to content that
>will be placed in a
> Section of type: EFI_SECTION_FREEFORM_SUBTYPE_GUID. A single
>
> `EFI_SECTION_FREEFORM_SUBTYPE_GUID` section is permitted in an FFS File
>of type
> `EFI_FV_FILETYPE_FREEFORM`
>
>-**_GuidCName_**
>-
>-A word that is a valid C variable for a GUID.
>-
> **_Expression_**
>
> Refer to the EDK II Expression Syntax Specification for more information.
>
> **_COMPRESS_**
>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 fe8721c..03a16ca 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-2017, Intel Corporation. All rights reserved.<BR>
>+  Copyright (c) 2006-2018, 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:
>
>@@ -50,19 +50,16 @@ Conditional statements may be used anywhere within
>this section.
>                         <CapsuleStmts>*
> <UiCapsuleName>     ::= "." <Word>
> <SetStatements>     ::= <TS> "SET" <MTS> {<PcdName>} {<PcdFieldName>}
><Eq> <VALUE> <EOL>
> <VALUE>             ::= {<Number>} {<Boolean>} {<GUID>} {<CArray>}
>                         {<CString>} {<UnicodeString>} {<Expression>}
>-<UefiTokens>        ::= <TS> "CAPSULE_GUID" <Eq> <GuidValue> <EOL>
>+<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>}
>                         {<CapsuleData>}
>-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
>-<GuidCName>         ::= <CName>
>-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
> <Flags>             ::= <FlagName>
> <FlagName>          ::= {"PersistAcrossReset"}
>                         {"PersistAcrossReset" "," "InitiateReset"}
>                         {"PersistAcrossReset" "," "PopulateSystemTable"}
>                         {"PersistAcrossReset" "," "PopulateSystemTable"
>@@ -101,22 +98,20 @@ Conditional statements may be used anywhere
>within this section.
> <RelocFlags>        ::= {"RELOCS_STRIPPED"} {"RELOCS_RETAINED"}
> <KeyString>         ::= <Target> "_" <TagName> "_" <TargetArch>
> <Target>            ::= {Target} {"$(TARGET)"}
> <TagName>           ::= {TagName} {"$(TOOL_CHAIN_TAG)"}
> <FileStatements>    ::= <TS> {<type1>} {<type2>} {<type3>} {<type4>}
>-<type1>             ::= "FILE" <FvType1> <Eq> <NamedGuid> <Options1>
>-<type2>             ::= "FILE" <FvType2> <Eq> <NamedGuid> <Options2>
>+<type1>             ::= "FILE" <FvType1> <Eq> <NamedGuidOrPcd> <Options1>
>+<type2>             ::= "FILE" <FvType2> <Eq> <NamedGuidOrPcd> <Options2>
> <type3>             ::= "FILE" "RAW" <Eq> <NamedGuidOrPcd>
>                         <Options2>
>-<type4>             ::= "FILE" "NON_FFS_FILE" <Eq> [<NamedGuid>] <Options2>
>+<type4>             ::= "FILE" "NON_FFS_FILE" <Eq> [<NamedGuidOrPcd>]
><Options2>
> <type5>             ::= "FILE" "FV_IMAGE" <Eq> <NamedGuidOrPcd>
>                         <Options2>
> <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"}
> <FvType2>           ::= {"FREEFORM"} {"PEI_DXE_COMBO"} {"DRIVER"}
>                         {"DXE_CORE"} {"APPLICATION"} {"SMM_CORE"} {"SMM"}
>-<NamedGuid>         ::= {<RegistryFormatGUID>} {"$(NAMED_GUID)"}
>-<NamedGuidOrPcd>    ::= {<NamedGuid>} {"PCD(" <PcdName> ")"}
> <Options1>          ::= [<Use>] [<FileOpts>] [<RelocFlags>]
>                         "{" [<EOL>]
>                         <TS> {<Filename>} {<SectionData>} [<EOL>] <TS> "}"
>                         <EOL>
> <Options2>          ::= [<Use>] [<FileOpts>]
>@@ -197,15 +192,12 @@ Conditional statements may be used anywhere
>within this section.
> <SecData>           ::= <LeafSecType> [<ChkReloc>] <SectionOrFile>
> <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"} {"RAW"}
>                         {"FV_IMAGE"} {"DXE_DEPEX"} {"SMM_DEPEX"}
>                         {"UI"} {"PEI_DEPEX"} {"VERSION"}
> <SubTypeGuid>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] <SgData>
>-<SgData>            ::= "SUBTYPE_GUID" <MTS> <GuidValue> <Eq>
>+<SgData>            ::= "SUBTYPE_GUID" <MTS> <NamedGuidOrPcd> <Eq>
>                         <NormalFile> <EOL>
>-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
>-<GuidCName>         ::= <CName>
>-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
> <ChkReloc>          ::= if ((LeafSecType == "PE32"
>                         || LeafSecType == "TE")
>                         && (MODULE_TYPE == "SEC"
>                         || MODULE_TYPE == "PEI_CORE"
>                         || MODULE_TYPE == "PEIM")): [<RelocFlags>]
>@@ -219,11 +211,11 @@ Conditional statements may be used anywhere
>within this section.
>                         [<DxeAprioriSection>]
>                         <EncapSec>*
>                         <LeafSections>*
>                         <TS> "}" <EOL>
> <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
>-<GuidedSection>     ::= "GUIDED" <NamedGuid> [<GuidedOptions>]
>+<GuidedSection>     ::= "GUIDED" <NamedGuidOrPcd> [<GuidedOptions>]
>                         "{" <EOL>
>                         <MacroDefinition>*
>                         [<PeiAprioriSection>]
>                         [<DxeAprioriSection>]
>                         <EncapSec>*
>@@ -254,11 +246,11 @@ Conditional statements may be used anywhere
>within this section.
>                         [<TS> "READ_LOCK_CAP" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_LOCK_STATUS" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_ENABLED_CAP" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_DISABLED_CAP" <Eq> <TrueFalse> <EOL>]
>                         [<TS> "READ_STATUS" <Eq> <TrueFalse> <EOL>]
>-<FileSystemGuid>    ::= "FileSystemGuid" <Eq> <NamedGuid>
>+<FileSystemGuid>    ::= "FileSystemGuid" <Eq> <NamedGuidOrPcd>
> <DepexExpSection>   ::= if ( COMPONENT_TYPE == "LIBRARY"
>                         || LIBRARY_CLASS is declared in defines section of the
>                         INF
>                         || MODULE_TYPE == "USER_DEFINED" ):
>                         [<Depex>]
>@@ -286,11 +278,10 @@ Conditional statements may be used anywhere
>within this section.
>                         [<DepInstruct> {<EOL>} {<MTS>}]*
>                         ["end"] [<EOL>]
> <BoolStmt>          ::= {<Boolean>} {<BoolExpress>}
>                         {<GuidCName>} <EOL>
> <Boolean>           ::= {"TRUE"} {"FALSE"} {<GuidCName>}
>-<GuidCName>         ::= <CName> # A Guid C Name
> <BoolExpress>       ::= <GuidCName> [<OP> ["NOT"] <GuidCName> ]*
> <OP>                ::= <MTS> {"AND"} {"OR"} <MTS>
> <DepInstruct>       ::= "push" <Filename>
> <DxeDepexExp>       ::= "SECTION" <MTS> [<FfsAlignment>] <DxeExp>
> <DxeExp>            ::= "DXE_DEPEX_EXP" <Eq> <MTS>
>@@ -321,14 +312,14 @@ environment variable.
>
> **_TargetArch_**
>
> Only specific architectures are permitted - use of "common" is prohibited.
>
>-**_GuidValue_**
>+**_NamedGuidOrPcd_**
>
> When specifying the CAPSULE_GUID value for an FMP Capsule, the GUID
>value must
>-be set to 6dcbd5ed-e82d-4c44-bda1-7194199ad92a.
>+be same as 6dcbd5ed-e82d-4c44-bda1-7194199ad92a.
>
> #### Parameters
>
> **_UiCapsuleName_**
>
>diff --git a/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
>b/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
>index dceb77d..494122b 100644
>--- a/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
>+++ b/3_edk_ii_fdf_file_format/38_[fmppayload]_sections.md
>@@ -47,15 +47,15 @@ statement, if present, provides the information for
>VendorCode in an
> <FmpPayload>       ::= "[FmpPayload" "." <UiFmpName> "]" <EOL>
>                        <FmpTokens>
>                        <FmpFileData>{1,2}
> <UiFmpName>        ::= <Word>
> <FmpTokens>        ::= [<TS> "IMAGE_HEADER_INIT_VERSION" <Eq> <Hex2>
><EOL>]
>-                       <TS> "IMAGE_TYPE_ID" <Eq> <RegistryFormatGUID> <EOL>
>+                       <TS> "IMAGE_TYPE_ID" <Eq> <NamedGuidOrPcd> <EOL>
>                        [<TS> "IMAGE_INDEX" <Eq> <Hex2> <EOL>]
>                        [<TS> "HARDWARE_INSTANCE" <Eq> <Hex2> <EOL>]
>                        [<TS> "MONOTONIC_COUNT"<Eq> <NumValUint64> <EOL>]
>-                       [<TS> "CERTIFICATE_GUID"<Eq> <RegistryFormatGUID><EOL>]
>+                       [<TS> "CERTIFICATE_GUID"<Eq> <NamedGuidOrPcd><EOL>]
> <FmpFileData>      ::= <FileStatements>*
>                        <FvStatements>*
>                        <FdStatenents>*
> <FileStatements>   ::= <TS> "FILE" <Space> "DATA" <Eq> <Filename> <EOL>
> <FvStatements>     ::= "FV" <Eq> <FvNameOrFilename> <EOL>
>diff --git a/3_edk_ii_fdf_file_format/39_[rule]_sections.md
>b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
>index d9f974a..e23b474 100644
>--- a/3_edk_ii_fdf_file_format/39_[rule]_sections.md
>+++ b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
>@@ -1,9 +1,9 @@
> <!--- @file
>   3.9 [Rule] Sections
>
>-  Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR>
>+  Copyright (c) 2006-2018, 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:
>
>@@ -100,22 +100,15 @@ Conditional statements may be used anywhere
>within this section.
>                         <TS> "FILE" <MTS> "NON_FFS_FILE" <Eq>
>                         [<NamedGuid>] [<Options>] <EOL>
> <FileStatement1>    ::= <NamedGuid> [<RelocFlags> <MTS>] [<Options>]
><EOL>
> <FileStatement2>    ::= <TS> "FILE" <MTS> <FvType2> <Eq> <NamedGuid>
>                         [<Options>] <EOL>
>-<FileStatement3>    ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuidOrPcd>
>+<FileStatement3>    ::= <TS> "FILE" <MTS> "RAW" <Eq> <NamedGuid>
>                         [<Options>] <EOL>
> <FileStatement4>    ::= <TS> "FILE" <MTS> "FV_IMAGE" <Eq>
>-                        <NamedGuidOrPcd> [<Options>] <EOL>
>-<NamedGuid>         ::= {"$(NAMED_GUID)"} {<RegistryFormatGUID>}
>-                        {<Sym>} <MTS>
>-<Sym>               ::= "$(" <Word> ")"
>-<NamedGuidOrPcd>    ::= <NamedGuid> <MTS>
>-                        {"PCD(" <PcdName> ")"} {<GuidValue>} <MTS>
>-<GuidValue>         ::= {<GuidCName>} {<GuidStructure>}
>-<GuidCName>         ::= <CName>
>-<GuidStructure>     ::= {<RegistryFormatGUID>} {<CFormatGUID>}
>+                        <NamedGuid> [<Options>] <EOL>
>+<NamedGuid>         ::= {"$(NAMED_GUID)"} {<NamedGuidOrPcd>}
> <FvType1>           ::= {"SEC"} {"PEI_CORE"} {"PEIM"} {"PEI_DXE_COMBO"}
> <FvType2>           ::= {"FREEFORM"} {"DRIVER"} {"DXE_CORE"}
>                         {"APPLICATION"} {"SMM_CORE"} {"SMM"}
> <RelocFlags>        ::= {"RELOCS_STRIPPED" <MTS>}
>                         {"RELOCS_RETAINED" <MTS>}
>@@ -131,11 +124,11 @@ Conditional statements may be used anywhere
>within this section.
> <FileSpec>          ::= {<SimpleFile>} {<ComplexFile>} {<SbtGuid>}
> <SimpleFile>        ::= <LeafSecType> [<FileOpts>] <VarFile> <EOL>
> <LeafSecType>       ::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"}
>                         {"FV_IMAGE"} {"RAW"} {"DXE_DEPEX"} {"UI"}
>                         {"PEI_DEPEX"} {"SMM_DEPEX"} {"VERSION"}
>-<SbtGuid>           ::= "SUBTYPE_GUID" <MTS> <GuidValue> <MTS> <FName>
><EOL>
>+<SbtGuid>           ::= "SUBTYPE_GUID" <MTS> <NamedGuid> <MTS> <FName>
><EOL>
> <VarFile>           ::= {<FilenameVariable>} {<FName>} {<Ext>}
> <FName>             ::= [<PATH>] <Word> "." <Word>
> <FilenameVariable>  ::= "$(INF_OUTPUT)/$(MODULE_NAME)" "." <Word>
> <ComplexFile>       ::= "{" <EOL>
>                         <EncapSection>*
>@@ -146,11 +139,11 @@ Conditional statements may be used anywhere
>within this section.
>                         "{" [<EOL>]
>                         <EncapSec>*
>                         <LeafSections> <EOL>*
>                         <TS> "}" <EOL>
> <CompType>          ::= {"PI_STD"} {"PI_NONE"} <MTS>
>-<GuidedSection>     ::= "GUIDED" <MTS> "$(NAMED_GUID)" <MTS>
>[<GAttr>]
>+<GuidedSection>     ::= "GUIDED" <MTS> <NamedGuid> <MTS> [<GAttr>]
>                         "{" <EOL>
>                         <EncapSec>*
>                         <LeafSections>*
>                         <TS> "}" <EOL>
> <GAttr>             ::= [<GuidAttrPR>] [<GuidAttrASV>] [<GuidHeaderSize>]
>@@ -170,11 +163,11 @@ Conditional statements may be used anywhere
>within this section.
> <SmmDepSec>         ::= "SMM_DEPEX" <MTS> <DdFileType> [<FileOrExt>]
><EOL>
> <UiSec>             ::= "UI" <MTS> <UiFileType> [<FileOrExt>] <EOL>
> <VerSec>            ::= "VERSION" <MTS> <VerFileType> [<FileOrExt>] <EOL>
> <PeiDepSec>         ::= "PEI_DEPEX" <MTS> <PdFileType>
>                         [<FileOrExt>] <EOL>
>-<SubtypeGuidSec>    ::= "SUBTYPE_GUID" <MTS> <GuidValue> <MTS>
>+<SubtypeGuidSec>    ::= "SUBTYPE_GUID" <MTS> <NamedGuid> <MTS>
>                         <File> <EOL>
> <FileOrExt>         ::= {<VarFile>} {<Ext>} <MTS>
> <FileOrExtOrPcd>    ::= {<VarFile>} {<Ext>} {"PCD(" <PcdName> ")"}
> <Ext>               ::= <FS> "." [a-zA-Z][a-zA-Z0-9]{0,}
> <C16FileType>       ::= "COMPAT16" [<FfsAlignment>]
>diff --git a/README.md b/README.md
>index 042e2ca..c2767fb 100644
>--- a/README.md
>+++ b/README.md
>@@ -210,5 +210,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights
>reserved.
> |            | [#585](https://bugzilla.tianocore.org/show_bug.cgi?id=585) FDF
>Spec: Update the FDF_SPECIFICATION version to 0x0001001B or 1.27
>|               |
> | 1.28       | Update version to 1.28
>| March 2018    |
> |            | Per PI 1.6 to extend FFS alignment to 16M
>|               |
> |            | Per PI 1.6 to support FV extended header entry contain the used size
>of FV                                                                                                 |               |
> |            | Add !error statement section
>|               |
>+|            | clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec
>|               |
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-22  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-22  2:08 [Patch V3] FDF Spec: clean up the <NamedGuidOrPcd> and <NamedGuid> usage in spec Yonghong Zhu
2018-06-22  6:21 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox