summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorHan Gao <gaohan@iscas.ac.cn>2026-06-07 05:17:58 +0300
committerPaul Walmsley <pjw@kernel.org>2026-06-07 08:48:15 +0300
commitb67a1ee0db0094c6cc158b087be6c334ad881a41 (patch)
treed98aaa94848a92eef70eef9b3c6bd339aa5983f6 /include/linux/debugobjects.h
parentf3336b48cf9d3f2d1fc78e3289c0ded2f00876ee (diff)
downloadlinux-b67a1ee0db0094c6cc158b087be6c334ad881a41.tar.xz
riscv: kexec_file: Constrain segment placement to direct map
When kexec_file_load places segments with buf_max=ULONG_MAX and top_down=true, they land at the highest available physical addresses. On RISC-V the size of the linear mapping is determined by the active VM mode: SV39 caps the direct map at roughly 128GB, while SV48/SV57 extend the range substantially further. When the installed physical memory exceeds the direct map size of the active mode, top-down placement puts DTB/initrd at physical addresses outside the linearly mapped region. The kexec'd kernel cannot reach them during early boot, triggering a page fault at memcmp in start_kernel. Fix by constraining buf_max to PFN_PHYS(max_low_pfn), which reflects the runtime direct map boundary for the active VM mode (SV39/SV48/ SV57). This keeps all kexec segments within the linearly mapped region while preserving the upstream top_down allocation strategy. Signed-off-by: Han Gao <gaohan@iscas.ac.cn> Link: https://patch.msgid.link/20260519170641.123517-1-gaohan@iscas.ac.cn Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions