[edk2] [edk2-DscSpecification PATCH] Update Precedence of PCD Values

Michael Kinney posted 1 patch 6 years, 11 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
2_dsc_overview/28_pcd_section_processing.md | 56 ++++++++++++++---------------
README.md                                   |  5 +--
2 files changed, 31 insertions(+), 30 deletions(-)
[edk2] [edk2-DscSpecification PATCH] Update Precedence of PCD Values
Posted by Michael Kinney 6 years, 11 months ago
https://bugzilla.tianocore.org/show_bug.cgi?id=519

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 | 56 ++++++++++++++---------------
 README.md                                   |  5 +--
 2 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 60e7de7..3736cde 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -312,45 +312,45 @@ string plus 1 byte for the null terminator, for L"string" entries to be the
 length of the UCS-2 character string plus 2 bytes for the null terminator and
 the exact length of a byte array.
 
-Precedence for determining PCD values (high to low, last in position) is as
-follows:
+The values that are assigned to individual PCDs required by a build may come
+from different locations and different meta-data files. The following provides
+the precedence (high to low) to assign a value to a PCD.
 
-* A PCD value defined by a MACRO, ("MacroName" in this example), and the Macro
-  is defined on the command-line using -D MacroName=Value
+* Command-line, `--pcd` flags (left most has higher priority)
 
-* A PCD value defined in the FDF file SET statements
+* DSC file, p FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined
+  in the `[Components]` INF scoping `<Pcd*>` section statements
 
-* A PCD value defined positionally in the FDF file
+* FDF file, grammar describing automatic assignment of PCD values
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in the
-  `[Components]` INF scoping section
+* FDF file, SET statements within a section
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in a PCD
-  access method section with an architectural modifier (the access method for a
-  PCD in a section with an architectural modifier takes precedence over any
-  other access method)
+* FDF file, SET statement in the [Defines] section
 
-In this example, modules built for IA32 architecture, the PCD will use
-PatchableInModule access, while modules built for all other architectures, the
-PCD will use the FixedAtBuild access method:
+* DSC file, a FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined
+  in a PCD access method section with an architectural modifier.
 
-```ini
-[PcdsFixedAtBuild.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
+  In this example, modules built for IA32 architecture, the PCD will use
+  PatchableInModule access, while modules built for all other architectures, the
+  PCD will use the FixedAtBuild access method:
 
-[PcdsPatchableInModule.IA32]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
-```
+  ```ini
+  [PcdsFixedAtBuild.common]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
+
+  [PcdsPatchableInModule.IA32]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
+  ```
 
-* A PCD value defined in a PCD access method (item type) section for common
-  architectures
+* DSC file, A PCD value defined in a PCD access method (item type) global
+  `[Pcd*]` section for common architectures.
 
-* A PCD value defined in an INF (provided all INF files have defined the same
-  value)
+* INF file, PCD sections, Default Values (provided all INF files have defined
+  the same value)
 
-* A PCD default value defined in the DEC file that declares the PCD.
+* DEC file, PCD sections, Default Values
 
 **********
 **Note:** Dynamic or DynamicEx PCD sections with architectural modifiers is not
diff --git a/README.md b/README.md
index 1d1f99c..3bec3b3 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                                                                                                                                                                            |                |
+|            | [#519](https://bugzilla.tianocore.org/show_bug.cgi?id=519) DSC Spec: update Precedence of PCD Values                                                                                                                                                                                         |                |
-- 
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] Update Precedence of PCD Values
Posted by Zhu, Yonghong 6 years, 11 months ago
Hi Mike,

1. Is this 'p' typo error is sentence "DSC file, p FeatureFlag, PatchableInModule or FixedAtBuild PCD value"?
2. How about remove the "FeatureFlag, PatchableInModule or FixedAtBuild" from below sentence since current Dynamic/DynamicEx also can have the specific arch info.
"DSC file, a FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in a PCD access method section with an architectural modifier"

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Kinney, Michael D 
Sent: Sunday, May 28, 2017 3:35 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] Update Precedence of PCD Values

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

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 | 56 ++++++++++++++---------------
 README.md                                   |  5 +--
 2 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 60e7de7..3736cde 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -312,45 +312,45 @@ string plus 1 byte for the null terminator, for L"string" entries to be the  length of the UCS-2 character string plus 2 bytes for the null terminator and  the exact length of a byte array.
 
-Precedence for determining PCD values (high to low, last in position) is as
-follows:
+The values that are assigned to individual PCDs required by a build may 
+come from different locations and different meta-data files. The 
+following provides the precedence (high to low) to assign a value to a PCD.
 
-* A PCD value defined by a MACRO, ("MacroName" in this example), and the Macro
-  is defined on the command-line using -D MacroName=Value
+* Command-line, `--pcd` flags (left most has higher priority)
 
-* A PCD value defined in the FDF file SET statements
+* DSC file, p FeatureFlag, PatchableInModule or FixedAtBuild PCD value 
+defined
+  in the `[Components]` INF scoping `<Pcd*>` section statements
 
-* A PCD value defined positionally in the FDF file
+* FDF file, grammar describing automatic assignment of PCD values
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in the
-  `[Components]` INF scoping section
+* FDF file, SET statements within a section
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in a PCD
-  access method section with an architectural modifier (the access method for a
-  PCD in a section with an architectural modifier takes precedence over any
-  other access method)
+* FDF file, SET statement in the [Defines] section
 
-In this example, modules built for IA32 architecture, the PCD will use -PatchableInModule access, while modules built for all other architectures, the -PCD will use the FixedAtBuild access method:
+* DSC file, a FeatureFlag, PatchableInModule or FixedAtBuild PCD value 
+defined
+  in a PCD access method section with an architectural modifier.
 
-```ini
-[PcdsFixedAtBuild.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
+  In this example, modules built for IA32 architecture, the PCD will 
+ use  PatchableInModule access, while modules built for all other 
+ architectures, the  PCD will use the FixedAtBuild access method:
 
-[PcdsPatchableInModule.IA32]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
-```
+  ```ini
+  [PcdsFixedAtBuild.common]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|F
+ ALSE
+
+  [PcdsPatchableInModule.IA32]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|F
+ ALSE
+  ```
 
-* A PCD value defined in a PCD access method (item type) section for common
-  architectures
+* DSC file, A PCD value defined in a PCD access method (item type) 
+global
+  `[Pcd*]` section for common architectures.
 
-* A PCD value defined in an INF (provided all INF files have defined the same
-  value)
+* INF file, PCD sections, Default Values (provided all INF files have 
+defined
+  the same value)
 
-* A PCD default value defined in the DEC file that declares the PCD.
+* DEC file, PCD sections, Default Values
 
 **********
 **Note:** Dynamic or DynamicEx PCD sections with architectural modifiers is not diff --git a/README.md b/README.md index 1d1f99c..3bec3b3 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                                                                                                                                                                            |                |
+|            | [#519](https://bugzilla.tianocore.org/show_bug.cgi?id=519) DSC Spec: update Precedence of PCD Values                                                                                                                                                                                         |                |
--
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] Update Precedence of PCD Values
Posted by Kinney, Michael D 6 years, 11 months ago
Yonghong,

Thanks for the feedback.  I have sent V2 with these corrections.

Mike

-----Original Message-----
From: Zhu, Yonghong 
Sent: Tuesday, May 30, 2017 6:41 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: RE: [edk2-DscSpecification PATCH] Update Precedence of PCD Values

Hi Mike,

1. Is this 'p' typo error is sentence "DSC file, p FeatureFlag, PatchableInModule or FixedAtBuild PCD value"?
2. How about remove the "FeatureFlag, PatchableInModule or FixedAtBuild" from below sentence since current Dynamic/DynamicEx also can have the specific arch info.
"DSC file, a FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in a PCD access method section with an architectural modifier"

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Kinney, Michael D 
Sent: Sunday, May 28, 2017 3:35 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] Update Precedence of PCD Values

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

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 | 56 ++++++++++++++---------------
 README.md                                   |  5 +--
 2 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/2_dsc_overview/28_pcd_section_processing.md b/2_dsc_overview/28_pcd_section_processing.md
index 60e7de7..3736cde 100644
--- a/2_dsc_overview/28_pcd_section_processing.md
+++ b/2_dsc_overview/28_pcd_section_processing.md
@@ -312,45 +312,45 @@ string plus 1 byte for the null terminator, for L"string" entries to be the  length of the UCS-2 character string plus 2 bytes for the null terminator and  the exact length of a byte array.
 
-Precedence for determining PCD values (high to low, last in position) is as
-follows:
+The values that are assigned to individual PCDs required by a build may 
+come from different locations and different meta-data files. The 
+following provides the precedence (high to low) to assign a value to a PCD.
 
-* A PCD value defined by a MACRO, ("MacroName" in this example), and the Macro
-  is defined on the command-line using -D MacroName=Value
+* Command-line, `--pcd` flags (left most has higher priority)
 
-* A PCD value defined in the FDF file SET statements
+* DSC file, p FeatureFlag, PatchableInModule or FixedAtBuild PCD value 
+defined
+  in the `[Components]` INF scoping `<Pcd*>` section statements
 
-* A PCD value defined positionally in the FDF file
+* FDF file, grammar describing automatic assignment of PCD values
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in the
-  `[Components]` INF scoping section
+* FDF file, SET statements within a section
 
-* A FeatureFlag, PatchableInModule or FixedAtBuild PCD value defined in a PCD
-  access method section with an architectural modifier (the access method for a
-  PCD in a section with an architectural modifier takes precedence over any
-  other access method)
+* FDF file, SET statement in the [Defines] section
 
-In this example, modules built for IA32 architecture, the PCD will use -PatchableInModule access, while modules built for all other architectures, the -PCD will use the FixedAtBuild access method:
+* DSC file, a FeatureFlag, PatchableInModule or FixedAtBuild PCD value 
+defined
+  in a PCD access method section with an architectural modifier.
 
-```ini
-[PcdsFixedAtBuild.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
+  In this example, modules built for IA32 architecture, the PCD will 
+ use  PatchableInModule access, while modules built for all other 
+ architectures, the  PCD will use the FixedAtBuild access method:
 
-[PcdsPatchableInModule.IA32]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-  gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
-```
+  ```ini
+  [PcdsFixedAtBuild.common]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|F
+ ALSE
+
+  [PcdsPatchableInModule.IA32]
+    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
+    
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|F
+ ALSE
+  ```
 
-* A PCD value defined in a PCD access method (item type) section for common
-  architectures
+* DSC file, A PCD value defined in a PCD access method (item type) 
+global
+  `[Pcd*]` section for common architectures.
 
-* A PCD value defined in an INF (provided all INF files have defined the same
-  value)
+* INF file, PCD sections, Default Values (provided all INF files have 
+defined
+  the same value)
 
-* A PCD default value defined in the DEC file that declares the PCD.
+* DEC file, PCD sections, Default Values
 
 **********
 **Note:** Dynamic or DynamicEx PCD sections with architectural modifiers is not diff --git a/README.md b/README.md index 1d1f99c..3bec3b3 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                                                                                                                                                                            |                |
+|            | [#519](https://bugzilla.tianocore.org/show_bug.cgi?id=519) DSC Spec: update Precedence of PCD Values                                                                                                                                                                                         |                |
--
2.6.3.windows.1

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