On 24 June 2015 at 13:15, Olivier Martin <olivier.mar...@arm.com> wrote:
> I think this patch should move to IntelFrameworkModulePkg/Universal/BdsDxe. 
> It is a PI specification requirement to signal gEfiEndOfDxeEventGroupGuid at 
> the end of the DXE phase.
>

Yes, that makes sense, I guess. But assuming most of its users are
signalling the event at some point, this would result in the event to
be signalled twice.
Perhaps Jeff can comment here?

-- 
Ard.


> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: 24 June 2015 11:25
> To: edk2-devel@lists.sourceforge.net; ler...@redhat.com; Olivier Martin
> Cc: leif.lindh...@linaro.org; roy.fr...@linaro.org; Ard Biesheuvel
> Subject: [PATCH] ArmVirtPkg: signal EndOxDxe event in PlatformBsdInit
>
> Currently, the ArmVirtPkg platforms fail to signal the end-of-DXE event 
> 'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results in 
> some loss of functionality, i.e., variable reclaim in the VariableDxe 
> drivers, and the splitting of the memory regions that is part of the recently 
> added UEFI 2.5 properties table feature.
>
> This patch adds signalling of the event to PlatformBdsInit() of the 
> PlatformBdsLib instance for the Intel BDS. Note that the ARM BDS does signal 
> the event, so this looks like a convenient place to put it.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
> ---
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 35 
> ++++++++++++++++++++++
>  .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  1 +
>  2 files changed, 36 insertions(+)
>
> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c 
> b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> index 499cce5dcde6..0e60409cdc73 100644
> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> @@ -24,6 +24,7 @@
>  #include <Protocol/GraphicsOutput.h>
>  #include <Protocol/PciIo.h>
>  #include <Protocol/PciRootBridgeIo.h>
> +#include <Guid/EventGroup.h>
>
>  #include "IntelBdsPlatform.h"
>
> @@ -118,6 +119,23 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = {
>    }
>  };
>
> +/**
> +  An empty function to pass error checking of CreateEventEx ().
> +
> +  @param  Event                 Event whose notification function is being 
> invoked.
> +  @param  Context               Pointer to the notification function's 
> context,
> +                                which is implementation-dependent.
> +
> +**/
> +VOID
> +EFIAPI
> +EmptyCallbackFunction (
> +  IN EFI_EVENT                Event,
> +  IN VOID                     *Context
> +  )
> +{
> +  return;
> +}
>
>  //
>  // BDS Platform Functions
> @@ -133,6 +151,23 @@ PlatformBdsInit (
>    VOID
>    )
>  {
> +  EFI_EVENT           EndOfDxeEvent;
> +  EFI_STATUS          Status;
> +
> +  //
> +  // Signal EndOfDxe PI Event
> +  //
> +  Status = gBS->CreateEventEx (
> +      EVT_NOTIFY_SIGNAL,
> +      TPL_NOTIFY,
> +      EmptyCallbackFunction,
> +      NULL,
> +      &gEfiEndOfDxeEventGroupGuid,
> +      &EndOfDxeEvent
> +      );
> +  if (!EFI_ERROR (Status)) {
> +    gBS->SignalEvent (EndOfDxeEvent);
> +  }
>  }
>
>
> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf 
> b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> index d8f892642c2e..d9982167e81d 100644
> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> @@ -65,6 +65,7 @@ [Guids]
>    gEfiFileInfoGuid
>    gEfiFileSystemInfoGuid
>    gEfiFileSystemVolumeLabelInfoIdGuid
> +  gEfiEndOfDxeEventGroupGuid
>
>  [Protocols]
>    gEfiDevicePathProtocolGuid
> --
> 1.9.1
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are 
> confidential and may also be privileged. If you are not the intended 
> recipient, please notify the sender immediately and do not disclose the 
> contents to any other person, use it for any purpose, or store or copy the 
> information in any medium.  Thank you.
>
> ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
> Registered in England & Wales, Company No:  2557590
> ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
> Registered in England & Wales, Company No:  2548782
>

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to