1 /* Copyright 2000 AG Electronics Ltd. */
2 /* This code is distributed without warranty under the GPL v2 (see COPYING) */
5 * The assumption is that we're located in ROM and we have a fake stack
6 * located in cache. Our task is to turn on memory proper, the finish
7 * configuring the machine.
12 #include <ppc_asm.tmpl>
19 * init stack pointer to real ram now that memory is on
22 addi r1, r1, _estack@l
32 addi r7, r7, _estack@l
55 * Set up the EABI pointers, before we enter any C code
57 lis r13, _SDA_BASE_@ha
58 addi r13, r13, _SDA_BASE_@l
59 lis r2, _SDA2_BASE_@ha
60 addi r2, r2, _SDA2_BASE_@l
63 * load start address into SRR0 for rfi
65 lis r3, hardwaremain@ha
66 addi r3, r3, hardwaremain@l
70 * load the current MSR into SRR1 so that it will be copied
71 * back into MSR on rfi
74 mtspr SRR1, r4 // load SRR1 with r4
77 * If something returns after rfi then die
84 * Complete rest of initialization in C (hardwaremain)
89 * Stop here if something goes wrong
95 /* Remove need for ecrti.o and ectrn.o */