From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486658445546509.4666162340069; Thu, 9 Feb 2017 08:40:45 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 52DEA81FF0; Thu, 9 Feb 2017 08:40:43 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::62b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 86EC681F53 for ; Thu, 9 Feb 2017 08:40:42 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:40 +0000 X-Original-To: edk2-devel@ml01.01.org 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=ksC/2/trLJ1MBh3OUsgrY4H/KuydnuSCoKJ93pWRR/s=; b=RfF77OSuUrPkI0YXQkpBGC2Oi2brvh/bfkEYDetxXWltUW/qfNMyOEEVTZeQvBT4yD8AGhK2npq+Qap/rJOVT+AfhxDZGFTjgELG+nwrjU7ihSclC/mjMCDUSdAH7NERtAQT/1i3fD8gBdEwkRNteHBVPF3F5mJY53zz5PJSbO8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:22 -0600 Message-ID: <1486658427-6551-2-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: cff3c7c2-a1bb-431c-82ee-08d4510a627e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:APe6ul5hQtg0UPhtwtWhVMK9bpuW/+NXRJyTMloXE0VVgDFxNbXSg9HS+77gCFz1VV7HBl0h5cGhRqy9e7zIqLlqXWrDCWbko9FgkB8yxj1QvC1wkye0L16+ixbvOtaDX/jE3plf6ZsUgI+Zy/Iw+7R+ptQZXP/xlfGa8B9ArCTXqaO+73O0RY3P/XwJndNsXsuCUX0vtxoohj6n12WW3oQW6q9pq+4DvNs0HZKXhqYEtgox3wNqyow4bHR5plqoWgMOgpPdtrUnhXDv5TG11qnrkRoRY6ewI/uyVuex62g=; 25:En0esSN2XVD4QbKtrBaamxB+SNpF6kw0mlulgZajqey2ABD9NqHXKa2fAslv8we28e1bNvQ9Neh6YPmjvdyuqcbH9eyb0mtdnuI/qvRPECIpviDg6R8FzOeoWbZvHEy7TgyFeAaSllwyzRcu5l8zY5JOfIPTcLsxhYfjsHbUX8mJyQoQAKYgr2ClfzqyH0KgvBUtZWQbFqyCSB+FB+E9jLrVUiL2gv27u7opelc25sVTy2jVvPzzyLUJFrMqE9jPDOnyQ90h6JUrBNF8fYrIWP9XGrI9NPNpeaZiNM/YIu0GXsYdoHFGf34k+6qhCg3hUAJ0HFY4iQmD7vktNm4aprjvoRhN3i9JOrdpHbYnmTreMGFut5tgkOEhtLv7Ni3cg88ncS6fbpSHnDtCn9ptJldDjZ7l2qWwxDV+ezqrb0HtWaoW+D91/hp3ct2LPFczAT69C4fibPBl5vmWZEF9Zg== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 31:FflO/Rqi51PzsN/iyJYCwJE1vl0SES8dQ5IzPTG+zO7C/7N9fgW9EjH9Bid/SPbHd3NxoUH49bryzE/uJnFBOHw+bzVAbhASwwXvkThrMR58sLSGtKqrtbB8xbGI3kzaowaFZp1c5/v4cTn4h3Uff+OAXm6SnLiTd8Ux+6cZppb+ns5+T5zDgLNy6s4XdDsev2zbWxJRqLMj5x9iqMBf1YkXiMqy7q2Jm03uLJ4CBEujcXrJclwa1CTMAdp9J+4Kl7vEzbw0BHR0cCaLmAAF/Q==; 20:axb6zinQDtB/kvP5/3maM+zcVpfV7GhXoW0YdrRJaEITuh+vzaCSI0/07V+c/d8gNXuYReapv1CyW8u4ypUBODHgssSrWXtNPNsewzk5YVqX9WQZeRSSPSgYAcIN1+HAjsoIhKmL5kcPdABUkaTq0JBAahJp4TzBenmbkx33VunYXUMks8v5Bf5DdsjL5svuuund9K4kD2NEa7qN9bK+0y5VFECKfQYRyyiFq9w/j9Z+frwe/cXyDemsTUMsBAKUe8Us1Xvr3p3BnFz+Kffh057XKvZXYsr29uWBVKeS2ZbPJNVpvYZlr/UZWJwBgoC2J3K4mef1NfxYlnijYFXN8D3Ikqbfjk8EuNuQQoKRAwjPBBukhD1sNjBewXPHuxCk8TldK4HarOKorx+DBRVUm31J1xl2ImdYRKm9JOsv5nd7mLv4BrmxRX3PnxEhq5758UTzNoJRh/fB4ODxaDNn0KxNg0JBpHrojbyDwKXVYi3Z0h1llYHYvSbA0epuS1KC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:BToaNRMTAbXDIOGgQjMo4ihOsJ/+oOG9Qloz1C17NyLpJEUiUlZPNQLY7wNG7I0DTWNgizIhAm8jPEYsVaVnpE0vY7NqtlJ6jSEHoQxtiZ4hrYJ0uo1uS5y1AB5Zz6Q9gof7y9PNdvqSyv44gauGmeiE3x9hgDQJ7DN8SdD3v+Ge2a+w9uBYv0Q1RyAVaVw6IU/GF2bEoB4mG37gH4+gVa22NKyXMi9ckHxV8ozNg7Yd+h+E1JVRF5BUrOFnc7mL9mrtaJI7kjZL36w29/a1wixnJm+6eh/VXcM9NES1sbZWEXkZqBDMPAgLAa1K1A7cfMlg+MOX9c2TrSo5zgWxbrk/GBLDZRKXxzAY13Vz0rRJg87ynI6nCf00LVPlxV+bCezCPis1mzw1UYg35ertkF9W+RRcLbRG+sLPdbxnIiO0k/7vKlZsyhKWTrWhdXl6f0MbSTHF9anP70o/v4jrQGAx9rQX9M2hC5PMNOHs1D4CXNBQlA7rJsjcUiAm7gaMzinjRwgTPtVQQY4TbB7YdCNrPbNe8aVO8PO/4CivbX897QOTxnoC7OSqQyK5j25PBP7yVoDkwZ1icr5TI33On32fKbxSMfTKYFZLStTbaK7+HCcscS5QIU+8bnoL1RlQfRuABgwvahXfm9HGHjtDPYefSBtMtYrl8fVKhMwej+Nxo6Rjd18IjpzaIaC26yUcLmHVsV5cL40I1rSAuaHXEA== X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(15188155005)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(6306002)(50986999)(42186005)(5003940100001)(31430400001)(25786008)(92566002)(68736007)(7736002)(50466002)(16799955002)(50226002)(3846002)(6116002)(48376002)(966004)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(575784001)(86362001)(53376002)(53936002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:6opktY0bREscUXJmdApBXd6pstUDDZfSu0Xpkpj0E?= =?us-ascii?Q?73sDyzr72GEyvd4T8I33ZGvwAbyUFFNYOZIyGCF7Q1hg5bzKGfBEpiytIekI?= =?us-ascii?Q?WbsPiOmLlqDB+a6Ms3326gpAd91l+wWlGfYDot8ShUUD+pzbL8sMpsAq58xI?= =?us-ascii?Q?vmCHB3mauwM8uWwkXt8ocqRjHmAdjnOpJHv4UPn7w8BMLN0mwDp+lkhmeCiv?= =?us-ascii?Q?mrcAFuV6E7JmmDu4WpyTIR1PZel2fyGT9obRU419BXopCjTZq+zZiMDc+78u?= =?us-ascii?Q?yjHE27vOSfyVSFIN1HEvlHozd8nuCZTzNUdj3bzsXe1UurJqz9DeuIkkq/O4?= =?us-ascii?Q?FXaltsTm3TbkaWo29581x/YCwLI/DFTOaYLLDizgJi4nR2HIFdav8HMkWNs4?= =?us-ascii?Q?WTt7mdxwbsyRV4SNBcxcp2bHD5IdOgjy+DGXrOlNDFJ11nmiYqAQjLUpk8tU?=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qIOPkCxp0e7IKscXVHB3PF0EGGFQ0YStna7f9kQIgXVYRVJDRfwQ1wtRRV5XvIgIqldhnR6Y20aqL4ZnHiD0Lrvr+z1jwuefq1GRcPukMdsSwLR+MZZfkGe0QvHy48egyrPJkTrWU3UnS7WdJO4pDNxtJcNjMn/dwHVwuc+Xq7vnItY+WlhYrKu1ODklLDwSWi0ROIaljyc3qzVlu+oGGYZZZaEL33IfAJrUQmcmZ1lgv18gm8A26vDYPRjH5m1rutVf/6YFiXQSTZfAWRTDxU+NgDZwrZmfvjD5SFBl4hiCit1i0X4o97Zdrgv1WzqIOmTGLsFuA2d6tt4e9JeO9e5fOh8WU6pHJg==; 20:aOmd7QdH4Ad8oKRqhdYJ22Q0L8+DXfERS8gc5dwUxIEoxi367enOHcD+hbLeXPHUZEeJzbAqxctUhh7zjLMYwa/ikfe+XHPcJCJB8tQKkdSDHMRT7dmi7gtxaqn/j7Thrs9VVq6aWqTmg7N21ODlKiBdty/fcAGkbDalFX7iegx4R/HZ6JpJcZ0vTiebk+2pSJUmJpfkb10r5CQQ+anVcsoT/A9t86dRk3XA12WMS0fQ1IlWocAGfCPV2JnomoAE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:40.2587 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 1/6] MdeModulePkg: Add 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: , Cc: Feng Tian , Leo Duran , Star Zeng Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch 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). 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. Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran --- MdeModulePkg/Include/Library/BmDmaLib.h | 161 +++++++++++ MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c | 351 +++++++++++++++++++= ++++ MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf | 41 +++ MdeModulePkg/MdeModulePkg.dsc | 1 + 4 files changed, 554 insertions(+) create mode 100644 MdeModulePkg/Include/Library/BmDmaLib.h create mode 100644 MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c create mode 100644 MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf diff --git a/MdeModulePkg/Include/Library/BmDmaLib.h b/MdeModulePkg/Include= /Library/BmDmaLib.h new file mode 100644 index 0000000..2c0e50f --- /dev/null +++ b/MdeModulePkg/Include/Library/BmDmaLib.h @@ -0,0 +1,161 @@ +/** @file + DMA abstraction library APIs. Based on PCI IO protocol DMA abstractions. + + Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
+ Copyright (c) 2017, AMD Inc. All rights reserved.
+ + DMA Bus Master Read Operation: + Call BmDmaMap() for DmaOperationBusMasterRead. + Program the DMA Bus Master with the DeviceAddress returned by BmDmaMap= (). + Start the DMA Bus Master. + Wait for DMA Bus Master to complete the read operation. + Call BmDmaUnmap(). + + DMA Bus Master Write Operation: + Call BmDmaMap() for DmaOperationBusMasterWrite. + Program the DMA Bus Master with the DeviceAddress returned by BmDmaMap= (). + Start the DMA Bus Master. + Wait for DMA Bus Master to complete the write operation. + Call BmDmaUnmap(). + + DMA Bus Master Common Buffer Operation: + Call BmDmaAllocateBuffer() to allocate a common buffer. + Call BmDmaMap() for DmaOperationBusMasterCommonBuffer. + Program the DMA Bus Master with the DeviceAddress returned by BmDmaMap= (). + The common buffer can now be accessed equally by the processor and the= DMA bus master. + Call BmDmaUnmap(). + Call BmDmaFreeBuffer(). + + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + + Derived from: + EmbeddedPkg/Include/Library/DmaLib.h + +**/ + +#ifndef __BM_DMA_LIB_H__ +#define __BM_DMA_LIB_H__ + + +typedef enum { + /// + /// A read operation from system memory by a bus master. + /// + DmaOperationBusMasterRead, + /// + /// A write operation from system memory by a bus master. + /// + DmaOperationBusMasterWrite, + /// + /// Provides both read and write access to system memory by both the pro= cessor and a + /// bus master. The buffer is coherent from both the processor's and the= bus master's point of view. + /// + DmaOperationBusMasterCommonBuffer, + DmaOperationBusMasterMaximum +} BM_DMA_OPERATION; + + +/** + Provides the DMA controller-specific addresses needed to access system m= emory. + + Operation is relative to the DMA bus master. + + @param DmaAbove4GB Indicates capability of DMA operations abo= ve 4GB. + @param Operation Indicates if the bus master is going to re= ad or write to system memory. + @param HostAddress The system memory address to map to the DM= A controller. + @param NumberOfBytes On input the number of bytes to map. On ou= tput the number of bytes + that were mapped. + @param DeviceAddress The resulting map address for the bus mast= er controller to use to + access the hosts HostAddress. + @param Mapping A resulting value to pass to BmDmaUnmap(). + + @retval EFI_SUCCESS The range was mapped for the returned Numb= erOfBytes. + @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a comm= on buffer. + @retval EFI_INVALID_PARAMETER One or more parameters are invalid. + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to = a lack of resources. + @retval EFI_DEVICE_ERROR The system hardware could not map the requ= ested address. + +**/ +EFI_STATUS +EFIAPI +BmDmaMap ( + IN BOOLEAN DmaAbove4GB, + IN BM_DMA_OPERATION Operation, + IN VOID *HostAddress, + IN OUT UINTN *NumberOfBytes, + OUT PHYSICAL_ADDRESS *DeviceAddress, + OUT VOID **Mapping + ); + + +/** + Completes the DmaOperationBusMasterRead/Write/CommonBuffer operation + and releases any corresponding resources. + + @param Mapping The mapping value returned from BmDmaMap(). + + @retval EFI_SUCCESS The range was unmapped. + @retval EFI_DEVICE_ERROR The data was not committed to the target s= ystem memory. + +**/ +EFI_STATUS +EFIAPI +BmDmaUnmap ( + IN VOID *Mapping + ); + + +/** + Allocates pages that are suitable for a BmDmaMap() of type DmaOperationB= usMasterCommonBuffer. + + @param DmaAbove4GB Indicates capability of DMA operations abo= ve 4GB. + @param MemoryType The type of memory to allocate: EfiBootSer= vicesData or + EfiRuntimeServicesData. + @param Pages The number of pages to allocate. + @param HostAddress A pointer to store the base system memory = address of the + allocated range. + + @retval EFI_SUCCESS The requested memory pages were allocated. + @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal = attribute bits are + MEMORY_WRITE_COMBINE and MEMORY_CACHED. + @retval EFI_INVALID_PARAMETER One or more parameters are invalid. + @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. + +**/ +EFI_STATUS +EFIAPI +BmDmaAllocateBuffer ( + IN BOOLEAN DmaAbove4GB, + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages, + OUT VOID **HostAddress + ); + + +/** + Frees memory that was allocated with BmDmaAllocateBuffer(). + + @param Pages The number of pages to free. + @param HostAddress The base system memory address of the allo= cated range. + + @retval EFI_SUCCESS The requested memory pages were freed. + @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress = and Pages + was not allocated with BmDmaAllocateBuffer= (). + +**/ +EFI_STATUS +EFIAPI +BmDmaFreeBuffer ( + IN UINTN Pages, + IN VOID *HostAddress + ); + + +#endif + diff --git a/MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c b/MdeModulePkg/= Library/DxeBmDmaLib/DxeBmDmaLib.c new file mode 100644 index 0000000..824b51f --- /dev/null +++ b/MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.c @@ -0,0 +1,351 @@ +/** @file + DMA abstraction library APIs. Based on PCI IO protocol DMA abstractions. + + Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
+ Copyright (c) 2017, AMD Inc. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + + Derived from: + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c + +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + + +#define FORCE_BELOW_4GB_TRUE TRUE +#define FORCE_BELOW_4GB_FALSE FALSE +#define NO_MAPPING (VOID *) (UINTN) -1 + + +typedef struct { + BM_DMA_OPERATION Operation; + UINTN NumberOfBytes; + UINTN NumberOfPages; + EFI_PHYSICAL_ADDRESS HostAddress; + EFI_PHYSICAL_ADDRESS MappedHostAddress; +} MAP_INFO; + + +EFI_STATUS +AllocateBounceBuffer ( + IN BOOLEAN ForceBelow4GB, + IN BM_DMA_OPERATION Operation, + IN EFI_PHYSICAL_ADDRESS HostAddress, + IN OUT UINTN *NumberOfBytes, + OUT PHYSICAL_ADDRESS *DeviceAddress, + OUT VOID **Mapping + ) +{ + EFI_STATUS Status; + MAP_INFO *MapInfo; + EFI_ALLOCATE_TYPE AllocateType; + + // + // Allocate a MAP_INFO structure to remember the mapping when Unmap() is + // called later. + // + MapInfo =3D AllocatePool (sizeof (MAP_INFO)); + if (MapInfo =3D=3D NULL) { + *NumberOfBytes =3D 0; + return EFI_OUT_OF_RESOURCES; + } + + // + // Initialize the MAP_INFO structure + // + MapInfo->Operation =3D Operation; + MapInfo->NumberOfBytes =3D *NumberOfBytes; + MapInfo->NumberOfPages =3D EFI_SIZE_TO_PAGES (MapInfo->NumberOfBytes); + MapInfo->HostAddress =3D HostAddress; + + if (ForceBelow4GB) { + // + // Limit allocations to memory below 4GB + // + AllocateType =3D AllocateMaxAddress; + MapInfo->MappedHostAddress =3D SIZE_4GB - 1; + } else { + AllocateType =3D AllocateAnyPages; + } + + // + // Allocate DMA bounce buffer + // + Status =3D gBS->AllocatePages ( + AllocateType, + EfiBootServicesData, + MapInfo->NumberOfPages, + &MapInfo->MappedHostAddress + ); + + if (EFI_ERROR (Status)) { + FreePool (MapInfo); + *NumberOfBytes =3D 0; + return Status; + } + + // + // If this is a read operation from the Bus Master's point of view, + // then copy the contents of the real buffer into the mapped buffer + // so the Bus Master can read the contents of the real buffer. + // + if (Operation =3D=3D DmaOperationBusMasterRead) { + CopyMem ( + (VOID *) (UINTN) MapInfo->MappedHostAddress, + (VOID *) (UINTN) MapInfo->HostAddress, + MapInfo->NumberOfBytes + ); + } + + // + // The DeviceAddress is the address of the mapped buffer + // + *DeviceAddress =3D MapInfo->MappedHostAddress; + + // + // Return a pointer to the MAP_INFO structure in Mapping + // + *Mapping =3D MapInfo; + + return EFI_SUCCESS; +} + + +/** + Provides the DMA controller-specific addresses needed to access system m= emory. + + Operation is relative to the DMA bus master. + + @param DmaAbove4GB Indicates capability of DMA operations abo= ve 4GB. + @param Operation Indicates if the bus master is going to re= ad or write to system memory. + @param HostAddress The system memory address to map to the DM= A controller. + @param NumberOfBytes On input the number of bytes to map. On ou= tput the number of bytes + that were mapped. + @param DeviceAddress The resulting map address for the bus mast= er controller to use to + access the hosts HostAddress. + @param Mapping A resulting value to pass to BmDmaUnmap(). + + @retval EFI_SUCCESS The range was mapped for the returned Numb= erOfBytes. + @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a comm= on buffer. + @retval EFI_INVALID_PARAMETER One or more parameters are invalid. + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to = a lack of resources. + @retval EFI_DEVICE_ERROR The system hardware could not map the requ= ested address. + +**/ +EFI_STATUS +EFIAPI +BmDmaMap ( + IN BOOLEAN DmaAbove4GB, + IN BM_DMA_OPERATION Operation, + IN VOID *HostAddress, + IN OUT UINTN *NumberOfBytes, + OUT PHYSICAL_ADDRESS *DeviceAddress, + OUT VOID **Mapping + ) +{ + EFI_PHYSICAL_ADDRESS PhysicalAddress; + + // + // Check for invalid inputs + // + if (HostAddress =3D=3D NULL || NumberOfBytes =3D=3D NULL || DeviceAddres= s =3D=3D NULL || + Mapping =3D=3D NULL || (UINT32) Operation >=3D DmaOperationBusMaster= Maximum) { + return EFI_INVALID_PARAMETER; + } + + PhysicalAddress =3D (EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress; + if (DmaAbove4GB || (PhysicalAddress + *NumberOfBytes) <=3D SIZE_4GB) { + // + // If we CAN handle DMA above 4GB or the transfer is below 4GB, + // the DeviceAddress is simply the HostAddress + // + *DeviceAddress =3D PhysicalAddress; + *Mapping =3D NO_MAPPING; + + return EFI_SUCCESS; + }=20 + + // + // If we cannot handle DMA above 4GB and any part of the DMA transfer + // being is above 4GB, then map the DMA transfer to a buffer below 4GB. + // + if (Operation =3D=3D DmaOperationBusMasterCommonBuffer) { + // + // Common Buffer operations cannot be remapped, so return an error. + // + return EFI_UNSUPPORTED; + } + + return AllocateBounceBuffer (=20 + Operation, + FORCE_BELOW_4GB_TRUE, =20 + PhysicalAddress, + NumberOfBytes, + DeviceAddress, + Mapping + ); +} + + +/** + Completes the DmaOperationBusMasterRead/Write/CommonBuffer operation + and releases any corresponding resources. + + @param Mapping The mapping value returned from BmDmaMap(). + + @retval EFI_SUCCESS The range was unmapped. + @retval EFI_DEVICE_ERROR The data was not committed to the target s= ystem memory. + +**/ +EFI_STATUS +EFIAPI +BmDmaUnmap ( + IN VOID *Mapping + ) +{ + MAP_INFO *MapInfo; + + // + // Check for invalid inputs + // + if (Mapping =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + // + // See if the Map() operation associated with this Unmap() required a ma= pping + // buffer. If a mapping buffer was not required, then this function simp= ly + // returns EFI_SUCCESS. + // + if (Mapping =3D=3D NO_MAPPING) { + return EFI_SUCCESS; + } + + // + // If this is a write operation from the Bus Master's point of view, + // then copy the contents of the mapped buffer into the real buffer + // so the processor can read the contents of the real buffer. + // + MapInfo =3D (MAP_INFO *)Mapping; + if (MapInfo->Operation =3D=3D DmaOperationBusMasterWrite) { + CopyMem ( + (VOID *) (UINTN) MapInfo->HostAddress, + (VOID *) (UINTN) MapInfo->MappedHostAddress, + MapInfo->NumberOfBytes + ); + } + + // + // Free the mapped buffer and the MAP_INFO structure. + // + gBS->FreePages (MapInfo->MappedHostAddress, MapInfo->NumberOfPages); + FreePool (Mapping); + return EFI_SUCCESS; +} + + +/** + Allocates pages that are suitable for a BmDmaMap() of type DmaOperationB= usMasterCommonBuffer. + + @param DmaAbove4GB Indicates capability of DMA operations abo= ve 4GB. + @param MemoryType The type of memory to allocate: EfiBootSer= vicesData or + EfiRuntimeServicesData. + @param Pages The number of pages to allocate. + @param HostAddress A pointer to store the base system memory = address of the + allocated range. + + @retval EFI_SUCCESS The requested memory pages were allocated. + @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal = attribute bits are + MEMORY_WRITE_COMBINE and MEMORY_CACHED. + @retval EFI_INVALID_PARAMETER One or more parameters are invalid. + @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. + +**/ +EFI_STATUS +EFIAPI +BmDmaAllocateBuffer ( + IN BOOLEAN DmaAbove4GB, + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages, + OUT VOID **HostAddress + ) +{ + EFI_STATUS Status; + EFI_PHYSICAL_ADDRESS PhysicalAddress; + EFI_ALLOCATE_TYPE AllocateType; + + // + // Check for invalid inputs + // + if (HostAddress =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + // + // The only valid memory types are EfiBootServicesData and + // EfiRuntimeServicesData + // + if (MemoryType !=3D EfiBootServicesData && + MemoryType !=3D EfiRuntimeServicesData) { + return EFI_INVALID_PARAMETER; + } + + if (DmaAbove4GB) { + AllocateType =3D AllocateAnyPages; + } else { + // + // Limit allocations to memory below 4GB + // + AllocateType =3D AllocateMaxAddress; + PhysicalAddress =3D (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1); + } + Status =3D gBS->AllocatePages ( + AllocateType, + MemoryType, + Pages, + &PhysicalAddress + ); + if (!EFI_ERROR (Status)) { + *HostAddress =3D (VOID *) (UINTN) PhysicalAddress; + } + + return Status; +} + + +/** + Frees memory that was allocated with BmDmaAllocateBuffer(). + + @param Pages The number of pages to free. + @param HostAddress The base system memory address of the allo= cated range. + + @retval EFI_SUCCESS The requested memory pages were freed. + @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress = and Pages + was not allocated with BmDmaAllocateBuffer= (). + +**/ +EFI_STATUS +EFIAPI +BmDmaFreeBuffer ( + IN UINTN Pages, + IN VOID *HostAddress + ) +{ + return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages= ); +} + diff --git a/MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf b/MdeModulePk= g/Library/DxeBmDmaLib/DxeBmDmaLib.inf new file mode 100644 index 0000000..4ddb27d --- /dev/null +++ b/MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf @@ -0,0 +1,41 @@ +## @file +# +# DMA abstraction library APIs. Based on PCI IO protocol DMA abstractions. +# +# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
+# Copyright (c) 2017, AMD Inc. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may = be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D DxeBmDmaLib + FILE_GUID =3D daa403e0-071d-44ef-95cf-7f2472e4a4d5 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D BmDmaLib|DXE_DRIVER + +[Sources.common] + DxeBmDmaLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib + DxeServicesTableLib + MemoryAllocationLib + UefiBootServicesTableLib + + diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 5996fe5..311922e 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -275,6 +275,7 @@ [Components] MdeModulePkg/Core/Pei/PeiMain.inf MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf =20 + MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocation= ProfileLib.inf MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationL= ib.inf --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486658447684208.48055677257946; Thu, 9 Feb 2017 08:40:47 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8955481FEC; Thu, 9 Feb 2017 08:40:46 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0628.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::628]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E1E7D81FF9 for ; Thu, 9 Feb 2017 08:40:43 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:41 +0000 X-Original-To: edk2-devel@ml01.01.org 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=wyeDjSftCGQ6EuvUajFavEwoBENUYZuNagJoa5HGalA=; b=vP0GORPMusA41QBSZ5wZImxql16v6PLBY89GV9ZruNceUAB5Tdo/Z4O2Mx37zRSC0HF380CmpqleMd1dSzFJH2lfayRXK2E7spCac/r8Gu4Txu0XIMunxe45U96tT2ww8m6WxRzQBwJtpJZviRJjggZqZxlRHBxw/EXlvARiOIU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:23 -0600 Message-ID: <1486658427-6551-3-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: 91ca58c1-f645-4897-3c35-08d4510a6369 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:R/cxiwEYu7nwvd87R0YJgdXk4C6qtCknX3ge4IRWzgDHZ4ZRAzwfmZ8DCS5ChG9z8Z87pKGu1vqy0o8GNGbJD9HJeHEg9IdO24rjyHnPg59w3Z/8HUWllNzXfjLiC7YPKh/XkrLcpbKxzg9THY9Xu5v/06EpMzUk386eoO55mKj5Nr/pKoYVYXxHdqenImafnZkaiJ3qsxyGZMuZuzYDzKAg5aRyIn+5piew5j4eciQJjPvT2oKK5OAhfCgnsmbO7qmG+7VyP4t4aDUwsEzp9cyaay82sFV6dPsPqkZkWj0=; 25:wR9OWEFFfJiWmXG48Az5RogccILjYYecf+iRLfZF3PUrBQlpg14yx0B3DrwHcpU36AU0+E8g178lfzdVy0etEi/w56wQ8u6XcAig2WWFWIGZ6Sd6IKwA+wdk0nqGLrvkfgm3e9LWzAW8XzOvCcDMUlw65DZ+EDhgvep2MetLQDrHkoiUtoeeCZEpq8rXvSdmQnlXqVE8FDqGZopFyL0o+YP68UvErRLPovVG+HYM31QVnqYtxG0Ssitz4U9ZexsdiX/Oc44sKf0rA/jwg79Lqg0K07IkSpHR+dWh5vplRQNs3JY+pLwmgi62laWzB/+/cqBLEHE0o40AuGd5RVpmd84s/3Wso01Ra7L1uVhXSq5CwEh+A3afituBPnK4BN6i1a14fAlJRggfbMCLYp3fRz2CutJrLH0iNo/LFbDbRJNoLXQmLl2oaMfg4QlmFB6HB9bjvgfjsLPN5ecIllOJqw== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 31:I5lUuDYEjwjHY09nUmrgd3GY75mFub2Av9iDHhFzqZovflZadXLRkpu1NNBtf8/UvkDHBQ5dFFGhjHxATo5B/TzHpzpym4AtdW5eOK/HFDgzPvaOUcNK72GHlYPIykDavEMt/W/+OlVYIq4hpljduGYuyjkk5YGbCLuONkIYfFmaYCfq6kCACVJYMwNUKWkwFSsKcOTviirekjTzzHjmlYUTJHntgu/8/RyPsoRjtdh5lBldEwRsjtte5K08Va/Z; 20:ssz1Ru65bh1Bs+D2JwVL2eXOeut/oXlsRGsx4SRohv2Ra/+IUhlvnh1RlGZ0uOPEpFbdNzezCXJzfaIKKq0FBF1TwpPNNnLAmIJBULkmypftMExnjpRaWV8vzvS1fdFAM7AXC3PqqCAKxVR8EuzmBPWsxdxCEkSi3IGBXCbMyvtrBmA5+TlMBfN+hV/hByy/YZquOtwPSY3nvRiYAb7fFPXMBTibv6yNTjjDUUUJqraTsWqrhlHw6RG3BbNLolDU8jWr8+UgUOq6nLNdBq0Hb1Tb4IaqYHP+4Y5SQu0Nw9U1F6uOZyKGsKasdH1pOKgRrnNiSWWQZSHUm5fhrQgMill79CCznwhUMIzH0qSYJeV9MBvR7uEa16FZ50Uxh6aE7uropZs90qyexB9u0A3KUpj5QBqi5kM79AjjTipUDzEchMqZPHXJe00iVLEbG26iGEgpOM5Ek7K/I1l6IRTGJ64SRL5zKVTj5nHb4cy7uessDX8XU0GR+84ngbhavuUs X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:8RqD4kVnj1WdbF2UJqf46DNuTESKtNm6J8sZQPfLNcb7hgZxYl41kvTU+a++xoSZQUlk1KvVSFkUxbh7y7HSFlqBMvyXV2kjHH27SWOfjTYqzxS6cG5WgUJaXQZ2m0KFjXVIHb/WQoO97DO4dMeoVehnpyx4KSu522uIKWU0Dcw0DN7vq3RevuGf9AUrK4PhKiWA+Hs7h9snpXr4CLbSVyFAMHGEXctZIet8H1Ldkumz/IrVK1GxvIQoRhSbxNbXtpPa54R98imnzQJhrpkcKFPNKL04x6aKAPgZjK2RS8BKEV2DijnnFjAd99wJYPPZ/g5kYFN0JpRdltu79BRPn8ea88iXEaXEuWIK/ppHQqJ0lJDQlwFAnNP8l/bJI9Bz4wlzn80jCDYVUf9ItXAiu0Mllanrvj8V2BluUP4Ky11DbggVxNQwoxuLLpz9jiSMFFaOzJi1ouokN33CmAbLCS3McT8PwsY/o1nEFHtJWg6uSG/IZS6jTDHMRbiDPET2EHxXoUaAiOCHe0bFq4BGf/FXAXXTFbsmqEj/xQffoyckyDtiDXi1PdlsyWnfF93MupgsDeDdm7kv0nDP7t9jP6HWjx+D4oG0ki3Hno0U9UJFYKYV2LKvubTjdWNoT/XGT4QQFB1r0JjtfIU+sGgizoyB+JOi3rdDkkhSjk3f6es= X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(50986999)(42186005)(5003940100001)(25786008)(92566002)(68736007)(7736002)(50466002)(50226002)(3846002)(6116002)(48376002)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(86362001)(53936002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:kGDGepZuBkobfcL0u8I9PBX41gmqHRYxkiZx/nwxx?= =?us-ascii?Q?P2GOYioL2jYwaV0EA2k1RxU2rm3mQWQV4crSsT25FbvWy9d3Mo72n86wre7v?= =?us-ascii?Q?0GIHtXxhtVBRdr9W4M3j+AJbSamwdXKSMFw84RG6BrBmhw87w3hlvR0Obd6x?= =?us-ascii?Q?laFqWffm1fTn2d8+piptYN5QquyrYbGp2o6/FM/FF6ezovX85p3ZGyQBz8qk?= =?us-ascii?Q?hi5vkOzHLOuPRbR/oomYRdVms/ja3n/xhK+D6NxYchwuOvW1iBql/rulX82N?= =?us-ascii?Q?srPXHXFDutYW/5u8xRgAxDhWkUMqGcS4ZgjR2kwPrX6aTOIuv+BH7w/GcKbN?= =?us-ascii?Q?UpZJ2wEDzw2k67p5bWGbnnKOM8prAsJeiX4lcM3kx5pWBLoIp/cwwCTSibC2?= =?us-ascii?Q?WLCZPniCnioe4Q1Qw2827oEfXtAeZpUFt0hWReCFnrFUBbB1HgO1od+ndPbm?= =?us-ascii?Q?YLjjOJF4Qex0eMNW4ofLbMuvtD7wpojB5iOWxp/Hht2EeD1pxwDfiYGOU+ka?= =?us-ascii?Q?VG2ynLHKDcRzZ8iPBZsDS5X7d2OIMkyDo9lpEjdHOc4MjLKRqZV+c8CcROZ4?= =?us-ascii?Q?CUZ0+i9+3TUXnq0jetM5Jm1GjSSXXSmaTg/15Cs2Z1SKXL6M4DpGHowXPl7A?= =?us-ascii?Q?KxbbLsAr4uRu51YB0clBJFVktC4fZidCdDuJ+ETr9jYiLuuko/ma950P0r5i?= =?us-ascii?Q?bH+sExd9VKiQXTBT0vlSUdLHwr9+mSu+Cm6y3DNy0O5M6TIh2TEp93bDaxGu?= =?us-ascii?Q?gRZPm1+hlvF0J+w0IXvZicSFj7mctQrjVargKPYIPuOCdQAXG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0X1ftO8T1+YYlQVrlr0BZEB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:41.9041 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 2/6] ArmVirtPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver 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: , Cc: Laszlo Ersek , Leo Duran , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch adds the new DxeBmDmaLib (BmDmaLib class) library, which provides an abstraction layer for DMA operations implemented by the PciHostBridgeDxe driver. Cc: Laszlo Ersek Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran Reviewed-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 1 + ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 + 2 files changed, 2 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 8fe3c38..d318f82 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -59,6 +59,7 @@ [LibraryClasses.common] TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.i= nf =20 + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKerne= l.dsc index aa40374..721d78a 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -58,6 +58,7 @@ [LibraryClasses.common] TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.i= nf =20 + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486658450275551.1557662047508; Thu, 9 Feb 2017 08:40:50 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C076E82005; Thu, 9 Feb 2017 08:40:47 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0613.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::613]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4F80681F53 for ; Thu, 9 Feb 2017 08:40:46 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:43 +0000 X-Original-To: edk2-devel@ml01.01.org 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=ALgmrFyssxbocb2sEiShq38QPzTS5iz3EDhB4hAAUt0=; b=BGNir8se+YTgAqo2wQ70EnO8yVLFYLa3cEV0GgDkBQeTeS/Ki+cnWSUD0rx9zQwK92aIzS6CXjgEkrYNUTrHVFKCTeqXmdeN+2LWJKmoTZo1QL/hKrrs7yUG9Dyzz36aJJA3ekk9GMriu5w83FWNx6tWL8eoitneiCfQNP4+PuU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:24 -0600 Message-ID: <1486658427-6551-4-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: 8b7eb239-7882-49ed-724c-08d4510a6450 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:7ExJ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Z98EXg8ym36Jy9yov77cQP67y75NwZZwTFP5Er/J7dtnuWk41HRxQUUccbFzTIW8s71l7UA6D9SWKXlMzk4Ycnis6hadxofhPlzTU9CmukLx8nBKgcfTvSBPI/OYoYSG9m0dijgkiJoiaZTGdTy0F6NpU88VcJFbWMJweRpk670mkjV9giHSLFXmgGGMAujhVf9+EheiKhKPmnvI6vOCQTlcmN2Bxo6MG42PpKCLtJn4lYm2LTlrSIkFi13Ons/pVY4KAPOIfQq0fKO26vzD0VFUG2CmwkPGv19Vo/am+FlGfCzalXsdcYfC+4Ztg9KSahiEKagncWl7AoeWUGOiI9ICsWkXmuzQGVCyXdg3PH/VIgYVu6TxJAjGgMqKdBBrRvtXY7oIFj1CzTb3qdqYMYPvFdvD/EnODaFOKx87/HxNb5Rmd7z/BbWjVW7Thw0BU1s0tVJw71ADMCPtTfgQMtOGUt37GkAi9q8fDXeKcdEDmc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:fegfn1lTjRDamqtKY0wddAAzHX+XHYxRG3pz2iTZ8lB70KwkIWDbpfZ2ruBgLTpVE4cZ+8mpHfTzBZJ5PhLGcQerBn1d26lTxD7erQvWXrNKLXQuo1ulZZz38vedOlA3SyTMwMvWUR40iCn8SjndnkfcxJ07QcIdr8RvlfSiLlN6TJcaIe9VNZ2kAO6l57Kulb7d+ReKZo0L2lCGgU9nAV9yhqm24q2Dq3uBuJKYh31LSJPbBDEY2Van4ifRNJTm1pdLQnHv9ZL5MV+lFzFGWYt4dULjrGlHrx+njKPZbk3JA4K/WQwYkjb6FlBKAS9ik6lmXHh5hfBivet145hBdAOMjgJWiZ2IHY+zRP2vPLDYDrrqYRFQqZoOLBt3dPzKmo0aMHT3a3QOnw1NgdtRFUZ63+eOpGQaNse/TXO7c7GV40bqTHAM0VoqtZuu/Yd/fZRo7CTVgzUI2DvNuH6hmHVnN7X54/G4tblFludq7g7gvtKSGMU6Wa7NxgFdIdSluH9IzyubB2ls+aVcLtr7kZrI8Qh9Fy3j3DXMfsxAZFZ+lkrVcimnwSXsiOARc8joUhgHe8QLCBd0JmingM0YEM5CERz1kLmyQgSDCN6Z74CDHH25lXt/Q5huhLVxEKYOtJI9YPr/QMEDyV6OlKGmVGE5iqvI+9ydajt3qdSomYXvp1/ibq7rvGkKMCDsyL4o X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(50986999)(42186005)(5003940100001)(25786008)(92566002)(68736007)(7736002)(50466002)(50226002)(3846002)(6116002)(48376002)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(86362001)(53936002)(5660300001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:+N89wk1f5ppt4T87xt3og31brn/baROhgtW7Z2Yg9?=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VPvv5jFMg==; 24:EdzJyOiNxRZAvjsHDsu+jddVZZr1ymCm1uJjr4X/dL1HT0Zi3PAzqJixfOXKQt5FO+ZMfvr/zjIgfKIetEMXyVvS4fyL7ncpSUbSwxJd0g4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 7:UXhzUkG20Xu2SGb2HFSNArCADCbopPMXmzjDlT+8ht5sdZcfYmIhdIpfXYnoWH0BIof57vOQ/BruC8Fa2L5IQzUKhx0cQ+GcBuJQ2pwNY8XKsGc9A56GVsWiyrxvJEKpbVPiGGczzxq1LIELy3eE7CqzxFzMGtKm/u5bT0AHw3o57DwgpUuQSugeFVyzokAC9+qP8kbTYcDB54bSXwzOhkLMJeMKm+KZ1y6Awydc2L5Map/ASGeFujN3bbG7713OFrox5eK1pGHLscA97Rtt9Qv3R8jIc/owq+FI6XvizO+bbSbgsw0mImuMc12Ib0/0oTisYrhTmWDyBLxXOx86g/OiujRpSnqCDG9yFRbR1byd+kq2aeyuZ4URQIAl68zoKWy0cq8xdO6ogpnVuTMtuI59DEc443TmTTnzEfnTp66ugvMgBk6qOEQYcR6oWBNwHt1MDGjeKTtDKQ1kvNNiQfLH5wCIUlllHHxoa8DcMEOqF4y71TF8Fh8jy5K2JK1I7Cw2DkCQgSluDXor6LxkEg==; 20:jsGz7H9m0nUl1mYjDA1v+Gflnb5x+b7beY81tQ8eNTM+NH2J1eQrgwlqow5eFhT+ZsWM4YMcl5lYopnM0yH2+tajFSNUYy6ik7v+5ATo6AZMQ8oSzQk6Wwn1vA4OtC1xqH7IGBn1V1NaIzqb8khWS60Inyyu3uM7HMbF2FZJgcrhcaNotuTQ8W2KxUqnCOIdosJs9nzQOvucu0FrNjOb32GXrlu4gRq+Dko4zp0iNz9j2vh01r6VCbmXX+ckdzhz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:43.4163 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 3/6] CorebootPayloadPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver 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: , Cc: Leo Duran , Prince Agyeman Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch adds the new DxeBmDmaLib (BmDmaLib class) library, which provides an abstraction layer for DMA operations implemented by the PciHostBridgeDxe driver. Cc: Maurice Ma Cc: Prince Agyeman Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran Reviewed-by: Laszlo Ersek --- CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc | 1 + CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 1 + 2 files changed, 2 insertions(+) diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloa= dPkg/CorebootPayloadPkgIa32.dsc index cdfcb75..12fcd3f 100644 --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc +++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc @@ -140,6 +140,7 @@ [LibraryClasses] PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMain= tenanceLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf =20 # # UEFI & PI diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPay= loadPkg/CorebootPayloadPkgIa32X64.dsc index 6b16af6..28e1ffa 100644 --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc +++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc @@ -140,6 +140,7 @@ [LibraryClasses] PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMain= tenanceLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf =20 # # UEFI & PI --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486658452710804.0716933436801; Thu, 9 Feb 2017 08:40:52 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 030F982029; Thu, 9 Feb 2017 08:40:48 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0603.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::603]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B192E81FFB for ; Thu, 9 Feb 2017 08:40:46 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:44 +0000 X-Original-To: edk2-devel@ml01.01.org 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=BlgN3vVit7t1HsIh+B9KauUITG2PfOp55IgExLgl0tU=; b=yD8owq1CKnZFqPJrt423Ou2FjwOYh2lAkVraiz41c4Khp10ab5jvqNOc1L2GZdj6hIbWwJNpL19s6wZqlVF4LcMmosPAXToDZ23fLwIXQjto7HTN/9KAuHiLTNDRDsS5MmJ2ATaP+m9glEyP9kVqsgK1xSZ+sMmKCMgF+uKzgOk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:25 -0600 Message-ID: <1486658427-6551-5-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: c5d6c09c-015b-4892-1dab-08d4510a6538 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:T63GCpgHdlmddiGVfme8DRTLg8k8pZL2litTjQFz5W8eT4F4jDcupsN/uMhKV5dqFTkcautTsrcsB21WVVG65nMepXuxkWxLrdQSHIpPUm2xxNEBkgg6MHcSbfc8SVOiJtzSbaMIXN0snjjHVsSLWJiK3DKUuHBoQtlVm+HrRaTwuNfZZus0CX90IBR2a1+fCb8ktGY21xVRkA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5uKEHaUCHjjMqJhKzK4agsnyM8zX/ThB8HWemC7/3iAPKemxPMyV4hlajOOoId5Hf32ibaYd2VipnEyku1JFKZ583sTQZsedtqwv/Qd81cvxBk3abejFR+Br9oNws2qczMnb2jJKJwV/Y1M4TUYZW6/9fvItk8riDRcl9VSOYx0TlrC+oWOGiyMzQTcIi4dPf+oAoLB6s5mS9x44obnOViWslF+fcPJovEO3+jxGb0YM2hhUoMCk59W2SceItPqfGJcK9dzR9kxxO/RSYGVSDhtvniNBEcAeR45jw1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:3zz95URTEmTGuPrUu8kcffFVTsKOix1LpndbSmwmlmDCcToHhoGw2ghOOn0f14S6mwbZcfg0xc3uD66zDv5mrfyIlh0Z8I75wsdm/px2r+b4+L6iERPCMbtnlJAOppQ5+GKFcxNBk6tq/NIXMRBs5la0NXTl5Pwoa5TazV52Ii0RpDseHG5CaoRvo0nbQF8RyV/pLJNQXkPqSHFI+ThElGTqqi/uhauMCpbJ8h1DtRZR5O/7acJkzJAOO2S/KjKqWEiIU1ADLzTA5EPoqmgViPlQQeceGPxX7kzi3i0uq2tMJvY2lgpWwBrxjhag6LJ2nTa6aeN8xQo7OXhjLvn/D8xHPmVcEyhTSSnhvHEVzWGLTR5f8quRkaMNNf4Xu7bmPv0ES0Qb+bWkg00TL/ITfyaTn/eR4HRmpjBrjBOZkgMDQesgSi30GR7kU0ul5Gaj4o9ylQLFwc/9QGm4OGso7KABj3ZhvBKKIQX29RxrOoh6EO8ozKqTIN7PgfHmPxMZyM/glZdBTIyAgxtmMPA3YgVfPRWMVdXdq/gltBgnrtQS5GJIL+ZZX+vJF8zyTFRJe+shQPwfJ6J9o6Wf1DkmuzJRZNtcCB0Rt3zhPlTdlHhxKCdtQu/zifINAgwBBniP9i1gmTQ8FA3tJ/lOTXUzAFf2OaMTsjT6TdiRBsuSpAUj3xb7n7vQO/7Qapuybs4moUGL5CWgSN9fD4C6OSRAzA== X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(50986999)(42186005)(5003940100001)(25786008)(92566002)(68736007)(7736002)(50466002)(50226002)(3846002)(6116002)(48376002)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(86362001)(53936002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:1fY9VjAWG0hCNloys8As3gqON/ya1WlY6m5xi/W9s?= =?us-ascii?Q?QO1lySbqYOFkpRQGW6l31eh5N76BDSuD64IYinSWJVaDLJu4gKFHopRyaBId?= =?us-ascii?Q?ubRgwj4oc0knbiWbP5TgDTcF4ThOJqO62QCJMMbbYwm2+SGvUb1vSM3OK1wC?= =?us-ascii?Q?19tslLlJh++YIkFo6uzRTQG7KeVBR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= =?us-ascii?Q?6gAewv3KW2/XcEbWaZJPKKudZBaioAWZEzeJE9bJJSO7JntzaH21h0evAHM4?= =?us-ascii?Q?m16vL43iwl1vLgyLatBBCeDBJlplw0JE8n9aA4yS+sCuqP+cr4LSKUvoeM3b?= =?us-ascii?Q?ImTqgkINAvFe/lIh4SIIbLXTbX9sb+1ZQaZxIQzUcfWxzENiX6P6XSnMub7N?= =?us-ascii?Q?HRMC62CscTuCmRRzuI=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 6:XdTofoyRUhZkhW2siOjZgpAQ2ga6wFvPpYPJ6TYHsGC9YKt3ANws0ddnhu84y262azaWFVaM3Fy9ZELab0+4i+dwLBF7yWebSCNIU6Rkc/+hL7vNuVTH05Y1eWdgOl2+4khoQwzIi0xuhRyX6lavoDHtaqjyhCVAOf+fvwLIUyQPZq04lCMj2eQWiOl9YUfseQ5Zeq/JzIPPNiDlNDSsUlDJmhCMVMeRBM0kDZcWImNwR2KeU8vEne46YXZ6dtdunRlx8wBMVb8CciW6Ckl2K5okcaAj5da4Vg3SiGDpvDlZv/MlY7At6gvXu6+BYZ9WrCtzjWaZwKaLoePYDegjAsnky+0X3tDTWCNuOs8NgLP2xT643hisQ/PR9ytHmKfVBLjwcKXZojcB9vZ7v2Shi7gxTQGihtBeEK5UZPK2aWY=; 5:ZzH+42kjmVUwIy4qB/Mqea/gkjnGoVOE7qZ0xifE2B3aEzG5aLN+RWiYbu4i26aRuWihv1uH/ZpKEmKjqWY+yrtAUAnQAMtBo4DdUDYXp+bSieMGLYSkXsMZECOpnC+AJMOKPm5tVHHJt6VZn8wYHg==; 24:poYxDRKNmf8tWG2ooXuyJXtnyO9E2vuzdLhF1vwj98yYKWxXWwPtTZ6p9sTirDIPc027CttrzTKn5t66fvkB70AbRbFJqGOOLzJE9eJbwMg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 7:KkVHTdfr0fakVfpMgmWL/s39gWRWnQ6lR+baiDcuBZDlEuRULykoktwlAENq3EB/AJWxTgyljN4jN4PNxkJf/rCRG7wXKyrp3AAvFeI7mwJBybqNRdyPP6c8SdG19NgpuCd27/6+Q+WGChZiCd8od36Ay9vmv/sd9svHhTQH1OSu1aRd4TJzRfD2bMvp6ej5Vhgy54U79J20mU08pVXCOahrYEcLv0QTZLglfgM82grJreFasGyYHWwtJvcc1KvDV5M8aeD4ryuTPTQbh9tbvPZVkaGMhXk5aBP0bb0r4AoNcQaznnRyAUZDS+O1hfvRVDLzIPe3u6oHjOlZfanoBhAHsIaLB4REBLcru6F5AtTyoiGKX9mxVkAj71hIGXHbcvUUmfKCTqMP2MJiN92gJ/rkcVysdMd4epWd7491hieFF/oEoswBSz+uiyLUPbjNxBnhb8BXAXKAm5MIdexVEhl/a+N+R2LvLf3cyYCZMg7ijU+qH9d3pkM7FJDjRBFdjeNFSA3T439SKFgyLVR7fw==; 20:IBZjyDNlsu4dnSIzzxYIWdmQNmxfvWsoTHUeAK0/TRxeqIM9Hoea5f82hf2A+60mtSIM8xrmsXMxUZm98EbTM/J13TCp76I3bWV8BJbeFC/P1rDOE3FDF5Aa1/UOuwToJCT/yB7xWjqpLPAIR/5wawuEr43A6mP+Wm2wnOinVsdErmC/KlFoO1FoUPSmDBbxP2Em6elSJyCLgms6OErN+2ZuchV6ZGGXjw69HoInQcKhsprelA0pV7A6glEvuEcb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:44.9346 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 4/6] MdeModulePkg: Resolve BmDmaLib class for PciHostBridgeDxe driver 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: , Cc: Feng Tian , Leo Duran , Star Zeng Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch adds the new DxeBmDmaLib (BmDmaLib class) library, which provides an abstraction layer for DMA operations implemented by the PciHostBridgeDxe driver. Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran Reviewed-by: Laszlo Ersek --- MdeModulePkg/MdeModulePkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 311922e..b343c19 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -48,6 +48,7 @@ [LibraryClasses] PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf # # UEFI & PI # --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486658455180828.0782046809627; Thu, 9 Feb 2017 08:40:55 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 357588204A; Thu, 9 Feb 2017 08:40:49 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0619.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::619]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 40EA98204A for ; Thu, 9 Feb 2017 08:40:48 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:46 +0000 X-Original-To: edk2-devel@ml01.01.org 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=5M3WKRcayB73yoEoqEvEUZESIhz31SpbPzgKAbRgkKY=; b=N2gwElhnjXDCP0+/FrtZBdzkR7DXOW66/+4+BNNdCKJ2bVZbC9MMesAKtqYL9WSbs9/pQGkLCQGadc0gMTxa8fkSqhf4N4ENRTg+ecWkzpfwjz2HBVx67B8CqSzcP3CMu8WMnhJy0BeWNOxyr5XIxZtTQmyK3EitUmlCvYZ2vz0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:26 -0600 Message-ID: <1486658427-6551-6-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: 1f10f3ea-f7cd-4d6a-2286-08d4510a661a X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:0UE4y2+DdcA4qDKA3hzN1zR/wxG4gRUQiQnKanX2sIgbVQel8wf68A5jb78aDzaO0sbKodSPUQw+Pp1Ny+u/H6K48M5X8p1EMHcGa/z5Fc10cDKZ0L79gUnu5oBWeiZcm/eqwULfcZ9Bq2R1EyYgaigclPWyQq6fq/poGCdMmwCmDz4z+cVoI+GHTX/G08GMtQDj1Nwq3jFMgXiKiHpsuf9c+ba9oRwtYEBN1xZnCGJdo2T/AKVuDPbWT6mkFp5pTWK5MufHEH/M7YdbfaA15Og46FXtzR+X0AGxyexLURk=; 25:WtgxIyTBk1iujUid4xO4BQHnKvtiEr3HTnffCl9ZRZ2jGpN9rVPwvQXMl37dPcUJi0SEdsw/cc2BAnvlB/B70q9NvUfWkiJEMLuoqnNMWqrEnYqEQi7Y6HHipoWJmg8/XF7h1MCVJra4fFWeP9l2f7ljBd2zPnkycCBxN/41TUgEm+72EUbEmMAvz92c2AVR+zxm/OGLqwQRJLYkcBdsf81ZJvC3d9S1QBuZ8BmnELujHC8kf1HTptwdxHTCwplPCZEIIbs7mXK9al/L4SfGU3AT5+3AopyKQ1rTi+CxP59gOvjjO3G3Q0NzPtGV4b3/8W0ySQu93+pJWSXcr3VXwKQS+lcCB5/Wm4U5dPoLPbMaR+oBkyqIyYPwP2EJv6vmNP7/JXCYxHcLJ7QNvLKMox2sR4TvV7TwdLVxMjyBNXesNfEm+Ec2i85XGU+vQ90mtfDaV1YtExCughcLZprTNQ== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 31:t3wkMCHp3kmqgFun5HceDFaAJXtfBadi4vH3Y4vWkl/VVrtv3lfD+LSidc4Gc42U6QJWNTmJlCixgrB87VKJ1E181imY/fLw8tZ2qWOUu0vaiSkOfAFRuVPKOaORflQ+r6GqNpkRoW6tCFYAR4QBomT5H9zGWjAlVcNlwIDBfp9aWmRxgDECG4MzDZGoHZSgN+fFg0AFxs49NXrN1+aSmG9E5xOm34ZjZrJn/jo24dlTGUAzUBn9cI9fule9oidE; 20:gyQkJnhPjZy7JgE8BYgfS1AZIir2AEE3OPgymsjK2aBemfMUPU96ihgFx9sTl1zMJJ96X2XPB/L4OfX5/zbOw8M3xLeV+CF6DPGtPDclBdDVK5MSDWydHYFw3LcuMPxSeuJunWl/34Nx9D3a8M9tDpFoAeshu9p6QAEE5ubYx9Zdr9WRsr39q7jDAnuYK/YksypXez5qVeCFa8Ep31vSAA5zLFzV9hDH8XZvE5nuonZtNiW5RHXOzthDVZn0m8UYZWjeYSqgAwD3l+ps9VA0A/pWyYZSnFNvNUM6zxH8ULpDQedIkVyi7rnD/XPJGTyph4r20+NK8ZfZ90EtkEUBx6n4j43lbL4v4HRxhU23kH8ee92QsyZUiFMIF0PxBt/f1XudvJLbJtL7E6kfM7xiOUSMRe01qVU4bnT2A1ADt5RM1hCzI0sw5b3Qy3nWuftkDlqcf+77JRBmMkigGJKY7B2n2rCnPbaEvrH/yn4cjqzIbYpFd+UuDJ3rD1lX0T60 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:DTaan4qgu+1lyiC8UjGGkdx5G0aUc+WmIFeTj3al/klL2q5JJKwfUR4C1o2RWKs/3Y1oZH4q/D6rqGTvooULs9+fBmXSTbDdsBlhQOePU0iSpyMxZCpOF9JcxZUdZtUYgbI4u71L0X57qYyoJP/NbLZHWOUo+X/+gC5eOjBfjZdG6V/6DvZAIwz04UcUB3v34B3jEPiRG5h3Po5GGKyHQY374eq3pq4u3dzUnEtH4V4OUoJApIZGvhNgaBt3PuTLsj4wPZDunZU/U+cda8CE9NB0ITetHWT0X0/Wdv02nPN2+I9zr8ID2fZp2YeMikH9+tTO5DzvBmBT5Cwn72zq2EQiML5c/E76uh7/jRnyIJQ+wqvABfo0fFPP1vesJCh6oQzVW7sGKUJgCPK91XoUbGvAFDYeSSMV1tw5aSPQcsGX4BPFtN4TV9sVuT/ORqY1UM77oXzRjo7Di5Vm0wrVq6k2RkMg8H5d3YkUvLkX1A6QR+o3XHSqEvOHxOUy97Vpx+QCNut5zxkM8Av/02vy7Pg7pIhzXNXgXkbnVg0yxdhgyl3OJb2XHM6CraCRf9p0frXEUftn+oKqe9treKsqg/TCxuBfFCCHJ0BkkVgjM0fXYMj1c4SdW7eKwSl20GQ1IEwZ3rmAAibn2CI09CnQoNDWinCMJoyxPlOHHxPa2WKZTwvSzjPg9UlWzUdJnMAzYyB9Hgj1vRlT7jwG5vDbfg== X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(50986999)(42186005)(5003940100001)(25786008)(92566002)(68736007)(7736002)(50466002)(50226002)(3846002)(6116002)(48376002)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(86362001)(53936002)(5660300001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:MslRZ8scXngkUvYgBFvuCkwiQGfyqQUF3yt/xVXsw?= =?us-ascii?Q?1Cmuze688P0uVAb8O8hk0U8R+T0EhE0RIslZ3Q/TGG/Ip0SlcpiWGRZM+GZe?= =?us-ascii?Q?39OevkIpNZaCNWB3NcCZ3+ERXB67MLEHHypLhF+7w8PZYLz8msXgiIsmcyGg?= =?us-ascii?Q?oo1C9bOhp8aHd7Av3lzrxXy4ATKvGzGhRJc6tSfczDooIAwUiZsz0+lFzNOM?= =?us-ascii?Q?QYDe7g/iiasbhq9X9Q0fV8z4LgmhV9Dqk1zU5xvfd6Z6X0ldX70/CzfE+D4O?= =?us-ascii?Q?S6+brpl705S8aE4u+gUapy1L08a+rnnpcIPqt4uILhmS6R9BIAaNzM2x5W7q?= =?us-ascii?Q?XWRHGjR8JtAYG85/0Mc2pYykfsi5d/Ryy/kgGAnIifvW1poJ+1U1bGxSzfYc?= =?us-ascii?Q?liFc2QFM7/ifsTA+LT3IkExkngt4hw0Lxn2ULTbXdQbzMd/UrwQxCM/yxdeN?= =?us-ascii?Q?e9RWRCwoC2fatT7EnHiwyxpCCoHnYP17VkTexV2o8oBDImxNIpjEeKL27cg8?= =?us-ascii?Q?OY8PAhrIoYr32j6gS1vs5Zx00bxYyyKZj5oM+j1iG4uvr9zb9tHgV81ER7/u?= =?us-ascii?Q?HHsgvNUWqf92O/eUP2SAg83E6WtJdwI5U4WWb3ZesAZ0c2jgWLjT9Bpv1/zm?= =?us-ascii?Q?unu6l7Wg3QLDL71xNhzAITgTlNpBmgh2CbYKYIIxSnyFDDzirREebQPL7NEF?= =?us-ascii?Q?7T7N0hmKK9b2g/vnazRdh0SoSp3ozd+4HG1q+uhGJs7WNc8wEMLfkn1WHjAQ?= =?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CCrz81wZTVcTsN9FOm/lpJ8/LYJG2LgNBcDpMhKZzzv+a5ltMBKIxQggsBhs2ndqo/KiZpD5G6ukFTT X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:46.4038 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 5/6] OvmfPkg: Resolve BmDmaLib class for PciHostBridgeDxe driver 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: , Cc: Jordan Justen , Leo Duran , Laszlo Ersek Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch adds the new DxeBmDmaLib (BmDmaLib class) library, which provides an abstraction layer for DMA operations implemented by the PciHostBridgeDxe driver. Cc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + 3 files changed, 3 insertions(+) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 993547d..f2fea24 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -90,6 +90,7 @@ [LibraryClasses] UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index f36604e..0f1f85c 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -95,6 +95,7 @@ [LibraryClasses] UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index c5bf1a6..ec43249 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -95,6 +95,7 @@ [LibraryClasses] UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:28:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 148665845787614.725861219705962; Thu, 9 Feb 2017 08:40:57 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 67FC381F6D; Thu, 9 Feb 2017 08:40:51 -0800 (PST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0625.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::625]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 00C8881FFB for ; Thu, 9 Feb 2017 08:40:50 -0800 (PST) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 16:40:47 +0000 X-Original-To: edk2-devel@ml01.01.org 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=dmtYrtQR8VupdsppDXHs+sMSfocgCH8zqsa8WSn4IKo=; b=d/OOfK7Kfl7/NiqgUIGeUiHpleivVHWzemurlMq+tiOmdv+k/N8TuBFBkJ4U3trh63sfWWHn44bN3OzjktHWM4Az74xIRpiuPRkkz+GOfYX+yyNnJb9vBfIsakwKLyRRBK8wnHuJP61JLvRWaHNUcUsMZk57K8dNEdAPrpw68cs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: Date: Thu, 9 Feb 2017 10:40:27 -0600 Message-ID: <1486658427-6551-7-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486658427-6551-1-git-send-email-leo.duran@amd.com> References: <1486658427-6551-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: YTOPR01CA0009.CANPRD01.PROD.OUTLOOK.COM (10.166.147.19) To MWHPR12MB1245.namprd12.prod.outlook.com (10.169.204.149) X-MS-Office365-Filtering-Correlation-Id: dfeeb930-08c8-417c-a6d2-08d4510a6701 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 3:CXDUpxF36Tbw38UwLW04bmirF2OxhHYJsOIEevZ+4e208ftStg6YxD61esYRpA4O4fq7HYluBj92Kevra6v56ZsppHKMFgwH63VlvGIr5qvrOMXcKvqbFxEwjJBX6idrGocIOy1/x2hqfbc7GwCfKHphweQeKWlMwa/ssaXb4AxxxqjJZ75Vgzurl8IraXNPNPlhIpSuVuQsRHKl8Ts0MgvIDENMfiaJm5MO1EOd8u7W3lTEtomZ/PGe6NMXDd7nS0fjXLkHm2SPTVGogKLa/NtYQKcACsJYHb7Lix2mYAs=; 25:ozRIJ9hkQqaVST40bA0ucCxS4ySj/tjdroU+gbAVM7oCMkcxqPZGqEV5Yvl/4n/lwDJqGW73VOxVTXW8aaYHds9cacoxncJCF+4KH9arxB9bMcSzBHWScjtGVDyFwwjQZjQ79+rfOEKzOJ3Up0B86SnD28/0/vIZp+R91R2l5vylKUiOe075dbXnOxUIdcc6mqKssXnCntiukbLBY9CMHXEa3pR6rqlXS/ux2BPOfcjnQgVY442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change-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(20161123562025)(6072148); SRVR:MWHPR12MB1245; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1245; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 4:MAdcx9/VoW3RVYfJJyJfHpQWiCC/Y+WRJeJEZ9TZbpImwGc7sRG+y/CjFzFiT7rtL8geaharvubqV9EUxjfxHIDo/29l60csxOhbpzN36Lff3Jifker49FQCXlZciH6XvXEe1HRsrlhstJN/Vkhs/2K3kyezOe7QRBjyefdmQrMhJP6AVFeQBoP9k7QDihEc+kSOSNp8OGjF4m1Ex0EffxqdERiG8NDPWM+rJzC1zWbYXZYSJWAAvwnqQ7qZ5v94Vk37jCbKqStPj2wRQJvrSOtlAWWYjORCLruRgDew7t3thlVWWhsnqcz92mlKQkBEsSKTVh8e7lQkEfNxbnPuSpESUuIt/yWLSfHwDjedRoTOnFgAMwgG5h+tVG/GJCI5tKXKL3MTp6G4FbICazB1BeHa1NUS6TOFs4XDbyqdkw4CQlHdUu8C1TYJlm+8xs0mv0+u//wH2wK3a2SVHDeyiYqPD7vcdsDkq5+OSnn8cMjznRsK4KMSsAG/EeV7M23FqTnB/FJjq9Bi+EyKe2Vgu/73fNpS7GR7vmO67f4lLAr9hhlXir5uIMWMb0ZWgtkf1EnPzGTarC5LXoPBNgBUzPYeVFg99rq5nzWJ5djfXe36AzsIklbcvMb1B9tVknQGbcORY3C+eOmFtvFqvdFI/fAFsPzq/jP9guDPMlQkOA5Kat7k9FQyXbOZv0rv2Orl/y/8wh5AOKYGuIQYY/yfRg== X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(101416001)(76176999)(66066001)(2906002)(47776003)(189998001)(54906002)(4326007)(305945005)(53416004)(2351001)(105586002)(106356001)(50986999)(42186005)(5003940100001)(25786008)(92566002)(68736007)(7736002)(50466002)(50226002)(3846002)(6116002)(48376002)(6486002)(97736004)(81156014)(8676002)(81166006)(36756003)(110136004)(2950100002)(38730400002)(33646002)(6916009)(6666003)(86362001)(53936002)(5660300001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1245; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1245; 23:7+FOXNelK0o4cA5oT8S/EtGt9OCKwNpdSg/FzQzEu?= =?us-ascii?Q?Qctj8NxANub/PRF6F+j5H9hXcDO1TG66uC49s71yxkr4hfSP9CTfUApokfxF?= =?us-ascii?Q?8Q/eifD3xuh4r0gS3k7264c0x1A6vQlGn1TJiIWe7+QwDmz7tSsD7RWybt8T?= =?us-ascii?Q?7IouqSwHDe/Bs6xOto1IKxBtt0kBhtnR8xwIKNFggeU1cgltrA5/7dfEZ7lU?= =?us-ascii?Q?AlRBbNtoVQPHS2uTO53LPrDep4fgq/3pJgmJ6GjKSJ8lIOj1XrjWiPfCeb2d?= =?us-ascii?Q?jb5uzJK9suN2QfPolVezdjNRU4L8PsMDHG/IyEkug01reOR4Nxf6htEArhDx?= =?us-ascii?Q?qvg6tXkc2ybOralB2mKktjmwhT9KFbDm9tjUS9gHW2ATnZyzMR54vWsdJaHz?= =?us-ascii?Q?m3UuTEPp0O85tI+1QtlPPrSopVwEp8kxVTdScYDqedKE2mM0VFf7xG8LSVFv?= =?us-ascii?Q?3s/XwEzy6b92qI7NyqC3Ku43gaGvp6wiRmDIWliPBIRSz+hkD75dGixiFKuP?= =?us-ascii?Q?15lHmC8/Yl/kFQIjhzKiroZ9d00Ph4veOyiO+h+ozLG0pi0/9MtaH/xIuVRa?= =?us-ascii?Q?wuBDJqZjqbrSfT+ebN/cREgisBED6Jt3Q8SdAraxRkL6hGonuirxhMJ5glba?= =?us-ascii?Q?Lik9UyhISqcSGGZW6cw6FkoNN0268+Pn8uryzbIVCvwFLV+v2GEPrdAZ0EA2?= =?us-ascii?Q?ABZcIdQ1KqKpmFlCXbkZmYX3Can8RN0M048YGdQBfk/BZiLB4//HKuGZVTHk?= =?us-ascii?Q?xDyEL7OM1ov9xhmXqnGbBXh/z9R+R4Gsig+QNpiKgG1SMy4r4E728ni9Iwzw?= =?us-ascii?Q?vFvIo/8t+AI3rGipEWfKunQ0VTrllc0eWHObv8Fcv+hQBt+PzDkY9org6hA0?= =?us-ascii?Q?kej+gKkbV8SqyHEIFJWMmbpDQADkcaHVIotRGl2PvS+mcEipzlUwePVy1m+I?= =?us-ascii?Q?nKfRf7Pz3WI88h2hVHyqgaof+gUKtdkaRsUqfZ61UBc6/riUxft7L62MTJDk?= =?us-ascii?Q?CPkjCkjOAMkKFeDZ0Pgr5LMh6h5WAOwcIG7oypUGFor/WOtP03czsDQJwaVM?= =?us-ascii?Q?D1PNrj8rnQwvPwx3pGa20UV9lCKGxwmRDEd8xYOCWQqqwqsXUUmKI5+D2oRQ?= =?us-ascii?Q?mKaLJF27/zwFvkMVh/BrAUjs+VIBPAXpcb+fzdzU6WjR77SZKKjMjgkauY6D?= =?us-ascii?Q?9FGAF1EWw5jLXvYrQUfXyPWJXpUNihSHfsJobfThRw+zfN7QGwNpas3Q74ms?= =?us-ascii?Q?4t5gfZMlf45coMB2awxVoKG+zmsUguNMe5RAI6Y?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1245; 6:0MWGbOVizgwngr6Q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lPOgpjb5nXv3B13gRZsGTaq1cE+rwpM7tfyA0ZK7Dff1cuQu2jhHTjJ2vDXOijM0s/sE/6HMNaEGpS3PcKL5Oo7tir29XMeecHIGgSBjlfpOA4C7iw6SD2xbXm+cI2cT6cqVaOGjg7QuLLdnWtfflq2Dprhkqj9omKMc0y3DAHTQxsqVjf9e9HVta2EftOyImaacBRyvWCx2/i8y5PCKmn9ozWKwoz0srqRUABg==; 20:MNh/iz6R+w5fcuPBTmHU7a5C4p/gCFTQn2gLPlnS25/5GpWMt9SHFR9ezggDSML0vuHZiF3bZmF3mSgYwhTvAwnJT4pskherBHimqk095r1iLxfhedCfGe0Fw7jrrbf3MSq/X5Q5u/6iDmwQbK4y2i35O9DWvUcnnIJgYczyz6rZIRTpyQ3xBgJlg6g9NX1CkNCv0yf1BUccDoKG/4n7j50hbDvkj9SxXO2yklwAqhI6BiQsJpOuJPusTBrhWUXx X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 16:40:47.9311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1245 Subject: [edk2] [PATCH v3 6/6] MdeModulePkg: Modify PciHostBridgeDxe to use new 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: , Cc: Feng Tian , Leo Duran , Star Zeng Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The BmDmaLib class library provides an abstraction layer for Bus-master DMA operations as currently implemented by the PciHostBridgeDxe driver. The intent is to allow override of the library as required by specific hardware implementations, such as AMD's Secure Encrypted Virtualization (SEV). Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 signed-off-by: Leo Duran Reviewed-by: Ruiyu Ni --- .../Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf | 1 + .../Bus/Pci/PciHostBridgeDxe/PciRootBridge.h | 13 +- .../Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 272 +++++------------= ---- MdeModulePkg/MdeModulePkg.dsc | 1 + 4 files changed, 67 insertions(+), 220 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf b/M= deModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf index d8b0439..35bb5c4 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf @@ -42,6 +42,7 @@ [LibraryClasses] BaseLib PciSegmentLib PciHostBridgeLib + BmDmaLib =20 [Protocols] gEfiMetronomeArchProtocolGuid ## CONSUMES diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h b/MdeMod= ulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h index 13185b4..c125fcd 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h @@ -34,6 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #include #include +#include #include "PciHostResource.h" =20 =20 @@ -43,17 +44,6 @@ typedef enum { PciOperation } OPERATION_TYPE; =20 -#define MAP_INFO_SIGNATURE SIGNATURE_32 ('_', 'm', 'a', 'p') -typedef struct { - UINT32 Signature; - LIST_ENTRY Link; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation; - UINTN NumberOfBytes; - UINTN NumberOfPages; - EFI_PHYSICAL_ADDRESS HostAddress; - EFI_PHYSICAL_ADDRESS MappedHostAddress; -} MAP_INFO; -#define MAP_INFO_FROM_LINK(a) CR (a, MAP_INFO, Link, MAP_INFO_SIGNATURE) =20 #define PCI_ROOT_BRIDGE_SIGNATURE SIGNATURE_32 ('_', 'p', 'r', 'b') =20 @@ -79,7 +69,6 @@ typedef struct { EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL RootBridgeIo; =20 BOOLEAN ResourceSubmitted; - LIST_ENTRY Maps; } PCI_ROOT_BRIDGE_INSTANCE; =20 #define ROOT_BRIDGE_FROM_THIS(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, RootBrid= geIo, PCI_ROOT_BRIDGE_SIGNATURE) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c b/MdeM= odulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c index 8af131b..8a74bf6 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c @@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include "PciRootBridge.h" #include "PciHostResource.h" =20 -#define NO_MAPPING (VOID *) (UINTN) -1 =20 // // Lookup table for increment values based on transfer widths @@ -55,6 +54,39 @@ UINT8 mOutStride[] =3D { 0 // EfiPciWidthFillUint64 }; =20 + +BM_DMA_OPERATION +ConvertDmaOperation ( + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION RbOperation + ) +{ + BM_DMA_OPERATION BmOperation; + + switch (RbOperation) { + case EfiPciOperationBusMasterRead: + case EfiPciOperationBusMasterRead64: + BmOperation =3D DmaOperationBusMasterRead; + break; + + case EfiPciOperationBusMasterWrite: + case EfiPciOperationBusMasterWrite64: + BmOperation =3D DmaOperationBusMasterWrite; + break; + + case EfiPciOperationBusMasterCommonBuffer: + case EfiPciOperationBusMasterCommonBuffer64: + BmOperation =3D DmaOperationBusMasterCommonBuffer; + break; + + default: + BmOperation =3D DmaOperationBusMasterMaximum; + break; + } + + return BmOperation; +} + + /** Construct the Pci Root Bridge instance. =20 @@ -168,7 +200,6 @@ CreateRootBridge ( TypeMax * sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) + sizeof (EFI_ACP= I_END_TAG_DESCRIPTOR) ); ASSERT (RootBridge->ConfigBuffer !=3D NULL); - InitializeListHead (&RootBridge->Maps); =20 CopyMem (&RootBridge->Bus, &Bridge->Bus, sizeof (PCI_ROOT_BRIDGE_APERTUR= E)); CopyMem (&RootBridge->Io, &Bridge->Io, sizeof (PCI_ROOT_BRIDGE_APERTURE)= ); @@ -1053,118 +1084,27 @@ RootBridgeIoMap ( OUT VOID **Mapping ) { - EFI_STATUS Status; - PCI_ROOT_BRIDGE_INSTANCE *RootBridge; - EFI_PHYSICAL_ADDRESS PhysicalAddress; - MAP_INFO *MapInfo; - - if (HostAddress =3D=3D NULL || NumberOfBytes =3D=3D NULL || DeviceAddres= s =3D=3D NULL || - Mapping =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - // - // Make sure that Operation is valid - // - if ((UINT32) Operation >=3D EfiPciOperationMaximum) { - return EFI_INVALID_PARAMETER; - } + PCI_ROOT_BRIDGE_INSTANCE *RootBridge; + BOOLEAN DmaAbove4GB; + BM_DMA_OPERATION BmOperation; =20 RootBridge =3D ROOT_BRIDGE_FROM_THIS (This); - - PhysicalAddress =3D (EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress; - if ((!RootBridge->DmaAbove4G || - (Operation !=3D EfiPciOperationBusMasterRead64 && - Operation !=3D EfiPciOperationBusMasterWrite64 && - Operation !=3D EfiPciOperationBusMasterCommonBuffer64)) && - ((PhysicalAddress + *NumberOfBytes) > SIZE_4GB)) { - - // - // If the root bridge or the device cannot handle performing DMA above - // 4GB but any part of the DMA transfer being mapped is above 4GB, then - // map the DMA transfer to a buffer below 4GB. - // - - if (Operation =3D=3D EfiPciOperationBusMasterCommonBuffer || - Operation =3D=3D EfiPciOperationBusMasterCommonBuffer64) { - // - // Common Buffer operations can not be remapped. If the common buff= er - // if above 4GB, then it is not possible to generate a mapping, so r= eturn - // an error. - // - return EFI_UNSUPPORTED; - } - - // - // Allocate a MAP_INFO structure to remember the mapping when Unmap() = is - // called later. - // - MapInfo =3D AllocatePool (sizeof (MAP_INFO)); - if (MapInfo =3D=3D NULL) { - *NumberOfBytes =3D 0; - return EFI_OUT_OF_RESOURCES; - } - - // - // Initialize the MAP_INFO structure - // - MapInfo->Signature =3D MAP_INFO_SIGNATURE; - MapInfo->Operation =3D Operation; - MapInfo->NumberOfBytes =3D *NumberOfBytes; - MapInfo->NumberOfPages =3D EFI_SIZE_TO_PAGES (MapInfo->NumberOfByt= es); - MapInfo->HostAddress =3D PhysicalAddress; - MapInfo->MappedHostAddress =3D SIZE_4GB - 1; - - // - // Allocate a buffer below 4GB to map the transfer to. - // - Status =3D gBS->AllocatePages ( - AllocateMaxAddress, - EfiBootServicesData, - MapInfo->NumberOfPages, - &MapInfo->MappedHostAddress - ); - if (EFI_ERROR (Status)) { - FreePool (MapInfo); - *NumberOfBytes =3D 0; - return Status; - } - - // - // If this is a read operation from the Bus Master's point of view, - // then copy the contents of the real buffer into the mapped buffer - // so the Bus Master can read the contents of the real buffer. - // - if (Operation =3D=3D EfiPciOperationBusMasterRead || - Operation =3D=3D EfiPciOperationBusMasterRead64) { - CopyMem ( - (VOID *) (UINTN) MapInfo->MappedHostAddress, - (VOID *) (UINTN) MapInfo->HostAddress, - MapInfo->NumberOfBytes - ); - } - - InsertTailList (&RootBridge->Maps, &MapInfo->Link); - - // - // The DeviceAddress is the address of the maped buffer below 4GB - // - *DeviceAddress =3D MapInfo->MappedHostAddress; - // - // Return a pointer to the MAP_INFO structure in Mapping - // - *Mapping =3D MapInfo; - } else { - // - // If the root bridge CAN handle performing DMA above 4GB or - // the transfer is below 4GB, so the DeviceAddress is simply the - // HostAddress - // - *DeviceAddress =3D PhysicalAddress; - *Mapping =3D NO_MAPPING; - } - - return EFI_SUCCESS; + DmaAbove4GB =3D RootBridge->DmaAbove4G && ( + Operation =3D=3D EfiPciOperationBusMasterRead64 || + Operation =3D=3D EfiPciOperationBusMasterWrite64 || + Operation =3D=3D EfiPciOperationBusMasterCommonBuffer64 + ); + + BmOperation =3D ConvertDmaOperation (Operation); + + return BmDmaMap ( + DmaAbove4GB, + BmOperation, + HostAddress, + NumberOfBytes, + DeviceAddress, + Mapping + ); } =20 /** @@ -1191,58 +1131,7 @@ RootBridgeIoUnmap ( IN VOID *Mapping ) { - MAP_INFO *MapInfo; - LIST_ENTRY *Link; - PCI_ROOT_BRIDGE_INSTANCE *RootBridge; - - RootBridge =3D ROOT_BRIDGE_FROM_THIS (This); - // - // See if the Map() operation associated with this Unmap() required a ma= pping - // buffer. If a mapping buffer was not required, then this function simp= ly - // returns EFI_SUCCESS. - // - if (Mapping =3D=3D NO_MAPPING) { - return EFI_SUCCESS; - } - - MapInfo =3D NO_MAPPING; - for (Link =3D GetFirstNode (&RootBridge->Maps) - ; !IsNull (&RootBridge->Maps, Link) - ; Link =3D GetNextNode (&RootBridge->Maps, Link) - ) { - MapInfo =3D MAP_INFO_FROM_LINK (Link); - if (MapInfo =3D=3D Mapping) { - break; - } - } - // - // Mapping is not a valid value returned by Map() - // - if (MapInfo !=3D Mapping) { - return EFI_INVALID_PARAMETER; - } - RemoveEntryList (&MapInfo->Link); - - // - // If this is a write operation from the Bus Master's point of view, - // then copy the contents of the mapped buffer into the real buffer - // so the processor can read the contents of the real buffer. - // - if (MapInfo->Operation =3D=3D EfiPciOperationBusMasterWrite || - MapInfo->Operation =3D=3D EfiPciOperationBusMasterWrite64) { - CopyMem ( - (VOID *) (UINTN) MapInfo->HostAddress, - (VOID *) (UINTN) MapInfo->MappedHostAddress, - MapInfo->NumberOfBytes - ); - } - - // - // Free the mapped buffer and the MAP_INFO structure. - // - gBS->FreePages (MapInfo->MappedHostAddress, MapInfo->NumberOfPages); - FreePool (Mapping); - return EFI_SUCCESS; + return BmDmaUnmap (Mapping); } =20 /** @@ -1282,56 +1171,23 @@ RootBridgeIoAllocateBuffer ( IN UINT64 Attributes ) { - EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS PhysicalAddress; - PCI_ROOT_BRIDGE_INSTANCE *RootBridge; - EFI_ALLOCATE_TYPE AllocateType; + PCI_ROOT_BRIDGE_INSTANCE *RootBridge; + BOOLEAN DmaAbove4GB; =20 - // - // Validate Attributes - // if ((Attributes & EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER) !=3D 0)= { return EFI_UNSUPPORTED; } =20 - // - // Check for invalid inputs - // - if (HostAddress =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - // - // The only valid memory types are EfiBootServicesData and - // EfiRuntimeServicesData - // - if (MemoryType !=3D EfiBootServicesData && - MemoryType !=3D EfiRuntimeServicesData) { - return EFI_INVALID_PARAMETER; - } - RootBridge =3D ROOT_BRIDGE_FROM_THIS (This); + DmaAbove4GB =3D RootBridge->DmaAbove4G && + (Attributes & EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) !=3D= 0; =20 - AllocateType =3D AllocateAnyPages; - if (!RootBridge->DmaAbove4G || - (Attributes & EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) =3D=3D 0) { - // - // Limit allocations to memory below 4GB - // - AllocateType =3D AllocateMaxAddress; - PhysicalAddress =3D (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1); - } - Status =3D gBS->AllocatePages ( - AllocateType, - MemoryType, - Pages, - &PhysicalAddress - ); - if (!EFI_ERROR (Status)) { - *HostAddress =3D (VOID *) (UINTN) PhysicalAddress; - } - - return Status; + return BmDmaAllocateBuffer ( + DmaAbove4GB, + MemoryType, + Pages, + HostAddress + ); } =20 /** @@ -1356,7 +1212,7 @@ RootBridgeIoFreeBuffer ( OUT VOID *HostAddress ) { - return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages= ); + return BmDmaFreeBuffer (Pages, HostAddress); } =20 /** diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index b343c19..47aa9b9 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -83,6 +83,7 @@ [LibraryClasses] PalLib|MdePkg/Library/BasePalLibNull/BasePalLibNull.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltL= ib.inf + BmDmaLib|MdeModulePkg/Library/DxeBmDmaLib/DxeBmDmaLib.inf # # Misc # --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel