]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
19 months ago.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:59:53 +0000 (17:59 +0800)]
.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.

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

Add LoongArch64 architecture on LoongArch64 EDK2 CI testing.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months ago.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:59:03 +0000 (17:59 +0800)]
.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.

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

Add LoongArch64 architecture on LoongArch64 EDK2 CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoBaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:58:05 +0000 (17:58 +0800)]
BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.

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

EDK CI for LoongArch64 architecture

Enable LoongArch64 architecture for LoongArch64 EDK2 CI testing.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoBaseTools: Add LoongArch64 binding.
Chao Li [Mon, 15 Nov 2021 09:28:46 +0000 (17:28 +0800)]
BaseTools: Add LoongArch64 binding.

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

Add LoongArch64 ProcessorBin.h and add LoongArch to Makefiles.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoBaseTools: Updated build tools to support new LoongArch.
Chao Li [Fri, 14 Jan 2022 04:19:15 +0000 (12:19 +0800)]
BaseTools: Updated build tools to support new LoongArch.

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

Python code changes for building EDK2 LoongArch platform.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoBaseTools: Updated for GCC5 tool chain for LoongArch platfrom.
Chao Li [Tue, 6 Sep 2022 11:25:29 +0000 (19:25 +0800)]
BaseTools: Updated for GCC5 tool chain for LoongArch platfrom.

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

BaseTools define template files changes for building EDK2 LoongArch
platform.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoBaseTools: Update GenFw/GenFv to support LoongArch platform.
Chao Li [Tue, 6 Sep 2022 13:00:07 +0000 (21:00 +0800)]
BaseTools: Update GenFw/GenFv to support LoongArch platform.

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

C code changes for building EDK2 LoongArch platform.

For definitions of PE/COFF and LOONGARCH relocation types, see the
"Machine Types" and "Basic Relocation Types" sections of this URL for
LOONGARCH values:
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Co-authored-by: Yang Zhou <zhouyang@loongson.cn>
Co-authored-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months ago.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
Chao Li [Thu, 9 Jun 2022 12:26:47 +0000 (20:26 +0800)]
.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section

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

Add Loongson and LOONGARCH to "words" section in cspell.base.yaml file
to avoid spelling check error.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoMdeModulePkg: Use LockBoxNullLib for LOONGARCH64
Chao Li [Thu, 28 Oct 2021 02:49:01 +0000 (10:49 +0800)]
MdeModulePkg: Use LockBoxNullLib for LOONGARCH64

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

LoongArch doesn't have SMM by now.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoMdePkg/DxeServicesLib: Add LOONGARCH64 architecture
Chao Li [Wed, 27 Oct 2021 09:59:05 +0000 (17:59 +0800)]
MdePkg/DxeServicesLib: Add LOONGARCH64 architecture

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

Add LOONGARCH64 architecture to MdePkg/DxeServiceLib.

Cc: 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: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoUnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 13:02:02 +0000 (21:02 +0800)]
UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to UnitTestFramworkPkg for LOONGARCH64 EDK2
CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:57:53 +0000 (20:57 +0800)]
ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to ShellPkg for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
19 months agoSecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:45:46 +0000 (20:45 +0800)]
SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to SecurityPkg for EDK2 CI testing.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
19 months agoMdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
Chao Li [Tue, 13 Sep 2022 09:03:33 +0000 (17:03 +0800)]
MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.

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

HTTP/PXE boot LOONGARCH64 related definitions for EDK2 CI.

For the LOONGARCH values, please seeing following URL section
"Processor Architecture Types":
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml

Cc: 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: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoCryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Fri, 10 Dec 2021 04:32:47 +0000 (12:32 +0800)]
CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
19 months agoNetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Fri, 10 Dec 2021 04:19:30 +0000 (12:19 +0800)]
NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH architecture for EDK2 CI testing.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
19 months agoNetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:34:01 +0000 (20:34 +0800)]
NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
19 months agoFmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:30:43 +0000 (20:30 +0800)]
FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoFatPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:16:07 +0000 (20:16 +0800)]
FatPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoMdePkg: Added LoongArch jump buffer register definition to MdePkg.ci.yaml
Chao Li [Wed, 7 Sep 2022 13:04:33 +0000 (21:04 +0800)]
MdePkg: Added LoongArch jump buffer register definition to MdePkg.ci.yaml

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

If the new Arch register is defined in BaseLib.h when running
the CI tests, it will give an ECC check error. Add the
LoongArch register defined in the ExceptionList field to make
the CI ECC check pass.

Cc: 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: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoMdePkg: Added file of DebugSupport.h to MdePkg.ci.yaml
Chao Li [Wed, 7 Sep 2022 12:53:44 +0000 (20:53 +0800)]
MdePkg: Added file of DebugSupport.h to MdePkg.ci.yaml

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

DebugSupport.h is all defined by UEFI Spec, most of the code
doesn't fit EDKII coding style, add it to IgnoreFiles field to
make CI ECC check pass.

Cc: 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: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoUefiPayloadPkg: Remove deprecate Crypto Service
Gua Guo [Wed, 5 Oct 2022 08:48:05 +0000 (16:48 +0800)]
UefiPayloadPkg: Remove deprecate Crypto Service

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

TDES and ARC4 services are deprecated so set it as disable.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
19 months agoCryptoPkg: add Unit Test for X509 new function.
Qi Zhang [Wed, 12 Oct 2022 04:36:01 +0000 (12:36 +0800)]
CryptoPkg: add Unit Test for X509 new function.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new X509 function to Crypto Service.
Qi Zhang [Wed, 12 Oct 2022 04:36:00 +0000 (12:36 +0800)]
CryptoPkg: add new X509 function to Crypto Service.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new X509 function.
Qi Zhang [Wed, 12 Oct 2022 04:35:59 +0000 (12:35 +0800)]
CryptoPkg: add new X509 function.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new X509 function definition.
Qi Zhang [Wed, 12 Oct 2022 04:35:58 +0000 (12:35 +0800)]
CryptoPkg: add new X509 function definition.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add unit test for EC key interface.
Qi Zhang [Wed, 12 Oct 2022 02:48:00 +0000 (10:48 +0800)]
CryptoPkg: add unit test for EC key interface.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC key interface to DXE and protocol
Qi Zhang [Wed, 12 Oct 2022 02:47:59 +0000 (10:47 +0800)]
CryptoPkg: Add EC key interface to DXE and protocol

The implementation provide EC key interface for EFI
 driver nad EFI BaseCrypt protocol.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC key retrieving and signature interface.
Qi Zhang [Wed, 12 Oct 2022 02:47:58 +0000 (10:47 +0800)]
CryptoPkg: Add EC key retrieving and signature interface.

This patch is used to retrieve EC key from PEM and X509 and
carry out the EC-DSA signature and verify it.

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

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoOvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
Dimitrije Pavlov [Wed, 17 Aug 2022 14:35:03 +0000 (09:35 -0500)]
OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName

Per the UEFI specification, a device driver implementation should return
EFI_UNSUPPORTED if the ChildHandle argument in
EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Reviewed-by: Sunny Wang <sunny.wang@arm.com>
19 months agoCryptoPkg: Add new Tls APIs to DXE and protocol
Yi Li [Sun, 25 Sep 2022 16:13:05 +0000 (00:13 +0800)]
CryptoPkg: Add new Tls APIs to DXE and protocol

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

The implementation provides new Tls library functions
for Crypto EFI Driver and Protocol.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Extend Tls function library
Yi Li [Sun, 25 Sep 2022 09:14:06 +0000 (17:14 +0800)]
CryptoPkg: Extend Tls function library

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

1. TlsSetSignatureAlgoList(): Configure the list of TLS signature algorithms
that should be used as part of the TLS session establishment.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used, e.g.,
Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

2. TlsSetEcCurve(): Configure the Elliptic Curve that should be used for
TLS flows the use cipher suite with EC,
e.g., TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used,
e.g., Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

3. TlsShutdown():
Shutdown the TLS connection without releasing the resources,
meaning a new connection can be started without calling TlsNew() and
without setting certificates etc.

4. TlsGetExportKey(): Derive keying material from a TLS connection using the
mechanism described in RFC 5705 and export the key material (needed
by EAP methods such as EAP-TTLS and EAP-PEAP).

5. TlsSetHostPrivateKeyEx(): This function adds the local private key
(PEM-encoded or PKCS#8 or DER-encoded private key) into the specified
TLS object for TLS negotiation. There is already a similar function
TlsSetHostPrivateKey(), the new Ex function introduces a new parameter
Password, set Password to NULL when useless.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoMdePkg: Add Tls configuration related define
Yi Li [Sat, 7 May 2022 07:37:32 +0000 (15:37 +0800)]
MdePkg: Add Tls configuration related define

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

Consumed by TlsSetEcCurve and TlsSetSignatureAlgoList.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yi Li <yi1.li@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoCryptoPkg: Fix integer overflow
Yuan Yu [Wed, 28 Sep 2022 07:49:24 +0000 (15:49 +0800)]
CryptoPkg: Fix integer overflow

SECSPERDAY is 86400 which exceeds the limit of a UINT16 which is 65536.
Therefore DayRemainder cannot use UINT16. This patch makes it UINT32.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien@xen.org>
Signed-off-by: Yuan Yu <yuanyu@google.com>
Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoMdeModulePkg: Handle InitialVFs=0 case for SR-IOV
Foster Nong [Thu, 29 Sep 2022 09:20:01 +0000 (17:20 +0800)]
MdeModulePkg: Handle InitialVFs=0 case for SR-IOV

Per the section 3.3.5 SR-IOV spec v1.1, InitialVFs (0ch).
InitialVFs indicates to SR-PCIM the number of VFs that are initially associated with the PF.
The minimum value of InitialVFs is 0.

Below code is used to calculate SR-IOV reserved bus number,
if InitialVFs =0, it maybe calculate the wrong bus number in this case.
  LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride

we can fix it with below code:
 if (PciIoDevice->InitialVFs == 0) {
 PciIoDevice->ReservedBusNum = 0;
} else {
PFRid  = EFI_PCI_RID (Bus, Device, Func);
 LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;
//
// Calculate ReservedBusNum for this PF
//
PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);
//
 // Calculate ReservedBusNum for this PF
//
 PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);
}

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

Signed-off-by: Foster Nong <foster.nong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
19 months agoUefiCpuPkg: Reset a parameter when BSP Exit in CPU relaxed mode.
Zhihao Li [Tue, 27 Sep 2022 12:57:38 +0000 (20:57 +0800)]
UefiCpuPkg: Reset a parameter when BSP Exit in CPU relaxed mode.

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

In CPU relaxed mode, it doesn't reset the value of
mSmmMpSyncData->AllApArrivedWithException when BSP exit smm mode.
So this patch will reset this variable.

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhihao Li <zhihao.li@intel.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
19 months agoUefiCpuPkg/CpuExceptionHandlerLib: Code optimization to allow bigger stack
Tan, Dun [Thu, 29 Sep 2022 09:06:51 +0000 (17:06 +0800)]
UefiCpuPkg/CpuExceptionHandlerLib: Code optimization to allow bigger stack

This commit is a code optimization to allow bigger seperate stack size in
ArchSetupExceptionStack. In previous code logic, CPU_STACK_ALIGNMENT bytes
will be wasted if StackTop is already CPU_STACK_ALIGNMENT aligned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
19 months agoOvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN
Gerd Hoffmann [Tue, 4 Oct 2022 11:21:57 +0000 (13:21 +0200)]
OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN

While the actual implementation (using qemu fw_cfg) is qemu-specific,
the idea to store the boot order as configured by the VMM in EFI
variables is not.  So lets give the variables a more neutral name while
we still can (i.e. no stable tag yet with the new feature).

While being at it also fix the NNNN format (use %x instead of %d for
consistency with BootNNNN).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoRevert "OvmfPkg/Microvm: no secure boot"
Gerd Hoffmann [Thu, 6 Oct 2022 11:05:26 +0000 (13:05 +0200)]
Revert "OvmfPkg/Microvm: no secure boot"

This reverts commit 60d55c4156523e5dfb316b7c0c445b96c8f8be81.

Now that we have stateless secure boot support (which doesn't
need SMM) in OVMF we can enable the build option for MicroVM.

Bring it back by reverting the commit removing it.
Also add the new PlatformPKProtectionLib.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/Microvm: add SECURE_BOOT_FEATURE_ENABLED
Gerd Hoffmann [Thu, 6 Oct 2022 11:05:25 +0000 (13:05 +0200)]
OvmfPkg/Microvm: add SECURE_BOOT_FEATURE_ENABLED

Compiler flag is needed to make (stateless) secure boot be actually
secure, i.e. restore EFI variables from ROM on reset.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/PciHotPlugInitDxe: reserve more mmio space
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:28 +0000 (15:47 +0200)]
OvmfPkg/PciHotPlugInitDxe: reserve more mmio space

In case the 64-bit pci mmio window is larger than the default size
of 32G be generous and hand out larger chunks of address space for
prefetchable mmio bridge windows.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
19 months agoOvmfPkg/PlatformInitLib: dynamic mmio window size
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:27 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: dynamic mmio window size

In case we have a reliable PhysMemAddressWidth use that to dynamically
size the 64bit address window.  Allocate 1/8 of the physical address
space and place the window at the upper end of the address space.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/PlatformInitLib: detect physical address space
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:26 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: detect physical address space

Try detect physical address space, when successful use it.
Otherwise go continue using the current guesswork code path.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/PlatformInitLib: qemu cpuid physbits detection
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:25 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: qemu cpuid physbits detection

Add some qemu specific quirks to PlatformAddressWidthFromCpuid()
to figure whenever the PhysBits value returned by CPUID is
something real we can work with or not.

See the source code comment for details on the logic.

Also apply some limits to the address space we are going to use:
 * Place a hard cap at 47 PhysBits (128 TB) to avoid using addresses
   which require 5-level paging support.
 * Cap at 40 PhysBits (1 TB) in case the CPU has no support for
   gigabyte pages, to avoid excessive amounts of pages being
   used for page tables.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoMdeModulePkg/UefiBootManagerLib: Add Disk Info support for Ufs
Jeff Brasen [Thu, 6 Oct 2022 14:44:38 +0000 (08:44 -0600)]
MdeModulePkg/UefiBootManagerLib: Add Disk Info support for Ufs

Add support for getting disk info from UFS devices.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
19 months ago.azurepipelines: Add SourceLevelDebugPkg to CI
Michael Kubacki [Tue, 4 Oct 2022 15:05:37 +0000 (11:05 -0400)]
.azurepipelines: Add SourceLevelDebugPkg to CI

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

Adds SourceLevelDebugPkg to the "OTHER" CI matrix job so it is built
in edk2 CI.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoSourceLevelDebugPkg: Add package CI YAML file
Michael Kubacki [Tue, 4 Oct 2022 15:01:50 +0000 (11:01 -0400)]
SourceLevelDebugPkg: Add package CI YAML file

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

Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoSourceLevelDebugPkg: Fix spelling errors
Michael Kubacki [Tue, 4 Oct 2022 14:55:27 +0000 (10:55 -0400)]
SourceLevelDebugPkg: Fix spelling errors

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

Fixes spelling errors in the package so the SpellCheck CI plugin can
be enabled.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoIntelFsp2WrapperPkg: Remove CI exception of PlatformMultiPhaseLib.
Chasel Chiu [Wed, 5 Oct 2022 01:04:40 +0000 (18:04 -0700)]
IntelFsp2WrapperPkg: Remove CI exception of PlatformMultiPhaseLib.

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

Duplicate library class header issue will be resolved and CI
exception for FspWrapperPlatformMultiPhaseLib should be removed too.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
19 months agoIntelFsp2WrapperPkg: Add header for PlatformMultiPhaseLib.
Chasel Chiu [Tue, 4 Oct 2022 20:10:14 +0000 (13:10 -0700)]
IntelFsp2WrapperPkg: Add header for PlatformMultiPhaseLib.

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

To comply with coding style rule each library class
should have its own header even if it is just a private child library
instance consumed by parent public library in the same package.

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: Nate DeSimone <nathaniel.l.desimone@intel.com>
19 months ago.azurepipelines: Add SignedCapsulePkg to CI
Michael Kubacki [Thu, 1 Sep 2022 18:54:12 +0000 (14:54 -0400)]
.azurepipelines: Add SignedCapsulePkg to CI

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

Adds SignedCapsulePkg to the "OTHER" CI matrix job so it is built
in edk2 CI.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoSignedCapsulePkg: Add package CI YAML file
Michael Kubacki [Thu, 1 Sep 2022 18:51:45 +0000 (14:51 -0400)]
SignedCapsulePkg: Add package CI YAML file

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

Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.

Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months ago.azurepipelines: Add IntelFsp2Pkg and IntelFsp2WrapperPkg to CI
Michael Kubacki [Tue, 6 Sep 2022 21:19:17 +0000 (17:19 -0400)]
.azurepipelines: Add IntelFsp2Pkg and IntelFsp2WrapperPkg to CI

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

Adds these packages to a new edk2 matrix job so they can be validated
in edk2 CI.

Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoIntelFsp2WrapperPkg: Add CI YAML file
Michael Kubacki [Tue, 6 Sep 2022 21:18:28 +0000 (17:18 -0400)]
IntelFsp2WrapperPkg: Add CI YAML file

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

Adds IntelFsp2WrapperPkg to the list of supported build packages
for edk2 CI and defines an initial set of CI configuration options.

Adds a special case for the Library Class check CI plugin to ignore
FspWrapperPlatformMultiPhaseLib with an explanatory comment.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
19 months agoIntelFsp2WrapperPkg: Fix code formatting errors
Michael Kubacki [Tue, 6 Sep 2022 19:52:39 +0000 (15:52 -0400)]
IntelFsp2WrapperPkg: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
19 months agoIntelFsp2Pkg: Add CI YAML file
Michael Kubacki [Tue, 6 Sep 2022 19:46:08 +0000 (15:46 -0400)]
IntelFsp2Pkg: Add CI YAML file

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

Adds IntelFsp2Pkg to the list of supported build packages for edk2
CI and defines an initial set of CI configuration options.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
19 months agoIntelFsp2Pkg/BaseFspMultiPhaseLib: Replace duplicate GUID
Michael Kubacki [Tue, 6 Sep 2022 17:47:21 +0000 (13:47 -0400)]
IntelFsp2Pkg/BaseFspMultiPhaseLib: Replace duplicate GUID

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

The FILE_GUID for this library instance file is a duplicate of
Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.inf.

This change replaces the duplicated GUID value with a unique GUID.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
19 months agoIntelFsp2Pkg: Fix code formatting errors
Michael Kubacki [Tue, 6 Sep 2022 17:45:01 +0000 (13:45 -0400)]
IntelFsp2Pkg: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
19 months agoEmbeddedPkg: Only run in CI for GCC5
Michael Kubacki [Tue, 6 Sep 2022 22:48:10 +0000 (18:48 -0400)]
EmbeddedPkg: Only run in CI for GCC5

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

This package currently does not build on non-GCC toolchains.

This change adds the package to edk2 CI so it can benefit from
ongoing CI and only tests the package against GCC.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoEmbeddedPkg: Add CI YAML file
Michael Kubacki [Sat, 3 Sep 2022 00:56:28 +0000 (20:56 -0400)]
EmbeddedPkg: Add CI YAML file

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

Adds EmbeddedPkg to the list of supported build packages for edk2
CI and fixes Library Class Check errors reported.

These changes allow EmbeddedPkg to pass NO-TARGET CI testing.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoEmbeddedPkg/AcpiLib: Fix code formatting errors
Michael Kubacki [Sat, 3 Sep 2022 00:52:36 +0000 (20:52 -0400)]
EmbeddedPkg/AcpiLib: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoBaseTools/VolInfo: Update file and section type strings
Konstantin Aladyshev [Fri, 22 Jul 2022 13:30:11 +0000 (21:30 +0800)]
BaseTools/VolInfo: Update file and section type strings

Change SMM to MM in naming according to the recent PI specifications.
Remove trailing whitespaces in some strings.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoBaseTools/VolInfo: Update copyright information
Konstantin Aladyshev [Sun, 24 Jul 2022 09:47:39 +0000 (17:47 +0800)]
BaseTools/VolInfo: Update copyright information

Add Konstantin Aladyshev to the copyright header.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoBaseTools/VolInfo: Parse apriori files
Konstantin Aladyshev [Fri, 22 Jul 2022 15:37:30 +0000 (23:37 +0800)]
BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoBaseTools/VolInfo: Increase GUID base name string
Konstantin Aladyshev [Thu, 21 Jul 2022 13:11:48 +0000 (21:11 +0800)]
BaseTools/VolInfo: Increase GUID base name string

The current string lenght (=60) is not enough for cases where basename
is a path to Build folder.
Drop custom define and use MAX_LINE_LEN from the BaseTools codebase
instead.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoBaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing
Konstantin Aladyshev [Tue, 30 Aug 2022 10:14:40 +0000 (18:14 +0800)]
BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing

Currently 'PutFileImage' function is called with arguments that are
not advanced on each section parsing. This would lead to an error if
EFI_SECTION_GUID_DEFINED is not the first in a file.
The same mistake is present in the parsing of CRC32 guided section
case.
Use correct arguments to fix the issue.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoBaseTools/VolInfo: Correct buffer for GenCrc32 tool
Konstantin Aladyshev [Tue, 19 Jul 2022 13:44:35 +0000 (21:44 +0800)]
BaseTools/VolInfo: Correct buffer for GenCrc32 tool

If the guided section was encoded with GenCrc32 tool the resulting
'EFI_GUID_DEFINED_SECTION.DataOffset' field points to the start of
the meaningfull data that follows the CRC32 value.
But if we want to decode the section with GenCrc32 tool we need to
provide a buffer that includes the CRC32 value itself.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Allow partial FreeBuffer
Jeff Brasen via groups.io [Mon, 14 Feb 2022 18:45:31 +0000 (18:45 +0000)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Allow partial FreeBuffer

Add support for partial free of non cached buffers.
If a request for less than the full size is requested new allocations
for the remaining head and tail of the buffer are added to the list.
Added verification that Buffer is EFI_PAGE_SIZE aligned.
The XHCI driver does this if the page size for the controller is >4KB.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
19 months agoSecurityPkg: Remove enforcement of final GoIdle transition for CRB commands
Rodrigo Gonzalez Del Cueto [Thu, 22 Sep 2022 07:35:36 +0000 (15:35 +0800)]
SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands

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

Following the design described in the TCG specification,
the driver implementation of the CRB protocol does not require
enforcing completing the transition to goIdle at the end of a command
sequence.

Signed-off-by: Rodrigo Gonzalez Del Cueto <rodrigo.gonzalez.del.cueto@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
19 months agoOvmfPkg/QemuBootOrderLib: skip unsupported entries in StoreQemuBootOrder
Gerd Hoffmann [Wed, 21 Sep 2022 05:30:45 +0000 (07:30 +0200)]
OvmfPkg/QemuBootOrderLib: skip unsupported entries in StoreQemuBootOrder

When finding an unsupported entry just skip over and continue
with the next entry instead of stop processing altogether.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/QemuBootOrderLib: allow slash in rom filenames
Gerd Hoffmann [Wed, 21 Sep 2022 05:30:44 +0000 (07:30 +0200)]
OvmfPkg/QemuBootOrderLib: allow slash in rom filenames

See comment for details.  Needed to avoid the parser abort,
so we can continue parsing the bootorder fw_cfg file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoOvmfPkg/PlatformInitLib: q35 mtrr setup fix
Gerd Hoffmann [Thu, 22 Sep 2022 05:55:30 +0000 (07:55 +0200)]
OvmfPkg/PlatformInitLib: q35 mtrr setup fix

Traditional q35 memory layout is 2.75 GB of low memory, leaving room
for the pcie mmconfig at 0xb0000000 and the 32-bit pci mmio window at
0xc0000000.  Because of that OVMF tags the memory range above
0xb0000000 as uncachable via mtrr.

A while ago qemu started to gigabyte-align memory by default (to make
huge pages more effective) and q35 uses only 2G of low memory in that
case.  Which effectively makes the 32-bit pci mmio window start at
0x80000000.

This patch updates the mtrr setup code accordingly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoUefiPayloadPkg: Provide a wrapper for UniversalPayloadBuild.py
VictorX Hsu [Mon, 26 Sep 2022 10:48:24 +0000 (18:48 +0800)]
UefiPayloadPkg: Provide a wrapper for UniversalPayloadBuild.py

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

Provide a wrapper to wrap UniversalPayloadBuild.py

Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
19 months agoOvmfPkg/PeilessStartupLib: move mPageTablePool to stack
Min M Xu [Tue, 27 Sep 2022 07:07:53 +0000 (15:07 +0800)]
OvmfPkg/PeilessStartupLib: move mPageTablePool to stack

PeilessStartupLib is running in SEC phase. In this phase global variable
is not allowed to be modified. This patch moves mPageTablePool to stack
and pass it as input parameter between functions.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoMdeModulePkg/XhciDxe: Input context update for Evaluate Context command
jdzhang [Wed, 21 Sep 2022 03:05:40 +0000 (11:05 +0800)]
MdeModulePkg/XhciDxe: Input context update for Evaluate Context command

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

Update XhcEvaluateContext/XhcEvaluateContext64 to properly initialize the
input context for Evaluate Context command.

Signed-off-by: jdzhang <jdzhang@kunluntech.com.cn>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
19 months agoIntelFsp2WrapperPkg: Implement FSP 2.4 MultiPhase wrapper handlers.
Chasel Chiu [Wed, 10 Aug 2022 00:35:50 +0000 (17:35 -0700)]
IntelFsp2WrapperPkg: Implement FSP 2.4 MultiPhase wrapper handlers.

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

Implement MultiPhase wrapper handlers and only call to MultiPhase
handlers when FSP supports.

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: Nate DeSimone <nathaniel.l.desimone@intel.com>
19 months agoCryptoPkg/Test: Add unit test for CryptoEc
Yi Li [Sun, 25 Sep 2022 09:26:21 +0000 (17:26 +0800)]
CryptoPkg/Test: Add unit test for CryptoEc

Add unit test for CryptoEc.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add ECC related usage reference
Yi Li [Sun, 25 Sep 2022 09:26:20 +0000 (17:26 +0800)]
CryptoPkg: Add ECC related usage reference

Describes the use cases under which ECC needs to be enabled,
and provides the impact on memory size for developers' reference.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC APIs to DXE and protocol
Yi Li [Sun, 25 Sep 2022 09:26:19 +0000 (17:26 +0800)]
CryptoPkg: Add EC APIs to DXE and protocol

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

The implementation provides CryptEc library functions
for EFI Driveer and EFI BaseCrypt Protocol.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC support
Yi Li [Sun, 25 Sep 2022 09:26:18 +0000 (17:26 +0800)]
CryptoPkg: Add EC support

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

This patch is used to add CryptEc library, which is wrapped
over OpenSSL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()
Yi Li [Mon, 26 Sep 2022 00:24:33 +0000 (08:24 +0800)]
CryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()

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

Fake BIO_snprintf() does not actually print anything to buf,
it should return -1 as error.
0 will be considered a correct return value, the consumer may think that
the buf is valid and parse the buffer.
please refer to bugzilla link for details.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
19 months agoCryptoPkg: Add missing library mappings to DSC file
Michael D Kinney [Fri, 23 Sep 2022 19:45:51 +0000 (12:45 -0700)]
CryptoPkg: Add missing library mappings to DSC file

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

Add SynchronizationLib and MmServicesTableLib mappings that are
required for the CRYPTO_SERVICES set to ALL or MIN_DXE_MIN_SMM
builds.

Also update the family PCD settings for the PACKAGE and ALL
profiles to enable all families.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoEmbeddedPkg/PrePi: Check for enough space before aligning heap pointer
Jeff Brasen [Fri, 23 Sep 2022 15:56:16 +0000 (09:56 -0600)]
EmbeddedPkg/PrePi: Check for enough space before aligning heap pointer

Update check for enough space to occur prior to alignment offset.
This prevents cases where EfiFreeMemoryTop < EfiFreeMemoryBottom.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoDynamicTablesPkg: SSDT CPU _CPC generator
Jeff Brasen [Thu, 22 Sep 2022 20:36:46 +0000 (14:36 -0600)]
DynamicTablesPkg: SSDT CPU _CPC generator

Add code to use a token attached to GICC to generate _CPC object on cpus.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoDynamicTablesPkg: AML Code generation to add _CPC entries
Jeff Brasen [Thu, 22 Sep 2022 20:36:45 +0000 (14:36 -0600)]
DynamicTablesPkg: AML Code generation to add _CPC entries

_CPC entries can describe CPU performance information.
The object is described in ACPI 6.4 s8.4.7.1.
"_CPC (Continuous Performance Control)".

Add AmlCreateCpcNode() helper function to add _CPC entries to an
existing CPU object.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoDynamicTablesPkg: Add CM_ARM_CPC_INFO object
Jeff Brasen [Thu, 22 Sep 2022 20:36:44 +0000 (14:36 -0600)]
DynamicTablesPkg: Add CM_ARM_CPC_INFO object

Introduce the CM_ARM_CPC_INFO CmObj in the ArmNameSpaceObjects.
This allows to describe CPC information, as described in ACPI 6.4,
s8.4.7.1 "_CPC (Continuous Performance Control)".

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib
Minh Nguyen [Mon, 19 Sep 2022 02:19:50 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

In some scenarios, the information of Bios Version, Bios Release
and Embedded Controller Firmware Release are fetched during UEFI
booting. This patch supports updating those fields dynamically
when the PCDs are empty.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2
Minh Nguyen [Mon, 19 Sep 2022 02:19:49 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2

This patch removes redundant updates of "BoardManufacturerType02"
and "SerialNumberType02".

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"
Minh Nguyen [Mon, 19 Sep 2022 02:19:48 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"

This patch fixes typo from "AssertTagType02"
to "AssetTagType02".

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/SmbiosMiscDxe: Support fetching System UUID
Nhi Pham [Mon, 19 Sep 2022 02:19:47 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Support fetching System UUID

This adds an API to OemMiscLib for fetching the system UUID according to
the platform.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
Minh Nguyen [Mon, 19 Sep 2022 02:19:46 +0000 (09:19 +0700)]
ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call

According to "SMC Calling Convention" specification, section 7.4,
return value of Arm Architecture Calls is stored at first argument of
SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating
error or positive values (including zero) indicating success. Positive
value would contain information of respective Function ID (Section 7.3.4
and 7.4.4).

For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES"
Function ID calls read return value from "SmcCallStatus" variable
(Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID"
Function ID call is reading return value from "SmcParam" variable
(Args.Arg1 - second argument of SMC call) so it leads to unexpected
results of "Jep106Code" and "SocRevision". This patch is to correct it.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
Minh Nguyen [Mon, 19 Sep 2022 02:19:45 +0000 (09:19 +0700)]
ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib

In some scenarios, the processor version may be updated dynamically
from pre-UEFI firmware during booting. But the processor version is
fixed with PCD (PcdProcessorVersion), so it can not be updated it
dynamically. This patch will support setting that value both
statically and dynamically.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoCryptoPkg/OpensslLib: Update generated files for native X64
Christopher Zurcher [Wed, 21 Sep 2022 20:25:41 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Update generated files for native X64

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/OpensslLib: Commit the auto-generated assembly files for IA32
Christopher Zurcher [Wed, 21 Sep 2022 20:25:40 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Commit the auto-generated assembly files for IA32

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

Adding the auto-generated assembly files for IA32 architectures.

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/OpensslLib: Add native instruction support for IA32
Christopher Zurcher [Wed, 21 Sep 2022 20:25:39 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Add native instruction support for IA32

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

Adding native instruction support for accelerated OpenSSL features for
IA32 architecture, following the pattern set by the previous commits for
X64 native support.

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/Test: Add unit test for CryptoBn
Yi Li [Thu, 12 May 2022 09:10:16 +0000 (17:10 +0800)]
CryptoPkg/Test: Add unit test for CryptoBn

Add unit test for CryptoBn.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add BigNum API to DXE and protocol
Yi Li [Wed, 7 Sep 2022 08:14:35 +0000 (16:14 +0800)]
CryptoPkg: Add BigNum API to DXE and protocol

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

The implementation provides CryptBn library functions
for EFI Driver and EFI BaseCrypt Protocol.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add BigNum support
Yi Li [Wed, 7 Sep 2022 08:12:00 +0000 (16:12 +0800)]
CryptoPkg: Add BigNum support

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

This patch is used to add CryptBn library, which is wrapped
over OpenSSL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add UnitTest for AeadAesGcm.
Qi Zhang [Fri, 23 Sep 2022 06:32:01 +0000 (14:32 +0800)]
CryptoPkg: add UnitTest for AeadAesGcm.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add AeadAesGcm to Crypto Service.
Qi Zhang [Fri, 23 Sep 2022 06:32:00 +0000 (14:32 +0800)]
CryptoPkg: add AeadAesGcm to Crypto Service.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>