public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Add event signal before and after ReadyToBoot
@ 2019-04-02  5:49 Zhichao Gao
  2019-04-02  5:49 ` [PATCH 1/2] MdeModulePkg: Add event guids Zhichao Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zhichao Gao @ 2019-04-02  5:49 UTC (permalink / raw)
  To: edk2-devel

Add two event guids.
And signal them immediately before and after the ReadyToBoot signal Event.

Bret Barkelew (2):
  MdeModulePkg: Add event guids
  MdeModulePkg/UefiBootManagerlib: Add two event signals

 .../Include/Guid/EventPostReadyToBoot.h       | 24 +++++++++++++++++++
 .../Include/Guid/EventPreReadyToBoot.h        | 24 +++++++++++++++++++
 .../Library/UefiBootManagerLib/BmBoot.c       |  2 ++
 .../Library/UefiBootManagerLib/InternalBm.h   |  4 +++-
 .../UefiBootManagerLib/UefiBootManagerLib.inf |  5 +++-
 MdeModulePkg/MdeModulePkg.dec                 |  6 +++++
 6 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
 create mode 100644 MdeModulePkg/Include/Guid/EventPreReadyToBoot.h

-- 
2.21.0.windows.1



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

* [PATCH 1/2] MdeModulePkg: Add event guids
  2019-04-02  5:49 [PATCH 0/2] Add event signal before and after ReadyToBoot Zhichao Gao
@ 2019-04-02  5:49 ` Zhichao Gao
  2019-04-02  5:49 ` [PATCH 2/2] MdeModulePkg/UefiBootManagerlib: Add two event signals Zhichao Gao
  2019-04-02  8:40 ` [PATCH 0/2] Add event signal before and after ReadyToBoot Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Zhichao Gao @ 2019-04-02  5:49 UTC (permalink / raw)
  To: edk2-devel
  Cc: Bret Barkelew, Jian J Wang, Ray Ni, Star Zeng, Liming Gao,
	Sean Brogan, Michael Turner

From: Bret Barkelew <Bret.Barkelew@microsoft.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1676

Add event guids: gEfiEventPreReadyToBootGuid and
gEfiEventPostReadyToBootGuid. And add the related
header files. These two guid can be used to notify
function before and after ReadyToBoot event.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../Include/Guid/EventPostReadyToBoot.h       | 24 +++++++++++++++++++
 .../Include/Guid/EventPreReadyToBoot.h        | 24 +++++++++++++++++++
 MdeModulePkg/MdeModulePkg.dec                 |  6 +++++
 3 files changed, 54 insertions(+)
 create mode 100644 MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
 create mode 100644 MdeModulePkg/Include/Guid/EventPreReadyToBoot.h

diff --git a/MdeModulePkg/Include/Guid/EventPostReadyToBoot.h b/MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
new file mode 100644
index 0000000000..591bccb42d
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
@@ -0,0 +1,24 @@
+/** @file
+  GUID is the name of events used with CreateEventEx in order to be notified
+  when closely after ReadyToBoot.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+  This program and the accompanying materials
+  are licensed and made available under the terms and conditions of the BSD License
+  which accompanies this distribution.  The full text of the license may be found at
+  http://opensource.org/licenses/bsd-license.php
+
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#ifndef __EVENT_POST_READY_TO_BOOT_H__
+#define __EVENT_POST_READY_TO_BOOT_H__
+
+#define EVENT_POST_READY_TO_BOOT_GUID \
+   { 0xa5b489b4, 0x18fd, 0x4425, { 0x91, 0xa4, 0x61, 0x3a, 0xdd, 0xd2, 0x74, 0x5 } }
+
+extern EFI_GUID gEfiEventPostReadyToBootGuid;
+
+#endif
+
diff --git a/MdeModulePkg/Include/Guid/EventPreReadyToBoot.h b/MdeModulePkg/Include/Guid/EventPreReadyToBoot.h
new file mode 100644
index 0000000000..8e6329b90d
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/EventPreReadyToBoot.h
@@ -0,0 +1,24 @@
+/** @file
+  GUID is the name of events used with CreateEventEx in order to be notified
+  when closely before ReadyToBoot.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+  This program and the accompanying materials
+  are licensed and made available under the terms and conditions of the BSD License
+  which accompanies this distribution.  The full text of the license may be found at
+  http://opensource.org/licenses/bsd-license.php
+
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#ifndef __EVENT_PRE_READY_TO_BOOT_H__
+#define __EVENT_PRE_READY_TO_BOOT_H__
+
+#define EVENT_PRE_READY_TO_BOOT_GUID \
+   { 0x7b94c75c, 0x36a4, 0x4aa4, { 0xa1, 0xdf, 0x14, 0xbc, 0x9a, 0x04, 0x9a, 0xe4 } }
+
+extern EFI_GUID gEfiEventPreReadyToBootGuid;
+
+#endif
+
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 9bbd0572f5..43992b7f65 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -425,6 +425,12 @@
   ## Include/Guid/S3StorageDeviceInitList.h
   gS3StorageDeviceInitListGuid = { 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } }
 
+  ## Include/Guid/EventPreReadyToBoot.h
+  gEfiEventPreReadyToBootGuid = { 0x7b94c75c, 0x36a4, 0x4aa4, {0xa1, 0xdf, 0x14, 0xbc, 0x9a, 0x04, 0x9a, 0xe4 } }
+
+  ##Include/Guid/EventPostReadyToBoot.h
+  gEfiEventPostReadyToBootGuid = { 0xa5b489b4, 0x18fd, 0x4425, { 0x91, 0xa4, 0x61, 0x3a, 0xdd, 0xd2, 0x74, 0x5 } }
+
 [Ppis]
   ## Include/Ppi/AtaController.h
   gPeiAtaControllerPpiGuid       = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
-- 
2.21.0.windows.1



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

* [PATCH 2/2] MdeModulePkg/UefiBootManagerlib: Add two event signals
  2019-04-02  5:49 [PATCH 0/2] Add event signal before and after ReadyToBoot Zhichao Gao
  2019-04-02  5:49 ` [PATCH 1/2] MdeModulePkg: Add event guids Zhichao Gao
@ 2019-04-02  5:49 ` Zhichao Gao
  2019-04-02  8:40 ` [PATCH 0/2] Add event signal before and after ReadyToBoot Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Zhichao Gao @ 2019-04-02  5:49 UTC (permalink / raw)
  To: edk2-devel
  Cc: Bret Barkelew, Jian J Wang, Ray Ni, Star Zeng, Liming Gao,
	Sean Brogan, Michael Turner

From: Bret Barkelew <Bret.Barkelew@microsoft.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1676

Add gEfiEventPreReadyToBootGuid signal before gEfiEventReadyToBootGuid
and gEfiEventPostReadyToBootGuid after gEfiEventReadyToBootGuid in
UefiBootManagerLib.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c             | 2 ++
 MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h         | 4 +++-
 .../Library/UefiBootManagerLib/UefiBootManagerLib.inf        | 5 ++++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 0535cd7335..7bd4840f90 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1807,7 +1807,9 @@ EfiBootManagerBoot (
     DEBUG ((EFI_D_INFO, "[Bds] Booting Boot Manager Menu.\n"));
     BmStopHotkeyService (NULL, NULL);
   } else {
+    EfiEventGroupSignal (&gEfiEventPreReadyToBootGuid);
     EfiSignalEventReadyToBoot();
+    EfiEventGroupSignal (&gEfiEventPostReadyToBootGuid);
     //
     // Report Status Code to indicate ReadyToBoot was signalled
     //
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
index 0fef63fcee..c507d75e62 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
+++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
@@ -1,7 +1,7 @@
 /** @file
   BDS library definition, include the file and data structure
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -53,6 +53,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/GlobalVariable.h>
 #include <Guid/StatusCodeDataTypeId.h>
 #include <Guid/StatusCodeDataTypeVariable.h>
+#include <Guid/EventPreReadyToBoot.h>
+#include <Guid/EventPostReadyToBoot.h>
 
 #include <Library/PrintLib.h>
 #include <Library/DebugLib.h>
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 228b910336..e1ec8885eb 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -5,7 +5,7 @@
 #  manipulation, hotkey registration, UEFI boot, connect/disconnect, console
 #  manipulation, driver health checking and etc.
 #
-#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -90,6 +90,9 @@
   gEfiDiskInfoScsiInterfaceGuid                 ## SOMETIMES_CONSUMES ## GUID
   gEfiDiskInfoSdMmcInterfaceGuid                ## SOMETIMES_CONSUMES ## GUID
 
+  gEfiEventPreReadyToBootGuid                   ## SOMETIMES_CONSUMES ## Event
+  gEfiEventPostReadyToBootGuid                  ## SOMETIMES_CONSUMES ## Event
+
 [Protocols]
   gEfiPciRootBridgeIoProtocolGuid               ## CONSUMES
   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES
-- 
2.21.0.windows.1



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

* Re: [PATCH 0/2] Add event signal before and after ReadyToBoot
  2019-04-02  5:49 [PATCH 0/2] Add event signal before and after ReadyToBoot Zhichao Gao
  2019-04-02  5:49 ` [PATCH 1/2] MdeModulePkg: Add event guids Zhichao Gao
  2019-04-02  5:49 ` [PATCH 2/2] MdeModulePkg/UefiBootManagerlib: Add two event signals Zhichao Gao
@ 2019-04-02  8:40 ` Laszlo Ersek
  2019-04-02  9:40   ` Gao, Zhichao
  2 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2019-04-02  8:40 UTC (permalink / raw)
  To: Zhichao Gao
  Cc: edk2-devel, Bret Barkelew, Jian J Wang, Liming Gao,
	Michael Turner, Ray Ni, Sean Brogan, Star Zeng, Stephano Cetola

On 04/02/19 07:49, Zhichao Gao wrote:
> Add two event guids.
> And signal them immediately before and after the ReadyToBoot signal Event.
> 
> Bret Barkelew (2):
>   MdeModulePkg: Add event guids
>   MdeModulePkg/UefiBootManagerlib: Add two event signals
> 
>  .../Include/Guid/EventPostReadyToBoot.h       | 24 +++++++++++++++++++
>  .../Include/Guid/EventPreReadyToBoot.h        | 24 +++++++++++++++++++
>  .../Library/UefiBootManagerLib/BmBoot.c       |  2 ++
>  .../Library/UefiBootManagerLib/InternalBm.h   |  4 +++-
>  .../UefiBootManagerLib/UefiBootManagerLib.inf |  5 +++-
>  MdeModulePkg/MdeModulePkg.dec                 |  6 +++++
>  6 files changed, 63 insertions(+), 2 deletions(-)
>  create mode 100644 MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
>  create mode 100644 MdeModulePkg/Include/Guid/EventPreReadyToBoot.h
> 

(1) You forgot to include the CC's from the individual patches on the
cover letter. I'm fixing that now.


(2) This is my turn to ask whether the new event group GUIDs have been
standardized and released in a public spec.

If they haven't, I'll nack this series -- contributors should be held to
equal standards.

In particular, the variables are called "gEfiEventPostReadyToBootGuid"
and "gEfiEventPreReadyToBootGuid". The "Efi" infix suggests these are
standard event groups. However, in that case, I believe the changes
should go into "MdePkg/Include/Guid/EventGroup.h", and TianoCore#1676
should minimally indicate the Mantis ticket that introduces the GUIDs.

I've now searched "UEFI_Spec_2_8_final.pdf" (from the USWG member area,
SHA1 1adf5b81c566075574b3ad9e4091a42e9c9a80cb), and PI v1.7 too, for
"7b94c75c", and there are no hits.

In theory, it would be totally fine to introduce these event group GUIDs
as edk2 extensions. In theory. The last time I tried to do something
similar, I was forced to go through the spec process however.

No double standards, please. If UefiBootManagerLib & BdsDxe are now open
to edk2 extensions, and will no longer restrict themselves to specified
behavior, that's great, but I will want it in writing; the policy should
apply to everyone. (Adding Stephano.)

Thanks,
Laszlo


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

* Re: [PATCH 0/2] Add event signal before and after ReadyToBoot
  2019-04-02  8:40 ` [PATCH 0/2] Add event signal before and after ReadyToBoot Laszlo Ersek
@ 2019-04-02  9:40   ` Gao, Zhichao
  0 siblings, 0 replies; 5+ messages in thread
From: Gao, Zhichao @ 2019-04-02  9:40 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: edk2-devel@lists.01.org, Bret Barkelew, Wang, Jian J, Gao, Liming,
	Michael Turner, Ni, Ray, Sean Brogan, Zeng, Star,
	Cetola, Stephano


> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Tuesday, April 2, 2019 4:41 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>
> Cc: edk2-devel@lists.01.org; Bret Barkelew <Bret.Barkelew@microsoft.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Michael Turner <Michael.Turner@microsoft.com>; Ni, Ray
> <ray.ni@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Zeng, Star
> <star.zeng@intel.com>; Cetola, Stephano <stephano.cetola@intel.com>
> Subject: Re: [edk2] [PATCH 0/2] Add event signal before and after
> ReadyToBoot
> 
> On 04/02/19 07:49, Zhichao Gao wrote:
> > Add two event guids.
> > And signal them immediately before and after the ReadyToBoot signal
> Event.
> >
> > Bret Barkelew (2):
> >   MdeModulePkg: Add event guids
> >   MdeModulePkg/UefiBootManagerlib: Add two event signals
> >
> >  .../Include/Guid/EventPostReadyToBoot.h       | 24
> +++++++++++++++++++
> >  .../Include/Guid/EventPreReadyToBoot.h        | 24
> +++++++++++++++++++
> >  .../Library/UefiBootManagerLib/BmBoot.c       |  2 ++
> >  .../Library/UefiBootManagerLib/InternalBm.h   |  4 +++-
> >  .../UefiBootManagerLib/UefiBootManagerLib.inf |  5 +++-
> >  MdeModulePkg/MdeModulePkg.dec                 |  6 +++++
> >  6 files changed, 63 insertions(+), 2 deletions(-)  create mode 100644
> > MdeModulePkg/Include/Guid/EventPostReadyToBoot.h
> >  create mode 100644
> MdeModulePkg/Include/Guid/EventPreReadyToBoot.h
> >
> 
> (1) You forgot to include the CC's from the individual patches on the cover
> letter. I'm fixing that now.
> 


Thanks for your kind work. I always forgot to add the Cc in cover-letter.

> 
> (2) This is my turn to ask whether the new event group GUIDs have been
> standardized and released in a public spec.
> 
> If they haven't, I'll nack this series -- contributors should be held to equal
> standards.
> 
> In particular, the variables are called "gEfiEventPostReadyToBootGuid"
> and "gEfiEventPreReadyToBootGuid". The "Efi" infix suggests these are
> standard event groups. However, in that case, I believe the changes should
> go into "MdePkg/Include/Guid/EventGroup.h", and TianoCore#1676 should
> minimally indicate the Mantis ticket that introduces the GUIDs.
> 
> I've now searched "UEFI_Spec_2_8_final.pdf" (from the USWG member
> area,
> SHA1 1adf5b81c566075574b3ad9e4091a42e9c9a80cb), and PI v1.7 too, for
> "7b94c75c", and there are no hits.

I knew these new event GUIDs were not in the public spec even the spec would publish later.
That is why I put them in MdeModulePkg and the single header file. And the name is inappropriate that you pointed out.

> 
> In theory, it would be totally fine to introduce these event group GUIDs as
> edk2 extensions. In theory. The last time I tried to do something similar, I was
> forced to go through the spec process however.
> 
> No double standards, please. If UefiBootManagerLib & BdsDxe are now open
> to edk2 extensions, and will no longer restrict themselves to specified
> behavior, that's great, but I will want it in writing; the policy should apply to
> everyone. (Adding Stephano.)
> 

I am new to this community. I did know the limit of UefiBootManagerLib & BdsDxe.
If it is conflict with the spec process, maybe this patch set should be dropped or pending.

Thanks,
Zhichao

> Thanks,
> Laszlo

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

end of thread, other threads:[~2019-04-02  9:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-02  5:49 [PATCH 0/2] Add event signal before and after ReadyToBoot Zhichao Gao
2019-04-02  5:49 ` [PATCH 1/2] MdeModulePkg: Add event guids Zhichao Gao
2019-04-02  5:49 ` [PATCH 2/2] MdeModulePkg/UefiBootManagerlib: Add two event signals Zhichao Gao
2019-04-02  8:40 ` [PATCH 0/2] Add event signal before and after ReadyToBoot Laszlo Ersek
2019-04-02  9:40   ` Gao, Zhichao

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