|
POK(kernelpart)
|
Provide generic architecture access for PPC architecture. More...
Go to the source code of this file.
Functions | |
| void | pok_arch_space_init (void) |
| 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_thread_stack_addr (const uint8_t partition_id, const uint32_t local_thread_id) |
| pok_ret_t pok_arch_event_register | ( | uint8_t | vector, |
| void(*)(void) | handler | ||
| ) |
Register an event (for example, an interruption)
Definition at line 83 of file arch.c.
{
(void) vector;
(void) handler;
return (POK_ERRNO_OK);
}
Function that do nothing. Useful for the idle task for example.
Definition at line 74 of file arch.c.
{
while (1)
{
}
return (POK_ERRNO_OK);
}
Function that initializes architecture concerns.
Definition at line 43 of file arch.c.
{
set_msr (MSR_IP);
#if POK_NEEDS_PARTITIONS
pok_arch_space_init();
#endif
return (POK_ERRNO_OK);
}
Disable interruptions
Definition at line 53 of file arch.c.
{
unsigned int msr;
msr = get_msr();
msr &= ~MSR_EE;
set_msr(msr);
return (POK_ERRNO_OK);
}
Enable interruptions
Definition at line 63 of file arch.c.
{
unsigned int msr;
msr = get_msr();
msr |= MSR_EE;
set_msr(msr);
return (POK_ERRNO_OK);
}
| void pok_arch_space_init | ( | void | ) |
| uint32_t pok_thread_stack_addr | ( | const uint8_t | partition_id, |
| const uint32_t | local_thread_id | ||
| ) |
Returns the stack address for a the thread number N in a partition.
Definition at line 92 of file arch.c.
{
return pok_partitions[partition_id].size - 16 - (local_thread_id * POK_USER_STACK_SIZE);
}