diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-18 16:44:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-24 11:36:28 +0200 |
commit | be96cb4345554fac614b252fe8f78dbf32c3a981 (patch) | |
tree | e69c244a4e5ab5dd11bdd4c14ea2c5ef66ef6c34 /bsps/sparc/leon3/start/bspstart.c | |
parent | bsps: bsp_interrupt_handler_dispatch_unchecked() (diff) | |
download | rtems-be96cb4345554fac614b252fe8f78dbf32c3a981.tar.bz2 |
sparc: Simplify trap table initialization
Move _ISR_Handler() to a separate file since it is now only used if a handler
is installed by _CPU_ISR_install_raw_handler().
Statically initialize the traps for external interrupts to use the new
_SPARC_Interrupt_trap() which directly dispatches the interrupt handlers
installed by rtems_interrupt_handler_install() via the BSP-provided
_SPARC_Interrupt_dispatch().
Since the trap table is now fully statically initialized, there is no longer a
dependency on the Cache Manager in the default configuration.
Update #4458.
Diffstat (limited to 'bsps/sparc/leon3/start/bspstart.c')
-rw-r--r-- | bsps/sparc/leon3/start/bspstart.c | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/bsps/sparc/leon3/start/bspstart.c b/bsps/sparc/leon3/start/bspstart.c index 69ff519189..75042e4c20 100644 --- a/bsps/sparc/leon3/start/bspstart.c +++ b/bsps/sparc/leon3/start/bspstart.c @@ -20,6 +20,7 @@ */ #include <bsp.h> +#include <bsp/irq-generic.h> #include <leon.h> #include <bsp/bootcard.h> #include <rtems/sysinit.h> @@ -66,6 +67,10 @@ static inline int set_snooping(void) void bsp_start( void ) { CPU_SPARC_HAS_SNOOPING = set_snooping(); + +#ifndef RTEMS_DRVMGR_STARTUP + bsp_interrupt_initialize(); +#endif } static void leon3_cpu_index_init(void) @@ -84,38 +89,13 @@ RTEMS_SYSINIT_ITEM( RTEMS_SYSINIT_ORDER_FIRST ); -static void leon3_interrupt_common_init( void ) -{ - /* Initialize shared interrupt handling, must be done after IRQ - * controller has been found and initialized. - */ - BSP_shared_interrupt_init(); -} - -/* - * Called just before drivers are initialized. Is used to initialize shared - * interrupt handling. - */ -static void leon3_pre_driver_hook( void ) -{ -#ifndef RTEMS_DRVMGR_STARTUP - leon3_interrupt_common_init(); -#endif -} - -RTEMS_SYSINIT_ITEM( - leon3_pre_driver_hook, - RTEMS_SYSINIT_BSP_PRE_DRIVERS, - RTEMS_SYSINIT_ORDER_MIDDLE -); - -#ifdef RTEMS_DRVMGR_STARTUP /* * Initialize shared interrupt handling, must be done after IRQ controller has * been found and initialized. */ +#ifdef RTEMS_DRVMGR_STARTUP RTEMS_SYSINIT_ITEM( - leon3_interrupt_common_init, + bsp_interrupt_initialize, RTEMS_SYSINIT_DRVMGR_LEVEL_1, RTEMS_SYSINIT_ORDER_LAST_BUT_5 ); |