]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
4 years agoBaseTools/BfmLib: Change BfmLib script type in PosixLike
Shenglei Zhang [Fri, 5 Jul 2019 14:21:14 +0000 (22:21 +0800)]
BaseTools/BfmLib: Change BfmLib script type in PosixLike

Change the script type from PC to UNIX.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools/FMMT: Change FMMT script type in PosixLike
Shenglei Zhang [Fri, 5 Jul 2019 11:11:37 +0000 (19:11 +0800)]
BaseTools/FMMT: Change FMMT script type in PosixLike

Change the script type from PC to UNIX.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Fix various typos
Antoine Cœur [Thu, 4 Jul 2019 11:43:48 +0000 (19:43 +0800)]
BaseTools: Fix various typos

Fix various typos in BaseTools.

Signed-off-by: Cœur <coeur@gmx.fr>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: fix FCE build when edksetup not executed
Leif Lindholm [Fri, 5 Jul 2019 10:25:31 +0000 (11:25 +0100)]
BaseTools: fix FCE build when edksetup not executed

Commit 3c59d94637ad ("BaseTools/FCE: Add a tool FCE") added a new tool
that is always built. Pre-existing tools locate the makefile includes
with relative paths, but FCE uses EDK_TOOLS_PATH, adding a new dependency
on having sourced edksetup.sh before building BaseTools.

Change FCE GNUmakefile to match other tools.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers.txt: Change SecurityPkg Maintainer Role
Zhang, Chao B [Fri, 5 Jul 2019 03:41:26 +0000 (11:41 +0800)]
Maintainers.txt: Change SecurityPkg Maintainer Role

Change Chao's role to Reviewer

Cc: Wang Jian J <jian.j.wang@intel.com>
Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com>
Reviewed-by: Wang Jian J <jian.j.wang@intel.com>
4 years agoRevert "MdePkg/Protocol/Hash: introduce GUID for SM3"
Laszlo Ersek [Thu, 4 Jul 2019 09:21:46 +0000 (11:21 +0200)]
Revert "MdePkg/Protocol/Hash: introduce GUID for SM3"

This reverts commit 49c1e683c452f68c7315454280d81449f7d94d2b.

The reason is that said commit had not been reviewed by MdePkg
maintainers, before it was pushed.

Cc: Imran Desai <imran.desai@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1781
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoRevert "SecurityPkg: introduce the SM3 digest algorithm"
Laszlo Ersek [Thu, 4 Jul 2019 09:20:27 +0000 (11:20 +0200)]
Revert "SecurityPkg: introduce the SM3 digest algorithm"

This reverts commit 06dd5863b66edd9908834371e07fb4e11383c172.

The reason is that said commit directly depends on commit 49c1e683c452
("MdePkg/Protocol/Hash: introduce GUID for SM3", 2019-07-03), and the
latter commit is going to be reverted, due to its review process not
having followed established edk2 norms.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Imran Desai <imran.desai@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1781
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoRevert "SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm"
Laszlo Ersek [Thu, 4 Jul 2019 09:17:45 +0000 (11:17 +0200)]
Revert "SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm"

This reverts commit 542d04e2a4fec0df0340d2ad7b59f011f20d03cc.

The reason is that said commit indirectly depends on commit 49c1e683c452
("MdePkg/Protocol/Hash: introduce GUID for SM3", 2019-07-03), and the
latter commit is going to be reverted, due to its review process not
having followed established edk2 norms.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Imran Desai <imran.desai@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1781
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoRevert "SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default"
Laszlo Ersek [Thu, 4 Jul 2019 09:11:24 +0000 (11:11 +0200)]
Revert "SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default"

This reverts commit d5af8fc5a975feb6c745587d0d834733ad2048fd.

The reason is that said commit indirectly depends on commit 49c1e683c452
("MdePkg/Protocol/Hash: introduce GUID for SM3", 2019-07-03), and the
latter commit is going to be reverted, due to its review process not
having followed established edk2 norms.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Imran Desai <imran.desai@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1781
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoRevert "OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe"
Laszlo Ersek [Thu, 4 Jul 2019 09:08:07 +0000 (11:08 +0200)]
Revert "OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe"

This reverts commit a7c7d21ffa9ad14b418e728a882df0a9b8815bf6.

The reason is that said commit had not been reviewed by OvmfPkg
maintainers/reviewers, before it was pushed.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Imran Desai <imran.desai@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1781
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoOvmfPkg: use DxeTpmMeasurementLib if and only if TPM2_ENABLE
Gary Lin [Thu, 4 Jul 2019 04:07:59 +0000 (04:07 +0000)]
OvmfPkg: use DxeTpmMeasurementLib if and only if TPM2_ENABLE

(a) OvmfPkg first had to resolve the TpmMeasurementLib class -- for
    SECURE_BOOT_ENABLE only -- when the DxeImageVerificationLib instance
    became dependent on TpmMeasurementLib. For details, refer to commit
    0d28d286bf4d ("OvmfPkg: resolve TpmMeasurementLib dependency
    introduced in r14687", 2013-09-21).

(b) At the time, only one instance of TpmMeasurementLib existed, namely
    DxeTpmMeasurementLib. This lib instance didn't do anything -- like it
    was desirable for OVMF --, because OVMF didn't include any Tcg / TrEE
    protocol implementations.

(c) In commit 308521b13354 ("MdeModulePkg: Move TpmMeasurementLib
    LibraryClass from SecurityPkg", 2015-07-01), TpmMeasurementLibNull was
    introduced.

(d) In commit 285542ebbb03 ("OvmfPkg: Link AuthVariableLib for following
    merged variable driver deploy", 2015-07-01), a TpmMeasurementLib
    resolution became necessary regardless of SECURE_BOOT_ENABLE. And so
    TpmMeasurementLib was resolved to TpmMeasurementLibNull in OVMF, but
    only in the non-SECURE_BOOT_ENABLE case. This step -- possibly, the
    larger series containing commit 285542ebbb03 -- missed an opportunity
    for simplification: given (b), the DxeTpmMeasurementLib instance
    should have been simply replaced with the TpmMeasurementLibNull
    instance, regardless of SECURE_BOOT_ENABLE.

(e) In commit 1abfa4ce4835 ("Add TPM2 support defined in trusted computing
    group.", 2015-08-13), the TrEE dependency was replaced with a Tcg2
    dependency in DxeTpmMeasurementLib.

(f) Starting with commit 0c0a50d6b3ff ("OvmfPkg: include Tcg2Dxe module",
    2018-03-09), OVMF would include a Tcg2 protocol implementation,
    thereby satisfying DxeTpmMeasurementLib's dependency. With
    TPM2_ENABLE, it would actually make sense to consume
    DxeTpmMeasurementLib -- however, DxeTpmMeasurementLib would never be
    used without SECURE_BOOT_ENABLE.

Therefore, we have the following four scenarios:

- TPM2_ENABLE + SECURE_BOOT_ENABLE: works as expected.

- Neither enabled: works as expected.

- Only TPM2_ENABLE: this build is currently incorrect, because
  Variable/RuntimeDxe consumes TpmMeasurementLib directly, but
  TpmMeasureAndLogData() will never reach the TPM because we link
  TpmMeasurementLibNull into the variable driver. This is a problem from
  the larger series containing (f).

- Only SECURE_BOOT_ENABLE: this build works as expected, but it is
  wasteful -- given that the protocol database will never contain Tcg2
  without TPM2_ENABLE, we should simply use TpmMeasurementLibNull. This is
  a problem from (d).

Resolving TpmMeasurementLib to DxeTpmMeasurementLib as a function of
*only* TPM2_ENABLE, we can fix / optimize the last two cases.

v2:
  - Amend the title and description suggested by Laszlo
  - Move TpmMeasurementLib to the existed TPM2_ENABLE block

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Gary Lin <glin@suse.com>
Message-Id: <20190704040731.5303-1-glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoEmbeddedPkg: Fix various typos
Cœur [Wed, 3 Jul 2019 13:25:30 +0000 (14:25 +0100)]
EmbeddedPkg: Fix various typos

Fix various typos in EmbeddedPkg.

Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoArmPlatformPkg: Fix various typos
Antoine Cœur [Wed, 6 Feb 2019 15:40:38 +0000 (23:40 +0800)]
ArmPlatformPkg: Fix various typos

Fix various typos in ArmPlatformPkg.

Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoArmPkg: Fix various typos
Antoine Cœur [Wed, 6 Feb 2019 15:39:35 +0000 (23:39 +0800)]
ArmPkg: Fix various typos

Fix various typos in ArmPkg.

Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoBaseTools/FMMT: Add a tool FMMT
Shenglei Zhang [Tue, 28 May 2019 03:01:47 +0000 (11:01 +0800)]
BaseTools/FMMT: Add a tool FMMT

FMMT is a tool to enable removal, addition and replacement of
FFS files in FD image binaries.
https://bugzilla.tianocore.org/show_bug.cgi?id=1847

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools/FCE: Add a tool FCE
Shenglei Zhang [Tue, 28 May 2019 08:07:43 +0000 (16:07 +0800)]
BaseTools/FCE: Add a tool FCE

FCE is a tool to retrieve and change HII configuration data in
Firmware Device(*.fd) files.
https://bugzilla.tianocore.org/show_bug.cgi?id=1848

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools/BfmLib: Add a tool BfmLib
Shenglei Zhang [Wed, 29 May 2019 07:22:32 +0000 (15:22 +0800)]
BaseTools/BfmLib: Add a tool BfmLib

BmfLib is added for FCE tool.
https://bugzilla.tianocore.org/show_bug.cgi?id=1848

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMaintainers.txt: Drop deprecated SourceForge SVN link
Hao A Wu [Thu, 27 Jun 2019 05:41:42 +0000 (13:41 +0800)]
Maintainers.txt: Drop deprecated SourceForge SVN link

The commit will remove the deprecated edk2 SVN mirror at:
https://svn.code.sf.net/p/edk2/code/trunk/edk2

After this commit, the above mirror will not be synced with the changes
made in the GitHub upstream.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoMaintainers.txt: add Leif Lindholm as Package Reviewer of ArmVirtPkg
Leif Lindholm [Wed, 3 Jul 2019 10:27:41 +0000 (11:27 +0100)]
Maintainers.txt: add Leif Lindholm as Package Reviewer of ArmVirtPkg

ArmVirtPkg was created before we introduced the Package Reviewer (R:)
role in Maintainers.txt. However, we have always had an informal
agreement that if Ard or Laszlo is absent, I can review patches by
the still present one for going into ArmVirtPkg.

Plus, as one of the ArmPkg maintainers, it makes sense for me to have
better visibility of goings-on in ArmVirtPkg.

So let's formalise that, and add myself as a Package Reviewer, to be
CC:d on patches (while not taking up full maintainer responsibilities).

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoOvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe
Imran Desai [Wed, 29 May 2019 04:40:49 +0000 (04:40 +0000)]
OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe

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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch links SM3 support into Tcg2Pei and Tcg2Dxe.

Signed-off-by: Imran Desai <imran.desai@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: jiewen.yao@intel.com
4 years agoSecurityPkg: set SM3 bit in TPM 2.0 hash mask by default
Imran Desai [Wed, 29 May 2019 04:40:48 +0000 (04:40 +0000)]
SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default

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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch sets SM3 bit in TPM2.0 hash mask by default.

Signed-off-by: Imran Desai <imran.desai@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: jiewen.yao@intel.com
4 years agoSecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm
Imran Desai [Wed, 29 May 2019 04:40:47 +0000 (04:40 +0000)]
SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm

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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch adds SM3 as an available digest algorithm to crypto router.

Signed-off-by: Imran Desai <imran.desai@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: jiewen.yao@intel.com
4 years agoSecurityPkg: introduce the SM3 digest algorithm
Imran Desai [Tue, 2 Jul 2019 13:30:34 +0000 (21:30 +0800)]
SecurityPkg: introduce the SM3 digest algorithm

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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch add SM3 algorithm in the hashinstance library.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Signed-off-by: Imran Desai <imran.desai@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: jiewen.yao@intel.com
4 years agoMdePkg/Protocol/Hash: introduce GUID for SM3
Imran Desai [Wed, 29 May 2019 04:40:45 +0000 (04:40 +0000)]
MdePkg/Protocol/Hash: introduce GUID for SM3

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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch adds GUID for SM3 digest algorithm.

Signed-off-by: Imran Desai <imran.desai@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: jiewen.yao@intel.com
4 years agoMaintainers.txt: Remove information for IntelFramework[Module]Pkg
Hao A Wu [Mon, 27 May 2019 06:23:42 +0000 (14:23 +0800)]
Maintainers.txt: Remove information for IntelFramework[Module]Pkg

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

Since IntelFramework[Module]Pkg have been removed, this commit will update
the Maintainers.txt to reflect such changes.

Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoRemove IntelFrameworkPkg
Hao A Wu [Mon, 27 May 2019 06:22:37 +0000 (14:22 +0800)]
Remove IntelFrameworkPkg

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

Please note a subsequent commit will followed to update the information in
Maintainers.txt to reflect this package removal.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoRemove IntelFrameworkModulePkg
Hao A Wu [Mon, 27 May 2019 06:19:41 +0000 (14:19 +0800)]
Remove IntelFrameworkModulePkg

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

Please note a subsequent commit will followed to update the information in
Maintainers.txt to reflect this package removal.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoShellPkg: acpiview: Make '-h' option not require a parameter
Krzysztof Koch [Fri, 28 Jun 2019 08:57:00 +0000 (16:57 +0800)]
ShellPkg: acpiview: Make '-h' option not require a parameter

Make the -h command line option a binary flag. Now, colour
highlighting is enabled whenever this flag is set (stateless),
instead of being dependent on previous acpiview command
invocations.

By removing the parameter required with the -h flag the command
line parsing logic becomes simpler.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Remove duplicate indentation in IORT parser
Krzysztof Koch [Fri, 28 Jun 2019 10:24:38 +0000 (18:24 +0800)]
ShellPkg: acpiview: Remove duplicate indentation in IORT parser

Remove redundant whitespace characters at the beginning of the strings
describing IORT table field names.

When dumping ACPI table contents, the indentation level for printing
field names is controled using the 'Indent' argument to the 'ParseAcpi'
function. In the IORT acpiview parser, both 'Indent' and extra
whitespace characters are used for indentation, which results in
excess indentation.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Remove '-v' flag from allowed command line args
Krzysztof Koch [Fri, 28 Jun 2019 08:56:59 +0000 (16:56 +0800)]
ShellPkg: acpiview: Remove '-v' flag from allowed command line args

According to the acpiview documentation, the -v flag enables verbose
output and it is set on default.

Moreover, the acpiview UEFI shell tool dumps the same output with
and without this flag set.

Therefore this patch removes the superfluous -v flag from allowed
command line parameters.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Remove redundant IORT node types enum
Krzysztof Koch [Fri, 28 Jun 2019 10:24:37 +0000 (18:24 +0800)]
ShellPkg: acpiview: Remove redundant IORT node types enum

Replace the enum defining valid node types in the IORT table with
macros from IoRemappingTable.h.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Allow disabling consistency checks (-q flag)
Krzysztof Koch [Fri, 28 Jun 2019 08:56:58 +0000 (16:56 +0800)]
ShellPkg: acpiview: Allow disabling consistency checks (-q flag)

The current documentation for the acpiview UEFI shell tool states
that the '-c' flag enables consistency checks on ACPI table data.
However, these checks are enabled anyway by default.

This patch keeps ACPI table validation as a default option, but it
makes it possible to turn ACPI table validation off by setting the
newly-introduced '-q' flag. Consequently, the '-c' flag is removed.

The remaining code changes in this patch make a number of consistency
checks optional (but enabled by default):
1. ACPI table field offset mismatch.
2. ACPI table field validation functions provided in the ACPI_PARSER
   arrays.
3. Table checksum computation.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Make DBG2 output consistent with other tables
Krzysztof Koch [Fri, 28 Jun 2019 10:24:36 +0000 (18:24 +0800)]
ShellPkg: acpiview: Make DBG2 output consistent with other tables

Print an extra newline character at the end DBG2 table parsing in order
to make the output resemble the one for other ACPI table parsers.

With this change, there is now a blank line between the DBG2 table dump
and the 'Table Statistics' section.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reporting
Krzysztof Koch [Fri, 28 Jun 2019 08:56:57 +0000 (16:56 +0800)]
ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reporting

Move printing double newline character ('\n\n') from the beginning of
ACPI table checksum validation message to the end of the raw binary
data dump.

This way acpiview table dump looks similar regardless of whether Table
Checksum is validated or not.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Remove '/?' from valid command line flags
Krzysztof Koch [Fri, 28 Jun 2019 08:56:56 +0000 (16:56 +0800)]
ShellPkg: acpiview: Remove '/?' from valid command line flags

Acpiview currently allows displaying help info by specifying both
-? and /? flags. This patch removes /? from valid command line
flags that can be passed to the acpiview tool, as this
flag is not used for such purpose in other UEFI shell commands.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Improve PPTT table field validation
Krzysztof Koch [Fri, 28 Jun 2019 10:24:35 +0000 (18:24 +0800)]
ShellPkg: acpiview: Improve PPTT table field validation

Add Cache Structure (Type 1) 'Number of sets' and 'Associativity'
field validation in the acpiview Processor Properties Topology
Table (PPTT) parser.

Replace literal values with precompiler macros for existing
Cache Structure validation functions.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoEmulatorPkg/MiscSubClassPlatformDxe: Remove this unused module
Wu, Hao A [Tue, 2 Jul 2019 02:30:53 +0000 (10:30 +0800)]
EmulatorPkg/MiscSubClassPlatformDxe: Remove this unused module

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

For commit 63f9b9b9312f3e08c92a2ea3cdbe01e723ef653b, the use of module
EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf

was replaced by:
EmulatorPkg/PlatformSmbiosDxe/PlatformSmbiosDxe.inf

in platform DSC/FDF files.

This commit will remove this unused module from EmulatorPkg.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoShellPkg/UefiShellLib: Set input pointer parameter to null if failure
Bret Barkelew [Wed, 12 Jun 2019 06:04:57 +0000 (14:04 +0800)]
ShellPkg/UefiShellLib: Set input pointer parameter to null if failure

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

While failed to allocate memory to save the response,
set the input/output parameter 'Response'(VOID **) to
NULL to indicate the failure not only depend on the
returned status.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoOvmfPkg/XenBusDxe: Don't call DisconnectController in Stop()
Anthony PERARD [Mon, 1 Jul 2019 11:14:03 +0000 (12:14 +0100)]
OvmfPkg/XenBusDxe: Don't call DisconnectController in Stop()

Calling DisconnectController() on children isn't part of the job of
EFI_DRIVER_BINDING_PROTOCOL.Stop() as it only needs to deallocate
resources allocated in Start(). The disconnection will happen when
both DevicePath and XenBus protocols gets uninstalled.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20190701111403.7007-1-anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoOvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
Anthony PERARD [Mon, 1 Jul 2019 10:50:12 +0000 (11:50 +0100)]
OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children

In XenBusDxe, the XenBusAddDevice() opens the gXenIoProtocolGuid on
behalf of child controllers. It is never closed and prevents us from
uninstalling the protocol.

Close it where we stop all the children in XenBusDxe->Stop().

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190701105012.25758-1-anthony.perard@citrix.com>

4 years agoMdeModulePkg SmbiosMeasurementDxe: Add Type4 Voltage field to blacklist
Star Zeng [Thu, 27 Jun 2019 11:12:10 +0000 (19:12 +0800)]
MdeModulePkg SmbiosMeasurementDxe: Add Type4 Voltage field to blacklist

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

The Type4 Voltage field may be various.
So this patch adds it into the blacklist.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Donald Kuo <donald.kuo@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoIntelFsp2Pkg: FSP Python scripts to support 3.x.
Chasel Chiu [Fri, 21 Jun 2019 00:43:22 +0000 (08:43 +0800)]
IntelFsp2Pkg: FSP Python scripts to support 3.x.

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

Updated FSP Python scripts to support both 2.x and
3.x.

Test:
  . Verified with Python 2.7.12 and 3.6.6.
  . Verified tool result is the same before the change.
  . Both py -2 and py -3 built binary can boot.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
4 years agoPciBusDxe: duplicate node insertion for every PPB device in the system
Javeed, Ashraf [Mon, 27 May 2019 10:23:56 +0000 (18:23 +0800)]
PciBusDxe: duplicate node insertion for every PPB device in the system

https://bugzilla.tianocore.org/show_bug.cgi?id=1796
Bug fixed in PciBusDxe\PciLib.c.
Removed the redundant second call to PciSearchDevice sub-routine when the
PCD for the Hot-Plug support is disabled.

Signed-off-by: Ashraf Javeed <Ashraf.javeed@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
4 years agoMdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery
Zhichao Gao [Wed, 22 May 2019 00:59:45 +0000 (08:59 +0800)]
MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery

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

Use the PcdPlatformRecoverySupport to control the function
of platform recovery in BDS.
First, set the variable's ("OsIndicationsSupported")
EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY bit base on the pcd.
It would affect the variable "OsIndications".
While the platform does not support the platform recovery,
it is inappropriate to set a PlatformRecovery#### variable. So
skip setting the variable. But it should remain the behavior of
booting from a default file path (such as \EFI\BOOT\BOOTX64.EFI)
to be compatible with the previous version UEFI spec.

Add memory check before build platform default boot option. If
fail to allocate memory for the defualt boot file path, put the
system into dead loop to indicate it is unable to boot.

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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg: Add a pcd to set the OS indications bit
Bret Barkelew [Fri, 29 Mar 2019 05:47:25 +0000 (13:47 +0800)]
MdeModulePkg: Add a pcd to set the OS indications bit

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

Add a pcd PcdPlatformRecoverySupport to conditionally
set an OS indications bit and set the 'PlatformRecovery####'
variable. This pcd would also control whether the BDS
support platform recovery or not.
Update the uni file to add the prompt and help string base on
the description in dec file.

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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoSecurityPkg: Remove DxeDeferImageLoadLib in DSC
Shenglei Zhang [Mon, 1 Jul 2019 02:26:51 +0000 (10:26 +0800)]
SecurityPkg: Remove DxeDeferImageLoadLib in DSC

The current version will cause build fail because DxeDeferImageLoadLib
exists in DSC file but it was actually deleted. So it should be removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1919

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoBaseTools:Linux changes the way the latest version is judged
Fan, ZhijuX [Wed, 26 Jun 2019 04:49:33 +0000 (12:49 +0800)]
BaseTools:Linux changes the way the latest version is judged

Some Linux servers do not have BC installed,so errors occur.
So the judgment was changed to avoid this error.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoFix indentation in edksetup.sh SetupPython3
rebecca@bluestop.org [Wed, 26 Jun 2019 16:54:56 +0000 (00:54 +0800)]
Fix indentation in edksetup.sh SetupPython3

Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol
Albecki, Mateusz [Wed, 26 Jun 2019 13:10:03 +0000 (21:10 +0800)]
MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

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

Implement support for GetOperatingParamters notify phase
in SdMmcHcDxe driver. GetOperatingParameters notify phase
is signaled before we start card detection and initialization.
Code has been updated for both eMMC and SD card controllers to
take into consideration those new parameters. Initialization process
has been divided into 2 steps. In the first step we bring the link
up to the point where we can get card identification data(Extended
CSD in eMMC case and SWITCH command response in SD card case). This
data is later used along with controller capabilities and operating
parameters passed in GetOperatingParameters phase to choose preferred
bus settings in GetTargetBusSettings function. Those settings are later
on to start bus training to high speeds. If user passes incompatible
setting with selected bus timing driver will assume it's standard behavior
with respect to that setting. For instance if HS400 has been selected as a
target bus timing due to card and controller support bus width setting of
4 and 1 bit won't be respected and 8 bit setting will be chosen instead.

Tests on Marvell boards were also performed by Marcin Wojtas
<mw@semihalf.com>:

https://edk2.groups.io/g/devel/message/42999

Board 1 (out of tree): SD - OK, MMC - OK
Board 2: (Armada80x0McBin): SD - OK, MMC - OK
Board 3: (Armada70x0Db): SD - problems, MMC - OK

Please note that the problem on Armada70x0Db SD devices are introduced by
adding new types of SD bus modes, a subsequent patch within edk2-platforms
repository will be proposed to address it.
(More details can be referred from the above link.)

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Regression-tested-by: Sumit Garg <sumit.garg@linaro.org>
4 years agoMdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase
Albecki, Mateusz [Wed, 26 Jun 2019 13:10:02 +0000 (21:10 +0800)]
MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase

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

The new notify phase allows platform to configure additional
bus parameters in addition to parameters that can already be configured
with capability override. Specifically we allow to configure bus width,
clock frequency and driver strength. If platform doesn't wish to configure
some of the parameters it can left it on default values and driver will
assume it's standard behavior with respect to those parameters.
The definition of the SD_MMC_BUS_MODE has been extended to
incorporate SD card default speed and high speed.

Tests on Marvell boards were also performed by Marcin Wojtas
<mw@semihalf.com>:

https://edk2.groups.io/g/devel/message/42999

Board 1 (out of tree): SD - OK, MMC - OK
Board 2: (Armada80x0McBin): SD - OK, MMC - OK
Board 3: (Armada70x0Db): SD - problems, MMC - OK

Please note that the problem on Armada70x0Db SD devices are introduced by
adding new types of SD bus modes, a subsequent patch within edk2-platforms
repository will be proposed to address it.
(More details can be referred from the above link.)

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Regression-tested-by: Sumit Garg <sumit.garg@linaro.org>
4 years agoMdeModulePkg/UfsPassThruDxe: Fix unaligned data transfer handling
Albecki, Mateusz [Tue, 25 Jun 2019 09:44:28 +0000 (17:44 +0800)]
MdeModulePkg/UfsPassThruDxe: Fix unaligned data transfer handling

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

Since UFS specification requires the data buffer specified
in PRDT to be DWORD aligned in size we had a code in
UfsInitUtpPrdt that aligned the data buffer by rounding down
the buffer size to DWORD boundary. This meant that for SCSI
commands that wanted to perform unaligned data transfer(such as
SENSE command) we specified to small buffer for the data to fit
and transfer was aborted. This change introduces code that allocates
auxiliary DWORD aligned data buffer for unaligned transfer. Device
transfers data to aligned buffer and when data transfer is over driver
copies data from aligned buffer to data buffer passed by user.

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu*
Laszlo Ersek [Mon, 24 Jun 2019 16:30:27 +0000 (18:30 +0200)]
ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu*

Port the [LibraryClasses], [PcdsFixedAtBuild] and [Components] settings
that are related to NETWORK_TLS_ENABLE from OvmfPkg to ArmVirtPkg.
ArmVirtXen is not modified because it doesn't include the edk2 network
stack.

(This change is now simpler than it would have been when TianoCore#1009
was originally filed, due to ArmVirtPkg consuming the NetworkPkg include
fragments meanwhile, from TianoCore#1293 / commit 157a3b1aa50f.)

The usage hints from "OvmfPkg/README", section "HTTPS Boot", apply.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Lin <glin@suse.com>
Cc: Guillaume GARDET <guillaume.gardet@arm.com>
Cc: Julien Grall <julien.grall@arm.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1009
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Guillaume Gardet <guillaume.gardet@arm.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
4 years agoBaseTools:Remove unused Edk2\BuildNotes2.txt
Fan, ZhijuX [Tue, 18 Jun 2019 06:54:44 +0000 (14:54 +0800)]
BaseTools:Remove unused Edk2\BuildNotes2.txt

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

Edk2\BuildNotes2.txt is not maintained any more. User can find the
related info in wiki. So, this file can be removed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoEdk2Setup: Support different VS tool chain setup
Dandan Bi [Wed, 12 Jun 2019 03:28:46 +0000 (11:28 +0800)]
Edk2Setup: Support different VS tool chain setup

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

This patch is to update edksetup with additional option:
VS2017 VS2015 VS2013 VS2012 to setup different VS environment.
And will report error if the specified VS tool is not installed.
For VS2017, also consider the case that only VS2017 build tool
is installed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoEdk2: Remove nt32 related flag in bat files
Dandan Bi [Thu, 6 Jun 2019 02:48:50 +0000 (10:48 +0800)]
Edk2: Remove nt32 related flag in bat files

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

NT32Pkg has been removed, remove nt32 related
flags in bat files.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoSecurityPkg/DxeDeferImageLoadLib: Remove DxeDeferImageLoadLib
Shenglei Zhang [Wed, 19 Jun 2019 01:47:56 +0000 (09:47 +0800)]
SecurityPkg/DxeDeferImageLoadLib: Remove DxeDeferImageLoadLib

The library DxeDeferImageLoadLib supports UID feature and it is conflicted
with the driver SecurityStubDxe (Defer3rdPartyImageLoad.c).
And the UID feature is dropped. So it should be removed from SecurityPkg.
https://bugzilla.tianocore.org/show_bug.cgi?id=1919

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoMdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.
Wei6 Xu [Thu, 27 Jun 2019 08:43:06 +0000 (16:43 +0800)]
MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.

Add missing NULL pointer check for CapsuleNameBufStart.
Also add comments to notice that capsule name integrity check assumes
the capsule has been validated by IsValidCapsuleHeader().

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
4 years agoBaseTools/Capsule: Supports multiple payloads and drivers in capsule
Jin, Eric [Wed, 26 Jun 2019 05:55:35 +0000 (13:55 +0800)]
BaseTools/Capsule: Supports multiple payloads and drivers in capsule

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

1)Add arguments "--embedded-driver" to support embedded driver
in command line.
2)Add arguments "--update-image-index" to identify ImageIndex
within the device in command line.
3)Add arguments "-j JSONFILE" to support multiple payloads and
embedded drivers with JSON file.

The update is in a backwards compatible manner, so all command
line options to support single payload are still supported. But
all the options associated with multiple payloads should be
provided in a JSON file.

Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoUefiCpuPkg/MpInitLib: MicrocodeDetect: Ensure checked range is valid
Zhichao Gao [Wed, 26 Jun 2019 04:51:55 +0000 (12:51 +0800)]
UefiCpuPkg/MpInitLib: MicrocodeDetect: Ensure checked range is valid

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

0x0       MicrocodeBegin  MicrocodeEntry  MicrocodeEnd      0xffffffff
|--------------|---------------|---------------|---------------|
                                 valid TotalSize
TotalSize is only valid between 0 and (MicrocodeEnd - MicrocodeEntry).
So add '(UINTN)MicrocodeEntryPoint > (MAX_ADDRESS - TotalSize)' before
'((UINTN)MicrocodeEntryPoint + TotalSize) > MicrocodeEnd' to make sure
((UINTN)MicrocodeEntryPoint + TotalSize) wouldn't overflow.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
4 years agoMdeModulePkg/UfsPassThruDxe: Refactor UFS device presence detection
Albecki, Mateusz [Fri, 21 Jun 2019 15:27:02 +0000 (23:27 +0800)]
MdeModulePkg/UfsPassThruDxe: Refactor UFS device presence detection

In current implementation we are checking for device presence every
time we execute UIC command. To make UfsExecUicCommands more generic
checking device presence has been moved to UfsDeviceDetection.

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoPcAtChipsetPkg: Remove framework modules
Hao A Wu [Mon, 27 May 2019 05:59:30 +0000 (13:59 +0800)]
PcAtChipsetPkg: Remove framework modules

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

The commit will remove the below modules from PcAtChipsetPkg:
* PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
* PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
* PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf

They are considered legacy framework components and will no longer be used
after the removal of IntelFramework[Module]Pkg.

Also, the unused (after the modules being removed) PCDs will be deleted in
package level DEC/UNI files.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoSecurityPkg: add FvReportPei.inf in dsc for build validation
Jian J Wang [Fri, 10 May 2019 02:22:46 +0000 (10:22 +0800)]
SecurityPkg: add FvReportPei.inf in dsc for build validation

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

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: "Hernandez Beltran, Jorge" <jorge.hernandez.beltran@intel.com>
Cc: Harry Han <harry.han@intel.com>
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
4 years agoSecurityPkg/FvReportPei: implement a common FV verifier and reporter
Jian J Wang [Fri, 10 May 2019 02:19:36 +0000 (10:19 +0800)]
SecurityPkg/FvReportPei: implement a common FV verifier and reporter

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

This driver implements a common checker, verifier and reporter which is
independent of hardware based root-of-trust.

Usually the hardware based root-of-trust will not verify all BIOS but
part of it. For example, Boot Guard will only verify IBB segment. The IBB
needs to verify other part of BIOS, i.e. other FVs to transfer control to
from IBB. This driver plays the role in IBB to verify FVs not covered by
hardware root-of-trust to make sure integrity of the chain of trust.

To be hardware/platform independent, PPI

  gEdkiiPeiFirmwareVolumeInfoStoredHashFvPpiGuid

is introduced for platform to pass digest information to this driver.
This PPI should include all information needed to verify required FVs in
required boot mode.

struct _EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI {
  FV_HASH_INFO            HashInfo;
  UINTN                   FvNumber;
  HASHED_FV_INFO          FvInfo[1];
};

To avoid TOCTOU issue, all FVs to be verified will be copied to memory
before hash calculation. That also means this driver has to be run after
permanent memory has been discovered.

For a measured boot, this driver will install

  gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid

to report digest of each FV to TCG driver.

For a verified boot, this driver will verify the final hash value
(calculated from the concatenation of each FV's hash) for indicated
FVs against the hash got from platform/hardware.

If pass, it will build EFI_HOB_TYPE_FV (consumed by DXE core) and/or
install gEfiPeiFirmwareVolumeInfoPpiGuid (consumed by PEI core), and
then report status code PcdStatusCodeFvVerificationPass.

If fail, it just report status code PcdStatusCodeFvVerificationFail
and go to dead loop if status report returns.

The platform can register customized handler to process pass and fail
cases differently.

Currently, this driver only supports hash (sha256/384/512) verification
for the performance consideration.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: "Hernandez Beltran, Jorge" <jorge.hernandez.beltran@intel.com>
Cc: Harry Han <harry.han@intel.com>
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
4 years agoSecurityPkg: add definitions for OBB verification
Jian J Wang [Tue, 19 Feb 2019 12:00:27 +0000 (20:00 +0800)]
SecurityPkg: add definitions for OBB verification

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

gEdkiiPeiFirmwareVolumeInfoStoredHashFvPpiGuid should be installed by
platform to pass FV hash information to the common FV verify/report
driver, in which the hash value will be calculated again based on the
information fed in and then verified.

The information passed in this PPI include:
  - FVs location in flash and length
  - Hash values for different boot mode

The hash value must be calculated in following way (if 3 FVs to calc):

  FV1 -> Hash1
  FV2 -> Hash2
  FV3 -> Hash3
  Hash1 + Hash2 + Hash3 -> HashAll

Only HashAll is stored in this PPI. The purposes for this algorithm
are two:

  1. To report each FV's hash to TCG driver and verify HashAll at the
     same time without the burden to calculate the hash twice;
  2. To save hash value storage due to potential hardware limitation

Different boot mode may have its own hash value so that each mode can
decide which FV will be verified. For example, for the sake of performance,
S3 may choose to skip some FVs verification and normal boot will verify
all FVs it concerns.

So in this PPI, each FV information has flag to indicate which boot mode
it will be taken into hash calculation.

And if multiple hash values passed in this PPI, each has a flag to indicate
which boot mode it's used for. Note one hash value supports more than one
boot modes if they're just the same.

PcdStatusCodeFvVerificationPass and PcdStatusCodeFvVerificationFail are
introduced to report status back to platform, and platform can choose how
to act upon verification success and failure.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: "Hernandez Beltran, Jorge" <jorge.hernandez.beltran@intel.com>
Cc: Harry Han <harry.han@intel.com>
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
4 years agoOvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled
David Woodhouse [Wed, 26 Jun 2019 11:37:42 +0000 (12:37 +0100)]
OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled

Mostly, this is only necessary for devices that the CSM might have
native support for, such as VirtIO and NVMe; PciBusDxe will already
degrade devices to 32-bit if they have an OpROM.

However, there doesn't seem to be a generic way of requesting PciBusDxe
to downgrade specific devices.

There's IncompatiblePciDeviceSupportProtocol but that doesn't provide
the PCI class information or a handle to the device itself, so there's
no simple way to just match on all NVMe devices, for example.

Just leave gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size set to zero for
CSM builds, until/unless that can be fixed.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190626113742.819933-5-dwmw2@infradead.org>

4 years agoOvmfPkg: Don't build in QemuVideoDxe when we have CSM
David Woodhouse [Wed, 26 Jun 2019 11:37:41 +0000 (12:37 +0100)]
OvmfPkg: Don't build in QemuVideoDxe when we have CSM

QemuVideoDxe installs its own legacy INT 10h handler for the benefit of
systems like Windows 2008r2 which attempt to use INT 10h even when booted
via EFI.

This interacts extremely badly with a CSM actually attempting to install
a real video BIOS.

The last thing done before invoking a legacy OpROM is to call INT 10h to
set a plain text mode. In the case where it's the video BIOS OpROM being
loaded, INT 10h will normally point to an iret stub in the CSM itself.

Unless QemuVideoDxe has changed INT10h to point to a location in the
0xC0000 segment that it didn't allocate properly, so the real OpROM has
been shadowed over them top of it, and the INT 10h vector now points to
some random place in the middle of the newly-shadowed OpROM.

Don't Do That Then. QemuVideoDxe doesn't do any acceleration and just
sets up a linear framebuffer, so we don't lose much by just
unconditionally using BiosVideoDxe instead when CSM is present.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190626113742.819933-4-dwmw2@infradead.org>

4 years agoOvmfPkg/LegacyBbs: Add boot entries for VirtIO and NVME devices
David Woodhouse [Wed, 26 Jun 2019 11:37:40 +0000 (12:37 +0100)]
OvmfPkg/LegacyBbs: Add boot entries for VirtIO and NVME devices

Iterate over the available block devices in much the same way as
BdsLibEnumerateAllBootOption() does, but limiting to those devices
which are PCI-backed, which can be represented in the BbsTable.

One day we might need to extend the BbsTable to allow us to distinguish
between different NVMe namespaces on a device.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190626113742.819933-3-dwmw2@infradead.org>

4 years agoOvmfPkg/LegacyBios: set NumberBbsEntries to the size of BbsTable
David Woodhouse [Wed, 26 Jun 2019 11:37:39 +0000 (12:37 +0100)]
OvmfPkg/LegacyBios: set NumberBbsEntries to the size of BbsTable

This is hard-coded in the IntThunk structure, and the additional entries
will be needed for other devices like VirtIO and NVMe disks. So admit
that they exist.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190626113742.819933-2-dwmw2@infradead.org>

4 years agoSecurityPkg: Add missing instances for build only
Bret Barkelew [Mon, 10 Jun 2019 02:27:45 +0000 (10:27 +0800)]
SecurityPkg: Add missing instances for build only

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

Add the missing instance to the [Components] of dsc file
for build only.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoMdeModulePkg/CapsulePei: Add memory pointer check
Gao, Zhichao [Tue, 25 Jun 2019 03:22:49 +0000 (11:22 +0800)]
MdeModulePkg/CapsulePei: Add memory pointer check

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

Before use the memory that is allocated through AllocateZeroPool,
we should check the memory pointer is valid to avoid using the
NULL pointer.
Add check for VariableArrayAddress that is returned from
GetScatterGatherHeadEntries. If it is NULL, directly return
the error status.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.
Wei6 Xu [Mon, 24 Jun 2019 06:53:18 +0000 (14:53 +0800)]
MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

This module provides PPI to load Capsule On Disk temp relocation file
from Root Directory file system, retrieve the capsules from the temp
file and create capsule hobs for these capsules.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
Wei6 Xu [Mon, 24 Jun 2019 06:52:31 +0000 (14:52 +0800)]
MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in
"OsIndications" Variable is enabled. It is used to indicate whether
capsule on disk is provisioned in normal boot path.

CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags,
including "OsIndications" and "BootNext" variable.

CoDRelocateCapsule() is to relocate the capsules from EFI system
partition. Depends on PcdCapsuleInRamSupport, there are two solutions
to relocate the capsule on disk images:
When Capsule In Ram is supported, the Capsule On Disk images are
relocated into memory, and call UpdateCapsule() service to deliver
the capsules.
When Capsule In Ram is not supported, the Capsule On Disk images are
relocated into a temp file which will be stored in root directory on
a platform specific storage device. CapsuleOnDiskLoadPei PEIM will
retrieve the capsules from the relocation temp file and report
capsule hobs for them.

CoDRemoveTempFile() is to remove the relocation temp file in the next
boot after capsules are processed.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/DxeIpl: Support Capsule On Disk.
Wei6 Xu [Mon, 24 Jun 2019 06:50:14 +0000 (14:50 +0800)]
MdeModulePkg/DxeIpl: Support Capsule On Disk.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

If Capsule On Disk mode, call Capsule On Disk Load PPI to load
capsules. When it fails, still goes to Firmware Update boot path.
BDS will clear corresponding indicator and reboot later on.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature.
Wei6 Xu [Mon, 24 Jun 2019 06:49:24 +0000 (14:49 +0800)]
MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

Introduce PcdCapsuleInRamSupport to turn on/off Capsule In Ram feature.
Platform could choose to drop CapsulePei/CapsuleX64 and not to support
Capsule In Ram.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/BdsDxe: Support Capsule On Disk.
Wei6 Xu [Mon, 24 Jun 2019 06:48:27 +0000 (14:48 +0800)]
MdeModulePkg/BdsDxe: Support Capsule On Disk.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

Set EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED bit of
"OsIndicationsSupported" variable to indicate the Capsule On
Disk is supported or not, according to PcdCapsuleOnDiskSupport.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg: Add Capsule On Disk related definition.
Wei6 Xu [Mon, 24 Jun 2019 06:46:02 +0000 (14:46 +0800)]
MdeModulePkg: Add Capsule On Disk related definition.

REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

This patch will add Capsule On Disk related definition, including
GUID, PPI and PCDs:
The Capsule On Disk Name GUID indicates the capsule is to store
Capsule On Disk file names.
The Pei Capsule On Disk PPI provides service to retrieve capsules
from Capsule On Disk temp relocation file on mass storage devices
and create capsule hob for these capsules.
Pei Boot In CapsuleOnDisk Mode Ppi indicates current boot mode is
capsule on disk mode.
PcdCapsuleOnDiskSupport is used to enable/disable Capsule On Disk.
PcdCapsuleInRamSupport is used to enable/disable Capsule In Ram.
PcdCoDRelocationFileName specifies the Capsule On Disk temp
relocation file name.
PcdCodRelocationDevPath specifies platform specific device to store
Capsule On Disk temp relocation file.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.
Wei6 Xu [Mon, 24 Jun 2019 05:21:35 +0000 (13:21 +0800)]
MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.

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

1. Introduce an internal header file to put definitions in it.
2. Add missing '\n' in usage.
3. Fix the dead loop of CapsuleApp -L.
4. Fix the bug that CapsuleApp -OD cannot perform capsules in sub-
folder.
5. Optimize the handling for option -NR and -OD to support both
'CapsuleApp <Capsule> -OD -NR' and 'CapsuleApp <Capsule> -NR -OD'.
6. Check if Capsule-On-Disk is supported by "OsIndicationsSupported"
variable firstly before processing capsules. If not supported, prompt
an error message and quit the process.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoCryptoPkg/OpensslLib: Exclude err_all.c in process_files.pl
Xiaoyu Lu [Wed, 19 Jun 2019 15:19:21 +0000 (15:19 +0000)]
CryptoPkg/OpensslLib: Exclude err_all.c in process_files.pl

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

Commit(0a1b13fd4d2210e2c3) fix VS2017 build failure
remove useless file in OpensslLib[Crypto].inf,
but we use process_files.pl to generate files.
So exclude err_all.c file in process_files.pl

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoBaseTools: Move Build Cache related function out of CreateAsBuiltInf
Bob Feng [Mon, 24 Jun 2019 01:51:44 +0000 (09:51 +0800)]
BaseTools: Move Build Cache related function out of CreateAsBuiltInf

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932
There are two functions in current CreateAsBuiltInf, Copy Binary files
to build cache folder and create asbuild inf file.

This patch is to separate UpdateBuildCache and CreateAsBuiltInf into
two functions.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Reviewed-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
4 years agoBaseTools: refine CreateAsBuiltInf function
Bob Feng [Mon, 24 Jun 2019 01:51:24 +0000 (09:51 +0800)]
BaseTools: refine CreateAsBuiltInf function

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932
ModuleAutogen.CreateAsBuiltInf IsOnlyCopy parameter
and related function can be moved out of CreateAsBuiltInf,
so that CreateAsBuiltInf is more clean.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
4 years agoBaseTools:Add DetectNotUsedItem.py to Edk2\BaseTools\Scripts
Fan, ZhijuX [Mon, 24 Jun 2019 10:26:27 +0000 (18:26 +0800)]
BaseTools:Add DetectNotUsedItem.py to Edk2\BaseTools\Scripts

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

This script is used to Detect unreferenced PCD and GUID/Protocols/PPIs.
The input parameters are Dec file and package directory.

This script can be run in both Py2 and Py3.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers.txt: update it to remove IntelSiliconPkg maintainers
Liming Gao [Mon, 10 Jun 2019 15:29:12 +0000 (23:29 +0800)]
Maintainers.txt: update it to remove IntelSiliconPkg maintainers

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
4 years agoRemove IntelSiliconPkg that has been moved to edk2-platform repo
Liming Gao [Mon, 10 Jun 2019 15:27:58 +0000 (23:27 +0800)]
Remove IntelSiliconPkg that has been moved to edk2-platform repo

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
4 years agoBaseTools:Add import in FvImageSection
Fan, ZhijuX [Thu, 20 Jun 2019 06:07:39 +0000 (14:07 +0800)]
BaseTools:Add import in FvImageSection

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

Since MultipleWorkspace is not imported in FvImageSection,
an error of "global name 'MWS' is not defined" appeared.

This patch is going to fix that issue.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdeModulePkg/PeiMain: PeiAllocatePool: output NULL if HOB creation fails
Bret Barkelew [Wed, 12 Jun 2019 03:56:29 +0000 (11:56 +0800)]
MdeModulePkg/PeiMain: PeiAllocatePool: output NULL if HOB creation fails

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

The original logic is ASSERT if fail to create HOB. But
that doesn't make sense for release version. So it is required
to set the Buffer to null to indicate the failure.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeMoudlePkg/CapsulePei: No need to remain space for null-terminate
Zhichao Gao [Mon, 10 Jun 2019 01:54:52 +0000 (09:54 +0800)]
MdeMoudlePkg/CapsulePei: No need to remain space for null-terminate

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

UnicodeValueToStringS would remain two bytes for the first
parameter to set the null- terminate. So remove this change
in Mu.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A 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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeMoudlePkg/CapsulePei: Optimize GetScatterGatherHeadEntries
Zhichao Gao [Mon, 10 Jun 2019 01:52:22 +0000 (09:52 +0800)]
MdeMoudlePkg/CapsulePei: Optimize GetScatterGatherHeadEntries

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

Rename the MACRO from MAX_SG_LIST_HEADS to DEFAULT_SG_LIST_HEADS.
GetScatterGatherHeadEntries: use allocated buffer instead of fixed
array to handle the condition which the SG list is larger then the
array size.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A 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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeMoudlePkg/CapsulePei: Optimize AreCapsulesStaged
Zhichao Gao [Mon, 10 Jun 2019 01:43:59 +0000 (09:43 +0800)]
MdeMoudlePkg/CapsulePei: Optimize AreCapsulesStaged

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

AreCapsulesStaged do not need to return the status, only boolean
result is useful. So directly return a boolean value.
Cannot initialize the variable at its definition.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A 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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeMoudlePkg/CapsulePei: Fix coding style issue
Zhichao Gao [Mon, 10 Jun 2019 01:38:18 +0000 (09:38 +0800)]
MdeMoudlePkg/CapsulePei: Fix coding style issue

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

Remove API specifier AreCapsulesStaged and GetScatterGatherHeadEntries
because they are internal used.
Add space between function name and bracket.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A 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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/CapsulePei: Optimize the CapsulePei
Bret Barkelew [Tue, 4 Jun 2019 02:24:02 +0000 (10:24 +0800)]
MdeModulePkg/CapsulePei: Optimize the CapsulePei

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

Code change form Mu project:
https://github.com/microsoft/mu_basecore/blob/release/201903/
MdeModulePkg/Universal/CapsulePei/UefiCapsule.c#L801

Separate the capsule check function from GetCapsuleDescriptors
to AreCapsulesStaged. The original one is unclear.

Avoid querying the capsule variable twice. Use a fixed array
to cache the SG list during count the number of SG list. Then
allocate memory buffer to save the SG list from array.

Using MemoryAllocationLib instead of memory function in Pei
services.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A 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>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Zhichao gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdeModulePkg/NvmExpressPei: Produce NVM Express PassThru PPI
Maggie Chu [Mon, 17 Jun 2019 02:11:26 +0000 (10:11 +0800)]
MdeModulePkg/NvmExpressPei: Produce NVM Express PassThru PPI

https://bugzilla.tianocore.org/show_bug.cgi?id=1879
This commit will add codes to produce the NVM Express PassThru PPI.

Signed-off-by: Maggie Chu <maggie.chu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
4 years agoMdeModulePkg: Add definitions for NVM Express Passthru PPI
Chu, Maggie [Mon, 17 Jun 2019 02:10:43 +0000 (10:10 +0800)]
MdeModulePkg: Add definitions for NVM Express Passthru PPI

https://bugzilla.tianocore.org/show_bug.cgi?id=1879
This commit will add the definitions of Nvm Express PassThru PPI.
This PPI will provide services that allow NVM commands to be sent
to NVM Express devices during PEI phase.

More specifically, the PPI will provide services to:

* Sends an NVM Express Command Packet to an NVM Express controller
  or namespace (by service 'PassThru');
* Get the list of the attached namespaces on a controller
  (by services 'GetNextNameSpace');
* Get the identification information (DevicePath) of the underlying
  NVM Express host controller (by service 'GetDevicePath').

Signed-off-by: Maggie Chu <maggie.chu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
4 years agoUefiPayloadPkg: Remove legacy PIC 8259 driver
Dong, Guo [Wed, 29 May 2019 18:52:20 +0000 (11:52 -0700)]
UefiPayloadPkg: Remove legacy PIC 8259 driver

Since legacy PIC 8259 driver would be removed from edk2,
update UEFI payload to remove 8259 driver.
If required, bootloader could disable 8259.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
4 years agoCryptoPkg/OpensslLib: disable autoload-config for OpenSSL
Xiaoyu Lu [Thu, 20 Jun 2019 05:55:13 +0000 (13:55 +0800)]
CryptoPkg/OpensslLib: disable autoload-config for OpenSSL

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

This problem was found by Rebecca Cran <rebecca@bluestop.org>.
REF: https://edk2.groups.io/g/devel/topic/32100684

OpenSSL will automatically load a system config file which configures
default ssl options. In UEFI, It will cause TlsInitialize failed
without OPENSSL_INIT_NO_LOAD_CONFIG flag. we don't use this feature,
So disable it.

Re-run process_files.py to generate OpensslLib[Crypto].inf files.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Fix CR/LF issue
Lu, XiaoyuX [Wed, 19 Jun 2019 07:20:54 +0000 (15:20 +0800)]
CryptoPkg/OpensslLib: Fix CR/LF issue

Re-run process_files.py to generate OpensslLib[Crypto].inf.
CryptoPkg/Library/Include/openssl/opensslconf.h is coped from OpenSSL,
So keep the CR/LF style like OpenSSL source file.

Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoRevert "Capsule-on-Disk entire Patch
Zhang, Chao B [Fri, 21 Jun 2019 02:24:10 +0000 (10:24 +0800)]
Revert "Capsule-on-Disk entire Patch

This reverts commit 0d4aa276d1f6e0cb9d71a7fb88b30c416ba6d5a3,
                    6470a43160183cd48cad8901c912a48811f18b13,
                    fd7286089542ee7a98cfea00be45ceb3561e0b20,
                    7837d1249807b4248079699097bc993254235d7a,
                    6b32af2e105f9b5454a55b581f2dc365c5eb6397,
                    8636f70b5a763ed1c03b292708f9c5543e531ea9,
                    f17935321a5b818a66e999632ef371b374b98f0c
due to incorrect review process.

Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdePkg: Add Generic Initiator Affinity Structure definitions to SRAT
Krzysztof Koch [Wed, 12 Jun 2019 14:10:45 +0000 (22:10 +0800)]
MdePkg: Add Generic Initiator Affinity Structure definitions to SRAT

Add Generic Initiator Affinity Structure to the list of recognised
System Resource Affinity Table (SRAT) structure types.

Add definitions for Device Handle Types inside the Generic Initiator
Affinity Structure.

References:
- ACPI 6.3 January 2019, Table 5-78

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.
Wei6 Xu [Wed, 19 Jun 2019 17:03:20 +0000 (01:03 +0800)]
MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.

https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule-
on-Disk-Introducation

This module provides PPI to load Capsule On Disk temp relocation file
from Root Directory file system, retrieve the capsules from the temp
file and create capsule hobs for these capsules.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
4 years agoMdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
Wei6 Xu [Wed, 19 Jun 2019 16:55:40 +0000 (00:55 +0800)]
MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.

https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule-
on-Disk-Introducation

CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in
"OsIndications" Variable is enabled. It is used to indicate whether
capsule on disk is provisioned in normal boot path.

CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags,
including "OsIndications" and "BootNext" variable.

CoDRelocateCapsule() is to relocate the capsules from EFI system
partition. Depends on PcdCapsuleInRamSupport, there are two solutions
to relocate the capsule on disk images:
When Capsule In Ram is supported, the Capsule On Disk images are
relocated into memory, and call UpdateCapsule() service to deliver
the capsules.
When Capsule In Ram is not supported, the Capsule On Disk images are
relocated into a temp file which will be stored in root directory on
a platform specific storage device. CapsuleOnDiskLoadPei PEIM will
retrieve the capsules from the relocation temp file and report
capsule hobs for them.

CoDRemoveTempFile() is to remove the relocation temp file in the next
boot after capsules are processed.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
4 years agoMdeModulePkg/DxeIpl: Support Capsule On Disk.
Wei6 Xu [Wed, 19 Jun 2019 16:32:05 +0000 (00:32 +0800)]
MdeModulePkg/DxeIpl: Support Capsule On Disk.

https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule-
on-Disk-Introducation

If Capsule On Disk mode, call Capsule On Disk Load PPI to load
capsules. When it fails, still goes to Firmware Update boot path.
BDS will clear corresponding indicator and reboot later on.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>