kexec.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * include/asm-s390/kexec.h
  3. *
  4. * (C) Copyright IBM Corp. 2005
  5. *
  6. * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com>
  7. *
  8. */
  9. #ifndef _S390_KEXEC_H
  10. #define _S390_KEXEC_H
  11. #ifdef __KERNEL__
  12. #include <asm/page.h>
  13. #endif
  14. #include <asm/processor.h>
  15. /*
  16. * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
  17. * I.e. Maximum page that is mapped directly into kernel memory,
  18. * and kmap is not required.
  19. */
  20. /* Maximum physical address we can use pages from */
  21. #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
  22. /* Maximum address we can reach in physical address mode */
  23. #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  24. /* Maximum address we can use for the control pages */
  25. /* Not more than 2GB */
  26. #define KEXEC_CONTROL_MEMORY_LIMIT (1UL<<31)
  27. /* Maximum address we can use for the crash control pages */
  28. #define KEXEC_CRASH_CONTROL_MEMORY_LIMIT (-1UL)
  29. /* Allocate one page for the pdp and the second for the code */
  30. #define KEXEC_CONTROL_PAGE_SIZE 4096
  31. /* Alignment of crashkernel memory */
  32. #define KEXEC_CRASH_MEM_ALIGN HPAGE_SIZE
  33. /* The native architecture */
  34. #define KEXEC_ARCH KEXEC_ARCH_S390
  35. /*
  36. * Size for s390x ELF notes per CPU
  37. *
  38. * Seven notes plus zero note at the end: prstatus, fpregset, timer,
  39. * tod_cmp, tod_reg, control regs, and prefix
  40. */
  41. #define KEXEC_NOTE_BYTES \
  42. (ALIGN(sizeof(struct elf_note), 4) * 8 + \
  43. ALIGN(sizeof("CORE"), 4) * 7 + \
  44. ALIGN(sizeof(struct elf_prstatus), 4) + \
  45. ALIGN(sizeof(elf_fpregset_t), 4) + \
  46. ALIGN(sizeof(u64), 4) + \
  47. ALIGN(sizeof(u64), 4) + \
  48. ALIGN(sizeof(u32), 4) + \
  49. ALIGN(sizeof(u64) * 16, 4) + \
  50. ALIGN(sizeof(u32), 4) \
  51. )
  52. /* Provide a dummy definition to avoid build failures. */
  53. static inline void crash_setup_regs(struct pt_regs *newregs,
  54. struct pt_regs *oldregs) { }
  55. #endif /*_S390_KEXEC_H */