public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH][FOR 1.3.4] 85xx: Don't move interrupt vector to low memory
@ 2008-08-06  6:28 Kumar Gala
  2008-08-06  6:50 ` Wolfgang Denk
  0 siblings, 1 reply; 12+ messages in thread
From: Kumar Gala @ 2008-08-06  6:28 UTC (permalink / raw)
  To: u-boot

Moving the interrupt vectors to low memory can cause issues if the code
gets overwritten via some image loading command (tftp, boot*, etc.) and
interrupts (like the decrementer are enabled).

On 85xx there is no reason to copy the interrupt vectors to low memory
since we can run them in high memory since we are a Book-E core.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---

This is a fix for 1.3.4.

- k

 cpu/mpc85xx/start.S |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
index 10fe936..9c8b2a1 100644
--- a/cpu/mpc85xx/start.S
+++ b/cpu/mpc85xx/start.S
@@ -936,13 +936,6 @@ trap_init:
 	bgelr				/* return if r7>=r8 - just in case */

 	mflr	r4			/* save link register		*/
-1:
-	lwz	r0,0(r7)
-	stw	r0,0(r9)
-	addi	r7,r7,4
-	addi	r9,r9,4
-	cmplw	0,r7,r8
-	bne	1b

 	/*
 	 * relocate `hdlr' and `int_return' entries
@@ -973,9 +966,6 @@ trap_init:
 	cmplw	0,r7,r8
 	blt	2b

-	lis	r7,0x0
-	mtspr	IVPR,r7
-
 	mtlr	r4			/* restore link register	*/
 	blr

@@ -983,13 +973,14 @@ trap_init:
 	 * Function: relocate entries for one exception vector
 	 */
 trap_reloc:
-	lwz	r0,0(r7)		/* hdlr ...			*/
+	lwzx	r0,r3,r7		/* hdlr ...			*/
 	add	r0,r0,r3		/*  ... += dest_addr		*/
-	stw	r0,0(r7)
+	stwx	r0,r3,r7

-	lwz	r0,4(r7)		/* int_return ...		*/
+	addi	r7,r7,4
+	lwzx	r0,r3,r7		/* int_return ...		*/
 	add	r0,r0,r3		/*  ... += dest_addr		*/
-	stw	r0,4(r7)
+	stwx	r0,r3,r7

 	blr

-- 
1.5.5.1

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

end of thread, other threads:[~2008-08-06 20:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06  6:28 [U-Boot-Users] [PATCH][FOR 1.3.4] 85xx: Don't move interrupt vector to low memory Kumar Gala
2008-08-06  6:50 ` Wolfgang Denk
2008-08-06 12:58   ` Kumar Gala
2008-08-06 14:42     ` Wolfgang Denk
2008-08-06 19:32       ` Scott Wood
2008-08-06 19:41         ` Jerry Van Baren
2008-08-06 19:46         ` Wolfgang Denk
2008-08-06 19:49           ` Kumar Gala
2008-08-06 20:17             ` Wolfgang Denk
2008-08-06 20:34               ` Kumar Gala
2008-08-06 20:41                 ` Wolfgang Denk
2008-08-06 20:46                   ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox