Commit 0a6a78b8 authored by Russell King's avatar Russell King

ARM: add documentation for finding start of physical memory

Occasionally, there's a question about the method we use to find the
start of physical memory.  Add some documentation so we don't have to
keep repeating outselves on the mailing list.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 89cfdb19
...@@ -168,9 +168,26 @@ not_angel: ...@@ -168,9 +168,26 @@ not_angel:
.text .text
#ifdef CONFIG_AUTO_ZRELADDR #ifdef CONFIG_AUTO_ZRELADDR
@ determine final kernel image address /*
* Find the start of physical memory. As we are executing
* without the MMU on, we are in the physical address space.
* We just need to get rid of any offset by aligning the
* address.
*
* This alignment is a balance between the requirements of
* different platforms - we have chosen 128MB to allow
* platforms which align the start of their physical memory
* to 128MB to use this feature, while allowing the zImage
* to be placed within the first 128MB of memory on other
* platforms. Increasing the alignment means we place
* stricter alignment requirements on the start of physical
* memory, but relaxing it means that we break people who
* are already placing their zImage in (eg) the top 64MB
* of this range.
*/
mov r4, pc mov r4, pc
and r4, r4, #0xf8000000 and r4, r4, #0xf8000000
/* Determine final kernel image address. */
add r4, r4, #TEXT_OFFSET add r4, r4, #TEXT_OFFSET
#else #else
ldr r4, =zreladdr ldr r4, =zreladdr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment