efi_embedded_fw.h 1.0 KB

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