ReactOS
0.4.15-dev-2106-g6de3300
|
#include <hal.h>
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | NDEBUG |
#define | MAX_MAP_REGISTERS 64 |
#define | TAG_DMA ' AMD' |
Functions | |||||||||||||
VOID | HalpInitDma (VOID) | ||||||||||||
HalpGetAdapterMaximumPhysicalAddress | |||||||||||||
Get the maximum physical address acceptable by the device represented by the passed DMA adapter. | |||||||||||||
PHYSICAL_ADDRESS NTAPI | HalpGetAdapterMaximumPhysicalAddress (IN PADAPTER_OBJECT AdapterObject) | ||||||||||||
HalpGrowMapBuffers | |||||||||||||
Allocate initial, or additional, map buffers for DMA master adapter.
| |||||||||||||
BOOLEAN NTAPI | HalpGrowMapBuffers (IN PADAPTER_OBJECT AdapterObject, IN ULONG SizeOfMapBuffers) | ||||||||||||
HalpDmaAllocateMasterAdapter | |||||||||||||
Helper routine to allocate and initialize master adapter object and it's associated map register buffers.
| |||||||||||||
PADAPTER_OBJECT NTAPI | HalpDmaAllocateMasterAdapter (VOID) | ||||||||||||
HalpDmaAllocateChildAdapter | |||||||||||||
Helper routine of HalGetAdapter. Allocate child adapter object and fill out some basic fields.
| |||||||||||||
PADAPTER_OBJECT NTAPI | HalpDmaAllocateChildAdapter (ULONG NumberOfMapRegisters, PDEVICE_DESCRIPTION DeviceDescription) | ||||||||||||
HalpDmaInitializeEisaAdapter | |||||||||||||
Setup DMA modes and extended modes for (E)ISA DMA adapter object. | |||||||||||||
BOOLEAN NTAPI | HalpDmaInitializeEisaAdapter (PADAPTER_OBJECT AdapterObject, PDEVICE_DESCRIPTION DeviceDescription) | ||||||||||||
HalGetAdapter | |||||||||||||
Allocate an adapter object for DMA device.
@implemented | |||||||||||||
PADAPTER_OBJECT NTAPI | HalGetAdapter (PDEVICE_DESCRIPTION DeviceDescription, PULONG NumberOfMapRegisters) | ||||||||||||
HalpGetDmaAdapter | |||||||||||||
Internal routine to allocate PnP DMA adapter object. It's exported through HalDispatchTable and used by IoGetDmaAdapter.
| |||||||||||||
PDMA_ADAPTER NTAPI | HalpGetDmaAdapter (IN PVOID Context, IN PDEVICE_DESCRIPTION DeviceDescription, OUT PULONG NumberOfMapRegisters) | ||||||||||||
HalPutDmaAdapter | |||||||||||||
Internal routine to free DMA adapter and resources for reuse. It's exported using the DMA_OPERATIONS interface by HalGetAdapter.
| |||||||||||||
VOID NTAPI | HalPutDmaAdapter (PADAPTER_OBJECT AdapterObject) | ||||||||||||
HalAllocateCommonBuffer | |||||||||||||
Allocates memory that is visible to both the processor(s) and the DMA device.
@implemented | |||||||||||||
PVOID NTAPI | HalAllocateCommonBuffer (PADAPTER_OBJECT AdapterObject, ULONG Length, PPHYSICAL_ADDRESS LogicalAddress, BOOLEAN CacheEnabled) | ||||||||||||
HalFreeCommonBuffer | |||||||||||||
Free common buffer allocated with HalAllocateCommonBuffer.
@implemented | |||||||||||||
VOID NTAPI | HalFreeCommonBuffer (PADAPTER_OBJECT AdapterObject, ULONG Length, PHYSICAL_ADDRESS LogicalAddress, PVOID VirtualAddress, BOOLEAN CacheEnabled) | ||||||||||||
HalpDmaGetDmaAlignment | |||||||||||||
Internal routine to return the DMA alignment requirement. It's exported using the DMA_OPERATIONS interface by HalGetAdapter.
| |||||||||||||
ULONG NTAPI | HalpDmaGetDmaAlignment (PADAPTER_OBJECT AdapterObject) | ||||||||||||
ULONG NTAPI | HalReadDmaCounter (PADAPTER_OBJECT AdapterObject) | ||||||||||||
HalpGrowMapBufferWorker | |||||||||||||
Helper routine of HalAllocateAdapterChannel for allocating map registers at PASSIVE_LEVEL in work item. | |||||||||||||
VOID NTAPI | HalpGrowMapBufferWorker (PVOID DeferredContext) | ||||||||||||
HalAllocateAdapterChannel | |||||||||||||
Setup map registers for an adapter object.
@implemented | |||||||||||||
NTSTATUS NTAPI | HalAllocateAdapterChannel (PADAPTER_OBJECT AdapterObject, PWAIT_CONTEXT_BLOCK WaitContextBlock, ULONG NumberOfMapRegisters, PDRIVER_CONTROL ExecutionRoutine) | ||||||||||||
IoFreeAdapterChannel | |||||||||||||
Free DMA resources allocated by IoAllocateAdapterChannel.
@implemented | |||||||||||||
VOID NTAPI | IoFreeAdapterChannel (PADAPTER_OBJECT AdapterObject) | ||||||||||||
IoFreeMapRegisters | |||||||||||||
Free map registers reserved by the system for a DMA.
@implemented | |||||||||||||
VOID NTAPI | IoFreeMapRegisters (IN PADAPTER_OBJECT AdapterObject, IN PVOID MapRegisterBase, IN ULONG NumberOfMapRegisters) | ||||||||||||
HalpCopyBufferMap | |||||||||||||
Helper function for copying data from/to map register buffers.
| |||||||||||||
VOID NTAPI | HalpCopyBufferMap (PMDL Mdl, PROS_MAP_REGISTER_ENTRY MapRegisterBase, PVOID CurrentVa, ULONG Length, BOOLEAN WriteToDevice) | ||||||||||||
IoFlushAdapterBuffers | |||||||||||||
Flush any data remaining in the DMA controller's memory into the host memory.
@unimplemented. | |||||||||||||
BOOLEAN NTAPI | IoFlushAdapterBuffers (PADAPTER_OBJECT AdapterObject, PMDL Mdl, PVOID MapRegisterBase, PVOID CurrentVa, ULONG Length, BOOLEAN WriteToDevice) | ||||||||||||
IoMapTransfer | |||||||||||||
Map a DMA for transfer and do the DMA if it's a slave.
@implemented | |||||||||||||
PHYSICAL_ADDRESS NTAPI | IoMapTransfer (IN PADAPTER_OBJECT AdapterObject, IN PMDL Mdl, IN PVOID MapRegisterBase, IN PVOID CurrentVa, IN OUT PULONG Length, IN BOOLEAN WriteToDevice) | ||||||||||||
HalFlushCommonBuffer | |||||||||||||
@implemented | |||||||||||||
BOOLEAN NTAPI | HalFlushCommonBuffer (IN PADAPTER_OBJECT AdapterObject, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress) | ||||||||||||
PVOID NTAPI | HalAllocateCrashDumpRegisters (IN PADAPTER_OBJECT AdapterObject, IN OUT PULONG NumberOfMapRegisters) | ||||||||||||
Variables | |
static KEVENT | HalpDmaLock |
static LIST_ENTRY | HalpDmaAdapterList |
static PADAPTER_OBJECT | HalpEisaAdapter [8] |
static BOOLEAN | HalpEisaDma |
static PADAPTER_OBJECT | HalpMasterAdapter |
static const ULONG_PTR | HalpEisaPortPage [8] |
static DMA_OPERATIONS | HalpDmaOperations |
NTSTATUS NTAPI HalAllocateAdapterChannel | ( | PADAPTER_OBJECT | AdapterObject, |
PWAIT_CONTEXT_BLOCK | WaitContextBlock, | ||
ULONG | NumberOfMapRegisters, | ||
PDRIVER_CONTROL | ExecutionRoutine | ||
) |
Definition at line 1067 of file dma.c.
PVOID NTAPI HalAllocateCommonBuffer | ( | PADAPTER_OBJECT | AdapterObject, |
ULONG | Length, | ||
PPHYSICAL_ADDRESS | LogicalAddress, | ||
BOOLEAN | CacheEnabled | ||
) |
Definition at line 849 of file dma.c.
PVOID NTAPI HalAllocateCrashDumpRegisters | ( | IN PADAPTER_OBJECT | AdapterObject, |
IN OUT PULONG | NumberOfMapRegisters | ||
) |
Definition at line 1964 of file dma.c.
BOOLEAN NTAPI HalFlushCommonBuffer | ( | IN PADAPTER_OBJECT | AdapterObject, |
IN ULONG | Length, | ||
IN PHYSICAL_ADDRESS | LogicalAddress, | ||
IN PVOID | VirtualAddress | ||
) |
VOID NTAPI HalFreeCommonBuffer | ( | PADAPTER_OBJECT | AdapterObject, |
ULONG | Length, | ||
PHYSICAL_ADDRESS | LogicalAddress, | ||
PVOID | VirtualAddress, | ||
BOOLEAN | CacheEnabled | ||
) |
Definition at line 898 of file dma.c.
PADAPTER_OBJECT NTAPI HalGetAdapter | ( | PDEVICE_DESCRIPTION | DeviceDescription, |
PULONG | NumberOfMapRegisters | ||
) |
Definition at line 591 of file dma.c.
VOID NTAPI HalpCopyBufferMap | ( | PMDL | Mdl, |
PROS_MAP_REGISTER_ENTRY | MapRegisterBase, | ||
PVOID | CurrentVa, | ||
ULONG | Length, | ||
BOOLEAN | WriteToDevice | ||
) |
Definition at line 1468 of file dma.c.
Referenced by IoFlushAdapterBuffers(), and IoMapTransfer().
PADAPTER_OBJECT NTAPI HalpDmaAllocateChildAdapter | ( | ULONG | NumberOfMapRegisters, |
PDEVICE_DESCRIPTION | DeviceDescription | ||
) |
Definition at line 391 of file dma.c.
Referenced by HalGetAdapter().
PADAPTER_OBJECT NTAPI HalpDmaAllocateMasterAdapter | ( | VOID | ) |
Definition at line 332 of file dma.c.
Referenced by HalpInitDma().
ULONG NTAPI HalpDmaGetDmaAlignment | ( | PADAPTER_OBJECT | AdapterObject | ) |
BOOLEAN NTAPI HalpDmaInitializeEisaAdapter | ( | PADAPTER_OBJECT | AdapterObject, |
PDEVICE_DESCRIPTION | DeviceDescription | ||
) |
Definition at line 461 of file dma.c.
Referenced by HalGetAdapter().
PHYSICAL_ADDRESS NTAPI HalpGetAdapterMaximumPhysicalAddress | ( | IN PADAPTER_OBJECT | AdapterObject | ) |
Definition at line 167 of file dma.c.
Referenced by HalAllocateCommonBuffer(), HalpGrowMapBuffers(), IoFlushAdapterBuffers(), and IoMapTransfer().
PDMA_ADAPTER NTAPI HalpGetDmaAdapter | ( | IN PVOID | Context, |
IN PDEVICE_DESCRIPTION | DeviceDescription, | ||
OUT PULONG | NumberOfMapRegisters | ||
) |
Definition at line 790 of file dma.c.
Referenced by HalInitSystem(), and HalpInitDma().
Definition at line 203 of file dma.c.
Referenced by HalGetAdapter(), HalpDmaAllocateMasterAdapter(), and HalpGrowMapBufferWorker().
Definition at line 1005 of file dma.c.
Referenced by HalAllocateAdapterChannel().
Definition at line 121 of file dma.c.
Referenced by HalInitSystem(), and HalpInitPhase1().
VOID NTAPI HalPutDmaAdapter | ( | PADAPTER_OBJECT | AdapterObject | ) |
Definition at line 808 of file dma.c.
ULONG NTAPI HalReadDmaCounter | ( | PADAPTER_OBJECT | AdapterObject | ) |
Definition at line 933 of file dma.c.
BOOLEAN NTAPI IoFlushAdapterBuffers | ( | PADAPTER_OBJECT | AdapterObject, |
PMDL | Mdl, | ||
PVOID | MapRegisterBase, | ||
PVOID | CurrentVa, | ||
ULONG | Length, | ||
BOOLEAN | WriteToDevice | ||
) |
Definition at line 1555 of file dma.c.
VOID NTAPI IoFreeAdapterChannel | ( | PADAPTER_OBJECT | AdapterObject | ) |
Definition at line 1238 of file dma.c.
VOID NTAPI IoFreeMapRegisters | ( | IN PADAPTER_OBJECT | AdapterObject, |
IN PVOID | MapRegisterBase, | ||
IN ULONG | NumberOfMapRegisters | ||
) |
Definition at line 1362 of file dma.c.
PHYSICAL_ADDRESS NTAPI IoMapTransfer | ( | IN PADAPTER_OBJECT | AdapterObject, |
IN PMDL | Mdl, | ||
IN PVOID | MapRegisterBase, | ||
IN PVOID | CurrentVa, | ||
IN OUT PULONG | Length, | ||
IN BOOLEAN | WriteToDevice | ||
) |
Definition at line 1662 of file dma.c.
|
static |
Definition at line 78 of file dma.c.
Referenced by HalGetAdapter(), and HalpInitDma().
|
static |
Definition at line 77 of file dma.c.
Referenced by HalGetAdapter(), HalpGrowMapBufferWorker(), HalpInitDma(), and HalPutDmaAdapter().
|
static |
Definition at line 94 of file dma.c.
Referenced by HalpDmaAllocateChildAdapter(), and HalpInitDma().
|
static |
Definition at line 79 of file dma.c.
Referenced by HalGetAdapter().
|
static |
Definition at line 80 of file dma.c.
Referenced by HalpDmaInitializeEisaAdapter(), HalpGrowMapBuffers(), HalpInitDma(), and IoMapTransfer().
Definition at line 83 of file dma.c.
Referenced by HalpDmaInitializeEisaAdapter().
|
static |
Definition at line 81 of file dma.c.
Referenced by HalGetAdapter(), HalpDmaAllocateChildAdapter(), and HalpInitDma().