summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pip: bump edk2-pytool-library from 0.14.1 to 0.16.1dependabot/pip/edk2-pytool-library-0.16.1dependabot[bot]2023-08-091-1/+1
| | | | | | | | | | | | | | Bumps [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) from 0.14.1 to 0.16.1. - [Release notes](https://github.com/tianocore/edk2-pytool-library/releases) - [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.14.1...v0.16.1) --- updated-dependencies: - dependency-name: edk2-pytool-library dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* CryptoPkg: remove BN and EC accel for size optimizationYi Li2023-08-093-54/+27
| | | | | | | | | | | | | | | BN and EC have not been fully tested, and will greatly increase the size of the Crypto driver(>150KB). Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: update CI config for openssl 3.0Gerd Hoffmann2023-08-091-11/+43
| | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: remove strcmp to syscallYi Li2023-08-092-9/+9
| | | | | | | | | | | | | | | | In rare cases the platform may not provide the full IntrinsicLib. But openssl30 build always require strcmp, provide this function by moving it into CrtWrapper.c. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: run configure.py to update all generated filesYi Li2023-08-09122-4/+240260
| | | | | | | | | | | | | | | cd */edk2/CryptoPkg/Library/OpensslLib python configure.py Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: add more dummy implement of openssl for size optimizationYi Li2023-08-099-0/+1351
| | | | | | | | | | | | | | | | Add dummy implement of Encoder, Pkcs12 and sslserver. OpenSSL libraries which don't need these features can include these files to reduce the size of output. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: add implemention of _ftol2_sse() to avoid build errorYi Li2023-08-091-0/+12
| | | | | | | | | | | | Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: add define of maximum unsigned size_tYi Li2023-08-091-0/+1
| | | | | | | | | | | | | | Used by openssl30 source code. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: add missing gcc instructionsYi Li2023-08-095-1/+97
| | | | | | | | | | | | | | | | Used when build IA32 CryptoPkg by gcc, the definition of the instructions can be found at: https://gcc.gnu.org/onlinedocs/gccint/Integer-library-routines.html Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: Enable memcpy sys call in RISCV64 buildYi Li2023-08-091-0/+2
| | | | | | | | | | | | | | | | When build Openssl30, compiler optimization may use memcpy() for memory copy. Need enable it in RISCV64 build also. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: Align with 4096 when build with OpensslFullAccelYi Li2023-08-091-6/+6
| | | | | | | | | | | | | | | | | Should align to 4096 when build ecp_nistz256 related asm files. ecp_nistz256-x86.S Line3: .globl ecp_nistz256_precomputed .align 4096 Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/TlsLib: use unsigned long for ErrorCodeGerd Hoffmann2023-08-092-2/+4
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: disable C4133 warning in openssl librariesYi Li2023-08-095-10/+15
| | | | | | | | | | | | | | | | Disable warning as error of C4133: v3_genn.c(101): warning C4133: 'function': incompatible types - from 'ASN1_TYPE *' to 'const ASN1_STRING *'. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: Add instrinsics to support building openssl3 on IA32 windowsYi Li2023-08-095-0/+711
| | | | | | | | | | | | | | | | This dependency is needed to build openssl lib with openssl3 under IA32 Windows, so added implementation for _alldiv, _aulldiv, _aullrem and _alldvrm instrinsics. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: adapt 3.0 change in SslNull.cYi Li2023-08-091-3/+3
| | | | | | | | | | | | | | Type of input params changed in openssl30. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: use UEFI provider as defaultYi Li2023-08-096-0/+333
| | | | | | | | | | | | | | | Added UEFI provider which removed unused features to optimize the size of openssl3. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg: Move all UEFI implement of openssl to OpensslStubYi Li2023-08-099-20/+20
| | | | | | | | | | | | Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: adapt EcSm2Null.c for openssl 3.0Gerd Hoffmann2023-08-091-3/+4
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: store dummy update for openssl 3.0Gerd Hoffmann2023-08-091-0/+156
| | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: move compiler_flags to buildinf.cGerd Hoffmann2023-08-097-1/+10
| | | | | | | | | | | | | | | | Seems with openssl 3.0 this is used by multiple source files, so we get duplicate symbol errors when linking. Fix that by moving compiler_flags from header file to a source file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: adapt rand_pool.c to openssl 3.0 changesGerd Hoffmann2023-08-091-12/+12
| | | | | | | | | | | | | | Some functions have been renamed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/TlsLib: ERR_GET_FUNC is goneGerd Hoffmann2023-08-092-3/+2
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/BaseCryptLib: drop BIO_* dummy functionsGerd Hoffmann2023-08-092-52/+0
| | | | | | | | | | | | | | openssl 3.0 requires a functional BIO_sprintf() implementation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/BaseCryptLib: adapt CryptSm3.c to openssl 3.0 changes.Gerd Hoffmann2023-08-091-7/+7
| | | | | | | | | | | | | | Functions have been renamed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/BaseCryptLib: no openssl deprecation warnings pleaseGerd Hoffmann2023-08-091-0/+2
| | | | | | | | | | | | | | | Stop using deprecated interfaces is left as exercise for another day. So please don't warn for now so -Werror builds can work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: UefiAsm.conf update for openssl 3.0Gerd Hoffmann2023-08-091-29/+12
| | | | | | | | | | | | | | New naming convention for the configs: UEFI-${efiarch}-${compiler}. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: add openssl3 configure scriptsGerd Hoffmann2023-08-093-2/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the script to configure openssl 3.0 from scratch. It's two scripts now: * Tiny helper script, dumping the perl configdata as json. * Actual configure.py script, written in python, which copies over the generated files to openssl-gen and updates the OpensslLib*.inf file lists and build flags. The configuration workflow has changed a bit: * All generated files are stored in the OpensslGen directory tree. * For ec/no-ec builds two different header files are used. Default is the ec variant, and the new EDK2_OPENSSL_NOEC define is used to select the no-ec build. A five line wrapper include is used to pick the one or the other. * For non-accel builds -DOPENSSL_NO_ASM on the command line is used (same as before). * For configration defines the OPENSSL_FLAGS_$(variant) variable is used, where variant is the architecture for the accelerated builds and 'NOASM' for the non-accelerated builds. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: update Openssl*.inf files for openssl 3.0Gerd Hoffmann2023-08-096-64/+64
| | | | | | | | | | | | | | | | | | | The configure workflow as changed, see the commit adding the configure script for details. Adapt the *.inf files to the changes. The configuration define handling has changed a bit. The new configure script will build a single per-arch file list, which simplifies the Accel configs. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: cleanup all openssl1.1.1 generated files and codeYi Li2023-08-0948-73653/+2
| | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* CryptoPkg/openssl: update submodule to openssl-3.0.9Gerd Hoffmann2023-08-091-0/+0
| | | | | | | | | | | | Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
* MedPkg/Include: Add PCI_EXPRESS_EXTENDED_CAPABILITY_DVSEC_IDFoster Nong2023-08-091-0/+2
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4515 Add PCI_EXPRESS_EXTENDED_CAPABILITY_DESIGNATED_VENDOR_SPECIFIC_ID 0x0023 in PciExpress40.h Signed-off-by: Foster Nong <foster.nong@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Add new status codes to PrintLibNate DeSimone2023-08-071-3/+7
| | | | | | | | | | | | | | | | PrintLib does not correctly decode the follow status codes: 1. EFI_IP_ADDRESS_CONFLICT 2. EFI_HTTP_ERROR 3. EFI_WARN_FILE_SYSTEM 4. EFI_WARN_RESET_REQUIRED These missing status codes have been added. Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
* MdePkg: Add missing status codesNate DeSimone2023-08-072-0/+12
| | | | | | | | | | | | | | | | | REF: https://uefi.org/specs/UEFI/2.10/Apx_D_Status_Codes.html Upon review it has been found that MdePkg is missing two status code definitions: 1. EFI_IP_ADDRESS_CONFLICT - Added in UEFI Spec v2.5 2. EFI_WARN_RESET_REQUIRED - Added in UEFI Spec v2.6 These missing status codes have been added. Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
* OvmfPkg/PlatformCI: Boot OVMF in SMP mode.Gerd Hoffmann2023-08-041-0/+2
| | | | | | | | | | | | | | | Increase the chance that CI finds bugs in MP changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit f92a9dce10281c103b04d6b38283e0ff1d677b91) Reapplying, since the CI (Windows and Linux) use Qemu 8 now, which works with SMP again. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4324 Signed-off-by: Oliver Steffen <osteffen@redhat.com> [ardb: use single-threaded TCG for SMM]
* OvmfPkg/PlatformCI VS2019: Disable workaround for cpuhp bugfixOliver Steffen2023-08-042-13/+1
| | | | | | | | | | | | | This reverts commit 3beb8c965455f4c1cc3184e36c627ef1d9bfe5f9. Both Windows and Linux CI jobs are now using Qemu 8, this workaround is no longer needed. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4324 Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
* OvmfPkg/PlatformCI: Use recent Qemu on WindowsOliver Steffen2023-08-041-1/+1
| | | | | | | | | | | Bump the version of the Qemu chocolatey package up to 2023.7.25. The Linux CI is already using Qemu 8. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4324 Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
* MdeModulePkg: Solve boot hang Xhci driver when use USB DVD with empty disklikun su2023-08-041-2/+5
| | | | | | | Signed-off-by: likun su <sulikun@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: lichao <lichao@loongson.cn> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* ArmPkg: DefaultExceptionHandlerLib: Do Not Allocate MemoryOliver Smith-Denny2023-08-032-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If gST->ConOut is available when Arm's DefaultExceptionHandler is running, AsciiPrint will get called to attempt to print to ConOut, in addition to the serial output. AsciiPrint calls AsciiInternalPrint in UefiLibPrint.c which in turn calls AllocatePool to allocate a buffer to convert the Ascii input string to a Unicode string to pass to ConOut->OutputString. Per the comment on DefaultExceptionHandler, we should not be allocating memory in the exception handler, as this can cause the exception handler to fail if we had a memory exception or the system state is such that we cannot allocate memory. It has been observed on ArmVirtQemu that exceptions generated in the memory handling code will fail to output the stack dump and CPU state that is critical to debugging because the AllocatePool will fail. This patch fixes the Arm and AARCH64 DefaultExceptionHandlers to not allocate memory when ConOut is available and instead use stack memory to convert the Ascii string needed for SerialPortWrite to the Unicode string needed for ConOut->OutputString. Correspondingly, ArmVirtQemu can now output the stack dump and CPU state when hitting an exception in memory code. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* MdeModulePkg/SetupBrowser: Load storage via GetVariable for EfiVarStoreDandan Bi2023-08-031-22/+32
| | | | | | | | | | | | | | For EfiVarStore (EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER), it will call ExtractConfig-GetVariable-HiiBlockToConfig-ConfigToBlock when load storage value in LoadStorage function. It's not necessary and costs lots of time to do the conversion between config and block. So now enhance it to call GetVariable directly. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Eric Dong <eric.dong@intel.com>
* BaseTools: scan Edk2ToolsBuild.py make outputJoey Vagedes2023-08-021-0/+11
| | | | | | | | | | | | | Adds edk2_logging.scan_compiler_output() to Edk2ToolsBuild.py to catch some compilation errors and log them as an error. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools: BinToPcd: Resolve xdrlib deprecationJoey Vagedes2023-08-021-4/+15
| | | | | | | | | | | | | | | Removes the dependency on xdrlib and replaces it with custom logic to pack a per the xdr requirements. Necessary as xdrlib is being deprecated in python 3.13. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdeModulePkg/Bus/Ata/AtaAtapiPassThru: Fix UNUSED_VALUE Coverity issueRanbir Singh2023-08-021-2/+10
| | | | | | | | | | | | | | | | | | | | The return value stored in Status after call to SetDriveParameters is not made of any use thereafter and hence it remains as UNUSED. Based on Hao's findings (https://edk2.groups.io/g/devel/message/106844), the successful execution of SetDriveParameters() is not mandatory for initializing IDE mode of a hard disk device. Hence remove the 'Status' assignment of the return value from SetDriveParameters() and instead add error checks & DEBUG_WARN level messages within SetDriveParameters() function after sending INIT_DRIVE_PARAM & SET_MULTIPLE_MODE ATA commands. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4204 Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com> Signed-off-by: Ranbir Singh <rsingh@ventanamicro.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/Bus/Ata/AtaAtapiPassThru: Fix SIGN_EXTENSION Coverity issueRanbir Singh2023-08-021-1/+1
| | | | | | | | | | | | | | | Line number 1348 does contain a typecast with UINT32, but it is after all the operations (16-bit left shift followed by OR'ing) are over. To avoid any SIGN_EXTENSION, typecast the intermediate result after 16-bit left shift operation immediately with UINT32. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4204 Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com> Signed-off-by: Ranbir Singh <rsingh@ventanamicro.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* OvmfPkg/RiscVVirt: Update README for CLANGDWARF supportSunil V L2023-07-311-3/+25
| | | | | | | | | | | | | | | | Update the README with instruction to build using CLANGDWARF toolchain. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6
* BaseTools/tools_def: Add CLANGDWARF support for RISC-VSunil V L2023-07-311-0/+53
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4478 Add tools_def definitions to support CLANGDWARF toolchain for RISC-V. This uses clang and the llvm LLD linker. This helps people by not requiring to install multiple cross compilers for different architectures. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6 Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* OvmfPkg/RiscVVirt: SecEntry: Remove unnecessary assembly directivesSunil V L2023-07-311-3/+0
| | | | | | | | | | | | | | | llvm fails to resolve _ModuleEntry when these extra directives are present. ASM_FUNC already takes care what is required. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6
* OvmfPkg/RiscVVirt: use 'auto' alignment and FIXED for XIP modulesSunil V L2023-07-311-24/+10
| | | | | | | | | | | | | | | | | | | | | Use auto alignment and FIXED FFS attribute for XIP modules similar to [1]. Without this change, the CLANGDWARF toolchain will fail to build with below error. GenFfs: ERROR 1000: Unknown option SectionAlign option must be specified with section file. [1] - https://github.com/tianocore/edk2/commit/7669f7349829f0e4755552ba0d6e600492fd8170 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc Gerd Hoffmann <kraxel@redhat.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6
* OvmfPkg/BhyvePkg: enable bus enumerationCorvin Köhne2023-07-311-1/+0
| | | | | | | | | | | | | | | | bhyve supports adding a ROM to PCI devices. It was added to support GPU passthrough of dedicated AMD GPUs. At the moment, this ROM file is mostly useless as it's not shadowed and executed by firmware. Change that by enabling bus enumeration. Signed-off-by: Corvin Köhne <corvink@FreeBSD.org> Acked-by: Peter Grehan <grehan@freebsd.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rebecca Cran <rebecca@bsdio.com>
* Revert "OvmfPkg/Bhyve: remove IncompatiblePciDeviceSupport DXE driver"Corvin Köhne2023-07-312-0/+2
| | | | | | | | | | | | | | | | We like to enable bus enumeration for bhyve. Therefore, this patch needs to be reverted. This reverts commit 8c8f886f27556f2fb6e8b502d32aa9ccee930acc. Signed-off-by: Corvin Köhne <corvink@FreeBSD.org> Acked-by: Peter Grehan <grehan@freebsd.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rebecca Cran <rebecca@bsdio.com>
* Revert "OvmfPkg/Bhyve: consume PciHostBridgeLibScan"Corvin Köhne2023-07-311-1/+1
| | | | | | | | | | | | | | | | We like to enable bus enumartion for bhyve. Therefore, this patch needs to be reverted. This reverts commit c2f24ba3218ae91a8d5a1a31c31dad3417850d0c. Signed-off-by: Corvin Köhne <corvink@FreeBSD.org> Acked-by: Peter Grehan <grehan@freebsd.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com>