Now that ArmDmaLib no longer uses uncached mappings for short-lived bounce buffers used for streaming DMA, the only place we allocate uncached memory is in DmaAllocateBuffer (), which is used for static mappings shared between the host and the device, e.g., for packet descriptor rings etc. There is no performance concern around such long lived mappings, and so we can really do without the overhead of UncachedMemoryAllocationLib, which is a sizable chunk of poorly maintained code that never actually releases any memory, and despite the fact that it implements pool based routines, it always performs page based allocations anyway. So let's invoke the DXE services directly to manage memory attributes on allocations, and keep track of the allocations in a linked list so we can restore the attributes and free the memory properly after use. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
50 lines
1.3 KiB
INI
50 lines
1.3 KiB
INI
#/** @file
|
|
#
|
|
# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions of the BSD 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 IMPLIED.
|
|
#
|
|
#**/
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = ArmDmaLib
|
|
FILE_GUID = F1BD6B36-B705-43aa-8A28-33F58ED85EFB
|
|
MODULE_TYPE = UEFI_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = DmaLib
|
|
CONSTRUCTOR = ArmDmaLibConstructor
|
|
|
|
[Sources.common]
|
|
ArmDmaLib.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
ArmPkg/ArmPkg.dec
|
|
|
|
|
|
[LibraryClasses]
|
|
DebugLib
|
|
DxeServicesTableLib
|
|
UefiBootServicesTableLib
|
|
MemoryAllocationLib
|
|
IoLib
|
|
BaseMemoryLib
|
|
|
|
[Protocols]
|
|
gEfiCpuArchProtocolGuid
|
|
|
|
[Guids]
|
|
|
|
[Pcd]
|
|
gArmTokenSpaceGuid.PcdArmDmaDeviceOffset
|
|
|
|
[Depex]
|
|
gEfiCpuArchProtocolGuid
|