From nobody Mon May 6 11:36:52 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 1493188419617720.1400826111744; Tue, 25 Apr 2017 23:33:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B5F7821951CB4; Tue, 25 Apr 2017 23:33:35 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 9977D21951C8C for ; Tue, 25 Apr 2017 23:33:34 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2017 23:33:33 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.255.230.13]) by orsmga003.jf.intel.com with ESMTP; 25 Apr 2017 23:33:33 -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="961175267" From: Michael Kinney To: edk2-devel@lists.01.org Date: Tue, 25 Apr 2017 23:33:30 -0700 Message-Id: <1493188410-14076-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1493188410-14076-1-git-send-email-michael.d.kinney@intel.com> References: <1493188410-14076-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-BuildSpecification PATCH] Add conditional and unused PCD report sections 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=3D508 * List PCDs that are used in conditional directives in the DSC and FDF files that are not used in module code. * List PCDs that are not used anywhere * Add *B PCD key to show PCD values set using a build option (e.g. --pcd) Cc: Liming Gao Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney --- 13_build_reports/133_output.md | 2 + 13_build_reports/134_platform_summary.md | 93 ++++++++++++++++++++++++++= ++++ 13_build_reports/136_global_pcd_section.md | 20 +++++-- README.md | 1 + 4 files changed, 110 insertions(+), 6 deletions(-) diff --git a/13_build_reports/133_output.md b/13_build_reports/133_output.md index ce64efd..5eb2c8e 100644 --- a/13_build_reports/133_output.md +++ b/13_build_reports/133_output.md @@ -51,6 +51,8 @@ The layout of the text report file: =20 ``` |---- Platform summary + |----- Conditional directives section + |----- Unused PCDs section |----- Mixed PCD section |----- Global PCD section |----- FD section* diff --git a/13_build_reports/134_platform_summary.md b/13_build_reports/13= 4_platform_summary.md index 7c08050..e6f2a15 100644 --- a/13_build_reports/134_platform_summary.md +++ b/13_build_reports/134_platform_summary.md @@ -63,3 +63,96 @@ Report Contents: PCD, LIBRARY, BUILD_FLAGS, DEPEX, FL= ASH, FIXED_ADDRESS **Note:** Platform Summary is always present and appears at the beginning = of report. ********** + +If the DSC or FDF file contains conditional directive statements (`!if`, +`!elseif`, `!ifdef` or `!ifndef`) or the value of PCD is not used by a mod= ule is +set in the DSC file (PCD Sections) or the FDF file (`SET` statements for +example), the following sub-section is generated. + +``` +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +Conditional Directives used by the build system +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +``` + +If the DSC or FDF file define values for PCDs that are not used by any mod= ule +and are not used in conditional directive statements, the following sub-se= ction +is generated. + +``` +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +PCDs not used by modules or in conditional directives +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +``` + +### 13.4.1 PCDs in Conditional Directives + +If a PCD is used in a conditional directive statement, the PCD section is +generated. + +PCD values derived from expressions or other PCDs are not differentiated i= n the +report. Only the final value is displayed. + +The first line is required: + +`[*P|*F|*B] : () =3D ` + +* `*P` means the Pcd's value was obtained from the DSC file +* `*F` means the PCD's value was obtained from the FDF file. +* `*B` means the PCD's value set by a build option. + +Additional lines may be displayed showing default values when the value is= not a +default value. + +### Example + +``` +>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +Conditional Directives used by the build system +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +PCD statements +>-------------------------------------------------------------------------= -< +gMyTokenSpaceGuid +*P SmmEnable : FEATURE (BOOLEAN) =3D 0x0 + DEC DEFAULT =3D 0x1 +*B LogEnable : FIXED (UNIT32) =3D 0x1 + DEC DEFAULT =3D 0x0 +<-------------------------------------------------------------------------= -> +>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +``` + +### 13.4.2 PCDs not used + +If a PCD is not used in a conditional directive statement or by a module, = the +not used PCD section is generated. + +PCD values derived from expressions or other PCDs are not differentiated i= n the +report. Only the final value is displayed. + +The first line is required: + +`[*P|*F|*B] : () =3D ` + +* `*P` means the Pcd's value was obtained from the DSC file +* `*F` means the PCD's value was obtained from the FDF file. +* `*B` means the PCD's value set by a build option. + +Additional lines may be displayed showing default values when the value is= not a +default value. + +### Example + +``` +>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +PCDs not used by modules or in conditional directives +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +PCD statements +>-------------------------------------------------------------------------= -< +gMyTokenSpaceGuid +*P SmmEnable : FEATURE (BOOLEAN) =3D 0x0 + DEC DEFAULT =3D 0x1 +*B UsbEnable : FIXED (UNIT32) =3D 0x1 + DEC DEFAULT =3D 0x0 +<-------------------------------------------------------------------------= -> +>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D< +``` diff --git a/13_build_reports/136_global_pcd_section.md b/13_build_reports/= 136_global_pcd_section.md index f24f97a..d768488 100644 --- a/13_build_reports/136_global_pcd_section.md +++ b/13_build_reports/136_global_pcd_section.md @@ -45,19 +45,23 @@ gEfiMdeModulePkgTokenSpaceGuid ... ``` =20 +PCD values derived from expressions or other PCDs are not differentiated i= n the +report. Only the final value is displayed. + Each global PCD item contains one or more lines: =20 ### 13.6.1 Required line =20 The first line is required: =20 -`[*P|*F| ] : () =3D ` +`[*P|*F|*B] : () =3D ` =20 -* *P means the Pcd's value was obtained from the DSC file -* *F means the PCD's value was obtained from the FDF file. -* If no *P or *F is given, the PCD's value comes from DEC file. If the val= ue - obtained from either the DSC or FDF is the same as the value in the DEC,= then - neither *P nor *F will be shown in the report. +* `*P` means the Pcd's value was obtained from the DSC file +* `*F` means the PCD's value was obtained from the FDF file. +* `*B` means the PCD's value was obtained from a build option. +* If no `*P`, `*F` or `*B` is shown, the PCD's value comes from DEC file. = If the + value obtained from either a build option, the DSC or FDF is the same as= the + value in the DEC, then `*B`, `*P` or `*F` will not be shown in the repor= t. =20 #### Examples =20 @@ -65,6 +69,10 @@ The first line is required: *P PcdWinNtFirmwareVolume : FIXED (VOID*) =3D L"..\\Fv\\Nt= 32.fd" *F PcdWinNtFlashNvStorageFtwWorkingBase : FIXED (UINT32) =3D 0x0028E000 DEC DEFAULT =3D 0x0 + +gTokenSpaceGuid +*B LogEnable : FIXED (UNIT32) =3D 0x1 + DEC DEFAULT =3D 0x0 ``` =20 ### 13.6.2 Optional lines diff --git a/README.md b/README.md index 89578d0..817164a 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 = = = |= | +| | [#508](https://bugzilla.tianocore.org/show_bug.cgi?id=3D508= ) Build Spec: Add sections to PCD report for PCDs only used in conditions P= CDs that are not used anywhere = = |= | --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel