RISC-V With Linux 6.8 Restores XIP Kernel Support
With Linus Torvalds back to work, merged to mainline on Wednesday were the RISC-V architecture updates for the in-development Linux 6.8 kernel cycle.
One of the features for RISC-V with Linux 6.8 is restoring XIP kernel support. XIP is the option for allowing the Linux Kernel to "Execute In Place" from ROM. Carrying out a RISC-V "CONFIG_XIP_KERNEL" build allows for placing the kernel on non-volatile storage directly addressable by the CPU. The XIP'ed kernel on storage such as NOR flash can then be directly executed in place with the text section of the kernel not needing to be loaded from flash to RAM. Only read-write sections like the kernel's data section and stack are copied to RAM.
RISC-V is among the few CPU architectures supporting the CONFIG_XIP_KERNEL option for Linux but it turns out to have regressed since its original introduction in Linux 5.13. With XIP being non-trivial to test with not a straight-forward way of doing so under QEMU and needing capable hardware otherwise, it wound up being busted for several kernel releases. But a set of RISC-V fixes in Linux 6.8 will now yield working XIP support.
The RISC-V changes for Linux 6.8 also add support for new RISC-V ISA extensions to the hwprobe interface, clean-ups to the page table handling code, and other fixes. More details via this Git merge.
One of the features for RISC-V with Linux 6.8 is restoring XIP kernel support. XIP is the option for allowing the Linux Kernel to "Execute In Place" from ROM. Carrying out a RISC-V "CONFIG_XIP_KERNEL" build allows for placing the kernel on non-volatile storage directly addressable by the CPU. The XIP'ed kernel on storage such as NOR flash can then be directly executed in place with the text section of the kernel not needing to be loaded from flash to RAM. Only read-write sections like the kernel's data section and stack are copied to RAM.
RISC-V is among the few CPU architectures supporting the CONFIG_XIP_KERNEL option for Linux but it turns out to have regressed since its original introduction in Linux 5.13. With XIP being non-trivial to test with not a straight-forward way of doing so under QEMU and needing capable hardware otherwise, it wound up being busted for several kernel releases. But a set of RISC-V fixes in Linux 6.8 will now yield working XIP support.
The RISC-V changes for Linux 6.8 also add support for new RISC-V ISA extensions to the hwprobe interface, clean-ups to the page table handling code, and other fixes. More details via this Git merge.
8 Comments