xref: /linux/arch/riscv/kernel/vmcore_info.c (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1 // SPDX-License-Identifier: GPL-2.0-only
2 
3 #include <linux/vmcore_info.h>
4 #include <linux/pagemap.h>
5 
6 void arch_crash_save_vmcoreinfo(void)
7 {
8 	VMCOREINFO_NUMBER(phys_ram_base);
9 
10 	vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
11 	vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
12 #ifdef CONFIG_MMU
13 	VMCOREINFO_NUMBER(VA_BITS);
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 #endif
21 	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
22 	vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
23 						kernel_map.va_kernel_pa_offset);
24 }
25