From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 394C081C17 for ; Thu, 12 Jan 2017 01:51:07 -0800 (PST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C22158F02B; Thu, 12 Jan 2017 09:51:07 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-42.phx2.redhat.com [10.3.116.42]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0C9p5jO009257; Thu, 12 Jan 2017 04:51:05 -0500 To: Leo Duran , edk2-devel@ml01.01.org References: <1484007421-15462-1-git-send-email-leo.duran@amd.com> Cc: feng.tian@intel.com, brijesh.singh@amd.com, ard.biesheuvel@linaro.org, jordan.l.justen@intel.com, prince.agyeman@intel.com, star.zeng@intel.com From: Laszlo Ersek Message-ID: <30b8330d-1fcb-f3f3-5ced-5d4651745cca@redhat.com> Date: Thu, 12 Jan 2017 10:51:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484007421-15462-1-git-send-email-leo.duran@amd.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 12 Jan 2017 09:51:07 +0000 (UTC) Subject: Re: [RFC 0/6] DxeBmDmaLib 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: Thu, 12 Jan 2017 09:51:07 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 01/10/17 01:16, Leo Duran wrote: > 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. * Ard, I remember you worked on >=4GB DMA stuff before, can you please look over this series? * Leo, can you confirm that patches #1 and #6 implement nothing more than code movement? If they implement more than that (judging from the new DmaAbove4GB parameter above), can you specify how exactly? The source code changes in patches #2 and #5 look okay, but before I'm comfortable acking them, I'd like to understand the scope of the code movement between #1 and #6. * Also, I suggest the following subject line template for patches #2 through #5: XxxPkg: resolve BmDmaLib class for PciHostBridgeDxe driver * For patch #1, I suggest restricting the client module types to DXE_DRIVER in the INF file: LIBRARY_CLASS = BmDmaLib|DXE_DRIVER Thanks Laszlo > > 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 >