Rev 1705 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1705 | Rev 1780 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | void arch_pre_main(void) |
46 | void arch_pre_main(void) |
47 | { |
47 | { |
48 | /* Setup usermode */ |
48 | /* Setup usermode */ |
49 | init.cnt = bootinfo.taskmap.count; |
49 | init.cnt = bootinfo.taskmap.count; |
50 | 50 | ||
51 | __u32 i; |
51 | uint32_t i; |
52 | 52 | ||
53 | for (i = 0; i < bootinfo.taskmap.count; i++) { |
53 | for (i = 0; i < bootinfo.taskmap.count; i++) { |
54 | init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr); |
54 | init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr); |
55 | init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
55 | init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
56 | } |
56 | } |
Line 88... | Line 88... | ||
88 | { |
88 | { |
89 | } |
89 | } |
90 | 90 | ||
91 | void userspace(uspace_arg_t *kernel_uarg) |
91 | void userspace(uspace_arg_t *kernel_uarg) |
92 | { |
92 | { |
93 | userspace_asm((__address) kernel_uarg->uspace_uarg, (__address) kernel_uarg->uspace_stack + THREAD_STACK_SIZE - SP_DELTA, (__address) kernel_uarg->uspace_entry); |
93 | userspace_asm((uintptr_t) kernel_uarg->uspace_uarg, (uintptr_t) kernel_uarg->uspace_stack + THREAD_STACK_SIZE - SP_DELTA, (uintptr_t) kernel_uarg->uspace_entry); |
94 | 94 | ||
95 | /* Unreachable */ |
95 | /* Unreachable */ |
96 | for (;;) |
96 | for (;;) |
97 | ; |
97 | ; |
98 | } |
98 | } |