Skip to content

Commit 0a6a78b

Browse files
author
Russell King
committed
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>
1 parent 89cfdb1 commit 0a6a78b

File tree

1 file changed

+18
-1
lines changed
  • arch/arm/boot/compressed

1 file changed

+18
-1
lines changed

arch/arm/boot/compressed/head.S

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,26 @@ not_angel:
168168
.text
169169

170170
#ifdef CONFIG_AUTO_ZRELADDR
171-
@ determine final kernel image address
171+
/*
172+
* Find the start of physical memory. As we are executing
173+
* without the MMU on, we are in the physical address space.
174+
* We just need to get rid of any offset by aligning the
175+
* address.
176+
*
177+
* This alignment is a balance between the requirements of
178+
* different platforms - we have chosen 128MB to allow
179+
* platforms which align the start of their physical memory
180+
* to 128MB to use this feature, while allowing the zImage
181+
* to be placed within the first 128MB of memory on other
182+
* platforms. Increasing the alignment means we place
183+
* stricter alignment requirements on the start of physical
184+
* memory, but relaxing it means that we break people who
185+
* are already placing their zImage in (eg) the top 64MB
186+
* of this range.
187+
*/
172188
mov r4, pc
173189
and r4, r4, #0xf8000000
190+
/* Determine final kernel image address. */
174191
add r4, r4, #TEXT_OFFSET
175192
#else
176193
ldr r4, =zreladdr

0 commit comments

Comments
 (0)