• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_IMA_H
3 #define _ASM_POWERPC_IMA_H
4 
5 struct kimage;
6 
7 int ima_get_kexec_buffer(void **addr, size_t *size);
8 int ima_free_kexec_buffer(void);
9 
10 #ifdef CONFIG_IMA
11 void remove_ima_buffer(void *fdt, int chosen_node);
12 #else
remove_ima_buffer(void * fdt,int chosen_node)13 static inline void remove_ima_buffer(void *fdt, int chosen_node) {}
14 #endif
15 
16 #ifdef CONFIG_IMA_KEXEC
17 int arch_ima_add_kexec_buffer(struct kimage *image, unsigned long load_addr,
18 			      size_t size);
19 
20 int setup_ima_buffer(const struct kimage *image, void *fdt, int chosen_node);
21 #else
setup_ima_buffer(const struct kimage * image,void * fdt,int chosen_node)22 static inline int setup_ima_buffer(const struct kimage *image, void *fdt,
23 				   int chosen_node)
24 {
25 	remove_ima_buffer(fdt, chosen_node);
26 	return 0;
27 }
28 #endif /* CONFIG_IMA_KEXEC */
29 
30 #endif /* _ASM_POWERPC_IMA_H */
31