logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

kexec.h (2097B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef LINUX_KEXEC_H
  3. #define LINUX_KEXEC_H
  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. #include <linux/types.h>
  9. /* kexec flags for different usage scenarios */
  10. #define KEXEC_ON_CRASH 0x00000001
  11. #define KEXEC_PRESERVE_CONTEXT 0x00000002
  12. #define KEXEC_UPDATE_ELFCOREHDR 0x00000004
  13. #define KEXEC_CRASH_HOTPLUG_SUPPORT 0x00000008
  14. #define KEXEC_ARCH_MASK 0xffff0000
  15. /*
  16. * Kexec file load interface flags.
  17. * KEXEC_FILE_UNLOAD : Unload already loaded kexec/kdump image.
  18. * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.
  19. * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd
  20. * fd field.
  21. */
  22. #define KEXEC_FILE_UNLOAD 0x00000001
  23. #define KEXEC_FILE_ON_CRASH 0x00000002
  24. #define KEXEC_FILE_NO_INITRAMFS 0x00000004
  25. #define KEXEC_FILE_DEBUG 0x00000008
  26. /* These values match the ELF architecture values.
  27. * Unless there is a good reason that should continue to be the case.
  28. */
  29. #define KEXEC_ARCH_DEFAULT ( 0 << 16)
  30. #define KEXEC_ARCH_386 ( 3 << 16)
  31. #define KEXEC_ARCH_68K ( 4 << 16)
  32. #define KEXEC_ARCH_PARISC (15 << 16)
  33. #define KEXEC_ARCH_X86_64 (62 << 16)
  34. #define KEXEC_ARCH_PPC (20 << 16)
  35. #define KEXEC_ARCH_PPC64 (21 << 16)
  36. #define KEXEC_ARCH_IA_64 (50 << 16)
  37. #define KEXEC_ARCH_ARM (40 << 16)
  38. #define KEXEC_ARCH_S390 (22 << 16)
  39. #define KEXEC_ARCH_SH (42 << 16)
  40. #define KEXEC_ARCH_MIPS_LE (10 << 16)
  41. #define KEXEC_ARCH_MIPS ( 8 << 16)
  42. #define KEXEC_ARCH_AARCH64 (183 << 16)
  43. #define KEXEC_ARCH_RISCV (243 << 16)
  44. #define KEXEC_ARCH_LOONGARCH (258 << 16)
  45. /* The artificial cap on the number of segments passed to kexec_load. */
  46. #define KEXEC_SEGMENT_MAX 16
  47. /*
  48. * This structure is used to hold the arguments that are used when
  49. * loading kernel binaries.
  50. */
  51. struct kexec_segment {
  52. const void *buf;
  53. __kernel_size_t bufsz;
  54. const void *mem;
  55. __kernel_size_t memsz;
  56. };
  57. #endif /* LINUX_KEXEC_H */