diff options
Diffstat (limited to 'arch/powerpc/kernel/head_32.S')
| -rw-r--r-- | arch/powerpc/kernel/head_32.S | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 266061924654..a1c4cfd25ded 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
| @@ -183,7 +183,8 @@ __after_mmu_off: | |||
| 183 | bl reloc_offset | 183 | bl reloc_offset |
| 184 | mr r26,r3 | 184 | mr r26,r3 |
| 185 | addis r4,r3,KERNELBASE@h /* current address of _start */ | 185 | addis r4,r3,KERNELBASE@h /* current address of _start */ |
| 186 | cmpwi 0,r4,0 /* are we already running at 0? */ | 186 | lis r5,PHYSICAL_START@h |
| 187 | cmplw 0,r4,r5 /* already running at PHYSICAL_START? */ | ||
| 187 | bne relocate_kernel | 188 | bne relocate_kernel |
| 188 | /* | 189 | /* |
| 189 | * we now have the 1st 16M of ram mapped with the bats. | 190 | * we now have the 1st 16M of ram mapped with the bats. |
| @@ -811,13 +812,13 @@ giveup_altivec: | |||
| 811 | 812 | ||
| 812 | /* | 813 | /* |
| 813 | * This code is jumped to from the startup code to copy | 814 | * This code is jumped to from the startup code to copy |
| 814 | * the kernel image to physical address 0. | 815 | * the kernel image to physical address PHYSICAL_START. |
| 815 | */ | 816 | */ |
| 816 | relocate_kernel: | 817 | relocate_kernel: |
| 817 | addis r9,r26,klimit@ha /* fetch klimit */ | 818 | addis r9,r26,klimit@ha /* fetch klimit */ |
| 818 | lwz r25,klimit@l(r9) | 819 | lwz r25,klimit@l(r9) |
| 819 | addis r25,r25,-KERNELBASE@h | 820 | addis r25,r25,-KERNELBASE@h |
| 820 | li r3,0 /* Destination base address */ | 821 | lis r3,PHYSICAL_START@h /* Destination base address */ |
| 821 | li r6,0 /* Destination offset */ | 822 | li r6,0 /* Destination offset */ |
| 822 | li r5,0x4000 /* # bytes of memory to copy */ | 823 | li r5,0x4000 /* # bytes of memory to copy */ |
| 823 | bl copy_and_flush /* copy the first 0x4000 bytes */ | 824 | bl copy_and_flush /* copy the first 0x4000 bytes */ |
| @@ -1188,11 +1189,11 @@ mmu_off: | |||
| 1188 | 1189 | ||
| 1189 | /* | 1190 | /* |
| 1190 | * Use the first pair of BAT registers to map the 1st 16MB | 1191 | * Use the first pair of BAT registers to map the 1st 16MB |
| 1191 | * of RAM to KERNELBASE. From this point on we can't safely | 1192 | * of RAM to PAGE_OFFSET. From this point on we can't safely |
| 1192 | * call OF any more. | 1193 | * call OF any more. |
| 1193 | */ | 1194 | */ |
| 1194 | initial_bats: | 1195 | initial_bats: |
| 1195 | lis r11,KERNELBASE@h | 1196 | lis r11,PAGE_OFFSET@h |
| 1196 | mfspr r9,SPRN_PVR | 1197 | mfspr r9,SPRN_PVR |
| 1197 | rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ | 1198 | rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ |
| 1198 | cmpwi 0,r9,1 | 1199 | cmpwi 0,r9,1 |
