1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 240c50c1fSThomas Gleixner #ifndef _LINUX_PURGATORY_H 340c50c1fSThomas Gleixner #define _LINUX_PURGATORY_H 440c50c1fSThomas Gleixner 540c50c1fSThomas Gleixner #include <linux/types.h> 6*a24d22b2SEric Biggers #include <crypto/sha2.h> 740c50c1fSThomas Gleixner #include <uapi/linux/kexec.h> 840c50c1fSThomas Gleixner 940c50c1fSThomas Gleixner struct kexec_sha_region { 1040c50c1fSThomas Gleixner unsigned long start; 1140c50c1fSThomas Gleixner unsigned long len; 1240c50c1fSThomas Gleixner }; 1340c50c1fSThomas Gleixner 1440c50c1fSThomas Gleixner /* 1540c50c1fSThomas Gleixner * These forward declarations serve two purposes: 1640c50c1fSThomas Gleixner * 1740c50c1fSThomas Gleixner * 1) Make sparse happy when checking arch/purgatory 1840c50c1fSThomas Gleixner * 2) Document that these are required to be global so the symbol 1940c50c1fSThomas Gleixner * lookup in kexec works 2040c50c1fSThomas Gleixner */ 2140c50c1fSThomas Gleixner extern struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX]; 2240c50c1fSThomas Gleixner extern u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE]; 2340c50c1fSThomas Gleixner 2440c50c1fSThomas Gleixner #endif 25