ReactOS  0.4.15-dev-2947-g59e1b78
FxPowerPolicyOwnerSettings Struct Reference

#include <fxpowerpolicystatemachine.hpp>

Inheritance diagram for FxPowerPolicyOwnerSettings:
Collaboration diagram for FxPowerPolicyOwnerSettings:

Public Member Functions

 FxPowerPolicyOwnerSettings (__in FxPkgPnp *PkgPnp)
 
 ~FxPowerPolicyOwnerSettings (VOID)
 
_Must_inspect_result_ NTSTATUS Init (VOID)
 
VOID CleanupPowerCallback (VOID)
 
VOID IncrementChildrenArmedForWakeCount (VOID)
 
VOID DecrementChildrenArmedForWakeCount (VOID)
 
- Public Member Functions inherited from FxStump
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in POOL_TYPE PoolType)
 
VOID operator delete (__in PVOID pointer)
 
PVOID operator new[] (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
VOID operator delete[] (__in PVOID pointer)
 

Public Attributes

friend FxPowerPolicyMachine
 
FxPowerIdleMachine m_PowerIdleMachine
 
FxPoxInterface m_PoxInterface
 
FxPowerDeviceArmWakeFromS0 m_DeviceArmWakeFromS0
 
FxPowerDeviceArmWakeFromSx m_DeviceArmWakeFromSx
 
FxPowerDeviceDisarmWakeFromS0 m_DeviceDisarmWakeFromS0
 
FxPowerDeviceDisarmWakeFromSx m_DeviceDisarmWakeFromSx
 
FxPowerDeviceWakeFromS0Triggered m_DeviceWakeFromS0Triggered
 
FxPowerDeviceWakeFromSxTriggered m_DeviceWakeFromSxTriggered
 
FxUsbIdleInfom_UsbIdle
 
FxPkgPnpm_PkgPnp
 
WakePolicySettings m_WakeSettings
 
IdlePolicySettings m_IdleSettings
 
ULONG m_SystemToDeviceStateMap
 
ULONG m_ChildrenPoweredOnCount
 
LONG m_ChildrenArmedCount
 
NTSTATUS m_WaitWakeStatus
 
BYTE m_IdealDxStateForSx
 
BOOLEAN m_RequestedPowerUpIrp
 
BOOLEAN m_RequestedPowerDownIrp
 
BOOLEAN m_RequestedWaitWakeIrp
 
BOOLEAN m_WakeCompletionEventDropped
 
BOOLEAN m_PowerFailed
 
BOOLEAN m_CanSaveState
 
BOOLEAN m_ChildrenCanPowerUp
 
BOOLEAN m_SystemWakeSource
 

Protected Attributes

PCALLBACK_OBJECT m_PowerCallbackObject
 
PVOID m_PowerCallbackRegistration
 
LONG m_WaitWakeCancelCompletionOwnership
 

Static Protected Attributes

static MdCallbackFunctionType _PowerStateCallback
 

Additional Inherited Members

- Protected Member Functions inherited from FxStump
 FxStump (VOID)
 

Detailed Description

Definition at line 550 of file fxpowerpolicystatemachine.hpp.

Constructor & Destructor Documentation

◆ FxPowerPolicyOwnerSettings()

FxPowerPolicyOwnerSettings::FxPowerPolicyOwnerSettings ( __in FxPkgPnp PkgPnp)

Definition at line 2607 of file powerpolicystatemachine.cpp.

2609  : m_PoxInterface(PkgPnp)
2610 {
2611  ULONG i;
2612 
2613  m_UsbIdle = NULL;
2614 
2615  m_PkgPnp = PkgPnp;
2616 
2617  //
2618  // Default every state to D3 except for system working which is D0 by
2619  // default.
2620  //
2622 
2623  for (i = 0; i < PowerSystemMaximum; i++) {
2626  : PowerDeviceD3,
2628  }
2629 
2631 
2636  m_PowerFailed = FALSE;
2637  m_CanSaveState = TRUE;
2638 
2642 
2646 
2649 }
return STATUS_NOT_SUPPORTED
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
static VOID _SetPowerCapState(__in ULONG Index, __in DEVICE_POWER_STATE State, __out PULONG Result)
Definition: fxpkgpnp.cpp:5616

◆ ~FxPowerPolicyOwnerSettings()

FxPowerPolicyOwnerSettings::~FxPowerPolicyOwnerSettings ( VOID  )

Definition at line 2651 of file powerpolicystatemachine.cpp.

2654 {
2655  //
2656  // There are paths which cleanup this object which do not go through the
2657  // pnp state machine, so make sure the power object callback fields are
2658  // freed. In these paths, we are guaranteed PASSIVE_LEVEL b/c there will
2659  // be no dangling references which can cause deletion at a greater IRQL.
2660  //
2662 
2663  if (m_UsbIdle != NULL) {
2664  delete m_UsbIdle;
2665  m_UsbIdle = NULL;
2666  }
2667 }
#define NULL
Definition: types.h:112

Member Function Documentation

◆ CleanupPowerCallback()

VOID FxPowerPolicyOwnerSettings::CleanupPowerCallback ( VOID  )

Definition at line 2670 of file powerpolicystatemachine.cpp.

2685 {
2689 
2690  }
2691 
2692  if (m_PowerCallbackObject != NULL) {
2695  }
2696 }
static __inline VOID UnregisterCallback(__in PVOID CbRegistration)
Definition: mxgeneralkm.h:348
#define NULL
Definition: types.h:112
static __inline VOID MxDereferenceObject(__in PVOID Object)
Definition: mxgeneralkm.h:247

Referenced by FxPkgPnp::CleanupStateMachines(), and ~FxPowerPolicyOwnerSettings().

◆ DecrementChildrenArmedForWakeCount()

VOID FxPowerPolicyOwnerSettings::DecrementChildrenArmedForWakeCount ( VOID  )
inline

Definition at line 583 of file fxpowerpolicystatemachine.hpp.

586  {
588  }
#define InterlockedDecrement
Definition: armddk.h:52

◆ IncrementChildrenArmedForWakeCount()

VOID FxPowerPolicyOwnerSettings::IncrementChildrenArmedForWakeCount ( VOID  )
inline

Definition at line 575 of file fxpowerpolicystatemachine.hpp.

578  {
580  }
#define InterlockedIncrement
Definition: armddk.h:53

◆ Init()

_Must_inspect_result_ NTSTATUS FxPowerPolicyOwnerSettings::Init ( VOID  )

Definition at line 2700 of file powerpolicystatemachine.cpp.

2719 {
2720  OBJECT_ATTRIBUTES oa;
2722  NTSTATUS status;
2723 
2724  RtlInitUnicodeString(&string, L"\\Callback\\PowerState");
2726  &oa,
2727  &string,
2729  NULL,
2730  NULL
2731  );
2732 
2733  //
2734  // Create a callback object, but we do not want to be the first ones
2735  // to create it (it should be created way before we load in NTOS
2736  // anyways)
2737  //
2739 
2740  if (NT_SUCCESS(status)) {
2744  this
2745  );
2746 
2748  //
2749  // Non-critical failure, so we'll free the callback object and keep
2750  // going
2751  //
2754  }
2755  }
2756 
2757  //
2758  // Initialize FxPowerIdleMachine
2759  //
2761  if (!NT_SUCCESS(status)) {
2762  return status;
2763  }
2764 
2765  return status;
2766 }
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
#define FALSE
Definition: types.h:117
static __inline PVOID RegisterCallback(__in PCALLBACK_OBJECT CallbackObject, __in MdCallbackFunction CallbackFunction, __in PVOID CallbackContext)
Definition: mxgeneralkm.h:334
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static const WCHAR L[]
Definition: oid.c:1250
char string[160]
Definition: util.h:11
static MdCallbackFunctionType _PowerStateCallback
#define NULL
Definition: types.h:112
static __inline NTSTATUS CreateCallback(__out PCALLBACK_OBJECT *CallbackObject, __in POBJECT_ATTRIBUTES ObjectAttributes, __in BOOLEAN Create, __in BOOLEAN AllowMultipleCallbacks)
Definition: mxgeneralkm.h:318
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
_Must_inspect_result_ NTSTATUS Init(VOID)
static __inline VOID MxDereferenceObject(__in PVOID Object)
Definition: mxgeneralkm.h:247
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by FxPkgPnp::Initialize().

Member Data Documentation

◆ _PowerStateCallback

VOID FxPowerPolicyOwnerSettings::_PowerStateCallback
staticprotected

Definition at line 593 of file fxpowerpolicystatemachine.hpp.

Referenced by Init().

◆ FxPowerPolicyMachine

friend FxPowerPolicyOwnerSettings::FxPowerPolicyMachine

Definition at line 552 of file fxpowerpolicystatemachine.hpp.

◆ m_CanSaveState

BOOLEAN FxPowerPolicyOwnerSettings::m_CanSaveState

◆ m_ChildrenArmedCount

◆ m_ChildrenCanPowerUp

◆ m_ChildrenPoweredOnCount

◆ m_DeviceArmWakeFromS0

FxPowerDeviceArmWakeFromS0 FxPowerPolicyOwnerSettings::m_DeviceArmWakeFromS0

◆ m_DeviceArmWakeFromSx

FxPowerDeviceArmWakeFromSx FxPowerPolicyOwnerSettings::m_DeviceArmWakeFromSx

◆ m_DeviceDisarmWakeFromS0

FxPowerDeviceDisarmWakeFromS0 FxPowerPolicyOwnerSettings::m_DeviceDisarmWakeFromS0

◆ m_DeviceDisarmWakeFromSx

FxPowerDeviceDisarmWakeFromSx FxPowerPolicyOwnerSettings::m_DeviceDisarmWakeFromSx

◆ m_DeviceWakeFromS0Triggered

FxPowerDeviceWakeFromS0Triggered FxPowerPolicyOwnerSettings::m_DeviceWakeFromS0Triggered

◆ m_DeviceWakeFromSxTriggered

FxPowerDeviceWakeFromSxTriggered FxPowerPolicyOwnerSettings::m_DeviceWakeFromSxTriggered

◆ m_IdealDxStateForSx

BYTE FxPowerPolicyOwnerSettings::m_IdealDxStateForSx

◆ m_IdleSettings

◆ m_PkgPnp

FxPkgPnp* FxPowerPolicyOwnerSettings::m_PkgPnp

◆ m_PowerCallbackObject

PCALLBACK_OBJECT FxPowerPolicyOwnerSettings::m_PowerCallbackObject
protected

◆ m_PowerCallbackRegistration

PVOID FxPowerPolicyOwnerSettings::m_PowerCallbackRegistration
protected

◆ m_PowerFailed

BOOLEAN FxPowerPolicyOwnerSettings::m_PowerFailed

Definition at line 669 of file fxpowerpolicystatemachine.hpp.

Referenced by FxPowerPolicyOwnerSettings().

◆ m_PowerIdleMachine

◆ m_PoxInterface

FxPoxInterface FxPowerPolicyOwnerSettings::m_PoxInterface

◆ m_RequestedPowerDownIrp

◆ m_RequestedPowerUpIrp

◆ m_RequestedWaitWakeIrp

BOOLEAN FxPowerPolicyOwnerSettings::m_RequestedWaitWakeIrp

◆ m_SystemToDeviceStateMap

ULONG FxPowerPolicyOwnerSettings::m_SystemToDeviceStateMap

◆ m_SystemWakeSource

◆ m_UsbIdle

◆ m_WaitWakeCancelCompletionOwnership

LONG FxPowerPolicyOwnerSettings::m_WaitWakeCancelCompletionOwnership
protected

◆ m_WaitWakeStatus

NTSTATUS FxPowerPolicyOwnerSettings::m_WaitWakeStatus

◆ m_WakeCompletionEventDropped

BOOLEAN FxPowerPolicyOwnerSettings::m_WakeCompletionEventDropped

◆ m_WakeSettings


The documentation for this struct was generated from the following files: