Rev 2290 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2290 | Rev 2294 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | #include <arch/debug_print/print.h> |
45 | #include <arch/debug_print/print.h> |
46 | #include <print.h> |
46 | #include <print.h> |
47 | #include <config.h> |
47 | #include <config.h> |
48 | #include <interrupt.h> |
48 | #include <interrupt.h> |
49 | #include <arch/regutils.h> |
49 | #include <arch/regutils.h> |
50 | #include <arch/drivers/gxemul.h> |
50 | #include <arch/machine.h> |
51 | #include <userspace.h> |
51 | #include <userspace.h> |
52 | 52 | ||
53 | bootinfo_t bootinfo; |
53 | bootinfo_t bootinfo; |
54 | // // uintptr_t supervisor_sp /*__attribute__ ((section (".text")))*/; |
54 | // // uintptr_t supervisor_sp /*__attribute__ ((section (".text")))*/; |
55 | extern uintptr_t supervisor_sp; |
55 | extern uintptr_t supervisor_sp; |
Line 96... | Line 96... | ||
96 | 96 | ||
97 | for (i = 0; i < bootinfo.cnt; ++i) { |
97 | for (i = 0; i < bootinfo.cnt; ++i) { |
98 | init.tasks[i].addr = bootinfo.tasks[i].addr; |
98 | init.tasks[i].addr = bootinfo.tasks[i].addr; |
99 | init.tasks[i].size = bootinfo.tasks[i].size; |
99 | init.tasks[i].size = bootinfo.tasks[i].size; |
100 | } |
100 | } |
- | 101 | ||
101 | } |
102 | } |
102 | 103 | ||
103 | void arch_pre_mm_init(void) |
104 | void arch_pre_mm_init(void) |
104 | { |
105 | { |
105 | /* It is not assumed by default */ |
106 | /* It is not assumed by default */ |
106 | interrupts_disable(); |
107 | interrupts_disable(); |
107 | 108 | ||
108 | setup_exception_stacks(); |
109 | setup_exception_stacks(); |
- | 110 | ||
109 | } |
111 | } |
110 | 112 | ||
111 | void prefetch_exception_generator(void); |
113 | void prefetch_exception_generator(void); |
112 | 114 | ||
113 | void arch_post_mm_init(void) |
115 | void arch_post_mm_init(void) |
114 | { |
116 | { |
115 | gxemul_hw_map_init(); |
117 | machine_hw_map_init(); |
116 | 118 | ||
117 | /* Initialize dispatch table */ |
119 | /* Initialize dispatch table */ |
118 | exception_init(); |
120 | exception_init(); |
119 | 121 | ||
120 | interrupt_init(); |
122 | interrupt_init(); |
Line 190... | Line 192... | ||
190 | * kernel_uarg.uspace_entry |
192 | * kernel_uarg.uspace_entry |
191 | * \param kernel_uarg information needed for correct setting of userspace |
193 | * \param kernel_uarg information needed for correct setting of userspace |
192 | */ |
194 | */ |
193 | void userspace(uspace_arg_t *kernel_uarg) |
195 | void userspace(uspace_arg_t *kernel_uarg) |
194 | { |
196 | { |
- | 197 | // dprintf("userspace\n"); |
|
195 | // WILL be changed .. after exception return .. eret will be done |
198 | // WILL be changed .. after exception return .. eret will be done |
196 | /* |
199 | /* |
197 | volatile ustate_t ustate; |
200 | volatile ustate_t ustate; |
198 | dprintf("userspce krnl_uard .uspace_uarg(%X), .uspace_entry(%X), .uspace_stack(%X)\n", |
201 | dprintf("userspce krnl_uard .uspace_uarg(%X), .uspace_entry(%X), .uspace_stack(%X)\n", |
199 | (unsigned int)(kernel_uarg->uspace_uarg), |
202 | (unsigned int)(kernel_uarg->uspace_uarg), |