public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Liming Gao <liming.gao@intel.com>, edk2-devel@lists.01.org
Subject: Re: [Patch] MdeModulePkg PCD: Remove unused PCD attribute PCD_TYPE_SKU_ENABLED
Date: Tue, 13 Mar 2018 09:33:06 +0100	[thread overview]
Message-ID: <ee725845-69e3-e0fa-2c82-3f0a04cd69fc@proxmox.com> (raw)
In-Reply-To: <1520410518-17144-1-git-send-email-liming.gao@intel.com>

On 03/07/2018 09:15 AM, Liming Gao wrote:
> PcdDb optimization has handled PCD DB for each SKU, not for single PCD.
> So, this PCD attribute is not used any more.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> Cc: Reviewed-by: Liming Gao <liming.gao@intel.com>

This fails my build here:

[snip]
"gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiShellDebug1CommandsLibStrings -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -flto -DUSING_LTO -Os -Wno-unused-but-set-variable -Wno-unused-const-variable -DMDEPKG_NDEBUG -mno-mmx -mno-sse -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib/OUTPUT/./Dmem.obj -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Library/UefiShellDebug1CommandsLib -I/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib/DEBUG -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg/Include -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg/Include/X64 -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Include -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include /root/sources/pve/pve-edk2-firmware/edk2.build/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
In file included from /root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.h:25:0,
                 from /root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c:16:
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c: In function ‘SetWorker’:
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:35:78: error: ‘PCD_TYPE_SKU_ENABLED’ undeclared (first use in this function)
"gcc" -E -x assembler-with-cpp -include /root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/OvmfPkg/Sec/SecMain/DEBUG/AutoGen.h -I/root/sources/pve/pve-edk2-firmware/edk2.build/OvmfPkg/Sec/X64 -I/root/sources/pve/pve-edk2-firmware/edk2.build/OvmfPkg/Sec -I/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/OvmfPkg/Sec/SecMain/DEBUG -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg/Include -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdePkg/Include/X64 -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include -I/root/sources/pve/pve-edk2-firmware/edk2.build/UefiCpuPkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/UefiCpuPkg/Include -I/root/sources/pve/pve-edk2-firmware/edk2.build/OvmfPkg -I/root/sources/pve/pve-edk2-firmware/edk2.build/OvmfPkg/Include /root/sources/pve/pve-edk2-firmware/edk2.build/OvmfPkg/Sec/X64/SecEntry.nasm > /root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/OvmfPkg/Sec/SecMain/OUTPUT/X64/SecEntry.i
 #define PCD_TYPE_ALL_SET      (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)
                                                                              ^
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:55:37: note: in expansion of macro ‘PCD_TYPE_ALL_SET’
 #define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET | PCD_DATUM_TYPE_UINT8_BOOLEAN))
                                     ^~~~~~~~~~~~~~~~
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c:683:40: note: in expansion of macro ‘PCD_DATABASE_OFFSET_MASK’
   Offset          = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
                                        ^~~~~~~~~~~~~~~~~~~~~~~~
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:35:78: note: each undeclared identifier is reported only once for each function it appears in
 #define PCD_TYPE_ALL_SET      (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)
                                                                              ^
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:55:37: note: in expansion of macro ‘PCD_TYPE_ALL_SET’
 #define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET | PCD_DATUM_TYPE_UINT8_BOOLEAN))
                                     ^~~~~~~~~~~~~~~~
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c:683:40: note: in expansion of macro ‘PCD_DATABASE_OFFSET_MASK’
   Offset          = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
                                        ^~~~~~~~~~~~~~~~~~~~~~~~
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c: In function ‘GetWorker’:
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:35:78: error: ‘PCD_TYPE_SKU_ENABLED’ undeclared (first use in this function)
 #define PCD_TYPE_ALL_SET      (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)
                                                                              ^
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h:55:37: note: in expansion of macro ‘PCD_TYPE_ALL_SET’
 #define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET | PCD_DATUM_TYPE_UINT8_BOOLEAN))
                                     ^~~~~~~~~~~~~~~~
/root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Service.c:884:36: note: in expansion of macro ‘PCD_DATABASE_OFFSET_MASK’
   Offset      = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
                                    ^~~~~~~~~~~~~~~~~~~~~~~~
GNUmakefile:419: recipe for target '/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/PCD/Pei/Pcd/OUTPUT/Service.obj' failed
make[3]: Leaving directory '/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/PCD/Pei/Pcd'
make[3]: *** [/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/PCD/Pei/Pcd/OUTPUT/Service.obj] Error 1


build.py...
 : error 7000: Failed to execute command
        make tbuild [/root/sources/pve/pve-edk2-firmware/edk2.build/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/PCD/Pei/Pcd]


build.py...
 : error F002: Failed to build module
        /root/sources/pve/pve-edk2-firmware/edk2.build/MdeModulePkg/Universal/PCD/Pei/Pcd.inf [X64, GCC5, RELEASE]

- Failed -
Build end time: 09:08:35, Mar.13 2018
Build total time: 00:00:18

debian/rules:40: recipe for target 'build-ovmf' failed
make[2]: *** [build-ovmf] Error 1
make[2]: Leaving directory '/root/sources/pve/pve-edk2-firmware/edk2.build'
debian/rules:28: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/root/sources/pve/pve-edk2-firmware/edk2.build'
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Makefile:18: recipe for target 'pve-edk2-firmware_1.20180108-1_all.deb' failed
make: *** [pve-edk2-firmware_1.20180108-1_all.deb] Error 2


Was the last pushed commit, I never found a culprit that fast :)
git checkout HEAD^ 
allows to build me again successfully

Sys info:

Debian 9 Stretch

# gcc -v 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)


Building with:

OvmfPkg/build.sh -a X64 -b RELEASE -DSECURE_BOOT_ENABLE=FALSE -DFD_SIZE_4MB -t GCC5

cheers,
Thomas

> ---
>  MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h | 3 +--
>  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf               | 3 +--
>  MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni            | 3 +--
>  MdeModulePkg/Universal/PCD/Pei/Pcd.inf               | 3 +--
>  MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni           | 3 +--
>  5 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
> index d670af1..5767ac8 100644
> --- a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
> +++ b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Guid for Pcd DataBase Signature.
>  
> -Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
>  This program and the accompanying materials are licensed and made available under
>  the terms and conditions of the BSD License that accompanies this distribution.
>  The full text of the license may be found at
> @@ -30,7 +30,6 @@ typedef UINT64 SKU_ID;
>  #define PCD_TYPE_DATA         (0x0U << PCD_TYPE_SHIFT)
>  #define PCD_TYPE_HII          (0x8U << PCD_TYPE_SHIFT)
>  #define PCD_TYPE_VPD          (0x4U << PCD_TYPE_SHIFT)
> -#define PCD_TYPE_SKU_ENABLED  (0x2U << PCD_TYPE_SHIFT)
>  #define PCD_TYPE_STRING       (0x1U << PCD_TYPE_SHIFT)
>  
>  #define PCD_TYPE_ALL_SET      (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)
> diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> index 54cd8d9..a20b645 100644
> --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> @@ -174,7 +174,6 @@
>  #                         PCD_TYPE_DATA
>  #                         PCD_TYPE_HII
>  #                         PCD_TYPE_VPD
> -#                         PCD_TYPE_SKU_ENABLED
>  #                         PCD_TYPE_STRING
>  #          Datum Type   : indicate PCD vaue type from following macro:
>  #                         PCD_DATUM_TYPE_POINTER
> @@ -279,7 +278,7 @@
>  #            - Variable GUID for HII type PCD
>  #            - Token space GUID for dynamicex type PCD 
>  #    
> -#  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
>  #
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the BSD License
> diff --git a/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni b/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni
> index 922391c..0883ad8 100644
> --- a/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni
> +++ b/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni
> @@ -174,7 +174,6 @@
>  // PCD_TYPE_DATA
>  // PCD_TYPE_HII
>  // PCD_TYPE_VPD
> -// PCD_TYPE_SKU_ENABLED
>  // PCD_TYPE_STRING
>  // Datum Type   : indicate PCD vaue type from following macro:
>  // PCD_DATUM_TYPE_POINTER
> @@ -279,7 +278,7 @@
>  // - Variable GUID for HII type PCD
>  // - Token space GUID for dynamicex type PCD
>  //
> -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
> +// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
>  //
>  // This program and the accompanying materials
>  // are licensed and made available under the terms and conditions of the BSD License
> diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
> index e1ea5be..3cba289 100644
> --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
> +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
> @@ -173,7 +173,6 @@
>  #                         PCD_TYPE_DATA
>  #                         PCD_TYPE_HII
>  #                         PCD_TYPE_VPD
> -#                         PCD_TYPE_SKU_ENABLED
>  #                         PCD_TYPE_STRING
>  #          Datum Type   : indicate PCD vaue type from following macro:
>  #                         PCD_DATUM_TYPE_POINTER
> @@ -278,7 +277,7 @@
>  #            - Variable GUID for HII type PCD
>  #            - Token space GUID for dynamicex type PCD 
>  #    
> -#  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
>  #
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the BSD License
> diff --git a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
> index b0d3f1f..3e7c556 100644
> --- a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
> +++ b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
> @@ -173,7 +173,6 @@
>  // PCD_TYPE_DATA
>  // PCD_TYPE_HII
>  // PCD_TYPE_VPD
> -// PCD_TYPE_SKU_ENABLED
>  // PCD_TYPE_STRING
>  // Datum Type   : indicate PCD vaue type from following macro:
>  // PCD_DATUM_TYPE_POINTER
> @@ -278,7 +277,7 @@
>  // - Variable GUID for HII type PCD
>  // - Token space GUID for dynamicex type PCD
>  //
> -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
> +// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
>  //
>  // This program and the accompanying materials
>  // are licensed and made available under the terms and conditions of the BSD License
> 





  parent reply	other threads:[~2018-03-13  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  8:15 [Patch] MdeModulePkg PCD: Remove unused PCD attribute PCD_TYPE_SKU_ENABLED Liming Gao
     [not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14E1E5CC4@SHSMSX104.ccr.corp.intel.com>
2018-03-13  6:37   ` Zeng, Star
2018-03-13  8:33 ` Thomas Lamprecht [this message]
2018-03-13  9:08   ` Zeng, Star

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=ee725845-69e3-e0fa-2c82-3f0a04cd69fc@proxmox.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