summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "SecurityPkg: introduce the SM3 digest algorithm"Laszlo Ersek2019-07-045-210/+0
| | | | | | | | | | | | | | | | | | | 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>
* Revert "SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm"Laszlo Ersek2019-07-041-1/+0
| | | | | | | | | | | | | | | | | | | 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>
* Revert "SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default"Laszlo Ersek2019-07-041-3/+2
| | | | | | | | | | | | | | | | | | | 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>
* Revert "OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe"Laszlo Ersek2019-07-043-6/+0
| | | | | | | | | | | | | | | | | | 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>
* OvmfPkg: use DxeTpmMeasurementLib if and only if TPM2_ENABLEGary Lin2019-07-043-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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>
* EmbeddedPkg: Fix various typosCœur2019-07-0434-84/+84
| | | | | | | Fix various typos in EmbeddedPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Fix various typosAntoine Cœur2019-07-048-9/+9
| | | | | | | Fix various typos in ArmPlatformPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg: Fix various typosAntoine Cœur2019-07-0431-62/+62
| | | | | | | Fix various typos in ArmPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* BaseTools/FMMT: Add a tool FMMTShenglei Zhang2019-07-0411-0/+9036
| | | | | | | | | | | 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>
* BaseTools/FCE: Add a tool FCEShenglei Zhang2019-07-0423-2/+23443
| | | | | | | | | | | 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>
* BaseTools/BfmLib: Add a tool BfmLibShenglei Zhang2019-07-048-0/+5881
| | | | | | | | | | 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>
* Maintainers.txt: Drop deprecated SourceForge SVN linkHao A Wu2019-07-041-1/+0
| | | | | | | | | | | | | | | 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>
* Maintainers.txt: add Leif Lindholm as Package Reviewer of ArmVirtPkgLeif Lindholm2019-07-031-0/+1
| | | | | | | | | | | | | | | | 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>
* OvmfPkg: link SM3 support into Tcg2Pei and Tcg2DxeImran Desai2019-07-033-0/+6
| | | | | | | | | | | | | | | | | | | 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
* SecurityPkg: set SM3 bit in TPM 2.0 hash mask by defaultImran Desai2019-07-031-2/+3
| | | | | | | | | | | | | | | | | 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
* SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithmImran Desai2019-07-031-0/+1
| | | | | | | | | | | | | | | | | 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
* SecurityPkg: introduce the SM3 digest algorithmImran Desai2019-07-035-0/+210
| | | | | | | | | | | | | | | | | 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
* MdePkg/Protocol/Hash: introduce GUID for SM3Imran Desai2019-07-031-0/+5
| | | | | | | | | | | | | | | | 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
* Maintainers.txt: Remove information for IntelFramework[Module]PkgHao A Wu2019-07-031-9/+0
| | | | | | | | | | | | | 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>
* Remove IntelFrameworkPkgHao A Wu2019-07-0388-26353/+0
| | | | | | | | | | | | | | | 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>
* Remove IntelFrameworkModulePkgHao A Wu2019-07-03346-130499/+0
| | | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Make '-h' option not require a parameterKrzysztof Koch2019-07-022-31/+5
| | | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Remove duplicate indentation in IORT parserKrzysztof Koch2019-07-021-9/+9
| | | | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Remove '-v' flag from allowed command line argsKrzysztof Koch2019-07-022-5/+1
| | | | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Remove redundant IORT node types enumKrzysztof Koch2019-07-021-22/+8
| | | | | | | | | | 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>
* ShellPkg: acpiview: Allow disabling consistency checks (-q flag)Krzysztof Koch2019-07-025-9/+65
| | | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Make DBG2 output consistent with other tablesKrzysztof Koch2019-07-021-1/+2
| | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reportingKrzysztof Koch2019-07-021-4/+4
| | | | | | | | | | | | | | 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>
* ShellPkg: acpiview: Remove '/?' from valid command line flagsKrzysztof Koch2019-07-021-2/+1
| | | | | | | | | | | | 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>
* ShellPkg: acpiview: Improve PPTT table field validationKrzysztof Koch2019-07-022-10/+130
| | | | | | | | | | | | | | 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>
* EmulatorPkg/MiscSubClassPlatformDxe: Remove this unused moduleWu, Hao A2019-07-0239-2825/+0
| | | | | | | | | | | | | | | | | | | 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>
* ShellPkg/UefiShellLib: Set input pointer parameter to null if failureBret Barkelew2019-07-011-0/+5
| | | | | | | | | | | | | | | | | | 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>
* OvmfPkg/XenBusDxe: Don't call DisconnectController in Stop()Anthony PERARD2019-07-011-6/+0
| | | | | | | | | | | | 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>
* OvmfPkg/XenBusDxe: Close XenIoProtocol openned by childrenAnthony PERARD2019-07-011-0/+4
| | | | | | | | | | | | 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>
* MdeModulePkg SmbiosMeasurementDxe: Add Type4 Voltage field to blacklistStar Zeng2019-07-011-0/+1
| | | | | | | | | | | | | | | | 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>
* IntelFsp2Pkg: FSP Python scripts to support 3.x.Chasel Chiu2019-07-013-62/+109
| | | | | | | | | | | | | | | | | | | 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>
* PciBusDxe: duplicate node insertion for every PPB device in the systemJaveed, Ashraf2019-07-011-18/+1
| | | | | | | | | | | | | 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>
* MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecoveryZhichao Gao2019-07-012-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* MdeModulePkg: Add a pcd to set the OS indications bitBret Barkelew2019-07-012-0/+12
| | | | | | | | | | | | | | | | | | | | | | | 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>
* SecurityPkg: Remove DxeDeferImageLoadLib in DSCShenglei Zhang2019-07-011-1/+0
| | | | | | | | | | | | 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>
* BaseTools:Linux changes the way the latest version is judgedFan, ZhijuX2019-07-011-4/+2
| | | | | | | | | | 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>
* Fix indentation in edksetup.sh SetupPython3rebecca@bluestop.org2019-07-011-20/+20
| | | | | Signed-off-by: Rebecca Cran <rebecca@bluestop.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocolAlbecki, Mateusz2019-07-016-231/+814
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phaseAlbecki, Mateusz2019-07-011-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* MdeModulePkg/UfsPassThruDxe: Fix unaligned data transfer handlingAlbecki, Mateusz2019-07-012-54/+150
| | | | | | | | | | | | | | | | | | 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>
* ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu*Laszlo Ersek2019-06-283-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* BaseTools:Remove unused Edk2\BuildNotes2.txtFan, ZhijuX2019-06-281-154/+0
| | | | | | | | | | | | 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>
* Edk2Setup: Support different VS tool chain setupDandan Bi2019-06-284-15/+144
| | | | | | | | | | | | | | | | 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>
* Edk2: Remove nt32 related flag in bat filesDandan Bi2019-06-282-30/+1
| | | | | | | | | | | | | 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>
* SecurityPkg/DxeDeferImageLoadLib: Remove DxeDeferImageLoadLibShenglei Zhang2019-06-285-1108/+0
| | | | | | | | | | | | | 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>