Rev 4055 | Rev 4296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4055 | Rev 4156 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | #include <console/chardev.h> |
50 | #include <console/chardev.h> |
51 | #include <arch/barrier.h> |
51 | #include <arch/barrier.h> |
52 | #include <arch/debugger.h> |
52 | #include <arch/debugger.h> |
53 | #include <genarch/fb/fb.h> |
53 | #include <genarch/fb/fb.h> |
54 | #include <genarch/fb/visuals.h> |
54 | #include <genarch/fb/visuals.h> |
- | 55 | #include <genarch/drivers/dsrln/dsrlnin.h> |
|
- | 56 | #include <genarch/drivers/dsrln/dsrlnout.h> |
|
- | 57 | #include <genarch/srln/srln.h> |
|
55 | #include <macros.h> |
58 | #include <macros.h> |
56 | #include <ddi/device.h> |
- | |
57 | #include <config.h> |
59 | #include <config.h> |
58 | #include <string.h> |
60 | #include <string.h> |
59 | #include <arch/drivers/msim.h> |
61 | #include <arch/drivers/msim.h> |
60 | 62 | ||
61 | #include <arch/asm/regname.h> |
63 | #include <arch/asm/regname.h> |
Line 131... | Line 133... | ||
131 | } |
133 | } |
132 | 134 | ||
133 | void arch_post_mm_init(void) |
135 | void arch_post_mm_init(void) |
134 | { |
136 | { |
135 | interrupt_init(); |
137 | interrupt_init(); |
136 | msim_console(device_assign_devno()); |
- | |
- | 138 | ||
137 | #ifdef CONFIG_FB |
139 | #ifdef CONFIG_FB |
138 | /* GXemul framebuffer */ |
140 | /* GXemul framebuffer */ |
139 | fb_properties_t gxemul_prop = { |
141 | fb_properties_t gxemul_prop = { |
140 | .addr = 0x12000000, |
142 | .addr = 0x12000000, |
141 | .offset = 0, |
143 | .offset = 0, |
Line 143... | Line 145... | ||
143 | .y = 480, |
145 | .y = 480, |
144 | .scan = 1920, |
146 | .scan = 1920, |
145 | .visual = VISUAL_BGR_8_8_8, |
147 | .visual = VISUAL_BGR_8_8_8, |
146 | }; |
148 | }; |
147 | fb_init(&gxemul_prop); |
149 | fb_init(&gxemul_prop); |
148 | #endif |
150 | #else |
149 | - | ||
150 | #ifdef MACHINE_msim |
- | |
151 | sysinfo_set_item_val("machine.msim", NULL, 1); |
- | |
152 | #endif |
- | |
153 | - | ||
154 | #ifdef MACHINE_simics |
151 | #ifdef CONFIG_MIPS_PRN |
155 | sysinfo_set_item_val("machine.simics", NULL, 1); |
152 | dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); |
156 | #endif |
- | |
157 | - | ||
158 | #ifdef MACHINE_bgxemul |
153 | #endif /* CONFIG_MIPS_PRN */ |
159 | sysinfo_set_item_val("machine.bgxemul", NULL, 1); |
- | |
160 | #endif |
- | |
161 | - | ||
162 | #ifdef MACHINE_lgxemul |
154 | #endif /* CONFIG_FB */ |
163 | sysinfo_set_item_val("machine.lgxemul", NULL, 1); |
- | |
164 | #endif |
- | |
165 | } |
155 | } |
166 | 156 | ||
167 | void arch_post_cpu_init(void) |
157 | void arch_post_cpu_init(void) |
168 | { |
158 | { |
169 | } |
159 | } |
Line 172... | Line 162... | ||
172 | { |
162 | { |
173 | } |
163 | } |
174 | 164 | ||
175 | void arch_post_smp_init(void) |
165 | void arch_post_smp_init(void) |
176 | { |
166 | { |
- | 167 | #ifdef CONFIG_MIPS_KBD |
|
- | 168 | /* |
|
- | 169 | * Initialize the msim/GXemul keyboard port. Then initialize the serial line |
|
- | 170 | * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. |
|
- | 171 | */ |
|
- | 172 | indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); |
|
- | 173 | if (kbrdin) { |
|
- | 174 | srln_init(kbrdin); |
|
- | 175 | cp0_unmask_int(MSIM_KBD_IRQ); |
|
- | 176 | } |
|
- | 177 | ||
- | 178 | /* |
|
- | 179 | * This is the necessary evil until the userspace driver is entirely |
|
- | 180 | * self-sufficient. |
|
- | 181 | */ |
|
- | 182 | sysinfo_set_item_val("kbd", NULL, true); |
|
- | 183 | sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
|
- | 184 | sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
|
- | 185 | #endif |
|
177 | } |
186 | } |
178 | 187 | ||
179 | void calibrate_delay_loop(void) |
188 | void calibrate_delay_loop(void) |
180 | { |
189 | { |
181 | } |
190 | } |
Line 220... | Line 229... | ||
220 | } |
229 | } |
221 | 230 | ||
222 | void arch_reboot(void) |
231 | void arch_reboot(void) |
223 | { |
232 | { |
224 | ___halt(); |
233 | ___halt(); |
225 | - | ||
226 | while (1); |
234 | while (1); |
227 | } |
235 | } |
228 | 236 | ||
229 | /** Construct function pointer |
237 | /** Construct function pointer |
230 | * |
238 | * |