diff options
author | Linus Walleij <triad@df.lth.se> | 2007-01-21 14:08:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-01-24 06:59:57 -0500 |
commit | d4e1c889c1ec547371227558e1da5f2f50c7dd5e (patch) | |
tree | 82d2d852537712c56161ffabc262e38ea34beaf2 /arch/arm/kernel | |
parent | d28122a5877cc40350fa801353fd5a9350563ec3 (diff) |
[ARM] 4102/1: Allow for PHYS_OFFSET on any valid 2MiB address
This patchs allows the offset to the first page of
physical memory to be on any 2MB boundary
whereas the previous code could only handle psysical
offset to any 16MB boundary (0xNN000000) or any 1MB
boundary below 0x01000000 (e.g. 0x00N00000). The
problem is a consequence of the orr one-byte syntax,
so we fix this and we can place the first bank of
memory at 0x28e00000. I have also included an explicit
check that disallow compilation when PHYS_OFFSET is
not on a 2MiB boundary. head.S would be the proper place
to have this at since this is the first file that
attempts to use PHYS_OFFSET during compile.
Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/head.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index d994561816a1..cf495a3084b3 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -22,6 +22,10 @@ | |||
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | 24 | ||
25 | #if (PHYS_OFFSET & 0x001fffff) | ||
26 | #error "PHYS_OFFSET must be at an even 2MiB boundary!" | ||
27 | #endif | ||
28 | |||
25 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) | 29 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) |
26 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) | 30 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) |
27 | 31 | ||
@@ -251,7 +255,8 @@ __create_page_tables: | |||
251 | * Then map first 1MB of ram in case it contains our boot params. | 255 | * Then map first 1MB of ram in case it contains our boot params. |
252 | */ | 256 | */ |
253 | add r0, r4, #PAGE_OFFSET >> 18 | 257 | add r0, r4, #PAGE_OFFSET >> 18 |
254 | orr r6, r7, #PHYS_OFFSET | 258 | orr r6, r7, #(PHYS_OFFSET & 0xff000000) |
259 | orr r6, r6, #(PHYS_OFFSET & 0x00e00000) | ||
255 | str r6, [r0] | 260 | str r6, [r0] |
256 | 261 | ||
257 | #ifdef CONFIG_XIP_KERNEL | 262 | #ifdef CONFIG_XIP_KERNEL |