0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _S390_KEXEC_H
0010 #define _S390_KEXEC_H
0011
0012 #include <linux/module.h>
0013
0014 #include <asm/processor.h>
0015 #include <asm/page.h>
0016 #include <asm/setup.h>
0017
0018
0019
0020
0021
0022
0023
0024 #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
0025
0026
0027 #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
0028
0029
0030
0031 #define KEXEC_CONTROL_MEMORY_LIMIT (1UL<<31)
0032
0033
0034 #define KEXEC_CONTROL_MEMORY_GFP (GFP_DMA | __GFP_NORETRY)
0035
0036
0037 #define KEXEC_CRASH_CONTROL_MEMORY_LIMIT (-1UL)
0038
0039
0040 #define KEXEC_CONTROL_PAGE_SIZE 4096
0041
0042
0043 #define KEXEC_CRASH_MEM_ALIGN HPAGE_SIZE
0044
0045
0046 #define KEXEC_ARCH KEXEC_ARCH_S390
0047
0048
0049 #define KEXEC_BUF_MEM_UNKNOWN -1
0050
0051
0052 static inline void crash_setup_regs(struct pt_regs *newregs,
0053 struct pt_regs *oldregs) { }
0054
0055 struct kimage;
0056 struct s390_load_data {
0057
0058 void *kernel_buf;
0059
0060
0061 unsigned long kernel_mem;
0062
0063
0064 struct parmarea *parm;
0065
0066
0067 size_t memsz;
0068
0069 struct ipl_report *report;
0070 };
0071
0072 int s390_verify_sig(const char *kernel, unsigned long kernel_len);
0073 void *kexec_file_add_components(struct kimage *image,
0074 int (*add_kernel)(struct kimage *image,
0075 struct s390_load_data *data));
0076 int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,
0077 unsigned long addr);
0078
0079 #define ARCH_HAS_KIMAGE_ARCH
0080
0081 struct kimage_arch {
0082 void *ipl_buf;
0083 };
0084
0085 extern const struct kexec_file_ops s390_kexec_image_ops;
0086 extern const struct kexec_file_ops s390_kexec_elf_ops;
0087
0088 #ifdef CONFIG_CRASH_DUMP
0089 void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
0090 #define crash_free_reserved_phys_range crash_free_reserved_phys_range
0091
0092 void arch_kexec_protect_crashkres(void);
0093 #define arch_kexec_protect_crashkres arch_kexec_protect_crashkres
0094
0095 void arch_kexec_unprotect_crashkres(void);
0096 #define arch_kexec_unprotect_crashkres arch_kexec_unprotect_crashkres
0097 #endif
0098
0099 #ifdef CONFIG_KEXEC_FILE
0100 struct purgatory_info;
0101 int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
0102 Elf_Shdr *section,
0103 const Elf_Shdr *relsec,
0104 const Elf_Shdr *symtab);
0105 #define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add
0106
0107 int arch_kimage_file_post_load_cleanup(struct kimage *image);
0108 #define arch_kimage_file_post_load_cleanup arch_kimage_file_post_load_cleanup
0109 #endif
0110 #endif