~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/kexec.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Copyright IBM Corp. 2005
  4  *
  5  * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com>
  6  *
  7  */
  8 
  9 #ifndef _S390_KEXEC_H
 10 #define _S390_KEXEC_H
 11 
 12 #include <linux/module.h>
 13 
 14 #include <asm/processor.h>
 15 #include <asm/page.h>
 16 #include <asm/setup.h>
 17 /*
 18  * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
 19  * I.e. Maximum page that is mapped directly into kernel memory,
 20  * and kmap is not required.
 21  */
 22 
 23 /* Maximum physical address we can use pages from */
 24 #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
 25 
 26 /* Maximum address we can reach in physical address mode */
 27 #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
 28 
 29 /* Maximum address we can use for the control pages */
 30 /* Not more than 2GB */
 31 #define KEXEC_CONTROL_MEMORY_LIMIT (1UL<<31)
 32 
 33 /* Allocate control page with GFP_DMA */
 34 #define KEXEC_CONTROL_MEMORY_GFP (GFP_DMA | __GFP_NORETRY)
 35 
 36 /* Maximum address we can use for the crash control pages */
 37 #define KEXEC_CRASH_CONTROL_MEMORY_LIMIT (-1UL)
 38 
 39 /* Allocate one page for the pdp and the second for the code */
 40 #define KEXEC_CONTROL_PAGE_SIZE 4096
 41 
 42 /* Alignment of crashkernel memory */
 43 #define KEXEC_CRASH_MEM_ALIGN HPAGE_SIZE
 44 
 45 /* The native architecture */
 46 #define KEXEC_ARCH KEXEC_ARCH_S390
 47 
 48 /* Allow kexec_file to load a segment to 0 */
 49 #define KEXEC_BUF_MEM_UNKNOWN -1
 50 
 51 /* Provide a dummy definition to avoid build failures. */
 52 static inline void crash_setup_regs(struct pt_regs *newregs,
 53                                         struct pt_regs *oldregs) { }
 54 
 55 struct kimage;
 56 struct s390_load_data {
 57         /* Pointer to the kernel buffer. Used to register cmdline etc.. */
 58         void *kernel_buf;
 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 
 66         /* Total size of loaded segments in memory. Used as an offset. */
 67         size_t memsz;
 68 
 69         struct ipl_report *report;
 70 };
 71 
 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 };
 84 
 85 extern const struct kexec_file_ops s390_kexec_image_ops;
 86 extern const struct kexec_file_ops s390_kexec_elf_ops;
 87 
 88 #ifdef CONFIG_CRASH_DUMP
 89 void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
 90 #define crash_free_reserved_phys_range crash_free_reserved_phys_range
 91 
 92 void arch_kexec_protect_crashkres(void);
 93 #define arch_kexec_protect_crashkres arch_kexec_protect_crashkres
 94 
 95 void arch_kexec_unprotect_crashkres(void);
 96 #define arch_kexec_unprotect_crashkres arch_kexec_unprotect_crashkres
 97 #endif
 98 
 99 #ifdef CONFIG_KEXEC_FILE
100 struct purgatory_info;
101 int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
102                                      Elf_Shdr *section,
103                                      const Elf_Shdr *relsec,
104                                      const Elf_Shdr *symtab);
105 #define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add
106 
107 int arch_kimage_file_post_load_cleanup(struct kimage *image);
108 #define arch_kimage_file_post_load_cleanup arch_kimage_file_post_load_cleanup
109 #endif
110 #endif /*_S390_KEXEC_H */
111 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php