Add I/O, power, and configuration manager type definitions
This commit is contained in:
135
sdk/xtdk/cmtypes.h
Normal file
135
sdk/xtdk/cmtypes.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: sdk/xtdk/cmtypes.h
|
||||
* DESCRIPTION: Configuration Manager structures definitions
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __XTDK_CMTYPES_H
|
||||
#define __XTDK_CMTYPES_H
|
||||
|
||||
#include <xttypes.h>
|
||||
#include <xtstruct.h>
|
||||
#include <mmtypes.h>
|
||||
|
||||
|
||||
/* C/C++ specific code */
|
||||
#ifndef __XTOS_ASSEMBLER__
|
||||
|
||||
/* Partial resource descriptor */
|
||||
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
|
||||
{
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
USHORT Flags;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Generic;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Port;
|
||||
struct
|
||||
{
|
||||
USHORT Level;
|
||||
USHORT Group;
|
||||
ULONG Vector;
|
||||
PKAFFINITY_MAP Affinity;
|
||||
} Interrupt;
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
USHORT Group;
|
||||
USHORT MessageCount;
|
||||
ULONG Vector;
|
||||
PKAFFINITY_MAP Affinity;
|
||||
} Raw;
|
||||
struct
|
||||
{
|
||||
USHORT Level;
|
||||
USHORT Group;
|
||||
ULONG Vector;
|
||||
PKAFFINITY_MAP Affinity;
|
||||
} Translated;
|
||||
};
|
||||
} MessageInterrupt;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Memory;
|
||||
struct
|
||||
{
|
||||
ULONG Channel;
|
||||
ULONG Port;
|
||||
ULONG Reserved1;
|
||||
} Dma;
|
||||
struct
|
||||
{
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct
|
||||
{
|
||||
ULONG Start;
|
||||
ULONG Length;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct
|
||||
{
|
||||
ULONG DataSize;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} DeviceSpecificData;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length40;
|
||||
} Memory40;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length48;
|
||||
} Memory48;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length64;
|
||||
} Memory64;
|
||||
} u;
|
||||
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
|
||||
|
||||
/* Partial resource list */
|
||||
typedef struct _CM_PARTIAL_RESOURCE_LIST
|
||||
{
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
|
||||
} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
|
||||
|
||||
/* Full resource descriptor */
|
||||
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
|
||||
{
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
|
||||
} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
|
||||
|
||||
/* Full resource list */
|
||||
typedef struct _CM_RESOURCE_LIST
|
||||
{
|
||||
ULONG Count;
|
||||
CM_FULL_RESOURCE_DESCRIPTOR List[1];
|
||||
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
|
||||
|
||||
#endif /* __XTOS_ASSEMBLER__ */
|
||||
#endif /* __XTDK_CMTYPES_H */
|
||||
@@ -215,6 +215,30 @@ typedef ULONG (XTAPI *PHALP_QUERY_TIME_DELTA)(VOID);
|
||||
typedef ULONG (XTAPI *PHALP_SET_CLOCK_RATE)(IN ULONG Increment);
|
||||
typedef VOID (XTAPI *PHALP_STALL_EXECUTION)(IN ULONG MicroSeconds);
|
||||
|
||||
/* Interface types */
|
||||
typedef enum _INTERFACE_TYPE
|
||||
{
|
||||
InterfaceTypeUndefined = -1,
|
||||
Internal,
|
||||
Isa,
|
||||
Eisa,
|
||||
MicroChannel,
|
||||
TurboChannel,
|
||||
PCIBus,
|
||||
VMEBus,
|
||||
NuBus,
|
||||
PCMCIABus,
|
||||
CBus,
|
||||
MPIBus,
|
||||
MPSABus,
|
||||
ProcessorInternal,
|
||||
InternalPowerBus,
|
||||
PNPISABus,
|
||||
PNPBus,
|
||||
Vmcs,
|
||||
MaximumInterfaceType
|
||||
} INTERFACE_TYPE, *PINTERFACE_TYPE;
|
||||
|
||||
/* Generic Address structure */
|
||||
typedef struct _GENERIC_ADDRESS
|
||||
{
|
||||
|
||||
1031
sdk/xtdk/iotypes.h
1031
sdk/xtdk/iotypes.h
File diff suppressed because it is too large
Load Diff
@@ -12,8 +12,6 @@
|
||||
#include <xttypes.h>
|
||||
#include <xtstruct.h>
|
||||
#include <iotypes.h>
|
||||
#include <ketypes.h>
|
||||
#include <setypes.h>
|
||||
|
||||
|
||||
/* C/C++ specific code */
|
||||
|
||||
@@ -110,14 +110,18 @@ typedef enum _MMSYSTEM_PTE_POOL_TYPE
|
||||
MaximumPtePoolTypes
|
||||
} MMSYSTEM_PTE_POOL_TYPE, *PMMSYSTEM_PTE_POOL_TYPE;
|
||||
|
||||
/* Page map routines structure definition */
|
||||
typedef CONST STRUCT _CMMPAGEMAP_ROUTINES
|
||||
/* Memory Descriptor List structure definition */
|
||||
typedef struct _MDL
|
||||
{
|
||||
VOID (XTAPI *ClearPte)(PHARDWARE_PTE PtePointer);
|
||||
BOOLEAN (XTAPI *PteValid)(PHARDWARE_PTE PtePointer);
|
||||
VOID (XTAPI *SetPteCaching)(PHARDWARE_PTE PtePointer, BOOLEAN CacheDisable, BOOLEAN WriteThrough);
|
||||
VOID (XTAPI *SetPte)(PHARDWARE_PTE PtePointer, PFN_NUMBER PageFrameNumber, BOOLEAN Writable);
|
||||
} CMMPAGEMAP_ROUTINES, *PCMMPAGEMAP_ROUTINES;
|
||||
PMDL Next;
|
||||
CSHORT Size;
|
||||
CSHORT MdlFlags;
|
||||
PEPROCESS Process;
|
||||
PVOID MappedSystemVa;
|
||||
PVOID StartVa;
|
||||
ULONG ByteCount;
|
||||
ULONG ByteOffset;
|
||||
} MDL, *PMDL;
|
||||
|
||||
/* Color tables structure definition */
|
||||
typedef struct _MMCOLOR_TABLES
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -10,19 +10,56 @@
|
||||
#define __XTDK_PSTYPES_H
|
||||
|
||||
#include <xttypes.h>
|
||||
#include <ketypes.h>
|
||||
#include <xtstruct.h>
|
||||
#include <extypes.h>
|
||||
|
||||
|
||||
/* Quota bypass marker */
|
||||
#define PS_QUOTA_BYPASS_MARKER ((PEPROCESS_QUOTA_BLOCK)1)
|
||||
|
||||
/* C/C++ specific code */
|
||||
#ifndef __XTOS_ASSEMBLER__
|
||||
|
||||
/* Process quota types */
|
||||
typedef enum _PS_QUOTA_TYPE
|
||||
{
|
||||
PsNonPagedPool,
|
||||
PsPagedPool,
|
||||
PsPageFile,
|
||||
PsQuotaTypes
|
||||
} PS_QUOTA_TYPE, *PPS_QUOTA_TYPE;
|
||||
|
||||
/* Kernel's representation of a process object */
|
||||
typedef struct _EPROCESS
|
||||
{
|
||||
KPROCESS ProcessControlBlock;
|
||||
KPUSH_LOCK ProcessLock;
|
||||
LARGE_INTEGER CreateTime;
|
||||
LARGE_INTEGER ExitTime;
|
||||
EX_RUNDOWN_REFERENCE RundownProtect;
|
||||
HANDLE UniqueProcessId;
|
||||
SIZE_T QuotaUsage[PsQuotaTypes];
|
||||
UINT Reserved0;
|
||||
} EPROCESS, *PEPROCESS;
|
||||
|
||||
/* Kernel's representation of a process quota entry*/
|
||||
typedef struct _EPROCESS_QUOTA_ENTRY
|
||||
{
|
||||
SIZE_T Usage;
|
||||
SIZE_T Limit;
|
||||
SIZE_T Peak;
|
||||
SIZE_T Return;
|
||||
} EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
|
||||
|
||||
/* Kernel's representation of a process quota block */
|
||||
typedef struct _EPROCESS_QUOTA_BLOCK
|
||||
{
|
||||
EPROCESS_QUOTA_ENTRY QuotaEntry[PsQuotaTypes];
|
||||
LIST_ENTRY QuotaList;
|
||||
ULONG ReferenceCount;
|
||||
ULONG ProcessCount;
|
||||
} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
|
||||
|
||||
/* Kernel's representation of a thread object */
|
||||
typedef struct _ETHREAD
|
||||
{
|
||||
|
||||
@@ -85,6 +85,18 @@
|
||||
typedef XTSTATUS (*PWRITE_CHARACTER)(IN CHAR Character);
|
||||
typedef XTSTATUS (*PWRITE_WIDE_CHARACTER)(IN WCHAR Character);
|
||||
|
||||
/* Compressed data information structure definition */
|
||||
typedef struct _COMPRESSED_DATA_INFO
|
||||
{
|
||||
USHORT CompressionFormatAndEngine;
|
||||
UCHAR CompressionUnitShift;
|
||||
UCHAR ChunkShift;
|
||||
UCHAR ClusterShift;
|
||||
UCHAR Reserved;
|
||||
USHORT NumberOfChunks;
|
||||
ULONG CompressedChunkSizes[1];
|
||||
} COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
|
||||
|
||||
/* Code page table structure definition */
|
||||
typedef struct _CPTABLE_INFO
|
||||
{
|
||||
|
||||
@@ -112,6 +112,21 @@ typedef struct _PRIVILEGE_SET
|
||||
LUID_AND_ATTRIBUTES Privilege[1];
|
||||
} PRIVILEGE_SET, *PPRIVILEGE_SET;
|
||||
|
||||
/* Identifier authority structure definition */
|
||||
typedef struct _SID_IDENTIFIER_AUTHORITY
|
||||
{
|
||||
UCHAR Value[6];
|
||||
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
|
||||
|
||||
/* Security identifier structure definition */
|
||||
typedef struct _SID
|
||||
{
|
||||
UCHAR Revision;
|
||||
UCHAR SubAuthorityCount;
|
||||
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
|
||||
ULONG SubAuthority[1];
|
||||
} SID, *PSID;
|
||||
|
||||
/* Token source structure definition */
|
||||
typedef struct _TOKEN_SOURCE
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
/* Access mask */
|
||||
typedef ULONG ACCESS_MASK, *PACCESS_MASK;
|
||||
|
||||
/* Access token */
|
||||
typedef PVOID PACCESS_TOKEN;
|
||||
/* Device type */
|
||||
typedef ULONG DEVICE_TYPE;
|
||||
|
||||
/* Kernel affinity */
|
||||
typedef ULONG_PTR KAFFINITY, *PKAFFINITY;
|
||||
@@ -38,6 +38,12 @@ typedef UCHAR KRUNLEVEL, *PKRUNLEVEL;
|
||||
/* Spin locks synchronization mechanism */
|
||||
typedef ULONG_PTR KSPIN_LOCK, *PKSPIN_LOCK;
|
||||
|
||||
/* Locale identifier */
|
||||
typedef ULONG LCID;
|
||||
|
||||
/* Access token */
|
||||
typedef PVOID PACCESS_TOKEN;
|
||||
|
||||
/* Page Frame Number count */
|
||||
typedef ULONG PFN_COUNT;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <xtuefi.h>
|
||||
|
||||
/* Low level data types headers */
|
||||
#include <cmtypes.h>
|
||||
#include <extypes.h>
|
||||
#include <hltypes.h>
|
||||
#include <iotypes.h>
|
||||
|
||||
Reference in New Issue
Block a user