Thiago Jung Bauermann | 467d278 | 2016-12-19 16:22:32 -0800 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_IMA_H |
| 2 | #define _ASM_POWERPC_IMA_H |
| 3 | |
Thiago Jung Bauermann | ab6b1d1 | 2016-12-19 16:22:45 -0800 | [diff] [blame] | 4 | struct kimage; |
| 5 | |
Thiago Jung Bauermann | 467d278 | 2016-12-19 16:22:32 -0800 | [diff] [blame] | 6 | int ima_get_kexec_buffer(void **addr, size_t *size); |
| 7 | int ima_free_kexec_buffer(void); |
| 8 | |
| 9 | #ifdef CONFIG_IMA |
| 10 | void remove_ima_buffer(void *fdt, int chosen_node); |
| 11 | #else |
| 12 | static inline void remove_ima_buffer(void *fdt, int chosen_node) {} |
| 13 | #endif |
| 14 | |
Thiago Jung Bauermann | ab6b1d1 | 2016-12-19 16:22:45 -0800 | [diff] [blame] | 15 | #ifdef CONFIG_IMA_KEXEC |
| 16 | int arch_ima_add_kexec_buffer(struct kimage *image, unsigned long load_addr, |
| 17 | size_t size); |
| 18 | |
| 19 | int setup_ima_buffer(const struct kimage *image, void *fdt, int chosen_node); |
| 20 | #else |
| 21 | static 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 Bauermann | 467d278 | 2016-12-19 16:22:32 -0800 | [diff] [blame] | 29 | #endif /* _ASM_POWERPC_IMA_H */ |