]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
5 years agoMdeModulePkg: Remove EmuVariableRuntimeDxe
Star Zeng [Sat, 12 Jan 2019 15:23:30 +0000 (23:23 +0800)]
MdeModulePkg: Remove EmuVariableRuntimeDxe

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323
Merge EmuVariable and Real variable driver.

The real variable driver has been updated to support emulated
variable NV mode.
This patch removes EmuVariableRuntimeDxe after platforms are
migrated to use the merged variable driver.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Tested-by: Julien Grall <julien.grall@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
5 years agoOvmfPkg/build.sh: Enable flash for qemu 3 or later
Jordan Justen [Fri, 15 Feb 2019 22:10:49 +0000 (14:10 -0800)]
OvmfPkg/build.sh: Enable flash for qemu 3 or later

The check for 1.[1-9][0-9].* was removed since qemu jumped to 2.0
after 1.7.

Changed 2.*.* to [2-9].*.* to match major releases 3 - 9.

Added [1-9][0-9]*.*.* to match major releses >= 10.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoUefiCpuPkg/MtrrLib: Fix a bug that may wrongly set memory <1MB to UC
Ruiyu Ni [Mon, 21 Jan 2019 15:16:22 +0000 (23:16 +0800)]
UefiCpuPkg/MtrrLib: Fix a bug that may wrongly set memory <1MB to UC

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1481

Today's MtrrLib contains a bug, for example:
 when the original cache setting is WB for [0xF_0000, 0xF_8000) and,
 a new request to set [0xF_0000, 0xF_4000) to WP,
 the cache setting for [0xF_4000, 0xF_8000) is reset to UC.

The reason is when MtrrLibSetBelow1MBMemoryAttribute() is called the
WorkingFixedSettings doesn't contain the actual MSR value stored in
hardware, but when writing the fixed MTRRs, the code logic assumes
WorkingFixedSettings contains the actual MSR value.

The new fix is to change MtrrLibSetBelow1MBMemoryAttribute() to
calculate the correct ClearMasks[] and OrMasks[], and use them
directly when writing the fixed MTRRs.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
5 years agoMdeModulePkg/PropertiesTableAttributesDxe: Remove this driver
Shenglei Zhang [Mon, 18 Feb 2019 08:20:37 +0000 (16:20 +0800)]
MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver

This functionality of this driver has been deprecated and
no platform employs this driver. It can be removed completely.
https://bugzilla.tianocore.org/show_bug.cgi?id=1475

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
5 years agoMdePkg/BaseLib: Change a variable type in a bitwise operation
Shenglei Zhang [Thu, 14 Feb 2019 02:43:10 +0000 (10:43 +0800)]
MdePkg/BaseLib: Change a variable type in a bitwise operation

Change the type of variable Chr from CHAR8 to UINT32 in a
bitwise operation, to make the two variables in the operation
have the same size.
https://bugzilla.tianocore.org/show_bug.cgi?id=1527

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/BmBoot: Report status when fail to load/start boot option
Dandan Bi [Fri, 15 Feb 2019 05:58:50 +0000 (13:58 +0800)]
MdeModulePkg/BmBoot: Report status when fail to load/start boot option

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1398

According to PI1.7 Spec, report extended data describing an
EFI_STATUS return value along with
EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR and
EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED status code
when fail to load or start boot option image.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdePkg/StatusCodeDataTypeId.h: Add new definition per PI1.7 Spec
Dandan Bi [Thu, 14 Feb 2019 08:49:12 +0000 (16:49 +0800)]
MdePkg/StatusCodeDataTypeId.h: Add new definition per PI1.7 Spec

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1398

According to PI1.7 Spec, add the new definition
EFI_RETURN_STATUS_EXTENDED_DATA in StatusCodeDataTypeId.h

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible
Max Knutsen [Tue, 4 Sep 2018 17:04:35 +0000 (17:04 +0000)]
MdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1114

V2: simplify the code logic.
update
if (!mHaveExitedBootServices &&
  (StatusCodeData != (EFI_STATUS_CODE_DATA *) StatusCodeBuffer)) {
  gBS->FreePool (StatusCodeData);
}
to
if (StatusCodeData != (EFI_STATUS_CODE_DATA *) StatusCodeBuffer) {
  gBS->FreePool (StatusCodeData);
}

V3:
And the code below into the else condition (stack buffer is not enough)
in /DxeReportStatusCodeLib/ReportStatusCodeLib.c

  if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) {
    return EFI_UNSUPPORTED;
  }

V4:
Refine code logic.

When report status code with ExtendedData data,
and the extended data can fit in the local static buffer,
there is no need to use AllocatePool to hold the ExtendedData data.

This patch is just to do the enhancement to avoid using AllocatePool.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoNetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.
Jiaxin Wu [Wed, 30 Jan 2019 03:24:27 +0000 (11:24 +0800)]
NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1448

*v3: Change the if condition check to only clean the invalid configuration.

*v2: Add the warning debug message.

This patch is to clean the invalid data and continue to start IP6 driver.

Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
5 years agoBaseTools: Fixed an issue about StructurePcd
Feng, Bob C [Sun, 3 Feb 2019 14:47:54 +0000 (22:47 +0800)]
BaseTools: Fixed an issue about StructurePcd

If use a structure pcd in fdf, build tool crash
This is a regression issue introduced by py3 patch set.

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>
5 years agoBaseTools: Fix the build report issue about Structure PCD
Feng, Bob C [Fri, 1 Feb 2019 08:51:43 +0000 (16:51 +0800)]
BaseTools: Fix the build report issue about Structure PCD

https://bugzilla.tianocore.org/show_bug.cgi?id=1472
build report use incorrect method to parse DynamicDefault/DynamicExDefault
and DynamicVpd/DynamicExVpd structure Pcd value.

This patch is to fix this issue.

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>
5 years agoBaseTools: Fixed a build report issue.
Feng, Bob C [Sun, 3 Feb 2019 15:22:26 +0000 (23:22 +0800)]
BaseTools: Fixed a build report issue.

Generate report fail when -Y EXECUTION_ORDER in build command.
This patch is going to fix this issue.

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>
5 years agoBaseTools: Correct the error message for UPT
Feng, Bob C [Thu, 17 Jan 2019 08:28:24 +0000 (16:28 +0800)]
BaseTools: Correct the error message for UPT

This patch is going to correct the error message
for UPT.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hess Chen <hess.chen@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoEmbeddedPkg/Library: Add VirtualRealTimeClockLib
Pete Batard [Mon, 4 Feb 2019 12:47:36 +0000 (12:47 +0000)]
EmbeddedPkg/Library: Add VirtualRealTimeClockLib

This is designed to be used on platforms where a a real RTC is not
available and relies on an RtcEpochSeconds variable having been set or,
if that is not the case, falls back to using the epoch embedded at
compilation time.

Note that, in order to keep things simple for the setting of the
compilation time variable, only GCC environments with UNIX-like shells
and where a 'date' command is available are meant to be supported for
now.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoUefiCpuPkg/SecCore: Support EFI_PEI_CORE_FV_LOCATION_PPI
Chasel, Chiu [Fri, 15 Feb 2019 09:54:22 +0000 (17:54 +0800)]
UefiCpuPkg/SecCore: Support EFI_PEI_CORE_FV_LOCATION_PPI

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1524

Previous commit 373c2c5b888d029d7103206556bb85f33d980569,
missed one comment change that should be fixed.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoUefiCpuPkg/SecCore: Support EFI_PEI_CORE_FV_LOCATION_PPI
Chasel, Chiu [Tue, 12 Feb 2019 12:38:08 +0000 (20:38 +0800)]
UefiCpuPkg/SecCore: Support EFI_PEI_CORE_FV_LOCATION_PPI

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1524

EFI_PEI_CORE_FV_LOCATION_PPI may be passed by platform
when PeiCore not in BFV so SecCore has to search PeiCore
either from the FV location provided by
EFI_PEI_CORE_FV_LOCATION_PPI or from BFV.

Test: Verified on internal platform and booting successfully.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoMdeModulePkg/PeiMain: Support EFI_PEI_CORE_FV_LOCATION_PPI
Chasel, Chiu [Tue, 12 Feb 2019 12:29:19 +0000 (20:29 +0800)]
MdeModulePkg/PeiMain: Support EFI_PEI_CORE_FV_LOCATION_PPI

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1524

When shadowing PeiCore the EFI_PEI_CORE_FV_LOCATION_PPI
should be checked to see if PeiCore not in BFV, otherwise
just shadowing PeiCore from BFV.

Test: Verified on internal platform and booting successfully.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdePkg: Support EFI_PEI_CORE_FV_LOCATION_PPI
Chasel, Chiu [Tue, 12 Feb 2019 08:42:26 +0000 (16:42 +0800)]
MdePkg: Support EFI_PEI_CORE_FV_LOCATION_PPI

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1524

Add EFI_PEI_CORE_FV_LOCATION_PPI definition basing on
PI spec 1.7, Section 6.3.9.
This PPI can support the secnario that PEI Foundation
not in BFV.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoBaseTools/build_rule.template: Remove GCCLD
Shenglei Zhang [Mon, 11 Feb 2019 02:16:39 +0000 (10:16 +0800)]
BaseTools/build_rule.template: Remove GCCLD

GCCLD will be unused when UNIXGCC, CYGGCC and ELFGCC
are removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools/tools_def.template: Remove DDK3790
Shenglei Zhang [Mon, 28 Jan 2019 02:53:46 +0000 (10:53 +0800)]
BaseTools/tools_def.template: Remove DDK3790

DDK3790 is too old.There is no verification for it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

v3:Reserve WINDDK_BIN32 and WINDDK_BIN64.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools/tools_def.template: Remove ELFGCC
Shenglei Zhang [Mon, 28 Jan 2019 03:21:00 +0000 (11:21 +0800)]
BaseTools/tools_def.template: Remove ELFGCC

ELFGCC is too old.There is no verification for it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoOvmfPkg/README: Remove UNIXGCC
Shenglei Zhang [Tue, 29 Jan 2019 08:16:36 +0000 (16:16 +0800)]
OvmfPkg/README: Remove UNIXGCC

Remove UNIXGCC in OvmfPkgIa32.dsc, OvmfPkgIa32X64.dsc
and OvmfPkgX64.dsc.
Remove content related to UNIXGCC in README.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoBaseTools/tools_def.template: Remove UNIXGCC
Shenglei Zhang [Mon, 28 Jan 2019 03:01:18 +0000 (11:01 +0800)]
BaseTools/tools_def.template: Remove UNIXGCC

UNIXGCC is too old.There is no verification for it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoOptionRomPkg/ReadMe.txt: Remove VS2005
Shenglei Zhang [Thu, 31 Jan 2019 08:29:34 +0000 (16:29 +0800)]
OptionRomPkg/ReadMe.txt: Remove VS2005

Remove VS2005 in Build Validation.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Ray Ni <ray.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools/tools_def.template: Remove VS2003 and VS2005
Shenglei Zhang [Thu, 31 Jan 2019 08:24:08 +0000 (16:24 +0800)]
BaseTools/tools_def.template: Remove VS2003 and VS2005

VS2003 and VS2005 are too old.There is no verification
for them.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

v3:1.Instead of removing MS_VS_BIN, change MS_VS_BIN from
     VS2005_BIN to VS2008_BIN.
   2.Instead of removing MS_VS_DLL, change MS_VS_DLL from
     VS2005_DLL to VS2008_DLL.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: Update MYTOOLS
Shenglei Zhang [Mon, 28 Jan 2019 03:19:50 +0000 (11:19 +0800)]
BaseTools: Update MYTOOLS

Remove MYTOOLS in tools_def.template and change
MYTOOLS to VS2015x86 in target.template.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoOptionRomPkg/ReadMe.txt: Remove CYGGCC
Shenglei Zhang [Thu, 31 Jan 2019 08:49:09 +0000 (16:49 +0800)]
OptionRomPkg/ReadMe.txt: Remove CYGGCC

Remove CYGGCC in Build Validation.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Ray Ni <ray.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools/tools_def.template: Remove CYGGCC
Shenglei Zhang [Thu, 31 Jan 2019 08:48:37 +0000 (16:48 +0800)]
BaseTools/tools_def.template: Remove CYGGCC

CYGGCC is too old.There is no verification for it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1377

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/SmmS3SaveStateDxe: Change function parameter types
Shenglei Zhang [Wed, 13 Feb 2019 06:34:10 +0000 (14:34 +0800)]
MdeModulePkg/SmmS3SaveStateDxe: Change function parameter types

Change parameter Opcode from UINT16 to UINTN in
BootScriptWrite and BootScriptInsert.
https://bugzilla.tianocore.org/show_bug.cgi?id=1517

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/S3SaveStateDxe: Change function parameter types
Shenglei Zhang [Wed, 13 Feb 2019 06:30:43 +0000 (14:30 +0800)]
MdeModulePkg/S3SaveStateDxe: Change function parameter types

Change parameter Opcode from UINT16 to UINTN in
BootScriptWrite and BootScriptInsert.
https://bugzilla.tianocore.org/show_bug.cgi?id=1517

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdePkg: Change function parameter type
Shenglei Zhang [Fri, 25 Jan 2019 07:52:46 +0000 (15:52 +0800)]
MdePkg: Change function parameter type

Change type of parameter Opcode from UINT16 to UINTN
in EFI_S3_SAVE_STATE_WRITE and EFI_S3_SAVE_STATE_INSERT.
According to PI 1.6(Errata A), the type of Opcode in
EFI_S3_SAVE_STATE_WRITE and EFI_S3_SAVE_STATE_INSERT should
be UINTN not UINT16.
https://bugzilla.tianocore.org/show_bug.cgi?id=1517

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't restored sometimes
Ray Ni [Fri, 1 Feb 2019 08:51:40 +0000 (16:51 +0800)]
MdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't restored sometimes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1505

When a device under PPB contains option ROM but doesn't require 32bit
MMIO, ProgrameUpstreamBridgeForRom() cannot correctly restore the
PPB MEM32 RANGE BAR. It causes the 32bit MMIO conflict which may
cause system hangs in boot.

The root cause is when ProgrameUpstreamBridgeForRom() calls
ProgramPpbApperture() to restore the PPB MEM32 RANGE BAR, the
ProgramPpbApperture() skips to program the BAR when the resource
length is 0.

This patch fixes this issue by not calling ProgramPpbApperture().
Instead, it directly programs the PPB MEM32 RANGE BAR.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
5 years agoMdeModulePkg/PciBus: Correct typos
Ray Ni [Tue, 12 Feb 2019 03:39:02 +0000 (11:39 +0800)]
MdeModulePkg/PciBus: Correct typos

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoMdeModulePkg/PciBus: Change PCI_IO_DEVICE.RomSize to UINT32 type
Ray Ni [Mon, 11 Feb 2019 05:11:57 +0000 (13:11 +0800)]
MdeModulePkg/PciBus: Change PCI_IO_DEVICE.RomSize to UINT32 type

Per PCI Spec, the option ROM BAR is 32bit so the maximum option ROM
size can be hold by UINT32 type.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoSecurityPkg/OpalPassword: Add NULL pointer check before using it
Eric Dong [Thu, 14 Feb 2019 06:53:14 +0000 (14:53 +0800)]
SecurityPkg/OpalPassword: Add NULL pointer check before using it

https://bugzilla.tianocore.org/show_bug.cgi?id=1503
A pointer variable should be checked if it is NULL or Valid before
using it.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Maggie Chu <maggie.chu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/OpalPassword: Update strings on Opal Setup page
Eric Dong [Thu, 14 Feb 2019 05:37:27 +0000 (13:37 +0800)]
SecurityPkg/OpalPassword: Update strings on Opal Setup page

https://bugzilla.tianocore.org/show_bug.cgi?id=1506
Updated some descriptions on SETUP page to avoid user confusion.
Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to think
it is only for Opal drive but not for Pyrite drive.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Maggie Chu <maggie.chu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoBaseTools: Various typo
Antoine Coeur [Wed, 6 Feb 2019 07:44:39 +0000 (15:44 +0800)]
BaseTools: Various typo

Various typo in BaseTools.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/CapsuleApp: Fix memory leak issue.
Chen A Chen [Mon, 11 Feb 2019 05:42:19 +0000 (13:42 +0800)]
MdeModulePkg/CapsuleApp: Fix memory leak issue.

This issue is caused by FileInfoBuffer variable. This is a pointer array
and each elements also pointer to a memory buffer that is allocated and
returned by AllocateCopyPool function.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-1}

(6 builds in total), PcdOptionRomImageVerificationPolicy,
PcdFixedMediaImageVerificationPolicy, and
PcdRemovableMediaImageVerificationPolicy are not used in any of those
builds.

Restrict the settings to the ArmVirtQemu and ArmVirtQemuKernel platforms
(preserving the -D SECURE_BOOT_ENABLE restriction in the process).

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Restrict
the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/ArmVirtXen: don't set PcdShellFile
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg/ArmVirtXen: don't set PcdShellFile

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds.

Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms.
Restrict the TTY_TERMINAL define similarly.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Restrict
the PCD setting to ($(TARGET) != RELEASE).

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: don't set PcdDebugClearMemoryValue
Laszlo Ersek [Wed, 6 Feb 2019 09:08:53 +0000 (10:08 +0100)]
ArmVirtPkg: don't set PcdDebugClearMemoryValue

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds.

Rather than just restrict the PCD setting to ($(TARGET) != RELEASE),
remove the setting completely. The current value is identical to the 0xAF
default in "MdePkg/MdePkg.dec", which recognizes Andrew Fish, and so it's
unlikely to ever change.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: don't set PcdCoreCount
Laszlo Ersek [Tue, 5 Feb 2019 23:17:24 +0000 (00:17 +0100)]
ArmVirtPkg: don't set PcdCoreCount

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency
Laszlo Ersek [Wed, 6 Feb 2019 00:14:52 +0000 (01:14 +0100)]
ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency

The PcdCoreCount dependency in the "ArmVirtPrePiUniCoreRelocatable.inf"
file is false; the module doesn't consume the PCD. Clean up the INF.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu only)
Laszlo Ersek [Tue, 5 Feb 2019 23:58:56 +0000 (00:58 +0100)]
ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu only)

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(24 builds in total), the PCD is not used in any of those builds.

Move the setting from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc", to reflect
reality.

We originally moved the PCD setting in the opposite direction in commit
8aab575c26e9 ("ArmVirtPkg: enable non-executable DXE stack for all
platforms", 2017-03-07), generalizing it. However, as the comment itself
states, and according to all 36 ArmVirt build reports:

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

the PCD is only consumed by "MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf", and
that module is only included in the ArmVirtQemu platform.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: don't set PcdPostCodePropertyMask
Laszlo Ersek [Tue, 5 Feb 2019 23:17:24 +0000 (00:17 +0100)]
ArmVirtPkg: don't set PcdPostCodePropertyMask

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set PcdTrustzoneSupport
Laszlo Ersek [Tue, 5 Feb 2019 23:32:47 +0000 (00:32 +0100)]
ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set PcdTrustzoneSupport

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(24 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: don't set PcdRelocateVectorTable
Laszlo Ersek [Tue, 5 Feb 2019 23:17:24 +0000 (00:17 +0100)]
ArmVirtPkg: don't set PcdRelocateVectorTable

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase
Laszlo Ersek [Tue, 5 Feb 2019 23:05:05 +0000 (00:05 +0100)]
ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase

According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoMdeModulePkg/NvmExpressDxe: Report StatusCode for device init failure
Sean Brogan [Mon, 11 Feb 2019 07:57:26 +0000 (15:57 +0800)]
MdeModulePkg/NvmExpressDxe: Report StatusCode for device init failure

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1408

According to the information of the above BZ-1408 and other platform
owners, NVM Express devices are becoming more likely to be a critical
part during the boot process.

This commit will add the calls to 'REPORT_STATUS_CODE' when there is a
failure happens during the NVM Express controller/device initialization
process.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <brbarkel@microsoft.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdePkg/BaseLib: implement SpeculationBarrier() for ARM and AArch64
Ard Biesheuvel [Wed, 6 Feb 2019 00:08:22 +0000 (00:08 +0000)]
MdePkg/BaseLib: implement SpeculationBarrier() for ARM and AArch64

Replace the dummy C implementation of SpeculationBarrier() with
implementations consisting of the recommended DSB SY + ISB sequence,
as recommended by ARM in the whitepaper "Cache Speculation Side-channels"
version 2.4, dated October 2018.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
5 years agoMdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue
Chen A Chen [Mon, 11 Feb 2019 06:07:29 +0000 (14:07 +0800)]
MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue

To avoid potential NULL pointer dereference issue. Initialize them at
the beginning of the function. This patch is a supplement which was missed
at e98212cb5d59fff8f385d9179ad7f1a3ce9cf215 commit.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoCorebootModulePkg: Fix various typos
Antoine Coeur [Wed, 6 Feb 2019 16:46:58 +0000 (00:46 +0800)]
CorebootModulePkg: Fix various typos

Fix various typos in CorebootModulePkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Benjamin You <benjamin.you@intel.com>
5 years agoCorebootPayloadPkg: Fix various typos
Antoine Coeur [Wed, 6 Feb 2019 16:48:41 +0000 (00:48 +0800)]
CorebootPayloadPkg: Fix various typos

Fix various typos in CorebootPayloadPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Benjamin You <benjamin.you@intel.com>
5 years agoNetworkPkg/Ip6Dxe: Uninstall protocols when error happen in Driver Binding Start.
Jiaxin Wu [Fri, 25 Jan 2019 00:53:48 +0000 (08:53 +0800)]
NetworkPkg/Ip6Dxe: Uninstall protocols when error happen in Driver Binding Start.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447

This patch is to uninstall Ip6ServiceBindingProtocol and Ip6ConfigProtocol when
error happen in Driver Binding Start.

Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Michael Turner <Michael.Turner@microsoft.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
5 years agoMdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding Start.
Jiaxin Wu [Fri, 25 Jan 2019 00:54:00 +0000 (08:54 +0800)]
MdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding Start.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447

This patch is to uninstall Ip4ServiceBindingProtocol and Ip4Config2Protocol when
error happen in Driver Binding Start.

Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Michael Turner <Michael.Turner@microsoft.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
5 years agoOvmfPkg: Add TCG2 Configuration menu to the Device Manager menu
Stefan Berger [Fri, 25 Jan 2019 21:30:29 +0000 (16:30 -0500)]
OvmfPkg: Add TCG2 Configuration menu to the Device Manager menu

This patch adds the TCG2 Configuration menu to the Device Manager
menu. We can apparently reuse the sample Tcg2ConfigDxe from
SecurityPkg/Tcg/Tcg2Config without obvious adverse effects. The
added TCG2 Configuration menu now shows details about the attached
TPM 2.0 and lets one for example configure the active PCR banks
or issue commands, among other things.

The code is added to Ovmf by building with -DTPM2_ENABLE and
-DTPM2_CONFIG_ENABLE.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 years agoMdeModulePkg DxeCapsuleLibFmp: Update SupportCapsuleImage() for Fake Capsule
Liming Gao [Mon, 14 Jan 2019 02:31:27 +0000 (10:31 +0800)]
MdeModulePkg DxeCapsuleLibFmp: Update SupportCapsuleImage() for Fake Capsule

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1088
Per UEFI spec, the fake capsule image with the header only is a valid case
in QueryCapsuleCpapbilities(). So, SupportCapsuleImage() is updated to
support this case.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
5 years agoCryptoPkg: Fix various typos
Antoine Coeur [Mon, 11 Feb 2019 03:09:44 +0000 (11:09 +0800)]
CryptoPkg: Fix various typos

Fix various typos in CryptoPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
5 years agoArmVirtPkg: Fix various typos
Antoine Coeur [Wed, 6 Feb 2019 15:48:50 +0000 (16:48 +0100)]
ArmVirtPkg: Fix various typos

Fix various typos in ArmVirtPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
5 years agoBaseTools: Fix build failure when specifying multiple BUILDTARGET
Philippe Mathieu-Daud? [Wed, 6 Feb 2019 12:03:44 +0000 (04:03 -0800)]
BaseTools: Fix build failure when specifying multiple BUILDTARGET

With Python3, the dict.value() method returns an iterator.
If a dictionary is updated while an iterator on its keys is used,
a RuntimeError is generated.
Converting the iterator to a list() forces a copy of the mutable
keys in an immutable list which can be safely iterated.

Commit f8d11e5a4aaa converted various uses but missed one:
When specifying multiple BUILDTARGET, the first target builds
successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is
updated, and accessing the next target triggers a RuntimeError.

Convert this iterator to an immutable list, to solve this build error:

    $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc
    [...]
    Processing meta-data ...
    build.py...
     : error C0DE: Unknown fatal error when processing [OvmfPkg/OvmfPkgIa32.dsc]

    (Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace!)

    (Python 3.5.3 on linux) Traceback (most recent call last):
      File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2387, in Main
        MyBuild.Launch()
      File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2141, in Launch
        self._MultiThreadBuildPlatform()
      File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1921, in _MultiThreadBuildPlatform
        self.Progress
      File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__
        self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs)
      File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in _InitWorker
        for BuildData in PGen.BuildDatabase._CACHE_.values():
    RuntimeError: dictionary changed size during iteration

Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection.
In 9c2d68c0a299 the build tools default to the python version provided
by the ${PYTHON} environment variable, however the Python3 transition is
not functional before d943b0c339fef8d11e5a4aaa falls between the
previous two.

Reported-by: Leif Lindholm <leif.lindholm@linaro.org>
Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoBaseTools/BuildReport: fix report for platforms/arches without struct PCDs
Laszlo Ersek [Tue, 5 Feb 2019 11:22:13 +0000 (03:22 -0800)]
BaseTools/BuildReport: fix report for platforms/arches without struct PCDs

The goal of commit 97c8f5b9e7d3 ("BaseTools:StructurePCD value display
incorrect in "Not used" section.", 2019-02-02) was to display the full
contents of such structure PCDs in the build report that were set in the
platform DSC or the FDF, but not used in any module INFs. The listings
would appear in the

  PCDs not used by modules or in conditional directives

section of the build report.

Commit 97c8f5b9e7d3 assumed that any (platform, architecture) combination
would have a (possibly empty) set of structure PCD (and so the set of the
structure PCDs could be filtered for set-but-unused ones).

This is not the case: in "DscBuildData.py", in method
UpdateStructuredPcds(), if "S_pcd_set" remains an empty OrderedDict(),
then it is not added to "GlobalData.gStructurePcd" *at all*, for the
current (platform, architecture) combination.

As a result, when the PCD report tries to fetch the set of structure PCDs
for the current (platform, architecture), "GlobalData.gStructurePcd" does
not return an empty OrderedDict(); instead, it raises a KeyError. Fix it
by defaulting to an empty OrderedDict(), with the get() method.

Reported-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1513
Fixes: 97c8f5b9e7d3136b6051a05cf056ce5ca9e79893
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoSignedCapsulePkg: enable package build for AARCH64/ARM
Leif Lindholm [Thu, 1 Nov 2018 15:07:48 +0000 (15:07 +0000)]
SignedCapsulePkg: enable package build for AARCH64/ARM

This package is used by several platforms in edk2-platforms, so ensure it
can be built directly by adding AARCH64/ARM to SUPPORTED_ARCHITECTURES.

Also force-include CompilerIntrinsicsLib, BaseStackCheckLib and create a
resolution for ArmSoftFloatLib for ARM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: jiewen.yao@intel.com
5 years agoSecurityPkg: fix package build on ARM
Leif Lindholm [Thu, 1 Nov 2018 15:06:11 +0000 (15:06 +0000)]
SecurityPkg: fix package build on ARM

The CompilerIntrinsicsLib and BaseStackCheckLib need to be included in
order for an ARM build of the package .dsc to succeed - so add them.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: jiewen.yao@intel.com
5 years agoIntelFrameworkPkg: fix build for AARCH64/ARM
Leif Lindholm [Thu, 1 Nov 2018 15:01:48 +0000 (15:01 +0000)]
IntelFrameworkPkg: fix build for AARCH64/ARM

Contrary to what the name suggests, some modules in this package are used
on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES
in the .dsc, but AARCH64 was never added - so do that.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
5 years agoIntelFrameworkModulePkg: fix build for AARCH64/ARM
Leif Lindholm [Thu, 1 Nov 2018 14:58:22 +0000 (14:58 +0000)]
IntelFrameworkModulePkg: fix build for AARCH64/ARM

Contrary to what the name suggests, some modules in this package are used
on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES
in the .dsc, but AARCH64 was never added.

Add that, and force inclusion of CompilerIntrinsicsLib and
BaseStackCheckLib for AARCH64/ARM to make the build successful.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoAppPkg: fix webserver build for !Ia32/X64
Leif Lindholm [Thu, 1 Nov 2018 14:51:50 +0000 (14:51 +0000)]
AppPkg: fix webserver build for !Ia32/X64

The WebServer application is not meant to be Ia32/X64 specific, and would
build for other architectures, if it wasn't for the
  #include <Register/Msr.h>
in WebServer.h. Move that statement to Mtrr.c instead, which is the only
consumer, and is already being filtered out for other architectures.

Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoMdePkg: Fix coding style issues
Bi, Dandan [Fri, 1 Feb 2019 06:02:00 +0000 (14:02 +0800)]
MdePkg: Fix coding style issues

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1478

Fix issues that reported by Edk2 coding style check tool(ECC) that:
in Comment, <@param SystemTable> does NOT consistent with parameter
name MmSystemTable.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Fix coding style issues
Dandan Bi [Fri, 1 Feb 2019 06:01:59 +0000 (14:01 +0800)]
MdeModulePkg: Fix coding style issues

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1479

Fix issues that reported by Edk2 coding style check tool(ECC) that:
Comment description should end with period '.'

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoMdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue
Chen A Chen [Fri, 1 Feb 2019 02:06:49 +0000 (10:06 +0800)]
MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue

To avoid potential NULL pointer dereference issue. Initialize them at
the beginning of the function.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoFatPkg/FatPei/Gpt.c: Fix uninitialized variable issue
Chen A Chen [Fri, 1 Feb 2019 02:21:27 +0000 (10:21 +0800)]
FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue

Uninitialized pointer variable may randomly point to a block of memory.
In This case, FreePool function will free a block of memory that is not
belongs to this function.

Cc: Ruiyu Ni <ray.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdePkg/BaseLib: Add Base64Encode() and Base64Decode()
Mike Turner [Fri, 28 Dec 2018 08:00:02 +0000 (16:00 +0800)]
MdePkg/BaseLib: Add Base64Encode() and Base64Decode()

Introduce public functions Base64Encode and Base64Decode.
https://bugzilla.tianocore.org/show_bug.cgi?id=1370

v2:1.Remove some white space.
   2.Add unit test with test vectors in RFC 4648.
     https://github.com/shenglei10/edk2/tree/encode_test
     https://github.com/shenglei10/edk2/tree/decode_test

v3:1.Align white space.
   2.Update comments of Base64Encode and Base64Decode.
   3.Change the use of macro RETURN_DEVICE_ERROR to
     RETURN_INVALID_PARAMETER in string.c.

v4:Change parameters' names.

v5:1.Update usage of variables.
   2.Remove debug message in Base64Decode().

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools:StructurePCD value display incorrect in "Not used" section.
Fan, ZhijuX [Fri, 1 Feb 2019 02:11:20 +0000 (10:11 +0800)]
BaseTools:StructurePCD value display incorrect in "Not used" section.

StructurePCD value display incorrect in "Not used" section,
that the value defined in structure does not show.

StructurePCD will not display in "Not Used" section if
main structure not define in dsc and pcd not in inf

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: Fixed incorrect line number in PcdValueInit.c
Feng, Bob C [Wed, 30 Jan 2019 09:09:53 +0000 (17:09 +0800)]
BaseTools: Fixed incorrect line number in PcdValueInit.c

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1435
This patch is going to fix the issue of incorrect line
number in PcdValueInit.c

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>
5 years agoBaseTools: Enable CODE format in DEC file
Feng, Bob C [Mon, 21 Jan 2019 09:44:50 +0000 (17:44 +0800)]
BaseTools: Enable CODE format in DEC file

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1292.
Enable CODE format in DEC File.

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>
5 years agoBaseTools/ECC: Add a new type of exception
Hess Chen [Wed, 30 Jan 2019 08:05:43 +0000 (16:05 +0800)]
BaseTools/ECC: Add a new type of exception

Add a new type of exception for function body checkpoint.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hess.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: PCD value incorrect in structure pcd sku case.
Fan, ZhijuX [Fri, 1 Feb 2019 07:41:06 +0000 (15:41 +0800)]
BaseTools: PCD value incorrect in structure pcd sku case.

Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _),
then set "SKUID_Defines" to ALL, for FixedAtBuild
gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case,
its value should get from "Default" SKU, not from "_" SKU,
but we does not set value in SKU "_" in dsc, so Test401
should only display the value get from dec.

Missing the map() function causes SKU specific items to
not be deleted

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoEmbeddedPkg/PrePiLib: Correct function name
Jeff Brasen [Fri, 1 Feb 2019 04:28:30 +0000 (21:28 -0700)]
EmbeddedPkg/PrePiLib: Correct function name

Update header file function name for FfsFindFileByName to match
implementation function name.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoMdeModulePkg/SdMmcPciHcDxe: Update comment for spec compliance status
Hao Wu [Tue, 29 Jan 2019 03:00:51 +0000 (11:00 +0800)]
MdeModulePkg/SdMmcPciHcDxe: Update comment for spec compliance status

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1441

This commit will update the file-level comments within the SdMmcPciHcDxe
to reflect the latest specification compliance status of the driver.

Cc: Ray Ni <ray.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
5 years agoBaseTools: Eot tool Python3 adaption
Feng, Bob C [Mon, 14 Jan 2019 08:41:22 +0000 (16:41 +0800)]
BaseTools: Eot tool Python3 adaption

v2:
The python files under CParser4 are generated by antlr4 and for
python3 usage. They have python3 specific syntax, for example
the data type declaration for the arguments of a function. That
is not compitable with python2. this patch is to remove these syntax.

Eot tool Python3 adaption.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: ECC tool Python3 adaption
Feng, Bob C [Fri, 4 Jan 2019 09:35:10 +0000 (17:35 +0800)]
BaseTools: ECC tool Python3 adaption

v2:
The python files under CParser4 are generated by antlr4 and for
python3 usage. They have python3 specific syntax, for example
the data type declaration for the arguments of a function. That
is not compitable with python2. this patch is to remove these syntax.

ECC tool Python3 adaption.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: Handle the bytes and str difference
Feng, Bob C [Wed, 23 Jan 2019 02:16:00 +0000 (10:16 +0800)]
BaseTools: Handle the bytes and str difference

Deal with bytes and str is different, remove the unicode(),
correct open file parameter.
Using utcfromtimestamp instead of fromtimestamp.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: the list and iterator translation
Feng, Bob C [Mon, 28 Jan 2019 07:06:30 +0000 (15:06 +0800)]
BaseTools: the list and iterator translation

In python3,The keys of the dictionary not a list,It needs to be converted

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:ord() don't match in py2 and py3
Feng, Bob C [Wed, 23 Jan 2019 01:29:52 +0000 (09:29 +0800)]
BaseTools:ord() don't match in py2 and py3

In python2, the FvHeaderBuffer Type is a str
In python3, the FvHeaderBuffer Type is a bytes

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:Fixed Rsa issue and a set define issue.
Feng, Bob C [Wed, 23 Jan 2019 01:27:30 +0000 (09:27 +0800)]
BaseTools:Fixed Rsa issue and a set define issue.

ValueError: non-hexadecimal number found in
 fromhex() arg at position 0

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: Update PYTHON env to PYTHON_COMMAND
Liming Gao [Fri, 28 Dec 2018 08:25:04 +0000 (16:25 +0800)]
BaseTools: Update PYTHON env to PYTHON_COMMAND

Update PYTHON env to PYTHON_COMMAND.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:Linux Python highest version check.
Zhijux Fan [Fri, 28 Dec 2018 07:14:49 +0000 (15:14 +0800)]
BaseTools:Linux Python highest version check.

Linux Python highest version check.
The path of Python interpreter assign values to PYTHON_COMMAND

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:Update build tool to print python version information
Zhijux Fan [Tue, 25 Dec 2018 08:04:28 +0000 (16:04 +0800)]
BaseTools:Update build tool to print python version information

print PYTHON3_ENABLE and PYTHON_COMMAND in build tool

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: Update windows and linux run scripts file to use Python3
Zhijux Fan [Wed, 19 Dec 2018 05:28:44 +0000 (13:28 +0800)]
BaseTools: Update windows and linux run scripts file to use Python3

Modify windows script, PosixLike script, edksetup.sh, edksetup.bat to
use Python3 based on PYTHON3_ENABLE environment.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: Similar to octal data rectification
Zhijux Fan [Wed, 16 Jan 2019 12:22:11 +0000 (20:22 +0800)]
BaseTools: Similar to octal data rectification

In python3, if Value is octal data, the int(Value, 0) report an error

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:There is extra blank line in datalog
Zhiju Fan [Mon, 7 Jan 2019 05:28:44 +0000 (13:28 +0800)]
BaseTools:There is extra blank line in datalog

There should be no blank line across every
line in datalog if open it with Notepad++.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: change the Division Operator
Zhijux Fan [Fri, 7 Dec 2018 04:34:44 +0000 (12:34 +0800)]
BaseTools: change the Division Operator

PEP 238 -- Changing the Division Operator
x/y to return a reasonable approximation of the mathematical result
    of the division ("true division")
x//y to return the floor ("floor division")

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:File open failed for VPD MapFile
Feng, Bob C [Wed, 16 Jan 2019 01:12:36 +0000 (09:12 +0800)]
BaseTools:File open failed for VPD MapFile

correct open MapFile support python2 and python3

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:Double carriage return inserted from Trim.py on Python3
Zhiju Fan [Fri, 11 Jan 2019 05:04:44 +0000 (13:04 +0800)]
BaseTools:Double carriage return inserted from Trim.py on Python3

https://bugzilla.tianocore.org/show_bug.cgi?id=1379

Line 208 of BaseTools/Source/Python/Trim/Trim.py uses
'NewLines.append(os.linesep)' to insert a new line into
the list that will be written to the output file.
This causes the '\r\n' inserted with os.linesep to be
written as '\r\r\n', causing some assemblers to error.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools:TestTools character encoding issue
Zhiju Fan [Wed, 9 Jan 2019 02:31:32 +0000 (10:31 +0800)]
BaseTools:TestTools character encoding issue

Specifies encoding when opening a file using codecs

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoBaseTools: Make sure AllPcdList valid.
Feng, Bob C [Thu, 27 Dec 2018 08:09:53 +0000 (16:09 +0800)]
BaseTools: Make sure AllPcdList valid.

This patch is to make sure the AllPcdList is always evaluated.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools:Fv BaseAddress must set If it not set
Zhijux Fan [Wed, 26 Dec 2018 07:23:04 +0000 (15:23 +0800)]
BaseTools:Fv BaseAddress must set If it not set

If ForceRebase is not set, and FV is specified in FD region,
 it should have FvBaseAddress

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>