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

ARM: 7824/1: update advice on kernel, initramfs and FDT load address.

- Recommend that the kernel be placed under 128MiB, this is required if
CONFIG_AUTO_ZRELADDR=y and good (or at least not bad) advice even if
CONFIG_AUTO_ZRELADDR=n.
- Recommend that a zImage kernel be placed above 32MiB, this avoids the need
to relocate prior to decompression, which can speed up boot.
- Add basic info on the requirements when loading a raw (non-zImage) kernel
which are stricter than the zImage requirements.
- Recommend that the DTB be placed after the 128MiB boundary, avoiding any
potential conflict with the kernel decompressor, and within the lowmem
region. In practice it could follow the kernel loaded after 32MiB,
assuming the kernel decompesses to less than 32MiB, but the 128MiB
recommendation is simple and unambiguous.
- Add similar recommendation regarding initramfs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Dave Martin <dave.martin@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Roy Franz <roy.franz@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Ian Campbell and committed by
Russell King
83d26d11 09096f6a

+32 -10
+32 -10
Documentation/arm/Booting
··· 18 18 2. Initialise one serial port. 19 19 3. Detect the machine type. 20 20 4. Setup the kernel tagged list. 21 - 5. Call the kernel image. 21 + 5. Load initramfs. 22 + 6. Call the kernel image. 22 23 23 24 24 25 1. Setup and initialise RAM ··· 121 120 The boot loader must pass at a minimum the size and location of the 122 121 system memory, and the root filesystem location. The dtb must be 123 122 placed in a region of memory where the kernel decompressor will not 124 - overwrite it. The recommended placement is in the first 16KiB of RAM 125 - with the caveat that it may not be located at physical address 0 since 126 - the kernel interprets a value of 0 in r2 to mean neither a tagged list 127 - nor a dtb were passed. 123 + overwrite it, whilst remaining within the region which will be covered 124 + by the kernel's low-memory mapping. 128 125 129 - 5. Calling the kernel image 126 + A safe location is just above the 128MiB boundary from start of RAM. 127 + 128 + 5. Load initramfs. 129 + ------------------ 130 + 131 + Existing boot loaders: OPTIONAL 132 + New boot loaders: OPTIONAL 133 + 134 + If an initramfs is in use then, as with the dtb, it must be placed in 135 + a region of memory where the kernel decompressor will not overwrite it 136 + while also with the region which will be covered by the kernel's 137 + low-memory mapping. 138 + 139 + A safe location is just above the device tree blob which itself will 140 + be loaded just above the 128MiB boundary from the start of RAM as 141 + recommended above. 142 + 143 + 6. Calling the kernel image 130 144 --------------------------- 131 145 132 146 Existing boot loaders: MANDATORY ··· 152 136 then it is legal for the boot loader to call the zImage in flash 153 137 directly. 154 138 155 - The zImage may also be placed in system RAM (at any location) and 156 - called there. Note that the kernel uses 16K of RAM below the image 157 - to store page tables. The recommended placement is 32KiB into RAM. 139 + The zImage may also be placed in system RAM and called there. The 140 + kernel should be placed in the first 128MiB of RAM. It is recommended 141 + that it is loaded above 32MiB in order to avoid the need to relocate 142 + prior to decompression, which will make the boot process slightly 143 + faster. 158 144 159 - In either case, the following conditions must be met: 145 + When booting a raw (non-zImage) kernel the constraints are tighter. 146 + In this case the kernel must be loaded at an offset into system equal 147 + to TEXT_OFFSET - PAGE_OFFSET. 148 + 149 + In any case, the following conditions must be met: 160 150 161 151 - Quiesce all DMA capable devices so that memory does not get 162 152 corrupted by bogus network packets or disk data. This will save