Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+18 -1
+18 -1
arch/arm/boot/compressed/head.S
··· 168 168 .text 169 169 170 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 188 mov r4, pc 173 189 and r4, r4, #0xf8000000 190 + /* Determine final kernel image address. */ 174 191 add r4, r4, #TEXT_OFFSET 175 192 #else 176 193 ldr r4, =zreladdr