kexec.h 1.6 KB

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