]> git.baikalelectronics.ru Git - uboot.git/commit
imx: imx8qm/qxp: Recover SPL data section for partition reboot
authorPeng Fan <peng.fan@nxp.com>
Tue, 5 May 2020 12:28:41 +0000 (20:28 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
commitd09d3efa19c8147747f41351103ba00847a10224
tree655ea9119dafd132148cd3afb454db9cc3400b9d
parentc5dd3e12c731accb0503d2d4e8090256ad5a0264
imx: imx8qm/qxp: Recover SPL data section for partition reboot

When doing partition reboot, the boot image won't be reloaded by ROM,
it is just CPU reset to boot entry. The SW has to keep the boot image
inside the RAM unchanged. It includes both the TEXT section and DATA
section.

For SPL, the problem is DATA section will be updated at runtime, so in
next partition reboot the data is not same as the initial value from
cold boot. If any code depends on the initial value, then it will have
problem.

This patch introduces a mechanism to recover the data section
for partition reboot. It adds a new section in image for saving
data section. When from cold boot, the data section will be saved
to that new section at SPL early phase. When from partition reboot,
the data section will be restored from the new section.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/cpu/armv8/Kconfig
arch/arm/cpu/armv8/Makefile
arch/arm/cpu/armv8/spl_data.c [new file with mode: 0644]
arch/arm/cpu/armv8/u-boot-spl.lds
arch/arm/mach-imx/imx8/Kconfig
arch/arm/mach-imx/imx8/cpu.c
include/spl.h