mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-06-12 22:31:45 +01:00
895201cc5a
The payload for FW_PAYLOAD needs to be placed at a 2M/4M aligned address (for 64/32 bit systems) and the current makefile uses FW_PAYLOAD_OFFSET to achieve this. This only works if FW_TEXT_START is already 2M/4M aligned. Most existing physical/virtual platforms have used a FW_TEXT_START of 0x0 or 0x80000000, so this hasn't been an issue so far. If, for example, FW_TEXT_START is 0x80000, the payload would end up placed at 0x280000 on a 64 bit system, which isn't a 2M aligned address. Update the makefile to use FW_PAYLOAD_ALIGN instead. This will ensure that the address picked for the payload is 2M/4M aligned irrespective of where FW_TEXT_START is. Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260508-payload_alignment-v1-1-6628b4ec1ed3@oss.tenstorrent.com Signed-off-by: Anup Patel <anup@brainfault.org>