public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
@ 2021-02-02  8:33 Patrick Rudolph
  2021-02-03  9:32 ` [edk2-devel] " Wang, Sunny (HPS SW)
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Rudolph @ 2021-02-02  8:33 UTC (permalink / raw)
  To: devel; +Cc: aiden.park, benjamin.you, philipp.deppenwiese, maurice.ma,
	guo.dong

Currently the console is connected before EndOfDxe causing OptionsROMs
to be loaded, but their drivers aren't used and thus no GOP is installed.

To make use of 3rdparty OptionROMs connect the console after EndOfDxe.

Tested on Intel CFL board using Nvidia Quadro GPU.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index c5c6af0abc..7fa3a048b7 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -157,8 +157,6 @@ PlatformBootManagerBeforeConsole (
   EFI_INPUT_KEY                Down;
   EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
 
-  PlatformConsoleInit ();
-
   //
   // Register ENTER as CONTINUE key
   //
@@ -192,6 +190,8 @@ PlatformBootManagerBeforeConsole (
   // Dispatch deferred images after EndOfDxe event and ReadyToLock installation.
   //
   EfiBootManagerDispatchDeferredImages ();
+
+  PlatformConsoleInit ();
 }
 
 /**
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
  2021-02-02  8:33 [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe Patrick Rudolph
@ 2021-02-03  9:32 ` Wang, Sunny (HPS SW)
  2021-02-03 10:25   ` Patrick Rudolph
  0 siblings, 1 reply; 5+ messages in thread
From: Wang, Sunny (HPS SW) @ 2021-02-03  9:32 UTC (permalink / raw)
  To: devel@edk2.groups.io, patrick.rudolph@9elements.com
  Cc: aiden.park@intel.com, benjamin.you@intel.com,
	philipp.deppenwiese@9elements.com, maurice.ma@intel.com,
	guo.dong@intel.com, Wang, Sunny (HPS SW)

Hi Patrick,

I'm not familiar with UefiPayloadPkg. However, since we may want to enable the trusted console as earlier as possible, you may still need to keep the PlatformConsoleInit() call at the beginning of PlatformBootManagerBeforeConsole() to support the platform that has trusted/on-board Consoles.   

Regards,
Sunny Wang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Patrick Rudolph
Sent: Tuesday, February 2, 2021 4:34 PM
To: devel@edk2.groups.io
Cc: aiden.park@intel.com; benjamin.you@intel.com; philipp.deppenwiese@9elements.com; maurice.ma@intel.com; guo.dong@intel.com
Subject: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe

Currently the console is connected before EndOfDxe causing OptionsROMs to be loaded, but their drivers aren't used and thus no GOP is installed.

To make use of 3rdparty OptionROMs connect the console after EndOfDxe.

Tested on Intel CFL board using Nvidia Quadro GPU.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
 UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index c5c6af0abc..7fa3a048b7 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.
+++ c
@@ -157,8 +157,6 @@ PlatformBootManagerBeforeConsole (
   EFI_INPUT_KEY                Down;
   EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
 
-  PlatformConsoleInit ();
-
   //
   // Register ENTER as CONTINUE key
   //
@@ -192,6 +190,8 @@ PlatformBootManagerBeforeConsole (
   // Dispatch deferred images after EndOfDxe event and ReadyToLock installation.
   //
   EfiBootManagerDispatchDeferredImages ();
+
+  PlatformConsoleInit ();
 }
 
 /**
--
2.26.2







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
  2021-02-03  9:32 ` [edk2-devel] " Wang, Sunny (HPS SW)
@ 2021-02-03 10:25   ` Patrick Rudolph
  2021-02-05 23:15     ` Guo Dong
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Rudolph @ 2021-02-03 10:25 UTC (permalink / raw)
  To: Wang, Sunny (HPS SW)
  Cc: devel@edk2.groups.io, aiden.park@intel.com,
	benjamin.you@intel.com, philipp.deppenwiese@9elements.com,
	maurice.ma@intel.com, guo.dong@intel.com

Hi Sunny,
none of the other packages are doing this before EndOfDxe. And there's
no point in having trusted console as earlier as possible, as nothing
is displayed in PlatformBootManagerBeforeConsole().
Please explain your use case. I don't see one here.

Kind Regards,
Patrick Rudolph

On Wed, Feb 3, 2021 at 10:32 AM Wang, Sunny (HPS SW) <sunnywang@hpe.com> wrote:
>
> Hi Patrick,
>
> I'm not familiar with UefiPayloadPkg. However, since we may want to enable the trusted console as earlier as possible, you may still need to keep the PlatformConsoleInit() call at the beginning of PlatformBootManagerBeforeConsole() to support the platform that has trusted/on-board Consoles.
>
> Regards,
> Sunny Wang
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Patrick Rudolph
> Sent: Tuesday, February 2, 2021 4:34 PM
> To: devel@edk2.groups.io
> Cc: aiden.park@intel.com; benjamin.you@intel.com; philipp.deppenwiese@9elements.com; maurice.ma@intel.com; guo.dong@intel.com
> Subject: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
>
> Currently the console is connected before EndOfDxe causing OptionsROMs to be loaded, but their drivers aren't used and thus no GOP is installed.
>
> To make use of 3rdparty OptionROMs connect the console after EndOfDxe.
>
> Tested on Intel CFL board using Nvidia Quadro GPU.
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> ---
>  UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> index c5c6af0abc..7fa3a048b7 100644
> --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.
> +++ c
> @@ -157,8 +157,6 @@ PlatformBootManagerBeforeConsole (
>    EFI_INPUT_KEY                Down;
>    EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
>
> -  PlatformConsoleInit ();
> -
>    //
>    // Register ENTER as CONTINUE key
>    //
> @@ -192,6 +190,8 @@ PlatformBootManagerBeforeConsole (
>    // Dispatch deferred images after EndOfDxe event and ReadyToLock installation.
>    //
>    EfiBootManagerDispatchDeferredImages ();
> +
> +  PlatformConsoleInit ();
>  }
>
>  /**
> --
> 2.26.2
>
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
  2021-02-03 10:25   ` Patrick Rudolph
@ 2021-02-05 23:15     ` Guo Dong
  2021-02-09  2:27       ` Wang, Sunny (HPS SW)
  0 siblings, 1 reply; 5+ messages in thread
From: Guo Dong @ 2021-02-05 23:15 UTC (permalink / raw)
  To: Patrick Rudolph, Wang, Sunny (HPS SW)
  Cc: devel@edk2.groups.io, Park, Aiden, You, Benjamin,
	philipp.deppenwiese@9elements.com, Ma, Maurice


Trusted console is required for TCG Physical Presence and only trusted console could 
be connected before EndOfDxe. Since TCG Physical Presence is not enabled yet in
the UefiPayloadPkg, I think it is ok to have this change. 

Reviewed-by: Guo Dong <guo.dong@intel.com>

> -----Original Message-----
> From: Patrick Rudolph <patrick.rudolph@9elements.com>
> Sent: Wednesday, February 3, 2021 3:26 AM
> To: Wang, Sunny (HPS SW) <sunnywang@hpe.com>
> Cc: devel@edk2.groups.io; Park, Aiden <aiden.park@intel.com>; You, Benjamin
> <benjamin.you@intel.com>; philipp.deppenwiese@9elements.com; Ma,
> Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>
> Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager:
> Connect console after EndOfDxe
> 
> Hi Sunny,
> none of the other packages are doing this before EndOfDxe. And there's
> no point in having trusted console as earlier as possible, as nothing
> is displayed in PlatformBootManagerBeforeConsole().
> Please explain your use case. I don't see one here.
> 
> Kind Regards,
> Patrick Rudolph
> 
> On Wed, Feb 3, 2021 at 10:32 AM Wang, Sunny (HPS SW)
> <sunnywang@hpe.com> wrote:
> >
> > Hi Patrick,
> >
> > I'm not familiar with UefiPayloadPkg. However, since we may want to enable
> the trusted console as earlier as possible, you may still need to keep the
> PlatformConsoleInit() call at the beginning of
> PlatformBootManagerBeforeConsole() to support the platform that has
> trusted/on-board Consoles.
> >
> > Regards,
> > Sunny Wang
> >
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Patrick
> Rudolph
> > Sent: Tuesday, February 2, 2021 4:34 PM
> > To: devel@edk2.groups.io
> > Cc: aiden.park@intel.com; benjamin.you@intel.com;
> philipp.deppenwiese@9elements.com; maurice.ma@intel.com;
> guo.dong@intel.com
> > Subject: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager:
> Connect console after EndOfDxe
> >
> > Currently the console is connected before EndOfDxe causing OptionsROMs to
> be loaded, but their drivers aren't used and thus no GOP is installed.
> >
> > To make use of 3rdparty OptionROMs connect the console after EndOfDxe.
> >
> > Tested on Intel CFL board using Nvidia Quadro GPU.
> >
> > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > ---
> >  UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c |
> 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> > index c5c6af0abc..7fa3a048b7 100644
> > ---
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> > +++
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.
> > +++ c
> > @@ -157,8 +157,6 @@ PlatformBootManagerBeforeConsole (
> >    EFI_INPUT_KEY                Down;
> >    EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
> >
> > -  PlatformConsoleInit ();
> > -
> >    //
> >    // Register ENTER as CONTINUE key
> >    //
> > @@ -192,6 +190,8 @@ PlatformBootManagerBeforeConsole (
> >    // Dispatch deferred images after EndOfDxe event and ReadyToLock
> installation.
> >    //
> >    EfiBootManagerDispatchDeferredImages ();
> > +
> > +  PlatformConsoleInit ();
> >  }
> >
> >  /**
> > --
> > 2.26.2
> >
> >
> >
> > 
> >
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe
  2021-02-05 23:15     ` Guo Dong
@ 2021-02-09  2:27       ` Wang, Sunny (HPS SW)
  0 siblings, 0 replies; 5+ messages in thread
From: Wang, Sunny (HPS SW) @ 2021-02-09  2:27 UTC (permalink / raw)
  To: Dong, Guo, Patrick Rudolph
  Cc: devel@edk2.groups.io, Park, Aiden, You, Benjamin,
	philipp.deppenwiese@9elements.com, Ma, Maurice,
	Wang, Sunny (HPS SW)

Sorry for the delay.
Thanks for clarifying and further checking this, Dong.
I think some platforms in https://github.com/tianocore/edk2-platforms would do this before EndOfDxe. 
Yeah, I agree with Dong. If UefiPayloadPkg doesn't support trusted console and may not support it in the future, I also think it's fine to have this change. 

Reviewed-by: Sunny Wang < sunnywang@hpe.com>

Regards,
Sunny Wang

-----Original Message-----
From: Dong, Guo <guo.dong@intel.com> 
Sent: Saturday, February 6, 2021 7:16 AM
To: Patrick Rudolph <patrick.rudolph@9elements.com>; Wang, Sunny (HPS SW) <sunnywang@hpe.com>
Cc: devel@edk2.groups.io; Park, Aiden <aiden.park@intel.com>; You, Benjamin <benjamin.you@intel.com>; philipp.deppenwiese@9elements.com; Ma, Maurice <maurice.ma@intel.com>
Subject: RE: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe


Trusted console is required for TCG Physical Presence and only trusted console could be connected before EndOfDxe. Since TCG Physical Presence is not enabled yet in the UefiPayloadPkg, I think it is ok to have this change. 

Reviewed-by: Guo Dong <guo.dong@intel.com>

> -----Original Message-----
> From: Patrick Rudolph <patrick.rudolph@9elements.com>
> Sent: Wednesday, February 3, 2021 3:26 AM
> To: Wang, Sunny (HPS SW) <sunnywang@hpe.com>
> Cc: devel@edk2.groups.io; Park, Aiden <aiden.park@intel.com>; You, 
> Benjamin <benjamin.you@intel.com>; philipp.deppenwiese@9elements.com; 
> Ma, Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>
> Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager:
> Connect console after EndOfDxe
> 
> Hi Sunny,
> none of the other packages are doing this before EndOfDxe. And there's 
> no point in having trusted console as earlier as possible, as nothing 
> is displayed in PlatformBootManagerBeforeConsole().
> Please explain your use case. I don't see one here.
> 
> Kind Regards,
> Patrick Rudolph
> 
> On Wed, Feb 3, 2021 at 10:32 AM Wang, Sunny (HPS SW) 
> <sunnywang@hpe.com> wrote:
> >
> > Hi Patrick,
> >
> > I'm not familiar with UefiPayloadPkg. However, since we may want to 
> > enable
> the trusted console as earlier as possible, you may still need to keep 
> the
> PlatformConsoleInit() call at the beginning of
> PlatformBootManagerBeforeConsole() to support the platform that has 
> trusted/on-board Consoles.
> >
> > Regards,
> > Sunny Wang
> >
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of 
> > Patrick
> Rudolph
> > Sent: Tuesday, February 2, 2021 4:34 PM
> > To: devel@edk2.groups.io
> > Cc: aiden.park@intel.com; benjamin.you@intel.com;
> philipp.deppenwiese@9elements.com; maurice.ma@intel.com; 
> guo.dong@intel.com
> > Subject: [edk2-devel] [PATCH] UefiPayloadPkg/PlatformBootManager:
> Connect console after EndOfDxe
> >
> > Currently the console is connected before EndOfDxe causing 
> > OptionsROMs to
> be loaded, but their drivers aren't used and thus no GOP is installed.
> >
> > To make use of 3rdparty OptionROMs connect the console after EndOfDxe.
> >
> > Tested on Intel CFL board using Nvidia Quadro GPU.
> >
> > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > ---
> >  UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c 
> > |
> 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> > index c5c6af0abc..7fa3a048b7 100644
> > ---
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> > +++
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.
> > +++ c
> > @@ -157,8 +157,6 @@ PlatformBootManagerBeforeConsole (
> >    EFI_INPUT_KEY                Down;
> >    EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
> >
> > -  PlatformConsoleInit ();
> > -
> >    //
> >    // Register ENTER as CONTINUE key
> >    //
> > @@ -192,6 +190,8 @@ PlatformBootManagerBeforeConsole (
> >    // Dispatch deferred images after EndOfDxe event and ReadyToLock
> installation.
> >    //
> >    EfiBootManagerDispatchDeferredImages ();
> > +
> > +  PlatformConsoleInit ();
> >  }
> >
> >  /**
> > --
> > 2.26.2
> >
> >
> >
> > 
> >
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-09  2:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02  8:33 [PATCH] UefiPayloadPkg/PlatformBootManager: Connect console after EndOfDxe Patrick Rudolph
2021-02-03  9:32 ` [edk2-devel] " Wang, Sunny (HPS SW)
2021-02-03 10:25   ` Patrick Rudolph
2021-02-05 23:15     ` Guo Dong
2021-02-09  2:27       ` Wang, Sunny (HPS SW)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox