kexec.h 587 B

123456789101112131415161718
  1. /* kexec: hot-reload the kernel over serial without a reboot (C-light variant). */
  2. #ifndef KEXEC_H
  3. #define KEXEC_H
  4. void program_kexec_main(void);
  5. /* Non-zero while a kexec receive is in progress (prevents double-trigger). */
  6. extern volatile int kexec_busy;
  7. /* Receive progress, in bytes. kexec_total is 0 until the header is parsed. */
  8. extern volatile unsigned int kexec_progress;
  9. extern volatile unsigned int kexec_total;
  10. /* Returns 1 if the serial ring buffer starts with the "KXEC" magic, i.e. the
  11. * host has begun sending a new kernel image. */
  12. int kexec_pending(void);
  13. #endif