Skip to content

Commit

Permalink
PR Update: Only support MM Supervisor Standalone MM on X64
Browse files Browse the repository at this point in the history
  • Loading branch information
makubacki committed Dec 10, 2024
1 parent 1aee275 commit 793842a
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 241 deletions.
3 changes: 2 additions & 1 deletion CryptoBinPkg/CryptoBinPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
FILE_GUID = $(RUNTIMEDXE_CRYPTO_DRIVER_FILE_GUID)
}

[Components.AARCH64, Components.X64]
[Components.X64]
# Note: MmSupervisorPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf has instructions
# that are not supported in 32-bit. Only 64-bit is practically needed, so only build for 64-bit here.
CryptoBinPkg/Driver/CryptoMmSupervisorStandaloneMm.inf {
Expand All @@ -245,6 +245,7 @@
gEfiMdePkgTokenSpaceGuid.PcdStackCookieExceptionVector|0x0F
}

[Components.AARCH64, Components.X64]
# Note: Only 64-bit is practically needed, so only build for 64-bit here.
CryptoBinPkg/Driver/CryptoStandaloneMm.inf {
<Defines>
Expand Down
26 changes: 2 additions & 24 deletions CryptoBinPkg/Driver/Bin/CryptoDriver.inc.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# AUTOGENERATED BY CryptoBinPkg\Driver\Packaging\generate_cryptodriver.py
# AUTOGENED AS CryptoDriver.inc.dsc
# DO NOT MODIFY
# GENERATED ON: 2024-12-10 14:11:00.374706
# GENERATED ON: 2024-12-10 18:09:09.623528

# this is to be included by a platform :)
[Defines]
Expand Down Expand Up @@ -181,10 +181,6 @@
[Components.X64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_TINY_SHA_StandaloneMm_MmSupv_$(TARGET)_X64.inf
!endif
!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == AARCH64
[Components.AARCH64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_TINY_SHA_StandaloneMm_MmSupv_$(TARGET)_AARCH64.inf
!endif

[Components]
CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf {
Expand Down Expand Up @@ -295,10 +291,6 @@
[Components.X64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_MINIMAL_SHA_SM3_StandaloneMm_MmSupv_$(TARGET)_X64.inf
!endif
!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == AARCH64
[Components.AARCH64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_MINIMAL_SHA_SM3_StandaloneMm_MmSupv_$(TARGET)_AARCH64.inf
!endif

[Components]
CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf {
Expand Down Expand Up @@ -409,10 +401,6 @@
[Components.X64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_SMALL_SHA_RSA_StandaloneMm_MmSupv_$(TARGET)_X64.inf
!endif
!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == AARCH64
[Components.AARCH64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_SMALL_SHA_RSA_StandaloneMm_MmSupv_$(TARGET)_AARCH64.inf
!endif

[Components]
CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf {
Expand Down Expand Up @@ -523,10 +511,6 @@
[Components.X64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_STANDARD_StandaloneMm_MmSupv_$(TARGET)_X64.inf
!endif
!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == AARCH64
[Components.AARCH64]
$(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriverBin_STANDARD_StandaloneMm_MmSupv_$(TARGET)_AARCH64.inf
!endif

[Components]
CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf {
Expand Down Expand Up @@ -621,13 +605,7 @@
!endif

!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == X64
[LibraryClasses.X64.]
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf
TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf
!endif

!if $(STANDALONEMM_MMSUPV_CRYPTO_ARCH) == AARCH64
[LibraryClasses.AARCH64.]
[LibraryClasses.X64.MM_STANDALONE, LibraryClasses.X64.MM_CORE_STANDALONE]
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf
TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/StandaloneMmCryptLib.inf
!endif
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions CryptoBinPkg/Driver/Packaging/generate_cryptodriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ class options():
continue
if arch in ["ARM","IA32"] and "StandaloneMm" in phase:
continue
if arch == "AARCH64" and phase == "StandaloneMm_MmSupv":
continue
inf_files.append((flavor, phase, target, arch))
print(f"Generating {len(inf_files)} inf files")
# first delete any files that we don't need
Expand Down Expand Up @@ -848,6 +850,8 @@ class options():
continue
if arch in ["ARM","AARCH64"] and phase == "Smm":
continue
if arch == "AARCH64" and phase == "StandaloneMm_MmSupv":
continue
comp_str = f"Components.{arch}"
dsc_lines.append(
f" !if $({upper_phase}_CRYPTO_ARCH) == {arch}")
Expand Down Expand Up @@ -877,6 +881,8 @@ class options():
continue
if arch in ["ARM","AARCH64"] and phase == "Smm":
continue
if arch == "AARCH64" and phase == "StandaloneMm_MmSupv":
continue
dsc_lines.append(f"!if $({upper_phase}_CRYPTO_ARCH) == {arch}")
lib_class_str = ", ".join(map(lambda x: ".".join(
["LibraryClasses", arch, x.upper()]), comp_types))
Expand Down
3 changes: 3 additions & 0 deletions CryptoBinPkg/Driver/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ the process.
- [`StandaloneMmPkg`](https://github.com/tianocore/edk2/tree/master/StandaloneMmPkg/Core) - Use `STANDALONEMM_CRYPTO_SERVICES`
- [`MmSupervisorPkg`](https://github.com/microsoft/mu_feature_mm_supv/tree/main/MmSupervisorPkg/Core) - Use `STANDALONEMM_MMSUPV_CRYPTO_SERVICES`

Since the MM Supervisor currently does not support `AARCH64`, only a `X64` MM Supervisor Standalone MM binary is
available.

3. Add the DSC include

```ini
Expand Down

0 comments on commit 793842a

Please sign in to comment.