blob: 2313bdface346070a31c49e2d27eb91e702670a8 [file] [log] [blame]
Thiago Jung Bauermann467d2782016-12-19 16:22:32 -08001#ifndef _ASM_POWERPC_IMA_H
2#define _ASM_POWERPC_IMA_H
3
Thiago Jung Bauermannab6b1d12016-12-19 16:22:45 -08004struct kimage;
5
Thiago Jung Bauermann467d2782016-12-19 16:22:32 -08006int ima_get_kexec_buffer(void **addr, size_t *size);
7int ima_free_kexec_buffer(void);
8
9#ifdef CONFIG_IMA
10void remove_ima_buffer(void *fdt, int chosen_node);
11#else
12static inline void remove_ima_buffer(void *fdt, int chosen_node) {}
13#endif
14
Thiago Jung Bauermannab6b1d12016-12-19 16:22:45 -080015#ifdef CONFIG_IMA_KEXEC
16int arch_ima_add_kexec_buffer(struct kimage *image, unsigned long load_addr,
17 size_t size);
18
19int setup_ima_buffer(const struct kimage *image, void *fdt, int chosen_node);
20#else
21static inline int setup_ima_buffer(const struct kimage *image, void *fdt,
22 int chosen_node)
23{
24 remove_ima_buffer(fdt, chosen_node);
25 return 0;
26}
27#endif /* CONFIG_IMA_KEXEC */
28
Thiago Jung Bauermann467d2782016-12-19 16:22:32 -080029#endif /* _ASM_POWERPC_IMA_H */