RISC-V With Linux 6.8 Restores XIP Kernel Support

Written by Michael Larabel in RISC-V on 18 January 2024 at 06:07 AM EST. 8 Comments
RISC-V
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.

VisionFive 2 RISC-V board


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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week