public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Mark Kettenis <kettenis@jive.eu>
Cc: "Leif Lindholm" <leif.lindholm@linaro.org>,
	"Marcin Wojtas" <mw@semihalf.com>,
	edk2-devel-groups-io <devel@edk2.groups.io>,
	"Jan Dąbroś" <jsd@semihalf.com>,
	"Grzegorz Jaszczyk" <jaz@semihalf.com>,
	"Kostya Porotchkin" <kostap@marvell.com>,
	"Jici Gao" <Jici.Gao@arm.com>,
	"Rebecca Cran" <rebecca@bluestop.org>,
	kettenis@openbsd.org
Subject: Re: [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support
Date: Thu, 23 May 2019 19:13:20 +0100	[thread overview]
Message-ID: <CAKv+Gu9PZrSYr6wNs_EAC9dBbr7AGLO57jMNUA4ADRR_8sMT1A@mail.gmail.com> (raw)
In-Reply-To: <x7ya7fd123t.fsf@jive.eu>

On Thu, 23 May 2019 at 19:02, Mark Kettenis <kettenis@jive.eu> wrote:
>
> > Date: Thu, 23 May 2019 15:14:27 +0100
> > From: Leif Lindholm <leif.lindholm@linaro.org>
> >
> > On Thu, May 23, 2019 at 03:27:47PM +0200, Mark Kettenis wrote:
> > > > From: Marcin Wojtas <mw@semihalf.com>
> > > > Date: Mon, 20 May 2019 17:27:13 +0200
> > > >
> > > > Hi,
> > > >
> > > > Thank you for thorough review of v1. I submit second
> > > > version of the Armada7k8k PCIE support. I addressed
> > > > all comments. There is no functional change to initial
> > > > patchset, but mostly clean-up and improvements - please
> > > > refer to the changelog below.
> > > >
> > > > The patches are available in the github:
> > > > https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/pcie-upstream-r20190520
> > > >
> > > > I'm looking forward to your comments or remarks.
> > > >
> > > > Best regards,
> > > > Marcin
> > >
> > > Tested this on my mcbin running OpenBSD.  It incovers a small issue in
> > > our kernel which I'm fixing.  Otherwise this seems to work fine.
> > >
> > > So tested-by: Mark Kettenis <kettenis@openbsd.org> if that matters.
> >
> > Always helpful, thanks.
> >
> > Out of interest, what was the issue?
> > Could I still expect the 6.5 installer to run on this
> > hardware/firmware combo?
>
> That should still work fine.
>
> The issue is with mapping PCI ROMS, which currently fails with the new
> firmware due to an oversight in the OpenBSD code.  There are only a
> few OpenBSD drivers that attempt to map the PCI ROM.  But one of those
> is radeondrm(4) and I stuck an AMD graphics card into the PCIe slot on
> my machine.
>
> There is a bit of a firmware angle to this though.  The issue happens
> because the PCI ROM address register has been set to 0xfffe0000.  All
> the writable address bits in the register are set to 1.  While it is
> possible that the hardware comes up in that state, I suspect this is
> done by an attempt by the firmware to determine the size of the ROM
> that doesn't properly restore the original contents of the register.

UEFI deliberately leaves the ROM BARs unassigned, in order to avoid
wasting valuable 32-bit PCI MMIO space. It enables the BAR temporarily
to load the ROM, and dispatches it if it can. After that, it changes
the BAR back to the old unassigned value.

> It may be related to the following messages that are printed by the
> firmware:
>
> Image type X64 can't be loaded on AARCH64 UEFI system.
> Unloading driver at 0x00000000000

That address value is quite unexpected.

> Connect: PcieRoot(0x0)/Pci(0x0,0x0): Not Found
>
> Hmm, that's actually interesting.  Maybe I should play with the X86
> emulator that Ard added recently to see if that gives me a framebuffer
> console.
>

Yes, if you add edk2-staging to your PACKAGES_PATH env variable, all
you need to do is add -D X64EMU_ENABLE to the build command line.

If you do end up testing this, could you please report back with the
result, i.e., the type of card, PCI PID/VID and whether it all worked
as expected? Thanks.

  reply	other threads:[~2019-05-23 18:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 15:27 [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 03/14] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation Marcin Wojtas
2019-05-24 12:50   ` Ard Biesheuvel
2019-05-24 13:03     ` Marcin Wojtas
2019-05-24 13:08       ` Ard Biesheuvel
2019-05-24 14:28         ` Marcin Wojtas
2019-05-24 15:25           ` Ard Biesheuvel
2019-05-24 15:32             ` Leif Lindholm
2019-05-24 15:43               ` Marcin Wojtas
2019-05-24 15:46                 ` Ard Biesheuvel
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-23 13:27 ` [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Mark Kettenis
2019-05-23 14:14   ` Leif Lindholm
2019-05-23 18:01     ` kettenis
2019-05-23 18:13       ` Ard Biesheuvel [this message]
2019-05-23 20:11         ` Leif Lindholm
2019-05-23 20:24           ` Ard Biesheuvel
2019-05-24 13:08             ` Marcin Wojtas
2019-05-24 13:12               ` Ard Biesheuvel
2019-05-24 13:13                 ` Marcin Wojtas
2019-05-24 22:16         ` mark.kettenis
2019-05-25  9:47           ` Ard Biesheuvel

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+Gu9PZrSYr6wNs_EAC9dBbr7AGLO57jMNUA4ADRR_8sMT1A@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