diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-05 22:06:20 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-05 22:06:20 -0400 |
commit | 9b6b563c0d2d25ecc3111916031aa7255543fbfb (patch) | |
tree | 07fd029308055461caa157d15a88c01861efc6bb /arch/powerpc/kernel/head.S | |
parent | b85a046af3a260e079505e8023ccd10e01cf4f2b (diff) |
powerpc: Merge in the ppc64 version of the prom code.
This brings in the ppc64 version of prom_init.c, prom.c and btext.c
and makes them work for ppc32. This also brings in the new calling
convention, where the first entry to the kernel (with r5 != 0) goes
to the prom_init code, which then restarts from the beginning (with
r5 == 0) after it has done its stuff.
For now this also brings in the ppc32 version of setup.c. It also
merges lmb.h.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head.S')
-rw-r--r-- | arch/powerpc/kernel/head.S | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/head.S b/arch/powerpc/kernel/head.S index 2c3a1d34e3c7..d49bff1a7d51 100644 --- a/arch/powerpc/kernel/head.S +++ b/arch/powerpc/kernel/head.S | |||
@@ -134,11 +134,13 @@ __start: | |||
134 | * because OF may have I/O devices mapped into that area | 134 | * because OF may have I/O devices mapped into that area |
135 | * (particularly on CHRP). | 135 | * (particularly on CHRP). |
136 | */ | 136 | */ |
137 | mr r31,r3 /* save parameters */ | 137 | cmpwi 0,r5,0 |
138 | beq 1f | ||
139 | bl prom_init | ||
140 | trap | ||
141 | |||
142 | 1: mr r31,r3 /* save parameters */ | ||
138 | mr r30,r4 | 143 | mr r30,r4 |
139 | mr r29,r5 | ||
140 | mr r28,r6 | ||
141 | mr r27,r7 | ||
142 | li r24,0 /* cpu # */ | 144 | li r24,0 /* cpu # */ |
143 | 145 | ||
144 | /* | 146 | /* |
@@ -204,8 +206,7 @@ __after_mmu_off: | |||
204 | * On CHRP, we are loaded at 0x10000 since OF on CHRP uses | 206 | * On CHRP, we are loaded at 0x10000 since OF on CHRP uses |
205 | * the exception vectors at 0 (and therefore this copy | 207 | * the exception vectors at 0 (and therefore this copy |
206 | * overwrites OF's exception vectors with our own). | 208 | * overwrites OF's exception vectors with our own). |
207 | * If the MMU is already turned on, we copy stuff to KERNELBASE, | 209 | * The MMU is off at this point. |
208 | * otherwise we copy it to 0. | ||
209 | */ | 210 | */ |
210 | bl reloc_offset | 211 | bl reloc_offset |
211 | mr r26,r3 | 212 | mr r26,r3 |
@@ -1187,9 +1188,6 @@ start_here: | |||
1187 | */ | 1188 | */ |
1188 | mr r3,r31 | 1189 | mr r3,r31 |
1189 | mr r4,r30 | 1190 | mr r4,r30 |
1190 | mr r5,r29 | ||
1191 | mr r6,r28 | ||
1192 | mr r7,r27 | ||
1193 | bl machine_init | 1191 | bl machine_init |
1194 | bl MMU_init | 1192 | bl MMU_init |
1195 | 1193 | ||