summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRandolph Sapp <[email protected]>2026-06-04 10:50:38 -0500
committerTom Rini <[email protected]>2026-06-15 11:04:39 -0600
commit48412f8f2962e27abe3b9a4a73221cebbfd73333 (patch)
tree56704e6bbe3de3000f235237efb99f6d69cb0ef2 /include
parentde12fa4df89277460aacaea7c9a43421190ee04d (diff)
memory: reserve from start_addr_sp to initial_relocaddr
Add a new global data struct member called initial_relocaddr. This stores the original value of relocaddr, directly from setup_dest_addr. This is specifically to avoid any adjustments made by other init functions. Reserve the memory from gd->start_addr_sp - CONFIG_STACK_SIZE to gd->initial_relocaddr instead of gd->ram_top. This allows platform specific relocation addresses to work without unnecessarily painting over a large range. Signed-off-by: Randolph Sapp <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/global_data.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 745d2c3a966..8d1d49b1133 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -108,6 +108,15 @@ struct global_data {
*/
unsigned long relocaddr;
/**
+ * @initial_relocaddr: top address of U-Boot in RAM
+ *
+ * This should be the value of relocaddr after setup_dest_addr() and
+ * before reserve_pram() or any other allocations or reservations shift
+ * it. This address will, depending on the platform, be equivalent to
+ * ram_top and should also be considered an exclusive address.
+ */
+ unsigned long initial_relocaddr;
+ /**
* @irq_sp: IRQ stack pointer
*/
unsigned long irq_sp;