> +          gRequestDispatch   = TRUE;
> +          gDispatcherRunning = FALSE;

1. It's good to set RequestDispatch to TRUE as it exits unconditionally and 
very likely more drivers can be dispatched later.
2. Since StandaloneMmCore registers a SMI handler, it's possible that some SMM 
driver entry calls MmiManage() to explicitly
request to dispatch. DispatcherRunning is a flag to avoid re-entrance. It's 
good.


>  /**
>    Traverse the discovered list for any drivers that were discovered but not
> loaded
>    because the dependency expressions evaluated to false.
> diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c
> b/StandaloneMmPkg/Core/StandaloneMmCore.c
> index d221f1d1115d..e65edee6d8c2 100644
> --- a/StandaloneMmPkg/Core/StandaloneMmCore.c
> +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c
> @@ -84,6 +84,7 @@ EFI_MM_SYSTEM_TABLE  gMmCoreMmst = {
>  // Table of MMI Handlers that are registered by the MM Core when it is
> initialized
>  //
>  MM_CORE_MMI_HANDLERS  mMmCoreMmiHandlers[] = {
> +  { MmDriverDispatchHandler,  &gEfiEventDxeDispatchGuid,
> NULL, TRUE  },

3. I assume the StandaloneMmIpl won't respond to the DxeDispatch event signaled 
from DxeCore. Right?


> +[PcdsFeatureFlag]

4. Can we use [PcdsFeatureFlag.IA32, PcdsFeatureFlags.X64] to make sure X86 CPU 
always have the PCD as "TRUE"?
This could avoid possible platform DSC mis-configuration that causes all MM 
drivers dispatched in non-SMM mode.

> +  ## 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 (#111640): https://edk2.groups.io/g/devel/message/111640
Mute This Topic: https://groups.io/mt/102703852/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to