Rev 1823 | Rev 1864 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1823 | Rev 1860 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <arch.h> |
35 | #include <arch.h> |
36 | #include <debug.h> |
36 | #include <debug.h> |
- | 37 | #include <config.h> |
|
37 | #include <arch/trap/trap.h> |
38 | #include <arch/trap/trap.h> |
38 | #include <arch/console.h> |
39 | #include <arch/console.h> |
39 | #include <arch/drivers/tick.h> |
40 | #include <arch/drivers/tick.h> |
40 | #include <proc/thread.h> |
41 | #include <proc/thread.h> |
41 | #include <console/console.h> |
42 | #include <console/console.h> |
42 | #include <arch/boot/boot.h> |
43 | #include <arch/boot/boot.h> |
43 | #include <arch/arch.h> |
44 | #include <arch/arch.h> |
44 | #include <arch/mm/tlb.h> |
45 | #include <arch/mm/page.h> |
- | 46 | #include <arch/stack.h> |
|
45 | #include <mm/asid.h> |
47 | #include <userspace.h> |
46 | 48 | ||
47 | bootinfo_t bootinfo; |
49 | bootinfo_t bootinfo; |
48 | 50 | ||
49 | void arch_pre_mm_init(void) |
51 | void arch_pre_mm_init(void) |
50 | { |
52 | { |
Line 89... | Line 91... | ||
89 | */ |
91 | */ |
90 | void arch_release_console(void) |
92 | void arch_release_console(void) |
91 | { |
93 | { |
92 | } |
94 | } |
93 | 95 | ||
- | 96 | /** Switch to userspace. */ |
|
- | 97 | void userspace(uspace_arg_t *kernel_uarg) |
|
- | 98 | { |
|
- | 99 | switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry, |
|
- | 100 | ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE |
|
- | 101 | - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS)); |
|
- | 102 | ||
- | 103 | for (;;) |
|
- | 104 | ; |
|
- | 105 | /* not reached */ |
|
- | 106 | } |
|
- | 107 | ||
94 | /** @} |
108 | /** @} |
95 | */ |
109 | */ |