Changeset 696979ce in mainline for kernel/arch
- Timestamp:
- 2010-02-06T10:54:21Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bda2f96
- Parents:
- 3f93cdbe (diff), 25e963a (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. - Location:
- kernel/arch
- Files:
-
- 2 added
- 18 edited
-
abs32le/Makefile.inc (modified) (1 diff)
-
abs32le/include/asm.h (modified) (1 diff)
-
abs32le/include/context.h (modified) (1 diff)
-
abs32le/include/interrupt.h (modified) (1 diff)
-
abs32le/src/abs32le.c (modified) (2 diffs)
-
abs32le/src/ddi/ddi.c (added)
-
abs32le/src/debug/stacktrace.c (modified) (4 diffs)
-
abs32le/src/smp/smp.c (added)
-
amd64/include/asm.h (modified) (1 diff)
-
arm32/include/asm.h (modified) (1 diff)
-
arm32/src/arm32.c (modified) (2 diffs)
-
ia32/include/asm.h (modified) (1 diff)
-
ia64/include/asm.h (modified) (1 diff)
-
ia64/include/context.h (modified) (1 diff)
-
mips32/include/asm.h (modified) (1 diff)
-
mips32/include/context.h (modified) (2 diffs)
-
ppc32/include/asm.h (modified) (2 diffs)
-
ppc32/include/context.h (modified) (3 diffs)
-
sparc64/include/asm.h (modified) (1 diff)
-
sparc64/include/context.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/Makefile.inc
r3f93cdbe r696979ce 41 41 arch/$(KARCH)/src/userspace.c \ 42 42 arch/$(KARCH)/src/cpu/cpu.c \ 43 arch/$(KARCH)/src/ddi/ddi.c \ 44 arch/$(KARCH)/src/smp/smp.c \ 43 45 arch/$(KARCH)/src/mm/as.c \ 44 46 arch/$(KARCH)/src/mm/frame.c \ -
kernel/arch/abs32le/include/asm.h
r3f93cdbe r696979ce 49 49 50 50 51 static inline void cpu_halt(void)51 static inline __attribute__((noreturn)) void cpu_halt(void) 52 52 { 53 53 /* On real hardware this should stop processing further -
kernel/arch/abs32le/include/context.h
r3f93cdbe r696979ce 36 36 #define KERN_abs32le_CONTEXT_H_ 37 37 38 #ifdef KERNEL39 #include <arch/types.h>40 41 38 #define STACK_ITEM_SIZE 4 42 39 #define SP_DELTA 0 43 40 44 #define context_set(c, _pc, stack, size) \ 45 do { \ 46 (c)->pc = (uintptr_t) (_pc); \ 47 } while (0) 48 49 #endif /* KERNEL */ 41 #define context_set(ctx, pc, stack, size) \ 42 context_set_generic(ctx, pc, stack, size) 50 43 51 44 /* -
kernel/arch/abs32le/include/interrupt.h
r3f93cdbe r696979ce 40 40 #define IVT_ITEMS 0 41 41 #define IVT_FIRST 0 42 43 #define VECTOR_TLB_SHOOTDOWN_IPI 0 42 44 43 45 /* -
kernel/arch/abs32le/src/abs32le.c
r3f93cdbe r696979ce 39 39 #include <arch/asm.h> 40 40 41 #include <func.h> 41 42 #include <config.h> 43 #include <context.h> 42 44 #include <interrupt.h> 43 45 #include <ddi/irq.h> … … 107 109 } 108 110 111 void memsetb(void *dst, size_t cnt, uint8_t val) 112 { 113 _memsetb(dst, cnt, val); 114 } 115 116 void memsetw(void *dst, size_t cnt, uint16_t val) 117 { 118 _memsetw(dst, cnt, val); 119 } 120 121 void panic_printf(char *fmt, ...) 122 { 123 va_list args; 124 125 va_start(args, fmt); 126 vprintf(fmt, args); 127 va_end(args); 128 129 halt(); 130 } 131 132 int context_save_arch(context_t *ctx) 133 { 134 return 1; 135 } 136 137 void context_restore_arch(context_t *ctx) 138 { 139 while (true); 140 } 141 109 142 /** @} 110 143 */ -
kernel/arch/abs32le/src/debug/stacktrace.c
r3f93cdbe r696979ce 27 27 */ 28 28 29 /** @addtogroup ia3229 /** @addtogroup abs32le 30 30 * @{ 31 31 */ … … 38 38 #include <typedefs.h> 39 39 40 #define FRAME_OFFSET_FP_PREV 041 #define FRAME_OFFSET_RA 142 43 40 bool kernel_frame_pointer_validate(uintptr_t fp) 44 41 { 45 return fp != 0;42 return true;; 46 43 } 47 44 48 45 bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 49 46 { 50 uint32_t *stack = (void *) fp;51 *prev = stack[FRAME_OFFSET_FP_PREV];52 47 return true; 53 48 } … … 55 50 bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra) 56 51 { 57 uint32_t *stack = (void *) fp;58 *ra = stack[FRAME_OFFSET_RA];59 52 return true; 60 53 } … … 62 55 bool uspace_frame_pointer_validate(uintptr_t fp) 63 56 { 64 return fp != 0;57 return true; 65 58 } 66 59 67 60 bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev) 68 61 { 69 return !copy_from_uspace((void *) prev, 70 (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev)); 62 return true; 71 63 } 72 64 73 65 bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra) 74 66 { 75 return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA, 76 sizeof(*ra)); 67 return true; 68 } 69 70 uintptr_t frame_pointer_get(void) 71 { 72 return 0; 73 } 74 75 uintptr_t program_counter_get(void) 76 { 77 return 0; 77 78 } 78 79 -
kernel/arch/amd64/include/asm.h
r3f93cdbe r696979ce 68 68 } 69 69 70 static inline void cpu_halt(void)71 { 72 asm volatile (73 "0:\n"74 "hlt\n"75 " jmp 0b\n"76 );70 static inline void __attribute__((noreturn)) cpu_halt(void) 71 { 72 while (true) { 73 asm volatile ( 74 "hlt\n" 75 ); 76 } 77 77 } 78 78 -
kernel/arch/arm32/include/asm.h
r3f93cdbe r696979ce 96 96 } 97 97 98 extern void cpu_halt(void) ;98 extern void cpu_halt(void) __attribute__((noreturn)); 99 99 extern void asm_delay_loop(uint32_t t); 100 100 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, -
kernel/arch/arm32/src/arm32.c
r3f93cdbe r696979ce 155 155 void cpu_halt(void) 156 156 { 157 machine_cpu_halt(); 157 while (true) 158 machine_cpu_halt(); 158 159 } 159 160 … … 162 163 { 163 164 /* not implemented */ 164 while ( 1);165 while (true); 165 166 } 166 167 -
kernel/arch/ia32/include/asm.h
r3f93cdbe r696979ce 60 60 * 61 61 */ 62 static inline void cpu_halt(void)63 { 64 asm volatile (65 "0:\n"66 "hlt\n"67 " jmp 0b\n"68 );62 static inline __attribute__((noreturn)) void cpu_halt(void) 63 { 64 while (true) { 65 asm volatile ( 66 "hlt\n" 67 ); 68 } 69 69 } 70 70 -
kernel/arch/ia64/include/asm.h
r3f93cdbe r696979ce 428 428 } 429 429 430 extern void cpu_halt(void) ;430 extern void cpu_halt(void) __attribute__((noreturn)); 431 431 extern void cpu_sleep(void); 432 432 extern void asm_delay_loop(uint32_t t); -
kernel/arch/ia64/include/context.h
r3f93cdbe r696979ce 48 48 */ 49 49 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 50 51 #ifdef context_set52 #undef context_set53 #endif54 50 55 51 /* RSE stack starts at the bottom of memory stack. */ -
kernel/arch/mips32/include/asm.h
r3f93cdbe r696979ce 66 66 } 67 67 68 extern void cpu_halt(void) ;68 extern void cpu_halt(void) __attribute__((noreturn)); 69 69 extern void asm_delay_loop(uint32_t t); 70 70 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, -
kernel/arch/mips32/include/context.h
r3f93cdbe r696979ce 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 42 42 * Put one item onto the stack to support get_stack_base() and align it up. 43 43 */ 44 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 45 44 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 46 45 47 46 #ifndef __ASM__ 48 47 49 48 #include <arch/types.h> 49 50 #define context_set(ctx, pc, stack, size) \ 51 context_set_generic(ctx, pc, stack, size) 50 52 51 53 /* -
kernel/arch/ppc32/include/asm.h
r3f93cdbe r696979ce 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 146 146 } 147 147 148 void cpu_halt(void); 149 void asm_delay_loop(uint32_t t); 150 148 extern void cpu_halt(void) __attribute__((noreturn)); 149 extern void asm_delay_loop(uint32_t t); 151 150 extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); 152 151 153 152 static inline void pio_write_8(ioport8_t *port, uint8_t v) 154 153 { 155 *port = v; 154 *port = v; 156 155 } 157 156 158 157 static inline void pio_write_16(ioport16_t *port, uint16_t v) 159 158 { 160 *port = v; 159 *port = v; 161 160 } 162 161 163 162 static inline void pio_write_32(ioport32_t *port, uint32_t v) 164 163 { 165 *port = v; 164 *port = v; 166 165 } 167 166 168 167 static inline uint8_t pio_read_8(ioport8_t *port) 169 168 { 170 return *port; 169 return *port; 171 170 } 172 171 173 172 static inline uint16_t pio_read_16(ioport16_t *port) 174 173 { 175 return *port; 174 return *port; 176 175 } 177 176 178 177 static inline uint32_t pio_read_32(ioport32_t *port) 179 178 { 180 return *port; 179 return *port; 181 180 } 182 181 -
kernel/arch/ppc32/include/context.h
r3f93cdbe r696979ce 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 38 38 #include <arch/types.h> 39 39 40 #define SP_DELTA 16 40 #define SP_DELTA 16 41 42 #define context_set(ctx, pc, stack, size) \ 43 context_set_generic(ctx, pc, stack, size) 41 44 42 45 typedef struct { … … 68 71 69 72 ipl_t ipl; 70 } __attribute__ ((packed)) context_t;73 } __attribute__((packed)) context_t; 71 74 72 75 #endif -
kernel/arch/sparc64/include/asm.h
r3f93cdbe r696979ce 430 430 } 431 431 432 extern void cpu_halt(void) ;432 extern void cpu_halt(void) __attribute__((noreturn)); 433 433 extern void cpu_sleep(void); 434 434 extern void asm_delay_loop(const uint32_t usec); -
kernel/arch/sparc64/include/context.h
r3f93cdbe r696979ce 42 42 #define SP_DELTA (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE) 43 43 44 #ifdef context_set45 #undef context_set46 #endif47 48 44 #define context_set(c, _pc, stack, size) \ 49 45 (c)->pc = ((uintptr_t) _pc) - 8; \
Note:
See TracChangeset
for help on using the changeset viewer.
