1 #ifndef LINUX_KEXEC_H 2 #define LINUX_KEXEC_H 3 4 /* kexec system call - It loads the new kernel to boot into. 5 * kexec does not sync, or unmount filesystems so if you need 6 * that to happen you need to do that yourself. 7 */ 8 9 /* kexec flags for different usage scenarios */ 10 #define KEXEC_ON_CRASH 0x00000001 11 #define KEXEC_PRESERVE_CONTEXT 0x00000002 12 #define KEXEC_ARCH_MASK 0xffff0000 13 14 /* These values match the ELF architecture values. 15 * Unless there is a good reason that should continue to be the case. 16 */ 17 #define KEXEC_ARCH_DEFAULT ( 0 << 16) 18 #define KEXEC_ARCH_386 ( 3 << 16) 19 #define KEXEC_ARCH_X86_64 (62 << 16) 20 #define KEXEC_ARCH_PPC (20 << 16) 21 #define KEXEC_ARCH_PPC64 (21 << 16) 22 #define KEXEC_ARCH_IA_64 (50 << 16) 23 #define KEXEC_ARCH_ARM (40 << 16) 24 #define KEXEC_ARCH_S390 (22 << 16) 25 #define KEXEC_ARCH_SH (42 << 16) 26 #define KEXEC_ARCH_MIPS_LE (10 << 16) 27 #define KEXEC_ARCH_MIPS ( 8 << 16) 28 29 /* The artificial cap on the number of segments passed to kexec_load. */ 30 #define KEXEC_SEGMENT_MAX 16 31 32 /* 33 * This structure is used to hold the arguments that are used when 34 * loading kernel binaries. 35 */ 36 struct kexec_segment { 37 const void *buf; 38 size_t bufsz; 39 const void *mem; 40 size_t memsz; 41 }; 42 43 /* Load a new kernel image as described by the kexec_segment array 44 * consisting of passed number of segments at the entry-point address. 45 * The flags allow different useage types. 46 */ 47 extern int kexec_load(void *, size_t, struct kexec_segment *, 48 unsigned long int); 49 50 #endif /* LINUX_KEXEC_H */ 51