kdump.h 1.7 KB

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