diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-03-26 09:41:33 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-03-27 22:21:14 +0000 |
commit | 0a6a78b8b3c1c1757fbeca4bbf518e44c70c9e4b (patch) | |
tree | 1be52c0d6432b0b4c38ee746b3496fb57f9cdc34 /arch | |
parent | 89cfdb19a88872088a8cf69621e55d41c379f02f (diff) | |
download | linux-0a6a78b8b3c1c1757fbeca4bbf518e44c70c9e4b.tar.bz2 |
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: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index c41a793b519c..55a353243a90 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -168,9 +168,26 @@ not_angel: .text #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 and r4, r4, #0xf8000000 + /* Determine final kernel image address. */ add r4, r4, #TEXT_OFFSET #else ldr r4, =zreladdr |