diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2017-08-30 14:03:38 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-04-16 09:10:22 +0200 |
commit | e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697 (patch) | |
tree | d4365a12b7eb3e8cf8bd811c4075771ec2e20320 /arch/s390/include | |
parent | 71406883fd35794d573b3085433c41d0a3bf6c21 (diff) | |
download | linux-stable-e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697.tar.gz linux-stable-e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697.tar.bz2 linux-stable-e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697.zip |
s390/kexec_file: Add image loader
Add an image loader for kexec_file_load. For simplicity first skip crash
support. The functions defined in machine_kexec_file will later be shared
with the ELF loader.
Signed-off-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/kexec.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/s390/include/asm/kexec.h b/arch/s390/include/asm/kexec.h index 1d708a419326..4c9da9974cf4 100644 --- a/arch/s390/include/asm/kexec.h +++ b/arch/s390/include/asm/kexec.h @@ -46,4 +46,26 @@ static inline void crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs) { } +struct kimage; +struct s390_load_data { + /* Pointer to the kernel buffer. Used to register cmdline etc.. */ + void *kernel_buf; + + /* Total size of loaded segments in memory. Used as an offset. */ + size_t memsz; + + /* Load address of initrd. Used to register INITRD_START in kernel. */ + unsigned long initrd_load_addr; +}; + +int kexec_file_add_purgatory(struct kimage *image, + struct s390_load_data *data); +int kexec_file_add_initrd(struct kimage *image, + struct s390_load_data *data, + char *initrd, unsigned long initrd_len); +int *kexec_file_update_kernel(struct kimage *iamge, + struct s390_load_data *data); + +extern const struct kexec_file_ops s390_kexec_image_ops; + #endif /*_S390_KEXEC_H */ |