[edk2] [Patch] FDF Spec: support varstore template generation with a [FV] section

Yonghong Zhu posted 1 patch 5 years, 10 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
3_edk_ii_fdf_file_format/36_[fv]_sections.md | 15 +++++++++++++++
README.md                                    |  1 +
2 files changed, 16 insertions(+)
[edk2] [Patch] FDF Spec: support varstore template generation with a [FV] section
Posted by Yonghong Zhu 5 years, 10 months ago
Add format to support varstore template generation with a dedicated
[FV] section.

Code bug: https://bugzilla.tianocore.org/show_bug.cgi?id=932

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/36_[fv]_sections.md | 15 +++++++++++++++
 README.md                                    |  1 +
 2 files changed, 16 insertions(+)

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 2f79d1c..cb3698d 100644
--- a/3_edk_ii_fdf_file_format/36_[fv]_sections.md
+++ b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
@@ -73,10 +73,14 @@ Conditional statements may be used anywhere within this section.
 <BinaryFile>        ::= <PATH> <File> [<EOL>]
 <FvStatements>      ::= [<BlockStatements>]
                         [<FvAlignment>]
                         [<FvAttributes>]
                         [<FileSystemGuid>]
+                        [<VariableSignatureGuid>]
+                        [<VariabeRegionSize>]
+                        [<FtwWorkingSpaceSize>]
+                        [<FtwSpareSpaceSize>]
                         [<FvNameGuid>]
                         [<FvUsedSize>]
                         [<FvNameString>]
                         [<PeiAprioriSection>]
                         [<DxeAprioriSection>]
@@ -108,10 +112,14 @@ Conditional statements may be used anywhere within this section.
                         [<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> <NamedGuidOrPcd> <EOL>
+<VariableSignatureGuid> ::= <TS> "VariableSignatureGuid" <Eq> <NamedGuidOrPcd> <EOL>
+<VariabeRegionSize> ::= <TS> "VariabeRegionSize" <Eq> <UINT32> <EOL>
+<FtwWorkingSpaceSize>   ::= <TS> "FtwWorkingSpaceSize" <Eq> <UINT32> <EOL>
+<FtwSpareSpaceSize>     ::= <TS> "FtwSpareSpaceSize" <Eq> <UINT32> <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>
@@ -278,10 +286,17 @@ Conditional statements may be used anywhere within this section.
 <GuidStmt>          ::= {"before"} {"after"} <MTS> <Filename>
 <SmmDepexExp>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>] "SMM_DEPEX_EXP"
                         <Eq> "{" [<EOL>] <DxeDepex> "}" <EOL>
 ```
 
+**********
+**Note:** The `VariableSignatureGuid` and `VariabeRegionSize` must exist when
+`FileSystemGuid` value is same as FFF12B8D-7696-4C8B-A9852747075B4F50.
+The `VariableSignatureGuid`, `VariabeRegionSize` and `FtwWorkingSpaceSize` must
+exist when `FileSystemGuid` value is same as 9e58292b-7c68-497d-a0ce6500fd9f1b95.
+**********
+
 #### Restrictions
 
 **_Filename_**
 
 For BINARY ONLY content (`UEFI_DRIVER` and `UEFI_APPLICATION` .efi files) the
diff --git a/README.md b/README.md
index c2767fb..d5a31b1 100644
--- a/README.md
+++ b/README.md
@@ -211,5 +211,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 | 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                                                                                                                |               |
+|            | support varstore template generation with a [FV] section                                                                                                                   |               |
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] FDF Spec: support varstore template generation with a [FV] section
Posted by Gao, Liming 5 years, 10 months ago
Yonghong:
  Below statement is wrong. Please remove it. FTW region header must be filled with guid 9e58292b-7c68-497d-a0ce6500fd9f1b95. This GUID is not FileSystemGuid. 

+The `VariableSignatureGuid`, `VariabeRegionSize` and `FtwWorkingSpaceSize` must
+exist when `FileSystemGuid` value is same as 9e58292b-7c68-497d-a0ce6500fd9f1b95.

Thanks
Liming
>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Wednesday, June 27, 2018 1:58 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
><michael.d.kinney@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
>Subject: [Patch] FDF Spec: support varstore template generation with a [FV]
>section
>
>Add format to support varstore template generation with a dedicated
>[FV] section.
>
>Code bug: https://bugzilla.tianocore.org/show_bug.cgi?id=932
>
>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/36_[fv]_sections.md | 15 +++++++++++++++
> README.md                                    |  1 +
> 2 files changed, 16 insertions(+)
>
>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 2f79d1c..cb3698d 100644
>--- a/3_edk_ii_fdf_file_format/36_[fv]_sections.md
>+++ b/3_edk_ii_fdf_file_format/36_[fv]_sections.md
>@@ -73,10 +73,14 @@ Conditional statements may be used anywhere within
>this section.
> <BinaryFile>        ::= <PATH> <File> [<EOL>]
> <FvStatements>      ::= [<BlockStatements>]
>                         [<FvAlignment>]
>                         [<FvAttributes>]
>                         [<FileSystemGuid>]
>+                        [<VariableSignatureGuid>]
>+                        [<VariabeRegionSize>]
>+                        [<FtwWorkingSpaceSize>]
>+                        [<FtwSpareSpaceSize>]
>                         [<FvNameGuid>]
>                         [<FvUsedSize>]
>                         [<FvNameString>]
>                         [<PeiAprioriSection>]
>                         [<DxeAprioriSection>]
>@@ -108,10 +112,14 @@ Conditional statements may be used anywhere
>within this section.
>                         [<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> <NamedGuidOrPcd>
><EOL>
>+<VariableSignatureGuid> ::= <TS> "VariableSignatureGuid" <Eq>
><NamedGuidOrPcd> <EOL>
>+<VariabeRegionSize> ::= <TS> "VariabeRegionSize" <Eq> <UINT32> <EOL>
>+<FtwWorkingSpaceSize>   ::= <TS> "FtwWorkingSpaceSize" <Eq> <UINT32>
><EOL>
>+<FtwSpareSpaceSize>     ::= <TS> "FtwSpareSpaceSize" <Eq> <UINT32> <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>
>@@ -278,10 +286,17 @@ Conditional statements may be used anywhere
>within this section.
> <GuidStmt>          ::= {"before"} {"after"} <MTS> <Filename>
> <SmmDepexExp>       ::= <TS> "SECTION" <MTS> [<FfsAlignment>]
>"SMM_DEPEX_EXP"
>                         <Eq> "{" [<EOL>] <DxeDepex> "}" <EOL>
> ```
>
>+**********
>+**Note:** The `VariableSignatureGuid` and `VariabeRegionSize` must exist
>when
>+`FileSystemGuid` value is same as FFF12B8D-7696-4C8B-A9852747075B4F50.
>+The `VariableSignatureGuid`, `VariabeRegionSize` and
>`FtwWorkingSpaceSize` must
>+exist when `FileSystemGuid` value is same as 9e58292b-7c68-497d-
>a0ce6500fd9f1b95.
>+**********
>+
> #### Restrictions
>
> **_Filename_**
>
> For BINARY ONLY content (`UEFI_DRIVER` and `UEFI_APPLICATION` .efi files)
>the
>diff --git a/README.md b/README.md
>index c2767fb..d5a31b1 100644
>--- a/README.md
>+++ b/README.md
>@@ -211,5 +211,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights
>reserved.
> | 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
>|               |
>+|            | support varstore template generation with a [FV] section
>|               |
>--
>2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel