提交 88d74c39 编写于 作者: Z Zhen Lei 提交者: Zheng Zengkai

of: Enable crashkernel=X,high to support kexec option -s

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I545H8
CVE: NA

-------------------------------------------------------------------------

For "crashkernel=X,high", there must be two crash regions: high=crashk_res
and low=crashk_low_res. But now the syscall kexec_file_load() only add the
crashk_res into "linux,usable-memory-range", this causes the second kernel
to have no available dma memory. Fix it like kexec tool do for option -c.
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c090cac1
......@@ -396,6 +396,15 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image,
crashk_res.end - crashk_res.start + 1);
if (ret)
goto out;
if (crashk_low_res.end) {
ret = fdt_appendprop_addrrange(fdt, 0, chosen_node,
FDT_PROP_MEM_RANGE,
crashk_low_res.start,
crashk_low_res.end - crashk_low_res.start + 1);
if (ret)
goto out;
}
}
/* add bootargs */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册