^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef LINUX_KEXEC_INTERNAL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define LINUX_KEXEC_INTERNAL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/kexec.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) struct kimage *do_kimage_alloc_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) int sanity_check_segment_list(struct kimage *image);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) void kimage_free_page_list(struct list_head *list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) void kimage_free(struct kimage *image);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) int kimage_load_segment(struct kimage *image, struct kexec_segment *segment);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) void kimage_terminate(struct kimage *image);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) int kimage_is_destination_range(struct kimage *image,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) unsigned long start, unsigned long end);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int machine_kexec_post_load(struct kimage *image);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern struct mutex kexec_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #ifdef CONFIG_KEXEC_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <linux/purgatory.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) void kimage_file_post_load_cleanup(struct kimage *image);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern char kexec_purgatory[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern size_t kexec_purgatory_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #else /* CONFIG_KEXEC_FILE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static inline void kimage_file_post_load_cleanup(struct kimage *image) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #endif /* CONFIG_KEXEC_FILE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #endif /* LINUX_KEXEC_INTERNAL_H */