Changeset 14f8fd4 in mainline for kernel/arch
- Timestamp:
- 2012-03-15T22:52:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bfb3d60
- Parents:
- 43cd499 (diff), dbbba51c (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:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/context.h
r43cd499 r14f8fd4 38 38 #include <typedefs.h> 39 39 40 /* According to ABI the stack MUST be aligned on 40 /* 41 * According to ABI the stack MUST be aligned on 41 42 * 16-byte boundary. If it is not, the va_arg calling will 42 43 * panic sooner or later -
kernel/arch/arm32/include/context.h
r43cd499 r14f8fd4 27 27 */ 28 28 29 /** @addtogroup arm32 29 /** @addtogroup arm32 30 30 * @{ 31 31 */ -
kernel/arch/ia64/include/context.h
r43cd499 r14f8fd4 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 47 47 * One item is put onto the stack to support get_stack_base(). 48 48 */ 49 #define SP_DELTA 49 #define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 50 50 51 51 /* RSE stack starts at the bottom of memory stack, hence the division by 2. */ 52 #define context_set(c, _pc, stack, size) 53 do { 54 (c)->pc = (uintptr_t) _pc; 55 (c)->bsp = ((uintptr_t) stack) + ALIGN_UP((size / 2), REGISTER_STACK_ALIGNMENT); 56 (c)->ar_pfs &= PFM_MASK; 57 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size / 2), STACK_ALIGNMENT) - SP_DELTA; 58 } while (0) ;52 #define context_set(c, _pc, stack, size) \ 53 do { \ 54 (c)->pc = (uintptr_t) _pc; \ 55 (c)->bsp = ((uintptr_t) stack) + ALIGN_UP((size / 2), REGISTER_STACK_ALIGNMENT); \ 56 (c)->ar_pfs &= PFM_MASK; \ 57 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size / 2), STACK_ALIGNMENT) - SP_DELTA; \ 58 } while (0) 59 59 60 60 /* -
kernel/arch/mips32/include/context.h
r43cd499 r14f8fd4 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))44 #define SP_DELTA (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 45 45 46 46 #ifndef __ASM__ -
kernel/arch/mips32/include/stack.h
r43cd499 r14f8fd4 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 36 36 #define KERN_mips32_STACK_H_ 37 37 38 #define STACK_ITEM_SIZE 4 39 #define STACK_ALIGNMENT 8 38 #define STACK_ITEM_SIZE 4 39 #define STACK_ALIGNMENT 8 40 #define ABI_STACK_FRAME 32 40 41 41 42 #endif -
kernel/arch/mips32/src/start.S
r43cd499 r14f8fd4 241 241 /* $a1 contains physical address of bootinfo_t */ 242 242 jal arch_pre_main 243 nop243 addiu $sp, -ABI_STACK_FRAME 244 244 245 245 j main_bsp … … 281 281 282 282 move $a1, $sp 283 move $a0, $k0 283 284 jal exc_dispatch /* exc_dispatch(excno, register_space) */ 284 move $a0, $k0 285 addiu $sp, -ABI_STACK_FRAME 286 addiu $sp, ABI_STACK_FRAME 285 287 286 288 REGISTERS_LOAD $sp … … 323 325 sw $t0, ISTATE_OFFSET_T0($sp) /* save the 5th argument on the stack */ 324 326 sw $t1, ISTATE_OFFSET_T1($sp) /* save the 6th argument on the stack */ 327 325 328 jal syscall_handler 326 329 sw $v0, ISTATE_OFFSET_V0($sp) /* save the syscall number on the stack */ … … 357 360 move $sp, $k0 358 361 362 move $a0, $sp 359 363 jal tlb_refill 360 move $a0, $sp 364 addiu $sp, -ABI_STACK_FRAME 365 addiu $sp, ABI_STACK_FRAME 361 366 362 367 REGISTERS_LOAD $sp … … 366 371 cache_error_handler: 367 372 KERNEL_STACK_TO_K0 368 sub $k0, ISTATE_SOFT_SIZE 373 sub $k0, ISTATE_SOFT_SIZE 369 374 REGISTERS_STORE_AND_EXC_RESET $k0 370 375 sw $sp, ISTATE_OFFSET_SP($k0) 371 376 move $sp, $k0 372 377 378 move $a0, $sp 373 379 jal cache_error 374 move $a0, $sp 380 addiu $sp, -ABI_STACK_FRAME 381 addiu $sp, ABI_STACK_FRAME 375 382 376 383 REGISTERS_LOAD $sp -
kernel/arch/mips64/include/context.h
r43cd499 r14f8fd4 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))44 #define SP_DELTA (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 45 45 46 46 #ifndef __ASM__ -
kernel/arch/mips64/include/stack.h
r43cd499 r14f8fd4 38 38 #define STACK_ITEM_SIZE 8 39 39 #define STACK_ALIGNMENT 8 40 #define ABI_STACK_FRAME 64 40 41 41 42 #endif -
kernel/arch/mips64/src/start.S
r43cd499 r14f8fd4 241 241 /* $a1 contains physical address of bootinfo_t */ 242 242 jal arch_pre_main 243 nop243 addiu $sp, -ABI_STACK_FRAME 244 244 245 245 j main_bsp … … 281 281 282 282 move $a1, $sp 283 move $a0, $k0 283 284 jal exc_dispatch /* exc_dispatch(excno, register_space) */ 284 move $a0, $k0 285 addiu $sp, -ABI_STACK_FRAME 286 addiu $sp, ABI_STACK_FRAME 285 287 286 288 REGISTERS_LOAD $sp … … 323 325 sw $t0, ISTATE_OFFSET_T0($sp) /* save the 5th argument on the stack */ 324 326 sw $t1, ISTATE_OFFSET_T1($sp) /* save the 6th argument on the stack */ 327 325 328 jal syscall_handler 326 329 sw $v0, ISTATE_OFFSET_V0($sp) /* save the syscall number on the stack */ … … 357 360 move $sp, $k0 358 361 362 move $a0, $sp 359 363 jal tlb_refill 360 move $a0, $sp 364 addiu $sp, -ABI_STACK_FRAME 365 addiu $sp, ABI_STACK_FRAME 361 366 362 367 REGISTERS_LOAD $sp … … 366 371 cache_error_handler: 367 372 KERNEL_STACK_TO_K0 368 sub $k0, ISTATE_SOFT_SIZE 373 sub $k0, ISTATE_SOFT_SIZE 369 374 REGISTERS_STORE_AND_EXC_RESET $k0 370 375 sw $sp, ISTATE_OFFSET_SP($k0) 371 376 move $sp, $k0 372 377 378 move $a0, $sp 373 379 jal cache_error 374 move $a0, $sp 380 addiu $sp, -ABI_STACK_FRAME 381 addiu $sp, ABI_STACK_FRAME 375 382 376 383 REGISTERS_LOAD $sp -
kernel/arch/ppc32/src/ppc32.c
r43cd499 r14f8fd4 173 173 ofw_tree_walk_by_device_type("display", display_register, NULL); 174 174 #endif 175 /* Map OFW information into sysinfo */ 176 ofw_sysinfo_map(); 175 177 176 178 /* Initialize IRQ routing */ -
kernel/arch/sparc64/include/context.h
r43cd499 r14f8fd4 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 40 40 #include <align.h> 41 41 42 #define SP_DELTA 42 #define SP_DELTA (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE) 43 43 44 #define context_set(c, _pc, stack, size) \ 45 (c)->pc = ((uintptr_t) _pc) - 8; \ 46 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \ 47 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ 48 (c)->fp = -STACK_BIAS 49 44 #define context_set(c, _pc, stack, size) \ 45 do { \ 46 (c)->pc = ((uintptr_t) _pc) - 8; \ 47 (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \ 48 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ 49 (c)->fp = -STACK_BIAS; \ 50 } while (0) 50 51 51 52 /* -
kernel/arch/sparc64/src/sun4u/sparc64.c
r43cd499 r14f8fd4 94 94 { 95 95 if (config.cpu_active == 1) { 96 /* Map OFW information into sysinfo */ 97 ofw_sysinfo_map(); 98 96 99 /* 97 100 * We have 2^11 different interrupt vectors. -
kernel/arch/sparc64/src/sun4v/sparc64.c
r43cd499 r14f8fd4 92 92 { 93 93 if (config.cpu_active == 1) { 94 /* Map OFW information into sysinfo */ 95 ofw_sysinfo_map(); 96 94 97 /* 95 98 * We have 2^11 different interrupt vectors.
Note:
See TracChangeset
for help on using the changeset viewer.