diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/qemuppc/start/start.S')
-rw-r--r-- | c/src/lib/libbsp/powerpc/qemuppc/start/start.S | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/start/start.S b/c/src/lib/libbsp/powerpc/qemuppc/start/start.S index 5fe24b82b9..55f4076b14 100644 --- a/c/src/lib/libbsp/powerpc/qemuppc/start/start.S +++ b/c/src/lib/libbsp/powerpc/qemuppc/start/start.S @@ -1,12 +1,24 @@ +#include <rtems/score/cpu.h> +#include <rtems/powerpc/powerpc.h> + +#include <bspopts.h> + #.section ".text" .section .entry_point_section,"awx",@progbits .global _start _start: - lis %r1,_stack@h - ori %r1,%r1,_stack@l - li %r3,8192 - mtmsr %r3 + lis %r1,_stack@h + ori %r1,%r1,_stack@l + /* Make sure stack is properly aligned */ + li %r3, CPU_STACK_ALIGNMENT - 1 + andc %r1, %r1, %r3 + /* NULL ptr to back chain */ + li %r3, 0 + stw %r3, 0(%r1) + + li %r3,8192 + mtmsr %r3 /* Read-only small data */ lis %r2, _SDA2_BASE_@h |