RISC-V With Linux 5.19 Preps "COMPAT" Mode For 32-bit Apps On 64-bit Kernels & More

Written by Michael Larabel in RISC-V on 21 May 2022 at 03:49 PM EDT. 10 Comments
RISC-V
With Linux 5.18 expected to be released as stable tomorrow and that opening up the Linux 5.19 merge window, feature work aimed for this next kernel should be largely wrapped up. Within the RISC-V architecture's "for-next" branch is several interesting additions.

For the Linux 5.19 cycle the RISC-V arch code is bringing initial compatibility work for allowing 32-bit RISC-V user-space applications to run on 64-bit RISC-V kernels, new RISC-V extension work, supporting the kexec_file system call, and more. Below are the key highlights.

- Support for kexec_file on RISC-V. Kexec_file_load is the newer Kexec system call for the Linux kernel. RISC-V had already provided Kexec support as the means to allow loading and booting into another kernel from the currently running kernel. The kexec_file system call is file-based and relies on file descriptors being passed for the kernel and initramfs rather than a list of segments.

- A new ticket-based spinlock system that uses generic atomics and doesn't require as much from the memory system as qspinlocks in order to be fair.

- Initial "COMPAT" support for being able to run 32-bit U-mode on 64-bit kernel at S-mode configuration. This COMPAT support is for being able to run 32-bit user-space applications on RISC-V 64-bit kernels.

- Support for the "Svpbmt" extension for "Supervisor-Mode: Page-Based Memory Types" to provide for pages being able to be marked as non-cacheable and/or I/O. As part of the merge is also enabling support for the Allwinner D1's page table attribute memory types. Additionally this patch series also introduces the "RISCV_ALTERNATIVE" option for being able to automatically patch errata required by the execution platform at run-time. This code patching is performed during the system boot stages. This RISC-V "ALTERNATIVE" framework is being introduced due to the Allwinner's D1 memory types implementation being different from the final Svpbmt spec.

See RISC-V's for-next branch of the patches queued up ahead of the imminent Linux 5.19 merge window.
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