Finish PoInitializeProcessorControlBlock() routine implementation
This commit is contained in:
parent
aa17be6eb3
commit
783a4a2aa0
@ -21,4 +21,15 @@ XTFASTCALL
|
||||
VOID
|
||||
PopIdle0Function(IN PPROCESSOR_POWER_STATE PowerState);
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
PopPerfIdle(PPROCESSOR_POWER_STATE PowerState);
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
PopPerfIdleDpc(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2);
|
||||
|
||||
#endif /* __XTOSKRNL_PO_H */
|
||||
|
@ -23,12 +23,17 @@ XTAPI
|
||||
VOID
|
||||
PoInitializeProcessorControlBlock(IN OUT PKPROCESSOR_CONTROL_BLOCK Prcb)
|
||||
{
|
||||
/* Zero memory */
|
||||
RtlZeroMemory(&Prcb->PowerState, sizeof(Prcb->PowerState));
|
||||
|
||||
/* Initialize default power state */
|
||||
Prcb->PowerState.Idle0TimeLimit = 0xFFFFFFFF;
|
||||
Prcb->PowerState.CurrentThrottle = 100;
|
||||
Prcb->PowerState.IdleFunction = PopIdle0Function;
|
||||
|
||||
/* Initialize DPC and Timer */
|
||||
KeInitializeDpc(&Prcb->PowerState.PerfDpc, PopPerfIdleDpc, Prcb);
|
||||
KeSetTargetProcessorDpc(&Prcb->PowerState.PerfDpc, Prcb->Number);
|
||||
KeInitializeTimerEx(&Prcb->PowerState.PerfTimer, SynchronizationTimer);
|
||||
}
|
||||
|
||||
@ -48,3 +53,49 @@ PopIdle0Function(IN PPROCESSOR_POWER_STATE PowerState)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches CPU between different performance levels.
|
||||
*
|
||||
* @param PowerState
|
||||
* Supplies a pointer to the structure containing IDLE processor power state.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since NT 5.1
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
PopPerfIdle(PPROCESSOR_POWER_STATE PowerState)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if CPU is running at the maximum (performance) frequency.
|
||||
*
|
||||
* @param Dpc
|
||||
* Supplies a pointer to the DPC object.
|
||||
*
|
||||
* @param DeferredContext
|
||||
* Supplies a pointer to memory area containing current CPU's PRCB.
|
||||
*
|
||||
* @param SystemArgument1
|
||||
* Supplies a pointer to an unused system argument.
|
||||
*
|
||||
* @param SystemArgument2
|
||||
* Supplies a pointer to an unused system argument.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since NT 5.1
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
PopPerfIdleDpc(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user