]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
5 years agoIntelSiliconPkg/MicrocodeUpdate: Fix incorrect checksum issue
Chen A Chen [Mon, 18 Feb 2019 07:21:14 +0000 (15:21 +0800)]
IntelSiliconPkg/MicrocodeUpdate: Fix incorrect checksum issue

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

The same issue has fixed in UefiCpuPkg/Microcode.c file.
Please reference b6f67b4d58b81f12f63f5f8c94cf8af3600297ab
to get more detail information.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoBaseTools: Add parameter check for the AsciiStringToUint64
Feng, Bob C [Sat, 23 Feb 2019 09:41:53 +0000 (17:41 +0800)]
BaseTools: Add parameter check for the AsciiStringToUint64

If the input parameter AsciiString length is greater
than 255, the GenFv will hang.

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:Some build generated files content are not ordered on linux
Fan, ZhijuX [Thu, 21 Feb 2019 05:18:18 +0000 (13:18 +0800)]
BaseTools:Some build generated files content are not ordered on linux

If the WORKSPACE environment variable has been set,The variables that
control stable sorting will not be set.

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: Fix a bug about Structure PCD
Feng, Bob C [Tue, 19 Feb 2019 13:29:49 +0000 (21:29 +0800)]
BaseTools: Fix a bug about Structure PCD

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1535
If there is Hii Structure Pcd, build will fail, root cause is that
there is an incorrect variable access method used in code.

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:Build fail if define [DEPEX] in library inf
Fan, ZhijuX [Thu, 21 Feb 2019 01:33:55 +0000 (09:33 +0800)]
BaseTools:Build fail if define [DEPEX] in library inf

When define [DEPEX] in lib inf to build, it will fail and report"
gUefiOvmfPkgTokenSpaceGuid.test1 used in [Depex] section should be
used as FixedAtBuild type and VOID* datum type in the module."
But we define this PCD to FixedAtBuild type and VOID* datum type indeed.

DEC:
[PcdsFixedAtBuild]
gUefiOvmfPkgTokenSpaceGuid.test1 |
{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x3c

DSC:
add pcd under lib inf as below:

NULL|TestPkg/TestLib/TestLib.inf
 <PcdsFixedAtBuild>
    gUefiOvmfPkgTokenSpaceGuid.test1 | {GUID(gUefiOvmfPkgTokenSpaceGuid)}

Lib inf:(TestPkg/TestLib/TestLib.inf)
[Depex]
gUefiOvmfPkgTokenSpaceGuid.test1
[FixedPcd]
gUefiOvmfPkgTokenSpaceGuid.test1

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 agoBaseTool: Fixed incremental rebuild issue.
Feng, Bob C [Wed, 20 Feb 2019 15:21:31 +0000 (23:21 +0800)]
BaseTool: Fixed incremental rebuild issue.

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

This issue in introduced by commit
d943b0c339fe3d35ffdf9f580ccb7a55915c6854

To convert bytes to string, we need to use bytes.decode()
instead of using str(bytes).

If the source file is not a txt file, ignore that 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 agoBaseTool/GenC: Fix build error when type is BASE or USER_DEFINED.
Jiewen Yao [Wed, 20 Feb 2019 11:33:18 +0000 (19:33 +0800)]
BaseTool/GenC: Fix build error when type is BASE or USER_DEFINED.

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

1) The GenC tool does not include the constructor/destructor for
USER_DEFINED module. It should be included.
Only constructor/destructor with BASE type is included here.
The constructor/destructor with PEI/DXE/SMM type is still excluded
to keep original behavior.

2) The GenC tool includes the UnloadImage code for BASE module.
It should NOT be included.

3) The GenC tool uses EFI_STATUS and ASSERT_EFI_ERROR for BASE type.
It should use RETURN_STATUS and ASSERT_RETURN_ERROR.

4) The GenC tool miss DebugLib.h for BASE or USER_DEFINED module
AutoGen.c. Only Base.h is there. It should add Library/DebugLib.h.

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: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoMdeModulePkg: Add the runtime ResetSystemLib in MdeModulePkg.dsc
Zhichao Gao [Thu, 21 Feb 2019 00:59:44 +0000 (08:59 +0800)]
MdeModulePkg: Add the runtime ResetSystemLib in MdeModulePkg.dsc

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

Add the runtime library instance of ResetSystemLib in
MdeModulePkg.dsc to make sure it can build pass.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Add a runtime library instance of ResetSystemLib
Zhichao Gao [Thu, 21 Feb 2019 00:59:43 +0000 (08:59 +0800)]
MdeModulePkg: Add a runtime library instance of ResetSystemLib

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

Implement a runtime library instance of ResetSystemLib. It would
use a internal point instead of gRT and convert it depend on
gEfiEventVirtualAddressChangeGuid.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Add a new API ResetSystem for PEI ResetSystemLib
Zhichao Gao [Thu, 21 Feb 2019 00:59:42 +0000 (08:59 +0800)]
MdeModulePkg: Add a new API ResetSystem for PEI ResetSystemLib

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

Add a new API ResetSystem for PEI ResetSystemLib to be in accord with
DXE instance.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Add a new API ResetSystem for Null version
Zhichao Gao [Thu, 21 Feb 2019 00:59:41 +0000 (08:59 +0800)]
MdeModulePkg: Add a new API ResetSystem for Null version

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

Add a new API ResetSystem for BaseResetSystemLibNull to be
in accord with other instances.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Add a new API ResetSystem for DXE ResetSystemLib
Zhichao Gao [Thu, 21 Feb 2019 00:59:40 +0000 (08:59 +0800)]
MdeModulePkg: Add a new API ResetSystem for DXE ResetSystemLib

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

Add a new API ResetSystem for DXE ResetSystemLib. So the consumer of
ResetSystemLib can use this API to reset system with additional reset
data.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Add the new API ResetSystem in the head file
Zhichao Gao [Thu, 21 Feb 2019 00:59:39 +0000 (08:59 +0800)]
MdeModulePkg: Add the new API ResetSystem in the head file

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

Add the new API ResetSystem in the related head file so that
the consumer can use it through the combination of library
instance and head file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: change the function name ResetSystem
Zhichao Gao [Thu, 21 Feb 2019 00:59:38 +0000 (08:59 +0800)]
MdeModulePkg: change the function name ResetSystem

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

Change the function name form ResetSystem to RuntimeServiceResetSystem.
Because ResetSystem and EfiResetSystem would be used in ResetSystemLib
and RuntimeLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoShellPkg: add array index check for shell delay option
Zhichao Gao [Mon, 18 Feb 2019 08:28:09 +0000 (16:28 +0800)]
ShellPkg: add array index check for shell delay option

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

Shell delay option without parameters do not check the
index of shell parameter argv. Add index check to avoid
invalid pointer references.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoSecurityPkg/HddPassword: Add Security feature set support for ATA dev
Hao Wu [Tue, 15 Jan 2019 08:33:09 +0000 (16:33 +0800)]
SecurityPkg/HddPassword: Add Security feature set support for ATA dev

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

This commit will add the 'Security feature set' support for ATA devices.

According to the AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS)
specification, the Security feature set is an optional feature. In
summary, the feature is a password system that restricts access to user
data stored on an ATA device. A more detailed introduction of this feature
can be referred from the ATA8-ACS spec.

The HddPassword driver is composed of 2 parts:
* A DXE driver and
* A PEI driver

The DXE driver consumes EFI_ATA_PASS_THRU_PROTOCOL instances and installs
an HII GUI to manage the devices. If the managing device supports Security
feature set, the HII page will provide the user with the ability to
set/update/disable the password for this device. Also, if a password is
being set via the Security feature set, a popup window will show during
boot requesting the user to input password.

Another feature supported by this driver is that for those managing
devices with password set, they will be automatically unlocked during the
S3 resume. This is done by the co-work of the DXE driver and the PEI
driver:

The DXE driver will save the password and the identification information
for these devices into a LockBox, which is only allowed to restore during
S3 resume.

The PEI driver, during S3 resume, will restore the content in the LockBox
and will consume EDKII_PEI_ATA_PASS_THRU_PPI instances to unlock devices.

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: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/OpalPassword: Remove HW init codes and consume SSC PPI
Hao Wu [Mon, 27 Aug 2018 08:52:13 +0000 (16:52 +0800)]
SecurityPkg/OpalPassword: Remove HW init codes and consume SSC PPI

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

For the current implementation of OpalPassword drivers, it has a feature
to support devices being automatically unlocked in the S3 resume. For this
feature, two types of devices are supported:

* ATA hard disks working under AHCI mode
* NVM Express devices

The support of this feature requires the above 2 types of device to be
initialized at the PEI phase during S3 resume, which is done by the
co-work of the OpalPasswordDxe driver and the OpalPasswordPei driver.

More specifically, the OpalPasswordDxe will handle:

* Pre-allocate MMIO resource and save it in a driver internal LockBox for
  OpalPasswordPei to retrieve;
* Save the PCI configuration space of ATA controllers into boot script.

Meanwhile, the OpalPasswordPei will handle:

* Rely on the boot script for the PCI configuration space program of ATA
  controllers;
* Restore the driver internal LockBox to get the MMIO resource;
* Complete the PCI configuration space program for ATA and NVME
  controllers;
* Initialize ATA and NVME controllers and devices.

This commit will remove these hardware initialization related codes from
the OpalPassword drivers. The hardware initialization will be covered by
PEI storage device drivers (e.g. NvmExpressPei & AhciPei in the
MdeModulePkg).

After such codes removal, the OpalPasswordDxe will only handle:

* Construct/update the S3StorageDeviceInitList LockBox with the managing
  ATA and NVME devices.

And the OpalPasswordPei will only handle:

* Locate Storage Security Command PPI instances to perform the device
  automatic unlock during the S3 resume.

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: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoOvmfPkg/LockBoxLib: Update the comments for API UpdateLockBox()
Hao Wu [Mon, 11 Feb 2019 07:39:50 +0000 (15:39 +0800)]
OvmfPkg/LockBoxLib: Update the comments for API UpdateLockBox()

The previous commit:
MdeModulePkg/SmmLockBoxLib: Support LockBox enlarge in UpdateLockBox()

adds the support to enlarge a LockBox when using the LockBoxLib API
UpdateLockBox().

This commit is to sync the API description comment of UpdateLockBox() with
its counterparts in MdeModulePkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdeModulePkg/SmmLockBoxLib: Support LockBox enlarge in UpdateLockBox()
Hao Wu [Tue, 4 Dec 2018 01:59:55 +0000 (09:59 +0800)]
MdeModulePkg/SmmLockBoxLib: Support LockBox enlarge in UpdateLockBox()

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

This commit will add the support to enlarge a LockBox when using the
LockBoxLib API UpdateLockBox().

Please note that the new support will ONLY work for LockBox with attribute
LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY set.

The functional uni-test for the commit is available at:
https://github.com/hwu25/edk2/tree/lockbox_unitest

Cc: Jian J Wang <jian.j.wang@intel.com>
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: Ray Ni <ray.ni@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoMdeModulePkg/SmmLockBox(PEI): Remove an ASSERT in RestoreLockBox()
Hao Wu [Mon, 24 Dec 2018 06:49:01 +0000 (14:49 +0800)]
MdeModulePkg/SmmLockBox(PEI): Remove an ASSERT in RestoreLockBox()

This commit is out of the scope for BZ-1409. It is a refinement for the
PEI library instance within SmmLockBoxLib.

For the below ASSERT statement within function RestoreLockBox():
  Status = SmmCommunicationPpi->Communicate (
                                  SmmCommunicationPpi,
                                  &CommBuffer[0],
                                  &CommSize
                                  );
  if (Status == EFI_NOT_STARTED) {
    //
    // Pei SMM communication not ready yet, so we access SMRAM directly
    //
    DEBUG ((DEBUG_INFO, "SmmLockBoxPeiLib Communicate - (%r)\n", Status));
    Status = InternalRestoreLockBoxFromSmram (Guid, Buffer, Length);
    LockBoxParameterRestore->Header.ReturnStatus = (UINT64)Status;
    if (Length != NULL) {
      LockBoxParameterRestore->Length = (UINT64)*Length;
    }
  }
  ASSERT_EFI_ERROR (Status);

It is possible for previous codes to return an error status that is
possible for happen. One example is that, when the 'if' statement
'if (Status == EFI_NOT_STARTED) {' is entered, function
InternalRestoreLockBoxFromSmram() is possible to return 'BUFFER_TOO_SMALL'
if the caller of RestoreLockBox() provides a buffer that is too small to
hold the content of LockBox.

Thus, this commit will remove the ASSERT here.

Please note that the current implementation of RestoreLockBox() is
handling the above-mentioned error case properly, so no additional error
handling codes are needed here.

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>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoMdeModulePkg/SmmLockBoxLib: Use 'DEBUG_' prefix instead of 'EFI_D_'
Hao Wu [Mon, 3 Dec 2018 08:31:23 +0000 (16:31 +0800)]
MdeModulePkg/SmmLockBoxLib: Use 'DEBUG_' prefix instead of 'EFI_D_'

This commit is out of the scope for BZ-1409. It is a coding style
refinement for the SmmLockBoxLib.

More specifically, the commit will remove all the debug message display
level macros starting with 'EFI_D_' and replace them with macros starting
with 'DEBUG_'.

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>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoMdeModulePkg/AhciPei: Add AHCI mode ATA device support in PEI
Hao Wu [Fri, 22 Jun 2018 08:53:28 +0000 (16:53 +0800)]
MdeModulePkg/AhciPei: Add AHCI mode ATA device support in PEI

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

This commit will add the AHCI mode ATA device support in the PEI phase.

More specifically, the newly add AhciPei driver will consume the ATA AHCI
host controller PPI for ATA controllers working under AHCI code within the
system. And then produces the below PPIs for each controller:

EDKII PEI ATA PassThru PPI
Storage Security Command PPI

Also, the driver will consume the S3StorageDeviceInitList LockBox in S3
phase. The purpose is to perform an on-demand (partial) ATA device
enumeration/initialization on each controller to benefit the S3 resume
performance.

The implementation of this driver is currently based on the below
specifications:
Serial ATA Revision 2.6
Serial ATA Advanced Host Controller Interface (AHCI) 1.3.1
AT Attachment with Packet Interface - 6 (ATA/ATAPI-6)

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: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdeModulePkg/NvmExpressPei: Consume S3StorageDeviceInitList LockBox
Hao Wu [Mon, 21 Jan 2019 06:14:19 +0000 (14:14 +0800)]
MdeModulePkg/NvmExpressPei: Consume S3StorageDeviceInitList LockBox

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

For the NvmExpressPei driver, this commit will update the driver to
consume the S3StorageDeviceInitList LockBox in S3 phase. The purpose is to
perform an on-demand (partial) NVM Express device
enumeration/initialization to benefit the S3 resume performance.

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: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdeModulePkg/NvmExpressPei: Add logic to produce SSC PPI
Hao Wu [Tue, 29 Jan 2019 08:43:41 +0000 (16:43 +0800)]
MdeModulePkg/NvmExpressPei: Add logic to produce SSC PPI

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

For the NvmExpressPei driver, this commit will add codes to produce the
Storage Security Command PPI if the underlying NVM Express controller
supports the Security Send and Security Receive commands.

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: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdeModulePkg/NvmExpressPei: Avoid updating the module-level variable
Hao Wu [Mon, 27 Aug 2018 08:51:45 +0000 (16:51 +0800)]
MdeModulePkg/NvmExpressPei: Avoid updating the module-level variable

This commit is out of the scope for BZ-1409. The commit will remove the
call of RegisterForShadow() at the entry point of the driver. By doing so,
the driver is now possible to be executed without being re-loaded into
permanent memory.

Thus, this commit will update the NvmExpressPei driver to avoid updating
the content of a global variable.

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 agoMdeModulePkg: Add GUID for LockBox to save storage dev to init in S3
Hao Wu [Fri, 14 Dec 2018 06:39:45 +0000 (14:39 +0800)]
MdeModulePkg: Add GUID for LockBox to save storage dev to init in S3

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

This commit will add the GUID definitions for LockBox which is used to
save a list of storage devices that need to get initialized during the S3
resume.

The content of the LockBox will be a DevicePath structure that contains
zero or more DevicePath instances. Each instance denotes a storage device
that needs to get initialized during the S3 resume.

The producers of the content of this LockBox will be drivers like
OpalPassword DXE driver. This kind of drivers requires some specific
storage devices to be initialized during the PEI phase of in S3 resume.
(For the OpalPassword case, it requires the managing devices to be
automatically unlocked during the S3 resume).

The attribute of the LockBox should be set to
LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY.

The consumers of the content of this LockBox will be PEI storage device
controller/bus drivers (e.g. NvmExpressPei) during S3 resume. This kind of
drivers can use the DevicePath instances stored in the LockBox to get a
list of devices that need to get initialized. In such way, an on-demand
(partial) device enumeration/initialization can be performed to benefit
the S3 resume performance.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Eric Dong <eric.dong@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>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg: Add definitions for Storage Security Command PPI
Hao Wu [Mon, 11 Jun 2018 01:47:50 +0000 (09:47 +0800)]
MdeModulePkg: Add definitions for Storage Security Command PPI

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

This commit will add the definitions for Storage Security Command (SSC)
PPI. This PPI will be be used to abstract mass storage devices to allow
code running in the PEI phase to send security protocol commands to mass
storage devices without specific knowledge of the type of device or
controller that manages the device.

More specifically, the PPI will provide services to:

* Get the number of mass storage devices managed by a instance of the SSC
  PPI (by service 'GetNumberofDevices');
* Get the identification information (DevicePath) of a managing mass
  storage devices (by service 'GetDevicePath');
* Send security protocol commands to mass storage devices (by services
  'ReceiveData' and 'SendData').

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>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg: Add definitions for EDKII PEI ATA PassThru PPI
Hao Wu [Tue, 3 Jul 2018 06:28:22 +0000 (14:28 +0800)]
MdeModulePkg: Add definitions for EDKII PEI ATA PassThru PPI

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

This commit will add the definitions for EDKII PEI ATA PassThru PPI. This
PPI will provide services that allow ATA commands to be sent to ATA
devices attached to an ATA controller in the PEI phase.

More specifically, the PPI will provide services to:

* Send ATA commands to an ATA device (by service 'PassThru');
* Get the list of the attached ATA device on a controller (by services
  'GetNextPort' and 'GetNextDevice');
* Get the identification information (DevicePath) of the underlying ATA
  host controller (by service 'GetDevicePath').

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>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg: Add definitions for ATA AHCI host controller PPI
Hao Wu [Tue, 19 Jun 2018 05:52:36 +0000 (13:52 +0800)]
MdeModulePkg: Add definitions for ATA AHCI host controller PPI

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

This commit will add the definitions for ATA AHCI host controller PPI. The
purpose of the PPI in to provide:

* MMIO base address
* Controller identification information (DevicePath)

for ATA host controllers working under AHCI mode.

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>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMaintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module reviewers
Laszlo Ersek [Thu, 21 Feb 2019 10:57:33 +0000 (11:57 +0100)]
Maintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module reviewers

We can use the format introduced under MdeModulePkg to clarify the
reviewership scopes a little. This should decrease the review spam that
Xen reviewers get.

Cc: Andrew Fish <afish@apple.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[lersek@redhat.com: resolve conflict with commit 98fc52c44eee]

5 years agoMaintainers: add TPM2 reviewers for OvmfPkg
Laszlo Ersek [Mon, 11 Feb 2019 12:34:30 +0000 (13:34 +0100)]
Maintainers: add TPM2 reviewers for OvmfPkg

OVMF can be built with a significant amount of TPM2 code now; add
Marc-André and Stefan as Reviewers for TPM2-related patches.

Keep the list of "R" entries alphabetically sorted.

Cc: Andrew Fish <afish@apple.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[lersek@redhat.com: resolve conflict with commit 98fc52c44eee]

5 years agoMaintainers.txt: Update e-mail address for Julien Grall
Julien Grall [Thu, 21 Feb 2019 15:21:07 +0000 (15:21 +0000)]
Maintainers.txt: Update e-mail address for Julien Grall

I don't watch much my Linaro e-mail anymore. So update my e-mail address
from Linaro to the Arm one.

Contributed-under: Tianocore Contribution Agreement 1.1
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
5 years agoMdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device...
Jian J Wang [Thu, 14 Feb 2019 09:57:47 +0000 (17:57 +0800)]
MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path

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

Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoMdePkg/UefiDevicePathLib: Add sanity check for FilePath device path
Jian J Wang [Fri, 25 Jan 2019 14:12:25 +0000 (22:12 +0800)]
MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path

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

Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
5 years agoUefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table
Chen A Chen [Fri, 15 Feb 2019 06:29:41 +0000 (14:29 +0800)]
UefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table

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

The following Microcode payload format is define in SDM spec.
Payload: |MicrocodeHeader|MicrocodeBinary|ExtendedHeader|ExtendedTable|.
When we verify the CheckSum32 with ExtendedTable, we should use the fields
of ExtendedTable to replace corresponding fields in MicrocodeHeader,
and then calculate the CheckSum32 with MicrocodeHeader+MicrocodeBinary.
This patch already verified on ICL platform.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state.
Gonzalez Del Cueto, Rodrigo [Mon, 4 Feb 2019 06:06:57 +0000 (14:06 +0800)]
SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state.

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

Currently the TCG config setup form defaults the physical presence action to
PHYSICAL_PRESENCE_ENABLE, this prevents the action from being called. When a TPM
1.2 device is in Disabled and Activated state it is not possible to issue the
PHYSICAL_PRESENCE_ENABLE using the menu action.

By having the form default to PHYSICAL_PRESENCE_NO_ACTION, the user is now able
to select PHYSICAL_PRESENCE_ENABLE and toggle the TPM 1.2 device enable state.

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Rodrigo Gonzalez del Cueto <rodrigo.gonzalez.del.cueto@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoBaseTools:PCD value error in structure pcd sku case.
Fan, ZhijuX [Mon, 18 Feb 2019 09:53:09 +0000 (17:53 +0800)]
BaseTools:PCD value error 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.

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 build failure when specifying multiple BUILDTARGET
Fan, ZhijuX [Tue, 19 Feb 2019 10:56:03 +0000 (18:56 +0800)]
BaseTools:Fixed 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.

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: replace Sdict with OrderedDict in UPT
Feng, Bob C [Tue, 19 Feb 2019 15:44:22 +0000 (23:44 +0800)]
BaseTools: replace Sdict with OrderedDict in UPT

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

V2: import OrderredDict as Sdict in Misc.py instead
updating all the py files.

Sdict class is removed on the commit
174a9d3cc8f74f7a731ac5f16ce6864c8eb359ec
but there are still some py files import it.

This patch is to use collections.OrderedDict to replace Sdict.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoBaseTools:BaseTools supports to the driver combination.
Fan, ZhijuX [Tue, 19 Feb 2019 10:46:41 +0000 (18:46 +0800)]
BaseTools:BaseTools supports to the driver combination.

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

To save the image size without the compression, more than
one drivers can be combined into single one. When more than
one drivers are combined, their depex will be AND together.
Below is the example to combine BootManagerPolicyDxe into
DriverHealthManagerDxe.

Besides this patch, BaseTools also needs to check the module
type and make sure all module type are same. Otherwise,
BaseTools will report the error.
DRIVER INF has the parameter ENTRY_POINT
LIBRARY INF has the parameter LIBRARY_CLASS

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: Liming Gao <liming.gao@intel.com>
5 years agoIntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement
Shenglei Zhang [Mon, 18 Feb 2019 07:15:41 +0000 (15:15 +0800)]
IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement

The error message of ExtendedTableCount is not clear. Add the count
number into the debug message.
https://bugzilla.tianocore.org/show_bug.cgi?id=1500

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
5 years agoBaseTools: Remove unused txt files
Liming Gao [Fri, 15 Feb 2019 14:32:18 +0000 (22:32 +0800)]
BaseTools: Remove unused txt files

externals.txt is to refer to the binary Win32. It is not used any longer.
BuildNotes.txt is to freeze BaseTools python. It is not used any longer.
BinaryFiles.txt is to list the file in Bin directory. But, Bin dir is empty.
building-gcc.txt and gcc is for mingw-gcc. It is not used any longer.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
5 years agoUefiCpuPkg/SecCore: Wrong Debug Information for SecCore
Chasel, Chiu [Tue, 19 Feb 2019 07:30:23 +0000 (15:30 +0800)]
UefiCpuPkg/SecCore: Wrong Debug Information for SecCore

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

When SecCore and PeiCore in different FV, current
implementation still assuming SecCore and PeiCore are in
the same FV.
To fix this issue 2 FVs will be input parameters for
FindAndReportEntryPoints () and SecCore and PeiCore will
be found in each FV and correct debug information will
be reported.

Test: Booted with internal platform 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>
5 years agoMdeModulePkg/SdMmcPciHcDxe: Use 16/32-bit IO widths
Edgar Handal [Tue, 19 Feb 2019 17:06:56 +0000 (01:06 +0800)]
MdeModulePkg/SdMmcPciHcDxe: Use 16/32-bit IO widths

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

Use 16-bit and 32-bit IO widths for SDMMC MMIO to prevent all register
accesses from being split up into 8-bit accesses.

The SDHCI specification states that the registers shall be accessible in
byte, word, and double word accesses. (SD Host Controller Simplified
Specification 4.20 Section 1.2)

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoMdeModulePkg/SdMmcPciHcDxe Fix eMMC HS400 switch sequence
Albecki, Mateusz [Mon, 18 Feb 2019 11:11:37 +0000 (19:11 +0800)]
MdeModulePkg/SdMmcPciHcDxe Fix eMMC HS400 switch sequence

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

In eMMC HS400 switch sequence flow eMMC driver attempted
to execute SEND_STATUS just after switching bus timing to high
speed and before downgrading clock frequency to 52MHz. Since link
was at that time in incorrect state SEND_STATUS was failing which
made driver think switch to HS400 failed.
This change makes driver always change clock frequency after
switching bus timing and before executing SEND_STATUS.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Albecki Mateusz <mateusz.albecki@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
5 years agoBaseTools: Fixed a code bug for Pcd Array.
Feng, Bob C [Thu, 14 Feb 2019 08:48:03 +0000 (16:48 +0800)]
BaseTools: Fixed a code bug for Pcd Array.

For example, PCD gUefiOvmfPkgTokenSpaceGuid.Test001 datatype is Array:
TEST1[2]
and the filed TEST1UINT64ARRAY in TEST1 is also an array:
UINT64 TEST1UINT64ARRAY[2];

Then the following filed assignment in DSC will cause build failure.
gUefiOvmfPkgTokenSpaceGuid.Test001[0].TEST1UINT64ARRAY|{'A','B'}

The root cause is build tool generate incorrect PcdValueInit.c File.

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: Fixed a bug in Vpd handling
Feng, Bob C [Mon, 18 Feb 2019 09:20:25 +0000 (17:20 +0800)]
BaseTools: Fixed a bug in Vpd handling

If there are multiple sku used in a platform and
gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer PCD
is used, build will fail.

This is a regression issue introduced by the commit:
5695877ec8f636bd4ad873ef50eceb9da7a0f382 which only update the
Vpd offset for default SKU but not other SKUs.

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: Fix a ParseDevPathValue function issue.
Feng, Bob C [Sat, 16 Feb 2019 15:33:35 +0000 (23:33 +0800)]
BaseTools: Fix a ParseDevPathValue function issue.

In ParseDevPathValue, the binary data need to convert to string
for python3 and python2 compatiblity.

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 a ECC issue
Fan, ZhijuX [Mon, 18 Feb 2019 06:23:30 +0000 (14:23 +0800)]
BaseTools:Fix a ECC issue

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

A property error occurred because the property of the
function was not defined. a property is now redefined.

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: Add MaxSizeUserSet to Pcd deepcopy function
Feng, Bob C [Sat, 16 Feb 2019 14:51:51 +0000 (22:51 +0800)]
BaseTools: Add MaxSizeUserSet to Pcd deepcopy function

MaxSizeUserSet is missing in Pcd deepcopy function.
This patch is to add it back to Pcd deepcopy function.

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 agoDynamicTablesPkg: Arm IORT Table Generator
Sami Mujawar [Sat, 15 Dec 2018 12:31:47 +0000 (12:31 +0000)]
DynamicTablesPkg: Arm IORT Table Generator

The IORT generator uses the configuration manager protocol
to obtain information about the PCI Root Complex, SMMU,
GIC ITS, Performance Monitoring counters etc. and generates
the IORT table.

The mappings between the components are represented using
tokens. The generator invokes the configuration manager
protocol interfaces and requests for objects referenced by
tokens to establish the link.

This table data is then used by the Table Manager to install
the IORT table.

The Table Manager then invokes the generator interface to free
any resources allocated by the IORT table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm PCI MCFG Table Generator
Sami Mujawar [Sat, 15 Dec 2018 12:29:49 +0000 (12:29 +0000)]
DynamicTablesPkg: Arm PCI MCFG Table Generator

The MCFG generator uses the configuration manager protocol
to obtain the PCI Configuration space information from the
platform configuration manager and builds the MCFG table.

This table data is then used by the Table Manager to install
the MCFG table.

The Table Manager then invokes the generator interface to free
any resources allocated by the MCFG table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm DBG2 Table Generator
Sami Mujawar [Sat, 15 Dec 2018 12:28:23 +0000 (12:28 +0000)]
DynamicTablesPkg: Arm DBG2 Table Generator

The DBG2 generator uses the configuration manager protocol
to obtain the debug serial port information from the platform
configuration manager. It then updates a template DBG2 table
structure. This table data is used by the Table Manager to
install the DBG2 table.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm SPCR Table Generator
Sami Mujawar [Sat, 15 Dec 2018 12:27:03 +0000 (12:27 +0000)]
DynamicTablesPkg: Arm SPCR Table Generator

The SPCR generator uses the configuration manager protocol to
obtain the serial port information from the platform configuration
manager. It then updates a template SPCR table structure. This
table data is used by the Table Manager to install the SPCR table.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm ACPI GTDT Generator
Sami Mujawar [Sat, 15 Dec 2018 12:25:52 +0000 (12:25 +0000)]
DynamicTablesPkg: Arm ACPI GTDT Generator

The GTDT generator uses the configuration manager protocol to
obtain information about the architectural and platform timers
available on the platform and generates the ACPI GTDT table.
This table data is then used by the Table Manager to install
the GTDT table.

The Table Manager then invokes the generator interface to free
any resources allocated by the GTDT table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm ACPI MADT Generator
Sami Mujawar [Sat, 15 Dec 2018 12:23:59 +0000 (12:23 +0000)]
DynamicTablesPkg: Arm ACPI MADT Generator

The MADT generator uses the configuration manager protocol to
obtain information about the Arm interrupt controllers (GICC,
GICD, etc.) and generates the ACPI MADT table. This table data
is then used by the Table Manager to install the MADT table.

The Table Manager then invokes the generator interface to free
any resources allocated by the MADT table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm ACPI FADT Generator
Sami Mujawar [Sat, 15 Dec 2018 12:22:45 +0000 (12:22 +0000)]
DynamicTablesPkg: Arm ACPI FADT Generator

The FADT generator collates the relevant information required
for generating a FADT table from configuration manager using
the configuration manager protocol. It then updates a template
FADT table structure. This table data is used by the Table
Manager to install the FADT table.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm Raw/DSDT/SSDT Generator
Sami Mujawar [Sat, 15 Dec 2018 12:20:23 +0000 (12:20 +0000)]
DynamicTablesPkg: Arm Raw/DSDT/SSDT Generator

A Raw generator is a simple generator. This generator provides
the ability to install a binary blob (that contains ACPI table
data) as an ACPI table. The binary blob could be pre-generated
ACPI table data or it may be the pre-compiled output from an
iAsl compiler for a DSDT or SSDT table.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Dynamic Table Manager Dxe
Sami Mujawar [Sat, 15 Dec 2018 12:18:52 +0000 (12:18 +0000)]
DynamicTablesPkg: Dynamic Table Manager Dxe

The dynamic table manager implements the top level component
that drives the table generation and installation process.
It uses the configuration manager protocol to get the list
of tables to be installed from the configuration manager.
It iterates through the list of tables, requests the table
factories for corresponding generators and invokes the
generator interface to build the tables.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Dynamic Table Factory Dxe
Sami Mujawar [Sat, 15 Dec 2018 12:17:06 +0000 (12:17 +0000)]
DynamicTablesPkg: Dynamic Table Factory Dxe

The dynamic table factory dxe implements the dynamic table
factory protocol. It also implements the ACPI, SMBIOS and
DT table factories. The table generators register themselves
with the respective table factories and the factories are
responsible for instantiating instances of the generators
to build the firmware tables.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Dynamic Table Factory Protocol
Sami Mujawar [Sat, 15 Dec 2018 12:03:40 +0000 (12:03 +0000)]
DynamicTablesPkg: Dynamic Table Factory Protocol

This patch introduces the dynamic table factory protocol
that provides an interface to register and retrieve
registered generators.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Table Helper Library
Sami Mujawar [Sat, 15 Dec 2018 12:02:25 +0000 (12:02 +0000)]
DynamicTablesPkg: Table Helper Library

A helper library that implements common functionality
for use by table generators.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Configuration Manager Helper
Sami Mujawar [Sat, 15 Dec 2018 12:01:12 +0000 (12:01 +0000)]
DynamicTablesPkg: Configuration Manager Helper

This patch defines a helper macro 'GET_OBJECT_LIST()' that
expands to a function that uses the configuration manager
protocol to retrieve configuration manager object(s).

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Configuration Manager Protocol
Sami Mujawar [Sat, 15 Dec 2018 12:00:04 +0000 (12:00 +0000)]
DynamicTablesPkg: Configuration Manager Protocol

Introduce configuration manager protocol interface
that is used by the dynamic tables framework core
to communicate with configuration manager.

Configuration manager is a platform specific module
that implements the configuration manager protocol.

Table generators use this interface to retrieve the
hardware information from the configuration manager.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Configuration Manager Objects
Sami Mujawar [Sat, 15 Dec 2018 11:59:07 +0000 (11:59 +0000)]
DynamicTablesPkg: Configuration Manager Objects

The dynamic tables frameworks core communicates with the
platform specific implementation using the configuration
manager protocol interface. The dynamic tables framework
core uses this interface to retrieve information required
for generating the firmware tables. This information is
represented in the form of objects, which are classified
as standard namespace objects, Arm namespace objects or
as Custom/OEM namespace objects.

The configuration manager objects provides a convenient
way for wrapping up the namespaces using a well defined
configuration manager object Id.

The configuration manager is a platform specific component
that collates the platform information required for generating
firmware tables and represents them as configuration manager
objects.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Arm NameSpace Objects
Sami Mujawar [Sat, 15 Dec 2018 11:58:07 +0000 (11:58 +0000)]
DynamicTablesPkg: Arm NameSpace Objects

The dynamic tables frameworks core communicates with the
platform specific implementation using the configuration
manager protocol interface. The dynamic tables framework
core uses this interface to retrieve information required
for generating the firmware tables. This information is
represented in the form of objects, which are classified
as standard namespace objects, Arm namespace objects or
as Custom/OEM namespace objects.

This patch introduces the definitions for the Arm namespace
objects.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Standard NameSpace Objects
Sami Mujawar [Sat, 15 Dec 2018 11:57:13 +0000 (11:57 +0000)]
DynamicTablesPkg: Standard NameSpace Objects

The dynamic tables frameworks core communicates with the
platform specific implementation using the configuration
manager protocol interface. The dynamic tables framework
core uses this interface to retrieve information required
for generating the firmware tables. This information is
represented in the form of objects, which are classified
as standard namespace objects, Arm namespace objects or
as Custom/OEM namespace objects.

This patch introduces the definitions for standard
namespace objects.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: DT Table Generator
Sami Mujawar [Sat, 15 Dec 2018 11:56:07 +0000 (11:56 +0000)]
DynamicTablesPkg: DT Table Generator

This patch introduces the interfaces and definitions for
implementing a Device Tree table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: SMBIOS Table Generator
Sami Mujawar [Sat, 15 Dec 2018 11:54:52 +0000 (11:54 +0000)]
DynamicTablesPkg: SMBIOS Table Generator

This patch introduces the required interfaces and definitions
for implementing a SMBIOS table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Acpi Table Generator
Sami Mujawar [Sat, 15 Dec 2018 11:53:43 +0000 (11:53 +0000)]
DynamicTablesPkg: Acpi Table Generator

This patch introduces the required interfaces and definitions
for implementing an ACPI table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Table Generator definition
Sami Mujawar [Sat, 15 Dec 2018 11:52:30 +0000 (11:52 +0000)]
DynamicTablesPkg: Table Generator definition

A Table generator is a component that implements the logic
for building a firmware table. This is typically implemented
as a library and registers itself with a table factory.

Table generators are further classified based on type of table
it generates, a namespace that signifies if the implementation
is standard or an OEM specific implementation and a table Id.

This patch introduces the definitions used for describing a
table generator.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
5 years agoDynamicTablesPkg: Dynamic Tables Framework
Sami Mujawar [Mon, 3 Dec 2018 11:13:31 +0000 (11:13 +0000)]
DynamicTablesPkg: Dynamic Tables Framework

The dynamic tables framework is designed to generate standardised
firmware tables that describe the hardware information at
run-time. A goal of standardised firmware is to have a common
firmware for a platform capable of booting both Windows and Linux
operating systems.

Traditionally the firmware tables are handcrafted using ACPI
Source Language (ASL), Table Definition Language (TDL) and
C-code. This approach can be error prone and involves time
consuming debugging.

In addition, it may be desirable to configure platform hardware
at runtime such as: configuring the number of cores available
for use by the OS, or turning SoC features ON or OFF.

This patch introduces Dynamic Tables Framework which also provides
mechanisms to reduce the amount of effort required in porting
firmware to new platforms. A more detailed description is in
the Readme.md file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
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>