xref: /openbmc/linux/arch/riscv/kernel/crash_core.c (revision 11696c5e)
1 // SPDX-License-Identifier: GPL-2.0-only
2 
3 #include <linux/crash_core.h>
4 #include <linux/pagemap.h>
5 
6 void arch_crash_save_vmcoreinfo(void)
7 {
8 	VMCOREINFO_NUMBER(VA_BITS);
9 	VMCOREINFO_NUMBER(phys_ram_base);
10 
11 	vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
12 	vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
13 	vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
14 	vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
15 	vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
16 #ifdef CONFIG_64BIT
17 	vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
18 	vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
19 #endif
20 	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
21 }
22