public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	edk2-devel-01 <edk2-devel@lists.01.org>,
	"Tian, Feng" <feng.tian@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit PCI DMA
Date: Tue, 6 Sep 2016 08:54:56 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D58D4D199@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu9bWrycpUXRyuTNmmWpdSd-6zqFExfKAwpSFS9WhTS9SA@mail.gmail.com>

Ard,
The patch to MdeModulePkg/PciHostBridgeDxe is good.

Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>

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 <edk2-devel@lists.01.org>; Tian, Feng
> <feng.tian@intel.com>; Zeng, Star <star.zeng@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>; Leif Lindholm
> <leif.lindholm@linaro.org>; Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Subject: Re: [edk2] [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit
> PCI DMA
> 
> Feng, Star: do you have any feedback on these patches? Thanks.
> 
> On 5 September 2016 at 10:17, Ard Biesheuvel <ard.biesheuvel@linaro.org>
> 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


  parent reply	other threads:[~2016-09-06  8:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05  9:17 [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for 64-bit PCI DMA Ard Biesheuvel
2016-09-05  9:17 ` [PATCH 1/7] MdeModulePkg/AtaAtapiPassThru: enable " Ard Biesheuvel
2016-09-05  9:17 ` [PATCH 2/7] MdeModulePkg/EhciDxe: " Ard Biesheuvel
2016-09-05 12:19   ` Laszlo Ersek
2016-09-05 12:44     ` Ard Biesheuvel
2016-09-05 13:06       ` Laszlo Ersek
2016-09-05  9:17 ` [PATCH 3/7] MdeModulePkg/NvmExpressDxe: " Ard Biesheuvel
2016-09-05  9:17 ` [PATCH 4/7] MdeModulePkg/SdMmcPciHcDxe: " Ard Biesheuvel
2016-09-05  9:17 ` [PATCH 5/7] MdeModulePkg/XhciDxe: " Ard Biesheuvel
2016-09-05 12:14   ` Laszlo Ersek
2016-09-05  9:17 ` [PATCH 6/7] MdeModulePkg/PciHostBridgeDxe: restrict 64-bit DMA to devices that support it Ard Biesheuvel
2016-09-05 12:04   ` Laszlo Ersek
2016-09-05  9:17 ` [PATCH 7/7] ArmVirtPkg/FdtPciHostBridgeLib: enable 64-bit PCI DMA Ard Biesheuvel
2016-09-05 12:04   ` Laszlo Ersek
2016-09-06  7:48 ` [PATCH 0/7] MdeModulePkg ArmVirtPkg: fixes for " Ard Biesheuvel
2016-09-06  8:04   ` Zeng, Star
2016-09-06  8:54   ` Ni, Ruiyu [this message]
2016-09-06 10:36     ` Ard Biesheuvel
2016-09-06 12:41       ` Tian, Feng
2016-09-06 14:48         ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=734D49CCEBEEF84792F5B80ED585239D58D4D199@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox