ReactOS 0.4.15-dev-7788-g1ad9096
Bus_PDO_QueryResourceRequirements.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API Tests
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Unit Tests for acpi!Bus_PDO_QueryResourceRequirements
5 * COPYRIGHT: Copyright 2017-2023 Thomas Faber (thomas.faber@reactos.org)
6 */
7
8#include <apitest.h>
9
10#define WIN32_NO_STATUS
11#include <ndk/rtlfuncs.h>
12#define UNIT_TEST
13#include <acpi.h>
14
15/* Kernel definitions (copied) */
16#define IO_RESOURCE_PREFERRED 0x01
17#define IO_RESOURCE_DEFAULT 0x02
18#define IO_RESOURCE_ALTERNATIVE 0x08
19
20typedef struct _IO_RESOURCE_DESCRIPTOR {
22 UCHAR Type;
27 union {
28 struct {
34 struct {
40 struct {
44 struct {
47 } Dma;
48 struct {
54 struct {
55 ULONG Data[3];
57 struct {
63 struct {
68 } u;
70
71typedef struct _IO_RESOURCE_LIST {
77
78typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
83 ULONG Reserved[3];
87
88/* Kernel definitions (mock) */
89#define PAGED_CODE()
90#define DPRINT1(...) do { if (0) DbgPrint(__VA_ARGS__); } while (0)
91
92typedef struct _IRP
93{
96
97#define PagedPool 1
98static
101{
102 PVOID *Mem;
103
104 Mem = HeapAlloc(GetProcessHeap(), 0, NumberOfBytes + 2 * sizeof(PVOID));
105 Mem[0] = (PVOID)NumberOfBytes;
106 Mem[1] = (PVOID)(ULONG_PTR)Tag;
107 return Mem + 2;
108}
109
110static
111VOID
113{
114 PVOID *Mem = MemPtr;
115
116 Mem -= 2;
117 ok(Mem[1] == (PVOID)(ULONG_PTR)Tag, "Tag is %lx, expected %p\n", Tag, Mem[1]);
118 HeapFree(GetProcessHeap(), 0, Mem);
119}
120
121static
122SIZE_T
124{
125 PVOID *Mem = MemPtr;
126
127 Mem -= 2;
128 return (SIZE_T)Mem[0];
129}
130
131/* ACPI driver definitions */
132typedef struct _PDO_DEVICE_DATA
133{
137
138/* ACPICA functions (mock) */
143
147 ACPI_BUFFER *RetBuffer)
148{
149 ok(AcpiCallExpected, "Unexpected call to AcpiGetCurrentResources\n");
150 ok(Device == CorrectHandle, "Device = %p, expected %p\n", Device, CorrectHandle);
151 if (RetBuffer->Length < CurrentBuffer.Length)
152 {
153 RetBuffer->Length = CurrentBuffer.Length;
154 return AE_BUFFER_OVERFLOW;
155 }
156 RetBuffer->Length = CurrentBuffer.Length;
158 return AE_OK;
159}
160
164 ACPI_BUFFER *RetBuffer)
165{
166 ok(AcpiCallExpected, "Unexpected call to AcpiGetPossibleResources\n");
167 ok(Device == CorrectHandle, "Device = %p, expected %p\n", Device, CorrectHandle);
168 if (RetBuffer->Length < PossibleBuffer.Length)
169 {
170 RetBuffer->Length = PossibleBuffer.Length;
171 return AE_BUFFER_OVERFLOW;
172 }
173 RetBuffer->Length = PossibleBuffer.Length;
175 return AE_OK;
176}
177
178#include "../../../../drivers/bus/acpi/buspdo.c"
179
180/* ACPI_RESOURCE builder helpers */
181#define MAKE_IRQ(Resource, _DescriptorLength, _Triggering, _Polarity, _Shareable, _WakeCapable) \
182 do { \
183 Resource->Data.Irq.DescriptorLength = _DescriptorLength; \
184 Resource->Data.Irq.Triggering = _Triggering; \
185 Resource->Data.Irq.Polarity = _Polarity; \
186 Resource->Data.Irq.Shareable = _Shareable; \
187 Resource->Data.Irq.WakeCapable = _WakeCapable; \
188 } while (0)
189
190/* IO_RESOURCE_DESCRIPTOR expectations */
191#define expect_irq(Desc, ExpectedOption, ExpectedShare, ExpectedMin, ExpectedMax) \
192 do { \
193 ok((Desc)->Option == ExpectedOption, "Desc->Option = %u\n", (Desc)->Option); \
194 ok((Desc)->Type == CmResourceTypeInterrupt, "Desc->Type = %u\n", (Desc)->Type); \
195 ok((Desc)->ShareDisposition == ExpectedShare, "Desc->ShareDisposition = %u\n", (Desc)->ShareDisposition); \
196 ok((Desc)->u.Interrupt.MinimumVector == ExpectedMin, "Desc->u.Interrupt.MinimumVector = %lu\n", (Desc)->u.Interrupt.MinimumVector); \
197 ok((Desc)->u.Interrupt.MaximumVector == ExpectedMax, "Desc->u.Interrupt.MaximumVector = %lu\n", (Desc)->u.Interrupt.MaximumVector); \
198 } while (0)
199
200#define expect_port(Desc, ExpectedOption, ExpectedShare, ExpectedLength, ExpectedAlign, ExpectedMin, ExpectedMax) \
201 do { \
202 ok((Desc)->Option == ExpectedOption, "Desc->Option = %u\n", (Desc)->Option); \
203 ok((Desc)->Type == CmResourceTypePort, "Desc->Type = %u\n", (Desc)->Type); \
204 ok((Desc)->ShareDisposition == ExpectedShare, "Desc->ShareDisposition = %u\n", (Desc)->ShareDisposition); \
205 ok((Desc)->u.Port.Length == ExpectedLength, "Desc->u.Port.Length = %lu\n", (Desc)->u.Port.Length); \
206 ok((Desc)->u.Port.Alignment == ExpectedAlign, "Desc->u.Port.Alignment = %lu\n", (Desc)->u.Port.Alignment); \
207 ok((Desc)->u.Port.MinimumAddress.QuadPart == ExpectedMin, "Desc->u.Port.MinimumAddress = 0x%I64x\n", (Desc)->u.Port.MinimumAddress.QuadPart); \
208 ok((Desc)->u.Port.MaximumAddress.QuadPart == ExpectedMax, "Desc->u.Port.MaximumAddress = 0x%I64x\n", (Desc)->u.Port.MaximumAddress.QuadPart); \
209 } while (0)
210
212{
215 IRP Irp;
216 ACPI_RESOURCE ResourcesBuffer[20];
219 PIO_RESOURCE_LIST ReqList2;
220
221 /* Invalid AcpiHandle */
223 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
224 DeviceData.AcpiHandle = NULL;
226 ok(Status == STATUS_WAIT_0 + 17, "Status = 0x%lx\n", Status);
227
228 /* PCI Bus device */
230 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
231 DeviceData.AcpiHandle = CorrectHandle;
232 DeviceData.HardwareIDs = L"PNP0A03\0";
234 ok(Status == STATUS_WAIT_0 + 17, "Status = 0x%lx\n", Status);
235
236 /* PCI Bus device #2 */
238 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
239 DeviceData.AcpiHandle = CorrectHandle;
240 DeviceData.HardwareIDs = L"PNP0A08\0";
242 ok(Status == STATUS_WAIT_0 + 17, "Status = 0x%lx\n", Status);
243
244 /* Empty buffer */
246 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
247 DeviceData.AcpiHandle = CorrectHandle;
248 DeviceData.HardwareIDs = L"PNP0501\0";
250 ok(Status == STATUS_WAIT_0 + 17, "Status = 0x%lx\n", Status);
251
252 /* Simple single-resource list */
254 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
255 Irp.IoStatus.Information = 0;
256 DeviceData.AcpiHandle = CorrectHandle;
257 DeviceData.HardwareIDs = L"PNP0501\0";
258 Resource = ResourcesBuffer;
260 Resource->Length = sizeof(*Resource);
262 Resource->Data.Irq.InterruptCount = 1;
263 Resource->Data.Irq.Interrupts[0] = 7;
266 Resource->Length = 0;
267 Resource++;
268 PossibleBuffer.Pointer = ResourcesBuffer;
269 PossibleBuffer.Length = (ULONG_PTR)Resource - (ULONG_PTR)ResourcesBuffer;
271 ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
272 ok(Irp.IoStatus.Status == STATUS_WAIT_0 + 17, "IoStatus.Status = 0x%lx\n", Irp.IoStatus.Status);
273 ReqList = (PVOID)Irp.IoStatus.Information;
274 ok(ReqList != NULL, "ReqList is NULL\n");
275 if (ReqList == NULL)
276 {
277 skip("No ReqList\n");
278 return;
279 }
280 ok(ReqList->InterfaceType == Internal, "InterfaceType = %u\n", ReqList->InterfaceType);
281 ok(ReqList->BusNumber == 0, "BusNumber = %lu\n", ReqList->BusNumber);
282 ok(ReqList->SlotNumber == 0, "SlotNumber = %lu\n", ReqList->SlotNumber);
283 ok(ReqList->AlternativeLists == 1, "AlternativeLists = %lu\n", ReqList->AlternativeLists);
284 ok(ReqList->List[0].Version == 1, "List[0].Version = %u\n", ReqList->List[0].Version);
285 ok(ReqList->List[0].Revision == 1, "List[0].Revision = %u\n", ReqList->List[0].Revision);
286 ok(ReqList->List[0].Count == 1, "List[0].Count = %lu\n", ReqList->List[0].Count);
288 ok_int(ReqList->ListSize, GetPoolAllocSize(ReqList));
289 ok_int(ReqList->ListSize, (ULONG_PTR)&ReqList->List[0].Descriptors[1] - (ULONG_PTR)ReqList);
290 ExFreePoolWithTag(ReqList, 'RpcA');
291
292 /* Two IRQs */
294 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
295 Irp.IoStatus.Information = 0;
296 DeviceData.AcpiHandle = CorrectHandle;
297 DeviceData.HardwareIDs = L"PNP0501\0";
298 Resource = ResourcesBuffer;
302 Resource->Data.Irq.InterruptCount = 2;
303 Resource->Data.Irq.Interrupts[0] = 3;
304 Resource->Data.Irq.Interrupts[1] = 7;
307 Resource->Length = 0;
308 Resource++;
309 PossibleBuffer.Pointer = ResourcesBuffer;
310 PossibleBuffer.Length = (ULONG_PTR)Resource - (ULONG_PTR)ResourcesBuffer;
312 ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
313 ok(Irp.IoStatus.Status == STATUS_WAIT_0 + 17, "IoStatus.Status = 0x%lx\n", Irp.IoStatus.Status);
314 ReqList = (PVOID)Irp.IoStatus.Information;
315 ok(ReqList != NULL, "ReqList is NULL\n");
316 if (ReqList == NULL)
317 {
318 skip("No ReqList\n");
319 return;
320 }
321 ok(ReqList->InterfaceType == Internal, "InterfaceType = %u\n", ReqList->InterfaceType);
322 ok(ReqList->BusNumber == 0, "BusNumber = %lu\n", ReqList->BusNumber);
323 ok(ReqList->SlotNumber == 0, "SlotNumber = %lu\n", ReqList->SlotNumber);
324 ok(ReqList->AlternativeLists == 1, "AlternativeLists = %lu\n", ReqList->AlternativeLists);
325 ok(ReqList->List[0].Version == 1, "List[0].Version = %u\n", ReqList->List[0].Version);
326 ok(ReqList->List[0].Revision == 1, "List[0].Revision = %u\n", ReqList->List[0].Revision);
327 ok(ReqList->List[0].Count == 2, "List[0].Count = %lu\n", ReqList->List[0].Count);
330 ok_int(ReqList->ListSize, GetPoolAllocSize(ReqList));
331 ok_int(ReqList->ListSize, (ULONG_PTR)&ReqList->List[0].Descriptors[2] - (ULONG_PTR)ReqList);
332 ExFreePoolWithTag(ReqList, 'RpcA');
333
334 /* Port */
336 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
337 Irp.IoStatus.Information = 0;
338 DeviceData.AcpiHandle = CorrectHandle;
339 DeviceData.HardwareIDs = L"PNP0501\0";
340 Resource = ResourcesBuffer;
342 Resource->Length = sizeof(*Resource);
343 Resource->Data.Io.IoDecode = ACPI_DECODE_16;
344 Resource->Data.Io.Alignment = 8;
345 Resource->Data.Io.AddressLength = 8;
346 Resource->Data.Io.Minimum = 0x3F8;
347 Resource->Data.Io.Maximum = 0x3F8;
350 Resource->Length = 0;
351 Resource++;
352 PossibleBuffer.Pointer = ResourcesBuffer;
353 PossibleBuffer.Length = (ULONG_PTR)Resource - (ULONG_PTR)ResourcesBuffer;
355 ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
356 ok(Irp.IoStatus.Status == STATUS_WAIT_0 + 17, "IoStatus.Status = 0x%lx\n", Irp.IoStatus.Status);
357 ReqList = (PVOID)Irp.IoStatus.Information;
358 ok(ReqList != NULL, "ReqList is NULL\n");
359 if (ReqList == NULL)
360 {
361 skip("No ReqList\n");
362 return;
363 }
364 ok(ReqList->InterfaceType == Internal, "InterfaceType = %u\n", ReqList->InterfaceType);
365 ok(ReqList->BusNumber == 0, "BusNumber = %lu\n", ReqList->BusNumber);
366 ok(ReqList->SlotNumber == 0, "SlotNumber = %lu\n", ReqList->SlotNumber);
367 ok(ReqList->AlternativeLists == 1, "AlternativeLists = %lu\n", ReqList->AlternativeLists);
368 ok(ReqList->List[0].Version == 1, "List[0].Version = %u\n", ReqList->List[0].Version);
369 ok(ReqList->List[0].Revision == 1, "List[0].Revision = %u\n", ReqList->List[0].Revision);
370 ok(ReqList->List[0].Count == 1, "List[0].Count = %lu\n", ReqList->List[0].Count);
372 ok_int(ReqList->ListSize, GetPoolAllocSize(ReqList));
373 ok_int(ReqList->ListSize, (ULONG_PTR)&ReqList->List[0].Descriptors[1] - (ULONG_PTR)ReqList);
374 ExFreePoolWithTag(ReqList, 'RpcA');
375
376 /* Port + two IRQs */
378 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
379 Irp.IoStatus.Information = 0;
380 DeviceData.AcpiHandle = CorrectHandle;
381 DeviceData.HardwareIDs = L"PNP0501\0";
382 Resource = ResourcesBuffer;
384 Resource->Length = sizeof(*Resource);
385 Resource->Data.Io.IoDecode = ACPI_DECODE_16;
386 Resource->Data.Io.Alignment = 8;
387 Resource->Data.Io.AddressLength = 8;
388 Resource->Data.Io.Minimum = 0x3F8;
389 Resource->Data.Io.Maximum = 0x3F8;
394 Resource->Data.Irq.InterruptCount = 2;
395 Resource->Data.Irq.Interrupts[0] = 3;
396 Resource->Data.Irq.Interrupts[1] = 7;
399 Resource->Length = 0;
400 Resource++;
401 PossibleBuffer.Pointer = ResourcesBuffer;
402 PossibleBuffer.Length = (ULONG_PTR)Resource - (ULONG_PTR)ResourcesBuffer;
404 ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
405 ok(Irp.IoStatus.Status == STATUS_WAIT_0 + 17, "IoStatus.Status = 0x%lx\n", Irp.IoStatus.Status);
406 ReqList = (PVOID)Irp.IoStatus.Information;
407 ok(ReqList != NULL, "ReqList is NULL\n");
408 if (ReqList == NULL)
409 {
410 skip("No ReqList\n");
411 return;
412 }
413 ok(ReqList->InterfaceType == Internal, "InterfaceType = %u\n", ReqList->InterfaceType);
414 ok(ReqList->BusNumber == 0, "BusNumber = %lu\n", ReqList->BusNumber);
415 ok(ReqList->SlotNumber == 0, "SlotNumber = %lu\n", ReqList->SlotNumber);
416 ok(ReqList->AlternativeLists == 1, "AlternativeLists = %lu\n", ReqList->AlternativeLists);
417 ok(ReqList->List[0].Version == 1, "List[0].Version = %u\n", ReqList->List[0].Version);
418 ok(ReqList->List[0].Revision == 1, "List[0].Revision = %u\n", ReqList->List[0].Revision);
419 ok(ReqList->List[0].Count == 3, "List[0].Count = %lu\n", ReqList->List[0].Count);
423 ok_int(ReqList->ListSize, GetPoolAllocSize(ReqList));
424 ok_int(ReqList->ListSize, (ULONG_PTR)&ReqList->List[0].Descriptors[3] - (ULONG_PTR)ReqList);
425 ExFreePoolWithTag(ReqList, 'RpcA');
426
427 /* Multiple alternatives for ports + IRQs (VMware COM port, simplified) */
429 Irp.IoStatus.Status = STATUS_WAIT_0 + 17;
430 Irp.IoStatus.Information = 0;
431 DeviceData.AcpiHandle = CorrectHandle;
432 DeviceData.HardwareIDs = L"PNP0501\0";
433 Resource = ResourcesBuffer;
435 Resource->Length = sizeof(*Resource);
436
439 Resource->Length = sizeof(*Resource);
440 Resource->Data.Io.IoDecode = ACPI_DECODE_16;
441 Resource->Data.Io.Alignment = 8;
442 Resource->Data.Io.AddressLength = 8;
443 Resource->Data.Io.Minimum = 0x3E8;
444 Resource->Data.Io.Maximum = 0x3E8;
445
450 Resource->Data.Irq.InterruptCount = 5;
451 Resource->Data.Irq.Interrupts[0] = 3;
452 Resource->Data.Irq.Interrupts[1] = 4;
453 Resource->Data.Irq.Interrupts[2] = 5;
454 Resource->Data.Irq.Interrupts[3] = 6;
455 Resource->Data.Irq.Interrupts[4] = 7;
456
459 Resource->Length = sizeof(*Resource);
460
463 Resource->Length = sizeof(*Resource);
464 Resource->Data.Io.IoDecode = ACPI_DECODE_16;
465 Resource->Data.Io.Alignment = 8;
466 Resource->Data.Io.AddressLength = 8;
467 Resource->Data.Io.Minimum = 0x2E8;
468 Resource->Data.Io.Maximum = 0x2E8;
469
474 Resource->Data.Irq.InterruptCount = 5;
475 Resource->Data.Irq.Interrupts[0] = 3;
476 Resource->Data.Irq.Interrupts[1] = 4;
477 Resource->Data.Irq.Interrupts[2] = 5;
478 Resource->Data.Irq.Interrupts[3] = 6;
479 Resource->Data.Irq.Interrupts[4] = 7;
480
483 Resource->Length = sizeof(*Resource);
484
487 Resource->Length = 0;
488 Resource++;
489 PossibleBuffer.Pointer = ResourcesBuffer;
490 PossibleBuffer.Length = (ULONG_PTR)Resource - (ULONG_PTR)ResourcesBuffer;
492 ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
493 ok(Irp.IoStatus.Status == STATUS_WAIT_0 + 17, "IoStatus.Status = 0x%lx\n", Irp.IoStatus.Status);
494 ReqList = (PVOID)Irp.IoStatus.Information;
495 ok(ReqList != NULL, "ReqList is NULL\n");
496 if (ReqList == NULL)
497 {
498 skip("No ReqList\n");
499 return;
500 }
501 ok(ReqList->InterfaceType == Internal, "InterfaceType = %u\n", ReqList->InterfaceType);
502 ok(ReqList->BusNumber == 0, "BusNumber = %lu\n", ReqList->BusNumber);
503 ok(ReqList->SlotNumber == 0, "SlotNumber = %lu\n", ReqList->SlotNumber);
504 todo_if(1)
505 ok(ReqList->AlternativeLists == 2, "AlternativeLists = %lu\n", ReqList->AlternativeLists);
506 ok(ReqList->List[0].Version == 1, "List[0].Version = %u\n", ReqList->List[0].Version);
507 ok(ReqList->List[0].Revision == 1, "List[0].Revision = %u\n", ReqList->List[0].Revision);
508 ok(ReqList->List[0].Count == 6, "List[0].Count = %lu\n", ReqList->List[0].Count);
515 ReqList2 = (PVOID)&ReqList->List[0].Descriptors[6];
516 if (ReqList->ListSize > (ULONG_PTR)ReqList2 - (ULONG_PTR)ReqList)
517 {
518 ok(ReqList2->Version == 1, "List[1].Version = %u\n", ReqList->List[0].Version);
519 ok(ReqList2->Revision == 1, "List[1].Revision = %u\n", ReqList->List[0].Revision);
520 ok(ReqList2->Count == 6, "List[1].Count = %lu\n", ReqList->List[0].Count);
527 }
528 ok_int(ReqList->ListSize, GetPoolAllocSize(ReqList));
529 todo_if(1)
530 ok_int(ReqList->ListSize, (ULONG_PTR)&ReqList2->Descriptors[6] - (ULONG_PTR)ReqList);
531 ExFreePoolWithTag(ReqList, 'RpcA');
532}
struct _IO_RESOURCE_DESCRIPTOR * PIO_RESOURCE_DESCRIPTOR
static SIZE_T GetPoolAllocSize(PVOID MemPtr)
static ACPI_BUFFER CurrentBuffer
#define expect_irq(Desc, ExpectedOption, ExpectedShare, ExpectedMin, ExpectedMax)
struct _IO_RESOURCE_LIST * PIO_RESOURCE_LIST
static ACPI_BUFFER PossibleBuffer
#define IO_RESOURCE_ALTERNATIVE
struct _IRP * PIRP
struct _IO_RESOURCE_LIST IO_RESOURCE_LIST
#define expect_port(Desc, ExpectedOption, ExpectedShare, ExpectedLength, ExpectedAlign, ExpectedMin, ExpectedMax)
#define IO_RESOURCE_PREFERRED
#define MAKE_IRQ(Resource, _DescriptorLength, _Triggering, _Polarity, _Shareable, _WakeCapable)
static BOOLEAN AcpiCallExpected
struct _IO_RESOURCE_DESCRIPTOR IO_RESOURCE_DESCRIPTOR
struct _PDO_DEVICE_DATA PDO_DEVICE_DATA
ACPI_STATUS AcpiGetCurrentResources(ACPI_HANDLE Device, ACPI_BUFFER *RetBuffer)
struct _IRP IRP
static ACPI_HANDLE CorrectHandle
ACPI_STATUS AcpiGetPossibleResources(ACPI_HANDLE Device, ACPI_BUFFER *RetBuffer)
struct _IO_RESOURCE_REQUIREMENTS_LIST * PIO_RESOURCE_REQUIREMENTS_LIST
struct _IO_RESOURCE_REQUIREMENTS_LIST IO_RESOURCE_REQUIREMENTS_LIST
struct _PDO_DEVICE_DATA * PPDO_DEVICE_DATA
unsigned char BOOLEAN
#define AE_BUFFER_OVERFLOW
Definition: acexcep.h:119
#define AE_OK
Definition: acexcep.h:97
#define ACPI_NEXT_RESOURCE(Res)
Definition: acrestyp.h:812
#define ACPI_DECODE_16
Definition: acrestyp.h:85
#define ACPI_ACTIVE_HIGH
Definition: acrestyp.h:98
#define ACPI_RESOURCE_TYPE_IRQ
Definition: acrestyp.h:723
#define ACPI_RESOURCE_TYPE_END_DEPENDENT
Definition: acrestyp.h:726
#define ACPI_RESOURCE_TYPE_END_TAG
Definition: acrestyp.h:730
#define ACPI_NOT_WAKE_CAPABLE
Definition: acrestyp.h:109
#define ACPI_RESOURCE_TYPE_START_DEPENDENT
Definition: acrestyp.h:725
#define ACPI_LEVEL_SENSITIVE
Definition: acrestyp.h:93
#define ACPI_EXCLUSIVE
Definition: acrestyp.h:104
#define ACPI_RESOURCE_TYPE_IO
Definition: acrestyp.h:727
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS Bus_PDO_QueryResourceRequirements(PPDO_DEVICE_DATA DeviceData, PIRP Irp)
Definition: buspdo.c:1301
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:843
_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 GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
Status
Definition: gdiplustypes.h:25
@ Internal
Definition: hwresource.cpp:137
enum _INTERFACE_TYPE INTERFACE_TYPE
if(dx< 0)
Definition: linetemp.h:194
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define STATUS_WAIT_0
Definition: ntstatus.h:237
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
#define todo_if(is_todo)
Definition: test.h:163
#define STATUS_SUCCESS
Definition: shellext.h:65
struct _IO_RESOURCE_DESCRIPTOR::@21::@26 Generic
struct _IO_RESOURCE_DESCRIPTOR::@21::@28 BusNumber
union _IO_RESOURCE_DESCRIPTOR::@21 u
struct _IO_RESOURCE_DESCRIPTOR::@21::@29 ConfigData
ULONG MaximumChannel
Definition: edit.c:92
struct _IO_RESOURCE_DESCRIPTOR::@21::@27 DevicePrivate
struct _IO_RESOURCE_DESCRIPTOR::@21::@25 Dma
ULONG MinimumChannel
Definition: edit.c:91
PHYSICAL_ADDRESS MaximumAddress
Definition: edit.c:70
struct _IO_RESOURCE_DESCRIPTOR::@21::@22 Port
struct _IO_RESOURCE_DESCRIPTOR::@21::@24 Interrupt
PHYSICAL_ADDRESS MinimumAddress
Definition: edit.c:69
UCHAR ShareDisposition
Definition: edit.c:61
struct _IO_RESOURCE_DESCRIPTOR::@21::@23 Memory
ULONG Count
Definition: edit.c:124
USHORT Revision
Definition: edit.c:123
USHORT Version
Definition: edit.c:122
IO_RESOURCE_DESCRIPTOR Descriptors[1]
Definition: edit.c:125
INTERFACE_TYPE InterfaceType
Definition: edit.c:130
IO_RESOURCE_LIST List[1]
Definition: edit.c:135
IO_STATUS_BLOCK IoStatus
PWCHAR HardwareIDs
Definition: acpisys.h:44
void * Pointer
Definition: actypes.h:1054
ACPI_SIZE Length
Definition: actypes.h:1053
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define CopyMemory
Definition: winbase.h:1710
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
@ CmResourceShareDeviceExclusive
Definition: cmtypes.h:241
@ CmResourceShareDriverExclusive
Definition: cmtypes.h:242
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
unsigned char UCHAR
Definition: xmlstorage.h:181