public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier
Date: Wed, 7 Dec 2016 00:52:27 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E6622486AED44@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20161205015634.487520-1-ruiyu.ni@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Monday, December 05, 2016 9:57 AM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric; Zhang, Chao B
> Subject: [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier
> 
> PlatformBootManagerBeforeConsole() might want to display UI
> and ReadKeyStroke() call from UI depends on 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>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chao B Zhang <chao.b.zhang@intel.com>
> ---
>  MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 31 ++++++++++++++++++-------------
>  1 file changed, 18 insertions(+), 13 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
> index 98b3931..b5e6ef6 100644
> --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
> +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
> @@ -874,6 +874,23 @@ BdsEntry (
>      );
> 
>    //
> +  // 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:
>    // > Update console variable: 1. include hot-plug devices; 2. Clear ConIn and add SOL for AMT
> @@ -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 ();
>    }
> --
> 2.9.0.windows.1



      parent reply	other threads:[~2016-12-07  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05  1:56 [PATCH] MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier Ruiyu Ni
2016-12-06 11:17 ` Wang, Sunny (HPS SW)
2016-12-07  0:52 ` Dong, Eric [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=ED077930C258884BBCB450DB737E6622486AED44@shsmsx102.ccr.corp.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