summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2008-07-22 05:50:57 +0000
committerTill Straumann <strauman@slac.stanford.edu>2008-07-22 05:50:57 +0000
commit336495b9c0d19fd4cc222ca18c39be4163d639c3 (patch)
tree23f2d7018a37c1f460c6b5f5421bda0ec611feae /c
parent2008-07-21 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-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')
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/ChangeLog13
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c24
2 files changed, 21 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex/ChangeLog b/c/src/lib/libbsp/powerpc/virtex/ChangeLog
index 1206fed7b9..c1cada054a 100644
--- a/c/src/lib/libbsp/powerpc/virtex/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/virtex/ChangeLog
@@ -1,5 +1,18 @@
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.
+
+2008-07-21 Till Straumann <strauman@slac.stanford.edu>
+
* dlentry/dlentry.S: load R13 with _SDA_BASE_ so that
SVR4-ABI access of short data area works. No support
for R2/sdata2/eabi, so far but that would be easy
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);
}
}