purgatory.h 590 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_PURGATORY_H
  3. #define _LINUX_PURGATORY_H
  4. #include <linux/types.h>
  5. #include <crypto/sha2.h>
  6. #include <uapi/linux/kexec.h>
  7. struct kexec_sha_region {
  8. unsigned long start;
  9. unsigned long len;
  10. };
  11. /*
  12. * These forward declarations serve two purposes:
  13. *
  14. * 1) Make sparse happy when checking arch/purgatory
  15. * 2) Document that these are required to be global so the symbol
  16. * lookup in kexec works
  17. */
  18. extern struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX];
  19. extern u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE];
  20. #endif