From: "Zhen Gong" <zhen.gong@intel.com>
To: devel@edk2.groups.io
Cc: Zhen Gong <zhen.gong@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>
Subject: [edk2-devel] [PATCH edk2-platforms 1/1] IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callback
Date: Thu, 16 Nov 2023 15:42:22 -0800 [thread overview]
Message-ID: <6bc749b44eeed932426c046838c0901d15181a64.1700177884.git.zhen.gong@intel.com> (raw)
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/IpmiRedirFru.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/IpmiRedirFru.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/FruSmbios.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 (#111330): https://edk2.groups.io/g/devel/message/111330
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]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2023-11-16 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 23:42 Zhen Gong [this message]
2023-11-17 19:25 ` [edk2-devel] [PATCH edk2-platforms 1/1] IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callback Nate DeSimone
2023-11-17 19:49 ` Nate DeSimone
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=6bc749b44eeed932426c046838c0901d15181a64.1700177884.git.zhen.gong@intel.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