public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC] Support Both MM Traditional and Standalone Drivers with One MM Core
@ 2020-10-09  5:22 Siyuan, Fu
  2020-10-09 11:55 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 9+ messages in thread
From: Siyuan, Fu @ 2020-10-09  5:22 UTC (permalink / raw)
  To: devel@edk2.groups.io, rfc@edk2.groups.io
  Cc: Dong, Eric, Ni, Ray, ard.biesheuvel@arm.com, sami.mujawar@arm.com,
	Yao, Jiewen, supreeth.venkatesh@arm.com

Hi, All

This email is to collect feedback about making one common EDK2 MM Core driver to support both MM Traditional drivers and MM Standalone drivers.

We know that PI Spec defines two types of MM-related drivers: MM Traditional Drivers and MM Standalone Drivers. There are two MM Core modules exist in EDK2 but each of them can only support one single type of MM drivers:
    - PiSmmCore in MdeModulePkg supports MM Traditional driver dispatch. It doesn't have FV parsing logic and relies on EFI Firmware Volume2 Protocol for driver discovery. It doesn't support MM Standalone driver.
    - StandaloneMmCore in StandaloneMmPkg supports MM Standalone driver dispatch. It has FV parsing and decompress logic but only limited to one single firmware volume (called standalone BFV in code). It doesn't support MM Traditional driver.

However, a platform may want to have both of the two types of MM drivers coexist in its firmware, for example, when it tries to transfer from Traditional MM mode to Standalone MM mode, in a stage by stage manner. However, it's not possible with current EDK2 MM Core because of above limitations. Thus, here we propose to have a common MM Core module in EDK2, which could:
    - Support both MM Traditional drivers and MM Standalone drivers.
    - Use shared Depex evaluation when dispatching all the MM drivers.
    - Use a shared MM System Table when invoking all the MM drivers' entry point, which mean handle/protocol database is shared.
    - Have self-contained FV parsing and driver discovery capability.

We realized there could be 2 possible options to make this happen:
    - Option 1: Update the MdeModulePkg Core. In this approach, we will need to add the FV decompress, driver discovery and MM Standalone driver dispatcher to the PiSmmCore module in MdeModulePkg.
    - Option 2: Update the StandaloneMmPkg Core. Which means adding MM Traditional dispatcher and multiple FV support to existing standalone Core in StandaloneMmPkg. Will also need to add PEI/DXE IPL module to invoke the Standalone MM Core and pass UEFI System Table to it.

The option 1 will have less impact to those platforms which only use MM Standalone drivers currently, because those platforms can stay with the unchanged Standalone MM Core. While option 2 looks more like a clean solution because it could support all the cases (Traditional MM only, Standalone MM only, and mix-used platform). So I'd like to hear the community's feedback about which option is preferred, and let me know if you have any concerns with this change. Thanks!

Best Regards
Siyuan 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-16  8:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09  5:22 [RFC] Support Both MM Traditional and Standalone Drivers with One MM Core Siyuan, Fu
2020-10-09 11:55 ` [edk2-devel] " Laszlo Ersek
2020-10-09 12:23   ` [edk2-rfc] " Yao, Jiewen
2020-10-09 13:07     ` Laszlo Ersek
2020-10-10  1:40       ` Siyuan, Fu
2020-10-15 10:11         ` Sami Mujawar
2020-10-16  1:36           ` Siyuan, Fu
2020-10-16  7:04             ` Ard Biesheuvel
2020-10-16  8:52               ` Siyuan, Fu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox