The version cc71d8's fix was washed out by structure pcd report patch.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
when it is only single SKUID, we don't need to print the SKUID info for
every PCD since in the Global section there already have this info.
For DefaultStore, we use same rule.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
The final Pcd value should only be override by its parents.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Pcd default value in DEC should only be assigned once.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
DynamicHiiPcd may be used by PEIM or DXE driver.
All used DynamicHiiPcd value should be collected and placed into
the default setting PCD PcdNvStoreDefaultValueBuffer.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
VS2010 also defined RSIZE_MAX, so we undef it first.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Currently "BaseTools/Source/C/DevicePath/DevicePath.c" fails to build with
GCC48:
> DevicePath.c: In function 'print_mem':
> DevicePath.c:109:5: error: 'for' loop initial declarations are only
> allowed in C99 mode
> for (size_t i=0; i<n; i++) {
> ^
> DevicePath.c:109:5: note: use option -std=c99 or -std=gnu99 to compile
> your code
In addition, the print_mem() function does not conform to the edk2 coding
style:
- we use CamelCase and no underscores in identifiers,
- the types and type qualifiers should follow the edk2 style,
- initialization as part of definition is forbidden for local variables.
Clean these up.
While updating the print_mem()/PrintMem() call sites, also remove the
superfluous parentheses around the second argument.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Fixes: 7dbc50bd24
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
UINT64 is defined as the different type for the different ARCHs. To
let it work for all archs and compilers, add (unsigned long long) for
the input value together with %llx.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
in version a74398 we use guid value and Fv name as ffs dir for FILE
statement, this patch apply this rule on subFv image.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
clang generates many warnings
warning: field 'XXX' is uninitialized when used here [-Wuninitialized]
for VfrFormPkg.h.
VfrFormPkg.h defines many classes derived from CIfrObj (along with other
base classes.)
Each of these derived classes defines a non-static member field that serves
as a duplicate pointer to an original pointer defined in the CIfrObj base
class, but cast to a different pointer type.
The derived class constructor passes the duplicate pointer to base class
constructors:
1) Once passes the address of the duplicate pointer to the CIfrObj
constructor to have it initialized.
2) Then passes the duplicate pointer to one or more subsequent base class
constructors to be used.
Both 1) and 2) constitute undefined behavior in C++. C++ prescribes that
base classes are initialized before non-static members when initializing a
derived class. So when base class constructors are executing, it is not
permitted to assume any non-static members of the derived class exist (even
to the stage of having their storage allocated.)
clang does not issue warnings for 1), but issues warnings -Wuninitialized
for 2).
This coding methodology is resolved as follows:
a) The CIfrObj object accessor method for retrieving the original pointer
is revised to a template member function that returns the original
pointer cast to a desired target type.
b) The call to CIfrObj constructor is no longer used to initialize the
duplicate pointer in the derived class.
c) Any subsequent calls to a base class constructor that need to use the
pointer, retrieve it from the CIfrObj base class using the template
accessor method.
d) If the derived class makes no further use of the pointer, then the
duplicate pointer defined in it is eliminated.
e) If the derived class needs the duplicate pointer for other use, the
duplicate pointer remains in the derived class and is initialized in
proper order from the original pointer in CIfrObj.
f) Existing source code that previously used the CIfrObj pointer accessor
method is revised to use the template method.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Some code generated by antlr causes clang to emit warning
warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
The warning is suppressed specifically for clang without affecting other
compilers.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Liming Gao <liming.gao@intel.com>
The member function CVfrDLGLexer::errstd is intended as an override virtual
function of DLGLexerBase::errstd, but due to mismatched prototype, it
didn't override, and never got called.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Use C code parse device path to output hex string, and Python
run command when PCD Value need device path parse.
https://bugzilla.tianocore.org/show_bug.cgi?id=541
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
The issue is that the string 'LPC' starts with the 'L' character and
this is being confused with L" or L' for a Unicode string or Unicode
character.
Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=831
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
We meet a case that different FV use same FILE statement Guid, but the
FILE content is different. current we use the Guid value as Ffs file
dir which cause the ffs file will be override. This patch use Guid
value and Fv name as ffs dir for FILE statement.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
'COMMON' is an alias of 'DEFAULT' for internal code,
it should be removed before generating Pcd DataBase.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
The DecBuildData.py, DscBuildData.py and InfBuildData.py were separated
from WorkspaceDatabase.py, so we updated to use same copyright year
info.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
When multiple skus are enabled, PCD database should record the supported SKUs.
This patch fixes PCD database to add the missing supported SKUs.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@Intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
If VPD PCD value is same in the different SKUs, the different SKUs will
save the same offset for this PCD in VPD region. That means there is only
one PCD value copy in VPD region to save VPD space.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=706
Add Structure PCD support for Build report. Structure PCD field value described
in DEC/DSC will be display in build report. And, PCD value for each SKU and
Default store will also be shown in build report.
Contributed-under: TianoCore Contribution Agreement 1.1
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=546
BaseTools will generate the optimized PCD database to save the image size
at build time for multiple SKUs. The optimized PCD database layout will be like
below, the PCD database will be composed of the full default SKU data
(PCD_DATABASE_INIT) and the non-default SKU delta data(PCD_DATABASE_SKU_DELTA).
PCD driver will build HOB to store the full default SKU data, and patch HOB
data based on non-default SKU delta data for the SKU set by SetSku(),
it can save memory resource at boot time.
//
// PCD database layout:
// +---------------------------------+
// | PCD_DATABASE_INIT (DEFAULT SKU) |
// +---------------------------------+
// | PCD_DATABASE_SKU_DELTA (SKU A) |
// +---------------------------------+
// | PCD_DATABASE_SKU_DELTA (SKU B) |
// +---------------------------------+
// | ...... |
// +---------------------------------+
//
BaseTools, PCD database and driver updates are needed for this proposal.
For single SKU (default) case, this proposal is expected to have no impact.
For multi-SKU case, PCD database format will be changed.
So, PcdDataBase Version is also updated from 6 to 7.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=543
Structure PCD field value can inherit between the different SKUIds.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=661
Collect all DynamicHii and DynamicExHii PCD value into PCD
PcdNvStoreDefaultValueBuffer, then firmware can access this PCD value
to get the variable default setting.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=542
This is pure BaseTools enhancement to support PCD with one structure.
User can specify PCD value based on its structure field.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>