From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=MbiTeuVL; spf=pass (domain: linaro.org, ip: 209.85.166.194, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-it1-f194.google.com (mail-it1-f194.google.com [209.85.166.194]) by groups.io with SMTP; Thu, 23 May 2019 11:13:33 -0700 Received: by mail-it1-f194.google.com with SMTP id j17so8913025itk.0 for ; Thu, 23 May 2019 11:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SOU6r8bCwlOTv1DzYR6KZXyZ0AkAcMQXa43yxozh/Og=; b=MbiTeuVL0PcDN7aM2PjZHZg/oUP0CjKg9qRrW2cduOQfJrPYF7u5EeD3DZwPLUFjlN wOdmepMLwAaqwArH1DJ28WwjzMBa9l2uyslQfYBqAkwmVvbJNH5CzT7rXl6hP37Cqih7 jYSeYWs6kMkRo6wBVymWge7auCrXIyoi79I5AQFM9B2YRBu3BvbdyTcGPnl0xhQBNT1u uj2o65shcf2XfNT3UwZ0U+jm/ErUKd/YZmEw6mtC1ocIkBgUCW+Pa08XA35QHJGdGIGY Zqm11aPQW/XLXD9dSzlPKqlCsWOj8SY+QoTNEL+sniAC5QR9vh1HQHlrIJINoRgwVXaR UfNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SOU6r8bCwlOTv1DzYR6KZXyZ0AkAcMQXa43yxozh/Og=; b=aYAVM38v2zSV87mLvtQWaKFX0rJT7DGNznxSUL28lQHPS4TZeMKu5aFXG1jDEedOZU /848+lDBGyQ98N+uPaHO73a3kQNkEhkIrbwHXbgqs57vgHhE/GNRbG7sLoVmsd8MtBDy T70nm3Ai6I5NbZPhAAs/8P6343kcFQdwbfqq9KFyq+ZyBKxVSlhz9FZlFPan5SOMBs5D iu6iRg1vxqzyfkTJe+iUWTPKSHzjC/3yDp/gwjGrZ6al7SdsJQWYgPBSlo8rfC67n+84 CVxPWJqiRqQrjVFD7yMY5qr09Wfr0gcA8A9XzLVVQqWp8h2iNukzoANAWugPGMAR/8rh 1PQA== X-Gm-Message-State: APjAAAVDlqZjCHrpzxJ48xltkbnw9xF0V76ni1mXA6lIAiGO0JdHARWE G2QVX5AH+Fmr/Vma3WBrIp9lfKjTfEWbH297l0sNIg== X-Google-Smtp-Source: APXvYqzTDgfevquD3bwLfafjoeo0dWX7VDjGDzRILuXiF41srIBIJ20GY5+dM36nHelkIq3OZHwmWJVyR/VfFNMmoKg= X-Received: by 2002:a24:d00e:: with SMTP id m14mr13429001itg.153.1558635212861; Thu, 23 May 2019 11:13:32 -0700 (PDT) MIME-Version: 1.0 References: <1558366047-15994-1-git-send-email-mw@semihalf.com> <20190523141426.rvuqh2nfe3vepm4p@bivouac.eciton.net> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 23 May 2019 19:13:20 +0100 Message-ID: Subject: Re: [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support To: Mark Kettenis Cc: Leif Lindholm , Marcin Wojtas , edk2-devel-groups-io , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Grzegorz Jaszczyk , Kostya Porotchkin , Jici Gao , Rebecca Cran , kettenis@openbsd.org Content-Type: text/plain; charset="UTF-8" On Thu, 23 May 2019 at 19:02, Mark Kettenis wrote: > > > Date: Thu, 23 May 2019 15:14:27 +0100 > > From: Leif Lindholm > > > > On Thu, May 23, 2019 at 03:27:47PM +0200, Mark Kettenis wrote: > > > > From: Marcin Wojtas > > > > 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 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.