lkml.org 
[lkml]   [2001]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How can I jump to non-linux address space?
Ian Thompson wrote:
>
> Hi all,
>
> I'm sorry if this is off-topic, but I wasn't sure where else to ask...
>
> 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). I

The kernel can get to know - all you need is code that maps the
ROM address range into some available virtual address range.
Look at device driver code - they do such mapping for ROM and/or
memory-based io regions.

> don't plan on trying to resume the kernel after doing this. However, I'm
> getting a prefetch abort. If I try and load the data, I get a similar
> error: "Unable to handle kernel paging request at virtual address 00003000"
> where 0x3000 is the ROM address I'm trying to jump to / load from. How can
> I pass execution to this address? Do I have to turn off the MMU?

How to set up the cpu before jumping to a ROM that won't return
can be tricky indeed. This depends on what that ROM code expect!

Do that ROM code work when the MMU has remapped its adresses so it
appears at some adress completely different from the bus address? (only
if it contains relative jumps only - no absolute addresses.) Does
it work with 4G segments? Does it work at all in protected mode,
with all interrupts routed to the linux kernel instead of the bios?
Does this code expect to find something (data, device interfaces,
vga memory) at certain addresses? If so, this must be mapped too.
For linux moves all this around.

In practise, existing ROM's tend to assume that the machine is
in a state close to what the bios initializes it to,
with 64k segments, no MMU, and a lot of assumptions about
how interrupts and hw devices are set up. _All_ of these
assumptions break after you start linux, and resetting
everything is so hard that it is usually done by
running the bios cold boot code.

Helge Hafting
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:04    [W:0.092 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site