From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Xu, Wei6" <wei6.xu@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered
Date: Mon, 27 Nov 2023 12:15:14 +0000 [thread overview]
Message-ID: <MN0PR11MB6158F3F7B748C83F7E354570FEBDA@MN0PR11MB6158.namprd11.prod.outlook.com> (raw)
In-Reply-To: <e0d1d298e0b50b1fec9edc31d296f0cc2cab9d66.1700456330.git.wei6.xu@intel.com>
> //
> MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = {
> + { MmDriverDispatchHandler, &gEfiEventDxeDispatchGuid, NULL,
> TRUE },
Should we need define a new HandlerType name instead of using the gEfiEventDxeDispatchGuid?
We just need a simple MM Dispatch Event, which is trigged by IPL to dispatch again after StandaloneMmCore returns. Not depends on dxe dispatch event.
And besides, should we update & correct the below code comments?
///
/// Define values for the communications buffer used when gEfiEventDxeDispatchGuid is
/// event signaled. This event is signaled by the DXE Core each time the DXE Core
/// dispatcher has completed its work. When this event is signaled, the MM Core
/// if notified, so the MM Core can dispatch MM drivers. If COMM_BUFFER_MM_DISPATCH_ERROR
/// is returned in the communication buffer, then an error occurred dispatching MM
/// Drivers. If COMM_BUFFER_MM_DISPATCH_SUCCESS is returned, then the MM Core
/// dispatched all the drivers it could. If COMM_BUFFER_MM_DISPATCH_RESTART is
/// returned, then the MM Core just dispatched the MM Driver that registered
/// the MM Entry Point enabling the use of MM Mode. In this case, the MM Core
/// should be notified again to dispatch more MM Drivers using MM Mode.
///
#define COMM_BUFFER_MM_DISPATCH_ERROR 0x00
#define COMM_BUFFER_MM_DISPATCH_SUCCESS 0x01
#define COMM_BUFFER_MM_DISPATCH_RESTART 0x02
Thanks,
Jiaxin
> { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL,
> TRUE },
> { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL,
> FALSE },
> { MmExitBootServiceHandler, &gEfiEventExitBootServicesGuid, NULL,
> FALSE },
> diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf
> b/StandaloneMmPkg/Core/StandaloneMmCore.inf
> index c44b9ff33303..845fed831c47 100644
> --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf
> +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf
> @@ -76,6 +76,9 @@ [Guids]
> gEfiEventExitBootServicesGuid
> gEfiEventReadyToBootGuid
>
> +[Pcd]
> +
> gStandaloneMmPkgTokenSpaceGuid.PcdRestartMmDispatcherOnceMmEntry
> Registered
> +
> #
> # This configuration fails for CLANGPDB, which does not support PIE in the
> GCC
> # sense. Such however is required for ARM family StandaloneMmCore
> diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec
> b/StandaloneMmPkg/StandaloneMmPkg.dec
> index 46784d94e421..bb4d1520f7d9 100644
> --- a/StandaloneMmPkg/StandaloneMmPkg.dec
> +++ b/StandaloneMmPkg/StandaloneMmPkg.dec
> @@ -48,3 +48,9 @@ [Guids]
> gEfiStandaloneMmNonSecureBufferGuid = { 0xf00497e3, 0xbfa2, 0x41a1,
> { 0x9d, 0x29, 0x54, 0xc2, 0xe9, 0x37, 0x21, 0xc5 }}
> gEfiArmTfCpuDriverEpDescriptorGuid = { 0x6ecbd5a1, 0xc0f8, 0x4702,
> { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }}
>
> +[PcdsFeatureFlag]
> + ## Indicates if restart MM Dispatcher once MM Entry Point is
> registered.<BR><BR>
> + # TRUE - Restart MM Dispatcher once MM Entry Point is registered.<BR>
> + # FALSE - Do not restart MM Dispatcher once MM Entry Point is
> registered.<BR>
> + # @Prompt Restart MM Dispatcher once MM Entry Point is registered.
> +
> gStandaloneMmPkgTokenSpaceGuid.PcdRestartMmDispatcherOnceMmEntry
> Registered|FALSE|BOOLEAN|0x00000001
> --
> 2.29.2.windows.2
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111735): https://edk2.groups.io/g/devel/message/111735
Mute This Topic: https://groups.io/mt/102703852/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-11-27 12:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 8:30 [edk2-devel] [PATCH 0/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered Xu, Wei6
2023-11-20 8:30 ` [edk2-devel] [PATCH 1/1] " Xu, Wei6
2023-11-22 11:45 ` Laszlo Ersek
2023-11-22 15:11 ` Ard Biesheuvel
2023-11-24 11:06 ` Laszlo Ersek
2023-11-23 16:20 ` Xu, Wei6
2023-11-24 11:13 ` Laszlo Ersek
2023-11-23 1:48 ` Ni, Ray
2023-11-27 12:15 ` Wu, Jiaxin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN0PR11MB6158F3F7B748C83F7E354570FEBDA@MN0PR11MB6158.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox