crash_core.c 520 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) Linaro.
  4. * Copyright (C) Huawei Futurewei Technologies.
  5. */
  6. #include <linux/crash_core.h>
  7. #include <asm/memory.h>
  8. void arch_crash_save_vmcoreinfo(void)
  9. {
  10. VMCOREINFO_NUMBER(VA_BITS);
  11. /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
  12. vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
  13. kimage_voffset);
  14. vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
  15. PHYS_OFFSET);
  16. vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
  17. }