.. | .. |
---|
9 | 9 | #ifndef _S390_KEXEC_H |
---|
10 | 10 | #define _S390_KEXEC_H |
---|
11 | 11 | |
---|
| 12 | +#include <linux/module.h> |
---|
| 13 | + |
---|
12 | 14 | #include <asm/processor.h> |
---|
13 | 15 | #include <asm/page.h> |
---|
| 16 | +#include <asm/setup.h> |
---|
14 | 17 | /* |
---|
15 | 18 | * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. |
---|
16 | 19 | * I.e. Maximum page that is mapped directly into kernel memory, |
---|
.. | .. |
---|
42 | 45 | /* The native architecture */ |
---|
43 | 46 | #define KEXEC_ARCH KEXEC_ARCH_S390 |
---|
44 | 47 | |
---|
| 48 | +/* Allow kexec_file to load a segment to 0 */ |
---|
| 49 | +#define KEXEC_BUF_MEM_UNKNOWN -1 |
---|
| 50 | + |
---|
45 | 51 | /* Provide a dummy definition to avoid build failures. */ |
---|
46 | 52 | static inline void crash_setup_regs(struct pt_regs *newregs, |
---|
47 | 53 | struct pt_regs *oldregs) { } |
---|
.. | .. |
---|
51 | 57 | /* Pointer to the kernel buffer. Used to register cmdline etc.. */ |
---|
52 | 58 | void *kernel_buf; |
---|
53 | 59 | |
---|
| 60 | + /* Load address of the kernel_buf. */ |
---|
| 61 | + unsigned long kernel_mem; |
---|
| 62 | + |
---|
| 63 | + /* Parmarea in the kernel buffer. */ |
---|
| 64 | + struct parmarea *parm; |
---|
| 65 | + |
---|
54 | 66 | /* Total size of loaded segments in memory. Used as an offset. */ |
---|
55 | 67 | size_t memsz; |
---|
56 | 68 | |
---|
57 | | - /* Load address of initrd. Used to register INITRD_START in kernel. */ |
---|
58 | | - unsigned long initrd_load_addr; |
---|
| 69 | + struct ipl_report *report; |
---|
59 | 70 | }; |
---|
60 | 71 | |
---|
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 | +}; |
---|
68 | 84 | |
---|
69 | 85 | extern const struct kexec_file_ops s390_kexec_image_ops; |
---|
70 | 86 | extern const struct kexec_file_ops s390_kexec_elf_ops; |
---|
71 | 87 | |
---|
| 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 |
---|
72 | 96 | #endif /*_S390_KEXEC_H */ |
---|