From 0ca6d0d9386ba4d4c44b4b4107ee80444f325efe Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 17 Dec 2007 22:35:25 +0000 Subject: 2007-12-17 Joel Sherrill * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. --- cpukit/score/cpu/arm/ChangeLog | 4 ++++ cpukit/score/cpu/arm/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/avr/ChangeLog | 4 ++++ cpukit/score/cpu/avr/rtems/score/cpu.h | 4 ++++ cpukit/score/cpu/bfin/ChangeLog | 4 ++++ cpukit/score/cpu/bfin/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/c4x/ChangeLog | 4 ++++ cpukit/score/cpu/c4x/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/h8300/ChangeLog | 4 ++++ cpukit/score/cpu/h8300/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/i386/ChangeLog | 4 ++++ cpukit/score/cpu/i386/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/m68k/ChangeLog | 4 ++++ cpukit/score/cpu/m68k/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/mips/ChangeLog | 4 ++++ cpukit/score/cpu/mips/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/nios2/ChangeLog | 4 ++++ cpukit/score/cpu/nios2/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/no_cpu/ChangeLog | 4 ++++ cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 8 ++++++++ cpukit/score/cpu/powerpc/ChangeLog | 4 ++++ cpukit/score/cpu/powerpc/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/sh/ChangeLog | 4 ++++ cpukit/score/cpu/sh/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/sparc/ChangeLog | 4 ++++ cpukit/score/cpu/sparc/rtems/score/cpu.h | 3 +++ cpukit/score/cpu/unix/ChangeLog | 4 ++++ cpukit/score/cpu/unix/rtems/score/cpu.h | 3 +++ 28 files changed, 104 insertions(+) (limited to 'cpukit') diff --git a/cpukit/score/cpu/arm/ChangeLog b/cpukit/score/cpu/arm/ChangeLog index 67d90b2c4b..081a4fe9db 100644 --- a/cpukit/score/cpu/arm/ChangeLog +++ b/cpukit/score/cpu/arm/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/score/cpu_asm.h: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index 0c3da70d18..3b6eff176a 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -354,6 +354,9 @@ typedef struct { uint32_t register_pc; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->register_sp + typedef struct { double some_float_register; } Context_Control_fp; diff --git a/cpukit/score/cpu/avr/ChangeLog b/cpukit/score/cpu/avr/ChangeLog index ed4b458a8f..1cdcfe8e74 100644 --- a/cpukit/score/cpu/avr/ChangeLog +++ b/cpukit/score/cpu/avr/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/score/avr.h: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/avr/rtems/score/cpu.h b/cpukit/score/cpu/avr/rtems/score/cpu.h index d38dc692a9..b993c336d5 100644 --- a/cpukit/score/cpu/avr/rtems/score/cpu.h +++ b/cpukit/score/cpu/avr/rtems/score/cpu.h @@ -408,8 +408,12 @@ extern "C" { typedef struct { uint32_t some_integer_register; uint32_t some_system_register; + uint32_t stack_pointer; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->stack_pointer + typedef struct { double some_float_register; } Context_Control_fp; diff --git a/cpukit/score/cpu/bfin/ChangeLog b/cpukit/score/cpu/bfin/ChangeLog index 64b8dd50bd..384721406e 100644 --- a/cpukit/score/cpu/bfin/ChangeLog +++ b/cpukit/score/cpu/bfin/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * cpu.c, irq.c, rtems/score/cpu_asm.h: Sweep to make sure grep for diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h index 2199c8bfd3..3278a606e7 100644 --- a/cpukit/score/cpu/bfin/rtems/score/cpu.h +++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h @@ -525,6 +525,9 @@ typedef struct { */ } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->stack_pointer + /** * @ingroup CPUContext Management * This defines the complete set of floating point registers that must diff --git a/cpukit/score/cpu/c4x/ChangeLog b/cpukit/score/cpu/c4x/ChangeLog index 61fd4b1c44..ba86673678 100644 --- a/cpukit/score/cpu/c4x/ChangeLog +++ b/cpukit/score/cpu/c4x/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/tic4x/c4xio.h: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/c4x/rtems/score/cpu.h b/cpukit/score/cpu/c4x/rtems/score/cpu.h index 6809c1d14e..612d6c5668 100644 --- a/cpukit/score/cpu/c4x/rtems/score/cpu.h +++ b/cpukit/score/cpu/c4x/rtems/score/cpu.h @@ -474,6 +474,9 @@ typedef struct { unsigned int sp; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->sp + typedef struct { } Context_Control_fp; diff --git a/cpukit/score/cpu/h8300/ChangeLog b/cpukit/score/cpu/h8300/ChangeLog index 936c6ab50d..3e318a434a 100644 --- a/cpukit/score/cpu/h8300/ChangeLog +++ b/cpukit/score/cpu/h8300/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-04 Joel Sherrill * cpu.c, rtems/score/cpu.h: Move interrupt_stack_size field from CPU diff --git a/cpukit/score/cpu/h8300/rtems/score/cpu.h b/cpukit/score/cpu/h8300/rtems/score/cpu.h index 55506442d5..4843e09871 100644 --- a/cpukit/score/cpu/h8300/rtems/score/cpu.h +++ b/cpukit/score/cpu/h8300/rtems/score/cpu.h @@ -388,6 +388,9 @@ typedef struct { uint32_t xxx nogap; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->er7 + typedef struct { double some_float_register[2]; } Context_Control_fp; diff --git a/cpukit/score/cpu/i386/ChangeLog b/cpukit/score/cpu/i386/ChangeLog index cb87edb03f..cfdf110400 100644 --- a/cpukit/score/cpu/i386/ChangeLog +++ b/cpukit/score/cpu/i386/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/score/idtr.h: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index 616d1dfb58..812b2f569b 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -107,6 +107,9 @@ typedef struct { uint32_t edi; /* extended destination index flags register */ } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->esp + /* * FP context save area for the i387 numeric coprocessors. */ diff --git a/cpukit/score/cpu/m68k/ChangeLog b/cpukit/score/cpu/m68k/ChangeLog index dedb81c22c..b7dd621aec 100644 --- a/cpukit/score/cpu/m68k/ChangeLog +++ b/cpukit/score/cpu/m68k/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/m68k/m68302.h, rtems/m68k/m68360.h: Sweep to make sure grep for diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index 57652ca3e0..1d55b8bb68 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -122,6 +122,9 @@ typedef struct { void *a7_msp; /* (a7) master stack pointer */ } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->a7_msp + /* * Floating point context ares */ diff --git a/cpukit/score/cpu/mips/ChangeLog b/cpukit/score/cpu/mips/ChangeLog index ccb047ddc4..cbacb142da 100644 --- a/cpukit/score/cpu/mips/ChangeLog +++ b/cpukit/score/cpu/mips/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-04 Joel Sherrill * cpu.c, rtems/score/cpu.h: Move interrupt_stack_size field from CPU diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h index 2b9727fd80..8c9a24fdc0 100644 --- a/cpukit/score/cpu/mips/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h @@ -402,6 +402,9 @@ typedef struct { __MIPS_REGISTER_TYPE c0_epc; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->sp + /* WARNING: If this structure is modified, the constants in cpu.h * must also be updated. */ diff --git a/cpukit/score/cpu/nios2/ChangeLog b/cpukit/score/cpu/nios2/ChangeLog index 26b6a2c192..948d5719d6 100644 --- a/cpukit/score/cpu/nios2/ChangeLog +++ b/cpukit/score/cpu/nios2/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * irq.c: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h index ad066305b6..1372fb9dd7 100644 --- a/cpukit/score/cpu/nios2/rtems/score/cpu.h +++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h @@ -465,6 +465,9 @@ typedef struct { /* ipending? */ } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->sp + /** * @ingroup CPUContext Management * This defines the complete set of floating point registers that must diff --git a/cpukit/score/cpu/no_cpu/ChangeLog b/cpukit/score/cpu/no_cpu/ChangeLog index 0e902c3034..5932fcef42 100644 --- a/cpukit/score/cpu/no_cpu/ChangeLog +++ b/cpukit/score/cpu/no_cpu/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-11 Joel Sherrill * rtems/score/cpu.h: Style. diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index 97072b4b62..d175511616 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -460,8 +460,16 @@ typedef struct { * registers that need to be saved at a context switch. */ uint32_t some_system_register; + + /** This field is a hint that a port will have a register that + * is the stack pointer. + */ + uint32_t stack_pointer; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->stack_pointer + /** * @ingroup CPUContext Management * This defines the complete set of floating point registers that must diff --git a/cpukit/score/cpu/powerpc/ChangeLog b/cpukit/score/cpu/powerpc/ChangeLog index 54fe01072d..d23fc8634c 100644 --- a/cpukit/score/cpu/powerpc/ChangeLog +++ b/cpukit/score/cpu/powerpc/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/powerpc/registers.h, rtems/score/cpu.h: Sweep to make sure grep diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index f69f981827..e0be8f52bc 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -251,6 +251,9 @@ typedef struct { uint32_t msr; /* Initial interrupt level */ } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->gpr1 + typedef struct { /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over * procedure calls. However, this would mean that the interrupt diff --git a/cpukit/score/cpu/sh/ChangeLog b/cpukit/score/cpu/sh/ChangeLog index 7af7910045..d06990665c 100644 --- a/cpukit/score/cpu/sh/ChangeLog +++ b/cpukit/score/cpu/sh/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-04 Joel Sherrill * cpu.c, rtems/score/cpu.h: Move interrupt_stack_size field from CPU diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h index 8fc01bd9e4..8870833857 100644 --- a/cpukit/score/cpu/sh/rtems/score/cpu.h +++ b/cpukit/score/cpu/sh/rtems/score/cpu.h @@ -365,6 +365,9 @@ typedef struct { } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->r15 + typedef struct { #if SH_HAS_FPU #ifdef SH4_USE_X_REGISTERS diff --git a/cpukit/score/cpu/sparc/ChangeLog b/cpukit/score/cpu/sparc/ChangeLog index bc03c0a2f3..ea6892f3a8 100644 --- a/cpukit/score/cpu/sparc/ChangeLog +++ b/cpukit/score/cpu/sparc/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-04 Joel Sherrill * cpu.c, rtems/score/cpu.h: Move interrupt_stack_size field from CPU diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h index c5c5aec637..e9678420af 100644 --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h @@ -336,6 +336,9 @@ typedef struct { uint32_t isr_dispatch_disable; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + (_context)->o6_sp + #endif /* ASM */ /* diff --git a/cpukit/score/cpu/unix/ChangeLog b/cpukit/score/cpu/unix/ChangeLog index aac1bcf4aa..c582284e9f 100644 --- a/cpukit/score/cpu/unix/ChangeLog +++ b/cpukit/score/cpu/unix/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Joel Sherrill + + * rtems/score/cpu.h: Add _CPU_Context_Get_SP() for stack check utility. + 2007-12-17 Joel Sherrill * rtems/asm.h: Sweep to make sure grep for COPYRIGHT passes. diff --git a/cpukit/score/cpu/unix/rtems/score/cpu.h b/cpukit/score/cpu/unix/rtems/score/cpu.h index 2d5d752748..567a52bddf 100644 --- a/cpukit/score/cpu/unix/rtems/score/cpu.h +++ b/cpukit/score/cpu/unix/rtems/score/cpu.h @@ -485,6 +485,9 @@ typedef struct { char Area[ SIZEOF_CPU_CONTEXT ] CONTEXT_STRUCTURE_ALIGNMENT; } Context_Control; +#define _CPU_Context_Get_SP( _context ) \ + NULL + typedef struct { } Context_Control_fp; -- cgit v1.2.3