hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/s390/include/asm/kexec.h
....@@ -9,8 +9,11 @@
99 #ifndef _S390_KEXEC_H
1010 #define _S390_KEXEC_H
1111
12
+#include <linux/module.h>
13
+
1214 #include <asm/processor.h>
1315 #include <asm/page.h>
16
+#include <asm/setup.h>
1417 /*
1518 * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
1619 * I.e. Maximum page that is mapped directly into kernel memory,
....@@ -42,6 +45,9 @@
4245 /* The native architecture */
4346 #define KEXEC_ARCH KEXEC_ARCH_S390
4447
48
+/* Allow kexec_file to load a segment to 0 */
49
+#define KEXEC_BUF_MEM_UNKNOWN -1
50
+
4551 /* Provide a dummy definition to avoid build failures. */
4652 static inline void crash_setup_regs(struct pt_regs *newregs,
4753 struct pt_regs *oldregs) { }
....@@ -51,22 +57,40 @@
5157 /* Pointer to the kernel buffer. Used to register cmdline etc.. */
5258 void *kernel_buf;
5359
60
+ /* Load address of the kernel_buf. */
61
+ unsigned long kernel_mem;
62
+
63
+ /* Parmarea in the kernel buffer. */
64
+ struct parmarea *parm;
65
+
5466 /* Total size of loaded segments in memory. Used as an offset. */
5567 size_t memsz;
5668
57
- /* Load address of initrd. Used to register INITRD_START in kernel. */
58
- unsigned long initrd_load_addr;
69
+ struct ipl_report *report;
5970 };
6071
61
-int kexec_file_add_purgatory(struct kimage *image,
62
- struct s390_load_data *data);
63
-int kexec_file_add_initrd(struct kimage *image,
64
- struct s390_load_data *data,
65
- char *initrd, unsigned long initrd_len);
66
-int *kexec_file_update_kernel(struct kimage *iamge,
67
- struct s390_load_data *data);
72
+int s390_verify_sig(const char *kernel, unsigned long kernel_len);
73
+void *kexec_file_add_components(struct kimage *image,
74
+ int (*add_kernel)(struct kimage *image,
75
+ struct s390_load_data *data));
76
+int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,
77
+ unsigned long addr);
78
+
79
+#define ARCH_HAS_KIMAGE_ARCH
80
+
81
+struct kimage_arch {
82
+ void *ipl_buf;
83
+};
6884
6985 extern const struct kexec_file_ops s390_kexec_image_ops;
7086 extern const struct kexec_file_ops s390_kexec_elf_ops;
7187
88
+#ifdef CONFIG_KEXEC_FILE
89
+struct purgatory_info;
90
+int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
91
+ Elf_Shdr *section,
92
+ const Elf_Shdr *relsec,
93
+ const Elf_Shdr *symtab);
94
+#define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add
95
+#endif
7296 #endif /*_S390_KEXEC_H */