kexec.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _ASM_POWERPC_KEXEC_H
  2. #define _ASM_POWERPC_KEXEC_H
  3. #ifdef __KERNEL__
  4. /*
  5. * Maximum page that is mapped directly into kernel memory.
  6. * XXX: Since we copy virt we can use any page we allocate
  7. */
  8. #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
  9. /*
  10. * Maximum address we can reach in physical address mode.
  11. * XXX: I want to allow initrd in highmem. Otherwise set to rmo on LPAR.
  12. */
  13. #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  14. /* Maximum address we can use for the control code buffer */
  15. #ifdef __powerpc64__
  16. #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
  17. #else
  18. /* TASK_SIZE, probably left over from use_mm ?? */
  19. #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
  20. #endif
  21. #define KEXEC_CONTROL_CODE_SIZE 4096
  22. /* The native architecture */
  23. #ifdef __powerpc64__
  24. #define KEXEC_ARCH KEXEC_ARCH_PPC64
  25. #else
  26. #define KEXEC_ARCH KEXEC_ARCH_PPC
  27. #endif
  28. #define HAVE_ARCH_COPY_OLDMEM_PAGE
  29. #ifndef __ASSEMBLY__
  30. #ifdef CONFIG_KEXEC
  31. #define MAX_NOTE_BYTES 1024
  32. typedef u32 note_buf_t[MAX_NOTE_BYTES / sizeof(u32)];
  33. extern note_buf_t crash_notes[];
  34. #ifdef __powerpc64__
  35. extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
  36. master to copy new code to 0 */
  37. extern void __init kexec_setup(void);
  38. extern int crashing_cpu;
  39. extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
  40. #endif /* __powerpc64 __ */
  41. struct kimage;
  42. struct pt_regs;
  43. extern void default_machine_kexec(struct kimage *image);
  44. extern int default_machine_kexec_prepare(struct kimage *image);
  45. extern void default_machine_crash_shutdown(struct pt_regs *regs);
  46. #endif /* !CONFIG_KEXEC */
  47. #endif /* ! __ASSEMBLY__ */
  48. #endif /* __KERNEL__ */
  49. #endif /* _ASM_POWERPC_KEXEC_H */