From patchwork Thu May 14 09:59:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 245766 List-Id: U-Boot discussion From: sr at denx.de (Stefan Roese) Date: Thu, 14 May 2020 11:59:01 +0200 Subject: [PATCH v2 01/12] mips: start.S: Add CONFIG_MIPS_INIT_JUMP_OFFSET In-Reply-To: <20200514095912.14428-1-sr@denx.de> References: <20200514095912.14428-1-sr@denx.de> Message-ID: <20200514095912.14428-2-sr@denx.de> This Kconfig symbol will be introduced with the base Octeon MIPS support. Using it, its possible to use a TEXT_BASE address which differs from the reset PC. And with the earliest function call to mips_sram_init() the CPU will transfer execution to the actual TEXT_BASE region. So after returning from this function, all absolute addresses are okay again. This will be used by the Octeon platform to copy the U-Boot image into L2 cache and transfer execution to the cache to speed up the execution. Signed-off-by: Stefan Roese --- Changes in v2: - New patch arch/mips/cpu/start.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index 6de9a2f362..f601662cd0 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -222,6 +222,10 @@ wr_done: #ifdef CONFIG_MIPS_SRAM_INIT /* Initialize the SRAM first */ PTR_LA t9, mips_sram_init +#ifdef CONFIG_MIPS_INIT_JUMP_OFFSET + PTR_SUBU \ + t9, t9, (CONFIG_SYS_TEXT_BASE - CONFIG_MIPS_INIT_JUMP_OFFSET) +#endif jalr t9 nop #endif