kexec.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * kexec.h for kexec
  4. * Created by <[email protected]> on Thu Oct 12 14:59:34 2006
  5. */
  6. #ifndef _MIPS_KEXEC
  7. # define _MIPS_KEXEC
  8. #include <asm/stacktrace.h>
  9. /* Maximum physical address we can use pages from */
  10. #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
  11. /* Maximum address we can reach in physical address mode */
  12. #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  13. /* Maximum address we can use for the control code buffer */
  14. #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
  15. /* Reserve 3*4096 bytes for board-specific info */
  16. #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
  17. /* The native architecture */
  18. #define KEXEC_ARCH KEXEC_ARCH_MIPS
  19. #define MAX_NOTE_BYTES 1024
  20. static inline void crash_setup_regs(struct pt_regs *newregs,
  21. struct pt_regs *oldregs)
  22. {
  23. if (oldregs)
  24. memcpy(newregs, oldregs, sizeof(*newregs));
  25. else
  26. prepare_frametrace(newregs);
  27. }
  28. #ifdef CONFIG_KEXEC
  29. struct kimage;
  30. extern unsigned long kexec_args[4];
  31. extern int (*_machine_kexec_prepare)(struct kimage *);
  32. extern void (*_machine_kexec_shutdown)(void);
  33. extern void (*_machine_crash_shutdown)(struct pt_regs *regs);
  34. void default_machine_crash_shutdown(struct pt_regs *regs);
  35. void kexec_nonboot_cpu_jump(void);
  36. void kexec_reboot(void);
  37. #ifdef CONFIG_SMP
  38. extern const unsigned char kexec_smp_wait[];
  39. extern unsigned long secondary_kexec_args[4];
  40. extern atomic_t kexec_ready_to_reboot;
  41. extern void (*_crash_smp_send_stop)(void);
  42. #endif
  43. #endif
  44. #endif /* !_MIPS_KEXEC */