mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier
PlatformBootManagerBeforeConsole() might want to trigger this event to connect ConIn so BdsDxe initializes this event before PlatformBootManagerBeforeConsole(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com> Cc: Chao B Zhang <chao.b.zhang@intel.com>
This commit is contained in:
parent
c497dcc8e5
commit
8537bd7ef6
@ -873,6 +873,23 @@ BdsEntry (
|
||||
(EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS)
|
||||
);
|
||||
|
||||
//
|
||||
// Initialize ConnectConIn event before calling platform code.
|
||||
//
|
||||
if (PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
Status = gBS->CreateEventEx (
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_CALLBACK,
|
||||
BdsDxeOnConnectConInCallBack,
|
||||
NULL,
|
||||
&gConnectConInEventGuid,
|
||||
&gConnectConInEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gConnectConInEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Do the platform init, can be customized by OEM/IBV
|
||||
// Possible things that can be done in PlatformBootManagerBeforeConsole:
|
||||
@ -905,21 +922,9 @@ BdsEntry (
|
||||
if (PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
EfiBootManagerConnectConsoleVariable (ConOut);
|
||||
EfiBootManagerConnectConsoleVariable (ErrOut);
|
||||
|
||||
//
|
||||
// Initialize ConnectConIn event
|
||||
// Do not connect ConIn devices when lazy ConIn feature is ON.
|
||||
//
|
||||
Status = gBS->CreateEventEx (
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_CALLBACK,
|
||||
BdsDxeOnConnectConInCallBack,
|
||||
NULL,
|
||||
&gConnectConInEventGuid,
|
||||
&gConnectConInEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gConnectConInEvent = NULL;
|
||||
}
|
||||
} else {
|
||||
EfiBootManagerConnectAllDefaultConsoles ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user