[edk2] [edk2-DscSpecification PATCH] Allow mixed PCD access methods

Michael Kinney posted 1 patch 6 years, 10 months ago
Failed in applying to current master (apply log)
2_dsc_overview/28_pcd_section_processing.md  | 12 ++++++++++--
3_edk_ii_dsc_file_format/310_pcd_sections.md | 15 +++++++++++----
README.md                                    |  5 +++--
3 files changed, 24 insertions(+), 8 deletions(-)
[edk2] [edk2-DscSpecification PATCH] Allow mixed PCD access methods
Posted by Michael Kinney 6 years, 10 months ago
https://bugzilla.tianocore.org/show_bug.cgi?id=521

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 2_dsc_overview/28_pcd_section_processing.md  | 12 ++++++++++--
 3_edk_ii_dsc_file_format/310_pcd_sections.md | 15 +++++++++++----
 README.md                                    |  5 +++--
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 60e7de7..0969b41 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -103,10 +103,18 @@ of three categories:
 **Note:** For the dynamic types of PCDs, using an `$(Arch)` extension other
 than `common` in the section header is not valid.
 **********
-**Warning:** A PCD can only use one type for all modules. It is not permissible
-to list a PCD in a PcdsFixedAtBuild section and also list it in a
+**Warning:** A PCD can only use one type for all source modules. It is not
+permissible to list a PCD in a PcdsFixedAtBuild section and also list it in a
 PcdsPatchableInModule section.
 **********
+**Note:** Binary modules included in a platform build are permitted to use the
+PatchableInModule or DynamicEx access methods (the Binary module must specify
+which of these two methods were used to create the binary module) regardless of
+the method used for a given PCD in modules built from source. The build supports
+binary modules that use the same or different PCD access method than the source
+modules or other binary modules. The build parser must break with an error if a
+PCD is listed as FixedAtBuild or Dynamic (not DynamicEx) in the Binary INF.
+**********
 
 Datum Types for PCD values are either Boolean (`BOOLEAN` - 1 byte), numeric
 (`UINT8` - 1 byte, `UINT16` - 2 bytes, `UINT32` - 4 bytes or `UINT64` - 8
diff --git a/3_edk_ii_dsc_file_format/310_pcd_sections.md b/3_edk_ii_dsc_file_format/310_pcd_sections.md
index bf20cc5..c061e5b 100644
--- a/3_edk_ii_dsc_file_format/310_pcd_sections.md
+++ b/3_edk_ii_dsc_file_format/310_pcd_sections.md
@@ -75,10 +75,17 @@ value specified in the INF file or the default value listed in the DEC file
 (for modules that do not list a preferred value). This same rule applies to
 `FeatureFlag` PCDs.
 
-If the INF values differ (or are not listed) and the access methods are
-different, then the build must break. A PCD can only use a single method of
-access for the platform and all modules in the platform that use the PCD must
-use the same access method.
+If the Source INF values differ (or are not listed) and the access methods are
+different, then the build must break. All source modules in a platform must use
+the same PCD same access method.
+
+Binary modules included in a platform build are permitted to use the
+PatchableInModule or DynamicEx access methods (the Binary module must specify
+which of these two methods were used to create the binary module) regardless of
+the method used for a given PCD in modules built from source. The build supports
+binary modules that use the same or different PCD access method than the source
+modules or other binary modules. The build parser must break with an error if a
+PCD is listed as FixedAtBuild or Dynamic (not DynamicEx) in the Binary INF.
 
 If no value is entered in the DSC file, and no INF files provide a preferred
 value, then the DEC file's default value must be used.
diff --git a/README.md b/README.md
index 1d1f99c..eb6966f 100644
--- a/README.md
+++ b/README.md
@@ -176,7 +176,8 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | Update the DSC_SPECIFICATION version to 0x0001001A                                                                                                                                                                                                                                           |                |
 |            | Revised WORKSPACE wording for updated build system that can handle packages located outside of the WORKSPACE directory tree (refer to the TianoCore.org/ EDKII website for additional instructions on setting up a development environment).                                                 |                |
 |            | Added new system environment variables used by the build system.                                                                                                                                                                                                                             |                |
-| 1.27       | Convert to GitBooks                                                                                                                                                                                                                                                                          | April 2017     |
+| 1.27       | Convert to GitBooks                                                                                                                                                                                                                                                                          | May 2017       |
 |            | [#351](https://bugzilla.tianocore.org/show_bug.cgi?id=351) [DSC Spec] Extend macro usage in the !include statement                                                                                                                                                                           |                |
 |            | [#484](https://bugzilla.tianocore.org/show_bug.cgi?id=484) DSC spec: support Prebuild and Postbuild in the [Defines] section                                                                                                                                                                 |                |
-|            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                                                                                                                                            |               |
+|            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                                                                                                                                            |                |
+|            | [#521](https://bugzilla.tianocore.org/show_bug.cgi?id=521) DSC spec: add clarification for mixed PCD usage in the DSC spec                                                                                                                                                                   |                |
-- 
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [edk2-DscSpecification PATCH] Allow mixed PCD access methods
Posted by Zhu, Yonghong 6 years, 10 months ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Kinney, Michael D 
Sent: Sunday, May 28, 2017 4:03 AM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
Subject: [edk2-DscSpecification PATCH] Allow mixed PCD access methods

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

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 2_dsc_overview/28_pcd_section_processing.md  | 12 ++++++++++--  3_edk_ii_dsc_file_format/310_pcd_sections.md | 15 +++++++++++----
 README.md                                    |  5 +++--
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 60e7de7..0969b41 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -103,10 +103,18 @@ of three categories:
 **Note:** For the dynamic types of PCDs, using an `$(Arch)` extension other  than `common` in the section header is not valid.
 **********
-**Warning:** A PCD can only use one type for all modules. It is not permissible -to list a PCD in a PcdsFixedAtBuild section and also list it in a
+**Warning:** A PCD can only use one type for all source modules. It is 
+not permissible to list a PCD in a PcdsFixedAtBuild section and also 
+list it in a
 PcdsPatchableInModule section.
 **********
+**Note:** Binary modules included in a platform build are permitted to 
+use the PatchableInModule or DynamicEx access methods (the Binary 
+module must specify which of these two methods were used to create the 
+binary module) regardless of the method used for a given PCD in modules 
+built from source. The build supports binary modules that use the same 
+or different PCD access method than the source modules or other binary 
+modules. The build parser must break with an error if a PCD is listed as FixedAtBuild or Dynamic (not DynamicEx) in the Binary INF.
+**********
 
 Datum Types for PCD values are either Boolean (`BOOLEAN` - 1 byte), numeric  (`UINT8` - 1 byte, `UINT16` - 2 bytes, `UINT32` - 4 bytes or `UINT64` - 8 diff --git a/3_edk_ii_dsc_file_format/310_pcd_sections.md b/3_edk_ii_dsc_file_format/310_pcd_sections.md
index bf20cc5..c061e5b 100644
--- a/3_edk_ii_dsc_file_format/310_pcd_sections.md
+++ b/3_edk_ii_dsc_file_format/310_pcd_sections.md
@@ -75,10 +75,17 @@ value specified in the INF file or the default value listed in the DEC file  (for modules that do not list a preferred value). This same rule applies to  `FeatureFlag` PCDs.
 
-If the INF values differ (or are not listed) and the access methods are -different, then the build must break. A PCD can only use a single method of -access for the platform and all modules in the platform that use the PCD must -use the same access method.
+If the Source INF values differ (or are not listed) and the access 
+methods are different, then the build must break. All source modules in 
+a platform must use the same PCD same access method.
+
+Binary modules included in a platform build are permitted to use the 
+PatchableInModule or DynamicEx access methods (the Binary module must 
+specify which of these two methods were used to create the binary 
+module) regardless of the method used for a given PCD in modules built 
+from source. The build supports binary modules that use the same or 
+different PCD access method than the source modules or other binary 
+modules. The build parser must break with an error if a PCD is listed as FixedAtBuild or Dynamic (not DynamicEx) in the Binary INF.
 
 If no value is entered in the DSC file, and no INF files provide a preferred  value, then the DEC file's default value must be used.
diff --git a/README.md b/README.md
index 1d1f99c..eb6966f 100644
--- a/README.md
+++ b/README.md
@@ -176,7 +176,8 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | Update the DSC_SPECIFICATION version to 0x0001001A                                                                                                                                                                                                                                           |                |
 |            | Revised WORKSPACE wording for updated build system that can handle packages located outside of the WORKSPACE directory tree (refer to the TianoCore.org/ EDKII website for additional instructions on setting up a development environment).                                                 |                |
 |            | Added new system environment variables used by the build system.                                                                                                                                                                                                                             |                |
-| 1.27       | Convert to GitBooks                                                                                                                                                                                                                                                                          | April 2017     |
+| 1.27       | Convert to GitBooks                                                                                                                                                                                                                                                                          | May 2017       |
 |            | [#351](https://bugzilla.tianocore.org/show_bug.cgi?id=351) [DSC Spec] Extend macro usage in the !include statement                                                                                                                                                                           |                |
 |            | [#484](https://bugzilla.tianocore.org/show_bug.cgi?id=484) DSC spec: support Prebuild and Postbuild in the [Defines] section                                                                                                                                                                 |                |
-|            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                                                                                                                                            |               |
+|            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                                                                                                                                            |                |
+|            | [#521](https://bugzilla.tianocore.org/show_bug.cgi?id=521) DSC spec: add clarification for mixed PCD usage in the DSC spec                                                                                                                                                                   |                |
--
2.6.3.windows.1

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