Skip to content

Commit a8817e5

Browse files
committed
QemuSbsaPkg: Wire up OneCrypto binary drivers
Update QemuSbsaPkg DSC and FDF to use OneCrypto binary drivers instead of autogenerated shared crypto include files. Map BaseCryptLib to BaseCryptLibOnOneCrypto for DXE and StandaloneMM phases, and include OneCrypto loader and binary drivers in the FDF. Signed-off-by: Doug Flick <dougflick@microsoft.com>
1 parent d2fa7c6 commit a8817e5

File tree

2 files changed

+52
-11
lines changed

2 files changed

+52
-11
lines changed

Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,19 @@
7575
DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
7676
DEFINE NETWORK_ISCSI_ENABLE = FALSE
7777

78+
# PEI uses BaseCrypto (OneCrypto doesn't have PEI support yet)
7879
PEI_CRYPTO_SERVICES = TINY_SHA
79-
DXE_CRYPTO_SERVICES = STANDARD
80-
RUNTIMEDXE_CRYPTO_SERVICES = NONE
81-
STANDALONEMM_CRYPTO_SERVICES = STANDARD
82-
STANDALONEMM_MMSUPV_CRYPTO_SERVICES = NONE
83-
SMM_CRYPTO_SERVICES = NONE
8480
PEI_CRYPTO_ARCH = AARCH64
85-
DXE_CRYPTO_ARCH = AARCH64
81+
# DXE and StandaloneMM use OneCrypto - set to NONE to skip BaseCrypto drivers
82+
DXE_CRYPTO_SERVICES = NONE
83+
DXE_CRYPTO_ARCH = NONE
84+
RUNTIMEDXE_CRYPTO_SERVICES = NONE
8685
RUNTIMEDXE_CRYPTO_ARCH = NONE
87-
STANDALONEMM_CRYPTO_ARCH = AARCH64
86+
STANDALONEMM_CRYPTO_SERVICES = NONE
87+
STANDALONEMM_CRYPTO_ARCH = NONE
88+
STANDALONEMM_MMSUPV_CRYPTO_SERVICES = NONE
8889
STANDALONEMM_MMSUPV_CRYPTO_ARCH = NONE
90+
SMM_CRYPTO_SERVICES = NONE
8991
SMM_CRYPTO_ARCH = NONE
9092

9193
!if $(NETWORK_SNP_ENABLE) == TRUE
@@ -384,6 +386,9 @@
384386

385387
[LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.UEFI_APPLICATION]
386388
ArmFfaLib|MdeModulePkg/Library/ArmFfaLib/ArmFfaDxeLib.inf
389+
# OneCrypto library for DXE drivers and UEFI applications
390+
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/DxeCryptLib.inf
391+
TlsLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/DxeCryptLib.inf
387392

388393
[LibraryClasses.common.UEFI_APPLICATION]
389394
CheckHwErrRecHeaderLib|MsWheaPkg/Library/CheckHwErrRecHeaderLib/CheckHwErrRecHeaderLib.inf
@@ -442,6 +447,9 @@
442447
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
443448
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
444449
ResetSystemLib|MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.inf
450+
# OneCrypto library for runtime drivers
451+
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/DxeCryptLib.inf
452+
TlsLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/DxeCryptLib.inf
445453

446454
[LibraryClasses.common.MM_CORE_STANDALONE]
447455
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
@@ -473,6 +481,9 @@
473481
VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
474482
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
475483
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
484+
# OneCrypto library for StandaloneMM - uses gOneCryptoProtocolGuid
485+
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/StandaloneMmCryptLib.inf
486+
TlsLib|CryptoPkg/Library/BaseCryptLibOnOneCrypto/StandaloneMmCryptLib.inf
476487

477488
VirtNorFlashPlatformLib|QemuSbsaPkg/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
478489
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
@@ -900,6 +911,26 @@
900911
[Components]
901912
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.inc.dsc
902913

914+
#
915+
# OneCrypto Binary Drivers
916+
#
917+
$(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoLoaders/OneCryptoLoaderDxe.inf {
918+
<PcdsPatchableInModule>
919+
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
920+
}
921+
$(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoLoaders/OneCryptoLoaderStandaloneMm.inf {
922+
<PcdsPatchableInModule>
923+
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
924+
}
925+
$(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoBin/OneCryptoBinStandaloneMm.inf {
926+
<PcdsPatchableInModule>
927+
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
928+
}
929+
$(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoBin/OneCryptoBinDxe.inf {
930+
<PcdsPatchableInModule>
931+
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
932+
}
933+
903934
#
904935
# SEC Phase module
905936
#
@@ -1176,7 +1207,7 @@
11761207
## Where-Object {(Select-String -InputObject $_ -Pattern "MODULE_TYPE\s*=\s*UEFI_APPLICATION")} | ^
11771208
## ForEach-Object {$path = $_.FullName -replace '\\','/'; Write-Output $path}
11781209
!if $(BUILD_UNIT_TESTS) == TRUE
1179-
1210+
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTestApp.inf
11801211
AdvLoggerPkg/UnitTests/LineParser/LineParserTestApp.inf
11811212
DfciPkg/UnitTests/DeviceIdTest/DeviceIdTestApp.inf
11821213
# DfciPkg/UnitTests/DfciVarLockAudit/UEFI/DfciVarLockAuditTestApp.inf # DOESN'T PRODUCE OUTPUT

Platforms/QemuSbsaPkg/QemuSbsaPkg.fdf

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ READ_LOCK_STATUS = TRUE
233233
INF UefiTestingPkg/FunctionalSystemTests/MpManagement/Driver/MpManagement.inf
234234
INF UefiTestingPkg/FunctionalSystemTests/MpManagement/App/MpManagementTestApp.inf
235235

236-
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.DXE.inc.fdf
237-
236+
#
237+
# OneCrypto DXE Driver
238+
#
239+
INF $(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoLoaders/OneCryptoLoaderDxe.inf
240+
INF $(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoBin/OneCryptoBinDxe.inf
241+
238242
#
239243
# Multiple Console IO support
240244
#
@@ -521,7 +525,13 @@ READ_LOCK_CAP = TRUE
521525
READ_LOCK_STATUS = TRUE
522526

523527
INF StandaloneMmPkg/Core/StandaloneMmCore.inf
524-
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.STANDALONEMM.inc.fdf
528+
529+
#
530+
# OneCrypto StandaloneMM Drivers
531+
#
532+
INF $(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoLoaders/OneCryptoLoaderStandaloneMm.inf
533+
INF $(ONE_CRYPTO_PATH)/$(TARGET)/AARCH64/OneCryptoBin/OneCryptoBinStandaloneMm.inf
534+
525535
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.inf
526536
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
527537
INF QemuSbsaPkg/VirtNorFlashStandaloneMm/VirtNorFlashStandaloneMm.inf

0 commit comments

Comments
 (0)