Module Name:    src
Committed By:   nonaka
Date:           Tue Jan 17 15:48:33 UTC 2012

Modified Files:
        src/sys/arch/zaurus/zaurus: kloader_zaurus.S

Log Message:
fix struct kloader_bootinfo address.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/zaurus/kloader_zaurus.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/zaurus/kloader_zaurus.S
diff -u src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.1 src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.2
--- src/sys/arch/zaurus/zaurus/kloader_zaurus.S:1.1	Wed Mar 11 09:02:05 2009
+++ src/sys/arch/zaurus/zaurus/kloader_zaurus.S	Tue Jan 17 15:48:33 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: kloader_zaurus.S,v 1.1 2009/03/11 09:02:05 nonaka Exp $	*/
+/*	$NetBSD: kloader_zaurus.S,v 1.2 2012/01/17 15:48:33 nonaka Exp $	*/
 
 /*-
- * Copyright (c) 2009 NONAKA Kimihiro <[email protected]>
+ * Copyright (c) 2009-2012 NONAKA Kimihiro <[email protected]>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,9 @@
  */
 	.global	_C_LABEL(kloader_zaurus_boot)
 _C_LABEL(kloader_zaurus_boot):
-	mov	r0, r12			/* r12: kbi */
-	bic	r12, r12, #0xff000000
-	orr	r12, r12, #0xa0000000
+	mov	sp, r0			/* sp: kbi */
+	bic	sp, sp, #0xff000000	/* clear upper 8 bits */
+	orr	sp, sp, #0xa0000000	/* OR in physical base address */
 
 	/* We will go ahead and disable the MMU here. */
 	adr	r8, .Lmmuoff
@@ -105,15 +105,13 @@ _C_LABEL(kloader_zaurus_boot):
 	bl	.Lputcrlf
 #endif
 
-	/* set temporary stack pointer */
+	/* Set kernel entry */
+	ldr	r0, [sp]
+
+	/* Set temporary stack pointer */
 	ldr	sp, .Lstack_addr
 
 	/* Jump to kernel entry */
-#if 0	/* XXX */
-	ldr	r0, [r12]	/* kbi->entry */
-#else
-	ldr	r0, .Lstart_addr
-#endif
 	mov	pc, r0
 
 99:	b	99b
@@ -121,9 +119,6 @@ _C_LABEL(kloader_zaurus_boot):
 .Lstack_addr:
 	.word	0xa0004000
 
-.Lstart_addr:
-	.word	0xa0200000
-
 #ifdef PROGRESS
 .Lprogress:
 	mov	r0, #0x2e /*'.'*/

Reply via email to