public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Michael Kinney <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>,
	Kevin W Shaw <kevin.w.shaw@intel.com>
Subject: [edk2-BuildSpecification PATCH 1/3] Add rules for for mixed PCD access
Date: Wed, 19 Apr 2017 13:37:26 -0700	[thread overview]
Message-ID: <1492634248-15292-2-git-send-email-michael.d.kinney@intel.com> (raw)
In-Reply-To: <1492634248-15292-1-git-send-email-michael.d.kinney@intel.com>

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

The build tools currently require a PCD to use the
same access method from all modules.  This update
still requires modules built from sources to use
the same access method, but binary modules are
allowed to use alternate access methods.

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>
---
 .../84_auto-generated_pcd_database_file.md         | 97 ++++++++++++----------
 1 file changed, 54 insertions(+), 43 deletions(-)

diff --git a/8_pre-build_autogen_stage/84_auto-generated_pcd_database_file.md b/8_pre-build_autogen_stage/84_auto-generated_pcd_database_file.md
index c0d96e8..d309246 100644
--- a/8_pre-build_autogen_stage/84_auto-generated_pcd_database_file.md
+++ b/8_pre-build_autogen_stage/84_auto-generated_pcd_database_file.md
@@ -142,50 +142,61 @@ module does not follow the DEC file's access method declarations.
     PCD to use the `PcdsDynamicExDefault` access method for all INF files that
     use the PCD. The PCD must be added to the Platform's PCD Database.
 
-2. When building modules, a PCD can only use one access method for all modules
-   in a platform; a PCD cannot use the patch access method in one source module
-   and fixed access method in another source module in the same platform. The
-   build parser must break with an error message if this occurs.
-
-3. If the PCD is listed under different access methods in all INF files in the
-   platform that use the PCD, the build parser must break with an appropriate
-   error message.
-
-4. If the PCD is listed in a `[Pcd]` section in all of the modules using that
-   PCD that are listed in the DSC file, AND the PCD is listed in the DEC file
-   under `[PcdsDynamicEx]` and/or `[PcdsDynamic]` and/or
+2. When building modules from source INFs, a PCD can only use one access method
+   for all modules in a platform; a PCD cannot use the patch access method in
+   one source module and fixed access method in another source module in the
+   same platform. The build parser must break with an error message if this
+   occurs.
+
+3. 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.
+
+4. If the PCD is listed under different access methods in all source INF files
+   in the platform that use the PCD, the build parser must break with an
+   appropriate error message.
+
+5. If the PCD is listed in a `[Pcd]` section in all of the source modules using
+   that PCD that are listed in the DSC file, AND the PCD is listed in the DEC
+   file under `[PcdsDynamicEx]` and/or `[PcdsDynamic]` and/or
    `[PcdsPatchableInModule]` and `[PcdsFixedAtBuild]` sections, the build must
-   use the PcdsFixedAtBuild access method for this PCD in all modules in the
-   platform that use this PCD.
-
-5. If the PCD is listed in a `[Pcd]` section in all of the modules using that
-   PCD that are listed in the DSC file, AND the PCD is listed in the DEC file
-   under `[PcdsDynamicEx]` and/or `[PcdsDynamic]` and `[PcdsPatchableInModule]`
-   sections, the build must use the `PcdsPatchableInModule` access method for
-   this PCD in all modules in the platform that use this PCD.
-
-6. If the PCD is listed in a `[Pcd]` section in all of the modules using that
-   PCD that are listed in the DSC file, AND the PCD is listed in the DEC file
-   under `[PcdsDynamicEx]` and `[PcdsDynamic]` sections, the build must use the
-   `PcdsDynamicDefault` access method for this PCD in all modules in the
-   platform that use this PCD.
-
-7. If the PCD is listed in a `[Pcd]` section in all of the modules using that
-   PCD that are listed in the DSC file, AND the PCD is listed in the DEC file
-   under `[PcdsDynamicEx]` sections, the build must use the
-   `PcdsDynamicExDefault` access method for this PCD in all modules in the
-   platform that use this PCD.
-
-8. If multiple modules set the `Dynamic` or `DynamicEx` PCD to the different
-   value in a platform, and the PCD is not listed in the DSC file, the build
-   should break with an appropriate error message.
-
-9. If a PCD is used in a module listed in the DSC or FDF file and the PCD is
-   not declared in any of the DEC files that the module depends on (listed in
-   the `[Packages]` section) the build must break with an appropriate error
-   message.
-
-10. If a PCD is listed in the DSC or FDF file and the PCD is not declared in any
+   use the PcdsFixedAtBuild access method for this PCD in all source modules in
+   the platform that use this PCD.
+
+6. If the PCD is listed in a `[Pcd]` section in all of the source modules using
+   that PCD that are listed in the DSC file, AND the PCD is listed in the DEC
+   file under `[PcdsDynamicEx]` and/or `[PcdsDynamic]` and
+   `[PcdsPatchableInModule]` sections, the build must use the
+   `PcdsPatchableInModule` access method for this PCD in all source modules in
+   the platform that use this PCD.
+
+7. If the PCD is listed in a `[Pcd]` section in all of the source modules using
+   that PCD that are listed in the DSC file, AND the PCD is listed in the DEC
+   file under `[PcdsDynamicEx]` and `[PcdsDynamic]` sections, the build must use
+   the `PcdsDynamicDefault` access method for this PCD in all source modules in
+   the platform that use this PCD.
+
+8. If the PCD is listed in a `[Pcd]` section in all of the source modules using
+   that PCD that are listed in the DSC file, AND the PCD is listed in the DEC
+   file under `[PcdsDynamicEx]` sections, the build must use the
+   `PcdsDynamicExDefault` access method for this PCD in all source modules in
+   the platform that use this PCD.
+
+9. If multiple source modules set the `Dynamic` or `DynamicEx` PCD to the
+   different value in the same platform, and the PCD is not listed in the DSC
+   file, the build should break with an appropriate error message.
+
+10. If a PCD is used in a module listed in the DSC or FDF file and the PCD is
+    not declared in any of the DEC files that the module depends on (listed in
+    the `[Packages]` section) the build must break with an appropriate error
+    message.
+
+11. If a PCD is listed in the DSC or FDF file and the PCD is not declared in any
     of the DEC files AND the PCD is not used by any of the modules listed in the
     DSC or FDF file, the build must break with an appropriate error message.
 
-- 
2.6.3.windows.1



  reply	other threads:[~2017-04-19 20:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 20:37 [edk2-BuildSpecification PATCH 0/3] Add support for mixed PCD access Michael Kinney
2017-04-19 20:37 ` Michael Kinney [this message]
2017-04-19 20:37 ` [edk2-BuildSpecification PATCH 2/3] Make room for new mixed PCD report section Michael Kinney
2017-04-19 20:37 ` [edk2-BuildSpecification PATCH 3/3] Add report section for mixed PCD access Michael Kinney
2017-04-20  3:06   ` Zhu, Yonghong
2017-04-20  4:15     ` Kinney, Michael D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492634248-15292-2-git-send-email-michael.d.kinney@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox