U-boot without relocation

I’m looking u-boot & u-boot SPL and I would like to disable relocation. Why does u-boot on the unmatched relocate itself? I think this is the boot sequence:

  1. ROM copies u-boot SPL from SD card onto on-chip RAM. u-boot SPL starts execution.
  2. u-boot SPL reads uboot.itb from SDCARD and places OpenSBI, u-boot, and device tree into DDR based on directives within uboot.itb.
  3. u-boot copies itself & the device tree from the location directed in uboot.itb to ~1 GB.

Why not set up uboot.itb to direct u-boot SPL to place u-boot & the device tree at ~ 1GB?

I looked into setting the u-boot GD_FLG_SKIP_RELOC flag, but a cursory examination of the shows this would hang the CPU, at least for riscv (other processors seem to be OK with it).

As for “why” I want to do this, this would decrease initialization time and simplify debugging.

For anyone searching on this, you can disable relocation. Summarizing (i.e. I’m skipping a lot of details), I added the “GD_FLG_SKIP_RELOC” flag, added a call to relocate_code() in board_init_f(), and set the ITB addresses & relocation addresses to be the same.