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
20 * Note: We use the last 8 bytes on the stack to hold struct cpu_info,
21 * Which are initialized to zero as we clear the stack.
25 addi r1, r1, _estack@l
35 addi r7, r7, _estack@l
58 * Set up the EABI pointers, before we enter any C code
60 lis r13, _SDA_BASE_@ha
61 addi r13, r13, _SDA_BASE_@l
62 lis r2, _SDA2_BASE_@ha
63 addi r2, r2, _SDA2_BASE_@l
66 * load start address into SRR0 for rfi
68 lis r3, hardwaremain@ha
69 addi r3, r3, hardwaremain@l
73 * load the current MSR into SRR1 so that it will be copied
74 * back into MSR on rfi
77 mtspr SRR1, r4 // load SRR1 with r4
80 * If something returns after rfi then die
87 * Complete rest of initialization in C (hardwaremain)
92 * Stop here if something goes wrong
98 /* Remove need for ecrti.o and ectrn.o */