diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2008-07-22 05:50:57 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2008-07-22 05:50:57 +0000 |
commit | 336495b9c0d19fd4cc222ca18c39be4163d639c3 (patch) | |
tree | 23f2d7018a37c1f460c6b5f5421bda0ec611feae /c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c | |
parent | 2008-07-21 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-336495b9c0d19fd4cc222ca18c39be4163d639c3.tar.bz2 |
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
* startup/bspstart.c: Removed SPRG0 warning - this BSP
is OK.
Use interrupt stack limits from linker script.
No need to reserve space beyond '_end'. linkcmds now
reserves space below '_end'.
Use low-level exception handling support from
new-exceptions/bspsupport.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c index 72832ebc2e..8bac1b24cd 100644 --- a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c @@ -56,8 +56,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 <string.h> #include <fcntl.h> @@ -70,8 +68,6 @@ #include <libcpu/spr.h> #include <rtems/powerpc/powerpc.h> -SPR_RW(SPRG1) - #include RTEMS_XPARAMETERS_H #include <stdio.h> @@ -154,8 +150,8 @@ void bsp_pretasking_hook(void) void bsp_start( void ) { - extern unsigned long *intrStackPtr; - register unsigned char* intrStack; + extern unsigned char IntrStack_start[]; + extern unsigned char IntrStack_end[]; ppc_cpu_id_t myCpu; ppc_cpu_revision_t myCpuRevision; @@ -183,17 +179,13 @@ void bsp_start( void ) bsp_timer_least_valid = 3; /* - * Initialize some SPRG registers related to irq handling - */ - - intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE); - _write_SPRG1((unsigned int)intrStack); - - /* * Initialize default raw exception handlers. - * See shared/vectors/vectors_init.c */ - initialize_exceptions(); + ppc_exc_initialize( + PPC_INTERRUPT_DISABLE_MASK_DEFAULT | MSR_CE, + (uint32_t)IntrStack_start, + IntrStack_end - IntrStack_start + ); /* * Install our own set of exception vectors @@ -223,7 +215,7 @@ void bsp_start( void ) extern int _end; /* round _end up to next 64k boundary for start of workspace */ - Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0x18000) & 0xffff0000); + Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0xffff) & 0xffff0000); } } |