diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-03-26 05:41:33 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-03-27 18:21:14 -0400 |
commit | 0a6a78b8b3c1c1757fbeca4bbf518e44c70c9e4b (patch) | |
tree | 1be52c0d6432b0b4c38ee746b3496fb57f9cdc34 /arch/arm/boot/compressed | |
parent | 89cfdb19a88872088a8cf69621e55d41c379f02f (diff) |
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/arm/boot/compressed')
-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: | |||
168 | .text | 168 | .text |
169 | 169 | ||
170 | #ifdef CONFIG_AUTO_ZRELADDR | 170 | #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 | */ | ||
172 | mov r4, pc | 188 | mov r4, pc |
173 | and r4, r4, #0xf8000000 | 189 | and r4, r4, #0xf8000000 |
190 | /* Determine final kernel image address. */ | ||
174 | add r4, r4, #TEXT_OFFSET | 191 | add r4, r4, #TEXT_OFFSET |
175 | #else | 192 | #else |
176 | ldr r4, =zreladdr | 193 | ldr r4, =zreladdr |