xref: /linux/arch/riscv/kernel/vmcore_info.c (revision e6a901a00822659181c93c86d8bbc2a17779fddc)
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