kexec_internal.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef LINUX_KEXEC_INTERNAL_H
  2. #define LINUX_KEXEC_INTERNAL_H
  3. #include <linux/kexec.h>
  4. struct kimage *do_kimage_alloc_init(void);
  5. int sanity_check_segment_list(struct kimage *image);
  6. void kimage_free_page_list(struct list_head *list);
  7. void kimage_free(struct kimage *image);
  8. int kimage_load_segment(struct kimage *image, struct kexec_segment *segment);
  9. void kimage_terminate(struct kimage *image);
  10. int kimage_is_destination_range(struct kimage *image,
  11. unsigned long start, unsigned long end);
  12. extern struct mutex kexec_mutex;
  13. #ifdef CONFIG_KEXEC_FILE
  14. struct kexec_sha_region {
  15. unsigned long start;
  16. unsigned long len;
  17. };
  18. /*
  19. * Keeps track of buffer parameters as provided by caller for requesting
  20. * memory placement of buffer.
  21. */
  22. struct kexec_buf {
  23. struct kimage *image;
  24. char *buffer;
  25. unsigned long bufsz;
  26. unsigned long mem;
  27. unsigned long memsz;
  28. unsigned long buf_align;
  29. unsigned long buf_min;
  30. unsigned long buf_max;
  31. bool top_down; /* allocate from top of memory hole */
  32. };
  33. void kimage_file_post_load_cleanup(struct kimage *image);
  34. #else /* CONFIG_KEXEC_FILE */
  35. static inline void kimage_file_post_load_cleanup(struct kimage *image) { }
  36. #endif /* CONFIG_KEXEC_FILE */
  37. #endif /* LINUX_KEXEC_INTERNAL_H */