Re: How can I jump to non-linux address space?

From: Russell King (rmk@arm.linux.org.uk)
Date: Thu Oct 04 2001 - 15:35:23 EST


On Wed, Oct 03, 2001 at 06:10:31PM -0700, Ian Thompson wrote:
> My kernel is running from RAM, and I want to jump to an address in ROM
> (which unfortunately, the kernel doesn't seem to know anything about).

Ok, its like you're rebooting, correct?

> I don't plan on trying to resume the kernel after doing this. However,
> I'm getting a prefetch abort.

That's because your address range for the ROM isn't mapped - when Linux
starts on ARM, it unmaps virtually everything, and remaps only the address
ranges it wants to use.

> How can I pass execution to this address? Do I have to turn off the MMU?

Essentially, you have 2 choices:

1. Turn off the MMU.
2. insert a 1:1 physical to virtual mapping for the ROM and call the code.
   (with interrupts disabled).

Which one works depends on what the ROM code requires.

There is an example of (1) in the current ARM kernel sources - the RiscPC
port uses this method to reboot - we can't activate the hardware reset line
on these machines, so our only option is to use this method.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:33 EST