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