From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"ard.biesheuvel@linaro.org" <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: Fri, 10 Jan 2020 01:19:45 +0000 [thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C3E2179@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu-2SXkCCY3J1LiAANJ7PTXJtW+gkRDQHozA5j+s1fEcbA@mail.gmail.com>
Ard,
I will give update on this by end of this week. sorry about the delay.
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard Biesheuvel
> Sent: Thursday, January 9, 2020 8:54 PM
> To: Ni, Ray <ray.ni@intel.com>
> Cc: devel@edk2.groups.io; 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####
>
> On Mon, 23 Dec 2019 at 15:09, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >
> > On Thu, 12 Dec 2019 at 10:05, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > >
> > > On Thu, 12 Dec 2019 at 09:59, Ni, Ray <ray.ni@intel.com> wrote:
> > > >
> > > > Ard,
> > > > I still cannot understand it.
> > > >
> > > > Since Driver#### are processed (process = LoadImage + StartImage) after EndOfDxe, they are not deferred.
> > > > It means the Driver#### entrypoints are called directly.
> > > > Inside the entrypoints, driverbinding protocols are installed.
> > > >
> > > > After that, EfiBootManagerConnectAllDefaultConsoles () uses driver model logic to start the proper GOP driver.
> > > >
> > >
> > > It only does that if the GOP console is already in the
> > > ConIn/ConOut/ConErr variables, no?
> > >
> > > Today, we have code in the PlatformBdsLib to traverse the PCI
> > > hierarchy to populate those ConXXX variables if we encounter any PCI
> > > graphics cards, but this is done in
> > > PlatformBootManagerBeforeConsole(), so if the Driver#### is loaded
> > > *after* PlatformBootManagerBeforeConsole(), it will not be added to
> > > ConXXX. So we need to process Driver#### before calling
> > > PlatformBootManagerBeforeConsole(), so that the driver is dispatches
> > > right after we call DispatchDeferredImages() but before we do the
> > > traversal and populate the COnXXX variables.
> > >
> > > How else do you propose we could make PCI graphics controllers
> > > supported by Driver#### options appear in COnXXX before
> > > EfiBootManagerConnectAllDefaultConsoles() is called?
> > >
> >
> > Ping?
> >
> >
>
> Ping again?
>
> > >
> > >
> > > >
> > > > > -----Original Message-----
> > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard Biesheuvel
> > > > > Sent: Wednesday, December 11, 2019 6:40 PM
> > > > > To: Ni, Ray <ray.ni@intel.com>
> > > > > Cc: Laszlo Ersek <lersek@redhat.com>; edk2-devel-groups-io <devel@edk2.groups.io>; 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 Mon, 9 Dec 2019 at 09:42, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > > > > >
> > > > > > On Mon, 9 Dec 2019 at 03:12, Ni, Ray <ray.ni@intel.com> wrote:
> > > > > > >
> > > > > > > > Exactly. This flow is identical to how option ROMs are processed if
> > > > > > > > they are discovered before EndOfDxe signalling completes (which is why
> > > > > > > > the Juno platform was broken without the call to
> > > > > > > > EfiBootManagerDispatchDeferredImages() in
> > > > > > > > PlatformBootManagerBeforeConsole())
> > > > > > > >
> > > > > > >
> > > > > > > Ard,
> > > > > > > I checked ArmPkg's PlatformBootManagerLib and found it doesn't
> > > > > > > call *DispatchDeferredImages() after signaling EndOfDxe.
> > > > > > >
> > > > > >
> > > > > > It does. We just added this in 0f9395d7c5cc6ae2beaa2d87008fe158d04a8069
> > > > > >
> > > > > > > The deferred image dispatch mechanism assumes the platform
> > > > > > > needs to call the *DispatchDeferredImages() after signaling EndOfDxe.
> > > > > > >
> > > > > >
> > > > > > Indeed.
> > > > > >
> > > > > > > I don't understand why the deferred image can be loaded with your patch.
> > > > > > > They are still deferred because the loading time is before EndOfDxe.
> > > > > > >
> > > > > >
> > > > > > Yes, but because PlatformBootManagerBeforeConsole () does all of this,
> > > > > > the only way to get Driver#### to work for consoles on GOP drivers, we
> > > > > > need to move it before that call.
> > > > >
> > > > > Any further comments on this patch?
> > > > >
> > > > >
> > > >
>
>
next prev parent reply other threads:[~2020-01-10 1:19 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 [this message]
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
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=734D49CCEBEEF84792F5B80ED585239D5C3E2179@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