kexec.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. *
  14. * based on kexec.h from other architectures in linux-2.6.18
  15. */
  16. #ifndef _ASM_TILE_KEXEC_H
  17. #define _ASM_TILE_KEXEC_H
  18. #include <asm/page.h>
  19. #ifndef __tilegx__
  20. /* Maximum physical address we can use pages from. */
  21. #define KEXEC_SOURCE_MEMORY_LIMIT TASK_SIZE
  22. /* Maximum address we can reach in physical address mode. */
  23. #define KEXEC_DESTINATION_MEMORY_LIMIT TASK_SIZE
  24. /* Maximum address we can use for the control code buffer. */
  25. #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
  26. #else
  27. /* We need to limit the memory below PGDIR_SIZE since
  28. * we only setup page table for [0, PGDIR_SIZE) before final kexec.
  29. */
  30. /* Maximum physical address we can use pages from. */
  31. #define KEXEC_SOURCE_MEMORY_LIMIT PGDIR_SIZE
  32. /* Maximum address we can reach in physical address mode. */
  33. #define KEXEC_DESTINATION_MEMORY_LIMIT PGDIR_SIZE
  34. /* Maximum address we can use for the control code buffer. */
  35. #define KEXEC_CONTROL_MEMORY_LIMIT PGDIR_SIZE
  36. #endif
  37. #define KEXEC_CONTROL_PAGE_SIZE PAGE_SIZE
  38. /*
  39. * We don't bother to provide a unique identifier, since we can only
  40. * reboot with a single type of kernel image anyway.
  41. */
  42. #define KEXEC_ARCH KEXEC_ARCH_DEFAULT
  43. /* Use the tile override for the page allocator. */
  44. struct page *kimage_alloc_pages_arch(gfp_t gfp_mask, unsigned int order);
  45. #define kimage_alloc_pages_arch kimage_alloc_pages_arch
  46. #define MAX_NOTE_BYTES 1024
  47. /* Defined in arch/tile/kernel/relocate_kernel.S */
  48. extern const unsigned char relocate_new_kernel[];
  49. extern const unsigned long relocate_new_kernel_size;
  50. extern void relocate_new_kernel_end(void);
  51. /* Provide a dummy definition to avoid build failures. */
  52. static inline void crash_setup_regs(struct pt_regs *n, struct pt_regs *o)
  53. {
  54. }
  55. #endif /* _ASM_TILE_KEXEC_H */