Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 82b1f691961f3e845e2e46873823c4843b660a7a
      
https://github.com/tianocore/edk2/commit/82b1f691961f3e845e2e46873823c4843b660a7a
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M MdePkg/MdePkg.dec

  Log Message:
  -----------
  MdePkg/MdePkg.dec: Add gEfiMmEndOfPeiProtocol definition

This protocol is defined at PI Spec, Vol 4, section 4.
It's a MM Protocol published by a standalone MM Foundation
code if MM Foundation is loaded in PEI phase. This protocol
should be installed immediately after DXE IPL installs
EFI_PEI_END_OF_PEI_PHASE_PPI.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: ff04469d33512d29a5b1afa9c99ec3a152795360
      
https://github.com/tianocore/edk2/commit/ff04469d33512d29a5b1afa9c99ec3a152795360
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A MdeModulePkg/Include/Guid/MmCommBuffer.h
    M MdeModulePkg/MdeModulePkg.dec

  Log Message:
  -----------
  MdeModulePkg: Add MM Communication Buffer definition

The MM communicate buffer facilitates data sharing between non-MM
and MM code.
The MM IPL code allocates a "fixed" runtime type memory as the MM
communication buffer, and communicates its address and size to MM
Core via MmCommBuffer GUIDed HOB.
Here, "fixed" implies that the buffer's location remains constant
throughout the boot process.
Data is exchanged between the MM Communication PPI/Protocol and a
software MMI handler using this fixed MM communication buffer.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 45098bf1b84c9d798fcd4fafff46efb6d4e9c21e
      
https://github.com/tianocore/edk2/commit/45098bf1b84c9d798fcd4fafff46efb6d4e9c21e
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M MdeModulePkg/MdeModulePkg.dec

  Log Message:
  -----------
  MdeModulePkg/MdeModulePkg.dec: Add PcdMmCommBufferPages PCD

PcdMmCommBufferPages is to specify the page count allocated for
the MM communication buffer.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 21a2c8ae2a3802198838a9b5e3ae5a7d2ba0e7d8
      
https://github.com/tianocore/edk2/commit/21a2c8ae2a3802198838a9b5e3ae5a7d2ba0e7d8
  Author: Yuanhao Xie <yuanhao....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/Include/Guid/MmUnblockRegion.h
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg: Add Unblock Region HOB definition

Add Unblock Region HOB which defines the GUIDed HOB that describes
the memory region to be unblocked in MM environment.

Signed-off-by: Yuanhao Xie <yuanhao....@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin...@intel.com>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>


  Commit: 2c5d329e20f0a50af58c572af332825f8cb40ad5
      
https://github.com/tianocore/edk2/commit/2c5d329e20f0a50af58c572af332825f8cb40ad5
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/Include/Guid/MmProfileData.h
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg: Add MM Profile related definitions

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 39d9e15a9ed47ca3a72c06d4279c390869fd2793
      
https://github.com/tianocore/edk2/commit/39d9e15a9ed47ca3a72c06d4279c390869fd2793
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/Include/Guid/MmCpuSyncConfig.h
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg: Add MM CPU Sync Config definitions

MM CPU Sync Config controls how BSP synchronizes with APs in x86
SMM environment.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 0f36b5fa0a7834c0a4bf66125f6d37ebd0ce6c01
      
https://github.com/tianocore/edk2/commit/0f36b5fa0a7834c0a4bf66125f6d37ebd0ce6c01
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/Include/Guid/MmAcpiS3Enable.h
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg: Add ACPI S3 Enable HOB definition

This HOB indicates to x86 standalone MM whether S3 is enabled.
The value shall match with the PcdAcpiS3Enable.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Co-Authored-by: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 43e88014109e76909c21686783470b4d4b5d5b14
      
https://github.com/tianocore/edk2/commit/43e88014109e76909c21686783470b4d4b5d5b14
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A StandaloneMmPkg/Include/Library/MmPlatformHobProducerLib.h
    M StandaloneMmPkg/StandaloneMmPkg.dec

  Log Message:
  -----------
  StandaloneMmPkg: Add MmPlatformHobProducerLib library class

CreateMmPlatformHob() is defined in the MmPlatformHobProducerLib
library class. The function is for StandaloneMm IPL to create all
Platform specific HOBs that required by the Standalone MM env.

Signed-off-by: Dun Tan <dun....@intel.com>
Co-authored-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Co-authored-by: Ray Ni <ray...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 56908fd4be285b0ebb96855fe4dec1124879c5c2
      
https://github.com/tianocore/edk2/commit/56908fd4be285b0ebb96855fe4dec1124879c5c2
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/StandaloneMmPkg.dec

  Log Message:
  -----------
  StandaloneMmPkg/StandaloneMmPkg.dec: Add gEventMmDispatchGuid

MmIpl shall use gEventMmDispatchGuid to initialize
EFI_MM_COMMUNICATE_HEADER structure, and then communicate with MmCore
to dispatch all StandaloneMm drivers in SMM environment.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Co-authored-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Co-Authored-by: Ray Ni <ray...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Star Zeng <star.z...@intel.com>
Co-Authored-by: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 630e819bf3fb4aa3485f29ba498341c8b277e02b
      
https://github.com/tianocore/edk2/commit/630e819bf3fb4aa3485f29ba498341c8b277e02b
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/StandaloneMmPkg.ci.yaml

  Log Message:
  -----------
  StandaloneMmPkg/StandaloneMmPkg.ci.yaml: Add UefiCpuPkg dependency

StandaloneMmPkg need to use header file defined under UefiCpuPkg
to support StandaloneMm features.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Star Zeng <star.z...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>
Acked-by: Jiaxin Wu <jiaxin...@intel.com>


  Commit: 8f219119518ea48930c891602fd7609ffb881539
      
https://github.com/tianocore/edk2/commit/8f219119518ea48930c891602fd7609ffb881539
  Author: xieyuanh <yuanhao....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLib.c
    A UefiCpuPkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLib.inf

  Log Message:
  -----------
  UefiCpuPkg: Add MM Unblock Page Library

This library provides an interface to request non-MMRAM pages to be
mapped/unblocked from inside MM environment.

For MM modules that need to access areas outside of
MMRAMs, the agents responsible for setting up these regions must use
this API to enable access to these memory areas from within MM. During
the IPL, when RestrictedMemoryAccess is enabled,
this unblocked memory is specifically used to create a BuildResourceHob,
 which allocates storage for the SMM accessible DRAM (non-MMIO) range.

Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>

Signed-off-by: Yuanhao Xie <yuanhao....@intel.com>


  Commit: c0b1ad64e45ff356657b0220c532211096c4d5bd
      
https://github.com/tianocore/edk2/commit/c0b1ad64e45ff356657b0220c532211096c4d5bd
  Author: xieyuanh <yuanhao....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/UefiCpuPkg.dsc

  Log Message:
  -----------
  UefiCpuPkg: Enable MmUnblockMemoryLib

Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 0806fb60d4502c05f378cdbf4cdeca9be5ff502a
      
https://github.com/tianocore/edk2/commit/0806fb60d4502c05f378cdbf4cdeca9be5ff502a
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A 
StandaloneMmPkg/Library/MmPlatformHobProducerLibNull/MmPlatformHobProducerLibNull.c
    A 
StandaloneMmPkg/Library/MmPlatformHobProducerLibNull/MmPlatformHobProducerLibNull.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg: Create null instance for MmPlatformHobProducerLib

Create null instance MmPlatformHobProducerLibNull.inf for
MmPlatformHobProducerLib.

Signed-off-by: Dun Tan <dun....@intel.com>


  Commit: eef29d5100b4f4879d8280f5074ccc00e5067e01
      
https://github.com/tianocore/edk2/commit/eef29d5100b4f4879d8280f5074ccc00e5067e01
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c
    A StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h
    A StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg: Add a new MmCommunicationDxe driver



Add a new MmCommunicationDxe driver. The driver is to:
  
1.Install gEfiMmCommunication2ProtocolGuid
  
2.Install gEfiMmCommunicationProtocolGuid
  
3.Create the notifications of some protocols and event that
    the Standalone Mm requires

Signed-off-by: Dun Tan <dun....@intel.com>


  Commit: cf9b5684059e9740ff63da9af7bbc8172c9247dd
      
https://github.com/tianocore/edk2/commit/cf9b5684059e9740ff63da9af7bbc8172c9247dd
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf

  Log Message:
  -----------
  StandaloneMmPkg: Install gEfiMmCommunication2ProtocolGuid

Install gEfiMmCommunication2ProtocolGuid in the
MmCommunicationDxe driver.

Signed-off-by: Dun Tan <dun....@intel.com>


  Commit: a2a8558958cee97efd132361a2b29f2ee8339d91
      
https://github.com/tianocore/edk2/commit/a2a8558958cee97efd132361a2b29f2ee8339d91
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf

  Log Message:
  -----------
  StandaloneMmPkg: Install gEfiMmCommunicationProtocolGuid

Install gEfiMmCommunicationProtocolGuid instance in the
MmCommunicationDxe driver.

Signed-off-by: Dun Tan <dun....@intel.com>


  Commit: d64766bde654a57e3e329e8e6a906e993df6a58c
      
https://github.com/tianocore/edk2/commit/d64766bde654a57e3e329e8e6a906e993df6a58c
  Author: Dun Tan <dun....@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf

  Log Message:
  -----------
  StandaloneMmPkg: Create some notification of protocol and Event

Create the notifications of some protocols and event that
the Standalone Mm requires in MmCommunicationDxe:
   gEfiDxeMmReadyToLockProtocolGuid
   gEfiEventExitBootServicesGuid
   gEfiEventVirtualAddressChangeGuid
   gEfiEndOfDxeEventGroupGuid
   gEfiEventReadyToBootGuid

Signed-off-by: Dun Tan <dun....@intel.com>


  Commit: 82d2f6b3c3f24d96c547a980bd8d0b3009fe9da8
      
https://github.com/tianocore/edk2/commit/82d2f6b3c3f24d96c547a980bd8d0b3009fe9da8
  Author: Zhang Hongbin <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M 
MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.c
    M 
MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf

  Log Message:
  -----------
  MdeModulePkg/SmmCommunicationBufferDxe: Re-use FixedCommBuffer

SmmCommunicationBufferDxe need to re-use FixedCommBuffer from
MmCommBuffer HOB which created under PEI stage.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>


  Commit: e363c0b7296be020e7fca753ac5e3af10dd7981f
      
https://github.com/tianocore/edk2/commit/e363c0b7296be020e7fca753ac5e3af10dd7981f
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    A StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    A StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: StandaloneMmIplPei driver entrypoint

StandaloneMmIplPei driver entrypoint for adding StandaloneMm
Ipl feature code under PEI stage.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: d7e6b863a16fb05b9570b186c9ed4b5eb908c1e5
      
https://github.com/tianocore/edk2/commit/d7e6b863a16fb05b9570b186c9ed4b5eb908c1e5
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: build MM communication buffer HOB

MM communication buffer HOB data is for StandaloneMm Core and
MM communicate DXE driver.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 8d764088ea3a182174d36caa9131198301515a89
      
https://github.com/tianocore/edk2/commit/8d764088ea3a182174d36caa9131198301515a89
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: load MM Core and execute MM Core in MM RAM

StandaloneMmIplPei will search the MM Core driver in all FV and relocate
it to MM RAM, and enter MM Core entrypoint to run MM Core.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: e98eca076af1793baf55bea26ca3bc6e20c52061
      
https://github.com/tianocore/edk2/commit/e98eca076af1793baf55bea26ca3bc6e20c52061
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Install MmCommunicationPpi

Install MmCommunicationPpi under PEI stage, PEIM could
use this PPI to communicate with MM handler

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 3ac296def15a0bd34b095d7009843e76fcdbf418
      
https://github.com/tianocore/edk2/commit/3ac296def15a0bd34b095d7009843e76fcdbf418
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Install end of PEI notify PPI

Install end of PEI notify PPI for issue gEfiMmEndOfPeiProtocol
Handler in MM

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 5aa5ecd5ff1ad845f5fe9d848a66a7a6f89dd9aa
      
https://github.com/tianocore/edk2/commit/5aa5ecd5ff1ad845f5fe9d848a66a7a6f89dd9aa
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Dispatch StandaloneMm drivers in MM

MmIpl will issue a SWSMI by MM communicate to call gEventMmDispatchGuid
handler to dispatch all StandaloneMm drivers

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 0d91ebd96f1c5c463b74ac060c8bb0a616f17372
      
https://github.com/tianocore/edk2/commit/0d91ebd96f1c5c463b74ac060c8bb0a616f17372
  Author: Hongbin1 Zhang <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A StandaloneMmPkg/Drivers/StandaloneMmIplPei/MmFoundationHob.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Create standalone MM foundation related HOBs

Create the HobList which included the HOBs Standalone MM foundation needed,
it included communication buffer HOB, StandaloneMm Core module HOB and
StandaloneMm Core FV HOB

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: c775cc762e5380c391e42f7910e68c6821836bca
      
https://github.com/tianocore/edk2/commit/c775cc762e5380c391e42f7910e68c6821836bca
  Author: Zhang Hongbin <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/MmFoundationHob.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Create misc HOBs for CPU

Create misc HOBs for CPU, it included MM ACPI S3 Enable HOB,
MM CPU sync configuration HOB, CPU SMM base HOB, SMRAM memory HOB,
MP Information2 HOB and ACPI variable HOB

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 378aff173c3e57374a4df2765b9b971236bb03bd
      
https://github.com/tianocore/edk2/commit/378aff173c3e57374a4df2765b9b971236bb03bd
  Author: Zhang Hongbin <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/MmFoundationHob.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Create MM profile data HOBs

Create memory allocation and resource HOB for MM profile data

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 6855567d52246d6fb31a2eccc6add3e12fa9b3df
      
https://github.com/tianocore/edk2/commit/6855567d52246d6fb31a2eccc6add3e12fa9b3df
  Author: Zhang Hongbin <hongbin1.zh...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/MmFoundationHob.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h
    M StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf

  Log Message:
  -----------
  StandaloneMmPkg/MmIpl: Create memory resource HOBs

If PcdCpuSmmRestrictedMemoryAccess is TRUE, only unblocked memory
Regions are available, if FALSE, all system memory is available.

Signed-off-by: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>


  Commit: 6dc14fb5b47da8059f65512543afd72624bd7085
      
https://github.com/tianocore/edk2/commit/6dc14fb5b47da8059f65512543afd72624bd7085
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/Dependency.c
    M StandaloneMmPkg/Core/Dispatcher.c
    M StandaloneMmPkg/Core/FwVol.c
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h

  Log Message:
  -----------
  StandaloneMmPkg/Core: Remove traditional MM driver support

StandaloneMmCore should not support dispatching traditional MM
driver which has dependency on UEFI services. Therefore, remove
the related code that supports traditional MM driver.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: a44830727ac6bc6e2851f3a2432b177b3168cb56
      
https://github.com/tianocore/edk2/commit/a44830727ac6bc6e2851f3a2432b177b3168cb56
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/Dispatcher.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h

  Log Message:
  -----------
  StandaloneMmPkg/Core: Install Loaded Image Protocol for MM drivers

Install Loaded Image Protocol into MM handle database for each MM
driver.
Change EFI_MM_DRIVER_ENTRY structure definition to hold the Loaded
Image Protocol data directly, instead a pointer to the protocol, to
avoid allocating pool for each MM driver.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: dd775aa4d4699440f6f3a1ad7a59e6d9bb6b07c4
      
https://github.com/tianocore/edk2/commit/dd775aa4d4699440f6f3a1ad7a59e6d9bb6b07c4
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c

  Log Message:
  -----------
  StandaloneMmPkg/Core: Install Loaded Image Protocol for MM Core

Retrieves the MM Core image info from Memory Allocation HOB reported
by MM IPL. Then install Loaded Image Protocol for MM Core with the
image info from HOB.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 68487b4736291e3f3efc5181e1b13d0b63bffe80
      
https://github.com/tianocore/edk2/commit/68487b4736291e3f3efc5181e1b13d0b63bffe80
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c

  Log Message:
  -----------
  StandaloneMmPkg/Core: Switch to MM HobList after MM HostList is ready

Switch to MM HobList as soon as MM HostList is initialized to avoid
StandaloneMmCore still using the HobList which is outside of MMRAM.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 24e41d1fa3e08972ced64617df651b105411e13a
      
https://github.com/tianocore/edk2/commit/24e41d1fa3e08972ced64617df651b105411e13a
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h
    M StandaloneMmPkg/Core/StandaloneMmCore.inf

  Log Message:
  -----------
  StandaloneMmPkg/Core: Introduce MM Communication Buffer

Get the MM Communication context from the MM Communication Buffer,
instead of the pointer inside gMmCorePrivate.
In the MmEntryPoint, check IsCommBufferValid from MM_COMM_BUFFER to
decide whether the MMI is Synchronous MMI or Asynchronous MMI. If it
is a Synchronous MMI, MM Core shadows the communication buffer into
a internal copy, then invokes the MMI handlers, lastly copies data
back to the MM Communication Buffer and set the return status.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 18591343b224316df6f616441d69a954b8350e22
      
https://github.com/tianocore/edk2/commit/18591343b224316df6f616441d69a954b8350e22
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h
    M StandaloneMmPkg/Core/StandaloneMmCore.inf
    M StandaloneMmPkg/Core/StandaloneMmCorePrivateData.h

  Log Message:
  -----------
  StandaloneMmPkg/Core: Drop MM_CORE_PRIVATE_DATA

MM_CORE_PRIVATE_DATA is not used as shared structures between MM IPL
and MM Core, therefore clean up the code related to gMmCorePrivate.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 189398dcf8652efcd54de71f1f1395813d903c5e
      
https://github.com/tianocore/edk2/commit/189398dcf8652efcd54de71f1f1395813d903c5e
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M 
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c
    M 
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationServices.h

  Log Message:
  -----------
  StandaloneMmCoreMemoryAllocationLib: Drop MM_CORE_PRIVATE_DATA

MM_CORE_PRIVATE_DATA is not used as shared structures between MM IPL
and MM Core, therefore clean up the code related to gMmCorePrivate.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 0f89005d71b79cb795adf5806845a9790df44839
      
https://github.com/tianocore/edk2/commit/0f89005d71b79cb795adf5806845a9790df44839
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
    M StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInternal.c

  Log Message:
  -----------
  StandaloneMmMemLib: Drop MM_CORE_PRIVATE_DATA

MM_CORE_PRIVATE_DATA is not used as shared structures between MM IPL
and MM Core, therefore clean up the code related to gMmCorePrivate.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: f0254c9a1ca68c13f71da5424971b5617c5a1ca6
      
https://github.com/tianocore/edk2/commit/f0254c9a1ca68c13f71da5424971b5617c5a1ca6
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    R StandaloneMmPkg/Include/Guid/MmCoreData.h
    M StandaloneMmPkg/StandaloneMmPkg.dec

  Log Message:
  -----------
  StandaloneMmPkg: Remove definition for MM_CORE_PRIVATE_DATA

MM_CORE_PRIVATE_DATA is not used as shared structures between MM IPL
and MM Core, therefore clean up definition for MM_CORE_PRIVATE_DATA.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 003a4d4ef4a2238c9cef83be36021861c6d949d2
      
https://github.com/tianocore/edk2/commit/003a4d4ef4a2238c9cef83be36021861c6d949d2
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c

  Log Message:
  -----------
  StandaloneMmPkg/Core: Remove unused mMmramRanges and mMmramRangeCount

mMmramRanges and mMmramRangeCount are the global variables that are
used to cache the MMRAM Ranges info, but they are not used in MM Core.
Therefore, remove mMmramRanges and mMmramRangeCount.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 487fa274c48d5b77a25e13d6af1a9c7a4d3a7951
      
https://github.com/tianocore/edk2/commit/487fa274c48d5b77a25e13d6af1a9c7a4d3a7951
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/Dispatcher.c
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h
    M StandaloneMmPkg/Core/StandaloneMmCore.inf
    M StandaloneMmPkg/StandaloneMmPkg.dec

  Log Message:
  -----------
  StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered

Defer the dispatch of the remaining MM drivers once the CPU driver has
been dispatched.

In MmDispatcher, return immediately if the MM Entry Point was registered.
Then the MM IPL will reinvoke the MM Core Dispatcher. This is required
so MM Mode may be enabled as soon as all the dependent MM Drivers for MM
Mode have been dispatched.

Introduce a FeatureFlag PCD to control if MmDispatcher returns or not
when MmEntryPointPoint is registered. Default value is FALSE.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: c8df60801fa20e3e1dc85acdf37d73ca5cca8206
      
https://github.com/tianocore/edk2/commit/c8df60801fa20e3e1dc85acdf37d73ca5cca8206
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.inf
    M 
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c
    M 
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
    M StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
    M StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInternal.c

  Log Message:
  -----------
  StandaloneMmPkg: Support using gEfiSmmSmramMemoryGuid to get MMRAM range

Add the support using gEfiSmmSmramMemoryGuid to get MMRAM ranges.
If gEfiSmmSmramMemoryGuid HOB is not found, then try to get MMRAM ranges
from gEfiMmPeiMmramMemoryReserveGuid HOB.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: b7931cafea0052b4f3be66dc4f83ae63db4600c5
      
https://github.com/tianocore/edk2/commit/b7931cafea0052b4f3be66dc4f83ae63db4600c5
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h
    M StandaloneMmPkg/Core/StandaloneMmCore.inf

  Log Message:
  -----------
  StandaloneMmPkg/Core: Install protocol to notify MmEndOfPei event

When the EndOfPei event is signaled, installs the MM EndOfPei Protocol
so MM Drivers are informed that EndOfPei event is signaled.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 6b69f564a949830fcc08c8bc19a2f27587034d37
      
https://github.com/tianocore/edk2/commit/6b69f564a949830fcc08c8bc19a2f27587034d37
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/Dispatcher.c
    A StandaloneMmPkg/Core/MemoryAttributesTable.c
    M StandaloneMmPkg/Core/Page.c
    M StandaloneMmPkg/Core/Pool.c
    M StandaloneMmPkg/Core/StandaloneMmCore.h
    M StandaloneMmPkg/Core/StandaloneMmCore.inf
    M StandaloneMmPkg/StandaloneMmPkg.dsc

  Log Message:
  -----------
  StandaloneMmPkg/Core: Add MemoryAttributes support

The MM memory attribute table is ported from SMM Core.

The new file StandaloneMmPkg/Core/MemoryAttributesTable.c, the new code
in StandaloneMmPkg/Core/Page.c and StandaloneMmPkg/Core/Pool.c are
almost identical to MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c,
MdeModulePkg/Core/PiSmmCore/Page.c and
MdeModulePkg/Core/PiSmmCore/Pool.c, but changing the word 'SMM' to 'MM'.

Different from SMM Core, Standalone MM Core produces MM MemoryAttributes
table at the end of MmDriverDispatchHandler() when all the drivers are
dispatched, rather than at the MmEndOfDxe event.

Then the MM CPU driver will consumes the table to set memory attribute
in page table.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: cfaccc89a2bf734fcc20d1d97231bbeb344c0cf7
      
https://github.com/tianocore/edk2/commit/cfaccc89a2bf734fcc20d1d97231bbeb344c0cf7
  Author: Wei6 Xu <wei6...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M StandaloneMmPkg/Core/StandaloneMmCore.c

  Log Message:
  -----------
  StandaloneMmPkg/Core: Migrate Memory Allocation Hob into MMRAM

If a Memory Allocation Hob with EfiBootServicesData memory type is
reported into MM Hob List and it also has a non-zero GUID name, then the
HOB is used by MM driver and needs to migrate the memory into MMRAM.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Sami Mujawar <sami.muja...@arm.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Signed-off-by: Wei6 Xu <wei6...@intel.com>


  Commit: 2a15750b79377a2e81deb6c5fb32abf9138a8839
      
https://github.com/tianocore/edk2/commit/2a15750b79377a2e81deb6c5fb32abf9138a8839
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Update gSmst to gMmst

This patch update the gSmst to gMmst for SMM and MM common
usage.

No function impact.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: cd29383f77694ec47b0ac39647849572735657dc
      
https://github.com/tianocore/edk2/commit/cd29383f77694ec47b0ac39647849572735657dc
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmProfileArch.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
    A UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    R UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmMp.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Rename PiSmmCpuDxeSmm.h to PiSmmCpuCommon.h

Rename the file PiSmmCpuDxeSmm.h to PiSmmCpuCommon.h to facilitate
common usage in both SMM and MM. The renamed file PiSmmCpuCommon.h
will be utilized for both modes in subsequent patches.

No function impact.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: cc5df45eb6bb1b514df6abd002c3663388efb814
      
https://github.com/tianocore/edk2/commit/cc5df45eb6bb1b514df6abd002c3663388efb814
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Move common code into PiSmmCpuCommon.c

Move common code into PiSmmCpuCommon.c to facilitate common usage
in both SMM and MM. The PiSmmCpuCommon.h will be utilized for both
modes in subsequent patches.

No function impact.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 8ccf7f65e5e3276e2bad06419134759c02107e75
      
https://github.com/tianocore/edk2/commit/8ccf7f65e5e3276e2bad06419134759c02107e75
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Centralize Non-Mmram Mem Management Code

Centralize the SMM Non-Mmram Memory Management related code into
the NonMmramMapDxeSmm.c. The file SmmCpuMemoryManagement.c will be
target to use for both SMM and MM in subsequent patches.

No function impact.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: c8a1295d3e98490b4e18522cb1752200ae73d324
      
https://github.com/tianocore/edk2/commit/c8a1295d3e98490b4e18522cb1752200ae73d324
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Get SMRAM info from gEfiSmmSmramMemoryGuid

MM can not use the SMM Access Protocol, so get SMRAM info from
gEfiSmmSmramMemoryGuid instead of via SMM Access Protocol for both SMM
and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 89fe9c5d794327fb4b36f8f656f9336a91b95510
      
https://github.com/tianocore/edk2/commit/89fe9c5d794327fb4b36f8f656f9336a91b95510
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Use SMM Variable to set SmmProfileBase

MM can not use the gRT service, so use SMM Variable protocol to
set SmmProfileBase instead of gRT->SetVariable for both SMM and
MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 5547d1487c630fd66c99fd529dddf8d09c075681
      
https://github.com/tianocore/edk2/commit/5547d1487c630fd66c99fd529dddf8d09c075681
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Move SMM profile data allocation into func

MM can not use the gBS service, so move SMM profile data allocation
into function. This can make InitSmmProfileInternal() to a common
function for both SMM and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 23c5ee6e23b96cdceb5813bfc7d27e2c54a332a5
      
https://github.com/tianocore/edk2/commit/23c5ee6e23b96cdceb5813bfc7d27e2c54a332a5
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Move GetAcpiS3EnableFlag into DxeSmm code

MM can not use the dynamic PCD, so, Move GetAcpiS3EnableFlag into
DxeSmm code. This can make PiSmmCpuEntryCommon to be a function
for SMM and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: d480f106a6c1ac15d14b0dc803b03c945c71a09e
      
https://github.com/tianocore/edk2/commit/d480f106a6c1ac15d14b0dc803b03c945c71a09e
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Get SmmCpuSyncConfig data from func

MM can not use the dynamic PCD (PcdCpuSmmSyncMode &
PcdCpuSmmApSyncTimeout & PcdCpuSmmApSyncTimeout2), so, move to
DxeSmm code and implement in GetSmmCpuSyncConfigData function.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 0c037b5fa7d14bc40294b4fa4edd42b4a5111f64
      
https://github.com/tianocore/edk2/commit/0c037b5fa7d14bc40294b4fa4edd42b4a5111f64
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Create extended protection MemRegion in func

MM can not use the gDS service, so move the extended protection
MemRegion creation into function. This can make InitProtectedMemRange()
to be a common function for both SMM and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: abc2f595235d0b87f1d15f1a75a345b22ff86c75
      
https://github.com/tianocore/edk2/commit/abc2f595235d0b87f1d15f1a75a345b22ff86c75
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Move GetUefiMemoryMap into DxeSmm code

MM can not call GetUefiMemoryMap() function, so, move it into
DxeSmm code. Define a SmmReadyToLockEventNotify to handler the
logic. This will make PiSmmCpuEntryCommon to be common function
for SMM and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 9d9bbb6f5f44cfccaf8a7aadf89cbe22edea58e5
      
https://github.com/tianocore/edk2/commit/9d9bbb6f5f44cfccaf8a7aadf89cbe22edea58e5
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Move GetSmiCommandPort into DxeSmm Code

MM can not call the EfiLocateFirstAcpiTable(), so, move the
function into DxeSmm Code. This will make InitSmmProfileCallBack()
to be common function for both SMM and MM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: cc996831bd518d71e9b68626ca8250f57fc2d911
      
https://github.com/tianocore/edk2/commit/cc996831bd518d71e9b68626ca8250f57fc2d911
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    A UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Add empty .c for MM CPU specific impl

This patch adds the empty .c for MM CPU specific implementation:
NonMmramMapStandaloneMm.c
PiSmmCpuStandaloneMm.c

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 502a9122a427f3f54def77c046c23214ba3c34b6
      
https://github.com/tianocore/edk2/commit/502a9122a427f3f54def77c046c23214ba3c34b6
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl GetSmmProfileData for MM

MM CPU can not use the dynamic PCD (PcdCpuSmmProfileSize), so it
consumes the gMmProfileDataHobGuid memory allocation hob for
SmmProfile base address & size.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 1f22b96b11cec64c11ef2681566c7fd50ee9c0cf
      
https://github.com/tianocore/edk2/commit/1f22b96b11cec64c11ef2681566c7fd50ee9c0cf
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl GetAcpiS3EnableFlag for MM

MM CPU can not use the dynamic PCD (PcdAcpiS3Enable), so, it
consumes the gMmAcpiS3EnableHobGuid to get ACPI S3 enable flag.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 614d6c91bf8ede620afeb76baf352689288e56ed
      
https://github.com/tianocore/edk2/commit/614d6c91bf8ede620afeb76baf352689288e56ed
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl GetSmmCpuSyncConfigData for MM

MM CPU can not use the dynamic PCD (PcdCpuSmmSyncMode &
PcdCpuSmmApSyncTimeout & PcdCpuSmmApSyncTimeout2), so, it
consumes the gMmCpuSyncConfigHobGuid for RelaxedApMode &
Timeout & Timeout2.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: ee54bda382641499443a12805ac986f8d8621c77
      
https://github.com/tianocore/edk2/commit/ee54bda382641499443a12805ac986f8d8621c77
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl CreateExtendedProtectionRange for MM

According Standalone MM design, all accessible NON-MMRAM memory shall
be in ResourceDescriptor HOBs. So, This patch consumes the Resource
HOBs to create extended protection MemoryRegion and add them into
protected memory ranges.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 5f88a4463779054d48e5647c22bf0f64af9a6658
      
https://github.com/tianocore/edk2/commit/5f88a4463779054d48e5647c22bf0f64af9a6658
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl GetSmiCommandPort for MM

MM CPU can not call EfiLocateFirstAcpiTable to get the system
port address of the SMI Command Port. This patch just hard-code
to 0xB2 for MM CPU.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 9ee533479651d29a254a184a56d01809353f0bcc
      
https://github.com/tianocore/edk2/commit/9ee533479651d29a254a184a56d01809353f0bcc
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Define mIsStandaloneMm to indicate SMM or MM

Define the mIsStandaloneMm to indicate it's the MM_STANDALONE MM CPU
driver or DXE_SMM_DRIVER SMM CPU driver execution.

With mIsStandaloneMm, GetMpInformationFromMpServices() can be skipped
for the MM CPU since it can not call the
GetMpInformationFromMpServices() due to the NON-SMM MP Services usage
for the MP Information.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 167e902624c9ccdf28920c099ee2d5e74d9c85a3
      
https://github.com/tianocore/edk2/commit/167e902624c9ccdf28920c099ee2d5e74d9c85a3
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Impl IsSmmCommBufferForbiddenAddress for MM

Since all accessible NON-MMRAM memory shall be in ResourceDescriptor
HOBs, check the ResourceDescriptor HOBs to return if the Address is
forbidden or not for MM CPU.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 7b9b4ed57fac9c5339071ce7672fbbc8d7dd2eca
      
https://github.com/tianocore/edk2/commit/7b9b4ed57fac9c5339071ce7672fbbc8d7dd2eca
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Add GetSupportedMaxLogicalProcessorNumber

MM CPU can not use the dynamic PCD (PcdCpuMaxLogicalProcessorNumber),
so move the PCD usage to DxeSmm.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 14cb36685bdc260d67c119a81f55e49a1f8e0ca3
      
https://github.com/tianocore/edk2/commit/14cb36685bdc260d67c119a81f55e49a1f8e0ca3
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Add PiCpuStandaloneMmEntry for MM

This patch adds the PiCpuStandaloneMmEntry for MM, which is
the module Entry Point of the CPU StandaloneMm driver.

In the Entry Point:
1. Init the mIsStandaloneMm flag
2. Call PiSmmCpuEntryCommon
3. Init SmiCommandPort
4. Install the SMM Configuration Protocol.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 1c19ccd5103b918efef9c4076e92d175cfba8d81
      
https://github.com/tianocore/edk2/commit/1c19ccd5103b918efef9c4076e92d175cfba8d81
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Refactor code to create default Page Table

For MM:
Since all accessible NON-MMRAM memory and attribute shall be in
ResourceDescriptor HOBs for MM, the page table for MM can be finalized
and created in the default Page.

For SMM:
There are still 2 steps for the finalized default Page:
1. Create default Page
2. update the page table in the first SMI when SMM ready to lock
   happen

This patch to refactor the GenSmmPageTable() function to create the
default Page Table for Both SMM and MM:
1. Create NonMmram MemoryRegion
2. Gen NonMmram MemoryRegion PageTable
3. Gen MMRAM Range PageTable
4. Consider PcdCpuSmmStackGuard & PcdNullPointerDetectionPropertyMask
   cases.

Meanwhile, mXdSupported needs to be initialized before GenSmmPageTable since
it's required by GenSmmPageTable function. So, move the mXdSupported init
from CheckFeatureSupported to the common EntryPoint function.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 268397a8923173330b473b8a1d6b21000bc3b7d1
      
https://github.com/tianocore/edk2/commit/268397a8923173330b473b8a1d6b21000bc3b7d1
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Enable CodeAccessCheck in MM Entry Point

For MM:
CodeAccessCheck is designed to enable in the MM CPU Driver Entry
Point.

For SMM:
CodeAccessCheck is still enabled in the first SMI when SMM ready
to lock happen.

This patch enables the CodeAccessCheck in MM CPU Driver Entry
Point for MM support.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 79468b58c31e9fcbc6bd7aa1955876fc516bebc4
      
https://github.com/tianocore/edk2/commit/79468b58c31e9fcbc6bd7aa1955876fc516bebc4
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Differentiate PerformRemainingTasks

For MM:
SMRAM & PageTable itself & SMM Paging State shall be configured
once the gEdkiiPiMmMemoryAttributesTableGuid is installed by
SMM core. It will happen after MmIpl.Entrypoint.
PerformRemainingTasks will be called before MmIpl.Entrypoint
exit.

For SMM:
SMRAM & PageTable itself & SMM Paging State are still
configured in the first SMI when SMM ready to lock happen.

So, this patch is to differentiate PerformRemainingTasks for MM
and SMM.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 0593183d764e63ffd07807213300bbfe1702d079
      
https://github.com/tianocore/edk2/commit/0593183d764e63ffd07807213300bbfe1702d079
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Start SMM Profile early for MM

SMM Profile start can be started early in SMM CPU EntryPoint
since page table for SMM profile is ready.
No need wait smm ready to lock.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 3690d30a6e3cdc4f159bae74a88d6e201e3d69f6
      
https://github.com/tianocore/edk2/commit/3690d30a6e3cdc4f159bae74a88d6e201e3d69f6
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Check logging PF address for MM

This patch is to make sure only logging PF address for MM
can run into the SmmProfilePFHandler.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 5bcf6049f2f09f52f837d9b37607ed52c0153cd3
      
https://github.com/tianocore/edk2/commit/5bcf6049f2f09f52f837d9b37607ed52c0153cd3
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.inf

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Add PiSmmCpuStandaloneMm.inf

This patch is to add PiSmmCpuStandaloneMm.inf for MM CPU
support.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 1816c78f43f5d2d309a2a2d91bf5e7412bab19b5
      
https://github.com/tianocore/edk2/commit/1816c78f43f5d2d309a2a2d91bf5e7412bab19b5
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Refine DxeSmm PageTable update logic

This patch is to refine the updatePageTable logic for DxeSmm.

For DxeSmm, PageTable will be updated in the first SMI when SMM
ready to lock happen:

IF SMM Profile is TRUE:
1. Mark mProtectionMemRange attribute: SmrrBase:Present, SMM
   profile base:Present&Nx, MMRAM ranges:Present, MMIO ranges:
   Present&Nx.
2. Mark the ranges not in mProtectionMemRange as RP (non-present).

IF SMM Profile is FALSE:
1. Mark Non-MMRAM ranges as NX.
2. IF RestrictedMemoryAccess is TRUE:
   Forbidden Address mark as RP (IsUefiPageNotPresent is TRUE).

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: ae0d54cd4362b1a2788226a2fecf4cff6bfb453d
      
https://github.com/tianocore/edk2/commit/ae0d54cd4362b1a2788226a2fecf4cff6bfb453d
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Cleanup SMM_CPU_SYNC_MODE

Use MM_CPU_SYNC_MODE instead of SMM_CPU_SYNC_MODE.
Cleanup the duplicate definition.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 2e6ca59e332f691195be869e87a8737c20bc25a8
      
https://github.com/tianocore/edk2/commit/2e6ca59e332f691195be869e87a8737c20bc25a8
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiException.nasm
    M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Avoid PcdCpuSmmProfileEnable check in MM

For MM, gMmProfileDataHobGuid Memory Allocation HOB is defined to
indicate SMM profile feature enabled or not. If the HOB exist, SMM
profile base address and size will be returned in the HOB, so no need
to consume the PcdCpuSmmProfileEnable feature PCD to check enable or
disable.

To achieve above purpose, Add the IsSmmProfileEnabled () function.
With this change, Both MM and SMM can use the new function for
SMM profile feature check.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 0de7882b46f31618f60bec65005af9a1d085b051
      
https://github.com/tianocore/edk2/commit/0de7882b46f31618f60bec65005af9a1d085b051
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h
    M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg/PiSmmCpuDxeSmm: Simplify SMM Profile Size Calculation

The motivation of this change is to simplify the logic in
StandaloneMmIpl when allocating the memory for SMM profile data.
IPL does not need to detect the CPU feature regarding MSR DS
Area. That change requires the PCD value contains the MSR DS
Area. So, the size of SmmProfileData will be simplified to the
PcdCpuSmmProfileSize directly.

mMsrDsAreaSize will be within the PcdCpuSmmProfileSize if
mBtsSupported is TRUE.

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


  Commit: 84e7b74c8c643c59ee32d4da769f48a3c8c277a4
      
https://github.com/tianocore/edk2/commit/84e7b74c8c643c59ee32d4da769f48a3c8c277a4
  Author: Jiaxin Wu <jiaxin...@intel.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M UefiCpuPkg/UefiCpuPkg.dsc

  Log Message:
  -----------
  UefiCpuPkg/UefiCpuPkg.dsc: Include PiSmmCpuStandaloneMm and required Libs

Signed-off-by: Jiaxin Wu <jiaxin...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Dun Tan <dun....@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zh...@intel.com>
Cc: Wei6 Xu <wei6...@intel.com>
Cc: Yuanhao Xie <yuanhao....@intel.com>


Compare: https://github.com/tianocore/edk2/compare/1fd2f9ec8f16...84e7b74c8c64

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to