riscv: Allow NOMMU kernels to access all of RAM
authorSamuel Holland <samuel.holland@sifive.com>
Sat, 26 Oct 2024 17:13:54 +0000 (10:13 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 26 Mar 2025 22:56:40 +0000 (15:56 -0700)
commit2c0391b29b27f315c1b4c29ffde66f50b29fab99
tree5495a849828fb02f632bcbe9c0ca88741228c6bb
parentbffada8201fc9933ba0974b76b6068d6b4557ef4
riscv: Allow NOMMU kernels to access all of RAM

NOMMU kernels currently cannot access memory below the kernel link
address. Remove this restriction by setting PAGE_OFFSET to the actual
start of RAM, as determined from the devicetree. The kernel link address
must be a constant, so keep using CONFIG_PAGE_OFFSET for that purpose.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Jesse Taube <mr.bossman075@gmail.com>
Link: https://lore.kernel.org/r/20241026171441.3047904-3-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/page.h
arch/riscv/include/asm/pgtable.h