1 /* $Id: dma.c,v 1.8 2000/07/19 14:18:18 dwelch Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/x86/dma.c
6 * PURPOSE: DMA functions
7 * PROGRAMMER: David Welch (welch@mcmail.com)
12 /* INCLUDES *****************************************************************/
14 #include <ddk/ntddk.h>
16 #include <internal/debug.h>
18 /* FUNCTIONS *****************************************************************/
21 HalAllocateCommonBuffer (PADAPTER_OBJECT AdapterObject
,
23 PPHYSICAL_ADDRESS LogicalAddress
,
26 * FUNCTION: Allocates memory that is visible to both the processor(s) and
29 * AdapterObject = Adapter object representing the bus master or
30 * system dma controller
31 * Length = Number of bytes to allocate
32 * LogicalAddress = Logical address the driver can use to access the
34 * CacheEnabled = Specifies if the memory can be cached
35 * RETURNS: The base virtual address of the memory allocated
43 HalFlushCommonBuffer (ULONG Unknown1
,
56 HalFreeCommonBuffer (PADAPTER_OBJECT AdapterObject
,
58 PHYSICAL_ADDRESS LogicalAddress
,
65 PADAPTER_OBJECT STDCALL
66 HalGetAdapter (PDEVICE_DESCRIPTION DeviceDescription
,
67 PULONG NumberOfMapRegisters
)
69 * FUNCTION: Returns a pointer to an adapter object for the DMA device
70 * defined the device description structure
72 * DeviceObject = Structure describing the attributes of the device
73 * NumberOfMapRegisters (OUT) = Returns the maximum number of map
74 * registers the device driver can
75 * allocate for DMA transfer operations
76 * RETURNS: The allocated adapter object on success
85 HalReadDmaCounter (PADAPTER_OBJECT AdapterObject
)