ReactOS 0.4.16-dev-297-gc569aee
wdfdmaenabler.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _WDF_DMA_ENABLER_CONFIG
 
struct  _WDF_DMA_SYSTEM_PROFILE_CONFIG
 

Macros

#define WDF_EXTERN_C
 
#define WDF_EXTERN_C_START
 
#define WDF_EXTERN_C_END
 
#define WDF_DMA_ENABLER_UNLIMITED_FRAGMENTS   ((ULONG) -1)
 

Typedefs

typedef WDF_EXTERN_C_START enum _WDF_DMA_PROFILE WDF_DMA_PROFILE
 
typedef enum _WDF_DMA_DIRECTION WDF_DMA_DIRECTION
 
typedef EVT_WDF_DMA_ENABLER_FILL * PFN_WDF_DMA_ENABLER_FILL
 
typedef EVT_WDF_DMA_ENABLER_FLUSH * PFN_WDF_DMA_ENABLER_FLUSH
 
typedef EVT_WDF_DMA_ENABLER_ENABLE * PFN_WDF_DMA_ENABLER_ENABLE
 
typedef EVT_WDF_DMA_ENABLER_DISABLE * PFN_WDF_DMA_ENABLER_DISABLE
 
typedef EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_START * PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START
 
typedef EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP * PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP
 
typedef enum _WDF_DMA_ENABLER_CONFIG_FLAGS WDF_DMA_ENABLER_CONFIG_FLAGS
 
typedef struct _WDF_DMA_ENABLER_CONFIG WDF_DMA_ENABLER_CONFIG
 
typedef struct _WDF_DMA_ENABLER_CONFIGPWDF_DMA_ENABLER_CONFIG
 
typedef struct _WDF_DMA_SYSTEM_PROFILE_CONFIG WDF_DMA_SYSTEM_PROFILE_CONFIG
 
typedef struct _WDF_DMA_SYSTEM_PROFILE_CONFIGPWDF_DMA_SYSTEM_PROFILE_CONFIG
 
typedef _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFDMAENABLERCREATE) (_In_ PWDF_DRIVER_GLOBALS DriverGlobals
 
typedef _Must_inspect_result_ _In_ WDFDEVICE Device
 
typedef _Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG Config
 
typedef _Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
 
typedef _Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDMAENABLER * DmaEnablerHandle
 
typedef _Must_inspect_result_ _In_ WDFDMAENABLER DmaEnabler
 
typedef _Must_inspect_result_ _In_ WDFDMAENABLER _In_ PWDF_DMA_SYSTEM_PROFILE_CONFIG ProfileConfig
 
typedef _Must_inspect_result_ _In_ WDFDMAENABLER _In_ PWDF_DMA_SYSTEM_PROFILE_CONFIG _In_ WDF_DMA_DIRECTION ConfigDirection
 
typedef _In_ WDFDMAENABLER _In_ _When_(MaximumFragments==0, __drv_reportError(MaximumFragments cannot be zero)) size_t MaximumFragments)
 
typedef _In_ WDFDMAENABLER _In_ WDF_DMA_DIRECTION DmaDirection
 

Enumerations

enum  _WDF_DMA_PROFILE {
  WdfDmaProfileInvalid = 0 , WdfDmaProfilePacket , WdfDmaProfileScatterGather , WdfDmaProfilePacket64 ,
  WdfDmaProfileScatterGather64 , WdfDmaProfileScatterGatherDuplex , WdfDmaProfileScatterGather64Duplex , WdfDmaProfileSystem ,
  WdfDmaProfileSystemDuplex
}
 
enum  _WDF_DMA_DIRECTION { WdfDmaDirectionReadFromDevice = FALSE , WdfDmaDirectionWriteToDevice = TRUE }
 
enum  _WDF_DMA_ENABLER_CONFIG_FLAGS { WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION = 0x00000001 }
 

Functions

typedef _Function_class_ (EVT_WDF_DMA_ENABLER_FILL) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_FILL(_In_ WDFDMAENABLER DmaEnabler)
 
typedef _Function_class_ (EVT_WDF_DMA_ENABLER_FLUSH) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_FLUSH(_In_ WDFDMAENABLER DmaEnabler)
 
typedef _Function_class_ (EVT_WDF_DMA_ENABLER_ENABLE) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_ENABLE(_In_ WDFDMAENABLER DmaEnabler)
 
typedef _Function_class_ (EVT_WDF_DMA_ENABLER_DISABLE) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_DISABLE(_In_ WDFDMAENABLER DmaEnabler)
 
typedef _Function_class_ (EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_START) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_START(_In_ WDFDMAENABLER DmaEnabler)
 
typedef _Function_class_ (EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP(_In_ WDFDMAENABLER DmaEnabler)
 
FORCEINLINE VOID WDF_DMA_ENABLER_CONFIG_INIT (_Out_ PWDF_DMA_ENABLER_CONFIG Config, _In_ WDF_DMA_PROFILE Profile, _In_ size_t MaximumLength)
 
FORCEINLINE VOID WDF_DMA_SYSTEM_PROFILE_CONFIG_INIT (_Out_ PWDF_DMA_SYSTEM_PROFILE_CONFIG DmaConfig, _In_ PHYSICAL_ADDRESS Address, _In_ DMA_WIDTH DmaWidth, _In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR DmaDescriptor)
 
typedef _IRQL_requires_max_ (DISPATCH_LEVEL) WDFAPI size_t(STDCALL *PFN_WDFDMAENABLERGETMAXIMUMLENGTH)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
 

Macro Definition Documentation

◆ WDF_DMA_ENABLER_UNLIMITED_FRAGMENTS

#define WDF_DMA_ENABLER_UNLIMITED_FRAGMENTS   ((ULONG) -1)

Definition at line 153 of file wdfdmaenabler.h.

◆ WDF_EXTERN_C

#define WDF_EXTERN_C

Definition at line 40 of file wdfdmaenabler.h.

◆ WDF_EXTERN_C_END

#define WDF_EXTERN_C_END

Definition at line 42 of file wdfdmaenabler.h.

◆ WDF_EXTERN_C_START

#define WDF_EXTERN_C_START

Definition at line 41 of file wdfdmaenabler.h.

Typedef Documentation

◆ _IRQL_requires_max_

typedef _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFDMAENABLERCONFIGURESYSTEMPROFILE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals

Definition at line 299 of file wdfdmaenabler.h.

◆ _When_

typedef _In_ WDFDMAENABLER _In_ _When_(MaximumFragments==0, __drv_reportError(MaximumFragments cannot be zero)) size_t MaximumFragments)

Definition at line 431 of file wdfdmaenabler.h.

◆ Attributes

◆ Config

◆ ConfigDirection

Initial value:
{
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFDMAENABLER DmaEnabler
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ PWDF_DMA_SYSTEM_PROFILE_CONFIG ProfileConfig
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ PWDF_DMA_SYSTEM_PROFILE_CONFIG _In_ WDF_DMA_DIRECTION ConfigDirection
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfDmaEnablerConfigureSystemProfileTableIndex
Definition: wdffuncenum.h:430

Definition at line 349 of file wdfdmaenabler.h.

◆ Device

typedef _Must_inspect_result_ _In_ WDFDEVICE Device

Definition at line 306 of file wdfdmaenabler.h.

◆ DmaDirection

Initial value:
{
_In_ WDFDMAENABLER _In_ WDF_DMA_DIRECTION DmaDirection
@ WdfDmaEnablerGetFragmentLengthTableIndex
Definition: wdffuncenum.h:409

Definition at line 462 of file wdfdmaenabler.h.

◆ DmaEnabler

typedef _In_ WDFDMAENABLER DmaEnabler

Definition at line 345 of file wdfdmaenabler.h.

◆ DmaEnablerHandle

Initial value:
{
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG Config
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DMA_ENABLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDMAENABLER * DmaEnablerHandle
@ WdfDmaEnablerCreateTableIndex
Definition: wdffuncenum.h:119

Definition at line 312 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_DISABLE

typedef EVT_WDF_DMA_ENABLER_DISABLE* PFN_WDF_DMA_ENABLER_DISABLE

Definition at line 124 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_ENABLE

typedef EVT_WDF_DMA_ENABLER_ENABLE* PFN_WDF_DMA_ENABLER_ENABLE

Definition at line 111 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_FILL

typedef EVT_WDF_DMA_ENABLER_FILL* PFN_WDF_DMA_ENABLER_FILL

Definition at line 85 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_FLUSH

typedef EVT_WDF_DMA_ENABLER_FLUSH* PFN_WDF_DMA_ENABLER_FLUSH

Definition at line 98 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START

typedef EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_START* PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START

Definition at line 137 of file wdfdmaenabler.h.

◆ PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP

typedef EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP* PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP

Definition at line 150 of file wdfdmaenabler.h.

◆ ProfileConfig

◆ PWDF_DMA_ENABLER_CONFIG

◆ PWDF_DMA_SYSTEM_PROFILE_CONFIG

◆ WDF_DMA_DIRECTION

◆ WDF_DMA_ENABLER_CONFIG

◆ WDF_DMA_ENABLER_CONFIG_FLAGS

◆ WDF_DMA_PROFILE

◆ WDF_DMA_SYSTEM_PROFILE_CONFIG

Enumeration Type Documentation

◆ _WDF_DMA_DIRECTION

Enumerator
WdfDmaDirectionReadFromDevice 
WdfDmaDirectionWriteToDevice 

Definition at line 64 of file wdfdmaenabler.h.

64 {
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
enum _WDF_DMA_DIRECTION WDF_DMA_DIRECTION
@ WdfDmaDirectionReadFromDevice
Definition: wdfdmaenabler.h:65
@ WdfDmaDirectionWriteToDevice
Definition: wdfdmaenabler.h:66

◆ _WDF_DMA_ENABLER_CONFIG_FLAGS

Enumerator
WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION 

Definition at line 155 of file wdfdmaenabler.h.

155 {
156 //
157 // This flag only applies to the following DMA profiles:
158 // WdfDmaProfileScatterGather,
159 // WdfDmaProfileScatterGather64,
160 // WdfDmaProfileScatterGatherDuplex and
161 // WdfDmaProfileScatterGather64Duplex
162 //
163 // When this flag is not set and the profile is one of the above, WDF
164 // creates a SGLookasideList used by this DMA adapter's transaction
165 // objects. The SGLookasideList is initialized to allow the max specified
166 // transfer length. When the transaction is executed, WDF calls the WDM
167 // DMA's BuildScatterGatherList entry function. Forward progress drivers
168 // must use this option. This is the default option.
169 //
170 // When this flag is set and the profile is one of the above, WDF
171 // does not create a SGLookasideList. When the transaction is executed,
172 // WDF calls the WDM DMA's GetScatterGatherList entry function.
173 //
@ WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION
enum _WDF_DMA_ENABLER_CONFIG_FLAGS WDF_DMA_ENABLER_CONFIG_FLAGS

◆ _WDF_DMA_PROFILE

Enumerator
WdfDmaProfileInvalid 
WdfDmaProfilePacket 
WdfDmaProfileScatterGather 
WdfDmaProfilePacket64 
WdfDmaProfileScatterGather64 
WdfDmaProfileScatterGatherDuplex 
WdfDmaProfileScatterGather64Duplex 
WdfDmaProfileSystem 
WdfDmaProfileSystemDuplex 

Definition at line 52 of file wdfdmaenabler.h.

52 {
@ WdfDmaProfileScatterGather
Definition: wdfdmaenabler.h:55
@ WdfDmaProfilePacket
Definition: wdfdmaenabler.h:54
@ WdfDmaProfileScatterGatherDuplex
Definition: wdfdmaenabler.h:58
@ WdfDmaProfileSystem
Definition: wdfdmaenabler.h:60
@ WdfDmaProfileSystemDuplex
Definition: wdfdmaenabler.h:61
@ WdfDmaProfilePacket64
Definition: wdfdmaenabler.h:56
@ WdfDmaProfileScatterGather64Duplex
Definition: wdfdmaenabler.h:59
@ WdfDmaProfileScatterGather64
Definition: wdfdmaenabler.h:57
@ WdfDmaProfileInvalid
Definition: wdfdmaenabler.h:53
WDF_EXTERN_C_START enum _WDF_DMA_PROFILE WDF_DMA_PROFILE

Function Documentation

◆ _Function_class_() [1/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_DISABLE  )

◆ _Function_class_() [2/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_ENABLE  )

◆ _Function_class_() [3/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_FILL  )

◆ _Function_class_() [4/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_FLUSH  )

◆ _Function_class_() [5/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_START  )

◆ _Function_class_() [6/6]

typedef _Function_class_ ( EVT_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP  )

◆ _IRQL_requires_max_()

typedef _IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 382 of file wdfdmaenabler.h.

389{
390 return ((PFN_WDFDMAENABLERGETMAXIMUMLENGTH) WdfFunctions[WdfDmaEnablerGetMaximumLengthTableIndex])(WdfDriverGlobals, DmaEnabler);
391}
@ WdfDmaEnablerGetMaximumLengthTableIndex
Definition: wdffuncenum.h:120

◆ WDF_DMA_ENABLER_CONFIG_INIT()

FORCEINLINE VOID WDF_DMA_ENABLER_CONFIG_INIT ( _Out_ PWDF_DMA_ENABLER_CONFIG  Config,
_In_ WDF_DMA_PROFILE  Profile,
_In_ size_t  MaximumLength 
)

Definition at line 224 of file wdfdmaenabler.h.

229{
231
232 Config->Size = sizeof(WDF_DMA_ENABLER_CONFIG);
233 Config->Profile = Profile;
234 Config->MaximumLength = MaximumLength;
235}
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
struct _WDF_DMA_ENABLER_CONFIG WDF_DMA_ENABLER_CONFIG
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Referenced by if().

◆ WDF_DMA_SYSTEM_PROFILE_CONFIG_INIT()

FORCEINLINE VOID WDF_DMA_SYSTEM_PROFILE_CONFIG_INIT ( _Out_ PWDF_DMA_SYSTEM_PROFILE_CONFIG  DmaConfig,
_In_ PHYSICAL_ADDRESS  Address,
_In_ DMA_WIDTH  DmaWidth,
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR  DmaDescriptor 
)

Definition at line 279 of file wdfdmaenabler.h.

285{
287
288 DmaConfig->Size = sizeof(WDF_DMA_SYSTEM_PROFILE_CONFIG);
289 DmaConfig->DeviceAddress = Address;
290 DmaConfig->DmaWidth = DmaWidth;
291 DmaConfig->DmaDescriptor = DmaDescriptor;
292}
static WCHAR Address[46]
Definition: ping.c:68
struct _WDF_DMA_SYSTEM_PROFILE_CONFIG WDF_DMA_SYSTEM_PROFILE_CONFIG