Adding a Debug version of the UncachedMemoryAllocationLib that will make the PCI DMA address not match the CPU C address for a DMA buffer. The PCI DMA address will generate a page fault if accessed from the CPU. This should make it easy to debug EFI DMA code to make sure it is following the correct rules for which pointer to use.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9725 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH
2010-01-13 15:18:34 +00:00
parent 0c16f340a8
commit 965626c940
3 changed files with 702 additions and 0 deletions

View File

@ -0,0 +1,47 @@
#/** @file
#
#
# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved
#
# All rights reserved. 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 = UncachedMemoryAllocationLib
FILE_GUID = 3C1EA826-696A-4E8A-B89D-3C5369B84F2A
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = UncachedMemoryAllocationLib
CONSTRUCTOR = DebugUncachedMemoryAllocationLibConstructor
[Sources.common]
DebugUncachedMemoryAllocationLib.c
[Packages]
MdePkg/MdePkg.dec
ArmPkg/ArmPkg.dec
[Protocols]
gEfiCpuArchProtocolGuid
[LibraryClasses]
BaseLib
UefiMemoryAllocationLib
ArmLib
[FixedPcd]
gArmTokenSpaceGuid.PcdArmUncachedMemoryMask
[Depex]
gEfiCpuArchProtocolGuid
gVirtualUncachedPagesProtocolGuid