* [PATCH v2] UefiPayloadPkg: Add CryptoDxe driver to UefiPayload
@ 2022-07-07 8:52 paytonx.hsieh
2022-07-07 9:52 ` Ni, Ray
0 siblings, 1 reply; 2+ messages in thread
From: paytonx.hsieh @ 2022-07-07 8:52 UTC (permalink / raw)
To: devel; +Cc: PaytonX Hsieh, Guo Dong, Ray Ni, James Lu, Gua Guo
From: PaytonX Hsieh <paytonx.hsieh@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3979
Add CryptoDxe into UPL.
Drviers can locate protocol instead of building openssl lib into drivers.
This can reduce the binary size that UPL required.
Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: PaytonX Hsieh <paytonx.hsieh@intel.com>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 36 ++++++++++++++++++--
UefiPayloadPkg/UefiPayloadPkg.fdf | 1 +
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..2428bb2ce9 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -180,8 +180,8 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
+ TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
@@ -412,6 +412,29 @@
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Md5.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Dh.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Random.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha384.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha512.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tdes.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.GetContextSize | TRUE
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.Init | TRUE
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcEncrypt | TRUE
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcDecrypt | TRUE
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Arc4.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sm3.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Hkdf.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tls.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsSet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+ gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsGet.Family | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+
[PcdsPatchableInModule.X64]
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
@@ -719,6 +742,15 @@
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
!endif
+ #
+ # Misc
+ #
+ CryptoPkg/Driver/CryptoDxe.inf {
+ <LibraryClasses>
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+ TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
+ }
+
#------------------------------
# Build the shell
#------------------------------
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index c7b04978ad..7087f5bd75 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -99,6 +99,7 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+INF CryptoPkg/Driver/CryptoDxe.inf
!if $(SECURITY_STUB_ENABLE) == TRUE
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
!endif
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] UefiPayloadPkg: Add CryptoDxe driver to UefiPayload
2022-07-07 8:52 [PATCH v2] UefiPayloadPkg: Add CryptoDxe driver to UefiPayload paytonx.hsieh
@ 2022-07-07 9:52 ` Ni, Ray
0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ray @ 2022-07-07 9:52 UTC (permalink / raw)
To: Hsieh, PaytonX, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James, Guo, Gua
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Hsieh, PaytonX <paytonx.hsieh@intel.com>
> Sent: Thursday, July 7, 2022 4:52 PM
> To: devel@edk2.groups.io
> Cc: Hsieh, PaytonX <paytonx.hsieh@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Lu,
> James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>
> Subject: [PATCH v2] UefiPayloadPkg: Add CryptoDxe driver to UefiPayload
>
> From: PaytonX Hsieh <paytonx.hsieh@intel.com>
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3979
>
> Add CryptoDxe into UPL.
> Drviers can locate protocol instead of building openssl lib into drivers.
> This can reduce the binary size that UPL required.
>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: James Lu <james.lu@intel.com>
> Cc: Gua Guo <gua.guo@intel.com>
> Signed-off-by: PaytonX Hsieh <paytonx.hsieh@intel.com>
> ---
> UefiPayloadPkg/UefiPayloadPkg.dsc | 36 ++++++++++++++++++--
> UefiPayloadPkg/UefiPayloadPkg.fdf | 1 +
> 2 files changed, 35 insertions(+), 2 deletions(-)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index cfcf38578d..2428bb2ce9 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -180,8 +180,8 @@
> CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
>
> SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
>
> DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
>
> - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>
> - TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
>
> + BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
>
> + TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
>
> IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
>
> OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
>
> RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
>
> @@ -412,6 +412,29 @@
> gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)
>
> gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000
>
>
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Md5.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Dh.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Random.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Rsa.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha384.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha512.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.X509.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tdes.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.GetContextSize | TRUE
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.Init | TRUE
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcEncrypt | TRUE
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Aes.Services.CbcDecrypt | TRUE
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Arc4.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sm3.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Hkdf.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Tls.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsSet.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> + gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.TlsGet.Family |
> PCD_CRYPTO_SERVICE_ENABLE_FAMILY
>
> +
>
> [PcdsPatchableInModule.X64]
>
> gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
>
> gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
>
> @@ -719,6 +742,15 @@
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
>
> !endif
>
>
>
> + #
>
> + # Misc
>
> + #
>
> + CryptoPkg/Driver/CryptoDxe.inf {
>
> + <LibraryClasses>
>
> + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>
> + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
>
> + }
>
> +
>
> #------------------------------
>
> # Build the shell
>
> #------------------------------
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
> index c7b04978ad..7087f5bd75 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -99,6 +99,7 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
>
> INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
>
>
>
> +INF CryptoPkg/Driver/CryptoDxe.inf
>
> !if $(SECURITY_STUB_ENABLE) == TRUE
>
> INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>
> !endif
>
> --
> 2.28.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-07 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07 8:52 [PATCH v2] UefiPayloadPkg: Add CryptoDxe driver to UefiPayload paytonx.hsieh
2022-07-07 9:52 ` Ni, Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox