Changeset 6da1013f in mainline
- Timestamp:
- 2009-02-12T20:09:19Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 84266669
- Parents:
- 7004747
- Location:
- kernel/arch
- Files:
-
- 1 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
r7004747 r6da1013f 227 227 } 228 228 229 /** Construct function pointer 230 * 231 * @param fptr function pointer structure 232 * @param addr function address 233 * @param caller calling function address 234 * 235 * @return address of the function pointer 236 * 237 */ 238 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 239 { 240 return addr; 241 } 242 229 243 /** @} 230 244 */ -
kernel/arch/amd64/src/debugger.c
r7004747 r6da1013f 205 205 /* Send IPI */ 206 206 #ifdef CONFIG_SMP 207 // ipi_broadcast(VECTOR_DEBUG_IPI); 207 // ipi_broadcast(VECTOR_DEBUG_IPI); 208 208 #endif 209 209 … … 211 211 } 212 212 213 #ifdef amd64214 # define getip(x)((x)->rip)213 #ifdef __64_BITS__ 214 #define getip(x) ((x)->rip) 215 215 #else 216 # define getip(x)((x)->eip)216 #define getip(x) ((x)->eip) 217 217 #endif 218 218 … … 277 277 278 278 /* Set RF to restart the instruction */ 279 #ifdef amd64279 #ifdef __64_BITS__ 280 280 istate->rflags |= RFLAGS_RF; 281 281 #else … … 349 349 char *symbol; 350 350 351 #ifdef __32_BITS__ 351 #ifdef __32_BITS__ 352 352 printf("# Count Address In symbol\n"); 353 353 printf("-- ----- ---------- ---------\n"); -
kernel/arch/amd64/src/interrupt.c
r7004747 r6da1013f 143 143 static void nm_fault(int n, istate_t *istate) 144 144 { 145 #ifdef CONFIG_FPU_LAZY 145 #ifdef CONFIG_FPU_LAZY 146 146 scheduler_fpu_lazy_request(); 147 147 #else -
kernel/arch/arm32/include/asm.h
r7004747 r6da1013f 47 47 } 48 48 49 /** No I/O port address space on ARM. */ 50 static inline void outb(ioport_t port, uint8_t v) 51 { 52 } 53 54 /** No I/O port address space on ARM. */ 55 static inline uint8_t inb(ioport_t port) 56 { 57 return 0; 58 } 59 49 60 /** Return base address of current stack. 50 61 * -
kernel/arch/arm32/src/arm32.c
r7004747 r6da1013f 93 93 .y = 480, 94 94 .scan = 1920, 95 .visual = VISUAL_ RGB_8_8_8,95 .visual = VISUAL_BGR_8_8_8, 96 96 }; 97 97 fb_init(&prop); … … 165 165 { 166 166 /* not implemented */ 167 for (;;) 168 ; 167 while (1); 168 } 169 170 /** Construct function pointer 171 * 172 * @param fptr function pointer structure 173 * @param addr function address 174 * @param caller calling function address 175 * 176 * @return address of the function pointer 177 * 178 */ 179 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 180 { 181 return addr; 169 182 } 170 183 -
kernel/arch/ia32/_link.ld.in
r7004747 r6da1013f 1 1 /** IA-32 linker script 2 * 2 * 3 3 * umapped section: 4 * 5 * 4 * kernel text 5 * kernel data 6 6 * mapped section: 7 * 8 * kernel data7 * kernel text 8 * kernel data 9 9 */ 10 10 … … 29 29 30 30 kdata_start = .; 31 *(.data); 32 *(.rodata*); 33 *(COMMON); 31 *(.data); /* initialized data */ 32 *(.rodata*); /* string literals */ 33 *(COMMON); /* global variables */ 34 34 hardcoded_load_address = .; 35 35 LONG(PA2KA(BOOT_OFFSET)); … … 43 43 LONG(unmapped_kdata_end - unmapped_kdata_start); 44 44 symbol_table = .; 45 *(symtab.*); 46 *(.bss); 45 *(symtab.*); /* Symbol table, must be LAST symbol! */ 46 *(.bss); /* uninitialized static variables */ 47 47 kdata_end = .; 48 48 } 49 49 50 50 /DISCARD/ : { 51 *(.note.GNU-stack); 51 *(.note.GNU-stack); 52 52 *(.comment); 53 53 } 54 54 55 #ifdef CONFIG_SMP 55 #ifdef CONFIG_SMP 56 56 57 57 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start); … … 59 59 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; 60 60 protected_ap_gdtr = PA2KA(ap_gdtr); 61 61 62 62 #endif /* CONFIG_SMP */ 63 63 64 64 } -
kernel/arch/ia32/include/fpu_context.h
r7004747 r6da1013f 38 38 #include <arch/types.h> 39 39 40 #define ARCH_HAS_FPU41 40 #define FPU_CONTEXT_ALIGN 16 42 41 -
kernel/arch/ia32/src/ia32.c
r7004747 r6da1013f 178 178 } 179 179 180 /** Construct function pointer 181 * 182 * @param fptr function pointer structure 183 * @param addr function address 184 * @param caller calling function address 185 * 186 * @return address of the function pointer 187 * 188 */ 189 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 190 { 191 return addr; 192 } 193 180 194 /** @} 181 195 */ -
kernel/arch/ia64/include/asm.h
r7004747 r6da1013f 42 42 #define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL 43 43 44 static inline void 44 static inline void outb(ioport_t port, uint8_t v) 45 45 { 46 46 *((uint8_t *)(IA64_IOSPACE_ADDRESS + … … 50 50 } 51 51 52 static inline void 52 static inline void outw(ioport_t port, uint16_t v) 53 53 { 54 54 *((uint16_t *)(IA64_IOSPACE_ADDRESS + … … 58 58 } 59 59 60 static inline void 60 static inline void outl(ioport_t port, uint32_t v) 61 61 { 62 62 *((uint32_t *)(IA64_IOSPACE_ADDRESS + -
kernel/arch/ia64/include/drivers/kbd.h
r7004747 r6da1013f 36 36 #define KERN_ia64_KBD_H_ 37 37 38 39 #define KBD_UNKNOWN 0 40 #define KBD_SKI 1 41 #define KBD_LEGACY 2 42 #define KBD_NS16550 3 43 38 #define KBD_UNKNOWN 0 39 #define KBD_SKI 1 40 #define KBD_LEGACY 2 41 #define KBD_NS16550 3 44 42 45 43 #endif -
kernel/arch/ia64/include/fpu_context.h
r7004747 r6da1013f 36 36 #define KERN_ia64_FPU_CONTEXT_H_ 37 37 38 #define ARCH_HAS_FPU 139 38 #define FPU_CONTEXT_ALIGN 16 40 39 -
kernel/arch/ia64/include/interrupt.h
r7004747 r6da1013f 154 154 extern void disabled_fp_register(uint64_t vector, istate_t *istate); 155 155 156 extern void trap_virtual_enable_irqs(uint16_t irqmask); 157 156 158 #endif 157 159 -
kernel/arch/ia64/src/ia64.c
r7004747 r6da1013f 133 133 #ifdef SKI 134 134 ski_init_console(); 135 #else 135 #else 136 136 ega_init(EGA_BASE, EGA_VIDEORAM); 137 #endif 137 #endif 138 138 } 139 139 it_init(); … … 266 266 #ifdef SKI 267 267 ski_kbd_release(); 268 #else 268 #else 269 269 #ifdef CONFIG_NS16550 270 270 ns16550_release(); 271 #else 271 #else 272 272 i8042_release(); 273 #endif 273 #endif 274 274 #endif 275 275 } … … 282 282 } 283 283 284 /** Construct function pointer 285 * 286 * @param fptr function pointer structure 287 * @param addr function address 288 * @param caller calling function address 289 * 290 * @return address of the function pointer 291 * 292 */ 293 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 294 { 295 fptr->fnc = (unative_t) addr; 296 fptr->gp = ((unative_t *) caller)[1]; 297 298 return (void *) fptr; 299 } 300 284 301 /** @} 285 302 */ -
kernel/arch/ia64/src/interrupt.c
r7004747 r6da1013f 195 195 void disabled_fp_register(uint64_t vector, istate_t *istate) 196 196 { 197 #ifdef CONFIG_FPU_LAZY 198 scheduler_fpu_lazy_request(); 197 #ifdef CONFIG_FPU_LAZY 198 scheduler_fpu_lazy_request(); 199 199 #else 200 200 fault_if_from_uspace(istate, "Interruption: %#hx (%s).", … … 302 302 } 303 303 304 void trap_virtual_enable_irqs(uint16_t irqmask) 305 { 306 } 307 304 308 /** @} 305 309 */ -
kernel/arch/ia64/src/ski/ski.c
r7004747 r6da1013f 47 47 #include <arch/drivers/kbd.h> 48 48 49 #define SKI_KBD_INR 49 #define SKI_KBD_INR 0 50 50 51 51 static irq_t ski_kbd_irq; … … 115 115 { 116 116 int ch; 117 118 while(!(ch = ski_getchar())) 119 ;117 118 while(!(ch = ski_getchar())); 119 120 120 if (ch == '\r') 121 121 ch = '\n'; … … 129 129 static char last; 130 130 ipl_t ipl; 131 131 132 132 ipl = interrupts_disable(); 133 133 134 134 if (kbd_disabled) { 135 135 interrupts_restore(ipl); 136 136 return; 137 137 } 138 138 139 139 spinlock_lock(&ski_kbd_irq.lock); 140 140 141 141 ch = ski_getchar(); 142 142 if(ch == '\r') … … 178 178 static void ski_kbd_disable(chardev_t *d) 179 179 { 180 kbd_disabled = true; 180 kbd_disabled = true; 181 181 } 182 182 -
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; -
kernel/arch/ppc32/include/asm.h
r7004747 r6da1013f 150 150 extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); 151 151 152 /** No I/O port address space on PowerPC. */ 153 static inline void outb(ioport_t port, uint8_t v) 154 { 155 } 156 157 /** No I/O port address space on PowerPC. */ 158 static inline uint8_t inb(ioport_t port) 159 { 160 return 0; 161 } 162 152 163 #endif 153 164 -
kernel/arch/ppc32/src/ppc32.c
r7004747 r6da1013f 168 168 } 169 169 170 /** Construct function pointer 171 * 172 * @param fptr function pointer structure 173 * @param addr function address 174 * @param caller calling function address 175 * 176 * @return address of the function pointer 177 * 178 */ 179 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 180 { 181 return addr; 182 } 183 170 184 /** @} 171 185 */ -
kernel/arch/sparc64/_link.ld.in
r7004747 r6da1013f 2 2 * 3 3 * It is ELF format, but its only section looks like this: 4 * kernel text5 * kernel data4 * kernel text 5 * kernel data 6 6 * 7 7 */ … … 12 12 13 13 SECTIONS { 14 .image VMA: AT (LMA) { 14 .image VMA: AT (LMA) { 15 15 ktext_start = .; 16 16 *(K_TEXT_START) … … 22 22 *(.rodata); 23 23 *(.rodata.*); 24 *(.data); 24 *(.data); /* initialized data */ 25 25 *(.sdata); 26 26 *(.sdata2); … … 28 28 . = ALIGN(8); 29 29 hardcoded_ktext_size = .; 30 QUAD(ktext_end - ktext_start); 30 QUAD(ktext_end - ktext_start); 31 31 hardcoded_kdata_size = .; 32 32 QUAD(kdata_end - kdata_start); 33 33 hardcoded_load_address = .; 34 34 QUAD(VMA); 35 *(.bss); /* uninitialized static variables */36 *(COMMON); 37 35 *(.bss); /* uninitialized static variables */ 36 *(COMMON); /* global variables */ 37 38 38 symbol_table = .; 39 *(symtab.*);/* Symbol table, must be LAST symbol!*/40 39 *(symtab.*); /* Symbol table, must be LAST symbol!*/ 40 41 41 kdata_end = .; 42 42 } … … 45 45 *(*); 46 46 } 47 47 48 48 } -
kernel/arch/sparc64/include/fpu_context.h
r7004747 r6da1013f 38 38 #include <arch/types.h> 39 39 40 #define ARCH_HAS_FPU41 40 #define FPU_CONTEXT_ALIGN 8 42 41 -
kernel/arch/sparc64/src/sparc64.c
r7004747 r6da1013f 162 162 } 163 163 164 /** Construct function pointer 165 * 166 * @param fptr function pointer structure 167 * @param addr function address 168 * @param caller calling function address 169 * 170 * @return address of the function pointer 171 * 172 */ 173 void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) 174 { 175 return addr; 176 } 177 164 178 /** @} 165 179 */
Note:
See TracChangeset
for help on using the changeset viewer.