reactos/drivers/usb/usbehci/physmem.h
Johannes Anderwald 2e8b524c99 [USBEHCI]
- Re-implement DMA buffer routines. It is now faster and consumes less memory overhead per allocated memory block.
- IoGetDeviceProperty needs a PDO
- Add few comments
- No need to clear buffer twice in CreateQueueHead / CreateDescriptor




svn path=/branches/cmake-bringup/; revision=51324
2011-04-13 01:37:14 +00:00

44 lines
920 B
C

#pragma once
#include "hardware.h"
/* destroys memory allocator */
VOID
NTAPI
DmaMemAllocator_Destroy(
IN LPDMA_MEMORY_ALLOCATOR Allocator);
/* create memory allocator */
NTSTATUS
NTAPI
DmaMemAllocator_Create(
IN LPDMA_MEMORY_ALLOCATOR *OutMemoryAllocator);
/* initializes memory allocator */
NTSTATUS
NTAPI
DmaMemAllocator_Initialize(
IN OUT LPDMA_MEMORY_ALLOCATOR Allocator,
IN ULONG DefaultBlockSize,
IN PKSPIN_LOCK Lock,
IN PHYSICAL_ADDRESS PhysicalBase,
IN PVOID VirtualBase,
IN ULONG Length);
/* allocates memory from allocator */
NTSTATUS
NTAPI
DmaMemAllocator_Allocate(
IN LPDMA_MEMORY_ALLOCATOR Allocator,
IN ULONG Size,
OUT PVOID *OutVirtualAddress,
OUT PPHYSICAL_ADDRESS OutPhysicalAddress);
/* frees memory block from allocator */
VOID
NTAPI
DmaMemAllocator_Free(
IN LPDMA_MEMORY_ALLOCATOR Allocator,
IN PVOID VirtualAddress,
IN ULONG Size);