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

Michael Kinney posted 1 patch 131 weeks ago
Failed in applying to current master (apply log)
2_fdf_design_discussion/21_processing_overview.md | 26 +++++++++++++++++++----
README.md                                         |  3 ++-
2 files changed, 24 insertions(+), 5 deletions(-)

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

Posted by Michael Kinney 131 weeks ago
https://bugzilla.tianocore.org/show_bug.cgi?id=520

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_fdf_design_discussion/21_processing_overview.md | 26 +++++++++++++++++++----
 README.md                                         |  3 ++-
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/2_fdf_design_discussion/21_processing_overview.md b/2_fdf_design_discussion/21_processing_overview.md
index ddef010..7a045dd 100644
--- a/2_fdf_design_discussion/21_processing_overview.md
+++ b/2_fdf_design_discussion/21_processing_overview.md
@@ -105,13 +105,31 @@ warning message on the PCD defined in the DSC file. Default values from DEC
 files are not permitted in the EDK II build system for PCDs specified in the
 FDF file.
 
-PCD values set in this file override PCD settings in other EDK II meta-data
-files. Note that PCDs settings are positional within the FDF file.
-
-Additionally, the PCDs used in the FDF file must be specified as:
+The PCDs used in the FDF file must be specified as:
 
 `PcdTokenSpaceGuidCName.PcdCName`
 
+### 2.1.2 Precedence of PCD Values
+
+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.
+
+* Command-line, `--pcd` flags (left most has higher priority)
+* DSC file, Component INF `<Pcd*>` section statements
+* FDF file, grammar describing automatic assignment of PCD values
+* FDF file, SET statements within a section
+* FDF file, SET statement in the [Defines] section
+* DSC file, global [Pcd*] sections
+* INF file, PCD sections, Default Values
+* DEC file, PCD sections, Default Values
+
+In addition to the above precedence rules, PCDs set in sections with
+architectural modifiers take precedence over PCD sections that are common to
+all architectures.
+
+If a PCD is listed in the same section multiple times, the last one is used.
+
 #### PCD RULES
 
 There are no PCD sections defined for the FDF file. PCD values are assigned in
diff --git a/README.md b/README.md
index 131246d..bad0930 100644
--- a/README.md
+++ b/README.md
@@ -194,7 +194,7 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | PACKAGES_PATH and EDK_TOOLS_BIN, used by the build system.                                                                                                                 |               |
 |            | Allow INF statements in FD regions.                                                                                                                                        |               |
 |            | Clarified [UserExtensions] content in chapter 2 (to match implementation)                                                                                                  |               |
-| 1.28       | Convert to GitBooks                                                                                                                                                        | April 2017    |
+| 1.28       | Convert to GitBooks                                                                                                                                                        | May 2017      |
 |            | [#426](https://bugzilla.tianocore.org/show_bug.cgi?id=426) IMAGE_TYPE_ID must be provided with value, FDF should mark it as required section                               |               |
 |            | [#373](https://bugzilla.tianocore.org/show_bug.cgi?id=373) Conditional statement examples incorrect                                                                        |               |
 |            | [#461](https://bugzilla.tianocore.org/show_bug.cgi?id=461) FDF Spec: add a super script number for the <FmpFileData>                                                       |               |
@@ -206,3 +206,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | [#142](https://bugzilla.tianocore.org/show_bug.cgi?id=142) Update EDK II FDF Specification to allow sections in any order                                                  |               |
 |            | [#478](https://bugzilla.tianocore.org/show_bug.cgi?id=478) FDF spec: extend the <FmpFileData> to support <FvStatements> and <FdStatenents>                                 |               |
 |            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                          |               |
+|            | [#520](https://bugzilla.tianocore.org/show_bug.cgi?id=520) FDF 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-FdfSpecification PATCH] Update Precedence of PCD Values

Posted by Zhu, Yonghong 131 weeks ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


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

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

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_fdf_design_discussion/21_processing_overview.md | 26 +++++++++++++++++++----
 README.md                                         |  3 ++-
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/2_fdf_design_discussion/21_processing_overview.md b/2_fdf_design_discussion/21_processing_overview.md
index ddef010..7a045dd 100644
--- a/2_fdf_design_discussion/21_processing_overview.md
+++ b/2_fdf_design_discussion/21_processing_overview.md
@@ -105,13 +105,31 @@ warning message on the PCD defined in the DSC file. Default values from DEC  files are not permitted in the EDK II build system for PCDs specified in the  FDF file.
 
-PCD values set in this file override PCD settings in other EDK II meta-data -files. Note that PCDs settings are positional within the FDF file.
-
-Additionally, the PCDs used in the FDF file must be specified as:
+The PCDs used in the FDF file must be specified as:
 
 `PcdTokenSpaceGuidCName.PcdCName`
 
+### 2.1.2 Precedence of PCD Values
+
+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.
+
+* Command-line, `--pcd` flags (left most has higher priority)
+* DSC file, Component INF `<Pcd*>` section statements
+* FDF file, grammar describing automatic assignment of PCD values
+* FDF file, SET statements within a section
+* FDF file, SET statement in the [Defines] section
+* DSC file, global [Pcd*] sections
+* INF file, PCD sections, Default Values
+* DEC file, PCD sections, Default Values
+
+In addition to the above precedence rules, PCDs set in sections with 
+architectural modifiers take precedence over PCD sections that are 
+common to all architectures.
+
+If a PCD is listed in the same section multiple times, the last one is used.
+
 #### PCD RULES
 
 There are no PCD sections defined for the FDF file. PCD values are assigned in diff --git a/README.md b/README.md index 131246d..bad0930 100644
--- a/README.md
+++ b/README.md
@@ -194,7 +194,7 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | PACKAGES_PATH and EDK_TOOLS_BIN, used by the build system.                                                                                                                 |               |
 |            | Allow INF statements in FD regions.                                                                                                                                        |               |
 |            | Clarified [UserExtensions] content in chapter 2 (to match implementation)                                                                                                  |               |
-| 1.28       | Convert to GitBooks                                                                                                                                                        | April 2017    |
+| 1.28       | Convert to GitBooks                                                                                                                                                        | May 2017      |
 |            | [#426](https://bugzilla.tianocore.org/show_bug.cgi?id=426) IMAGE_TYPE_ID must be provided with value, FDF should mark it as required section                               |               |
 |            | [#373](https://bugzilla.tianocore.org/show_bug.cgi?id=373) Conditional statement examples incorrect                                                                        |               |
 |            | [#461](https://bugzilla.tianocore.org/show_bug.cgi?id=461) FDF Spec: add a super script number for the <FmpFileData>                                                       |               |
@@ -206,3 +206,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
 |            | [#142](https://bugzilla.tianocore.org/show_bug.cgi?id=142) Update EDK II FDF Specification to allow sections in any order                                                  |               |
 |            | [#478](https://bugzilla.tianocore.org/show_bug.cgi?id=478) FDF spec: extend the <FmpFileData> to support <FvStatements> and <FdStatenents>                                 |               |
 |            | [#353](https://bugzilla.tianocore.org/show_bug.cgi?id=353) Build spec: Allow nested includes in DSC and FDF files                                                          |               |
+|            | [#520](https://bugzilla.tianocore.org/show_bug.cgi?id=520) FDF 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