POK(kernelpart)
arch.h
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
25 #ifndef __POK_ARCH_H__
26 #define __POK_ARCH_H__
27 
28 #include <types.h>
29 #include <errno.h>
30 
35 
40 
45 
50 
54 pok_ret_t pok_arch_event_register (uint8_t vector, void (*handler)(void));
55 
57  uint32_t stack_size,
58  uint32_t entry);
59 
60 void pok_context_switch (uint32_t* old_sp, uint32_t new_sp);
61 
63 
65 
66 void pok_dispatch_space (uint8_t partition_id,
67  uint32_t user_pc,
68  uint32_t user_sp,
69  uint32_t kernel_sp,
70  uint32_t arg1,
71  uint32_t arg2);
72 
77  uint32_t entry_rel,
78  uint32_t stack_rel,
79  uint32_t arg1,
80  uint32_t arg2);
81 
82 
83 void pok_space_context_restart (uint32_t sp, uint32_t entry, uint32_t user_stack);
84 
88 pok_ret_t pok_space_switch (uint8_t old_partition_id,
89  uint8_t new_partition_id);
90 
103 uint32_t pok_thread_stack_addr (const uint8_t partition_id,
104  const uint32_t local_thread_id);
105 
106 #ifdef POK_ARCH_PPC
107 #include <arch/ppc/spinlock.h>
108 #endif
109 
110 #ifdef POK_ARCH_X86
111 #include <arch/x86/spinlock.h>
112 #endif
113 
114 #ifdef POK_ARCH_SPARC
115 #include <arch/sparc/spinlock.h>
116 #endif
117 
118 #endif /* !__POK_ARCH_H__ */