From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0607.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::607]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2447E81C66 for ; Fri, 13 Jan 2017 14:14:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cYJg0wDjss9NUEJf0L+7J0HKMai4FCT7IZRlmn6C7S4=; b=oEKMS3aecaiTVf7ZDXar5NCpFhvkxqUK3XpEeGqpskBN9DAYyPY+/aC087WGVWU/OB9C63flonb+tlLV1gwTY/7aYsS8oZM0use3g31X0d4rDcodL8nCAt3Df7aBN1UaE6tIyVMWZxP8NwaHxE3tDgbQWR1c9uvhw5GgEG7cjM4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1248.namprd12.prod.outlook.com (10.169.205.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Fri, 13 Jan 2017 22:14:27 +0000 From: Leo Duran To: CC: , , , , , , , , Leo Duran Date: Fri, 13 Jan 2017 16:14:10 -0600 Message-ID: <1484345656-3574-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YQXPR01CA0019.CANPRD01.PROD.OUTLOOK.COM (10.165.102.157) To MWHPR12MB1248.namprd12.prod.outlook.com (10.169.205.8) X-MS-Office365-Filtering-Correlation-Id: f659d830-29ee-41a6-64d2-08d43c018b30 X-Microsoft-Antispam: UriScan:;BCL:0;P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/LNWoQDqCC81eAEUQPTxAQTDyZV0z9SKNfAUV+JhREANQl6k58Y3UxD5VVxOYL47KBC7w==; 20:MMeumzgr8nI/eBCxWhtwWaHp7hpCIU5Yp1HAp6ZmOrUVMEyPrsntpCNQqpVi6qY4CpOEgYqD1mSBEhgAaOd1Fz+jCz6ln6KDexMMabv5jsnQbkcyVMpSm8ScacZoaz6YwAu92uvPXNQ3NSiZ7Ma3i3ZQexF8OANKZlZW9A3qZuOv/GCdXdA5Q8/50LURwiA1XbrL91tiz4moQ/d8wKDHoF/Rn8e8LpyJUCBVYxgDqarJv1AB39RX5KBt24bT7v7NnG7EVk8/Sf4YEmHXqsTuwP0Y9cNKYMgXu6C6u76rMU9sU30HYquMOMFPRbe0ZWZzQpaflzZGvqlWNHJn3S3BF5KXV+zxFmxTvtr1hdKZGb7mdyCAaMs5sJYmFZO5HHXfA0HU14xbbLsmRIHVGH6Rz22Ax7llkZnJ7E2N1FKsdghVzVCmjkox7RafZLKGewd/fgZv+AilMIlPodYvk/F8witSCJatHVcmFhYd5rjaV+s4v4wKvkN+y3uDsbsJrzmj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:MWHPR12MB1248; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1248; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1248; 4:0i1k2j8eG91W3UqISqDiSiIYw+PtdmiBl73grIig5tQ3v3xJI6RC9AMKF7opkbB+OZaXtRHa4MV+gllafa8ZTBS1v0HFGeZcmpFlA9ok71LHnOdWlPWrB2QrGIPL9j3YXlVTC9GuHK3GbXBVRU6nVMNmDc0aqwVH9Q4n37fz6KvihauQ4oy+c9q2HX0+ur0y6NdkdEidXWNu6gV4YdoasKHlJn4/KUotSl3V6lvVDQipz+N98Rz4lC/vjbB2+Si+tmu1ykRkdUhcFJbjM/2mjfLpQTBzjUlNspB2x0/a0LZ2EYU8GoL/CZCKf2dt5x5otFmJC9OsQnFbuzebHBSuGmFeyl0DlNbSqIi5j3i/WuAE+k1hkW4d9QkV0CJEOJPrw57s/x5msc6LNOZx3dHNtPpsya41POtTMcFySyZi9VkGmo2v+vCb/ohSCac9n3bsXsbuesaALg6dPyexYJCN4fUwyRgW0J+B2U6m1TQFR7MGqnw8mUFVTPGu3VLvgCNyvAqNrqe+I0Fz3XjvXkIWIDQ118IZ5j814pdI6JJl5AkltkXVfEMj3Sh2xkK3fnVUTcBhMkrtYm3uxneJ2yGb/L6Xj6rUUjuS2ksncqVw8GmtRrBB4vXoT920zyDjTv/R X-Forefront-PRVS: 018632C080 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39450400003)(39410400002)(39860400002)(39840400002)(39850400002)(209900001)(199003)(189002)(5003940100001)(50466002)(48376002)(50986999)(92566002)(25786008)(5660300001)(38730400001)(6306002)(54906002)(6916009)(6486002)(110136003)(305945005)(7736002)(6666003)(81166006)(81156014)(36756003)(189998001)(68736007)(97736004)(86362001)(8676002)(53416004)(42186005)(33646002)(106356001)(101416001)(2351001)(47776003)(50226002)(6116002)(3846002)(2906002)(4326007)(105586002)(66066001)(27001)(15395725005)(19627235001)(6606295002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1248; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1248; 23:uhIXFsB6Jt2od7zGsyIACi1xJ+de/r/xJf/GU8IEC?= =?us-ascii?Q?56JjC6bcdapdsYoxEGDvg2VKx+eMmJyeBBF4H1mlgOZKRy5GW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DBgGUwHeMyBebVb9IX2xTJ80bFNJ1JazjGEkbJCQVf2uXJ+yc6xbtVWFiOsvXrA4Q=; 24:xXJIGWLCEwBb1432VrAzCZdnhYZZfL0opJ2mVuVxT2knCKqVZUXjlowJ2uMu8IHrQeRTIyzH3YKwLKO1vqTbo3rSw/ksOT/7ChpQo+RRvYM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1248; 7:cOo40l6Gbe/FTbs6a9sysjo+8XfpCSjStNdTN3E68LBXoXs+MLG8rOIQuQtG3DDpydENAv4TJOuKReLVTNs45bLMvCS0HoGsr5dp4IrIJTJmSONMNDhOzbe722gZHHmJtIupNH1TXR0ef4ie2r9k+yLy2asbWkhxYODByHujS5AaxTvZzGsvx1YKkVmjaYV3kSvO0IFBJ6TL7BcUBhHbiYHEg0l2c8AWcTA+NMzIjo2gmYjKLfbudkpAjI9qJVT1wxXqsbz2D/WYQOMsuJNBMfW5i+jxFXp6t1YA3h1m7xKJl+e7gHoVETW8mfhTKdeyLcFPbGrxsA51FTyRanvf8gG9AxsjI+VXjFpOQ4uPDOL4o+3iJh430vj4B5cvmBlQ9JnVDBWwf0neFRGFdim56R9mgWLPH8GXhI93+UeO5fbKE+vFnofV1TMCirAt94MhJjR0uamUqT5FQ1H7Gga2BA==; 20:cAfGFBowNWD7NuC6azy1lLdZWtsbDEffaiIJxli0RRCx8WffmZUh3QgB7PnW8TBUJfi5w/25KnhR+yHkz4Oh35JbZNOW2S150mf4T35qqGdz0dUq10VtYEPq2jmV26meJ8ATQkB7gOzGGHAb1NP6JayNxaj+1q0LdFcZVuT9FJBbg2uqKW0BErdvEyAGUIc523xgfiC+fm37tkdBV1e4VpIW0Zn6tNOIhCFeDt4G/m3ZhJ4uSouUeZ/NWnDBLnQd X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2017 22:14:27.8468 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1248 Subject: [RFC v2 0/6] DxeBmDmaLib (BmDmaLib class) library 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: Fri, 13 Jan 2017 22:14:32 -0000 Content-Type: text/plain This series provides an abstraction layer for Bus-master DMA operations as currently 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). Please refer to the RFC discussion for SEV here: http://marc.info/?l=linux-mm&m=147190814023863&w=2 This new (BmDmaLib class) library is cloned from the existing DmaLib with an additional DmaAbove4GB (BOOLEAN) parameter for the Map and Allocate interfaces, so that decisions can be made about the need to allocate DMA buffers below the 4GB boundary. NOTE: The abstraction layer is intended for Bus-master (DMA capable) devices, and not restricted to the PCI Root-Bridge use-case. Thus the rationale for not using EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION types. Changes since RFC v1: - Patch 1: Restrict LIBRARY_CLASS to DXE_DRIVER in INF file. - Patches 2 through 5: Change Subject: XxxPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver Add Reviewed-by: Laszlo Ersek - Add clarifications from RFC discussion to this cover letter. Leo Duran (6): MdeModulePkg: Add DxeBmDmaLib (BmDmaLib class) library ArmVirtPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver CorebootPayloadPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver MdeModulePkg: Resolve BmDmaLib class for PciHostBridgeDxe driver OvmfPkg: Resolve BmDmaLib class for 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/MdeModulePkg.dsc | 3 + OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + 11 files changed, 76 insertions(+), 220 deletions(-) -- 1.9.1