1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_X86_SEAMLDR_H 3 #define _ASM_X86_SEAMLDR_H 4 5 #include <linux/types.h> 6 7 /* 8 * This is the "SEAMLDR_INFO" data structure defined in the 9 * "SEAM Loader (SEAMLDR) Interface Specification". 10 * 11 * Must be aligned to a 256-byte boundary. 12 */ 13 struct seamldr_info { 14 u32 version; 15 u32 attributes; 16 u32 vendor_id; 17 u32 build_date; 18 u16 build_num; 19 u16 minor_version; 20 u16 major_version; 21 u16 update_version; 22 u32 acm_x2apicid; 23 u32 num_remaining_updates; 24 u8 seam_info[128]; 25 u8 seam_ready; 26 u8 seam_debug; 27 u8 p_seam_ready; 28 u8 reserved[93]; 29 } __packed __aligned(256); 30 31 static_assert(sizeof(struct seamldr_info) == 256); 32 33 int seamldr_get_info(struct seamldr_info *seamldr_info); 34 int seamldr_install_module(const u8 *data, u32 data_len); 35 void seamldr_lock_module_update(void); 36 void seamldr_unlock_module_update(void); 37 38 #endif /* _ASM_X86_SEAMLDR_H */ 39