[edk2-devel] [PATCH v2 4/5] SimicsOpenBoardPkg: Use another SmmAccess Driver

Zhiguang Liu posted 5 patches 2 years, 9 months ago
[edk2-devel] [PATCH v2 4/5] SimicsOpenBoardPkg: Use another SmmAccess Driver
Posted by Zhiguang Liu 2 years, 9 months ago
Because of the similar reason I mentioned in last commit, the
SmmAccess2Dxe.inf driver should be deleted and the replacement
will avoid hard-code and use gEfiSmmSmramMemoryGuid Hob to get
Smm Range information.

This can fix an existing bug. In pei phase, some module may use some
SMM range, and mark this range as allocated in gEfiSmmSmramMemoryGuid
Hob. In DXE phase, when loading SMM core, we should avoid using the
allocated SMM range. However, because the GetCapabilities by this
driver return a hard-code SMM range information, the allocated buffer
is treated as free buffer and used to load SMM core.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc   | 2 +-
 Silicon/Intel/SimicsX58SktPkg/SktUefiBootInclude.fdf          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index ae6f980a68..f15c088d9e 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -278,7 +278,7 @@
 !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
   $(PCH_PKG)/SmmControl/RuntimeDxe/SmmControl2Dxe.inf
   $(PCH_PKG)/Spi/Smm/PchSpiSmm.inf
-  $(SKT_PKG)/Smm/Access/SmmAccess2Dxe.inf
+  IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccess.inf
   IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
 !endif
 
diff --git a/Silicon/Intel/SimicsX58SktPkg/SktUefiBootInclude.fdf b/Silicon/Intel/SimicsX58SktPkg/SktUefiBootInclude.fdf
index fdcb4fb9a7..42c8408c05 100644
--- a/Silicon/Intel/SimicsX58SktPkg/SktUefiBootInclude.fdf
+++ b/Silicon/Intel/SimicsX58SktPkg/SktUefiBootInclude.fdf
@@ -1,14 +1,14 @@
 ## @file
 #  Component description file for the Simics X58 SiPkg DXE drivers.
 #
-# Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
+# Copyright (c) 2019 - 2023 Intel Corporation. All rights reserved. <BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
 !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
-  INF  $(SKT_PKG)/Smm/Access/SmmAccess2Dxe.inf
+  INF  IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccess.inf
   INF  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
 !endif
 INF  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103615): https://edk2.groups.io/g/devel/message/103615
Mute This Topic: https://groups.io/mt/98509467/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-