Changeset 6da1013f in mainline for kernel/arch/mips32
- Timestamp:
- 2009-02-12T20:09:19Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 84266669
- Parents:
- 7004747
- Location:
- kernel/arch/mips32
- Files:
-
- 7 edited
-
include/asm.h (modified) (1 diff)
-
include/context_offset.h (modified) (4 diffs)
-
src/asm.S (modified) (2 diffs)
-
src/drivers/msim.c (modified) (1 diff)
-
src/fpu_context.c (modified) (2 diffs)
-
src/mips32.c (modified) (4 diffs)
-
src/mm/frame.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/asm.h
r7004747 r6da1013f 71 71 extern ipl_t interrupts_read(void); 72 72 73 /** No I/O port address space on MIPS. */ 74 static inline void outb(ioport_t port, uint8_t v) 75 { 76 } 77 78 /** No I/O port address space on MIPS. */ 79 static inline uint8_t inb(ioport_t port) 80 { 81 return 0; 82 } 83 73 84 #endif 74 85 -
kernel/arch/mips32/include/context_offset.h
r7004747 r6da1013f 115 115 sw $gp,OFFSET_GP(\ctx) 116 116 117 #ifndef KERNEL 117 #ifndef KERNEL 118 118 sw $k1,OFFSET_TLS(\ctx) 119 119 120 # ifdef CONFIG_MIPS_FPU120 #ifdef CONFIG_FPU 121 121 mfc1 $t0,$20 122 122 sw $t0, OFFSET_F20(\ctx) … … 151 151 mfc1 $t0,$30 152 152 sw $t0, OFFSET_F30(\ctx) 153 # endif /* CONFIG_MIPS_FPU */153 #endif /* CONFIG_FPU */ 154 154 #endif /* KERNEL */ 155 155 … … 173 173 lw $k1,OFFSET_TLS(\ctx) 174 174 175 # ifdef CONFIG_MIPS_FPU175 #ifdef CONFIG_FPU 176 176 lw $t0, OFFSET_F20(\ctx) 177 177 mtc1 $t0,$20 … … 206 206 lw $t0, OFFSET_F30(\ctx) 207 207 mtc1 $t0,$30 208 # endif /* CONFIG_MIPS_FPU */ 209 208 #endif /* CONFIG_FPU */ 210 209 #endif /* KERNEL */ 210 211 211 lw $ra,OFFSET_PC(\ctx) 212 212 lw $sp,OFFSET_SP(\ctx) -
kernel/arch/mips32/src/asm.S
r7004747 r6da1013f 160 160 .global fpu_context_save 161 161 fpu_context_save: 162 #ifdef ARCH_HAS_FPU162 #ifdef CONFIG_FPU 163 163 fpu_gp_save 0,$a0 164 164 fpu_gp_save 1,$a0 … … 231 231 .global fpu_context_restore 232 232 fpu_context_restore: 233 #ifdef ARCH_HAS_FPU233 #ifdef CONFIG_FPU 234 234 fpu_gp_restore 0,$a0 235 235 fpu_gp_restore 1,$a0 -
kernel/arch/mips32/src/drivers/msim.c
r7004747 r6da1013f 77 77 } 78 78 79 #include <print.h>80 79 /** Read character using polling, assume interrupts disabled */ 81 80 static char msim_do_read(chardev_t *dev) -
kernel/arch/mips32/src/fpu_context.c
r7004747 r6da1013f 41 41 void fpu_disable(void) 42 42 { 43 #ifdef ARCH_HAS_FPU43 #ifdef CONFIG_FPU 44 44 cp0_status_write(cp0_status_read() & ~cp0_status_fpu_bit); 45 45 #endif … … 48 48 void fpu_enable(void) 49 49 { 50 #ifdef ARCH_HAS_FPU50 #ifdef CONFIG_FPU 51 51 cp0_status_write(cp0_status_read() | cp0_status_fpu_bit); 52 52 #endif -
kernel/arch/mips32/src/mips32.c
r7004747 r6da1013f 112 112 cp0_status_write(cp0_status_read() & 113 113 ~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit)); 114 115 /* 116 * Mask all interrupts 114 115 /* 116 * Mask all interrupts 117 117 */ 118 118 cp0_mask_all_int(); 119 119 120 120 debugger_init(); 121 121 } … … 133 133 .y = 480, 134 134 .scan = 1920, 135 .visual = VISUAL_ RGB_8_8_8,135 .visual = VISUAL_BGR_8_8_8, 136 136 }; 137 137 fb_init(&gxemul_prop); 138 138 #endif 139 sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1); 139 140 #ifdef msim 141 sysinfo_set_item_val("machine.msim", NULL, 1); 142 #endif 143 144 #ifdef simics 145 sysinfo_set_item_val("machine.simics", NULL, 1); 146 #endif 147 148 #ifdef bgxemul 149 sysinfo_set_item_val("machine.bgxemul", NULL, 1); 150 #endif 151 152 #ifdef lgxemul 153 sysinfo_set_item_val("machine.lgxemul", NULL, 1); 154 #endif 140 155 } 141 156 … … 162 177 (uintptr_t) kernel_uarg->uspace_entry); 163 178 164 while (1) 165 ; 179 while (1); 166 180 } 167 181 … … 196 210 ___halt(); 197 211 198 while (1) 199 ; 212 while (1); 213 } 214 215 /** Construct function pointer 216 * 217 * @param fptr function pointer structure 218 * @param addr function address 219 * @param caller calling function address 220 * 221 * @return address of the function pointer 222 * 223 */ 224 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 225 { 226 return addr; 200 227 } 201 228 -
kernel/arch/mips32/src/mm/frame.c
r7004747 r6da1013f 76 76 static bool frame_available(pfn_t frame) 77 77 { 78 #if MACHINE ==msim78 #ifdef msim 79 79 /* MSIM device (dprinter) */ 80 80 if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH)) … … 86 86 #endif 87 87 88 #if MACHINE ==simics88 #ifdef simics 89 89 /* Simics device (serial line) */ 90 90 if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH)) … … 92 92 #endif 93 93 94 #if (MACHINE == lgxemul) || (MACHINE ==bgxemul)94 #if defined(lgxemul) || defined(bgxemul) 95 95 /* gxemul devices */ 96 96 if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE, … … 219 219 if (ZERO_PAGE_VALUE != 0xdeadbeef) 220 220 avail = false; 221 #if (MACHINE == lgxemul) || (MACHINE ==bgxemul)221 #if defined(lgxemul) || defined(bgxemul) 222 222 else { 223 223 ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd;
Note:
See TracChangeset
for help on using the changeset viewer.
