Changeset c7511ec in mainline
- Timestamp:
- 2008-06-14T11:46:46Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8605b24
- Parents:
- eeaf667
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mips32.c
reeaf667 rc7511ec 51 51 #include <arch/drivers/arc.h> 52 52 #include <console/chardev.h> 53 #include <arch/barrier.h> 53 54 #include <arch/debugger.h> 54 55 #include <genarch/fb/fb.h> … … 101 102 /* Copy the exception vectors to the right places */ 102 103 memcpy(TLB_EXC, (char *) tlb_refill_entry, EXCEPTION_JUMP_SIZE); 104 smc_coherence_block(TLB_EXC, EXCEPTION_JUMP_SIZE); 103 105 memcpy(NORM_EXC, (char *) exception_entry, EXCEPTION_JUMP_SIZE); 106 smc_coherence_block(NORM_EXC, EXCEPTION_JUMP_SIZE); 104 107 memcpy(CACHE_EXC, (char *) cache_error_entry, EXCEPTION_JUMP_SIZE); 108 smc_coherence_block(CACHE_EXC, EXCEPTION_JUMP_SIZE); 105 109 106 110 /* 107 * Switch to BEV normal level so that exception vectors point to the kernel.108 * Clear the error level.111 * Switch to BEV normal level so that exception vectors point to the 112 * kernel. Clear the error level. 109 113 */ 110 cp0_status_write(cp0_status_read() & ~(cp0_status_bev_bootstrap_bit|cp0_status_erl_error_bit)); 114 cp0_status_write(cp0_status_read() & 115 ~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit)); 111 116 112 117 /* … … 123 128 console_init(device_assign_devno()); 124 129 #ifdef CONFIG_FB 125 fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); // gxemul framebuffer 130 /* GXemul framebuffer */ 131 fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); 126 132 #endif 127 133 sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1); … … 144 150 /* EXL = 1, UM = 1, IE = 1 */ 145 151 cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit | 146 152 cp0_status_um_bit | cp0_status_ie_enabled_bit)); 147 153 cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); 148 154 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + PAGE_SIZE), 149 150 155 (uintptr_t) kernel_uarg->uspace_uarg, 156 (uintptr_t) kernel_uarg->uspace_entry); 151 157 152 while (1); 158 while (1) 159 ; 153 160 } 154 161 … … 161 168 void before_thread_runs_arch(void) 162 169 { 163 supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; 170 supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - 171 SP_DELTA]; 164 172 } 165 173 … … 183 191 ___halt(); 184 192 185 while (1); 193 while (1) 194 ; 186 195 } 187 196
Note:
See TracChangeset
for help on using the changeset viewer.