Skip to content
Unverified Commit 49af7a2c authored by Torsten Duwe's avatar Torsten Duwe Committed by Palmer Dabbelt
Browse files

riscv/kexec: load initrd high in available memory



When initrd is loaded low, the secondary kernel fails like this:

 INITRD: 0xdc581000+0x00eef000 overlaps in-use memory region

This initrd load address corresponds to the _end symbol, but the
reservation is aligned on PMD_SIZE, as explained by a comment in
setup_bootmem().

It is technically possible to align the initrd load address accordingly,
leaving a hole between the end of kernel and the initrd, but it is much
simpler to allocate the initrd top-down.

Fixes: 838b3e28 ("RISC-V: Load purgatory in kexec_file")
Signed-off-by: default avatarTorsten Duwe <duwe@suse.de>
Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/all/67c8eb9eea25717c2c8208d9bfbfaa39e6e2a1c6.1690365011.git.petr.tesarik.ext@huawei.com/


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent d0b4f95a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment