kexec.h 1.7 KB

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