forked from xt-sys/exectos
Initial support processor idle functionality
This commit is contained in:
parent
870a6680b0
commit
e81fb68357
@ -29,6 +29,7 @@ list(APPEND XTOSKRNL_SOURCE
|
|||||||
${XTOSKRNL_SOURCE_DIR}/ke/${ARCH}/proc.c
|
${XTOSKRNL_SOURCE_DIR}/ke/${ARCH}/proc.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/mm/kpools.c
|
${XTOSKRNL_SOURCE_DIR}/mm/kpools.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/mm/${ARCH}/pages.c
|
${XTOSKRNL_SOURCE_DIR}/mm/${ARCH}/pages.c
|
||||||
|
${XTOSKRNL_SOURCE_DIR}/po/idle.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/rtl/atomic.c
|
${XTOSKRNL_SOURCE_DIR}/rtl/atomic.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/rtl/byteswap.c
|
${XTOSKRNL_SOURCE_DIR}/rtl/byteswap.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/rtl/memory.c
|
${XTOSKRNL_SOURCE_DIR}/rtl/memory.c
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#define __XTOSKRNL_GLOBALS_H
|
#define __XTOSKRNL_GLOBALS_H
|
||||||
|
|
||||||
#include <xtos.h>
|
#include <xtos.h>
|
||||||
#include ARCH_HEADER(globals.h)
|
|
||||||
|
|
||||||
|
|
||||||
/* FrameBuffer information */
|
/* FrameBuffer information */
|
||||||
|
23
xtoskrnl/includes/popfuncs.h
Normal file
23
xtoskrnl/includes/popfuncs.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/includes/popfuncs.h
|
||||||
|
* DESCRIPTION: Private routine definitions for kernel power manager
|
||||||
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __XTOSKRNL_POPFUNCS_H
|
||||||
|
#define __XTOSKRNL_POPFUNCS_H
|
||||||
|
|
||||||
|
#include <xtos.h>
|
||||||
|
|
||||||
|
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
PoInitializeProcessorControlBlock(IN OUT PKPROCESSOR_CONTROL_BLOCK Prcb);
|
||||||
|
|
||||||
|
XTFASTCALL
|
||||||
|
VOID
|
||||||
|
PopIdle0Function(IN PPROCESSOR_POWER_STATE PowerState);
|
||||||
|
|
||||||
|
#endif /* __XTOSKRNL_POPFUNCS_H */
|
@ -13,6 +13,8 @@
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "arpfuncs.h"
|
#include "arpfuncs.h"
|
||||||
#include "kepfuncs.h"
|
#include "kepfuncs.h"
|
||||||
|
#include "popfuncs.h"
|
||||||
|
|
||||||
|
#include ARCH_HEADER(globals.h)
|
||||||
#include ARCH_HEADER(arpfuncs.h)
|
#include ARCH_HEADER(arpfuncs.h)
|
||||||
#include ARCH_HEADER(kepfuncs.h)
|
#include ARCH_HEADER(kepfuncs.h)
|
||||||
|
50
xtoskrnl/po/idle.c
Normal file
50
xtoskrnl/po/idle.c
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/po/idle.c
|
||||||
|
* DESCRIPTION: Processor idle functionality support
|
||||||
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xtos.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes Processor Control Block's (PRCB) power state structures.
|
||||||
|
*
|
||||||
|
* @param Prcb
|
||||||
|
* Supplies a pointer to the PRCB being initialized.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
PoInitializeProcessorControlBlock(IN OUT PKPROCESSOR_CONTROL_BLOCK Prcb)
|
||||||
|
{
|
||||||
|
RtlZeroMemory(&Prcb->PowerState, sizeof(Prcb->PowerState));
|
||||||
|
|
||||||
|
Prcb->PowerState.Idle0TimeLimit = 0xFFFFFFFF;
|
||||||
|
Prcb->PowerState.CurrentThrottle = 100;
|
||||||
|
Prcb->PowerState.IdleFunction = PopIdle0Function;
|
||||||
|
|
||||||
|
KeInitializeTimerEx(&Prcb->PowerState.PerfTimer, SynchronizationTimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processor idle loop routine.
|
||||||
|
*
|
||||||
|
* @param PowerState
|
||||||
|
* Supplies a pointer to the structere containing current processor power state.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTFASTCALL
|
||||||
|
VOID
|
||||||
|
PopIdle0Function(IN PPROCESSOR_POWER_STATE PowerState)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user