mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 12:54:51 +00:00
![Amine Khaldi](/assets/img/avatar_default.png)
- Add devpropdef.h and evntprov.h - Fix UOW redefinition. [DDK] - Fix PGUID redefinition. [XDK] - Add wmitypes.h and include it in wdm.h autogeneration template. - Move several definitions to their appropriate places. - Add HalGetDmaAlignment, LEGACY_BUS_INFORMATION, IO_DEVICE_EJECT_CALLBACK, PLUGPLAY_PROPERTY_PERSISTENT, and several missing Io*, DEVICE_*, REENUMERATE_*, PCI_*, PNP_*, Ob*, OB_*, PO_*, Wmi*, Etw* and ACPI related definitions. - Add CmKeyObjectType to exported object types. - Fix UOW redefinition. - Group some related definitions. [WDM] - Update wdm.h to reflect XDK changes. svn path=/branches/header-work/; revision=46329
69 lines
1.6 KiB
C
69 lines
1.6 KiB
C
|
|
#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_)
|
|
FORCEINLINE
|
|
PVOID
|
|
NTAPI
|
|
HalAllocateCommonBuffer(
|
|
IN PDMA_ADAPTER DmaAdapter,
|
|
IN ULONG Length,
|
|
OUT PPHYSICAL_ADDRESS LogicalAddress,
|
|
IN BOOLEAN CacheEnabled)
|
|
{
|
|
PALLOCATE_COMMON_BUFFER allocateCommonBuffer;
|
|
PVOID commonBuffer;
|
|
|
|
allocateCommonBuffer = *(DmaAdapter)->DmaOperations->AllocateCommonBuffer;
|
|
ASSERT( allocateCommonBuffer != NULL );
|
|
commonBuffer = allocateCommonBuffer( DmaAdapter, Length, LogicalAddress, CacheEnabled );
|
|
return commonBuffer;
|
|
}
|
|
|
|
FORCEINLINE
|
|
VOID
|
|
NTAPI
|
|
HalFreeCommonBuffer(
|
|
IN PDMA_ADAPTER DmaAdapter,
|
|
IN ULONG Length,
|
|
IN PHYSICAL_ADDRESS LogicalAddress,
|
|
IN PVOID VirtualAddress,
|
|
IN BOOLEAN CacheEnabled)
|
|
{
|
|
PFREE_COMMON_BUFFER freeCommonBuffer;
|
|
|
|
freeCommonBuffer = *(DmaAdapter)->DmaOperations->FreeCommonBuffer;
|
|
ASSERT( freeCommonBuffer != NULL );
|
|
freeCommonBuffer( DmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled );
|
|
}
|
|
|
|
FORCEINLINE
|
|
ULONG
|
|
NTAPI
|
|
HalReadDmaCounter(
|
|
IN PDMA_ADAPTER DmaAdapter)
|
|
{
|
|
PREAD_DMA_COUNTER readDmaCounter;
|
|
ULONG counter;
|
|
|
|
readDmaCounter = *(DmaAdapter)->DmaOperations->ReadDmaCounter;
|
|
ASSERT( readDmaCounter != NULL );
|
|
counter = readDmaCounter( DmaAdapter );
|
|
return counter;
|
|
}
|
|
|
|
FORCEINLINE
|
|
ULONG
|
|
HalGetDmaAlignment(
|
|
IN PDMA_ADAPTER DmaAdapter)
|
|
{
|
|
PGET_DMA_ALIGNMENT getDmaAlignment;
|
|
ULONG alignment;
|
|
|
|
getDmaAlignment = *(DmaAdapter)->DmaOperations->GetDmaAlignment;
|
|
ASSERT( getDmaAlignment != NULL );
|
|
alignment = getDmaAlignment( DmaAdapter );
|
|
return alignment;
|
|
}
|
|
|
|
#endif
|
|
|