diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-10-23 07:32:46 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-10-23 07:32:46 +0000 |
commit | 2d2de4eba16374ea05fc7ee9cd257ad0d4ebf2ca (patch) | |
tree | 45161e8d9a9d0a9c483b84d915085c0230b09ea0 /c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c | |
parent | 2009-10-23 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-2d2de4eba16374ea05fc7ee9cd257ad0d4ebf2ca.tar.bz2 |
Update for exception support changes.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c index 194aeb542f..fc48062bbc 100644 --- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c @@ -35,8 +35,6 @@ * $Id$ */ -#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c). - #include <bsp.h> /* @@ -55,8 +53,6 @@ SPR_RW(SPRG1) -extern unsigned long intrStackPtr; - /* * Driver configuration parameters */ @@ -74,7 +70,9 @@ bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */ void _BSP_GPLED1_on(void); void _BSP_GPLED0_on(void); void cpu_init(void); -void initialize_exceptions(void); + +extern char IntrStack_start []; +extern char intrStack []; void BSP_panic(char *s) { @@ -150,10 +148,10 @@ void _BSP_Uart2_disable() void bsp_start(void) { + rtems_status_code sc = RTEMS_SUCCESSFUL; extern void *_WorkspaceBase; ppc_cpu_id_t myCpu; ppc_cpu_revision_t myCpuRevision; - register unsigned char* intrStack; /* Set MPC8260ADS board LEDS and Uart enable lines */ _BSP_GPLED0_off(); @@ -173,21 +171,24 @@ void bsp_start(void) /* mmu_init(); */ - /* - * Initialize some SPRG registers related to irq handling - */ - intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE); - _write_SPRG1((unsigned int)intrStack); + /* Initialize exception handler */ + /* FIXME: Interrupt stack begin and size */ + sc = ppc_exc_initialize( + PPC_INTERRUPT_DISABLE_MASK_DEFAULT, + (uintptr_t) IntrStack_start, + (uintptr_t) intrStack - (uintptr_t) IntrStack_start + ); + if (sc != RTEMS_SUCCESSFUL) { + BSP_panic("cannot intitialize exceptions"); + } -/* - printk( "About to call initialize_exceptions\n" ); -*/ - /* - * Install our own set of exception vectors - */ + /* Initalize interrupt support */ + sc = bsp_interrupt_initialize(); + if (sc != RTEMS_SUCCESSFUL) { + BSP_panic("cannot intitialize interrupts"); + } - initialize_exceptions(); /* mmu_init(); @@ -227,11 +228,6 @@ void bsp_start(void) m8260.brgc1 = M8260_BRG_EN + (uint32_t)(((uint16_t)((40016384)/(32768)) - 1) << 1) + 0; */ - /* - * Initalize RTEMS IRQ system - */ - BSP_rtems_irq_mng_init(0); - #ifdef SHOW_MORE_INIT_SETTINGS printk("Exit from bspstart\n"); #endif |