public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	Sami Mujawar <sami.mujawar@arm.com>,
	 Leif Lindholm <leif.lindholm@linaro.org>,
	Matteo Carlini <Matteo.Carlini@arm.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] ArmPkg: Dispatch deferred images after EndOfDxe
Date: Fri, 6 Dec 2019 10:02:39 +0000	[thread overview]
Message-ID: <CAKv+Gu8BpThw9_-Y++kU_6-10d5mdWn3k5TKEyxM19J_A8GDhw@mail.gmail.com> (raw)
In-Reply-To: <65b6fbb9-200f-1a78-db72-f75ea65f5919@redhat.com>

On Fri, 6 Dec 2019 at 00:05, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 12/06/19 00:54, Laszlo Ersek wrote:
> > On 12/05/19 21:25, Ard Biesheuvel wrote:
> >> On Wed, 1 May 2019 at 15:02, Sami Mujawar <sami.mujawar@arm.com>
> >> wrote:
>
> >> I'm still curious why this difference exists,
> >
> > What difference do you mean?
> >
> > (I can't see the original patch posting in my list folder, so I could
> > be missing parts of the discussion thus far.)
>
> Haha, I missed that Sami's email, which you just replied to, is dated "1
> May 2019" -- that's the reason I couldn't find the original posting in
> my edk2-devel folder. That message has already been moved into one of my
> archive folders :)
>
> But, now I do see it, and I also see that your first question in
> response was spot-on:
>
>   https://edk2.groups.io/g/devel/message/39901
>
> (alternative link:
>
>   http://mid.mail-archive.com/CAKv+Gu92gPzGvGZ3M9B52q1TOAvnBjgxpvykbAZPevMULkcF6w@mail.gmail.com
> )
>
> Your question there had a small typo -- I think you meant, "It might be
> that the PCI hierarchy is enumerated *after* EndOfDxe on Juno, and
> *before* on the other platforms."
>
> And yes, that would explain the difference between Juno and {SynQuacer,
> Overdrive} very well -- i.e. why Juno was broken and the other platforms
> were OK. (Assuming in all cases, the 3rd party dispatch occurred after
> EndOfDxe, where it is supposed to.)
>

Hi Laszlo,

Thanks for chiming in.

My question did not have a typo: if Juno enumerates PCI before
EndOfDxe, any option ROMs it encounters will not be dispatched and put
on the deferred list, which never gets processed. If it enumerates
after EndOfDxe, they just get dispatched immediately. That would
explain this behavior, *except* for the fact that these platforms use
the same PCI host bridge and bus drivers, the only difference is the
PciHostBridgeLib used.

The difference is probably explained by the explicit
gBS->ConnectController () connecting the PCI root bridge that takes
place in ArmJunoDxe in an EndOfDxe handler, which seems to be there so
we can set the MAC address on the Marvell Yukon. We should probably
move that to a protocol registration notification callback on the
PciIo protocol, and remove the ConnectController altogether.

Concerning your analysis regarding the order of connecting the PCI
root bridge and signalling EndOfDxe: I agree the OvmfPkg order is
better, since it permits builtin drivers (which are 'trusted') to
attach to devices in the PCIe hierarchy before EndOfDxe is signalled,
which may be useful.

  reply	other threads:[~2019-12-06 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 14:01 [PATCH v1 1/1] ArmPkg: Dispatch deferred images after EndOfDxe Sami Mujawar
2019-05-02  8:14 ` Ard Biesheuvel
2019-12-05 20:25 ` Ard Biesheuvel
2019-12-05 23:54   ` [edk2-devel] " Laszlo Ersek
2019-12-06  0:04     ` Laszlo Ersek
2019-12-06 10:02       ` Ard Biesheuvel [this message]
2019-12-06 10:33         ` Laszlo Ersek
2019-12-06 11:01           ` Ard Biesheuvel
2019-12-06  0:07     ` Laszlo Ersek

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=CAKv+Gu8BpThw9_-Y++kU_6-10d5mdWn3k5TKEyxM19J_A8GDhw@mail.gmail.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