Bootloaders such as SILO will have already allocated and mapped the memory for the kernel and initrd before jumping into the kernel, so this patchset does the same for a kernel/initrd loaded directly by QEMU.
Otherwise if the kernel/initrd grow beyond the default 1:1 memory region mapped by the PROM then the kernel will panic when clearing the memory on startup.
In order for this to work on SPARC32 then the corresponding QEMU patch at https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06635.html must also be applied.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
v2: - Add missing PAGE_ALIGN() macro around the ofmem_map() size parameter
Mark Cave-Ayland (5): SPARC32: fix obp_arg.argv when no kernel command line specified SPARC32: mark kernel memory as mapped SPARC32: mark initrd memory as mapped and in use before booting kernel SPARC64: mark kernel memory as mapped and in use before booting kernel SPARC64: mark initrd memory as mapped and in use before booting kernel
arch/sparc32/boot.c | 2 ++ arch/sparc32/openbios.c | 29 ++++++++++++++++++++--------- arch/sparc64/boot.c | 2 ++ arch/sparc64/boot.h | 2 ++ arch/sparc64/openbios.c | 18 +++++++++++++++++- include/drivers/drivers.h | 2 ++ 6 files changed, 45 insertions(+), 10 deletions(-)