FRV: permit the memory to be located elsewhere in NOMMU mode
authorDavid Howells <dhowells@redhat.com>
Tue, 5 Feb 2008 06:29:53 +0000 (22:29 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:20 +0000 (09:44 -0800)
Permit the memory to be located somewhere other than address 0xC0000000 in
NOMMU mode.  The configuration options are already present, it just
requires wiring up in the linker script.

Note that only a limited set of locations of runtime addresses are available
because of the way the CPU protection registers work.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/Kconfig
arch/frv/kernel/vmlinux.lds.S

index bf0468cbe7130914e81f9dc82e1e1a5d53c2a25e..96f7d70f4473681dc3f155b31c00215a55267257 100644 (file)
@@ -138,6 +138,15 @@ config UCPAGE_OFFSET_C0000000
 
 endchoice
 
+config PAGE_OFFSET
+       hex
+       default 0x20000000 if UCPAGE_OFFSET_20000000
+       default 0x40000000 if UCPAGE_OFFSET_40000000
+       default 0x60000000 if UCPAGE_OFFSET_60000000
+       default 0x80000000 if UCPAGE_OFFSET_80000000
+       default 0xA0000000 if UCPAGE_OFFSET_A0000000
+       default 0xC0000000
+
 config PROTECT_KERNEL
        bool "Protect core kernel against userspace"
        depends on !MMU
index f42b328b1dd0475e1af868308cdc000c89d40942..ef7527b8b0c77fabca307e5a0f614386d162c8ac 100644 (file)
@@ -13,7 +13,7 @@ ENTRY(_start)
 
 jiffies = jiffies_64 + 4;
 
-__page_offset = 0xc0000000;            /* start of area covered by struct pages */
+__page_offset = CONFIG_PAGE_OFFSET;    /* start of area covered by struct pages */
 __kernel_image_start = __page_offset;  /* address at which kernel image resides */
 
 SECTIONS