diff options
author | Junhui Liu <junhui.liu@pigmoral.tech> | 2025-07-22 00:53:11 +0800 |
---|---|---|
committer | Paul Walmsley <pjw@kernel.org> | 2025-09-18 08:18:14 -0600 |
commit | 17e9521044c9b3ee839f861d1ac35c5b5c20d16b (patch) | |
tree | c2584e6122c77c858bdb4d92e5a6a4a790f50eef /scripts/extract-fwblobs | |
parent | f3243bed39c26ce0f13e6392a634f91d409b2d02 (diff) |
riscv: mm: Use mmu-type from FDT to limit SATP mode
Some RISC-V implementations may hang when attempting to write an
unsupported SATP mode, even though the latest RISC-V specification
states such writes should have no effect. To avoid this issue, the
logic for selecting SATP mode has been refined:
The kernel now determines the SATP mode limit by taking the minimum of
the value specified by the kernel command line (noXlvl) and the
"mmu-type" property in the device tree (FDT). If only one is specified,
use that.
- If the resulting limit is sv48 or higher, the kernel will probe SATP
modes from this limit downward until a supported mode is found.
- If the limit is sv39, the kernel will directly use sv39 without
probing.
This ensures SATP mode selection is safe and compatible with both
hardware and user configuration, minimizing the risk of hangs.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Link: https://lore.kernel.org/r/20250722-satp-from-fdt-v1-2-5ba22218fa5f@pigmoral.tech
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions