]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: add text_offset to kernel_addr_r on aarch64 platforms
authorKlaus Goger <klaus.goger@theobroma-systems.com>
Mon, 19 Feb 2018 07:02:26 +0000 (08:02 +0100)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 13 Mar 2018 17:12:35 +0000 (18:12 +0100)
commit65884ca386fe60e1effc158ffb07d578074f79a8
tree67246b9eed1b06af562eae4cc095ca8803a17c20
parent6b449dbc6ae8d5804a4f9f319bdf7b1bfcbe06ce
rockchip: add text_offset to kernel_addr_r on aarch64 platforms

Booting a aarch64 Linux kernel requires the image to be placed
text_offset bytes from a 2MB aligned address.
See https://www.kernel.org/doc/Documentation/arm64/booting.txt

booti_setup() takes care about this alignment and will relocate the
image if not properly aligned with memmove(). This can require up
to double the size of the loaded image and therefore accidentally
overwrite content placed there (i.e ramdisk_addr_r) for large kernel
images.

By adding text_offset to the default kernel_addr_r we can prevent that
from happening for kernels larger 18MB and also save a few cycles.

We can assume a text_offset of 0x80000 for most cases, all others will be
handled by booti_setup() anyway.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
include/configs/rk3328_common.h
include/configs/rk3399_common.h