ReactOS 0.4.16-dev-88-ga65b6ae
pnp.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel Streaming
4 * FILE: drivers/wdm/audio/legacy/stream/pnp.c
5 * PURPOSE: pnp handling
6 * PROGRAMMER: Johannes Anderwald
7 */
8
9#include "stream.h"
10
11VOID
13 IN PIRP Irp,
16{
17 Irp->IoStatus.Status = Status;
18 Irp->IoStatus.Information = Information;
20}
21
22VOID
26{
27 PSTREAM_DEVICE_EXTENSION DeviceExtension;
30
31 /* Get device extension */
33
34 /* Disconnect interrupt */
35 if (DeviceExtension->Interrupt)
36 {
37 IoDisconnectInterrupt(DeviceExtension->Interrupt);
38 DeviceExtension->Interrupt = NULL;
39 }
40
41 /* Release DmaAdapter */
42 if (DeviceExtension->DmaAdapter)
43 {
44 DeviceExtension->DmaAdapter->DmaOperations->PutDmaAdapter(DeviceExtension->DmaAdapter);
45 DeviceExtension->DmaAdapter = NULL;
46 }
47
48 /* Release mem mapped I/O */
49 while(!IsListEmpty(&DeviceExtension->MemoryResourceList))
50 {
51 Entry = RemoveHeadList(&DeviceExtension->MemoryResourceList);
53
54 MmUnmapIoSpace(Mem->Start, Mem->Length);
56 }
57}
58
65{
66 /* This function is used when the driver either implements synchronization on its own
67 * or if there is no interrupt assigned
68 */
70}
71
72VOID
75 IN PKDPC Dpc,
79{
80 //TODO
81 //read/write data
82}
83
84
90{
91 BOOLEAN Ret = FALSE;
93
94 /* Does the driver implement HwInterrupt routine */
95 if (DeviceExtension->DriverExtension->Data.HwInterrupt)
96 {
97 /* Check if the interrupt was coming from this device */
98 Ret = DeviceExtension->DriverExtension->Data.HwInterrupt(DeviceExtension->DeviceExtension);
99 if (Ret)
100 {
101 /* Interrupt has from this device, schedule a Dpc for us */
102 KeInsertQueueDpc(&DeviceExtension->InterruptDpc, NULL, NULL);
103 }
104 }
105 /* Return result */
106 return Ret;
107}
108
109
110
112NTAPI
115 IN PIRP Irp)
116{
117 PHW_STREAM_REQUEST_BLOCK_EXT RequestBlock;
119 PSTREAM_DEVICE_EXTENSION DeviceExtension;
120 PIO_STACK_LOCATION IoStack;
123 PSTREAM_CLASS_DRIVER_EXTENSION DriverObjectExtension;
124 PDMA_ADAPTER Adapter;
125 DEVICE_DESCRIPTION DeviceDesc;
128 BOOLEAN bUseDMA, bUseInterrupt;
129 ULONG MapRegisters;
131 PHW_STREAM_DESCRIPTOR StreamDescriptor;
133 PVOID MappedAddr;
135
136 /* Get current stack location */
138
139 /* Get resource list */
140 List = IoStack->Parameters.StartDevice.AllocatedResourcesTranslated;
141 /* Calculate request length */
142 ResultLength = sizeof(HW_STREAM_REQUEST_BLOCK_EXT) + sizeof(PPORT_CONFIGURATION_INFORMATION) + List->List[0].PartialResourceList.Count * sizeof(ACCESS_RANGE);
143
144 /* Allocate Request Block */
146
147 if (!RequestBlock)
148 {
149 /* Not enough memory */
152 }
153
154 /* Get device extension */
156
157 /* Get driver object extension */
158 DriverObjectExtension = IoGetDriverObjectExtension(DeviceObject->DriverObject, (PVOID)StreamClassAddDevice);
159
160 /* sanity checks */
161 ASSERT(DeviceExtension);
162 ASSERT(DriverObjectExtension);
163
164 /* Zero request block */
165 RtlZeroMemory(RequestBlock, ResultLength);
166
167 /* Locate Config struct */
168 Config = (PPORT_CONFIGURATION_INFORMATION) (RequestBlock + 1);
169 Range = (PACCESS_RANGE) (Config + 1);
170
171 /* Initialize Request */
172 RequestBlock->Block.SizeOfThisPacket = sizeof(HW_STREAM_REQUEST_BLOCK);
173 RequestBlock->Block.Command = SRB_INITIALIZE_DEVICE;
174 RequestBlock->Block.CommandData.ConfigInfo = Config;
176
177 Config->SizeOfThisPacket = sizeof(PPORT_CONFIGURATION_INFORMATION);
178 Config->HwDeviceExtension = (PVOID) (DeviceExtension + 1);
179 Config->ClassDeviceObject = DeviceObject;
180 Config->PhysicalDeviceObject = DeviceExtension->LowerDeviceObject;
181 Config->RealPhysicalDeviceObject = DeviceExtension->PhysicalDeviceObject;
182 Config->AccessRanges = Range;
183
186
187 /* Get resource list */
188 List = IoStack->Parameters.StartDevice.AllocatedResourcesTranslated;
189
190 /* Scan the translated resources */
191 bUseDMA = FALSE;
192 bUseInterrupt = FALSE;
193
194 Range = (PACCESS_RANGE) (Config + 1);
195
196 for(Index = 0; Index < List->List[0].PartialResourceList.Count; Index++)
197 {
198 /* Locate partial descriptor */
199 Descriptor = &List->List[0].PartialResourceList.PartialDescriptors[Index];
200
201 switch(Descriptor->Type)
202 {
204 {
205 /* Store resource information in AccessRange struct */
206 Range[Config->NumberOfAccessRanges].RangeLength = Descriptor->u.Port.Length;
207 Range[Config->NumberOfAccessRanges].RangeStart.QuadPart = Descriptor->u.Port.Start.QuadPart;
208 Range[Config->NumberOfAccessRanges].RangeInMemory = FALSE;
209 Config->NumberOfAccessRanges++;
210 break;
211 }
213 {
214 /* Store resource information */
215 Config->BusInterruptLevel = Descriptor->u.Interrupt.Level;
216 Config->BusInterruptVector = Descriptor->u.Interrupt.Vector;
217 Config->InterruptMode = Descriptor->Flags;
218 Affinity = Descriptor->u.Interrupt.Affinity;
219 bUseInterrupt = TRUE;
220 break;
221 }
223 {
225 MappedAddr = MmMapIoSpace(Descriptor->u.Memory.Start, Descriptor->u.Memory.Length, MmNonCached);
226 if (!MappedAddr || !Mem)
227 {
228 if (Mem)
229 {
230 /* Release Memory resource descriptor */
231 ExFreePool(Mem);
232 }
233
234 if (MappedAddr)
235 {
236 /* Release mem mapped I/O */
237 MmUnmapIoSpace(MappedAddr, Descriptor->u.Memory.Length);
238 }
239
240 /* Release resources */
242 /* Complete irp */
244 ExFreePool(RequestBlock);
246 }
247 /* Store range for driver */
248 Range[Config->NumberOfAccessRanges].RangeLength = Descriptor->u.Memory.Length;
249 Range[Config->NumberOfAccessRanges].RangeStart.QuadPart = Descriptor->u.Memory.Start.QuadPart;
250 Range[Config->NumberOfAccessRanges].RangeInMemory = TRUE;
251 Config->NumberOfAccessRanges++;
252 /* Initialize Memory resource descriptor */
253 Mem->Length = Descriptor->u.Memory.Length;
254 Mem->Start = MappedAddr;
255 InsertTailList(&DeviceExtension->MemoryResourceList, &Mem->Entry);
256 break;
257 }
259 {
260 bUseDMA = TRUE;
261 Config->DmaChannel = Descriptor->u.Dma.Channel;
262 break;
263 }
264 }
265 }
266
267 if (!bUseInterrupt || DriverObjectExtension->Data.HwInterrupt == NULL || Config->BusInterruptLevel == 0 || Config->BusInterruptVector == 0)
268 {
269 /* requirements not satisfied */
271 }
272 else
273 {
274 /* use real sync routine */
276
277 /* connect interrupt */
278 Status = IoConnectInterrupt(&DeviceExtension->Interrupt,
280 (PVOID)DeviceExtension,
281 NULL,
282 Config->BusInterruptVector,
283 Config->BusInterruptLevel,
284 Config->BusInterruptLevel,
285 Config->InterruptMode,
286 TRUE,
287 Affinity,
288 FALSE);
289 if (!NT_SUCCESS(Status))
290 {
291 /* Release resources */
293 /* Failed to connect interrupt */
295 /* Release request block */
296 ExFreePool(RequestBlock);
297 return Status;
298 }
299
300 /* store interrupt object */
301 Config->InterruptObject = DeviceExtension->Interrupt;
302 }
303
304 /* does the device use DMA */
305 if (bUseDMA && DriverObjectExtension->Data.BusMasterDMA)
306 {
307 /* Zero device description */
308 RtlZeroMemory(&DeviceDesc, sizeof(DEVICE_DESCRIPTION));
309
311 DeviceDesc.Master = TRUE;
312 DeviceDesc.ScatterGather = TRUE;
313 DeviceDesc.AutoInitialize = FALSE;
314 DeviceDesc.DmaChannel = Config->DmaChannel;
315 DeviceDesc.InterfaceType = Config->AdapterInterfaceType;
316 DeviceDesc.DmaWidth = Width32Bits;
317 DeviceDesc.DmaSpeed = Compatible;
318 DeviceDesc.MaximumLength = MAXULONG;
319 DeviceDesc.Dma32BitAddresses = DriverObjectExtension->Data.Dma24BitAddresses;
320
321 Adapter = IoGetDmaAdapter(DeviceExtension->PhysicalDeviceObject, &DeviceDesc, &MapRegisters);
322 if (!Adapter)
323 {
324 /* Failed to claim DMA Adapter */
326 /* Release resources */
328 /* Release request block */
329 ExFreePool(RequestBlock);
330 return Status;
331 }
332
333 if (DeviceExtension->DriverExtension->Data.DmaBufferSize)
334 {
335 DeviceExtension->DmaCommonBuffer = Adapter->DmaOperations->AllocateCommonBuffer(Adapter, DeviceExtension->DriverExtension->Data.DmaBufferSize, &DeviceExtension->DmaPhysicalAddress, FALSE);
336 if (!DeviceExtension->DmaCommonBuffer)
337 {
338 /* Failed to allocate a common buffer */
340 /* Release resources */
342 /* Release request block */
343 ExFreePool(RequestBlock);
344 return Status;
345 }
346 }
347
348
349 DeviceExtension->MapRegisters = MapRegisters;
350 DeviceExtension->DmaAdapter = Adapter;
351 Config->DmaAdapterObject = (PADAPTER_OBJECT)Adapter;
352 }
353
354
355 /* First forward the request to lower attached device object */
356 if (IoForwardIrpSynchronously(DeviceExtension->LowerDeviceObject, Irp))
357 {
358 Status = Irp->IoStatus.Status;
359 }
360 else
361 {
363 }
364
365 if (!NT_SUCCESS(Status))
366 {
367 /* Failed to start lower devices */
369 /* Release resources */
371 /* Release request block */
372 ExFreePool(RequestBlock);
373 return Status;
374 }
375
376 Config->Irp = Irp;
377
378 /* FIXME SYNCHRONIZATION */
379
380 /* Send the request */
381 DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
382 if (RequestBlock->Block.Status == STATUS_PENDING)
383 {
384 /* Request is pending, wait for result */
386 /* Get final status code */
387 Status = RequestBlock->Block.Status;
388 }
389
390 /* Copy stream descriptor size */
391 DeviceExtension->StreamDescriptorSize = Config->StreamDescriptorSize;
392
393 /* check if the request has succeeded or if stream size is valid*/
394 if (!NT_SUCCESS(Status)|| !Config->StreamDescriptorSize)
395 {
396 /* Failed to start device */
398 /* Release resources */
400 /* Release request block */
401 ExFreePool(RequestBlock);
402 return Status;
403 }
404
405 /* Allocate a stream Descriptor */
406 StreamDescriptor = ExAllocatePool(NonPagedPool, DeviceExtension->StreamDescriptorSize);
407 if (!StreamDescriptor)
408 {
409 /* Not enough memory */
411 /* Release resources */
413 /* Release request block */
414 ExFreePool(RequestBlock);
416 }
417
418 /* Zero stream descriptor */
419 RtlZeroMemory(StreamDescriptor, DeviceExtension->StreamDescriptorSize);
420
421 /* Setup get stream info struct */
422 RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
423 RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
424 KeClearEvent(&RequestBlock->Event);
425
426 /* send the request */
427 DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
428 if (RequestBlock->Block.Status == STATUS_PENDING)
429 {
430 /* Request is pending, wait for result */
432 /* Get final status code */
433 Status = RequestBlock->Block.Status;
434 }
435
436 if (NT_SUCCESS(Status))
437 {
438 /* store stream descriptor */
439 DeviceExtension->StreamDescriptor = StreamDescriptor;
440 }
441 else
442 {
443 /* cleanup resources */
444 ExFreePool(StreamDescriptor);
445 }
446
447 ExFreePool(RequestBlock);
448 /* Complete Irp */
450 /* Return result */
451 return Status;
452}
453
455NTAPI
458 IN PIRP Irp)
459{
460 PIO_STACK_LOCATION IoStack;
461
462 /* Get current irp stack location */
464
465 switch (IoStack->MinorFunction)
466 {
468 {
470 }
471 }
472
475}
476
477
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
static KSYNCHRONIZE_ROUTINE SynchronizeRoutine
Definition: IoInterrupt.c:30
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG_PTR KAFFINITY
Definition: compat.h:85
BOOLEAN NTAPI KeInsertQueueDpc(IN PKDPC Dpc, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dpc.c:725
struct _ACCESS_RANGE ACCESS_RANGE
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
struct _ACCESS_RANGE * PACCESS_RANGE
NTSTATUS NTAPI StreamClassAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: driver.c:13
VOID NTAPI StreamClassReleaseResources(IN PDEVICE_OBJECT DeviceObject)
Definition: pnp.c:24
NTSTATUS NTAPI StreamClassStartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:113
NTSTATUS NTAPI StreamClassPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:456
VOID CompleteIrp(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: pnp.c:12
VOID NTAPI StreamClassInterruptDpc(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: pnp.c:74
BOOLEAN NTAPI StreamClassSynchronize(IN PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext)
Definition: pnp.c:61
BOOLEAN NTAPI StreamClassInterruptRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
Definition: pnp.c:87
struct STREAM_DEVICE_EXTENSION * PSTREAM_DEVICE_EXTENSION
struct MEMORY_RESOURCE_LIST * PMEMORY_RESOURCE_LIST
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
#define NonPagedPool
Definition: env_spec_w32.h:307
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
Status
Definition: gdiplustypes.h:25
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
#define CmResourceTypeDma
Definition: hwresource.cpp:126
enum _INTERFACE_TYPE INTERFACE_TYPE
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
#define KernelMode
Definition: asm.h:34
@ SynchronizationEvent
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1904
#define IoCompleteRequest
Definition: irp.c:1240
BOOLEAN NTAPI IoForwardIrpSynchronously(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1625
VOID NTAPI IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
Definition: irq.c:142
NTSTATUS NTAPI IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, IN PKSERVICE_ROUTINE ServiceRoutine, IN PVOID ServiceContext, IN PKSPIN_LOCK SpinLock, IN ULONG Vector, IN KIRQL Irql, IN KIRQL SynchronizeIrql, IN KINTERRUPT_MODE InterruptMode, IN BOOLEAN ShareVector, IN KAFFINITY ProcessorEnableMask, IN BOOLEAN FloatingSave)
Definition: irq.c:23
BOOLEAN NTAPI KeSynchronizeExecution(IN OUT PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext OPTIONAL)
Definition: interrupt.c:237
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:1382
struct tagRange Range
@ Width32Bits
Definition: miniport.h:107
@ Compatible
Definition: miniport.h:112
Console I/O streams.
#define STATUS_SUCCESS
Definition: shellext.h:65
@ SRB_INITIALIZE_DEVICE
Definition: strmini.h:198
@ SRB_GET_STREAM_INFO
Definition: strmini.h:191
struct _HW_STREAM_REQUEST_BLOCK HW_STREAM_REQUEST_BLOCK
base of all file and directory entries
Definition: entries.h:83
HW_STREAM_REQUEST_BLOCK Block
Definition: stream.h:54
LIST_ENTRY Entry
Definition: stream.h:20
HW_INITIALIZATION_DATA Data
Definition: stream.h:14
PSTREAM_CLASS_DRIVER_EXTENSION DriverExtension
Definition: stream.h:45
PHW_STREAM_DESCRIPTOR StreamDescriptor
Definition: stream.h:44
PDEVICE_OBJECT PhysicalDeviceObject
Definition: stream.h:29
ULONG StreamDescriptorSize
Definition: stream.h:43
PDMA_ADAPTER DmaAdapter
Definition: stream.h:34
PHYSICAL_ADDRESS DmaPhysicalAddress
Definition: stream.h:36
PDEVICE_OBJECT LowerDeviceObject
Definition: stream.h:28
LIST_ENTRY MemoryResourceList
Definition: stream.h:41
SYNCHRONIZE_FUNC SynchronizeFunction
Definition: stream.h:31
PKINTERRUPT Interrupt
Definition: stream.h:38
DMA_SPEED DmaSpeed
Definition: iotypes.h:2082
BOOLEAN ScatterGather
Definition: iotypes.h:2071
BOOLEAN AutoInitialize
Definition: iotypes.h:2073
DMA_WIDTH DmaWidth
Definition: iotypes.h:2081
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2080
BOOLEAN Dma32BitAddresses
Definition: iotypes.h:2074
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
PHW_INTERRUPT HwInterrupt
Definition: srb.h:569
PHW_RECEIVE_DEVICE_SRB HwReceivePacket
Definition: strmini.h:356
BOOLEAN Dma24BitAddresses
Definition: strmini.h:364
SRB_COMMAND Command
Definition: strmini.h:224
union _HW_STREAM_REQUEST_BLOCK::_CommandData CommandData
struct _IO_STACK_LOCATION::@3974::@4011 StartDevice
union _IO_STACK_LOCATION::@1575 Parameters
Definition: ketypes.h:699
Definition: typedefs.h:120
Definition: range.c:39
#define MAXULONG
Definition: typedefs.h:251
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
PHW_STREAM_DESCRIPTOR StreamBuffer
Definition: strmini.h:232
struct _PORT_CONFIGURATION_INFORMATION * ConfigInfo
Definition: strmini.h:237
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:379
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
struct _DMA_ADAPTER * PADAPTER_OBJECT
Definition: wdm.template.h:208
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:174
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:801
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2063
#define IRP_MN_START_DEVICE
@ DevicePropertyBusNumber
Definition: iotypes.h:1209
@ DevicePropertyLegacyBusType
Definition: iotypes.h:1208
_In_ PKSYNCHRONIZE_ROUTINE _In_opt_ __drv_aliasesMem PVOID SynchronizeContext
Definition: kefuncs.h:525
@ Executive
Definition: ketypes.h:415
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:688
KSYNCHRONIZE_ROUTINE * PKSYNCHRONIZE_ROUTINE
Definition: ketypes.h:875
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:687
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:689
@ MmNonCached
Definition: mmtypes.h:129