/** @file\r
Head file for BDS Architectural Protocol implementation\r
\r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Guid/StatusCodeDataTypeId.h>\r
#include <Guid/LegacyDevOrder.h>\r
#include <Guid/BdsHii.h>\r
+#include <Guid/ConnectConInEvent.h>\r
#include <Protocol/GenericMemoryTest.h>\r
#include <Protocol/FormBrowser2.h>\r
#include <Protocol/HiiConfigAccess.h>\r
return Status;\r
}\r
\r
+\r
+/**\r
+ An empty function to pass error checking of CreateEventEx ().\r
+\r
+ @param Event Event whose notification function is being invoked.\r
+ @param Context Pointer to the notification function's context,\r
+ which is implementation-dependent.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+BdsEmptyCallbackFunction (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ )\r
+{\r
+}\r
+\r
/**\r
\r
This function attempts to boot for the boot order specified\r
CHAR16 Buffer[20];\r
BOOLEAN BootNextExist;\r
LIST_ENTRY *LinkBootNext;\r
+ EFI_EVENT ConnectConInEvent;\r
\r
//\r
// Got the latest boot option\r
//\r
BootNextExist = FALSE;\r
LinkBootNext = NULL;\r
+ ConnectConInEvent = NULL;\r
InitializeListHead (&BootLists);\r
\r
//\r
//\r
ZeroMem (Buffer, sizeof (Buffer));\r
\r
+ //\r
+ // Create Event to signal ConIn connection request\r
+ //\r
+ if (PcdGetBool (PcdConInConnectOnDemand)) {\r
+ Status = gBS->CreateEventEx (\r
+ EVT_NOTIFY_SIGNAL,\r
+ TPL_CALLBACK,\r
+ BdsEmptyCallbackFunction,\r
+ NULL,\r
+ &gConnectConInEventGuid,\r
+ &ConnectConInEvent\r
+ );\r
+ if (EFI_ERROR(Status)) {\r
+ ConnectConInEvent = NULL;\r
+ }\r
+ }\r
+\r
if (mBootNext != NULL) {\r
//\r
// Indicate we have the boot next variable, so this time\r
// Check the boot option list first\r
//\r
if (Link == &BootLists) {\r
+ //\r
+ // When LazyConIn enabled, signal connect ConIn event before enter UI\r
+ //\r
+ if (PcdGetBool (PcdConInConnectOnDemand) && ConnectConInEvent != NULL) {\r
+ gBS->SignalEvent (ConnectConInEvent);\r
+ }\r
+\r
//\r
// There are two ways to enter here:\r
// 1. There is no active boot option, give user chance to\r
// Boot success, then stop process the boot order, and\r
// present the boot manager menu, front page\r
//\r
+\r
+ //\r
+ // When LazyConIn enabled, signal connect ConIn Event before enter UI\r
+ //\r
+ if (PcdGetBool (PcdConInConnectOnDemand) && ConnectConInEvent != NULL) {\r
+ gBS->SignalEvent (ConnectConInEvent);\r
+ }\r
+\r
Timeout = 0xffff;\r
PlatformBdsEnterFrontPage (Timeout, FALSE);\r
\r