[edk2-devel] [PATCH v1 00/15] Extends Support of MM_STANDALONE Type Modules to X64

Yao, Jiewen jiewen.yao at intel.com
Sat Dec 19 03:58:03 UTC 2020


Hi
Thanks to add the StandaloneMM support.

Would you please share the information on how you test the patch series?

For every feature you touched (such as TPM), have you validated both traditional MM and standalone MM feature on some platforms?

Thank you
Yao Jiewen



> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Kun Qin
> Sent: Saturday, December 19, 2020 2:50 AM
> To: devel at edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang at intel.com>; Wu, Hao A
> <hao.a.wu at intel.com>; Dong, Eric <eric.dong at intel.com>; Bi, Dandan
> <dandan.bi at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>; Kinney,
> Michael D <michael.d.kinney at intel.com>; Liu, Zhiguang
> <zhiguang.liu at intel.com>; Ni, Ray <ray.ni at intel.com>; Yao, Jiewen
> <jiewen.yao at intel.com>; Zhang, Qi1 <qi1.zhang at intel.com>; Kumar,
> Rahul1 <rahul1.kumar at intel.com>; Ard Biesheuvel
> <ard.biesheuvel at arm.com>; Sami Mujawar <sami.mujawar at arm.com>;
> Supreeth Venkatesh <supreeth.venkatesh at arm.com>; Laszlo Ersek
> <lersek at redhat.com>
> Subject: [edk2-devel] [PATCH v1 00/15] Extends Support of
> MM_STANDALONE Type Modules to X64
> 
> Current MM_STANDALONE type modules are largely focusing on AArch64
> systems, which presents certain gaps to compile or run StandaloneMm on
> X64 system.
> 
> This patch series extended support for MM_STANDALONE type modules to
> build and run on X64 systems by creating new instances of drivers and
> libraries.
> 
> A few minor build time bugs related to this effort are also fixed.
> 
> Patch v1 branch:
> https://github.com/kuqin12/edk2/tree/standalone_x64_v1
> 
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Cc: Eric Dong <eric.dong at intel.com>
> Cc: Dandan Bi <dandan.bi at intel.com>
> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Zhiguang Liu <zhiguang.liu at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Qi Zhang <qi1.zhang at intel.com>
> Cc: Rahul Kumar <rahul1.kumar at intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
> Cc: Sami Mujawar <sami.mujawar at arm.com>
> Cc: Supreeth Venkatesh <supreeth.venkatesh at arm.com>
> Cc: Laszlo Ersek <lersek at redhat.com>
> 
> Kun Qin (15):
>   StandaloneMmPkg: StandaloneMmCoreEntryPoint: Extends support for
> X64
>   StandaloneMmPkg: StandaloneMmCoreHobLib: Extend support for x64
> Mm
>     Core
>   StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix
> compiler
>     warning
>   StandaloneMmPkg: StandaloneMmMemLib: Extends support for X64
>     architecture
>   MdeModulePkg: SmmLockBoxSmmLib: Support StandaloneMm for
> SmmLockBoxLib
>   MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in
>     StandaloneMm
>   MdeModulePkg: FirmwarePerformanceDataTable: Added StandaloneMm
> support
>   MdeModulePkg: ReportStatusCodeRouter: Support StandaloneMm RSC
> Router
>   MdePkg: UefiDevicePathLib: Support UefiDevicePathLib under
>     StandaloneMm
>   PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of
>     AcpiTimerLib
>   SecurityPkg: Tcg2PhysicalPresenceLib: Introduce StandaloneMm instance
>   SecurityPkg: Tcg2PpVendorLibNull: Added support for MM_STANDALONE
> type
>   SecurityPkg: Tpm2DeviceLibDTpm: Introduce StandaloneMm instance
>   UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm
>   UefiCpuPkg: SmmCpuExceptionHandlerLib: Added StandaloneMm module
>     support
> 
>  MdeModulePkg/Library/SmmLockBoxLib/{SmmLockBoxSmmLib.c =>
> SmmLockBoxMmLib.c}                                                    |  77 ++--
>  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxStandaloneMmLib.c
> |  53 +++
>  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxTraditionalMmLib.c
> |  53 +++
>  MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
> |  16 +-
> 
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSt
> andaloneMm.c                                                   |  39 ++
> 
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTr
> aditional.c                                                    |  39 ++
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/{Fir
> mwarePerformanceSmm.c => FirmwarePerformanceCommon.c}           |  72
> ++--
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceStandaloneMm.c                                   |  62 +++
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceTraditional.c                                    |  62 +++
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/{ReportStatusCo
> deRouterSmm.c => ReportStatusCodeRouterCommon.c}               |  43 +-
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterStandaloneMm.c                                          |  33 ++
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterTraditional.c                                           |  33 ++
>  MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c
> |  33 --
>  MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c
> |  51 +++
>  MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c
> |  40 ++
>  PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.c =>
> CommonAcpiTimerLib.c}                                                 |   8 +-
>  PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c
> |  81 +---
>  PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.c
> |  31 ++
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/{SmmTcg2PhysicalPrese
> nceLib.c => MmTcg2PhysicalPresenceLibCommon.c}              |  29 +-
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresen
> ceLib.c                                                     | 368 +----------------
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/StandaloneMmTcg2Phys
> icalPresenceLib.c                                            |  42 ++
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c
> |  42 +-
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmBase.c
> |  69 ++++
> 
> SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandalone
> Mm.c                                                           |  67 +++
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c
> |  40 +-
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
> |  15 +-
> 
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalone
> MmCoreEntryPoint.c                                             |  71 ++++
>  StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{ =>
> AArch64}/StandaloneMmCoreHobLib.c                                           |   6 +-
>  StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{ =>
> X64}/StandaloneMmCoreHobLib.c                                               | 426
> ++++++++++----------
> 
> StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/Stan
> daloneMmCoreMemoryAllocationLib.c                               |   2 +-
> 
> StandaloneMmPkg/Library/StandaloneMmMemLib/X64/StandaloneMmMe
> mLibInternal.c                                                     |  67 +++
>  UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.c => CpuIo2Common.c}
> |  14 +-
>  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
> | 384 +-----------------
>  UefiCpuPkg/CpuIo2Smm/CpuIo2StandaloneMm.c
> |  31 ++
>  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxLibPrivate.h
> |  27 ++
>  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
> |  15 +-
>  MdeModulePkg/Library/SmmLockBoxLib/{SmmLockBoxSmmLib.inf =>
> SmmLockBoxStandaloneMmLib.inf}                                      |  26 +-
>  MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.h
> |  37 ++
> 
> MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCode
> Lib.inf                                                          |   4 +-
> 
> MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode
> Lib.inf => StandaloneMmReportStatusCodeLib.inf}                 |  17 +-
>  MdeModulePkg/MdeModulePkg.dsc
> |   6 +
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceCommon.h                                         |  55 +++
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceSmm.inf                                          |  11 +-
> 
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/{Fir
> mwarePerformanceSmm.inf => FirmwarePerformanceStandaloneMm.inf} |
> 31 +-
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/{ReportStatusCo
> deRouterSmm.h => ReportStatusCodeRouterCommon.h}               |  50 ++-
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterSmm.inf                                                 |  13 +-
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterStandaloneMm.inf                                        |  49 +++
>  MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> |   1 +
> 
> MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathPr
> otocol.inf                                                |   1 +
>  MdePkg/Library/UefiDevicePathLib/{UefiDevicePathLib.inf =>
> UefiDevicePathLibStandaloneMm.inf}                                   |  11 +-
>  MdePkg/MdePkg.dsc
> |   1 +
>  PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h
> |  25 ++
>  PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
> |   2 +
>  PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.inf =>
> StandaloneAcpiTimerLib.inf}                                         |  19 +-
>  PcAtChipsetPkg/PcAtChipsetPkg.dsc
> |   1 +
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/MmTcg2PhysicalPresenc
> eLibCommon.h                                                |  35 ++
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresen
> ceLib.inf                                                   |   6 +-
> 
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/{SmmTcg2PhysicalPrese
> nceLib.inf => StandaloneMmTcg2PhysicalPresenceLib.inf}      |  22 +-
>  SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf
> |   2 +-
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.h
> |  68 ++++
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> |   3 +
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/{Tpm2DeviceLibDTpm.inf =>
> Tpm2DeviceLibDTpmStandaloneMm.inf}                              |  13 +-
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf
> |   3 +
>  SecurityPkg/SecurityPkg.dsc
> |   3 +
> 
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf                                               |   3 +
> 
> StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCore
> HobLib.inf                                                       |   8 +-
> 
> StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib
> .inf                                                               |   6 +-
>  UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.h => CpuIo2Common.h}
> |  18 +-
>  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
> |   7 +-
>  UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.inf => CpuIo2StandaloneMm.inf}
> |  23 +-
> 
> UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.
> inf                                                         |   2 +-
>  UefiCpuPkg/UefiCpuPkg.dsc
> |   6 +
>  72 files changed, 1704 insertions(+), 1425 deletions(-)
>  rename MdeModulePkg/Library/SmmLockBoxLib/{SmmLockBoxSmmLib.c
> => SmmLockBoxMmLib.c} (89%)
>  create mode 100644
> MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxStandaloneMmLib.c
>  create mode 100644
> MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxTraditionalMmLib.c
>  create mode 100644
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSt
> andaloneMm.c
>  create mode 100644
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTr
> aditional.c
>  rename
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/{Fir
> mwarePerformanceSmm.c => FirmwarePerformanceCommon.c} (77%)
>  create mode 100644
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceStandaloneMm.c
>  create mode 100644
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceTraditional.c
>  rename
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/{ReportStatusCo
> deRouterSmm.c => ReportStatusCodeRouterCommon.c} (80%)
>  create mode 100644
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterStandaloneMm.c
>  create mode 100644
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterTraditional.c
>  create mode 100644
> MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c
>  create mode 100644
> MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c
>  copy PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.c =>
> CommonAcpiTimerLib.c} (86%)
>  create mode 100644
> PcAtChipsetPkg/Library/AcpiTimerLib/StandaloneAcpiTimerLib.c
>  copy
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/{SmmTcg2PhysicalPrese
> nceLib.c => MmTcg2PhysicalPresenceLibCommon.c} (91%)
>  create mode 100644
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/StandaloneMmTcg2Phys
> icalPresenceLib.c
>  create mode 100644
> SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmBase.c
>  create mode 100644
> SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandalone
> Mm.c
>  create mode 100644
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalone
> MmCoreEntryPoint.c
>  copy StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{ =>
> AArch64}/StandaloneMmCoreHobLib.c (96%)
>  rename StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{ =>
> X64}/StandaloneMmCoreHobLib.c (70%)
>  create mode 100644
> StandaloneMmPkg/Library/StandaloneMmMemLib/X64/StandaloneMmMe
> mLibInternal.c
>  copy UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.c => CpuIo2Common.c} (94%)
>  create mode 100644 UefiCpuPkg/CpuIo2Smm/CpuIo2StandaloneMm.c
>  copy MdeModulePkg/Library/SmmLockBoxLib/{SmmLockBoxSmmLib.inf =>
> SmmLockBoxStandaloneMmLib.inf} (52%)
>  create mode 100644
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.h
>  copy
> MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode
> Lib.inf => StandaloneMmReportStatusCodeLib.inf} (64%)
>  create mode 100644
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firm
> warePerformanceCommon.h
>  copy
> MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/{Fir
> mwarePerformanceSmm.inf => FirmwarePerformanceStandaloneMm.inf}
> (65%)
>  rename
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/{ReportStatusCo
> deRouterSmm.h => ReportStatusCodeRouterCommon.h} (70%)
>  create mode 100644
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCo
> deRouterStandaloneMm.inf
>  copy MdePkg/Library/UefiDevicePathLib/{UefiDevicePathLib.inf =>
> UefiDevicePathLibStandaloneMm.inf} (79%)
>  create mode 100644
> PcAtChipsetPkg/Library/AcpiTimerLib/CommonAcpiTimerLib.h
>  copy PcAtChipsetPkg/Library/AcpiTimerLib/{DxeAcpiTimerLib.inf =>
> StandaloneAcpiTimerLib.inf} (70%)
>  create mode 100644
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/MmTcg2PhysicalPresenc
> eLibCommon.h
>  copy
> SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/{SmmTcg2PhysicalPrese
> nceLib.inf => StandaloneMmTcg2PhysicalPresenceLib.inf} (64%)
>  create mode 100644
> SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.h
>  copy SecurityPkg/Library/Tpm2DeviceLibDTpm/{Tpm2DeviceLibDTpm.inf =>
> Tpm2DeviceLibDTpmStandaloneMm.inf} (70%)
>  rename UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.h => CpuIo2Common.h}
> (92%)
>  copy UefiCpuPkg/CpuIo2Smm/{CpuIo2Smm.inf =>
> CpuIo2StandaloneMm.inf} (56%)
> 
> --
> 2.28.0.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69252): https://edk2.groups.io/g/devel/message/69252
Mute This Topic: https://groups.io/mt/79068283/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list