Commit | Line | Data |
---|---|---|
f0df68d5 HG |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef _LINUX_EFI_EMBEDDED_FW_H | |
3 | #define _LINUX_EFI_EMBEDDED_FW_H | |
4 | ||
5 | #include <linux/list.h> | |
6 | #include <linux/mod_devicetable.h> | |
7 | ||
8 | #define EFI_EMBEDDED_FW_PREFIX_LEN 8 | |
9 | ||
10 | /* | |
baaabecf KC |
11 | * This struct is private to the efi-embedded fw implementation. |
12 | * They are in this header for use by lib/test_firmware.c only! | |
f0df68d5 HG |
13 | */ |
14 | struct efi_embedded_fw { | |
15 | struct list_head list; | |
16 | const char *name; | |
17 | const u8 *data; | |
18 | size_t length; | |
19 | }; | |
20 | ||
f0df68d5 HG |
21 | /** |
22 | * struct efi_embedded_fw_desc - This struct is used by the EFI embedded-fw | |
23 | * code to search for embedded firmwares. | |
24 | * | |
25 | * @name: Name to register the firmware with if found | |
26 | * @prefix: First 8 bytes of the firmware | |
27 | * @length: Length of the firmware in bytes including prefix | |
28 | * @sha256: SHA256 of the firmware | |
29 | */ | |
30 | struct efi_embedded_fw_desc { | |
31 | const char *name; | |
32 | u8 prefix[EFI_EMBEDDED_FW_PREFIX_LEN]; | |
33 | u32 length; | |
34 | u8 sha256[32]; | |
35 | }; | |
36 | ||
835e1b86 HG |
37 | extern const struct dmi_system_id touchscreen_dmi_table[]; |
38 | ||
f0df68d5 HG |
39 | int efi_get_embedded_fw(const char *name, const u8 **dat, size_t *sz); |
40 | ||
41 | #endif |