Skip to content

Commit 409d8e2

Browse files
authored
Correct checks for StMm and Stmm_Supv conflicts. (#117)
## Description Added $() around parameters for new checks in Stmm and StmmSupv includes. Was resulting in always throwing an error because evaluation was two static values. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested After changing, manually examined output ## Integration Instructions No integration required.
1 parent 97eb41d commit 409d8e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CryptoBinPkg/Driver/Packaging/generate_cryptodriver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,15 +902,15 @@ class options():
902902
fdf_bb_lines = []
903903
fdf_bb_lines.append(
904904
f"# include this in the platform {upper_phase} FV")
905-
fdf_bb_lines.append(f"!ifndef {upper_phase}_CRYPTO_SERVICES")
905+
fdf_bb_lines.append(f"!ifndef $({upper_phase}_CRYPTO_SERVICES)")
906906
fdf_bb_lines.append(f"!error You need to define {upper_phase}_CRYPTO_SERVICES")
907907
fdf_bb_lines.append("!endif")
908908
if phase in {"StandaloneMm", "StandaloneMm_MmSupv"}:
909-
fdf_bb_lines.append(f"!if {upper_phase}_CRYPTO_SERVICES == NONE")
909+
fdf_bb_lines.append(f"!if $({upper_phase}_CRYPTO_SERVICES) == NONE")
910910
fdf_bb_lines.append(f"!error You included CryptoDriver.{upper_phase}.inc.fdf but {upper_phase}_CRYPTO_SERVICES is set to NONE.")
911911
fdf_bb_lines.append("!endif")
912912
other_mm_phase_upper = ({"StandaloneMm", "StandaloneMm_MmSupv"} - {phase}).pop().upper()
913-
fdf_bb_lines.append(f"!if {other_mm_phase_upper}_CRYPTO_SERVICES != NONE")
913+
fdf_bb_lines.append(f"!if $({other_mm_phase_upper}_CRYPTO_SERVICES) != NONE")
914914
fdf_bb_lines.append(f"!error You included CryptoDriver.{upper_phase}.inc.fdf but {other_mm_phase_upper}_CRYPTO_SERVICES is not set to NONE. These are mutually exclusive.")
915915
fdf_bb_lines.append("!endif")
916916
for flavor in flavors:

0 commit comments

Comments
 (0)