kdump.h 1.3 KB

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