1 // SPDX-License-Identifier: GPL-2.0-only 2 3 #include <linux/vmcore_info.h> 4 #include <asm/abs_lowcore.h> 5 #include <linux/mm.h> 6 #include <asm/setup.h> 7 8 void arch_crash_save_vmcoreinfo(void) 9 { 10 struct lowcore *abs_lc; 11 12 VMCOREINFO_SYMBOL(lowcore_ptr); 13 VMCOREINFO_SYMBOL(high_memory); 14 VMCOREINFO_LENGTH(lowcore_ptr, NR_CPUS); 15 vmcoreinfo_append_str("SAMODE31=%lx\n", (unsigned long)__samode31); 16 vmcoreinfo_append_str("EAMODE31=%lx\n", (unsigned long)__eamode31); 17 vmcoreinfo_append_str("IDENTITYBASE=%lx\n", __identity_base); 18 vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset()); 19 vmcoreinfo_append_str("KERNELOFFPHYS=%lx\n", __kaslr_offset_phys); 20 abs_lc = get_abs_lowcore(); 21 abs_lc->vmcore_info = paddr_vmcoreinfo_note(); 22 put_abs_lowcore(abs_lc); 23 } 24