]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Perform a writability test before applying relocations
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 May 2025 16:36:53 +0000 (17:36 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 13 May 2025 16:42:53 +0000 (17:42 +0100)
commit6fd927f929d0e64be90cf2a4c39681bc3ad4a065
treedff87de6d0670e5665a65c091ceac5ae80d65e2f
parent4566f5975791dfc9454952ee5313e1e74fb42211
[riscv] Perform a writability test before applying relocations

If paging is not supported, then we will attempt to apply dynamic
relocations to fix up the runtime addresses.  If the image is
currently executing directly from flash memory, this can result in
effectively sending an undefined sequence of commands to the flash
device, which can cause unwanted side effects.

Perform an explicit writability test before applying relocations,
using a write value chosen to be safe for at least any devices
conforming to the JEDEC Common Flash Interface (CFI01).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/riscv/prefix/libprefix.S