forked from Imagelibrary/rtems
2011-07-27 Till Straumann <strauman@slac.stanford.edu>
* shared/start/start.S, shared/start/preload.S: Make sure stack is 16-byte aligned and the TOS is tagged with a NULL pointer (used as a terminator when printing stack traces).
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2011-07-27 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* shared/start/start.S, shared/start/preload.S:
|
||||||
|
Make sure stack is 16-byte aligned and the TOS
|
||||||
|
is tagged with a NULL pointer (used as a terminator
|
||||||
|
when printing stack traces).
|
||||||
|
|
||||||
2011-07-26 Till Straumann <strauman@slac.stanford.edu>
|
2011-07-26 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* shared/irq/openpic_i8259_irq.c: silenced compiler warnings.
|
* shared/irq/openpic_i8259_irq.c: silenced compiler warnings.
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
* if DESTINATION_ADDR is not 0
|
* if DESTINATION_ADDR is not 0
|
||||||
*/
|
*/
|
||||||
#define KERNELBASE 0x0
|
#define KERNELBASE 0x0
|
||||||
#define INITIAL_STACK 0x78 /* 8-byte aligned */
|
#define INITIAL_STACK 0x70 /* 16-byte aligned */
|
||||||
#define CACHE_LINE_SIZE PPC_CACHE_ALIGNMENT /* autodetect doesn't work, see below */
|
#define CACHE_LINE_SIZE PPC_CACHE_ALIGNMENT /* autodetect doesn't work, see below */
|
||||||
#define ASSUME_RTEMS_INSTALLS_VECTORS /* assume we need not load vectors */
|
#define ASSUME_RTEMS_INSTALLS_VECTORS /* assume we need not load vectors */
|
||||||
#define DONT_USE_R5_ENTRY /* always dynamically determine the address we're running from */
|
#define DONT_USE_R5_ENTRY /* always dynamically determine the address we're running from */
|
||||||
@@ -211,6 +211,9 @@ return_here:
|
|||||||
|
|
||||||
/* setup initial stack for rtems early boot */
|
/* setup initial stack for rtems early boot */
|
||||||
li r1,INITIAL_STACK
|
li r1,INITIAL_STACK
|
||||||
|
/* tag TOS with a NULL pointer (for stack trace) */
|
||||||
|
li r0, 0
|
||||||
|
stw r0, 0(r1)
|
||||||
/* disable the MMU and fire up rtems */
|
/* disable the MMU and fire up rtems */
|
||||||
mfmsr r0
|
mfmsr r0
|
||||||
ori r0,r0,MSR_IR|MSR_DR|MSR_IP|MSR_ME
|
ori r0,r0,MSR_IR|MSR_DR|MSR_IP|MSR_ME
|
||||||
|
|||||||
@@ -129,6 +129,12 @@ enter_C_code:
|
|||||||
*/
|
*/
|
||||||
li r0, (CPU_STACK_ALIGNMENT-1)
|
li r0, (CPU_STACK_ALIGNMENT-1)
|
||||||
andc r1, r9, r0
|
andc r1, r9, r0
|
||||||
|
/*
|
||||||
|
* Tag TOS with a NULL (terminator for stack dump)
|
||||||
|
*/
|
||||||
|
li r0, 0
|
||||||
|
stw r0, 0(r1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are now in a environment that is totally independent from
|
* We are now in a environment that is totally independent from
|
||||||
* bootloader setup.
|
* bootloader setup.
|
||||||
|
|||||||
Reference in New Issue
Block a user