From nobody Sun Apr 28 20:00:24 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1493189823186791.8701443737107; Tue, 25 Apr 2017 23:57:03 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 49C942193CF58; Tue, 25 Apr 2017 23:56:59 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 4310421951C8C for ; Tue, 25 Apr 2017 23:56:57 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2017 23:56:56 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.255.230.13]) by fmsmga001.fm.intel.com with ESMTP; 25 Apr 2017 23:56:56 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,253,1488873600"; d="scan'208";a="1140266269" From: Michael Kinney To: edk2-devel@lists.01.org Date: Tue, 25 Apr 2017 23:56:51 -0700 Message-Id: <1493189812-10248-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1493189812-10248-1-git-send-email-michael.d.kinney@intel.com> References: <1493189812-10248-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-BuildSpecification PATCH V2 1/2] Clean up minor formatting issues 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: , Cc: Kevin W Shaw , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Liming Gao Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu =20 --- .../43_pre-build_stage_overview.md | 22 ++++++++++--------= ---- .../45_post-build_stage.md | 12 ++++++------ .../82_auto-generation_process.md | 2 +- .../87_generated_asbuilt_inf_files.md | 2 +- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md= b/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md index 30177a8..0fde612 100644 --- a/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md +++ b/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md @@ -250,21 +250,19 @@ directory name and the `BASE_NAME` of the module's IN= F file. =20 * Create the module Makefiles =20 - Individual modules may require different compilation options, over-ridi= ng any - global definitions. If an INF file is not listed in the DSC file and is= listed - in the FDF file, the parsing tools must check if the INF in the FDF file - contains `PatchableInModule` or `DynamicEX` entries. If the INF lists o= ther PCD - access methods (FeatureFlag, - - FixedAtBuild or Dynamic), and the INF contains files listed in a `[Sour= ces]` - section and does not contain a `[Binaries]` section, then the build too= ls must - break the build with an appropriate error message. + Individual modules may require different compilation options, over-ridi= ng + any global definitions. If an INF file is not listed in the DSC file an= d is + listed in the FDF file, the parsing tools must check if the INF in the = FDF + file contains `PatchableInModule` or `DynamicEX` entries. If the INF li= sts + other PCD access methods (FeatureFlag, FixedAtBuild or Dynamic), and th= e INF + contains files listed in a `[Sources]` section and does not contain a + `[Binaries]` section, then the build tools must break the build with an + appropriate error message. =20 6. The tools are also responsible for creating binary files containing all `DynamicEx` PCDs that are listed in the DSC, FDF and Binary INF files - (listed in the FDF file). - These binaries are automatically placed into the (PEIM and DXE) PCD dri= ver FFS - files. + (listed in the FDF file). These binaries are automatically placed into = the + (PEIM and DXE) PCD driver FFS files. =20 7. If the build option, --ignore-sources is present on the build command-l= ine, none of the source files listed in a [Sources] section will be processe= d, diff --git a/4_edk_ii_build_process_overview/45_post-build_stage.md b/4_edk= _ii_build_process_overview/45_post-build_stage.md index c8a90e1..c35d9be 100644 --- a/4_edk_ii_build_process_overview/45_post-build_stage.md +++ b/4_edk_ii_build_process_overview/45_post-build_stage.md @@ -64,12 +64,12 @@ following must occur. that entry must be ignored - these files are not to be placed into an `EFI_SECTION_DISPOSABLE` encapsulation section. =20 -2. If an INF not listed in the DSC file. is listed in the FDF file and the= INF - contains a `[PatchPcd]` section, the tools must test to determine if th= e PCD - is listed in the DSC (or FDF) file, and whether the value listed in the= DSC - (or FDF) file is different from the value in the INF file. If the value= is - different, the tools must patch the binary .efi file with the value fro= m the - FDF or DSC file prior to creating the EFI leaf section. +2. If an INF not listed in the DSC file, but is listed in the FDF file and= the + INF contains a `[PatchPcd]` section, the tools must test to determine i= f the + PCD is listed in the DSC (or FDF) file, and whether the value listed in= the + DSC (or FDF) file is different from the value in the INF file. If the v= alue + is different, the tools must patch the binary .efi file with the value = from + the FDF or DSC file prior to creating the EFI leaf section. =20 3. The tools are also responsible for creating binary files containing all DynamicEx PCDs that are listed in the DSC, FDF and Binary INF files (li= sted diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md b/8_pr= e-build_autogen_stage/82_auto-generation_process.md index 6868d62..92b6d99 100644 --- a/8_pre-build_autogen_stage/82_auto-generation_process.md +++ b/8_pre-build_autogen_stage/82_auto-generation_process.md @@ -772,7 +772,7 @@ that is unique to the GUID known as the TokenSpaceGuidC= Name. =20 The following list defines the five PCD access methods. =20 -* **FeatureFlag PCD**; used in conditional directive statements in code. +* **FeatureFlag PCD** - used in conditional directive statements in code. =20 * **PatchableInModule PCD** - a volatile variable that can be updated eith= er during a build or by a tool that knows the offset and data size of the diff --git a/8_pre-build_autogen_stage/87_generated_asbuilt_inf_files.md b/= 8_pre-build_autogen_stage/87_generated_asbuilt_inf_files.md index 9e89d83..0f39879 100644 --- a/8_pre-build_autogen_stage/87_generated_asbuilt_inf_files.md +++ b/8_pre-build_autogen_stage/87_generated_asbuilt_inf_files.md @@ -431,7 +431,7 @@ For ACPI files from a platform, the entry must use the = following format: =20 ` ACPI|Filename.acpi ` =20 -For a Binary or raw binary file, the entry may use either of the the follo= wing +For a Binary or raw binary file, the entry may use either of the following two formats: =20 ``` --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 20:00:24 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149318982561531.286682716160385; Tue, 25 Apr 2017 23:57:05 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7E82C2193CF6A; Tue, 25 Apr 2017 23:56:59 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 5D7C521951C8F for ; Tue, 25 Apr 2017 23:56:57 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2017 23:56:56 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.255.230.13]) by fmsmga001.fm.intel.com with ESMTP; 25 Apr 2017 23:56:56 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,253,1488873600"; d="scan'208";a="1140266274" From: Michael Kinney To: edk2-devel@lists.01.org Date: Tue, 25 Apr 2017 23:56:52 -0700 Message-Id: <1493189812-10248-3-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1493189812-10248-1-git-send-email-michael.d.kinney@intel.com> References: <1493189812-10248-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-BuildSpecification PATCH V2 2/2] Add --pcd flag to override PCD values on command line 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: , Cc: Kevin W Shaw , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D480 Cc: Liming Gao Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney Reviewed-by: Yonghong Zhu =20 --- .../43_pre-build_stage_overview.md | 13 ++++---- .../82_auto-generation_process.md | 35 ++++++++++++++++++= ---- .../84_auto-generated_pcd_database_file.md | 34 +++++++++++-------= --- README.md | 1 + appendix_d_buildexe_command/d4_usage.md | 1 + 5 files changed, 57 insertions(+), 27 deletions(-) diff --git a/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md= b/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md index 0fde612..7dca93a 100644 --- a/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md +++ b/4_edk_ii_build_process_overview/43_pre-build_stage_overview.md @@ -213,9 +213,10 @@ directory name and the `BASE_NAME` of the module's INF= file. system parses the name of the 'map' file that contains an ordered list of VPD PCDs. =20 - * There are some PCD values that get set in the FDF file, listed in bin= ary - INF files or listed in source INF files, so generating the C files is - delayed until all PCD values have been finalized. + * There are some PCD values that get set on the command line, in the FDF + file, listed in binary INF files or listed in source INF files, so + generating the C files is delayed until all PCD values have been + finalized. =20 4. Obtain the FDF filename and obtain the Flash related PCDs from the FDF = file. FeatureFlag and FixedAtBuild PCD names which are defined in the DSC fil= e can @@ -230,9 +231,9 @@ directory name and the `BASE_NAME` of the module's INF = file. =20 * Create the Library Instance's AutoGen.c files containing PCD, Guid, Protocol, Ppi and EntryPoint definitions and data structures. PCD val= ues - come from FDF file, DSC's INF scoped section, DSC's global PCD sectio= ns, - default values in the INF file's PCD section, or the DEC file's defau= lt - values. + come from command line, FDF file, DSC's INF scoped section, DSC's glo= bal + PCD sections, default values in the INF file's PCD section, or the DEC + file's default values. =20 * Create the module's library instance Makefiles =20 diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md b/8_pr= e-build_autogen_stage/82_auto-generation_process.md index 92b6d99..a4cb1b4 100644 --- a/8_pre-build_autogen_stage/82_auto-generation_process.md +++ b/8_pre-build_autogen_stage/82_auto-generation_process.md @@ -417,15 +417,16 @@ FDF files. of the DSC, FDF and any of the included EDK INF files. =20 Macro values must be defined prior to using them in directive statements o= r for -PCD values. The following provides the rules for obtaining macro values. +PCD values. The following provides the precedence (high to low) for obtain= ing +macro values. =20 -* Highest - Command-line, `-D` flags (left most has higher priority) +* Command-line, `-D` flags (left most has higher priority) * FDF file, `DEFINE` statements override previous definitions in the `[Defines]` section * FDF file, `DEFINE` statements in the `[Defines]` section * DSC file, Component INF `DEFINE` statements embedded in `` * DSC file, `DEFINE` statements in sections following the `[Defines]` sect= ion -* Lowest - DSC file, `DEFINE` statements in the `[Defines]` section +* DSC file, `DEFINE` statements in the `[Defines]` section =20 ********** **Note:** Macros defined in the DSC file's `[Defines]` section are common = to @@ -852,15 +853,16 @@ create a platform scoped PCD Database. =20 The values that are assigned to individual PCDs required by a build may co= me from different locations and different meta-data files. The following prov= ides -the rules required to assign a value to a PCD. +the precedence (high to low) to assign a value to a PCD. =20 -* Highest - FDF file, SET statements within a section +* Command-line, `--pcd` flags (left most has higher priority) +* FDF file, SET statements within a section * FDF file, grammar describing automatic assignment of PCD values * FDF file, SET statement in the [Defines] section * DSC file, Component INF `` section statements * DSC file, global [Pcd*] sections * INF file, PCD sections, Default Values -* Lowest - DEC file, PCD sections, Default Values +* DEC file, PCD sections, Default Values =20 In addition to the above precedence rules, PCDs set in sections with architectural modifiers take precedence over PCD sections that are common = to @@ -869,6 +871,26 @@ all architectures. When listed in the same section. If listed multiple times, the last one wi= ll be used. =20 +A PCD value set on the command-line has the highest precedence. It overrid= es +all instances of the PCD value specified in the DSC or FDF file. The follo= wing +is the syntax to override the value of a PCD on the command line: + +`--pcd [.]=3D` + +For `VOID*` type PCDs, `` supports the following syntax: + +* ASCII string value for a `VOID*` PCD + + `--pcd [.]=3D"String"` + +* Unicode string value for a `VOID*` PCD + + `--pcd [.]=3DL"String"` + +* Byte array value for a `VOID*` PCD + + `--pcd [.]=3D H"{0x1, 0x2}"` + ********** **Note:** The EDK II meta-data specs have changed to permit a PCD entry (o= r any other entry) to be listed only one time per section. @@ -1050,6 +1072,7 @@ is required, the library instance should be listed in= the INF scoping module, the tools must obtain unique PCD values using the following precedence (high to low): =20 + - Command-line, `--pcd` flags (left most has higher priority) - The DSC file's component INF scoping `` sections - The DSC file's `[Pcd*.arch.skuid]` sections - The DSC file's `[Pcd*.common.skuid]` sections 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 d309246..198644b 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 @@ -97,8 +97,6 @@ DSC, INF or DEC files. only contain `[PcdEx]` and `[PatchPcd]` Sections - if they contain any = other type of PCD, break the build. =20 -5. Command line cannot be used to set the PCD value. - #### 8.4.1.2 Precedence Rules for PCDs not listed in the DSC or FDF Files: =20 This subsection covers PCDs that are used by modules listed in the DSC fil= e, @@ -206,50 +204,56 @@ The rules are listed in order, such that the first ma= tch stops any additional processing. The following rules apply to Binary modules listed in a platfo= rm DSC file. =20 -1. PCD assignments are not permitted in the FDF file except through SET +1. PCD value assignment from command-line using `--pcd` flag takes precede= nce + over all other assignments. + +2. PCD assignments are not permitted in the FDF file except through SET statements or the automatic assignments from the [FD] section regions. =20 -2. PCD value assignment in a module scoping section take precedence over v= alues +3. PCD value assignment in a module scoping section take precedence over v= alues specified in the global section for PatchableInModule PCDs. =20 -3. PCD value assignment in a global PCD section with an architectural modi= fier +4. PCD value assignment in a global PCD section with an architectural modi= fier take precedence over assignments in a global section. =20 -4. PCD value assignment in a global PCD section without an architectural +5. PCD value assignment in a global PCD section without an architectural modifier. =20 -5. The value specified in the Binary INF has the lowest precedence; the DEC +6. The value specified in the Binary INF has the lowest precedence; the DEC file is never used to determine a PCD value for a Binary INF. =20 The following rules apply to modules listed in a platform DSC file. =20 -1. PCD assignments in an FDF file are positional, with the last value taki= ng +1. PCD value assignment from command-line using `--pcd` flag takes precede= nce + over all other assignments. + +2. PCD assignments in an FDF file are positional, with the last value taki= ng precedence over previous assignments in the FDF file. =20 -2. A PCD assignment in an FDF file takes precedence over PCD values assign= ed in +3. A PCD assignment in an FDF file takes precedence over PCD values assign= ed in the DSC file's module scoping section. =20 -3. A PCD value of an entry listed in a module scoping section take precede= nce +4. A PCD value of an entry listed in a module scoping section take precede= nce over the PCD value listed in a global section that has an architectural modifier in the DSC file. =20 -4. A PCD value of an entry listed in a global section that has an architec= tural +5. A PCD value of an entry listed in a global section that has an architec= tural modifier takes precedence over the PCD value listed in a global section without an architectural modifier in the DSC file. =20 -5. A PCD value of an entry listed in a global section without architectural +6. A PCD value of an entry listed in a global section without architectural modifiers in the DSC file takes precedence over the PCD value listed in= an INF file in a section with an architectural modifier. =20 -6. A PCD value of an entry listed in an INF file section with an architect= ural +7. A PCD value of an entry listed in an INF file section with an architect= ural modifier takes precedence over an entry listed in an INF file section without an architectural modifier. =20 -7. A PCD value of an entry listed in an INF file section without an +8. A PCD value of an entry listed in an INF file section without an architectural modifier takes precedence over a PCD value listed in a DEC file in a section with an architectural modifier. =20 -8. A PCD value of an entry listed in a DEC file section with an architectu= ral +9. A PCD value of an entry listed in a DEC file section with an architectu= ral modifier takes precedence over a PCD value listed in a DEC file in a se= ction without an architectural modifier. =20 diff --git a/README.md b/README.md index 89578d0..f3c56c2 100644 --- a/README.md +++ b/README.md @@ -208,3 +208,4 @@ Copyright (c) 2008-2017, Intel Corporation. All rights = reserved. | | [#479](https://bugzilla.tianocore.org/show_bug.cgi?id=3D479= ) Build spec: add description for nmake long command line handling = = = |= | | | [#485](https://bugzilla.tianocore.org/show_bug.cgi?id=3D485= ) Build spec: add support for mixed Pcd access method = = = |= | | | [#476](https://bugzilla.tianocore.org/show_bug.cgi?id=3D476= ) Build spec: add support for HII image package = = = |= | +| | [#480](https://bugzilla.tianocore.org/show_bug.cgi?id=3D480= ) Build spec: add description for Override PCD value on the command line = = = |= | diff --git a/appendix_d_buildexe_command/d4_usage.md b/appendix_d_buildexe_= command/d4_usage.md index c262f1a..739270f 100644 --- a/appendix_d_buildexe_command/d4_usage.md +++ b/appendix_d_buildexe_command/d4_usage.md @@ -112,6 +112,7 @@ Options: --conf=3DCONFDIRECTORY Specify the customized Conf directory. --check-usage Check usage content of entries listed in INF file. --ignore-sources Focus to a binary build and ignore all source files + --pcd=3DOPTIONPCD Set PCD value by command line. Format: "PcdName= =3DValue" ``` =20 ### D.4.1 Debug Levels --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel