public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Duran, Leo" <leo.duran@amd.com>
To: "'Ni, Ruiyu'" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>,
	"Singh, Brijesh" <brijesh.singh@amd.com>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Agyeman, Prince" <prince.agyeman@intel.com>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [RFC 0/6] DxeBmDmaLib
Date: Thu, 12 Jan 2017 15:55:03 +0000	[thread overview]
Message-ID: <DM5PR12MB1243943E63A9E9F1C5834C24F9790@DM5PR12MB1243.namprd12.prod.outlook.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5B87C1F3@SHSMSX104.ccr.corp.intel.com>



> -----Original Message-----
> From: Ni, Ruiyu [mailto:ruiyu.ni@intel.com]
> Sent: Wednesday, January 11, 2017 11:44 PM
> To: Duran, Leo <leo.duran@amd.com>; edk2-devel@lists.01.org
> Cc: Tian, Feng <feng.tian@intel.com>; Singh, Brijesh
> <brijesh.singh@amd.com>; ard.biesheuvel@linaro.org; Justen, Jordan L
> <jordan.l.justen@intel.com>; Agyeman, Prince
> <prince.agyeman@intel.com>; lersek@redhat.com; Zeng, Star
> <star.zeng@intel.com>
> Subject: RE: [edk2] [RFC 0/6] DxeBmDmaLib
> 
> Leo,
> 1. What does "Bm" stand for in "BmDmaLib"?
[Duran, Leo] "Bm" stands for "Bus-master", as in "Bus-master" DMA.

> 2. Include/Library/BmDmaLib.h says
>     " DMA abstraction library APIs. Based on PCI IO protocol DMA
> abstractions."
>     I think that means the BmDmaLib library class knows the PCI IO concept.
>     If so, why not directly use the
> EFI_PCI_ROT_BRIDGE_IO_PROTOCOL_OPERATION
>     enum in this library class API, but invent a new BM_DMA_OPERATION
> enum type?
[Duran, Leo] 
It's based on the PCI model, but it's not dependent on or specifically for PCI.
I cloned the existing "Dmalib.h", but added an extra/new parameter, else I'd have used the existing class.
Please see: EmbeddedPkg/Include/Library/DmaLib.h

> 3. Can you explain more about AMD's SEV? What will a new instance of this
> library
>     class look like for AMD's SEV? And what will ... for Andrew's usage model?
>     I am asking this question because I try to understand the needs of the
> additional
>     layer of abstraction. I want to make sure the additional layer is generic
> enough
>     not just to meet one silicon feature, but can meet a more wide range of
> silicon
>     features. 
[Duran, Leo] 
On instances of SEV guests, the allocated DMA buffer require no encryption.
Our intent is to override the library to then make runtime decisions if SEV is enabled.
Please refer to the RFC discussion here:
http://marc.info/?l=linux-mm&m=147190814023863&w=2

> 
> Thanks/Ray
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > Leo Duran
> > Sent: Tuesday, January 10, 2017 8:17 AM
> > To: edk2-devel@lists.01.org
> > Cc: Tian, Feng <feng.tian@intel.com>; brijesh.singh@amd.com;
> > ard.biesheuvel@linaro.org; Justen, Jordan L
> > <jordan.l.justen@intel.com>; Leo Duran <leo.duran@amd.com>;
> Agyeman,
> > Prince <prince.agyeman@intel.com>; lersek@redhat.com; Zeng, Star
> > <star.zeng@intel.com>
> > Subject: [edk2] [RFC 0/6] DxeBmDmaLib
> >
> > This patch-set provides an abstraction layer for DMA operations
> > implemented by the PciHostBridgeDxe driver. The intent is to then
> > allow override of this library as may be required by specific hardware
> > implementations, such as AMD's Secure Encrypted Virtualization (SEV).
> >
> > This new (BmDmaLib class) library is modeled after the existing DmaLib
> > plus an extra DmaAbove4GB (BOOLEAN) parameter in the Map and
> Allocate
> > interfaces, so that decisions can be made about the need to allocate
> > DMA buffers below the 4GB boundary.
> >
> > Leo Duran (6):
> >   MdeModulePkg: Add DxeBmDmaLib library
> >   ArmVirtPkg: Modify .DSC files that include PciHostBridgeDxe driver
> >   CorebootPayloadPkg: Modify .DSC files that include PciHostBridgeDxe
> >     driver
> >   MdeModulePkg: Modify .DSC files that include PciHostBridgeDxe driver
> >   OvmfPkg: Modify .DSC files that include PciHostBridgeDxe driver
> >   MdeModulePkg: Modify PciHostBridgeDxe to use new BmDmaLib library.
> >
> >  ArmVirtPkg/ArmVirtQemu.dsc                         |   1 +
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc                   |   1 +
> >  CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc      |   1 +
> >  CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc   |   1 +
> >  .../Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf  |   1 +
> >  .../Bus/Pci/PciHostBridgeDxe/PciRootBridge.h       |  13 +-
> >  .../Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c     | 272 ++++------------
> >  MdeModulePkg/Include/Library/BmDmaLib.h            | 161 ++++++++++
> >  MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c     | 351
> > +++++++++++++++++++++
> >  MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf   |  41 +++
> >  MdeModulePkg/MdeModulePkg.dsc                      |   3 +
> >  OvmfPkg/OvmfPkgIa32.dsc                            |   1 +
> >  OvmfPkg/OvmfPkgIa32X64.dsc                         |   1 +
> >  OvmfPkg/OvmfPkgX64.dsc                             |   1 +
> >  14 files changed, 629 insertions(+), 220 deletions(-)  create mode
> > 100644 MdeModulePkg/Include/Library/BmDmaLib.h
> >  create mode 100644
> > MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> >  create mode 100644
> > MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf
> >
> > --
> > 1.9.1
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2017-01-12 15:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  0:16 [RFC 0/6] DxeBmDmaLib Leo Duran
2017-01-10  0:16 ` [RFC 1/6] MdeModulePkg: Add DxeBmDmaLib library Leo Duran
2017-01-10  0:47   ` Andrew Fish
2017-01-10  5:51     ` Duran, Leo
2017-01-10  0:16 ` [RFC 2/6] ArmVirtPkg: Modify .DSC files that include PciHostBridgeDxe driver Leo Duran
2017-01-10  0:16 ` [RFC 3/6] CorebootPayloadPkg: " Leo Duran
2017-01-10  3:56   ` Ma, Maurice
2017-01-10  0:16 ` [RFC 4/6] MdeModulePkg: " Leo Duran
2017-01-10  0:17 ` [RFC 5/6] OvmfPkg: " Leo Duran
2017-01-10  0:17 ` [RFC 6/6] MdeModulePkg: Modify PciHostBridgeDxe to use new BmDmaLib library Leo Duran
2017-01-12  5:43 ` [RFC 0/6] DxeBmDmaLib Ni, Ruiyu
2017-01-12 15:55   ` Duran, Leo [this message]
2017-01-12  9:51 ` Laszlo Ersek
2017-01-12 16:04   ` Duran, Leo
2017-01-12 16:44     ` Laszlo Ersek

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=DM5PR12MB1243943E63A9E9F1C5834C24F9790@DM5PR12MB1243.namprd12.prod.outlook.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