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

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

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_POWERPC_KEXEC_H
  2 #define _ASM_POWERPC_KEXEC_H
  3 #ifdef __KERNEL__
  4 
  5 #if defined(CONFIG_FSL_BOOKE) || defined(CONFIG_44x)
  6 
  7 /*
  8  * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
  9  * and therefore we can only deal with memory within this range
 10  */
 11 #define KEXEC_SOURCE_MEMORY_LIMIT       (2 * 1024 * 1024 * 1024UL - 1)
 12 #define KEXEC_DESTINATION_MEMORY_LIMIT  (2 * 1024 * 1024 * 1024UL - 1)
 13 #define KEXEC_CONTROL_MEMORY_LIMIT      (2 * 1024 * 1024 * 1024UL - 1)
 14 
 15 #else
 16 
 17 /*
 18  * Maximum page that is mapped directly into kernel memory.
 19  * XXX: Since we copy virt we can use any page we allocate
 20  */
 21 #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
 22 
 23 /*
 24  * Maximum address we can reach in physical address mode.
 25  * XXX: I want to allow initrd in highmem. Otherwise set to rmo on LPAR.
 26  */
 27 #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
 28 
 29 /* Maximum address we can use for the control code buffer */
 30 #ifdef __powerpc64__
 31 #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
 32 #else
 33 /* TASK_SIZE, probably left over from use_mm ?? */
 34 #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
 35 #endif
 36 #endif
 37 
 38 #define KEXEC_CONTROL_PAGE_SIZE 4096
 39 
 40 /* The native architecture */
 41 #ifdef __powerpc64__
 42 #define KEXEC_ARCH KEXEC_ARCH_PPC64
 43 #else
 44 #define KEXEC_ARCH KEXEC_ARCH_PPC
 45 #endif
 46 
 47 #define KEXEC_STATE_NONE 0
 48 #define KEXEC_STATE_IRQS_OFF 1
 49 #define KEXEC_STATE_REAL_MODE 2
 50 
 51 #ifndef __ASSEMBLY__
 52 #include <asm/reg.h>
 53 
 54 typedef void (*crash_shutdown_t)(void);
 55 
 56 #ifdef CONFIG_KEXEC_CORE
 57 
 58 /*
 59  * This function is responsible for capturing register states if coming
 60  * via panic or invoking dump using sysrq-trigger.
 61  */
 62 static inline void crash_setup_regs(struct pt_regs *newregs,
 63                                         struct pt_regs *oldregs)
 64 {
 65         if (oldregs)
 66                 memcpy(newregs, oldregs, sizeof(*newregs));
 67         else
 68                 ppc_save_regs(newregs);
 69 }
 70 
 71 extern void kexec_smp_wait(void);       /* get and clear naca physid, wait for
 72                                           master to copy new code to 0 */
 73 extern int crashing_cpu;
 74 extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
 75 
 76 struct kimage;
 77 struct pt_regs;
 78 extern void default_machine_kexec(struct kimage *image);
 79 extern int default_machine_kexec_prepare(struct kimage *image);
 80 extern void default_machine_crash_shutdown(struct pt_regs *regs);
 81 extern int crash_shutdown_register(crash_shutdown_t handler);
 82 extern int crash_shutdown_unregister(crash_shutdown_t handler);
 83 
 84 extern void crash_kexec_secondary(struct pt_regs *regs);
 85 extern int overlaps_crashkernel(unsigned long start, unsigned long size);
 86 extern void reserve_crashkernel(void);
 87 extern void machine_kexec_mask_interrupts(void);
 88 
 89 static inline bool kdump_in_progress(void)
 90 {
 91         return crashing_cpu >= 0;
 92 }
 93 
 94 #ifdef CONFIG_KEXEC_FILE
 95 extern struct kexec_file_ops kexec_elf64_ops;
 96 
 97 #ifdef CONFIG_IMA_KEXEC
 98 #define ARCH_HAS_KIMAGE_ARCH
 99 
100 struct kimage_arch {
101         phys_addr_t ima_buffer_addr;
102         size_t ima_buffer_size;
103 };
104 #endif
105 
106 int setup_purgatory(struct kimage *image, const void *slave_code,
107                     const void *fdt, unsigned long kernel_load_addr,
108                     unsigned long fdt_load_addr);
109 int setup_new_fdt(const struct kimage *image, void *fdt,
110                   unsigned long initrd_load_addr, unsigned long initrd_len,
111                   const char *cmdline);
112 int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size);
113 #endif /* CONFIG_KEXEC_FILE */
114 
115 #else /* !CONFIG_KEXEC_CORE */
116 static inline void crash_kexec_secondary(struct pt_regs *regs) { }
117 
118 static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
119 {
120         return 0;
121 }
122 
123 static inline void reserve_crashkernel(void) { ; }
124 
125 static inline int crash_shutdown_register(crash_shutdown_t handler)
126 {
127         return 0;
128 }
129 
130 static inline int crash_shutdown_unregister(crash_shutdown_t handler)
131 {
132         return 0;
133 }
134 
135 static inline bool kdump_in_progress(void)
136 {
137         return false;
138 }
139 
140 #endif /* CONFIG_KEXEC_CORE */
141 #endif /* ! __ASSEMBLY__ */
142 #endif /* __KERNEL__ */
143 #endif /* _ASM_POWERPC_KEXEC_H */
144 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp