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

From: Ian Thompson (ithompso@stargateip.com)
Date: Thu Oct 04 2001 - 19:35:51 EST


Hey Dick,

Thanks for the help! A couple more questions for you...

> You use ioremap() to create a virtual address from 0x1000. Then
> you copy the relocated code, currently in some array, to the relocated
> address (0x1000), using the cookie returned from ioremap().

How does this make the virtual address the same as the physical address? Or
are addr's in the first page (or 1st MB?) automatically mapped to the same
address when you call ioremap()? I printed out the __ioremap() addr's for
0x1000 and 0x3000, and neither of the virt addr's were equal to the physical
ones.

I tried something slightly different, which didn't work... Should it have?
What I did was put the code to turn off the MMU at physical address 0x3000,
and jumped to it (via branching to __ioremap(0x3000)). I think the branch
is working, since I can load the correct instruction via this reloc'ed
address. However, running the code that turns off the MMU instead reboots
the machine. =(

> In the code, you can disable the paging bit and set DS, ES to the
> page-table selector, which looks at linear addressing. Now you can
> see and access everything as 32-bit linear address-space.

Should I be looking for something else to twiddle instead of the MMU bit in
the CPU register? You mentioned the paging bit; is this different? Also,
what are DS & ES?

gracias,
-ian

-
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:35 EST