From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A8EFA21954070 for ; Wed, 19 Apr 2017 13:37:33 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP; 19 Apr 2017 13:37:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,222,1488873600"; d="scan'208";a="91513136" Received: from mdkinney-mobl.amr.corp.intel.com ([10.241.98.51]) by fmsmga005.fm.intel.com with ESMTP; 19 Apr 2017 13:37:33 -0700 From: Michael Kinney To: edk2-devel@lists.01.org Cc: Liming Gao , Yonghong Zhu , Kevin W Shaw Date: Wed, 19 Apr 2017 13:37:26 -0700 Message-Id: <1492634248-15292-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1492634248-15292-1-git-send-email-michael.d.kinney@intel.com> References: <1492634248-15292-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2-BuildSpecification PATCH 1/3] Add rules for for mixed PCD access X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 20:37:33 -0000 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 Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney --- .../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