summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-07-11 10:01:37 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-07-11 10:01:37 +0000
commita86f3aac965e39414f19d7e67ed50400583cd598 (patch)
tree24692c56d9b7480af4482d4ac5930d099c3396b1 /c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
parentadded variant to gen68360 BSP (diff)
downloadrtems-a86f3aac965e39414f19d7e67ed50400583cd598.tar.bz2
adapted powerpc BSPs to new exception code
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c54
1 files changed, 22 insertions, 32 deletions
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
index 561ecb61c5..b3d309c828 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
@@ -19,6 +19,8 @@
* $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 <stdlib.h>
@@ -51,7 +53,6 @@ extern unsigned long __rtems_end[];
extern void bsp_cleanup(void);
extern void BSP_vme_config();
-SPR_RW(SPRG0)
SPR_RW(SPRG1)
/*
@@ -238,8 +239,8 @@ SPR_RW(HID1)
void bsp_start( void )
{
unsigned char *stack;
-register uint32_t intrStack;
-register uint32_t *intrStackPtr;
+uint32_t intrStackStart;
+uint32_t intrStackSize;
unsigned char *work_space_start;
char *chpt;
ppc_cpu_id_t myCpu;
@@ -286,40 +287,27 @@ VpdBufRec vpdData [] = {
*((uint32_t*)stack) = 0;
/*
- * Initialize the interrupt related settings
- * SPRG1 = software managed IRQ stack
- *
- * This could be done later (e.g in IRQ_INIT) but it helps to understand
- * some settings below...
+ * Initialize the interrupt related settings.
*/
- BSP_heap_start = ((uint32_t) __rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE;
-
- /* reserve space for the marker/tag frame */
- intrStack = BSP_heap_start - PPC_MINIMUM_STACK_FRAME_SIZE;
-
- /* make sure it's properly aligned */
- intrStack &= ~(CPU_STACK_ALIGNMENT-1);
-
- /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
- intrStackPtr = (uint32_t*) intrStack;
- *intrStackPtr = 0;
-
- _write_SPRG1(intrStack);
-
- /* signal them that we have fixed PR288 - eventually, this should go away */
- _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
+ intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
+ intrStackSize = INTR_STACK_SIZE;
+ BSP_heap_start = intrStackStart + intrStackSize;
/*
- * Initialize default raw exception handlers. See vectors/vectors_init.c
+ * Initialize default raw exception handlers.
*/
- initialize_exceptions();
+ ppc_exc_initialize(
+ PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
+ intrStackStart,
+ intrStackSize
+ );
printk("CPU 0x%x - rev 0x%x\n", myCpu, myCpuRevision);
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Additionnal boot options are %s\n", BSP_commandline_string);
printk("Initial system stack at %x\n", stack);
- printk("Software IRQ stack at %x\n", intrStack);
+ printk("Software IRQ stack starts at %x with size %u\n", intrStackStart, intrStackSize);
#endif
#ifdef SHOW_MORE_INIT_SETTINGS
@@ -418,14 +406,16 @@ VpdBufRec vpdData [] = {
__asm__ __volatile ("sc");
/*
- * Somehow doing the above seems to clobber SPRG0 on the mvme2100. It
- * is probably a not so subtle hint that you do not want to use PPCBug
- * once RTEMS is up and running. Anyway, we still needs to indicate
- * that we have fixed PR288. Eventually, this should go away.
+ * Somehow doing the above seems to clobber SPRG0 on the mvme2100. The
+ * interrupt disable mask is stored in SPRG0. Is this a problem?
*/
- _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
+ ppc_interrupt_set_disable_mask( PPC_INTERRUPT_DISABLE_MASK_DEFAULT);
+
#endif
+/* See above */
+#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
+
if ( (chpt = strstr(BSP_commandline_string,"MEMSZ=")) ) {
char *endp;
uint32_t sz;