public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Gong, Zhen" <zhen.gong@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/1] IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callback
Date: Fri, 17 Nov 2023 19:49:26 +0000	[thread overview]
Message-ID: <MW4PR11MB5821083CDF275C3D4916867DCDB7A@MW4PR11MB5821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <6bc749b44eeed932426c046838c0901d15181a64.1700177884.git.zhen.gong@intel.com>

Pushed as 937e87b.

-----Original Message-----
From: Gong, Zhen <zhen.gong@intel.com> 
Sent: Thursday, November 16, 2023 3:42 PM
To: devel@edk2.groups.io
Cc: Gong, Zhen <zhen.gong@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [PATCH edk2-platforms 1/1] IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callback

Use AfterConsole event instead of ReadyToBoot for callback so the driver  can update SMBIOS table before booting to setup menu.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Change-Id: Ife697f4c78449b90f17ffa7b7bc5a6a5f77d9436
Signed-off-by: Zhen Gong <zhen.gong@intel.com>
---
 .../IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.inf |  3 ++-
 .../IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.h   |  1 -
 .../IpmiFeaturePkg/IpmiRedirFru/FruSmbios.c      | 16 +++++++++-------
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.inf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.inf
index 24fbc94128da..814f595b5abe 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.inf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/Ipm
+++ iRedirFru.inf
@@ -25,6 +25,7 @@ [Packages]
   IpmiFeaturePkg/IpmiFeaturePkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
 
 [LibraryClasses]
   UefiDriverEntryPoint
@@ -32,12 +33,12 @@ [LibraryClasses]
   UefiBootServicesTableLib
   BaseMemoryLib
   MemoryAllocationLib
-  UefiLib
   IpmiBaseLib
 
 [Guids]
   gEfiIpmiFormatFruGuid
   gEfiSystemTypeFruGuid
+  gBdsEventAfterConsoleReadyBeforeBootOptionGuid
 
 [Protocols]
   gEfiSmbiosProtocolGuid
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.h b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.h
index 9fd0067973a6..b5ffe1ad0518 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/IpmiRedirFru.h
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/Ipm
+++ iRedirFru.h
@@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include <Uefi.h>  #include <Library/BaseLib.h>  #include <Library/DebugLib.h> -#include <Library/UefiLib.h>
 
 #include <Library/BaseMemoryLib.h>
 #include <Library/MemoryAllocationLib.h> diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/FruSmbios.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/FruSmbios.c
index bd4b35ba5793..9c63fae42678 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/FruSmbios.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiRedirFru/Fru
+++ Smbios.c
@@ -454,15 +454,17 @@ GenerateFruSmbiosData (
 
   mFruRedirProtocol = This;
 
-  Status = EfiCreateEventReadyToBootEx (
-             TPL_CALLBACK,
-             GenerateFruSmbiosType123DataNotified,
-             NULL,
-             &Event
-             );
+  Status = gBS->CreateEventEx (
+                  EVT_NOTIFY_SIGNAL,
+                  TPL_CALLBACK,
+                  GenerateFruSmbiosType123DataNotified,
+                  NULL,
+                  &gBdsEventAfterConsoleReadyBeforeBootOptionGuid,
+                  &Event
+                  );
 
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "GenerateFruSmbiosData(): EfiCreateEventReadyToBootEx failed with return value: %r\n", Status));
+    DEBUG ((DEBUG_ERROR, "GenerateFruSmbiosData(): Create AfterConsole 
+ event failed with return value: %r\n", Status));
   }
 
   return;
--
2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111409): https://edk2.groups.io/g/devel/message/111409
Mute This Topic: https://groups.io/mt/102638229/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      parent reply	other threads:[~2023-11-17 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 23:42 [edk2-devel] [PATCH edk2-platforms 1/1] IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callback Zhen Gong
2023-11-17 19:25 ` Nate DeSimone
2023-11-17 19:49 ` Nate DeSimone [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=MW4PR11MB5821083CDF275C3D4916867DCDB7A@MW4PR11MB5821.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