hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/arm64/include/asm/kexec.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * kexec for arm64
34 *
45 * Copyright (C) Linaro.
56 * Copyright (C) Huawei Futurewei Technologies.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #ifndef _ARM64_KEXEC_H
....@@ -93,6 +90,29 @@
9390 static inline void crash_post_resume(void) {}
9491 #endif
9592
93
+#ifdef CONFIG_KEXEC_FILE
94
+#define ARCH_HAS_KIMAGE_ARCH
95
+
96
+struct kimage_arch {
97
+ void *dtb;
98
+ unsigned long dtb_mem;
99
+ /* Core ELF header buffer */
100
+ void *elf_headers;
101
+ unsigned long elf_headers_mem;
102
+ unsigned long elf_headers_sz;
103
+};
104
+
105
+extern const struct kexec_file_ops kexec_image_ops;
106
+
107
+struct kimage;
108
+
109
+extern int arch_kimage_file_post_load_cleanup(struct kimage *image);
110
+extern int load_other_segments(struct kimage *image,
111
+ unsigned long kernel_load_addr, unsigned long kernel_size,
112
+ char *initrd, unsigned long initrd_len,
113
+ char *cmdline);
114
+#endif
115
+
96116 #endif /* __ASSEMBLY__ */
97117
98118 #endif