Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2406 → Rev 2407

/branches/arm/kernel/arch/arm32/src/arm32.c
30,6 → 30,7
* @{
*/
/** @file
* @brief ARM32 architecture specific functions.
*/
 
 
49,11 → 50,18
#include <arch/machine.h>
#include <userspace.h>
 
/** Information about loaded tasks. */
bootinfo_t bootinfo;
 
bootinfo_t bootinfo;
/** Temporary exception stack pointer.
*
* Temporary stack is used in exceptions handling routines
* before switching to thread's kernel stack.
*/
extern uintptr_t supervisor_sp;
 
 
/** Performs arm32 specific initialization before main_bsp() is called. */
void arch_pre_main(void)
{
int i;
67,7 → 75,7
}
 
 
/** Performs arm32 specific initialization before mm is initialized. */
void arch_pre_mm_init(void)
{
/* It is not assumed by default */
74,7 → 82,7
interrupts_disable();
}
 
 
/** Performs arm32 specific initialization afterr mm is initialized. */
void arch_post_mm_init(void)
{
machine_hw_map_init();
91,44 → 99,57
#endif
}
 
 
/** Performs arm32 specific tasks needed after cpu is initialized.
*
* Currently the function is empty.
*/
void arch_post_cpu_init(void)
{
}
 
 
/** Performs arm32 specific tasks needed before the multiprocessing is
* initialized.
*
* Currently the function is empty because SMP is not supported.
*/
void arch_pre_smp_init(void)
{
/* TODO */
}
 
 
/** Performs arm32 specific tasks needed after the multiprocessing is
* initialized.
*
* Currently the function is empty because SMP is not supported.
*/
void arch_post_smp_init(void)
{
/* TODO */
}
 
 
/** Perform arm32 specific tasks needed before the new task is run. */
/** Performs arm32 specific tasks needed before the new task is run. */
void before_task_runs_arch(void)
{
tlb_invalidate_all();
}
 
 
/** Perform arm32 specific tasks needed before the new thread is scheduled. */
/** Performs arm32 specific tasks needed before the new thread is scheduled.
*
* It sets supervisor_sp.
*/
void before_thread_runs_arch(void)
{
supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
}
 
 
/** Performs arm32 specific tasks before a thread stops running.
*
* Currently the function is empty.
*/
void after_thread_ran_arch(void)
{
}
 
 
 
/** Halts CPU. */
void cpu_halt(void)
{
machine_cpu_halt();