linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/fsl-booke: Fix address issue when using relocatable kernels
@ 2010-06-29 19:42 Matthew McClintock
  2010-07-11 16:07 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew McClintock @ 2010-06-29 19:42 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/kernel/fsl_booke_entry_mapping.S |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
index beb4d78..a92c79b 100644
--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
@@ -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
@@ -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 */
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/fsl-booke: Fix address issue when using relocatable kernels
  2010-06-29 19:42 [PATCH] powerpc/fsl-booke: Fix address issue when using relocatable kernels Matthew McClintock
@ 2010-07-11 16:07 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2010-07-11 16:07 UTC (permalink / raw)
  To: Matthew McClintock; +Cc: linuxppc-dev


On Jun 29, 2010, at 2:42 PM, Matthew McClintock wrote:

> 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>
> ---
> arch/powerpc/kernel/fsl_booke_entry_mapping.S |    4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)

applied to merge

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-11 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-29 19:42 [PATCH] powerpc/fsl-booke: Fix address issue when using relocatable kernels Matthew McClintock
2010-07-11 16:07 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).