From 03b7789ec7d0ffd3621ea4c20d564d2a93e182a5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 26 Apr 2014 15:09:10 +0200 Subject: score: Statically initialize _ISR_Vector_table --- cpukit/score/cpu/arm/rtems/score/cpu.h | 4 ---- cpukit/score/cpu/bfin/cpu_asm.S | 5 ++--- cpukit/score/cpu/h8300/cpu_asm.S | 4 +--- cpukit/score/cpu/i386/rtems/score/cpu.h | 7 ------- cpukit/score/cpu/m68k/cpu_asm.S | 9 ++------ cpukit/score/cpu/mips/cpu_asm.S | 1 - cpukit/score/cpu/mips/rtems/score/cpu.h | 9 -------- cpukit/score/cpu/nios2/Makefile.am | 1 - cpukit/score/cpu/nios2/nios2-initialize-vectors.c | 25 ----------------------- cpukit/score/cpu/nios2/rtems/score/cpu.h | 2 +- cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 17 +++++++++------ cpukit/score/cpu/powerpc/rtems/score/cpu.h | 10 --------- cpukit/score/cpu/v850/rtems/score/cpu.h | 19 ----------------- 13 files changed, 17 insertions(+), 96 deletions(-) delete mode 100644 cpukit/score/cpu/nios2/nios2-initialize-vectors.c (limited to 'cpukit/score/cpu') diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index ccf8c9a834..cb9dc7c409 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -171,10 +171,6 @@ #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 -#define CPU_INTERRUPT_NUMBER_OF_VECTORS 8 - -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - #define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE #define CPU_STACK_MINIMUM_SIZE (1024 * 4) diff --git a/cpukit/score/cpu/bfin/cpu_asm.S b/cpukit/score/cpu/bfin/cpu_asm.S index d594f9223f..015caef448 100644 --- a/cpukit/score/cpu/bfin/cpu_asm.S +++ b/cpukit/score/cpu/bfin/cpu_asm.S @@ -359,9 +359,8 @@ vectorIDLoop: if !cc jump vectorIDLoop; [--sp] = r2; - p0.h = SYM(_ISR_Vector_table); - p0.l = SYM(_ISR_Vector_table); - r2 = [p0]; + r2.h = SYM(_ISR_Vector_table); + r2.l = SYM(_ISR_Vector_table); r1 = r0 << 2; r1 = r1 + r2; p0 = r1; diff --git a/cpukit/score/cpu/h8300/cpu_asm.S b/cpukit/score/cpu/h8300/cpu_asm.S index 0dc79a952b..9e89a83420 100644 --- a/cpukit/score/cpu/h8300/cpu_asm.S +++ b/cpukit/score/cpu/h8300/cpu_asm.S @@ -133,12 +133,10 @@ nested: /* Vector to ISR */ - mov.l @SYM(_ISR_Vector_table),er1 mov er0,er2 ; copy vector shll.l er2 shll.l er2 ; vector = vector * 4 (sizeof(int)) - add.l er2,er1 - mov.l @er1,er1 + mov.l @(SYM(_ISR_Vector_table), er2),er1 jsr @er1 ; er0 = arg1 =vector orc #0xc0,ccr diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index be22d9e217..a9957cbe62 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -315,13 +315,6 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 1024 -/* - * i386 family supports 256 distinct vectors. - */ - -#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256 -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - /* * This is defined if the port has a special way to report the ISR nesting * level. Most ports maintain the variable _ISR_Nest_level. diff --git a/cpukit/score/cpu/m68k/cpu_asm.S b/cpukit/score/cpu/m68k/cpu_asm.S index 4db6723db7..a31c1588a4 100644 --- a/cpukit/score/cpu/m68k/cpu_asm.S +++ b/cpukit/score/cpu/m68k/cpu_asm.S @@ -276,13 +276,8 @@ SYM (_ISR_Handler): addql #1,ISR_NEST_LEVEL | one nest level deeper - movel SYM (_ISR_Vector_table),a0 | a0= base of RTEMS table -#if ( M68K_HAS_PREINDEXING == 1 ) - movel (a0,d0:w:1),a0 | a0 = address of user routine -#else - addal d0,a0 | a0 = address of vector - movel (a0),a0 | a0 = address of user routine -#endif + lea SYM(_ISR_Vector_table),a0 + movel (a0,d0),a0 | a0 = address of user routine lsrl #2,d0 | d0 = vector number movel d0,a7@- | push vector number diff --git a/cpukit/score/cpu/mips/cpu_asm.S b/cpukit/score/cpu/mips/cpu_asm.S index 3450451ada..c58aee1e50 100644 --- a/cpukit/score/cpu/mips/cpu_asm.S +++ b/cpukit/score/cpu/mips/cpu_asm.S @@ -583,7 +583,6 @@ FRAME(_CPU_Context_restore,sp,0,ra) ENDFRAME(_CPU_Context_restore) .extern _Thread_Dispatch -.extern _ISR_Vector_table /* void _DBG_Handler() * diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h index b8719697c5..392a995917 100644 --- a/cpukit/score/cpu/mips/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h @@ -659,15 +659,6 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 -/* - * This defines the number of entries in the ISR_Vector_table managed - * by RTEMS. - */ - -extern unsigned int mips_interrupt_number_of_vectors; -#define CPU_INTERRUPT_NUMBER_OF_VECTORS (mips_interrupt_number_of_vectors) -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - /* * Should be large enough to run all RTEMS tests. This ensures * that a "reasonable" small application should not have any problems. diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am index 62286cd754..6004467228 100644 --- a/cpukit/score/cpu/nios2/Makefile.am +++ b/cpukit/score/cpu/nios2/Makefile.am @@ -33,7 +33,6 @@ libscorecpu_a_SOURCES += nios2-fatal-halt.c libscorecpu_a_SOURCES += nios2-iic-low-level.S libscorecpu_a_SOURCES += nios2-iic-irq.c libscorecpu_a_SOURCES += nios2-initialize.c -libscorecpu_a_SOURCES += nios2-initialize-vectors.c libscorecpu_a_SOURCES += nios2-isr-get-level.c libscorecpu_a_SOURCES += nios2-isr-install-raw-handler.c libscorecpu_a_SOURCES += nios2-isr-install-vector.c diff --git a/cpukit/score/cpu/nios2/nios2-initialize-vectors.c b/cpukit/score/cpu/nios2/nios2-initialize-vectors.c deleted file mode 100644 index da1ee4be1c..0000000000 --- a/cpukit/score/cpu/nios2/nios2-initialize-vectors.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2011 embedded brains GmbH - * - * Copyright (c) 2006 Kolja Waschk (rtemsdev/ixo.de) - * - * COPYRIGHT (c) 1989-2006 - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#include - -#include - -void _CPU_Initialize_vectors( void ) -{ - memset(_ISR_Vector_table, 0, sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS); -} diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h index 6c62a1f8d5..fcfef8d461 100644 --- a/cpukit/score/cpu/nios2/rtems/score/cpu.h +++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h @@ -192,7 +192,7 @@ typedef struct { uint32_t ipending; } CPU_Exception_frame; -void _CPU_Initialize_vectors( void ); +#define _CPU_Initialize_vectors() /** * @brief Macro to disable interrupts. diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index 959fb58a6d..fbf207ad80 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -686,19 +686,24 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; /** * @ingroup CPUInterrupt * - * This defines the number of entries in the @ref _ISR_Vector_table managed - * by RTEMS. + * This defines the number of entries in the _ISR_Vector_table managed by RTEMS + * in case CPU_SIMPLE_VECTORED_INTERRUPTS is defined to TRUE. It must be a + * compile-time constant. * - * Port Specific Information: - * - * XXX document implementation including references if appropriate + * It must be undefined in case CPU_SIMPLE_VECTORED_INTERRUPTS is defined to + * FALSE. */ #define CPU_INTERRUPT_NUMBER_OF_VECTORS 32 /** * @ingroup CPUInterrupt * - * This defines the highest interrupt vector number for this port. + * This defines the highest interrupt vector number for this port in case + * CPU_SIMPLE_VECTORED_INTERRUPTS is defined to TRUE. It must be less than + * CPU_INTERRUPT_NUMBER_OF_VECTORS. It may be not a compile-time constant. + * + * It must be undefined in case CPU_SIMPLE_VECTORED_INTERRUPTS is defined to + * FALSE. */ #define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 3130b3535e..3a51b3112b 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -598,16 +598,6 @@ SCORE_EXTERN struct { #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 -/* - * This defines the number of entries in the ISR_Vector_table managed - * by RTEMS. - * - * NOTE: CPU_INTERRUPT_NUMBER_OF_VECTORS and - * CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER are only used on - * Simple Vectored Architectures and thus are not defined - * for this architecture. - */ - /* * This is defined if the port has a special way to report the ISR nesting * level. Most ports maintain the variable _ISR_Nest_level. Note that diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h index 35ed6e6e31..7234d67a96 100644 --- a/cpukit/score/cpu/v850/rtems/score/cpu.h +++ b/cpukit/score/cpu/v850/rtems/score/cpu.h @@ -549,25 +549,6 @@ typedef struct { */ #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 -/* XXX this should not be needed on PIC architectures */ -/* XXX evaluate removing it */ -#if 0 -/** - * This defines the number of entries in the @ref _ISR_Vector_table managed - * by RTEMS. - * - * Port Specific Information: - * - * XXX document implementation including references if appropriate - */ -#define CPU_INTERRUPT_NUMBER_OF_VECTORS 32 -#endif - -/** - * This defines the highest interrupt vector number for this port. - */ -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - /** * This is defined if the port has a special way to report the ISR nesting * level. Most ports maintain the variable @a _ISR_Nest_level. -- cgit v1.2.3