Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_EFI_EMBEDDED_FW_H
0003 #define _LINUX_EFI_EMBEDDED_FW_H
0004 
0005 #include <linux/list.h>
0006 #include <linux/mod_devicetable.h>
0007 
0008 #define EFI_EMBEDDED_FW_PREFIX_LEN      8
0009 
0010 /*
0011  * This struct is private to the efi-embedded fw implementation.
0012  * They are in this header for use by lib/test_firmware.c only!
0013  */
0014 struct efi_embedded_fw {
0015     struct list_head list;
0016     const char *name;
0017     const u8 *data;
0018     size_t length;
0019 };
0020 
0021 /**
0022  * struct efi_embedded_fw_desc - This struct is used by the EFI embedded-fw
0023  *                               code to search for embedded firmwares.
0024  *
0025  * @name:   Name to register the firmware with if found
0026  * @prefix: First 8 bytes of the firmware
0027  * @length: Length of the firmware in bytes including prefix
0028  * @sha256: SHA256 of the firmware
0029  */
0030 struct efi_embedded_fw_desc {
0031     const char *name;
0032     u8 prefix[EFI_EMBEDDED_FW_PREFIX_LEN];
0033     u32 length;
0034     u8 sha256[32];
0035 };
0036 
0037 extern const struct dmi_system_id touchscreen_dmi_table[];
0038 
0039 int efi_get_embedded_fw(const char *name, const u8 **dat, size_t *sz);
0040 
0041 #endif