Rev 1305 | Rev 1474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1305 | Rev 1398 | ||
|---|---|---|---|
| Line 26... | Line 26... | ||
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| 29 | #include <arch.h> |
29 | #include <arch.h> |
| 30 | #include <arch/boot/boot.h> |
30 | #include <arch/boot/boot.h> |
| 31 | #include <arch/console.h> |
- | |
| 32 | #include <arch/mm/memory_init.h> |
31 | #include <arch/mm/memory_init.h> |
| 33 | #include <arch/interrupt.h> |
32 | #include <arch/interrupt.h> |
| - | 33 | #include <genarch/fb/fb.h> |
|
| 34 | #include <mm/frame.h> |
34 | #include <userspace.h> |
| - | 35 | #include <proc/uarg.h> |
|
| 35 | 36 | ||
| 36 | bootinfo_t bootinfo; |
37 | bootinfo_t bootinfo; |
| 37 | 38 | ||
| - | 39 | void arch_pre_main(void) |
|
| - | 40 | { |
|
| - | 41 | /* Setup usermode */ |
|
| - | 42 | init.cnt = bootinfo.taskmap.count; |
|
| - | 43 | ||
| - | 44 | __u32 i; |
|
| - | 45 | ||
| - | 46 | for (i = 0; i < bootinfo.taskmap.count; i++) { |
|
| - | 47 | init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr); |
|
| - | 48 | init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
|
| - | 49 | } |
|
| - | 50 | } |
|
| - | 51 | ||
| 38 | void arch_pre_mm_init(void) |
52 | void arch_pre_mm_init(void) |
| 39 | { |
53 | { |
| 40 | /* Initialize dispatch table */ |
54 | /* Initialize dispatch table */ |
| 41 | interrupt_init(); |
55 | interrupt_init(); |
| 42 | 56 | ||
| 43 | /* Start decrementer */ |
57 | /* Start decrementer */ |
| 44 | start_decrementer(); |
58 | start_decrementer(); |
| 45 | - | ||
| 46 | ppc64_console_init(); |
- | |
| 47 | } |
59 | } |
| 48 | 60 | ||
| 49 | void arch_post_mm_init(void) |
61 | void arch_post_mm_init(void) |
| 50 | { |
62 | { |
| 51 | if (config.cpu_active == 1) { |
63 | if (config.cpu_active == 1) { |
| - | 64 | fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
|
| - | 65 | ||
| 52 | /* Merge all zones to 1 big zone */ |
66 | /* Merge all zones to 1 big zone */ |
| 53 | zone_merge_all(); |
67 | zone_merge_all(); |
| 54 | } |
68 | } |
| 55 | } |
69 | } |
| 56 | 70 | ||
| Line 65... | Line 79... | ||
| 65 | 79 | ||
| 66 | void calibrate_delay_loop(void) |
80 | void calibrate_delay_loop(void) |
| 67 | { |
81 | { |
| 68 | } |
82 | } |
| 69 | 83 | ||
| - | 84 | void userspace(uspace_arg_t *kernel_uarg) |
|
| - | 85 | { |
|
| - | 86 | userspace_asm((__address) kernel_uarg->uspace_uarg, (__address) kernel_uarg->uspace_stack + THREAD_STACK_SIZE - SP_DELTA, (__address) kernel_uarg->uspace_entry); |
|
| - | 87 | ||
| - | 88 | /* Unreachable */ |
|
| - | 89 | for (;;) |
|
| - | 90 | ; |
|
| - | 91 | } |
|