Update PoInitializeProcessorControlBlock() routine and corresponding structures
This commit is contained in:
parent
c34b6ff6c1
commit
eeeb9d6ed7
|
@ -15,16 +15,77 @@
|
||||||
|
|
||||||
|
|
||||||
/* Power Manager routine callbacks */
|
/* Power Manager routine callbacks */
|
||||||
typedef VOID (XTFASTCALL *PPROCESSOR_IDLE_FUNCTION)(PPROCESSOR_POWER_STATE PowerState);
|
typedef VOID (XTFASTCALL *PPROCESSOR_IDLE_FUNCTION)(IN PPROCESSOR_POWER_STATE PowerState);
|
||||||
|
typedef XTSTATUS (XTFASTCALL *PSET_PROCESSOR_THROTTLE)(IN UCHAR Throttle);
|
||||||
|
|
||||||
|
/* Processor IDLE times structure definition */
|
||||||
|
typedef struct _PROCESSOR_IDLE_TIMES
|
||||||
|
{
|
||||||
|
ULONGLONG StartTime;
|
||||||
|
ULONGLONG EndTime;
|
||||||
|
ULONG IdleHandlerReserved[4];
|
||||||
|
} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
|
||||||
|
|
||||||
|
/* Processor performance state structure definition */
|
||||||
|
typedef struct _PROCESSOR_PERF_STATE
|
||||||
|
{
|
||||||
|
UCHAR PercentFrequency;
|
||||||
|
UCHAR MinCapacity;
|
||||||
|
USHORT Power;
|
||||||
|
UCHAR IncreaseLevel;
|
||||||
|
UCHAR DecreaseLevel;
|
||||||
|
USHORT Flags;
|
||||||
|
ULONG IncreaseTime;
|
||||||
|
ULONG DecreaseTime;
|
||||||
|
ULONG IncreaseCount;
|
||||||
|
ULONG DecreaseCount;
|
||||||
|
ULONGLONG PerformanceTime;
|
||||||
|
} PROCESSOR_PERF_STATE, *PPROCESSOR_PERF_STATE;
|
||||||
|
|
||||||
/* Processor power state structure definition */
|
/* Processor power state structure definition */
|
||||||
typedef struct _PROCESSOR_POWER_STATE
|
typedef struct _PROCESSOR_POWER_STATE
|
||||||
{
|
{
|
||||||
PPROCESSOR_IDLE_FUNCTION IdleFunction;
|
PPROCESSOR_IDLE_FUNCTION IdleFunction;
|
||||||
ULONG Idle0TimeLimit;
|
ULONG Idle0TimeLimit;
|
||||||
|
ULONG Idle0LastTime;
|
||||||
|
PVOID IdleHandlers;
|
||||||
|
PVOID IdleState;
|
||||||
|
ULONG IdleHandlersCount;
|
||||||
|
ULONGLONG LastCheck;
|
||||||
|
PROCESSOR_IDLE_TIMES IdleTimes;
|
||||||
|
ULONG IdleTime1;
|
||||||
|
ULONG PromotionCheck;
|
||||||
|
ULONG IdleTime2;
|
||||||
UCHAR CurrentThrottle;
|
UCHAR CurrentThrottle;
|
||||||
|
UCHAR ThermalThrottleLimit;
|
||||||
|
UCHAR CurrentThrottleIndex;
|
||||||
|
UCHAR ThermalThrottleIndex;
|
||||||
|
ULONG PerfSystemTime;
|
||||||
|
ULONG PerfIdleTime;
|
||||||
|
ULONG LastSysTime;
|
||||||
|
ULONGLONG TotalIdleStateTime[3];
|
||||||
|
ULONG TotalIdleTransitions[3];
|
||||||
|
ULONGLONG PreviousC3StateTime;
|
||||||
|
UCHAR KneeThrottleIndex;
|
||||||
|
UCHAR ThrottleLimitIndex;
|
||||||
|
UCHAR PerfStatesCount;
|
||||||
|
UCHAR ProcessorMinThrottle;
|
||||||
|
UCHAR ProcessorMaxThrottle;
|
||||||
|
UCHAR LastBusyPercentage;
|
||||||
|
UCHAR LastC3Percentage;
|
||||||
|
UCHAR LastAdjustedBusyPercentage;
|
||||||
|
ULONG PromotionCount;
|
||||||
|
ULONG DemotionCount;
|
||||||
|
ULONG ErrorCount;
|
||||||
|
ULONG RetryCount;
|
||||||
|
ULONG Flags;
|
||||||
|
LARGE_INTEGER PerfCounterFrequency;
|
||||||
|
ULONG PerfTickCount;
|
||||||
KTIMER PerfTimer;
|
KTIMER PerfTimer;
|
||||||
KDPC PerfDpc;
|
KDPC PerfDpc;
|
||||||
|
PPROCESSOR_PERF_STATE PerfStates;
|
||||||
|
PSET_PROCESSOR_THROTTLE PerfSetThrottle;
|
||||||
|
ULONG LastC3UserTime;
|
||||||
} PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
|
} PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
|
||||||
|
|
||||||
#endif /* __XTDK_POTYPES_H */
|
#endif /* __XTDK_POTYPES_H */
|
||||||
|
|
|
@ -29,6 +29,7 @@ PoInitializeProcessorControlBlock(IN OUT PKPROCESSOR_CONTROL_BLOCK Prcb)
|
||||||
/* Initialize default power state */
|
/* Initialize default power state */
|
||||||
Prcb->PowerState.Idle0TimeLimit = 0xFFFFFFFF;
|
Prcb->PowerState.Idle0TimeLimit = 0xFFFFFFFF;
|
||||||
Prcb->PowerState.CurrentThrottle = 100;
|
Prcb->PowerState.CurrentThrottle = 100;
|
||||||
|
Prcb->PowerState.CurrentThrottleIndex = 0;
|
||||||
Prcb->PowerState.IdleFunction = PopIdle0Function;
|
Prcb->PowerState.IdleFunction = PopIdle0Function;
|
||||||
|
|
||||||
/* Initialize DPC and Timer */
|
/* Initialize DPC and Timer */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user