summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-10-23 07:32:46 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-10-23 07:32:46 +0000
commit2d2de4eba16374ea05fc7ee9cd257ad0d4ebf2ca (patch)
tree45161e8d9a9d0a9c483b84d915085c0230b09ea0 /c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
parent2009-10-23 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-2d2de4eba16374ea05fc7ee9cd257ad0d4ebf2ca.tar.bz2
Update for exception support changes.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c')
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
index 6cfa7e2853..9e691e5b82 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
@@ -21,12 +21,11 @@
*/
#include <libcpu/powerpc-utility.h>
-#include <libcpu/raw_exception.h>
#include <bsp.h>
+#include <bsp/vectors.h>
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
-#include <bsp/ppc_exc_bspsupp.h>
#ifdef HAS_UBOOT
@@ -84,13 +83,12 @@ void _BSP_Fatal_error(unsigned n)
void bsp_start( void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- int rv = 0;
ppc_cpu_id_t myCpu;
ppc_cpu_revision_t myCpuRevision;
- uint32_t interrupt_stack_start = (uint32_t) bsp_interrupt_stack_start;
- uint32_t interrupt_stack_size = (uint32_t) bsp_interrupt_stack_size;
+ uintptr_t interrupt_stack_start = (uintptr_t) bsp_interrupt_stack_start;
+ uintptr_t interrupt_stack_size = (uintptr_t) bsp_interrupt_stack_size;
/*
* Get CPU identification dynamically. Note that the get_ppc_cpu_type() function
@@ -130,22 +128,25 @@ void bsp_start( void)
#endif /* HAS_UBOOT */
/* Initialize exception handler */
- ppc_exc_initialize(
+ sc = ppc_exc_initialize(
PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
interrupt_stack_start,
interrupt_stack_size
);
+ if (sc != RTEMS_SUCCESSFUL) {
+ BSP_panic("cannot initialize exceptions");
+ }
/* Install default handler for the decrementer exception */
- rv = ppc_exc_set_handler( ASM_DEC_VECTOR, mpc83xx_decrementer_exception_handler);
- if (rv < 0) {
- BSP_panic( "Cannot install decrementer exception handler!\n");
+ sc = ppc_exc_set_handler( ASM_DEC_VECTOR, mpc83xx_decrementer_exception_handler);
+ if (sc != RTEMS_SUCCESSFUL) {
+ BSP_panic("cannot install decrementer exception handler");
}
/* Initalize interrupt support */
sc = bsp_interrupt_initialize();
if (sc != RTEMS_SUCCESSFUL) {
- BSP_panic( "Cannot intitialize interrupt support\n");
+ BSP_panic("cannot intitialize interrupts\n");
}
#ifdef SHOW_MORE_INIT_SETTINGS