/* SPDX-License-Identifier: GPL-2.0 */
#include <asm/core.h>
#include <asm/regs.h>
#include <asm/asmmacro.h>
#include <asm/cacheasm.h>
#include <asm/processor.h> /* * RB-Data: RedBoot data/bss * P: Boot-Parameters * L: Kernel-Loader * * The Linux-Kernel image including the loader must be loaded * to a position so that the kernel and the boot parameters * can fit in the space before the load address. * ______________________________________________________ * |_RB-Data_|_P_|__________|_L_|___Linux-Kernel___|______| * ^ * ^ Load address * ______________________________________________________ * |___Linux-Kernel___|_P_|_L_|___________________________| * * The loader copies the parameter to the position that will * be the end of the kernel and itself to the end of the * parameter list.
*/
/* Make sure we have enough space for the 'uncompressor' */
/* copy the loader to its address * Note: The loader itself is a very small piece, so we assume we * don't partially overlap. We also assume (even more important) * that the kernel image is out of the way. Usually, when the * load address of this image is not at an arbitrary address, * but aligned to some 10K's we shouldn't overlap.
*/
/* Note: The assembler cannot relax "addi a0, a0, ..." to an
l32r, so we load to a4 first. */
/* We have to flush and invalidate the caches here before we jump. */
#if XCHAL_DCACHE_IS_WRITEBACK
___flush_dcache_all a5 a6
#endif
___invalidate_icache_all a5 a6
isync
movi a11, _reloc
jx a11
.globl _reloc
_reloc:
/* RedBoot is now at the end of the memory, so we don't have * to copy the parameter list. Keep the code around; in case
* we need it again. */
#if 0
# a0: load address
# a2: start address of parameter list
# a3: length of parameter list
# a4: __start
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.