From patchwork Wed Aug 31 17:59:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75108 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp461938qga; Wed, 31 Aug 2016 11:00:01 -0700 (PDT) X-Received: by 10.66.159.195 with SMTP id xe3mr19234757pab.159.1472666401533; Wed, 31 Aug 2016 11:00:01 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id c83si882499pfd.268.2016.08.31.11.00.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 11:00:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EAF391A1E58; Wed, 31 Aug 2016 11:00:00 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 E8AB01A1E58 for ; Wed, 31 Aug 2016 10:59:58 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id 1so54725943wmz.1 for ; Wed, 31 Aug 2016 10:59:58 -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:in-reply-to:references; bh=zFqsgEy+xisDdlVAn8Y/Kwnm3Z9osDIVc8mM8ZkWCrs=; b=W6LSNU84H0zotP1fEVDGjqFP4Njsn/qnU05tytsR7eqt7/6/wXEe+WMXE9i+Z7mvMM Cg71k5QaXnKQxDXDo4ctnSkfHJynenHjFkYVOTX9lPhnhcNawNd+a3+mC/6uij/rs2tv +6O/H67s58mpv13qHYpU5YLG215izdN9GwxHw= 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:in-reply-to :references; bh=zFqsgEy+xisDdlVAn8Y/Kwnm3Z9osDIVc8mM8ZkWCrs=; b=O+quu4PaXJtK/pKiQmiOV7/6xvR6Txhd22/joAt9slch7ei4dqkWL+VHjr1Ok8hY6w adVY8QZYAA+T4PRkDco3qDC+bC6OWoWyu3e+1cfMhLEoJDcrh+HFYAJwDl0AeB9ixRoF IitEq/pImtOicra4ExsH7Y6hj63/jtd5Yy6G4+8vdZ6mXbkGBvWoD1BLKTzx81n7u/CW rjGvpyJkCSELQTEGVGRexSrWV81xlJkPBnp3cgDVo5J5V7RgtF2MH1ddVEzBjKK71hRd BqLA/MC7zkVGnq8Ee1SDjrQhRMEptYKLYIVbaINXvL6NZY4dAMAmQUrwFCfpwLgSklM6 +EYw== X-Gm-Message-State: AE9vXwO33lndXRCShTojLm06W6LrVIxyVxuUqqr9b9ydsDdaYG1ldpmBXcp/wb721pNq0pkC X-Received: by 10.28.12.76 with SMTP id 73mr10639466wmm.118.1472666397192; Wed, 31 Aug 2016 10:59:57 -0700 (PDT) Received: from localhost.localdomain ([105.151.173.94]) by smtp.gmail.com with ESMTPSA id d62sm10118417wmd.7.2016.08.31.10.59.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 10:59:56 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 31 Aug 2016 18:59:37 +0100 Message-Id: <1472666379-25426-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472666379-25426-1-git-send-email-ard.biesheuvel@linaro.org> References: <1472666379-25426-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 4/6] ArmVirtPkg/ArmVirtQemu: switch 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: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Wire up the FdtPciHostBridgeLib introduced in the previous patch to the generic PciHostBridgeDxe implementation, and drop the special ArmVirtPkg version. The former's dependency on gEfiCpuIo2ProtocolGuid is satisfied by adding ArmPciCpuIo2Dxe.inf as well, and adding the PCD gArmTokenSpaceGuid.PcdPciIoTranslation as a dynamic PCD. In terms of functionality, the only effect this change should have is that we will no longer use bounce buffers for DMA above 4 GB. Other than that, no functional changes are intended. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=65 --- ArmVirtPkg/ArmVirtQemu.dsc | 10 +++++++++- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 ++- ArmVirtPkg/ArmVirtQemuKernel.dsc | 10 +++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index f8b61402625a..c503ef243f9a 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -69,6 +69,8 @@ [LibraryClasses.common] QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf + PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -210,6 +212,8 @@ [PcdsDynamicDefault.common] # PCD and PcdPciDisableBusEnumeration above have not been assigned yet gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF + gArmTokenSpaceGuid.PcdPciIoTranslation|0x0 + # # Set video resolution for boot options and for text setup. # PlatformDxe can set the former at runtime. @@ -363,7 +367,11 @@ [Components.common] # # PCI support # - ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf + ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + + NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + } + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf { NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index 900fa54660aa..2571884b20ac 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -156,7 +156,8 @@ [FV.FvMain] # # PCI support # - INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf + INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf + INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf INF OvmfPkg/Virtio10Dxe/Virtio10.inf diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index ea722ddf8ea7..383d9b7d2c0b 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -71,6 +71,8 @@ [LibraryClasses.common] QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf + PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -203,6 +205,8 @@ [PcdsDynamicDefault.common] # PCD and PcdPciDisableBusEnumeration above have not been assigned yet gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF + gArmTokenSpaceGuid.PcdPciIoTranslation|0x0 + # # Set video resolution for boot options and for text setup. # PlatformDxe can set the former at runtime. @@ -349,7 +353,11 @@ [Components.common] # # PCI support # - ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf + ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + + NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + } + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf { NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf