4#include "../pnppriv.hpp"
10#if defined(EVENT_TRACING)
11#include "FxPkgPnpKM.tmh"
75 ULONG altResListIndex;
79 pIoRequirementList = *IoList;
81 if (pIoRequirementList ==
NULL) {
97 for (altResListIndex = 0;
102 BOOLEAN multiMessageMSI22Found;
106 multiMessageMSI22Found =
FALSE;
107 previousDescMSI =
FALSE;
123 pIoDesc = &
pIoResList->Descriptors[descIndex];
125 switch (pIoDesc->
Type) {
130 previousDescMSI =
TRUE;
142 pIntListEntryForMSI = pIntListEntryForMSI->
Flink;
148 "Not enough interrupt objects created for MSI by WDFDEVICE 0x%p ",
156 if (messageCount > 1) {
167 multiMessageMSI22Found =
TRUE;
188 pIntListEntryForLBI = pIntListEntryForLBI->
Flink;
197 if (previousDescMSI) {
200 previousDescMSI =
FALSE;
210 "Not enough interrupt objects created for LBI by WDFDEVICE 0x%p ",
282 "Adding DmaEnabler %p, WDFDMAENABLER %p",
283 Enabler, Enabler->GetObjectHandle());
294 "Removing DmaEnabler %p, WDFDMAENABLER %p",
295 Enabler, Enabler->GetObjectHandle());
392 status = FxRegKey::_QueryULong(
485 status = FxRegKey::_QueryULong(
506 pCurStack =
Irp->GetCurrentIrpStackLocation();
510 pFwdStack = ForwardIrp->GetNextIrpStackLocation();
518 ForwardIrp->SetInformation(
Irp->GetInformation());
519 ForwardIrp->SendIrpSynchronously(
Device->GetObject());
521 pFwdStack = ForwardIrp->GetNextIrpStackLocation();
581 "Failed to allocate IRP to get D3COLD_SUPPORT_INTERFACE from !devobj %p",
604 "!devobj %p declined to supply D3COLD_SUPPORT_INTERFACE",
MdDeviceObject __inline GetPhysicalDevice(VOID)
WDFDEVICE __inline GetHandle(VOID)
_Must_inspect_result_ NTSTATUS OpenSettingsKey(__out HANDLE *Key, __in ACCESS_MASK DesiredAccess=STANDARD_RIGHTS_ALL)
static BOOLEAN _IsMessageInterrupt(__in USHORT ResourceFlags)
VOID FilterResourceRequirements(__inout PIO_RESOURCE_DESCRIPTOR IoResourceDescriptor)
VOID SetParameterQueryInterfaceSize(__in USHORT Size)
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously(__in MdDeviceObject DeviceObject)
VOID SetMinorFunction(__in UCHAR MinorFunction)
static _Must_inspect_result_ MdIrp AllocateIrp(_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
VOID ClearNextStack(VOID)
VOID SetParameterQueryInterfaceType(__in const GUID *InterfaceType)
VOID SetMajorFunction(__in UCHAR MajorFunction)
VOID SetStatus(__in NTSTATUS Status)
VOID SetParameterQueryInterfaceInterface(__in PINTERFACE Interface)
VOID SetParameterQueryInterfaceInterfaceSpecificData(__in PVOID InterfaceSpecificData)
VOID SetParameterQueryInterfaceVersion(__in USHORT Version)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
VOID RevokeDmaEnablerResources(__in FxDmaEnabler *Enabler)
VOID ReadRegistrySxWake(__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
FxSpinLockTransactionedList * m_DmaEnablerList
NTSTATUS FilterResourceRequirements(__in IO_RESOURCE_REQUIREMENTS_LIST **IoList)
VOID RemoveDmaEnabler(__in FxDmaEnabler *Enabler)
VOID ReadRegistryS0Idle(__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
_Must_inspect_result_ NTSTATUS AllocateDmaEnablerList(VOID)
LIST_ENTRY m_InterruptListHead
VOID QueryForD3ColdInterface(VOID)
VOID AddDmaEnabler(__in FxDmaEnabler *Enabler)
D3COLD_SUPPORT_INTERFACE m_D3ColdInterface
VOID WriteStateToRegistry(__in HANDLE RegKey, __in PUNICODE_STRING ValueName, __in ULONG Value)
VOID DropD3ColdInterface(VOID)
NTSTATUS Add(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
VOID Remove(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
__inline VOID SetObject(__in_opt MdDeviceObject DeviceObject)
__inline MdDeviceObject GetObject(VOID)
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
#define IsListEmpty(ListHead)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
MxDeviceObject deviceObject
#define ROSWDFNOTIMPLEMENTED
VOID PnpPassThroughQIWorker(__in MxDeviceObject *Device, __inout FxIrp *Irp, __inout FxIrp *ForwardIrp)
#define CmResourceTypeInterrupt
#define _Must_inspect_result_
#define STANDARD_RIGHTS_READ
#define UNREFERENCED_PARAMETER(P)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_ERROR
PSET_D3COLD_SUPPORT SetD3ColdSupport
PINTERFACE_DEREFERENCE InterfaceDereference
PGET_IDLE_WAKE_INFO GetIdleWakeInfo
union _IO_RESOURCE_DESCRIPTOR::@2055 u
struct _IO_RESOURCE_DESCRIPTOR::@2055::@2058 Interrupt
union _IO_STACK_LOCATION::@1580 Parameters
struct _IO_STACK_LOCATION::@3979::@4005 QueryInterface
struct _LIST_ENTRY * Flink
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDMAENABLER DmaEnabler
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
#define IRP_MN_QUERY_INTERFACE
struct _IO_RESOURCE_LIST * PIO_RESOURCE_LIST
#define IO_RESOURCE_ALTERNATIVE
#define D3COLD_SUPPORT_INTERFACE_VERSION
#define ObDereferenceObject