Skip to content

Commit

Permalink
powerpc/fsl-booke: Fix address issue when using relocatable kernels
Browse files Browse the repository at this point in the history
When booting a relocatable kernel it needs to jump to the correct
start address, which for BookE parts is usually unchanged
regardless of the physical memory offset.

Recent changes cause problems with how we calculate the start
address, it was always adding the RMO into the start address
which is incorrect. This patch only adds in the RMO offset
if we are in the kexec code path, as it needs the RMO to work
correctly.

Instead of adding the RMO offset in in the common code path, we
can just set r6 to the RMO offset in the kexec code path instead
of to zero, and finally perform the masking in the common code
path

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Matthew McClintock authored and Kumar Gala committed Jul 11, 2010
1 parent af71bcf commit 77154a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/kernel/fsl_booke_entry_mapping.S
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ next_tlb_setup:
bdnz+ next_tlb_setup

/* 7. Jump to our 1:1 mapping */
li r6, 0

mr r6, r25
#else
#error You need to specify the mapping or not use this at all.
#endif
Expand All @@ -217,7 +216,6 @@ next_tlb_setup:
1: mflr r9
rlwimi r6,r9,0,20,31
addi r6,r6,(2f - 1b)
add r6, r6, r25
mtspr SPRN_SRR0,r6
mtspr SPRN_SRR1,r7
rfi /* start execution out of TLB1[0] entry */
Expand Down

0 comments on commit 77154a2

Please sign in to comment.