blob: 438c07b4123139d540951e75150bfc6a5e7f6738 [file] [log] [blame]
Nick Kralevicha67e4de2013-01-14 11:28:26 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
Ben Cheng655a7c02013-10-16 16:09:24 -070019#ifndef _UAPILINUX_KEXEC_H
20#define _UAPILINUX_KEXEC_H
21#include <linux/types.h>
22#define KEXEC_ON_CRASH 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define KEXEC_PRESERVE_CONTEXT 0x00000002
24#define KEXEC_ARCH_MASK 0xffff0000
Christopher Ferris82d75042015-01-26 10:57:07 -080025#define KEXEC_FILE_UNLOAD 0x00000001
26#define KEXEC_FILE_ON_CRASH 0x00000002
Christopher Ferris82d75042015-01-26 10:57:07 -080027#define KEXEC_FILE_NO_INITRAMFS 0x00000004
Tao Baod7db5942015-01-28 10:07:51 -080028#define KEXEC_ARCH_DEFAULT (0 << 16)
29#define KEXEC_ARCH_386 (3 << 16)
30#define KEXEC_ARCH_68K (4 << 16)
Christopher Ferris9584fa42019-12-09 15:36:13 -080031#define KEXEC_ARCH_PARISC (15 << 16)
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define KEXEC_ARCH_X86_64 (62 << 16)
33#define KEXEC_ARCH_PPC (20 << 16)
34#define KEXEC_ARCH_PPC64 (21 << 16)
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define KEXEC_ARCH_IA_64 (50 << 16)
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define KEXEC_ARCH_ARM (40 << 16)
37#define KEXEC_ARCH_S390 (22 << 16)
38#define KEXEC_ARCH_SH (42 << 16)
Christopher Ferris38062f92014-07-09 15:33:25 -070039#define KEXEC_ARCH_MIPS_LE (10 << 16)
Tao Baod7db5942015-01-28 10:07:51 -080040#define KEXEC_ARCH_MIPS (8 << 16)
Christopher Ferris49f525c2016-12-12 14:55:36 -080041#define KEXEC_ARCH_AARCH64 (183 << 16)
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000042#define KEXEC_ARCH_RISCV (243 << 16)
Christopher Ferris80ae69d2022-08-02 16:32:21 -070043#define KEXEC_ARCH_LOONGARCH (258 << 16)
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define KEXEC_SEGMENT_MAX 16
45struct kexec_segment {
Christopher Ferris49f525c2016-12-12 14:55:36 -080046 const void * buf;
Christopher Ferris10a76e62022-06-08 13:31:52 -070047 __kernel_size_t bufsz;
Tao Baod7db5942015-01-28 10:07:51 -080048 const void * mem;
Christopher Ferris10a76e62022-06-08 13:31:52 -070049 __kernel_size_t memsz;
Christopher Ferris49f525c2016-12-12 14:55:36 -080050};
Nick Kralevicha67e4de2013-01-14 11:28:26 -080051#endif