Page sizes supported by RISC-V

Jeff Law jeffreyalaw at gmail.com
Sun Sep 29 07:51:25 PDT 2024



On 9/28/24 10:35 AM, Florian Weimer wrote:
> I'm working on adding a <sys/pagesize.h> header to glibc, so that
> programmers can easily determine the range of possible page sizes for a
> particular target, for things like pointer tagging and mapped file
> alignment requirements.
> 
> Linux currently supports 4 KiB pages only.  I couldn't find anything in
> the RISC-V specifications that mandates a specific page size, but of
> course the way ELF LOAD segments are constructed necessarily imposes a
> maximum page size constraint for particular executables.  Today, the
> toolchain assumes the maximum supported page size is 4 KiB, and this is
> also reflected in arch/riscv/Kconfig in the Linux sources (as far as I
> can read Kconfig).
4k is probably the most common in practice right now.  RISC-V generally 
seems to leave this kind of thing to the implementors to decide, so I 
wouldn't be at all surprised if there's nothing in the privileged spec 
other than specifying a minimum page size.

  Jeff



More information about the linux-riscv mailing list