Add I/O, power, and configuration manager type definitions
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after 22s
Builds / ExectOS (amd64, release) (push) Failing after 35s
Builds / ExectOS (i686, release) (push) Failing after 24s
Builds / ExectOS (i686, debug) (push) Failing after 32s

This commit is contained in:
2026-07-03 21:43:02 +02:00
parent 46fb492032
commit 9fcd81a507
11 changed files with 1341 additions and 15 deletions

View File

@@ -25,6 +25,56 @@
typedef VOID (XTFASTCALL *PPROCESSOR_IDLE_FUNCTION)(IN PPROCESSOR_POWER_STATE PowerState);
typedef XTSTATUS (XTFASTCALL *PSET_PROCESSOR_THROTTLE)(IN UCHAR Throttle);
/* Device power states */
typedef enum _DEVICE_POWER_STATE
{
PowerDeviceUnspecified = 0,
PowerDeviceD0,
PowerDeviceD1,
PowerDeviceD2,
PowerDeviceD3,
PowerDeviceMaximum
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
/* Power actions list */
typedef enum _POWER_ACTION
{
PowerActionNone = 0,
PowerActionReserved,
PowerActionSleep,
PowerActionHibernate,
PowerActionShutdown,
PowerActionShutdownReset,
PowerActionShutdownOff,
PowerActionWarmEject
} POWER_ACTION, *PPOWER_ACTION;
typedef enum _POWER_STATE_TYPE
{
SystemPowerState = 0,
DevicePowerState
} POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
/* System power states */
typedef enum _SYSTEM_POWER_STATE
{
PowerSystemUnspecified = 0,
PowerSystemWorking,
PowerSystemSleeping1,
PowerSystemSleeping2,
PowerSystemSleeping3,
PowerSystemHibernate,
PowerSystemShutdown,
PowerSystemMaximum
} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
/* Power state union definition */
typedef union _POWER_STATE
{
SYSTEM_POWER_STATE SystemState;
DEVICE_POWER_STATE DeviceState;
} POWER_STATE, *PPOWER_STATE;
/* Processor IDLE times structure definition */
typedef struct _PROCESSOR_IDLE_TIMES
{
@@ -95,5 +145,24 @@ typedef struct _PROCESSOR_POWER_STATE
ULONG LastC3UserTime;
} PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
/* System power state context structure definition */
typedef struct _SYSTEM_POWER_STATE_CONTEXT
{
union
{
struct
{
ULONG Reserved1:8;
ULONG TargetSystemState:4;
ULONG EffectiveSystemState:4;
ULONG CurrentSystemState:4;
ULONG IgnoreHibernationPath:1;
ULONG PseudoTransition:1;
ULONG Reserved2:10;
};
ULONG ContextAsUlong;
};
} SYSTEM_POWER_STATE_CONTEXT, *PSYSTEM_POWER_STATE_CONTEXT;
#endif /* __XTOS_ASSEMBLER__ */
#endif /* __XTDK_POTYPES_H */