* [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
@ 2022-07-22 7:01 paytonx.hsieh
2022-07-25 15:28 ` Guo Dong
0 siblings, 1 reply; 3+ messages in thread
From: paytonx.hsieh @ 2022-07-22 7:01 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=4006
Add CRYPTO_PROTOCOL_SUPPORT to decide CryptoDxe built into UPL.efi
If CRYPTO_PROTOCOL_SUPPORT is true, BIOS will use crypto protocol
instead of building OpensslLib into drivers.
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 | 10 ++++++++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
2 files changed, 12 insertions(+)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 5e947526b7..862d440b16 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -39,6 +39,7 @@
DEFINE ATA_ENABLE = TRUE
DEFINE SD_ENABLE = TRUE
DEFINE PS2_MOUSE_ENABLE = TRUE
+ DEFINE CRYPTO_PROTOCOL_SUPPORT = FALSE
DEFINE SD_MMC_TIMEOUT = 1000000
#
@@ -189,8 +190,13 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
+!else
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+ TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
+!endif
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
@@ -421,6 +427,7 @@
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000
+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
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
@@ -443,6 +450,7 @@
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
+!endif
[PcdsPatchableInModule.X64]
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
@@ -764,11 +772,13 @@
#
# Misc
#
+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
CryptoPkg/Driver/CryptoDxe.inf {
<LibraryClasses>
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
}
+!endif
#------------------------------
# Build the shell
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 5c055e61b3..afdd6447a7 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -99,7 +99,9 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
INF CryptoPkg/Driver/CryptoDxe.inf
+!endif
!if $(SECURITY_STUB_ENABLE) == TRUE
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
!endif
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
2022-07-22 7:01 [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver paytonx.hsieh
@ 2022-07-25 15:28 ` Guo Dong
2022-07-25 15:45 ` Hsieh, PaytonX
0 siblings, 1 reply; 3+ messages in thread
From: Guo Dong @ 2022-07-25 15:28 UTC (permalink / raw)
To: Hsieh, PaytonX, devel@edk2.groups.io; +Cc: Ni, Ray, Lu, James, Guo, Gua
Reviewed-by: Guo Dong <guo.dong@intel.com>
-----Original Message-----
From: Hsieh, PaytonX <paytonx.hsieh@intel.com>
Sent: Friday, July 22, 2022 12:02 AM
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] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
From: PaytonX Hsieh <paytonx.hsieh@intel.com>
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4006
Add CRYPTO_PROTOCOL_SUPPORT to decide CryptoDxe built into UPL.efi If CRYPTO_PROTOCOL_SUPPORT is true, BIOS will use crypto protocol instead of building OpensslLib into drivers.
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 | 10 ++++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
2 files changed, 12 insertions(+)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 5e947526b7..862d440b16 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -39,6 +39,7 @@
DEFINE ATA_ENABLE = TRUE DEFINE SD_ENABLE = TRUE DEFINE PS2_MOUSE_ENABLE = TRUE+ DEFINE CRYPTO_PROTOCOL_SUPPORT = FALSE DEFINE SD_MMC_TIMEOUT = 1000000 #@@ -189,8 +190,13 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf+!else+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf+ TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf+!endif IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf@@ -421,6 +427,7 @@
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE) gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000 +!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE 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@@ -443,6 +450,7 @@
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+!endif [PcdsPatchableInModule.X64] gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)@@ -764,11 +772,13 @@
# # Misc #+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE CryptoPkg/Driver/CryptoDxe.inf { <LibraryClasses> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf }+!endif #------------------------------ # Build the shelldiff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 5c055e61b3..afdd6447a7 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -99,7 +99,9 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf +!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE INF CryptoPkg/Driver/CryptoDxe.inf+!endif !if $(SECURITY_STUB_ENABLE) == TRUE INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
2022-07-25 15:28 ` Guo Dong
@ 2022-07-25 15:45 ` Hsieh, PaytonX
0 siblings, 0 replies; 3+ messages in thread
From: Hsieh, PaytonX @ 2022-07-25 15:45 UTC (permalink / raw)
To: Dong, Guo, devel@edk2.groups.io; +Cc: Ni, Ray, Lu, James, Guo, Gua
PR create : https://github.com/tianocore/edk2/pull/3138
-----Original Message-----
From: Dong, Guo <guo.dong@intel.com>
Sent: Monday, July 25, 2022 11:29 PM
To: Hsieh, PaytonX <paytonx.hsieh@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
Reviewed-by: Guo Dong <guo.dong@intel.com>
-----Original Message-----
From: Hsieh, PaytonX <paytonx.hsieh@intel.com>
Sent: Friday, July 22, 2022 12:02 AM
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] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver
From: PaytonX Hsieh <paytonx.hsieh@intel.com>
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4006
Add CRYPTO_PROTOCOL_SUPPORT to decide CryptoDxe built into UPL.efi If CRYPTO_PROTOCOL_SUPPORT is true, BIOS will use crypto protocol instead of building OpensslLib into drivers.
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 | 10 ++++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
2 files changed, 12 insertions(+)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 5e947526b7..862d440b16 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -39,6 +39,7 @@
DEFINE ATA_ENABLE = TRUE DEFINE SD_ENABLE = TRUE DEFINE PS2_MOUSE_ENABLE = TRUE+ DEFINE CRYPTO_PROTOCOL_SUPPORT = FALSE DEFINE SD_MMC_TIMEOUT = 1000000 #@@ -189,8 +190,13 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf+!else+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf+ TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf+!endif IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf@@ -421,6 +427,7 @@
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE) gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000 +!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE 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@@ -443,6 +450,7 @@
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+!endif [PcdsPatchableInModule.X64] gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)@@ -764,11 +772,13 @@
# # Misc #+!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE CryptoPkg/Driver/CryptoDxe.inf { <LibraryClasses> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf }+!endif #------------------------------ # Build the shelldiff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 5c055e61b3..afdd6447a7 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -99,7 +99,9 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf +!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE INF CryptoPkg/Driver/CryptoDxe.inf+!endif !if $(SECURITY_STUB_ENABLE) == TRUE INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-25 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-22 7:01 [PATCH] UefiPayloadPkg: Add macro to support selection of CryptoDxe driver paytonx.hsieh
2022-07-25 15:28 ` Guo Dong
2022-07-25 15:45 ` Hsieh, PaytonX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox