From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 258B61A1E00 for ; Wed, 31 Aug 2016 10:59:47 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id w2so42006386wmd.0 for ; Wed, 31 Aug 2016 10:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=B6+Fj79g14+HWaZi9f6MIPqHssNZTz/fFoundeKIsmE=; b=M04GIZiyyP8C71lr77rTYkcgvCR+BkHAJFmZulX21oYx6Mfh4KOtH54nNtNgWEzp7c YvbiO85oYrIXFvF+PhEabdSHjUp8Be5zlJIH0cGZBHzVOCQ7vmiwH/E+VynlWZ7EvWcH ghiCyFxEAOJ/m0a5vk3RQ1pSzxBDxzrFOX9Ko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=B6+Fj79g14+HWaZi9f6MIPqHssNZTz/fFoundeKIsmE=; b=TZS071c+kOW2mCFGglA4+wgmoSdM6sOgW/8dmKiQZA6re4ks/s/HWeNXzMxTSVgYSU bcthexDXzP8sPCvQZJvkFkN9CXXLUANbMlFfQP+bUGLZqrWWG9nzibgQeIcUyIl+4dCD kp2KEXFRzMb6vyuUNOfhCNc/H9phV7hwCmRjDSEfbs9T/LF+pLsedazcrlyKE/WFHbty g13u1PEikDq5o4DRC8oUOIIc0Z9npBE5INd3hqqQ+U5P7iXqfCOgISX1puBufUypq1bQ +iSIIWkQGX7o+8wnUVkUb6u+k1Zb1Udd4HrpF3M1uS4lU1ufJ6HtZbd3IKOVcwwaIk8b 1LvA== X-Gm-Message-State: AE9vXwPJdZEDmZXXVj03Bk6K/2wHPkHxRtI7zmGcufawzhexBnKAO0/KQjgtfHUMEPFnpOLC X-Received: by 10.28.49.198 with SMTP id x189mr10525993wmx.111.1472666385429; Wed, 31 Aug 2016 10:59:45 -0700 (PDT) Received: from localhost.localdomain ([105.151.173.94]) by smtp.gmail.com with ESMTPSA id d62sm10118417wmd.7.2016.08.31.10.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 10:59:44 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Cc: leif.lindholm@linaro.org, Ard Biesheuvel Date: Wed, 31 Aug 2016 18:59:33 +0100 Message-Id: <1472666379-25426-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH v2 0/6] ArmVirtQemu: move to generic PciHostBridgeDxe 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: Wed, 31 Aug 2016 17:59:47 -0000 Now that Laszlo's virtio-gpu-pci series has removed the last remaining obstacle, we can get rid of the special PciHostBridgeDxe implementation in ArmVirtPkg, and move to the generic one. On AArch64, this will allow us to perform DMA above 4GB without bounce buffering, and use 64-bit MMIO BARs allocated above 4 GB. Changes since v1: - new patch #2 to move the IoTranslation discovery to FdtPciPcdProducerLib, which is a cleaner approach since other drivers (i.e., ArmPciCpuIo2Dxe) depend on it as well - add support for ARM, i.e., disable the 64-bit range in that case, since we cannot access 64-bit MMIO BARs if they are allocated there - use statically allocated PCI_ROOT_BRIDGE[] array of size 1 - enable support for ISA and VGA I/O range decoding - various other minor fixes based on Laszlo's review comments - added ref links and Laszlo's acks where appropriate, i.e., where given and where the version of the patch in this series does not deviate substantially from the suggested version on which the preliminary ack was based Patch #1 removes the linux,pci-probe-only override which does more harm than good now that we switched to virtio-gpu-pci, which does not expose a raw framebuffer. Patch #2 extends FdtPciPcdProducerLib so that it also sets PcdPciIoTranslation, which is required for the FdtPciHostBridgeLib implementation this series introduces, but also for ArmPciCpuIo2Dxe, which produces EFI_CPU_IO2_PROTOCOL on which the generic PciHostBridgeDxe depends as well. Patch #3 implements PciHostBridgeLib for platforms exposing a PCI host bridge using a pci-host-ecam-generic DT node. The initial version is based on the ArmVirtPkg implementation of PciHostBridgeDxe, so it does not support 64-bit MMIO BARs allocated above 4 GB, but it does support DMA above 4 GB without bounce buffering. Patch #4 switches to the generic PciHostBridgeDxe, with no change in functionality other than support for DMA above 4 GB without bounce buffering. Patch #5 adds support for allocating 64-bit MMIO BARs above 4 GB. Patch #6 removes the now obsolete PciHostBridgeDxe from ArmVirtPkg. Ard Biesheuvel (6): ArmVirtPkg/PciHostBridgeDxe: don't set linux,pci-probe-only DT property ArmVirtPkg/FdtPciPcdProducerLib: add handling of PcdPciIoTranslation ArmVirtPkg: implement FdtPciHostBridgeLib ArmVirtPkg/ArmVirtQemu: switch to generic PciHostBridgeDxe ArmVirtPkg/FdtPciHostBridgeLib: add MMIO64 support ArmVirtPkg: remove now unused PciHostBridgeDxe ArmVirtPkg/ArmVirtQemu.dsc | 10 +- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 +- ArmVirtPkg/ArmVirtQemuKernel.dsc | 10 +- ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 434 ++++ ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 57 + ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c | 108 +- ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf | 2 + ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c | 1496 -------------- ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.h | 499 ----- ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf | 64 - ArmVirtPkg/PciHostBridgeDxe/PciRootBridgeIo.c | 2144 -------------------- 11 files changed, 611 insertions(+), 4216 deletions(-) create mode 100644 ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c create mode 100644 ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf delete mode 100644 ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c delete mode 100644 ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.h delete mode 100644 ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf delete mode 100644 ArmVirtPkg/PciHostBridgeDxe/PciRootBridgeIo.c -- 2.7.4