public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Ard Biesheuvel" <ardb+tianocore@kernel.org>,
	"Jiewen Yao" <jiewen.yao@intel.com>,
	"Jordan Justen" <jordan.l.justen@intel.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefan Berger" <stefanb@linux.ibm.com>
Subject: [PATCH 03/17] OvmfPkg/Microvm: no smm
Date: Tue, 31 Aug 2021 11:57:00 +0200	[thread overview]
Message-ID: <20210831095714.2834550-4-kraxel@redhat.com> (raw)
In-Reply-To: <20210831095714.2834550-1-kraxel@redhat.com>

Microvm has no SMM support.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/Microvm/MicrovmX64.dsc | 86 +---------------------------------
 OvmfPkg/Microvm/MicrovmX64.fdf | 30 ------------
 2 files changed, 1 insertion(+), 115 deletions(-)

diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 97a8d90d749e..b8260e032b84 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -180,9 +180,7 @@ [LibraryClasses]
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
-!if $(SMM_REQUIRE) == FALSE
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
-!endif
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
 
@@ -358,9 +356,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
   PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf
   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
-!if $(SMM_REQUIRE) == TRUE
-  MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
-!endif
 
 [LibraryClasses.common.UEFI_DRIVER]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -395,11 +390,7 @@ [LibraryClasses.common.DXE_DRIVER]
   PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
-!if $(SMM_REQUIRE) == TRUE
-  LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
-!else
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
-!endif
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
 !endif
@@ -480,17 +471,10 @@ [PcdsFeatureFlag]
 !ifdef $(CSM_ENABLE)
   gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
 !endif
-!if $(SMM_REQUIRE) == TRUE
-  gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE
-!endif
 
 [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
-!if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
-!endif
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
   gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0
 !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
@@ -579,10 +563,6 @@ [PcdsFixedAtBuild]
 
   gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000
 
-!if $(SMM_REQUIRE) == TRUE
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
-!endif
-
   # IRQs 5, 9, 10, 11 are level-triggered
   gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20
 
@@ -600,11 +580,9 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
-!if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
-!endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
@@ -645,13 +623,6 @@ [PcdsDynamicDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize|0
   gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
 
-!if $(SMM_REQUIRE) == TRUE
-  gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes|8
-  gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase|FALSE
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode|0x01
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout|100000
-!endif
-
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
 
 !if $(TPM_ENABLE) == TRUE
@@ -703,17 +674,7 @@ [Components]
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
 
   OvmfPkg/PlatformPei/PlatformPei.inf
-  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
-    <LibraryClasses>
-!if $(SMM_REQUIRE) == TRUE
-      LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
-!endif
-  }
-!if $(SMM_REQUIRE) == TRUE
-  MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
-  MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
-  OvmfPkg/SmmAccess/SmmAccessPei.inf
-!endif
+  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
   UefiCpuPkg/CpuMpPei/CpuMpPei.inf
 
 !if $(TPM_ENABLE) == TRUE
@@ -966,50 +927,6 @@ [Components]
   OvmfPkg/AmdSevDxe/AmdSevDxe.inf
   OvmfPkg/IoMmuDxe/IoMmuDxe.inf
 
-!if $(SMM_REQUIRE) == TRUE
-  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
-  OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
-  OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf
-
-  #
-  # SMM Initial Program Load (a DXE_RUNTIME_DRIVER)
-  #
-  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
-
-  #
-  # SMM_CORE
-  #
-  MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
-
-  #
-  # Privileged drivers (DXE_SMM_DRIVER modules)
-  #
-  OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
-  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
-  MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf {
-    <LibraryClasses>
-      LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
-  }
-  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {
-    <LibraryClasses>
-      SmmCpuPlatformHookLib|OvmfPkg/Library/SmmCpuPlatformHookLibQemu/SmmCpuPlatformHookLibQemu.inf
-      SmmCpuFeaturesLib|OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
-  }
-
-  #
-  # Variable driver stack (SMM)
-  #
-  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf
-  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
-    <LibraryClasses>
-      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
-      NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
-  }
-  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
-
-!else
-
   #
   # Variable driver stack (non-SMM)
   #
@@ -1023,7 +940,6 @@ [Components]
     <LibraryClasses>
       NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
   }
-!endif
 
   #
   # TPM support
diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf b/OvmfPkg/Microvm/MicrovmX64.fdf
index 5c1b85792e3e..de34abd51b75 100644
--- a/OvmfPkg/Microvm/MicrovmX64.fdf
+++ b/OvmfPkg/Microvm/MicrovmX64.fdf
@@ -173,11 +173,6 @@ [FV.PEIFV]
 INF  OvmfPkg/PlatformPei/PlatformPei.inf
 INF  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
 INF  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
-!if $(SMM_REQUIRE) == TRUE
-INF  MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
-INF  MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
-INF  OvmfPkg/SmmAccess/SmmAccessPei.inf
-!endif
 INF  UefiCpuPkg/CpuMpPei/CpuMpPei.inf
 
 !if $(TPM_ENABLE) == TRUE
@@ -214,9 +209,6 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
   INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF  OvmfPkg/AmdSevDxe/AmdSevDxe.inf
-!if $(SMM_REQUIRE) == FALSE
-  INF  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
-!endif
 }
 
 #
@@ -353,27 +345,6 @@ [FV.DXEFV]
 INF  OvmfPkg/AmdSevDxe/AmdSevDxe.inf
 INF  OvmfPkg/IoMmuDxe/IoMmuDxe.inf
 
-!if $(SMM_REQUIRE) == TRUE
-INF  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
-INF  OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
-INF  OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf
-INF  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
-INF  MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
-INF  OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
-INF  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
-INF  MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
-INF  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
-
-#
-# Variable driver stack (SMM)
-#
-INF  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf
-INF  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
-INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
-INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
-
-!else
-
 #
 # Variable driver stack (non-SMM)
 #
@@ -381,7 +352,6 @@ [FV.DXEFV]
 INF  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf
 INF  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
 INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-!endif
 
 #
 # TPM support
-- 
2.31.1


  parent reply	other threads:[~2021-08-31  9:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  9:56 [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type Gerd Hoffmann
2021-08-31  9:56 ` [PATCH 01/17] OvmfPkg/Microvm: copy OvmfPkgX64 files as-is Gerd Hoffmann
2021-08-31  9:56 ` [PATCH 02/17] OvmfPkg/Microvm: rename output files, fix includes Gerd Hoffmann
2021-08-31  9:57 ` Gerd Hoffmann [this message]
2021-08-31  9:57 ` [PATCH 04/17] OvmfPkg/Microvm: no secure boot Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 05/17] OvmfPkg/Microvm: no tpm Gerd Hoffmann
2021-09-01 21:17   ` Stefan Berger
2021-08-31  9:57 ` [PATCH 06/17] OvmfPkg/Microvm: no sev Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 07/17] OvmfPkg/Microvm: no csm Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 08/17] OvmfPkg/Microvm: no emulated scsi Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 09/17] OvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 10/17] OvmfPkg/Microvm: use XenTimerDxe (lapic timer) Gerd Hoffmann
2021-08-31 16:25   ` [edk2-devel] " Philippe Mathieu-Daudé
2021-09-01  7:19     ` Gerd Hoffmann
2021-09-01  7:37       ` Ard Biesheuvel
2021-08-31  9:57 ` [PATCH 11/17] OvmfPkg/Microvm: PlatformPei/MemDetect tweaks Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 12/17] OvmfPkg/Microvm: PlatformPei/Platform memory map tweaks Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 13/17] OvmfPkg/Microvm: PlatformPei/Platform misc tweaks Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 14/17] OvmfPkg/ResetSystemLib: add driver for microvm Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 15/17] OvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 16/17] OvmfPkg/Microvm: use PciHostBridgeLibNull Gerd Hoffmann
2021-08-31  9:57 ` [PATCH 17/17] OvmfPkg/Microvm: wire up serial console, drop super-io Gerd Hoffmann
2021-08-31 10:23 ` [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type Ard Biesheuvel
2021-08-31 11:41   ` Gerd Hoffmann
2021-08-31 10:31 ` Yao, Jiewen
2021-08-31 11:26   ` Gerd Hoffmann
2021-08-31 14:32     ` Yao, Jiewen
2021-09-01  7:24       ` Gerd Hoffmann
2021-09-03  4:12         ` [edk2-devel] " Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210831095714.2834550-4-kraxel@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox