Subject: booting kernel on SA1110

From: Chris Blazie <[email-masked]>
Date: Thu, 27 Apr 2000 16:03:08 -0400 (EDT)

I'm trying to get a kernel to boot on an SA1110 platform
(development board with 64mb SDRAM).  I set up the memory configurations
in mm/mm-sa1100.c and kernel/arch.c.  I pass architecture number 0x10 from
the bootloader but it never gets out of head-armv.S.  I traced the problem
to the instruction turning on the MMU:

mcr     p15, 0, r0, c1, c0

	At this point r0 = 0xc000517d; mmu, write buffer, and all caches
on.  Is all of that really supposed to happen here?  Or is r0 getting
incorrectly set in __create_page_tables?

	I remember someone else reporting a freeze when the MMU is
switched on (SA1110 also).  Any ideas?

Thanks,
Chris

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Thu, 27 Apr 2000 21:01:54 +0100 (BST)

> incorrectly set in __create_page_tables?

Yep.  r0 looks 100% correct.

> switched on (SA1110 also).  Any ideas?

How are you debugging this?  If you're using a debugger, then I can
imagine you loosing control of the debugger at this point.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Chris Blazie <[email-masked]>
Date: Thu, 27 Apr 2000 16:17:42 -0400 (EDT)

> imagine you loosing control of the debugger at this point.

	I'm using the (SA1100) debug routines in debug-armv.S.  It looks
like they're set up to work with or without the MMU.  printch fails after
the MMU is enabled (and following the 3 noops).

Chris

---

From: Nicolas Pitre <[email-masked]>
Date: Thu, 27 Apr 2000 16:45:12 -0400 (EDT)

> the MMU is enabled (and following the 3 noops).

Do you use zImage or Image?
Which patch version?
Is angel running on the board or not?

Nicolas

---

From: Chris Blazie <[email-masked]>
Date: Thu, 27 Apr 2000 16:48:42 -0400 (EDT)

> Do you use zImage or Image?

	Image, loaded at C0008000.

> Is angel running on the board or not?

	No, we're using blob, and it appears to work flawlessly.

Chris

---

From: "Steven J. Hill" <[email-masked]>
Date: Thu, 27 Apr 2000 15:48:54 -0500

> the MMU is enabled (and following the 3 noops).
Correct me if I am wrong, but if you look at the code in 'debug-armv.S' it
does not seem to be right:

#elif defined(CONFIG_ARCH_SA1100)
        .macro  addruart,rx
        mrc p15, 0, \rx, c1, c0
        tst \rx, #1         @ MMU enabled?
        moveq   \rx, #0x80000000    @ physical base address
        movne   \rx, #0xf8000000    @ virtual address

If you will notice, after we see if the MMU is enabled, we perform the
test and if it is equal to one, we load in the PHYSICAL address instead
of the virtual address. I think the lines are out of order. It should
read:

#elif defined(CONFIG_ARCH_SA1100)
        .macro  addruart,rx
        mrc p15, 0, \rx, c1, c0
        tst \rx, #1         @ MMU enabled?
        movne   \rx, #0xf8000000    @ virtual address
        moveq   \rx, #0x80000000    @ physical base address

Is that correct?

-Steve

-- 
 Steven J. Hill - Embedded SW Engineer
 Public Key: 'finger [email-masked]'
 FPR1: E124 6E1C AF8E 7802 A815
 FPR2: 7D72 829C 3386 4C4A E17D

---

From: "Steven J. Hill" <[email-masked]>
Date: Thu, 27 Apr 2000 15:54:41 -0500

>         moveq   \rx, #0x80000000    @ physical base address

Crap, what I meant to say was:

#elif defined(CONFIG_ARCH_SA1100)
        .macro  addruart,rx
        mrc p15, 0, \rx, c1, c0
        tst \rx, #1         @ MMU enabled?
        moveq   \rx, #0xf8000000    @ virtual address
        movne   \rx, #0x80000000    @ physical base address

Sorry.

-Steve

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Thu, 27 Apr 2000 21:59:36 +0100 (BST)

> does not seem to be right:

Looks fine to me.

> test and if it is equal to one,

No we don't.  It's not an equality test.
   _____

---

From: "Steven J. Hill" <[email-masked]>
Date: Thu, 27 Apr 2000 16:33:47 -0500

Sorry about the mix up on the debugging code in head-armv.S earlier. My
brain is totally fried today. We now return you to your regularly scheduled
intelligent posts....

-Steve