From: Tom Rini Date: Thu, 16 Mar 2017 16:41:05 -0400 Subject: [U-Boot] [U-Boot, v3] arm64: booti: allow to place kernel image anywhere in physical memory In-Reply-To: <1489044506-31797-1-git-send-email-yamada.masahiro@socionext.com> References: <1489044506-31797-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <20170316204105.GM19897@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Mar 09, 2017 at 04:28:25PM +0900, Masahiro Yamada wrote: > At first, the ARM64 Linux booting requirement recommended that the > kernel image be placed text_offset bytes from 2MB aligned base near > the start of usable system RAM because memory below that base address > was unusable at that time. > > This requirement was relaxed by Linux commit a7f8de168ace ("arm64: > allow kernel Image to be loaded anywhere in physical memory"). > Since then, the bit 3 of the flags field indicates the tolerance > of the kernel physical placement. If this bit is set, the 2MB > aligned base may be anywhere in physical memory. For details, see > Documentation/arm64/booting.txt of Linux. > > The booti command should be also relaxed. If the bit 3 is set, > images->ep is respected, and the image is placed at the nearest > bootable location. Otherwise, it is relocated to the start of the > system RAM to keep the original behavior. > > Another wrinkle we need to take care of is the unknown endianness of > text_offset for a kernel older than commit a2c1d73b94ed (i.e. v3.16). > We can detect this based on the image_size field. If the field is > zero, just use a fixed offset 0x80000. > > Signed-off-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: