diff options
| author | Suraj Kakade <[email protected]> | 2026-08-26 14:04:48 +0200 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2026-09-04 12:44:20 +0200 |
| commit | feb44bd09ff673aa64f329a5a60a950b8197507f (patch) | |
| tree | 0103227edc04ffb05a13be9b31a9c6cb5aa5524b /contrib/apps/httpserver | |
| parent | 404bb0449a31a1a23dc2dbb5ff68cc72797487eb (diff) | |
board: xilinx: versal-net: move platform_id/platform_version to .data
platform_id and platform_version are plain uninitialized statics,
placing them in .bss. U-Boot's linker script overlays .bss at the
same address as .rela.dyn (the relocation table), which is safe only
if nothing writes to .bss before relocation completes.
soc_detection() writes these variables during early board_init_f(),
well before relocation, corrupting live .rela.dyn entries. When
relocate_code() later reads the corrupted entry, it writes to an
invalid, unaligned address. QEMU 8.x tolerated this silently, QEMU
10.x enforces alignment checks and traps it, causing U-Boot to hang
right after printing "DRAM: 2 GiB", never reaching the console
prompt.
Move both variables to .data via __section(".data") so they no longer
share an address with the relocation table.
Fixes: f6aebdf676ed ("arm64: versal-net: Add support for Versal NET platform")
Signed-off-by: Suraj Kakade <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Link: https://patch.msgid.link/5908d1dcf2a650cac2b22d82e7f789b978f70748.1787745885.git.michal.simek@amd.com
Diffstat (limited to 'contrib/apps/httpserver')
0 files changed, 0 insertions, 0 deletions
