10#define WIN32_NO_STATUS
17#define DPRINT1(...) do { if (0) DbgPrint(__VA_ARGS__); } while (0)
105#include "../../../../drivers/bus/acpi/buspdo.c"
108#define MAKE_IRQ(Resource, _DescriptorLength, _Triggering, _Polarity, _Shareable, _WakeCapable) \
110 Resource->Data.Irq.DescriptorLength = _DescriptorLength; \
111 Resource->Data.Irq.Triggering = _Triggering; \
112 Resource->Data.Irq.Polarity = _Polarity; \
113 Resource->Data.Irq.Shareable = _Shareable; \
114 Resource->Data.Irq.WakeCapable = _WakeCapable; \
118#define expect_irq(Desc, ExpectedOption, ExpectedShare, ExpectedMin, ExpectedMax) \
120 ok((Desc)->Option == ExpectedOption, "Desc->Option = %u\n", (Desc)->Option); \
121 ok((Desc)->Type == CmResourceTypeInterrupt, "Desc->Type = %u\n", (Desc)->Type); \
122 ok((Desc)->ShareDisposition == ExpectedShare, "Desc->ShareDisposition = %u\n", (Desc)->ShareDisposition); \
123 ok((Desc)->u.Interrupt.MinimumVector == ExpectedMin, "Desc->u.Interrupt.MinimumVector = %lu\n", (Desc)->u.Interrupt.MinimumVector); \
124 ok((Desc)->u.Interrupt.MaximumVector == ExpectedMax, "Desc->u.Interrupt.MaximumVector = %lu\n", (Desc)->u.Interrupt.MaximumVector); \
127#define expect_port(Desc, ExpectedOption, ExpectedShare, ExpectedLength, ExpectedAlign, ExpectedMin, ExpectedMax) \
129 ok((Desc)->Option == ExpectedOption, "Desc->Option = %u\n", (Desc)->Option); \
130 ok((Desc)->Type == CmResourceTypePort, "Desc->Type = %u\n", (Desc)->Type); \
131 ok((Desc)->ShareDisposition == ExpectedShare, "Desc->ShareDisposition = %u\n", (Desc)->ShareDisposition); \
132 ok((Desc)->u.Port.Length == ExpectedLength, "Desc->u.Port.Length = %lu\n", (Desc)->u.Port.Length); \
133 ok((Desc)->u.Port.Alignment == ExpectedAlign, "Desc->u.Port.Alignment = %lu\n", (Desc)->u.Port.Alignment); \
134 ok((Desc)->u.Port.MinimumAddress.QuadPart == ExpectedMin, "Desc->u.Port.MinimumAddress = 0x%I64x\n", (Desc)->u.Port.MinimumAddress.QuadPart); \
135 ok((Desc)->u.Port.MaximumAddress.QuadPart == ExpectedMax, "Desc->u.Port.MaximumAddress = 0x%I64x\n", (Desc)->u.Port.MaximumAddress.QuadPart); \
182 Irp.IoStatus.Information = 0;
187 Resource->Length =
sizeof(*Resource);
189 Resource->Data.Irq.InterruptCount = 1;
190 Resource->Data.Irq.Interrupts[0] = 7;
200 ReqList = (
PVOID)
Irp.IoStatus.Information;
201 ok(ReqList !=
NULL,
"ReqList is NULL\n");
204 skip(
"No ReqList\n");
222 Irp.IoStatus.Information = 0;
229 Resource->Data.Irq.InterruptCount = 2;
230 Resource->Data.Irq.Interrupts[0] = 3;
231 Resource->Data.Irq.Interrupts[1] = 7;
241 ReqList = (
PVOID)
Irp.IoStatus.Information;
242 ok(ReqList !=
NULL,
"ReqList is NULL\n");
245 skip(
"No ReqList\n");
264 Irp.IoStatus.Information = 0;
269 Resource->Length =
sizeof(*Resource);
272 Resource->Data.Io.AddressLength = 8;
284 ReqList = (
PVOID)
Irp.IoStatus.Information;
285 ok(ReqList !=
NULL,
"ReqList is NULL\n");
288 skip(
"No ReqList\n");
306 Irp.IoStatus.Information = 0;
311 Resource->Length =
sizeof(*Resource);
314 Resource->Data.Io.AddressLength = 8;
321 Resource->Data.Irq.InterruptCount = 2;
322 Resource->Data.Irq.Interrupts[0] = 3;
323 Resource->Data.Irq.Interrupts[1] = 7;
333 ReqList = (
PVOID)
Irp.IoStatus.Information;
334 ok(ReqList !=
NULL,
"ReqList is NULL\n");
337 skip(
"No ReqList\n");
357 Irp.IoStatus.Information = 0;
362 Resource->Length =
sizeof(*Resource);
366 Resource->Length =
sizeof(*Resource);
369 Resource->Data.Io.AddressLength = 8;
377 Resource->Data.Irq.InterruptCount = 5;
378 Resource->Data.Irq.Interrupts[0] = 3;
379 Resource->Data.Irq.Interrupts[1] = 4;
380 Resource->Data.Irq.Interrupts[2] = 5;
381 Resource->Data.Irq.Interrupts[3] = 6;
382 Resource->Data.Irq.Interrupts[4] = 7;
386 Resource->Length =
sizeof(*Resource);
390 Resource->Length =
sizeof(*Resource);
393 Resource->Data.Io.AddressLength = 8;
401 Resource->Data.Irq.InterruptCount = 5;
402 Resource->Data.Irq.Interrupts[0] = 3;
403 Resource->Data.Irq.Interrupts[1] = 4;
404 Resource->Data.Irq.Interrupts[2] = 5;
405 Resource->Data.Irq.Interrupts[3] = 6;
406 Resource->Data.Irq.Interrupts[4] = 7;
410 Resource->Length =
sizeof(*Resource);
421 ReqList = (
PVOID)
Irp.IoStatus.Information;
422 ok(ReqList !=
NULL,
"ReqList is NULL\n");
425 skip(
"No ReqList\n");
static SIZE_T GetPoolAllocSize(PVOID MemPtr)
static ACPI_BUFFER CurrentBuffer
#define expect_irq(Desc, ExpectedOption, ExpectedShare, ExpectedMin, ExpectedMax)
static ACPI_BUFFER PossibleBuffer
#define expect_port(Desc, ExpectedOption, ExpectedShare, ExpectedLength, ExpectedAlign, ExpectedMin, ExpectedMax)
#define MAKE_IRQ(Resource, _DescriptorLength, _Triggering, _Polarity, _Shareable, _WakeCapable)
static BOOLEAN AcpiCallExpected
struct _PDO_DEVICE_DATA PDO_DEVICE_DATA
ACPI_STATUS AcpiGetCurrentResources(ACPI_HANDLE Device, ACPI_BUFFER *RetBuffer)
static ACPI_HANDLE CorrectHandle
ACPI_STATUS AcpiGetPossibleResources(ACPI_HANDLE Device, ACPI_BUFFER *RetBuffer)
struct _PDO_DEVICE_DATA * PPDO_DEVICE_DATA
#define AE_BUFFER_OVERFLOW
#define ACPI_NEXT_RESOURCE(Res)
#define ACPI_RESOURCE_TYPE_IRQ
#define ACPI_RESOURCE_TYPE_END_DEPENDENT
#define ACPI_RESOURCE_TYPE_END_TAG
#define ACPI_NOT_WAKE_CAPABLE
#define ACPI_RESOURCE_TYPE_START_DEPENDENT
#define ACPI_LEVEL_SENSITIVE
#define ACPI_RESOURCE_TYPE_IO
#define ok_int(expression, result)
NTSTATUS Bus_PDO_QueryResourceRequirements(PPDO_DEVICE_DATA DeviceData, PIRP Irp)
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
#define HeapFree(x, y, z)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExFreePoolWithTag(_P, _T)
IO_RESOURCE_DESCRIPTOR Descriptors[1]
INTERFACE_TYPE InterfaceType
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
@ CmResourceShareDeviceExclusive
@ CmResourceShareDriverExclusive
#define IO_RESOURCE_ALTERNATIVE
#define IO_RESOURCE_PREFERRED
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes