xref: /openbmc/linux/arch/arm64/kernel/crash_core.c (revision 203b1152)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) Linaro.
4  * Copyright (C) Huawei Futurewei Technologies.
5  */
6 
7 #include <linux/crash_core.h>
8 #include <asm/cpufeature.h>
9 #include <asm/memory.h>
10 
11 void arch_crash_save_vmcoreinfo(void)
12 {
13 	VMCOREINFO_NUMBER(VA_BITS);
14 	/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
15 	vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
16 						kimage_voffset);
17 	vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
18 						PHYS_OFFSET);
19 	vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
20 	vmcoreinfo_append_str("NUMBER(KERNELPACMASK)=0x%llx\n",
21 						system_supports_address_auth() ?
22 						ptrauth_kernel_pac_mask() : 0);
23 }
24