POK(kernelpart)
|
Generic interface to handle architectures. More...
Go to the source code of this file.
Functions | |
pok_ret_t | pok_arch_init () |
pok_ret_t | pok_arch_preempt_disable () |
pok_ret_t | pok_arch_preempt_enable () |
pok_ret_t | pok_arch_idle () |
pok_ret_t | pok_arch_event_register (uint8_t vector, void(*handler)(void)) |
uint32_t | pok_context_create (uint32_t thread_id, uint32_t stack_size, uint32_t entry) |
void | pok_context_switch (uint32_t *old_sp, uint32_t new_sp) |
pok_ret_t | pok_create_space (uint8_t partition_id, uint32_t addr, uint32_t size) |
uint32_t | pok_space_base_vaddr (uint32_t addr) |
void | pok_dispatch_space (uint8_t partition_id, uint32_t user_pc, uint32_t user_sp, uint32_t kernel_sp, uint32_t arg1, uint32_t arg2) |
uint32_t | pok_space_context_create (uint8_t partition_id, uint32_t entry_rel, uint32_t stack_rel, uint32_t arg1, uint32_t arg2) |
void | pok_space_context_restart (uint32_t sp, uint32_t entry, uint32_t user_stack) |
pok_ret_t | pok_space_switch (uint8_t old_partition_id, uint8_t new_partition_id) |
uint32_t | pok_thread_stack_addr (const uint8_t partition_id, const uint32_t local_thread_id) |
Register an event (for example, an interruption)
Attach the handler to the given trap number (vector).
pok_ret_t pok_arch_idle | ( | ) |
Function that do nothing. Useful for the idle task for example.
pok_ret_t pok_arch_init | ( | ) |
Function that initializes architecture concerns.
Initialize all SPARC managers (traps, syscalls, space).
pok_ret_t pok_arch_preempt_disable | ( | ) |
Disable interruptions
pok_ret_t pok_arch_preempt_enable | ( | ) |
Enable interruptions
void pok_dispatch_space | ( | uint8_t | partition_id, |
uint32_t | user_pc, | ||
uint32_t | user_sp, | ||
uint32_t | kernel_sp, | ||
uint32_t | arg1, | ||
uint32_t | arg2 | ||
) |
Definition at line 114 of file space.c.
Definition at line 64 of file space.c.
uint32_t pok_space_context_create | ( | uint8_t | id, |
uint32_t | entry_rel, | ||
uint32_t | stack_rel, | ||
uint32_t | arg1, | ||
uint32_t | arg2 | ||
) |
Create a new context in the given space
Initilize thread stack.
Definition at line 72 of file space.c.
Switch from one space to another
Switch adress space in MMU (context register).
Definition at line 55 of file space.c.
Returns the stack address for a the thread number N in a partition.
Compute the stack adress for the given thread.
Definition at line 92 of file arch.c.