4#ifndef _FXPOWERPOLICYSTATEMACHINE_H_
5#define _FXPOWERPOLICYSTATEMACHINE_H_
217#if FX_STATE_MACHINE_VERIFY
218#define MAX_PWR_POL_STATE_ENTRY_FN_RETURN_STATES (5)
220struct PWR_POL_STATE_ENTRY_FUNCTION_TARGET_STATE {
237struct PWR_POL_STATE_ENTRY_FN_RETURN_STATE_TABLE {
241 PWR_POL_STATE_ENTRY_FUNCTION_TARGET_STATE TargetStates[MAX_PWR_POL_STATE_ENTRY_FN_RETURN_STATES];
244typedef const PWR_POL_STATE_ENTRY_FN_RETURN_STATE_TABLE* CPPWR_POL_STATE_ENTRY_FN_RETURN_STATE_TABLE;
398 ULONG poxSettingsOffset;
424 poxSettingsOffset = 0;
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
@ IdleTimeoutSystemManaged
@ IdleTimeoutPoxSettingsSpecified
@ IdleTimeoutStatusFrozen
LONG volatile m_IdleTimeoutStatus
IdleTimeoutStatusUpdateResult UpdateIdleTimeoutStatus(__in IdleTimeoutStatusFlag Flag)
NTSTATUS UseSystemManagedIdleTimeout(__in PFX_DRIVER_GLOBALS DriverGlobals)
~IdleTimeoutManagement(VOID)
PPOX_SETTINGS GetPowerFrameworkSettings(VOID)
PPOX_SETTINGS m_PoxSettings
static BOOLEAN _SystemManagedIdleTimeoutAvailable(VOID)
BOOLEAN DriverSpecifiedPowerFrameworkSettings(VOID)
IdleTimeoutManagement(VOID)
BOOLEAN UsingSystemManagedIdleTimeout(VOID)
IdleTimeoutStatusUpdateResult
@ IdleTimeoutStatusFlagsAlreadyFrozen
@ IdleTimeoutStatusFlagAlreadySet
@ IdleTimeoutStatusFlagsUnexpected
@ IdleTimeoutStatusFlagsUpdated
NTSTATUS CommitPowerFrameworkSettings(__in PFX_DRIVER_GLOBALS DriverGlobals, __in PPOX_SETTINGS PoxSettings)
VOID FreezeIdleTimeoutManagementStatus(__in PFX_DRIVER_GLOBALS DriverGlobals)
static __inline VOID MxFreePool(__in PVOID Ptr)
const UCHAR FxPowerPolicyEventQueueDepth
FxPowerPolicySxWakeSettingsFlags
@ FxPowerPolicySxWakeDeviceEnabledFlag
@ FxPowerPolicySxWakeChildrenArmedFlag
@ PwrPolPowerTimeoutExpired
@ PwrPolWakeInterruptFired
@ PwrPolPowerDownIoStopped
@ PwrPolPriorityEventsMask
@ PwrPolUsbSelectiveSuspendCompleted
@ PwrPolImplicitPowerDown
@ PwrPolDevicePowerNotRequired
@ PwrPolDevicePowerRequired
@ PwrPolImplicitPowerDownFailed
@ PwrPolS0IdlePolicyChanged
@ PowerPolSingularEventMask
@ PwrPolUsbSelectiveSuspendCallback
@ PwrPolNotOwnerPriorityEventsMask
struct _POX_SETTINGS * PPOX_SETTINGS
struct NOT_POWER_POLICY_OWNER_STATE_TABLE * PNOT_POWER_POLICY_OWNER_STATE_TABLE
@ FxPowerPolicyDefaultTimeout
WDF_DEVICE_POWER_POLICY_STATE(* PFN_NOT_POWER_POLICY_OWNER_STATE_ENTRY_FUNCTION)(FxPkgPnp *This)
WDF_DEVICE_POWER_POLICY_STATE(* PFN_POWER_POLICY_STATE_ENTRY_FUNCTION)(FxPkgPnp *This)
const NOT_POWER_POLICY_OWNER_STATE_TABLE * CPNOT_POWER_POLICY_OWNER_STATE_TABLE
struct POWER_POLICY_STATE_TABLE * PPOWER_POLICY_STATE_TABLE
const POWER_POLICY_EVENT_TARGET_STATE * CPPOWER_POLICY_EVENT_TARGET_STATE
struct _POX_SETTINGS POX_SETTINGS
const POWER_POLICY_STATE_TABLE * CPPOWER_POLICY_STATE_TABLE
CancelIrpCompletionOwnership
@ CancelOwnershipUnclaimed
#define _Must_inspect_result_
CALLBACK_FUNCTION MdCallbackFunctionType
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
ULONG PwrPolPowerUpFailedKnown
ULONG PwrPolWakeSuccessKnown
ULONG m_SingularEventsPresent
ULONG PwrPolPowerUpHwStartedKnown
FxPowerPolicyMachineStateHistory m_States
ULONG PwrPolPowerDownFailedKnown
~FxPowerPolicyMachine(VOID)
ULONG PwrPolWakeArrivedKnown
ULONG PwrPolPowerDownIoStoppedKnown
VOID SetWaitWakeUnclaimed(VOID)
ULONG PwrPolSurpriseRemoveKnown
ULONG PwrPolS0IdlePolicyChangedKnown
ULONG PwrPolPowerTimeoutExpiredKnown
VOID UsbSSCallbackProcessingComplete(VOID)
ULONG PwrPolPowerDownKnown
ULONG PwrPolUsbSelectiveSuspendCompletedKnown
ULONG PwrPolIoPresentKnown
_Must_inspect_result_ NTSTATUS InitUsbSS(VOID)
union FxPowerPolicyMachine::@4776::@4778 m_SingularEventsPresentByName
ULONG PwrPolUsbSelectiveSuspendCallbackKnown
FxPowerPolicyOwnerSettings * m_Owner
ULONG PwrPolWakeFailedKnown
BOOLEAN CanCompleteWaitWakeIrp(VOID)
FxPowerPolicyEvent m_Queue[FxPowerPolicyEventQueueDepth]
FxPoxInterface m_PoxInterface
BOOLEAN m_RequestedPowerUpIrp
FxPowerDeviceArmWakeFromSx m_DeviceArmWakeFromSx
NTSTATUS m_WaitWakeStatus
VOID IncrementChildrenArmedForWakeCount(VOID)
FxUsbIdleInfo * m_UsbIdle
PVOID m_PowerCallbackRegistration
FxPowerDeviceWakeFromSxTriggered m_DeviceWakeFromSxTriggered
static MdCallbackFunctionType _PowerStateCallback
FxPowerDeviceArmWakeFromS0 m_DeviceArmWakeFromS0
WakePolicySettings m_WakeSettings
~FxPowerPolicyOwnerSettings(VOID)
FxPowerDeviceDisarmWakeFromSx m_DeviceDisarmWakeFromSx
BOOLEAN m_WakeCompletionEventDropped
VOID DecrementChildrenArmedForWakeCount(VOID)
ULONG m_SystemToDeviceStateMap
PCALLBACK_OBJECT m_PowerCallbackObject
FxPowerIdleMachine m_PowerIdleMachine
BOOLEAN m_ChildrenCanPowerUp
LONG m_WaitWakeCancelCompletionOwnership
FxPowerDeviceDisarmWakeFromS0 m_DeviceDisarmWakeFromS0
VOID CleanupPowerCallback(VOID)
BOOLEAN m_RequestedWaitWakeIrp
FxPowerDeviceWakeFromS0Triggered m_DeviceWakeFromS0Triggered
BOOLEAN m_RequestedPowerDownIrp
LONG m_ChildrenArmedCount
BOOLEAN m_SystemWakeSource
IdlePolicySettings m_IdleSettings
ULONG m_ChildrenPoweredOnCount
friend FxPowerPolicyMachine
IdleTimeoutManagement m_TimeoutMgmt
BOOLEAN UsbSSCapabilityKnown
BOOLEAN PowerUpIdleDeviceOnSystemWake
BOOLEAN WakeFromS0Capable
PFN_NOT_POWER_POLICY_OWNER_STATE_ENTRY_FUNCTION StateFunc
WDF_DEVICE_POWER_POLICY_STATE CurrentTargetState
CPPOWER_POLICY_EVENT_TARGET_STATE TargetStates
FxPowerPolicyEvent PowerPolicyEvent
WDF_DEVICE_POWER_POLICY_STATE TargetState
POWER_POLICY_EVENT_TARGET_STATE FirstTargetState
PFN_POWER_POLICY_STATE_ENTRY_FUNCTION StateFunc
CPPOWER_POLICY_EVENT_TARGET_STATE OtherTargetStates
FxPwrPolStateInfo StateInfo
DEVICE_POWER_STATE DxState
FxWmiInstanceInternal * WmiInstance
BOOLEAN ArmForWakeIfChildrenAreArmedForWake
BOOLEAN IndicateChildWakeOnParentWake
PFN_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE EvtDeviceWdmPrePoFxUnregisterDevice
PPO_FX_COMPONENT Component
PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK ComponentActiveConditionCallback
PPO_FX_COMPONENT_IDLE_STATE_CALLBACK ComponentIdleStateCallback
PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback
PFN_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE EvtDeviceWdmPostPoFxRegisterDevice
PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK ComponentIdleConditionCallback
USHORT History[FxPowerPolicyEventQueueDepth]
WDF_DEVICE_POWER_POLICY_STATE State1
WDF_DEVICE_POWER_POLICY_STATE State4
WDF_DEVICE_POWER_POLICY_STATE State2
WDF_DEVICE_POWER_POLICY_STATE State3
WDF_DEVICE_POWER_POLICY_STATE State8
WDF_DEVICE_POWER_POLICY_STATE State7
WDF_DEVICE_POWER_POLICY_STATE State5
WDF_DEVICE_POWER_POLICY_STATE State6
struct FxPowerPolicyMachineStateHistory::@4775 S
ULONG PwrPolPowerTimeoutExpiredKnown
struct FxPwrPolStateInfo::@4773 Bits
ULONG PwrPolUsbSelectiveSuspendCompletedKnown
ULONG PwrPolSurpriseRemoveKnown
ULONG PwrPolWakeSuccessKnown
ULONG PwrPolPowerDownFailedKnown
ULONG PwrPolPowerDownIoStoppedKnown
ULONG PwrPolPowerUpFailedKnown
ULONG PwrPolWakeArrivedKnown
ULONG PwrPolPowerDownKnown
ULONG PwrPolWakeFailedKnown
ULONG PwrPolIoPresentKnown
struct FxPwrPolStateInfo::@4774 BitsByName
ULONG PwrPolS0IdlePolicyChangedKnown
ULONG PwrPolUsbSelectiveSuspendCallbackKnown
ULONG PwrPolPowerUpHwStartedKnown
EVT_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE * PFN_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE
EVT_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE * PFN_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE
enum _WDF_DEVICE_POWER_POLICY_STATE WDF_DEVICE_POWER_POLICY_STATE
_Must_inspect_result_ _In_ WDFWMIINSTANCE WmiInstance
PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK * PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK
PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK * PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK
PO_FX_COMPONENT_IDLE_STATE_CALLBACK * PPO_FX_COMPONENT_IDLE_STATE_CALLBACK
PO_FX_POWER_CONTROL_CALLBACK * PPO_FX_POWER_CONTROL_CALLBACK