• Youling Tang's avatar
    LoongArch: kdump: Add crashkernel=YM handling · 35c94fab
    Youling Tang authored
    When the kernel crashkernel parameter is specified with just a size,
    we are supposed to allocate a region from RAM to store the crashkernel,
    "crashkernel=512M" would be recommended for kdump.
    
    Fix this by lifting similar code from x86, importing it to LoongArch
    with LoongArch specific parameters added. We allocate the crashkernel
    region from the first 4GB of physical memory (because SWIOTLB should be
    allocated below 4GB). However, LoongArch currently does not implement
    crashkernel_low and crashkernel_high the same as x86.
    
    When X is not specified, crash_base defaults to 0 (crashkernel=YM@XM).
    Signed-off-by: default avatarYouling Tang <tangyouling@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    35c94fab
setup.c 14.4 KB