Skip to content

Commit ace7fc0

Browse files
authored
Q35: Remove NO_SMM support. (#1323)
## Description Drop support for NO_SMM builds of Q35. The NO_SMM builds of Q35 increase pipeline build time and are not widely used. Remove the pipeline build, and remove the associated code added to support this configuraiton. - [ ] Impacts functionality? - [ ] Impacts security? - [X] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested Local compile an boot to OS. ## Integration Instructions No integration necessary.
1 parent c89bfff commit ace7fc0

File tree

8 files changed

+4
-79
lines changed

8 files changed

+4
-79
lines changed

.azurepipelines/Platform-Build-GCC5.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ jobs:
116116
**/*/*TestApp.efi
117117
BuildArtifactsOther: "**/unit_test_results/*"
118118

119-
QemuQ35_NO_SMM_RELEASE:
120-
BuildPackage: QemuQ35Pkg
121-
BuildFile: "Platforms/QemuQ35Pkg/PlatformBuild.py"
122-
BuildFlags: "BLD_*_SMM_ENABLED=FALSE"
123-
BuildTarget: "RELEASE"
124-
BuildExtraTag: "NO_SMM"
125-
BuildExtraStep:
126-
- script: echo No extra steps provided
127-
Run: true
128-
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
129-
BuildArtifactsBinary: |
130-
**/QEMUQ35_*.fd
131-
BuildArtifactsOther: ""
132-
133119
QemuSbsa_DEBUG:
134120
BuildPackage: QemuSbsaPkg
135121
BuildFile: "Platforms/QemuSbsaPkg/PlatformBuild.py"

.azurepipelines/Platform-Build-VS.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,6 @@ jobs:
113113
**/*/*TestApp.efi
114114
BuildArtifactsOther: "**/unit_test_results/*"
115115

116-
QemuQ35_NO_SMM_RELEASE:
117-
BuildPackage: QemuQ35Pkg
118-
BuildFile: "Platforms/QemuQ35Pkg/PlatformBuild.py"
119-
BuildFlags: "BLD_*_SMM_ENABLED=FALSE"
120-
BuildTarget: "RELEASE"
121-
BuildExtraTag: "NO_SMM"
122-
BuildExtraStep:
123-
- script: echo No extra steps provided
124-
Run: true
125-
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
126-
BuildArtifactsBinary: |
127-
**/QEMUQ35_*.fd
128-
BuildArtifactsOther: ""
129-
130116
QemuQ35_CODE_COVERAGE:
131117
BuildPackage: QemuQ35Pkg
132118
BuildFile: "Platforms/QemuQ35Pkg/Test/PlatformTest.py"

DfciDutFiles/BuildDfci.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
args = " BLD_*_GUI_FRONT_PAGE=TRUE"
1919
args += " BLD_*_NETWORK_ALLOW_HTTP_CONNECTIONS=TRUE"
2020
args += " BLD_*_QEMU_CORE_NUM=4"
21-
args += " BLD_*_SMM_ENABLED=TRUE"
2221
args += " --clean"
2322

2423
cmd = platformbuild + args

DfciDutFiles/RunDfci.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
args += " ALT_BOOT_ENABLE=TRUE"
6161

6262
args += " BLD_*_QEMU_CORE_NUM=4"
63-
args += " BLD_*_SMM_ENABLED=TRUE"
6463

6564
cmd = platformbuild + args
6665
os.system(cmd)

Platforms/QemuQ35Pkg/PlatformBuild.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,6 @@ def SetPlatformEnv(self):
311311
# Note: This has no impact if CodeQL is not active/enabled.
312312
self.env.SetValue("STUART_CODEQL_AUDIT_ONLY", "true", "Platform Defined")
313313

314-
# Enabled all of the SMM modules
315-
self.env.SetValue("BLD_*_SMM_ENABLED", "TRUE", "Default")
316-
317314
if self.Helper.generate_secureboot_pcds(self) != 0:
318315
logging.error("Failed to generate include PCDs")
319316
return -1

Platforms/QemuQ35Pkg/Plugins/QemuRunner/QemuRunner.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ def Runner(env):
7474
# Turn off S3 support
7575
args += " -global ICH9-LPC.disable_s3=1"
7676

77-
if env.GetBuildValue("SMM_ENABLED") is None or env.GetBuildValue("SMM_ENABLED").lower() == "true":
78-
smm_enabled = "on"
79-
else:
80-
smm_enabled = "off"
81-
8277
accel = ""
8378
if env.GetValue("QEMU_ACCEL") is not None:
8479
if env.GetValue("QEMU_ACCEL").lower() == "kvm":
@@ -88,7 +83,7 @@ def Runner(env):
8883
elif env.GetValue("QEMU_ACCEL").lower() == "whpx":
8984
accel = ",accel=whpx"
9085

91-
args += " -machine q35,smm=" + smm_enabled + accel
86+
args += " -machine q35,smm=on" + accel
9287
path_to_os = env.GetValue("PATH_TO_OS")
9388
if path_to_os is not None:
9489
# Potentially dealing with big daddy, give it more juice...
@@ -125,8 +120,7 @@ def Runner(env):
125120

126121
if env.GetBuildValue ("QEMU_CORE_NUM") is not None:
127122
args += " -smp " + env.GetBuildValue ("QEMU_CORE_NUM")
128-
if smm_enabled == "on":
129-
args += " -global driver=cfi.pflash01,property=secure,value=on"
123+
args += " -global driver=cfi.pflash01,property=secure,value=on"
130124

131125
code_fd = os.path.join(OutputPath_FV, "QEMUQ35_CODE.fd")
132126
args += " -drive if=pflash,format=raw,unit=0,file=" + \

Platforms/QemuQ35Pkg/QemuQ35Pkg.fdf

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,8 @@ INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
237237
INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
238238
INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
239239

240-
!if $(SMM_ENABLED) == TRUE
241240
INF QemuQ35Pkg/SmmAccess/SmmAccessPei.inf
242241
INF MmSupervisorPkg/Drivers/MmCommunicationBuffer/MmCommunicationBufferPei.inf
243-
!endif
244242

245243
INF UefiCpuPkg/CpuMpPei/CpuMpPei.inf
246244

@@ -438,7 +436,6 @@ INF QemuQ35Pkg/QemuVideoDxe/QemuVideoDxe.inf
438436
INF QemuQ35Pkg/QemuRamfbDxe/QemuRamfbDxe.inf
439437
INF QemuQ35Pkg/IoMmuDxe/IoMmuDxe.inf
440438

441-
!if $(SMM_ENABLED) == TRUE
442439
INF QemuQ35Pkg/SmmControl2Dxe/SmmControl2Dxe.inf
443440
INF QemuQ35Pkg/SmmAccess/SmmAccess2Dxe.inf
444441
!if $(PEI_MM_IPL_ENABLED) == TRUE
@@ -452,20 +449,14 @@ INF QemuQ35Pkg/SmmAccess/SmmAccess2Dxe.inf
452449
!endif
453450
INF MmSupervisorPkg/Core/MmSupervisorCore.inf
454451
INF UefiCpuPkg/CpuIo2Smm/CpuIo2StandaloneMm.inf
455-
!endif
456452

457453
#
458454
# Variable driver stack (SMM)
459455
#
460-
!if $(SMM_ENABLED) == TRUE
461456
INF QemuQ35Pkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesStandaloneMm.inf
462457
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.inf
463458
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
464459
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
465-
!else
466-
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
467-
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
468-
!endif
469460

470461
#
471462
# TPM support
@@ -495,13 +486,11 @@ INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSta
495486
INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceStandaloneMm.inf
496487
INF MsCorePkg/MuVarPolicyFoundationDxe/MuVarPolicyFoundationDxe.inf
497488
INF MsCorePkg/LoadOptionVariablePolicyDxe/LoadOptionVariablePolicyDxe.inf
498-
!if $(SMM_ENABLED) == TRUE
499489
INF MmSupervisorPkg/Drivers/MmSupervisorRing3Broker/MmSupervisorRing3Broker.inf
500490
INF MmSupervisorPkg/Drivers/StandaloneMmUnblockMem/StandaloneMmUnblockMem.inf
501491
!if $(PERF_TRACE_ENABLE) == TRUE
502492
INF MmSupervisorPkg/Drivers/MmSupervisorRing3Performance/MmSupervisorRing3Performance.inf
503493
!endif
504-
!endif
505494
# INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
506495
# COMMENTED OUT DUE TO LACK OF TPM
507496
# INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
@@ -512,18 +501,12 @@ INF MsGraphicsPkg/PrintScreenLogger/PrintScreenLogger.inf
512501
INF SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf
513502
INF MsCorePkg/AcpiRGRT/AcpiRgrt.inf
514503

515-
!if $(SMM_ENABLED) == TRUE
516504
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.DXE.inc.fdf
517505
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.STANDALONEMM_MMSUPV.inc.fdf
518-
!else
519-
!include $(SHARED_CRYPTO_PATH)/Driver/Bin/CryptoDriver.RUNTIMEDXE.inc.fdf
520-
!endif
521506

522507
!if $(BUILD_UNIT_TESTS) == TRUE
523508
# INF UefiTestingPkg/FunctionalSystemTests/SmmPagingProtectionsTest/Smm/SmmPagingProtectionsTestStandaloneMm.inf # NOT YET SUPPORTED
524-
!if $(SMM_ENABLED) == TRUE
525509
INF MmSupervisorPkg/Test/MmPagingAuditTest/UEFI/MmPagingAuditApp.inf
526-
!endif
527510
# INF UefiTestingPkg/AuditTests/PagingAudit/UEFI/DxePagingAuditDriver.inf
528511
!endif
529512

@@ -564,9 +547,7 @@ FILE FREEFORM = PCD(gZeroTouchPkgTokenSpaceGuid.PcdZeroTouchCertificateFile) {
564547
INF MsGraphicsPkg/OnScreenKeyboardDxe/OnScreenKeyboardDxe.inf
565548
INF MsGraphicsPkg/SimpleWindowManagerDxe/SimpleWindowManagerDxe.inf
566549
INF AdvLoggerPkg/Application/AdvancedLogDumper/AdvancedLogDumper.inf
567-
!if $(SMM_ENABLED) == TRUE
568550
INF MmSupervisorPkg/Drivers/MmSupervisorErrorReport/MmSupervisorErrorReport.inf
569-
!endif
570551
FILE APPLICATION=PCD(gPcBdsPkgTokenSpaceGuid.PcdShellFile) {
571552
SECTION PE32=$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/X64/Shell.efi
572553
SECTION UI= "EdkShell"

Platforms/QemuQ35Pkg/QemuQ35PkgCommon.dsc.inc

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@
4747

4848
PEI_CRYPTO_SERVICES = TINY_SHA
4949
DXE_CRYPTO_SERVICES = STANDARD
50-
RUNTIMEDXE_CRYPTO_SERVICES = STANDARD
5150
SMM_CRYPTO_SERVICES = NONE
5251
STANDALONEMM_CRYPTO_SERVICES = NONE
5352
STANDALONEMM_MMSUPV_CRYPTO_SERVICES = STANDARD
5453
DXE_CRYPTO_ARCH = X64
55-
RUNTIMEDXE_CRYPTO_ARCH = X64
5654
SMM_CRYPTO_ARCH = NONE
5755
STANDALONEMM_CRYPTO_ARCH = NONE
5856
STANDALONEMM_MMSUPV_CRYPTO_ARCH = X64
@@ -589,8 +587,8 @@
589587
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerLocator|TRUE
590588
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerAutoWrapEnable|TRUE
591589

592-
gQemuPkgTokenSpaceGuid.PcdSmmSmramRequire|$(SMM_ENABLED)
593-
gUefiQemuQ35PkgTokenSpaceGuid.PcdStandaloneMmEnable|$(SMM_ENABLED)
590+
gQemuPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE
591+
gUefiQemuQ35PkgTokenSpaceGuid.PcdStandaloneMmEnable|TRUE
594592
gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugSupport|FALSE
595593

596594
gQemuPkgTokenSpaceGuid.PcdEnableMemoryProtection|$(MEMORY_PROTECTION)
@@ -688,10 +686,6 @@
688686
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
689687
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(QEMU_CORE_NUM)
690688

691-
!if $(SMM_ENABLED) == FALSE
692-
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
693-
!endif
694-
695689
# Use profile index 1
696690
gOemPkgTokenSpaceGuid.PcdActiveProfileIndex|0x1
697691

@@ -779,13 +773,8 @@
779773
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x80
780774
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x20
781775
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x510
782-
!if $(SMM_ENABLED) == FALSE
783-
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x200
784-
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x200
785-
!else
786776
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x100
787777
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x1C0
788-
!endif
789778
790779
#
791780
# Network Pcds
@@ -1341,12 +1330,6 @@ QemuQ35Pkg/Library/ResetSystemLib/StandaloneMmResetSystemLib.inf
13411330
}
13421331
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
13431332

1344-
#
1345-
# Variable driver stack (NO SMM)
1346-
#
1347-
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
1348-
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
1349-
13501333
#
13511334
# TPM support
13521335
#

0 commit comments

Comments
 (0)