public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "afish@apple.com" <afish@apple.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	"Gao, Zhichao" <zhichao.gao@intel.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"Dong, Guo" <guo.dong@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver####
Date: Wed, 15 Jan 2020 03:12:02 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C3F51D1@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <E7C5C723-5EB5-419D-952A-3CC594298164@apple.com>

> -----Original Message-----
> From: afish@apple.com <afish@apple.com>
> Sent: Wednesday, January 15, 2020 1:45 AM
> To: devel@edk2.groups.io; Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>; Ni, Ray <ray.ni@intel.com>; Leif
> Lindholm <leif.lindholm@linaro.org>; Gao, Zhichao <zhichao.gao@intel.com>;
> Ma, Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>;
> You, Benjamin <benjamin.you@intel.com>
> Subject: Re: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow
> consoles on drivers loaded via Driver####
> 
> 
> 
> > On Jan 14, 2020, at 8:46 AM, Ard Biesheuvel <ard.biesheuvel@linaro.org>
> wrote:
> >
> > On Mon, 13 Jan 2020 at 18:57, Andrew Fish via Groups.Io
> > <afish=apple.com@groups.io> wrote:
> >>
> >> Ard,
> >>
> >> Is the problem GFX console? Would it be possible to have a PCD to
> assume graphics console, and if non was found on the boot connect those
> PCI devices and update the NVRAM to cause a console to connect. You might
> have to do a 2nd connect on the GOP handle after the nvram variable was
> written to make the ConSpliter see it?
> >>
> >
> > I'm not sure I follow. Do you mean update the console variable if it
> > doesn't contain the GOP produced by the Driver#### option and reboot?
> >
> 
> Ard,
> 
> I was thinking this specific case was no active GOP driver in the system due to
> the emulation of the ROM. I was saying there could be a platform policy to
> require GOP, and there could be a  platform hook point to check for no GOP
> and take action. This is not really a Driver#### path, but a fallback path for no
> GOP. So that is kind of cheating :).
> 
> Also I was thinking the ConSpliter would activate the new GOP if you do a
> 2nd gBS->ConnectController on the Graphics PCI or GOP handle after
> updating the console nvram variable.
> 
> Sorry I'm not really familiar with the modern TianoCore BDS, as we have a
> custom BDS on Macs, so I'm talking more hypothetically about how BDS could
> work.

Andrew,
TianoCore BDS in this part is very simple. The BDS core expects a platform
hook (PlatformBootManagerBeforeConsole()) to initialize every BDS related UEFI
variables like ConIn, ConOut, Driver####, Boot####, DriverOrder, BootOrder, etc.
Then BDS core consumes these variables and acts accordingly.
I think the "platform hook" you suggested is similar to what I suggested earlier,
except that you think that putting GOP in Driver#### is unnecessary.

Ard,
Assuming you've put GOP driver path to Driver####,
you could put below code in the beginning of PlatformBootManagerAfterConsole():
1. Find the GFX controller handle
2. EfiBootManagerConnectVideoController (GFXHandle)

Thanks,
Ray


  reply	other threads:[~2020-01-15  3:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 14:31 [RFC PATCH 0/2] MdeModulePkg: reorder Driver#### handling for console drivers Ard Biesheuvel
2019-12-06 14:31 ` [RFC PATCH 1/2] MdeModulePkg/PlatformBootManagerLib: document change of Driver#### handling Ard Biesheuvel
2019-12-06 14:31 ` [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver#### Ard Biesheuvel
2019-12-06 15:43   ` Laszlo Ersek
2019-12-06 15:50     ` Ard Biesheuvel
2019-12-09  2:12       ` Ni, Ray
2019-12-09  8:42         ` Ard Biesheuvel
2019-12-11 10:40           ` Ard Biesheuvel
2019-12-12  8:59             ` [edk2-devel] " Ni, Ray
2019-12-12  9:05               ` Ard Biesheuvel
2019-12-23 14:09                 ` Ard Biesheuvel
2020-01-09 12:54                   ` Ard Biesheuvel
2020-01-10  1:19                     ` Ni, Ray
2020-01-10 14:37                       ` Ni, Ray
2020-01-10 16:23                         ` Laszlo Ersek
2020-01-13 17:28                           ` Ard Biesheuvel
2020-01-13 17:57                             ` Andrew Fish
2020-01-14 16:46                               ` Ard Biesheuvel
2020-01-14 17:45                                 ` Andrew Fish
2020-01-15  3:12                                   ` Ni, Ray [this message]
2020-01-15  3:14                           ` Ni, Ray

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=734D49CCEBEEF84792F5B80ED585239D5C3F51D1@SHSMSX104.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