kdump.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _PPC64_KDUMP_H
  3. #define _PPC64_KDUMP_H
  4. #include <asm/page.h>
  5. #define KDUMP_KERNELBASE 0x2000000
  6. /* How many bytes to reserve at zero for kdump. The reserve limit should
  7. * be greater or equal to the trampoline's end address.
  8. * Reserve to the end of the FWNMI area, see head_64.S */
  9. #define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
  10. #ifdef CONFIG_CRASH_DUMP
  11. /*
  12. * On PPC64 translation is disabled during trampoline setup, so we use
  13. * physical addresses. Though on PPC32 translation is already enabled,
  14. * so we can't do the same. Luckily create_trampoline() creates relative
  15. * branches, so we can just add the PAGE_OFFSET and don't worry about it.
  16. */
  17. #ifdef __powerpc64__
  18. #define KDUMP_TRAMPOLINE_START 0x0100
  19. #define KDUMP_TRAMPOLINE_END 0x3000
  20. #else
  21. #define KDUMP_TRAMPOLINE_START (0x0100 + PAGE_OFFSET)
  22. #define KDUMP_TRAMPOLINE_END (0x3000 + PAGE_OFFSET)
  23. #endif /* __powerpc64__ */
  24. #define KDUMP_MIN_TCE_ENTRIES 2048
  25. #endif /* CONFIG_CRASH_DUMP */
  26. #ifndef __ASSEMBLY__
  27. #if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL)
  28. extern void reserve_kdump_trampoline(void);
  29. extern void setup_kdump_trampoline(void);
  30. #else
  31. /* !CRASH_DUMP || !NONSTATIC_KERNEL */
  32. static inline void reserve_kdump_trampoline(void) { ; }
  33. static inline void setup_kdump_trampoline(void) { ; }
  34. #endif
  35. #endif /* __ASSEMBLY__ */
  36. #endif /* __PPC64_KDUMP_H */