From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7A4531A1E48 for ; Tue, 6 Sep 2016 01:55:00 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 06 Sep 2016 01:55:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,291,1470726000"; d="scan'208";a="1051935866" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 06 Sep 2016 01:55:00 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Sep 2016 01:54:59 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Sep 2016 01:54:59 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.102]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.91]) with mapi id 14.03.0248.002; Tue, 6 Sep 2016 16:54:56 +0800 From: "Ni, Ruiyu" To: Ard Biesheuvel , edk2-devel-01 , "Tian, Feng" , "Zeng, Star" , "Gao, Liming" CC: Laszlo Ersek , Leif Lindholm Thread-Topic: [edk2] [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit PCI DMA Thread-Index: AQHSCBMiKfXl5y8FhkGKhkB8ZLLj8KBsKGgw Date: Tue, 6 Sep 2016 08:54:56 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58D4D199@SHSMSX103.ccr.corp.intel.com> References: <1473067049-16252-1-git-send-email-ard.biesheuvel@linaro.org> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit PCI DMA 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: Tue, 06 Sep 2016 08:55:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ard, The patch to MdeModulePkg/PciHostBridgeDxe is good. Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Tuesday, September 6, 2016 3:48 PM > To: edk2-devel-01 ; Tian, Feng > ; Zeng, Star ; Gao, Liming > > Cc: Laszlo Ersek ; Leif Lindholm > ; Ard Biesheuvel > Subject: Re: [edk2] [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit > PCI DMA >=20 > Feng, Star: do you have any feedback on these patches? Thanks. >=20 > On 5 September 2016 at 10:17, Ard Biesheuvel > wrote: > > After moving ArmVirtQemu to the generic PciHostBridgeDxe, we noticed > > that setting DmaAbove4G resulted in problems with the emulated EHCI > > USB host controller, which were caused by the fact that the PCI layer > > was providing DMA buffers allocated above 4 GB while the emulated EHCI > > controller in QEMU does not indicate support for 64-bit addressing. > > > > As it turns out, the PCI drivers in MdeModulePkg *completely* ignore > > the EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE attribute, and simply > assume > > that no PCI root bridge driver will produce mappings above 4 GB. On > > ARM, this is problematic, since not all platforms have memory below 4 > > GB, and so having full support for DMA above 4 GB is indispensable. > > > > So first, make the various drivers under MdeModulePkg/Pci/Bus set the > > EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE attributes for devices that > > can support 64-bit DMA addressing (patches #1 - #5). Then, we can > > update the host bridge driver to actually take these attributes into > > account, and only create mappings above 4 GB for devices that have > indicated support for it. > > > > Finally, in patch #7 we can remove the 4 GB DMA limit from ArmVirtPkg. > > > > Branch can be found here: > > https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/re > > fs/heads/pci-64bit-dma-fixes > > > > Ard Biesheuvel (7): > > MdeModulePkg/AtaAtapiPassThru: enable 64-bit PCI DMA > > MdeModulePkg/EhciDxe: enable 64-bit PCI DMA > > MdeModulePkg/NvmExpressDxe: enable 64-bit PCI DMA > > MdeModulePkg/SdMmcPciHcDxe: enable 64-bit PCI DMA > > MdeModulePkg/XhciDxe: enable 64-bit PCI DMA > > MdeModulePkg/PciHostBridgeDxe: restrict 64-bit DMA to devices that > > support it > > ArmVirtPkg/FdtPciHostBridgeLib: enable 64-bit PCI DMA > > > > ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 2 +- > > MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 20 > +++++++++++++++++- > > MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 22 > +++++++++++++++++++- > > MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h | 2 ++ > > MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 2 +- > > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 13 > ++++++++++++ > > MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 14 > +++++++++---- > > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 20 > ++++++++++++++++++ > > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 22 > +++++++++++++++++++- > > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h | 2 ++ > > 10 files changed, 110 insertions(+), 9 deletions(-) > > > > -- > > 2.7.4 > > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel