summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/eth_comm/startup
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-07-18 17:24:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-07-18 17:24:18 +0000
commitae20a3e22e14ed65dd34666ef54e7956f57714e0 (patch)
tree08437fb9b50c9877fd73189d647cef9a54581463 /c/src/lib/libbsp/powerpc/eth_comm/startup
parent2003-07-18 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-ae20a3e22e14ed65dd34666ef54e7956f57714e0.tar.bz2
2003-07-18 Till Straumann <strauman@slac.stanford.edu>
PR 288/rtems * irq/irq_asm.S, startup/bspstart.c: _ISR_Nest_level is now properly maintained.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/eth_comm/startup')
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c b/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
index 5832ee1307..57381115cf 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
@@ -25,6 +25,7 @@
#include <rtems/libcsupport.h>
#include <info.h>
#include <libcpu/cpuIdent.h>
+#include <libcpu/spr.h>
#include <rtems/bspIo.h>
boardinfo_t M860_binfo;
@@ -108,6 +109,8 @@ bsp_pretasking_hook(void)
#endif
}
+SPR_RW(SPRG0)
+SPR_RW(SPRG1)
void bsp_start(void)
{
@@ -117,7 +120,6 @@ void bsp_start(void)
ppc_cpu_id_t myCpu;
ppc_cpu_revision_t myCpuRevision;
register unsigned char* intrStack;
- register unsigned int intrNestingLevel = 0;
extern void cpu_init(void);
/*
@@ -134,8 +136,11 @@ void bsp_start(void)
*/
intrStack = (((unsigned char*)&intrStackPtr) - CPU_MINIMUM_STACK_FRAME_SIZE);
- asm volatile ("mtspr 273, %0" : "=r" (intrStack) : "0" (intrStack));
- asm volatile ("mtspr 272, %0" : "=r" (intrNestingLevel) : "0" (intrNestingLevel));
+
+ _write_SPRG1((unsigned int)intrStack);
+
+ /* Signal them that this BSP has fixed PR288 - eventually, this should go away */
+ _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
/*
* Install our own set of exception vectors