summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/startup/bspstart.c')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index 24ecda103d..a28a2c4e35 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -247,7 +247,8 @@ void bsp_start( void )
#if !defined(mpc8240) && !defined(mpc8245)
unsigned l2cr;
#endif
- register unsigned char* intrStack;
+ register uint32_t intrStack;
+ register uint32_t *intrStackPtr;
unsigned char *work_space_start;
ppc_cpu_id_t myCpu;
ppc_cpu_revision_t myCpuRevision;
@@ -307,16 +308,17 @@ void bsp_start( void )
* This could be done later (e.g in IRQ_INIT) but it helps to understand
* some settings below...
*/
- intrStack = ((unsigned char*) __rtems_end) +
- INIT_STACK_SIZE + INTR_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE;
+ intrStack = ((uint32_t) __rtems_end) +
+ INIT_STACK_SIZE + INTR_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE;
/* make sure it's properly aligned */
- (uint32_t)intrStack &= ~(CPU_STACK_ALIGNMENT-1);
+ intrStack &= ~(CPU_STACK_ALIGNMENT-1);
/* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
- *((uint32_t*)intrStack) = 0;
+ intrStackPtr = (uint32_t*) intrStack;
+ *intrStackPtr = 0;
- _write_SPRG1((unsigned int)intrStack);
+ _write_SPRG1(intrStack);
/* signal them that we have fixed PR288 - eventually, this should go away */
_write_SPRG0(PPC_BSP_HAS_FIXED_PR288);