From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 8C2F51A1E0F for ; Sun, 21 Aug 2016 23:36:00 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id f65so106099633wmi.0 for ; Sun, 21 Aug 2016 23:36:00 -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=yN8x/qO0+8SvxY0Hwq+2fIT7T2D0WeSq5eCXqV7BIYU=; b=BVv8cI9SxMoK+GTXwRdwhmWy/QBtPh94PD4rsrrnsY8vhhOgkzc885gHghn5r/Ptkl hIyC+ACznZZ5qAWXqFhPMQ9F7dGyWjVmpc/hfvV/swU4Q2tKsm9r+Xwus+ZDJNgRg+RS npBclfyfowdgl2hSVildOrM1aSnbBrbHp68d4= 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=yN8x/qO0+8SvxY0Hwq+2fIT7T2D0WeSq5eCXqV7BIYU=; b=MBLeAgzWC9f8rMa8Uf4weOQQns5wEUWnIvbZGdupoT8miumnoYnCkRirJlW/pGHXS2 po7gBl8t8FMn7BELFHQK+Kb8Rhj5dSRL5GUu27EXTTSsqlCLvTJY/tAm8VNu/hitj/js jZjYTbvKLY7olRa3oqbKdH6ZI55QlizoW/b+eWk3ko0PKT8QfOr47hpYOWLGNR+S237V RcikM5sEPnyRZvoDsAFj+KuYkhtVlcCO5IpPCNBFKcJrj9e42tK71a8aS6WiT2kbaML7 9kbimu2NjQrIqTtLMNzyzz7B7XS3+noRKb6tuGAITfH0pG5Mev3tZiAY69pMo5vvmiLd 3Plg== X-Gm-Message-State: AEkoouseYip6VIIpSdVVUa4qgs/ylKyCyjQsNSqn+H90HSgvXGSTcUp7spsD1QPX52Rev7Qy X-Received: by 10.28.52.135 with SMTP id b129mr14541540wma.107.1471847759056; Sun, 21 Aug 2016 23:35:59 -0700 (PDT) Received: from localhost.localdomain (2.178.14.62.static.jazztel.es. [62.14.178.2]) by smtp.gmail.com with ESMTPSA id ex14sm21947778wjc.30.2016.08.21.23.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Aug 2016 23:35:58 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Cc: Ard Biesheuvel Date: Mon, 22 Aug 2016 08:35:50 +0200 Message-Id: <1471847752-26574-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471847752-26574-1-git-send-email-ard.biesheuvel@linaro.org> References: <1471847752-26574-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 3/5] 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: , X-List-Received-Date: Mon, 22 Aug 2016 06:36:01 -0000 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 --- ArmVirtPkg/ArmVirtQemu.dsc | 7 ++++++- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 ++- ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 ++++++- ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 1d459756f61b..ddc72e7044f7 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,8 @@ [Components.common] # # PCI support # - ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf + ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.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 01e650d9e333..c56188f347ec 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -151,7 +151,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 99d2feba202b..305aa5bacb32 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,8 @@ [Components.common] # # PCI support # - ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf + ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf { NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c index 887ddb01f586..0aff149e8029 100644 --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c +++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c @@ -304,8 +304,8 @@ PciHostBridgeGetRootBridges ( RootBridge->Io.Limit = IoBase + IoSize - 1; RootBridge->Mem.Base = Mmio32Base; RootBridge->Mem.Limit = Mmio32Base + Mmio32Size - 1; - RootBridge->MemAbove4G.Base = 0x100000000ULL; - RootBridge->MemAbove4G.Limit = 0xFFFFFFFF; + RootBridge->MemAbove4G.Base = MAX_UINT64; + RootBridge->MemAbove4G.Limit = 0; // // No separate ranges for prefetchable and non-prefetchable BARs -- 2.7.4