From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 40BF41A1E06 for ; Mon, 26 Sep 2016 05:54:41 -0700 (PDT) Received: by mail-io0-x231.google.com with SMTP id e66so91049102iod.1 for ; Mon, 26 Sep 2016 05:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Wiz7tAeUF8Moq3zgB5yRRGZc84PjWZdZtprpnPgTuAQ=; b=BdHLKpnRjeZGFP1FLmIDXUDYulBxJiSdrBUJbE9mued+F/GZWK6kMcJTd2rl0kzAVL RSfrYwwqUwRxndZXAS5przt9g6mXR0dYlNmzq/yWCCqla75K0dEobJ1mBw4Q71Gg5kPX LfuXK/jvd8IYhhYFzDKY70CCYspfhcoX1sYt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Wiz7tAeUF8Moq3zgB5yRRGZc84PjWZdZtprpnPgTuAQ=; b=gg/ocZBHopB60UNwjZZ8SCFIpBuOSExy5T90uKrEgS7YbMKQfuLG63Y0o4TKAp1nHK XswFQMruVVRlGFfVyXHFjy3OVAyiuyOVAyR4sBsd/ihfoSDq1H2XKShlS/iG60Do3LP4 snI7n5iTl4Gj2LgoDIc3JtypAdW1TvxfUbwOYDjR4DqXxRdvaBntpo8/Oz8Byvthg1Wg yT64Yr3AmumL0/KwwuzWTcZ1UdN0118fcj68PnOGjgST3tAryplx+1GZFO6BGKGg0B2x AJvYKZWs4zhokKdT4WRmjEgo38kdIcwAi4OMINxV9Nzt84/P1xZ1H6WczhcIql1hsaVD 5rLQ== X-Gm-Message-State: AE9vXwNl17rKI9L6syO2Q2cesIFJ0fOGkO68HGPlkKBgC/y+u6xrpPprrza7csaL9rpmREONvFNJgkyzkhs3p0GY X-Received: by 10.107.133.17 with SMTP id h17mr27068232iod.148.1474894480643; Mon, 26 Sep 2016 05:54:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Mon, 26 Sep 2016 05:54:40 -0700 (PDT) In-Reply-To: <9e187728-7127-d665-16e8-3b661571e3a3@redhat.com> References: <1473674479-20207-1-git-send-email-ard.biesheuvel@linaro.org> <9e187728-7127-d665-16e8-3b661571e3a3@redhat.com> From: Ard Biesheuvel Date: Mon, 26 Sep 2016 05:54:40 -0700 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH 0/3] ArmPkg ArmVirtPkg: prevent 64-bit MMIO BAR degradation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 12:54:41 -0000 Content-Type: text/plain; charset=UTF-8 On 12 September 2016 at 04:57, Laszlo Ersek wrote: > On 09/12/16 12:01, Ard Biesheuvel wrote: >> On ARM/Linux systems, the PCI layer is usually reconfigured from scratch, >> given the embedded legacy of ARM systems. However, when booting arm64/Linux >> in ACPI mode, such reconfiguration can be avoided, since ACPI implies UEFI >> implies firmware (as opposed to DT mode, which could be booted via QEMU's >> ~10 instruction bootloader) >> >> In this case, it is important for the firmware to leave the PCI configuration >> in a reasonable state, and one of the things that UEFI does by default, and >> which makes no sense at all on an arm64 system, is to degrade 64-bit MMIO BARs >> to 32-bit in the presence of a ROM BAR on the same device. (It does makes sense >> on an Intel system running legacy option ROMs under a CSM) >> >> Fortunately, we have a way of influencing this policy without having to hack >> the generic PCI bus driver: we can install the IncompatiblePciDeviceSupport >> protocol, and the PCI bus driver will invoke it for each PCI device it >> configures. >> >> Our implementation for ArmPkg is simply the OVMF version with the bits ripped >> out that care about CSMs and legacy BIOSes >> >> Ard Biesheuvel (3): >> ArmPkg: add driver to force 64-bit MMIO BARs to be allocated above 4 >> GB >> ArmVirtPkg/FdtPciPcdProducerLib: add discovery of PcdPciMmio64Size >> ArmVirtPkg/ArmVirtQemu: add IncompatiblePciDeviceSupportDxe >> >> ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c | 223 ++++++++++++++++++++ >> ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf | 49 +++++ >> ArmVirtPkg/ArmVirtQemu.dsc | 5 + >> ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 1 + >> ArmVirtPkg/ArmVirtQemuKernel.dsc | 5 + >> ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c | 31 +-- >> ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf | 1 + >> 7 files changed, 302 insertions(+), 13 deletions(-) >> create mode 100644 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c >> create mode 100644 ArmPkg/Drivers/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf >> > > Formatting / reviewing the first patch with "--find-copies-harder" works > wonders, so I recommend that flag for similar future posts. > > Series > Reviewed-by: Laszlo Ersek > Thanks all, but this series is no longer needed now that the PCI 64-bit MMIO BAR degradation quirk has been made X86-only So dropping this series. -- Ard.