2011-27-28 Till Straumann <strauman@slac.stanford.edu>

* start/start.S: Align stack and tag TOS with a NULL
	pointer (help terminate when walking the stack).
This commit is contained in:
Till Straumann
2011-07-28 19:50:28 +00:00
parent 6963b2e713
commit 1a1a151c48
2 changed files with 21 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2011-27-28 Till Straumann <strauman@slac.stanford.edu>
* start/start.S: Align stack and tag TOS with a NULL
pointer (help terminate when walking the stack).
2011-06-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove references to non-existing files.

View File

@@ -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