Changeset 06b0211b in mainline for kernel/arch/mips32/src/mips32.c
- Timestamp:
- 2013-04-29T11:29:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa2b32c
- Parents:
- ba4799a (diff), df956b9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mips32.c
rba4799a r06b0211b 41 41 #include <memstr.h> 42 42 #include <userspace.h> 43 #include <console/console.h>44 43 #include <syscall/syscall.h> 45 44 #include <sysinfo/sysinfo.h> 46 45 #include <arch/debug.h> 47 46 #include <arch/debugger.h> 48 #include <arch/drivers/msim.h> 49 #include <genarch/fb/fb.h> 50 #include <genarch/drivers/dsrln/dsrlnin.h> 51 #include <genarch/drivers/dsrln/dsrlnout.h> 52 #include <genarch/srln/srln.h> 47 #include <arch/machine_func.h> 53 48 54 49 /* Size of the code jumping to the exception handler code … … 70 65 71 66 size_t cpu_count = 0; 67 68 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) 69 size_t sdram_size = 0; 70 #endif 72 71 73 72 /** Performs mips32-specific initialization before main_bsp() is called. */ … … 88 87 cpu_count++; 89 88 } 89 90 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) 91 sdram_size = bootinfo->sdram_size; 92 #endif 93 94 /* Initialize machine_ops pointer. */ 95 machine_ops_init(); 90 96 } 91 97 … … 124 130 { 125 131 interrupt_init(); 126 127 #ifdef CONFIG_FB 128 /* GXemul framebuffer */ 129 fb_properties_t gxemul_prop = { 130 .addr = 0x12000000, 131 .offset = 0, 132 .x = 640, 133 .y = 480, 134 .scan = 1920, 135 .visual = VISUAL_RGB_8_8_8, 136 }; 137 138 outdev_t *fbdev = fb_init(&gxemul_prop); 139 if (fbdev) 140 stdout_wire(fbdev); 141 #endif 142 143 #ifdef CONFIG_MIPS_PRN 144 outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); 145 if (dsrlndev) 146 stdout_wire(dsrlndev); 147 #endif 132 133 machine_init(); 134 machine_output_init(); 148 135 } 149 136 … … 158 145 void arch_post_smp_init(void) 159 146 { 160 static const char *platform;161 162 147 /* Set platform name. */ 163 #ifdef MACHINE_msim 164 platform = "msim"; 165 #endif 166 #ifdef MACHINE_bgxemul 167 platform = "gxemul"; 168 #endif 169 #ifdef MACHINE_lgxemul 170 platform = "gxemul"; 171 #endif 172 sysinfo_set_item_data("platform", NULL, (void *) platform, 173 str_size(platform)); 174 175 #ifdef CONFIG_MIPS_KBD 176 /* 177 * Initialize the msim/GXemul keyboard port. Then initialize the serial line 178 * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. 179 */ 180 dsrlnin_instance_t *dsrlnin_instance 181 = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); 182 if (dsrlnin_instance) { 183 srln_instance_t *srln_instance = srln_init(); 184 if (srln_instance) { 185 indev_t *sink = stdin_wire(); 186 indev_t *srln = srln_wire(srln_instance, sink); 187 dsrlnin_wire(dsrlnin_instance, srln); 188 cp0_unmask_int(MSIM_KBD_IRQ); 189 } 190 } 191 192 /* 193 * This is the necessary evil until the userspace driver is entirely 194 * self-sufficient. 195 */ 196 sysinfo_set_item_val("kbd", NULL, true); 197 sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); 198 sysinfo_set_item_val("kbd.address.physical", NULL, 199 PA2KA(MSIM_KBD_ADDRESS)); 200 #endif 148 sysinfo_set_item_data("platform", NULL, 149 (void *) machine_get_platform_name(), 150 str_size(machine_get_platform_name())); 151 152 machine_input_init(); 201 153 } 202 154 … … 228 180 { 229 181 supervisor_sp = 230 (uintptr_t) &THREAD->kstack[STACK_SIZE - SP_DELTA];182 (uintptr_t) &THREAD->kstack[STACK_SIZE]; 231 183 } 232 184
Note:
See TracChangeset
for help on using the changeset viewer.