Rev 4348 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4348 | Rev 4691 | ||
|---|---|---|---|
| Line 74... | Line 74... | ||
| 74 | */ |
74 | */ |
| 75 | 75 | ||
| 76 | /* Stack pointer saved when entering user mode */ |
76 | /* Stack pointer saved when entering user mode */ |
| 77 | uintptr_t supervisor_sp __attribute__ ((section (".text"))); |
77 | uintptr_t supervisor_sp __attribute__ ((section (".text"))); |
| 78 | 78 | ||
| 79 | count_t cpu_count = 0; |
79 | size_t cpu_count = 0; |
| 80 | 80 | ||
| 81 | /** Performs mips32-specific initialization before main_bsp() is called. */ |
81 | /** Performs mips32-specific initialization before main_bsp() is called. */ |
| 82 | void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) |
82 | void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) |
| 83 | { |
83 | { |
| 84 | /* Setup usermode */ |
84 | /* Setup usermode */ |
| 85 | init.cnt = bootinfo->cnt; |
85 | init.cnt = bootinfo->cnt; |
| 86 | 86 | ||
| 87 | count_t i; |
87 | size_t i; |
| 88 | for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) { |
88 | for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) { |
| 89 | init.tasks[i].addr = bootinfo->tasks[i].addr; |
89 | init.tasks[i].addr = bootinfo->tasks[i].addr; |
| 90 | init.tasks[i].size = bootinfo->tasks[i].size; |
90 | init.tasks[i].size = bootinfo->tasks[i].size; |
| 91 | str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
91 | str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
| 92 | bootinfo->tasks[i].name); |
92 | bootinfo->tasks[i].name); |
| Line 139... | Line 139... | ||
| 139 | .addr = 0x12000000, |
139 | .addr = 0x12000000, |
| 140 | .offset = 0, |
140 | .offset = 0, |
| 141 | .x = 640, |
141 | .x = 640, |
| 142 | .y = 480, |
142 | .y = 480, |
| 143 | .scan = 1920, |
143 | .scan = 1920, |
| 144 | .visual = VISUAL_BGR_8_8_8, |
144 | .visual = VISUAL_RGB_8_8_8, |
| 145 | }; |
145 | }; |
| 146 | fb_init(&gxemul_prop); |
146 | fb_init(&gxemul_prop); |
| 147 | #else |
147 | #else |
| 148 | #ifdef CONFIG_MIPS_PRN |
148 | #ifdef CONFIG_MIPS_PRN |
| 149 | dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); |
149 | dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); |