hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/arch/arm64/kernel/crash_core.c
....@@ -5,7 +5,16 @@
55 */
66
77 #include <linux/crash_core.h>
8
+#include <asm/cpufeature.h>
89 #include <asm/memory.h>
10
+#include <asm/pgtable-hwdef.h>
11
+
12
+static inline u64 get_tcr_el1_t1sz(void);
13
+
14
+static inline u64 get_tcr_el1_t1sz(void)
15
+{
16
+ return (read_sysreg(tcr_el1) & TCR_T1SZ_MASK) >> TCR_T1SZ_OFFSET;
17
+}
918
1019 void arch_crash_save_vmcoreinfo(void)
1120 {
....@@ -15,5 +24,10 @@
1524 kimage_voffset);
1625 vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
1726 PHYS_OFFSET);
27
+ vmcoreinfo_append_str("NUMBER(TCR_EL1_T1SZ)=0x%llx\n",
28
+ get_tcr_el1_t1sz());
1829 vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
30
+ vmcoreinfo_append_str("NUMBER(KERNELPACMASK)=0x%llx\n",
31
+ system_supports_address_auth() ?
32
+ ptrauth_kernel_pac_mask() : 0);
1933 }