Liming,
"But, PCD type must be set to one type in DSC file."
This is not true. The build tools are not enforcing this. You can have multiple
values for a PCD in the DSC file, and the tools will pick the last one. Hence,
my ask for a modification to the build tools to enforce this and break the
build if duplicate PCDs are found in the DSC file (even if it is an optional
tool parameter).
Thanks,
--Samer
From: Gao, Liming [mailto:[email protected]]
Sent: Tuesday, August 26, 2014 9:10 AM
To: [email protected]
Subject: Re: [edk2] Duplicate PCDs in DSC files
PCD value could be overridden. You can give one common value. The different
module could have their value. But, PCD type must be set to one type in DSC
file.
EDKII Build tool provides the option -y and -Y to dump all PCD value and type
for each driver. -y to specify the report file name. -Y specify the report
type. For PCD, you can type build -y log -Y PCD. Then, you can know what PCD
value is used for your driver.
Thanks
Liming
From: Olivier Martin [mailto:[email protected]]
Sent: Tuesday, August 26, 2014 7:19 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] Duplicate PCDs in DSC files
I am not sure the BaseTools has already raised a warning/error on multiple PCD
definitions.
In our build system, it automatically appends
'gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString' at the end of the DSC
file to track the built binaries.
And I have not seen any issue in case PcdFirmwareVersionString was already
defined.
From: El-Haj-Mahmoud, Samer [mailto:[email protected]]
Sent: 25 August 2014 18:59
To: [email protected]<mailto:[email protected]>
Subject: [edk2] Duplicate PCDs in DSC files
It looks like the build tools will not warn you (or stop with an error) if
there are multiple declarations of the same PCD in the DSC file. In fact, the
same PCD could be initialized multiple times using different values and
different types (Fixed vs. Dynamic for instance), and the build tools will
silently pick the last instance of the PCD in the DSC File.
We just finished debugging a nasty issue caused by duplicate PCDs, and it would
have been nice to prevent this to begin with! Looks to me like a bug in the
tool.
Can we add the ability to break the build if there are duplicate PCD instances
in the DSC file?
Samer El-Haj-Mahmoud
System Firmware Architect
HP Servers
[email protected]<mailto:[email protected]>
T +1.281.514.5973
C +1.512.659.1523
Hewlett-Packard Company
hp.com/go/proliant/uefi<http://hp.com/go/proliant/uefi>
[Description: Description: C:\Users\elhajmah\HpLogo.png]
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel