efi_firmware.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * EFI Firmware management protocol
  4. *
  5. * Copyright (c) 2020 Linaro Limited
  6. * Author: AKASHI Takahiro
  7. */
  8. #include <common.h>
  9. #include <charset.h>
  10. #include <dfu.h>
  11. #include <efi_loader.h>
  12. #include <efi_variable.h>
  13. #include <fwu.h>
  14. #include <image.h>
  15. #include <signatures.h>
  16. #include <linux/list.h>
  17. #define FMP_PAYLOAD_HDR_SIGNATURE SIGNATURE_32('M', 'S', 'S', '1')
  18. /**
  19. * struct fmp_payload_header - EDK2 header for the FMP payload
  20. *
  21. * This structure describes the header which is preprended to the
  22. * FMP payload by the edk2 capsule generation scripts.
  23. *
  24. * @signature: Header signature used to identify the header
  25. * @header_size: Size of the structure
  26. * @fw_version: Firmware versions used
  27. * @lowest_supported_version: Lowest supported version
  28. */
  29. struct fmp_payload_header {
  30. u32 signature;
  31. u32 header_size;
  32. u32 fw_version;
  33. u32 lowest_supported_version;
  34. };
  35. /**
  36. * struct fmp_state - fmp firmware update state
  37. *
  38. * This structure describes the state of the firmware update
  39. * through FMP protocol.
  40. *
  41. * @fw_version: Firmware versions used
  42. * @lowest_supported_version: Lowest supported version
  43. * @last_attempt_version: Last attempt version
  44. * @last_attempt_status: Last attempt status
  45. */
  46. struct fmp_state {
  47. u32 fw_version;
  48. u32 lowest_supported_version; /* not used */
  49. u32 last_attempt_version; /* not used */
  50. u32 last_attempt_status; /* not used */
  51. };
  52. __weak void set_dfu_alt_info(char *interface, char *devstr)
  53. {
  54. env_set("dfu_alt_info", update_info.dfu_string);
  55. }
  56. /**
  57. * efi_firmware_get_image_type_id - get image_type_id
  58. * @image_index: image index
  59. *
  60. * Return the image_type_id identified by the image index.
  61. *
  62. * Return: pointer to the image_type_id, NULL if image_index is invalid
  63. */
  64. static
  65. efi_guid_t *efi_firmware_get_image_type_id(u8 image_index)
  66. {
  67. int i;
  68. struct efi_fw_image *fw_array;
  69. fw_array = update_info.images;
  70. for (i = 0; i < update_info.num_images; i++) {
  71. if (fw_array[i].image_index == image_index)
  72. return &fw_array[i].image_type_id;
  73. }
  74. return NULL;
  75. }
  76. /* Place holder; not supported */
  77. static
  78. efi_status_t EFIAPI efi_firmware_get_image_unsupported(
  79. struct efi_firmware_management_protocol *this,
  80. u8 image_index,
  81. void *image,
  82. efi_uintn_t *image_size)
  83. {
  84. EFI_ENTRY("%p %d %p %p\n", this, image_index, image, image_size);
  85. return EFI_EXIT(EFI_UNSUPPORTED);
  86. }
  87. /* Place holder; not supported */
  88. static
  89. efi_status_t EFIAPI efi_firmware_check_image_unsupported(
  90. struct efi_firmware_management_protocol *this,
  91. u8 image_index,
  92. const void *image,
  93. efi_uintn_t *image_size,
  94. u32 *image_updatable)
  95. {
  96. EFI_ENTRY("%p %d %p %p %p\n", this, image_index, image, image_size,
  97. image_updatable);
  98. return EFI_EXIT(EFI_UNSUPPORTED);
  99. }
  100. /* Place holder; not supported */
  101. static
  102. efi_status_t EFIAPI efi_firmware_get_package_info_unsupported(
  103. struct efi_firmware_management_protocol *this,
  104. u32 *package_version,
  105. u16 **package_version_name,
  106. u32 *package_version_name_maxlen,
  107. u64 *attributes_supported,
  108. u64 *attributes_setting)
  109. {
  110. EFI_ENTRY("%p %p %p %p %p %p\n", this, package_version,
  111. package_version_name, package_version_name_maxlen,
  112. attributes_supported, attributes_setting);
  113. return EFI_EXIT(EFI_UNSUPPORTED);
  114. }
  115. /* Place holder; not supported */
  116. static
  117. efi_status_t EFIAPI efi_firmware_set_package_info_unsupported(
  118. struct efi_firmware_management_protocol *this,
  119. const void *image,
  120. efi_uintn_t *image_size,
  121. const void *vendor_code,
  122. u32 package_version,
  123. const u16 *package_version_name)
  124. {
  125. EFI_ENTRY("%p %p %p %p %x %p\n", this, image, image_size, vendor_code,
  126. package_version, package_version_name);
  127. return EFI_EXIT(EFI_UNSUPPORTED);
  128. }
  129. /**
  130. * efi_firmware_get_lsv_from_dtb - get lowest supported version from dtb
  131. * @image_index: Image index
  132. * @image_type_id: Image type id
  133. * @lsv: Pointer to store the lowest supported version
  134. *
  135. * Read the firmware version information from dtb.
  136. */
  137. static void efi_firmware_get_lsv_from_dtb(u8 image_index,
  138. efi_guid_t *image_type_id, u32 *lsv)
  139. {
  140. const void *fdt = gd->fdt_blob;
  141. const fdt32_t *val;
  142. const char *guid_str;
  143. int len, offset, index;
  144. int parent, ret;
  145. *lsv = 0;
  146. parent = fdt_subnode_offset(fdt, 0, "firmware-version");
  147. if (parent < 0)
  148. return;
  149. fdt_for_each_subnode(offset, fdt, parent) {
  150. efi_guid_t guid;
  151. guid_str = fdt_getprop(fdt, offset, "image-type-id", &len);
  152. if (!guid_str)
  153. continue;
  154. ret = uuid_str_to_bin(guid_str, guid.b, UUID_STR_FORMAT_GUID);
  155. if (ret < 0) {
  156. log_warning("Wrong image-type-id format.\n");
  157. continue;
  158. }
  159. val = fdt_getprop(fdt, offset, "image-index", &len);
  160. if (!val)
  161. continue;
  162. index = fdt32_to_cpu(*val);
  163. if (!guidcmp(&guid, image_type_id) && index == image_index) {
  164. val = fdt_getprop(fdt, offset,
  165. "lowest-supported-version", &len);
  166. if (val)
  167. *lsv = fdt32_to_cpu(*val);
  168. }
  169. }
  170. }
  171. /**
  172. * efi_firmware_fill_version_info - fill the version information
  173. * @image_info: Image information
  174. * @fw_array: Pointer to size of new image
  175. *
  176. * Fill the version information into image_info strucrure.
  177. *
  178. */
  179. static
  180. void efi_firmware_fill_version_info(struct efi_firmware_image_descriptor *image_info,
  181. struct efi_fw_image *fw_array)
  182. {
  183. u16 varname[13]; /* u"FmpStateXXXX" */
  184. efi_status_t ret;
  185. efi_uintn_t size;
  186. struct fmp_state var_state = { 0 };
  187. efi_create_indexed_name(varname, sizeof(varname), "FmpState",
  188. fw_array->image_index);
  189. size = sizeof(var_state);
  190. ret = efi_get_variable_int(varname, &fw_array->image_type_id,
  191. NULL, &size, &var_state, NULL);
  192. if (ret == EFI_SUCCESS)
  193. image_info->version = var_state.fw_version;
  194. else
  195. image_info->version = 0;
  196. efi_firmware_get_lsv_from_dtb(fw_array->image_index,
  197. &fw_array->image_type_id,
  198. &image_info->lowest_supported_image_version);
  199. image_info->version_name = NULL; /* not supported */
  200. image_info->last_attempt_version = 0;
  201. image_info->last_attempt_status = LAST_ATTEMPT_STATUS_SUCCESS;
  202. }
  203. /**
  204. * efi_fill_image_desc_array - populate image descriptor array
  205. * @image_info_size: Size of @image_info
  206. * @image_info: Image information
  207. * @descriptor_version: Pointer to version number
  208. * @descriptor_count: Image count
  209. * @descriptor_size: Pointer to descriptor size
  210. * @package_version: Package version
  211. * @package_version_name: Package version's name
  212. *
  213. * Return information about the current firmware image in @image_info.
  214. * @image_info will consist of a number of descriptors.
  215. * Each descriptor will be created based on efi_fw_image array.
  216. *
  217. * Return status code
  218. */
  219. static efi_status_t efi_fill_image_desc_array(
  220. efi_uintn_t *image_info_size,
  221. struct efi_firmware_image_descriptor *image_info,
  222. u32 *descriptor_version,
  223. u8 *descriptor_count,
  224. efi_uintn_t *descriptor_size,
  225. u32 *package_version,
  226. u16 **package_version_name)
  227. {
  228. size_t total_size;
  229. struct efi_fw_image *fw_array;
  230. int i;
  231. total_size = sizeof(*image_info) * update_info.num_images;
  232. if (*image_info_size < total_size) {
  233. *image_info_size = total_size;
  234. return EFI_BUFFER_TOO_SMALL;
  235. }
  236. *image_info_size = total_size;
  237. fw_array = update_info.images;
  238. *descriptor_count = update_info.num_images;
  239. *descriptor_version = EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION;
  240. *descriptor_size = sizeof(*image_info);
  241. *package_version = 0xffffffff; /* not supported */
  242. *package_version_name = NULL; /* not supported */
  243. for (i = 0; i < update_info.num_images; i++) {
  244. image_info[i].image_index = fw_array[i].image_index;
  245. image_info[i].image_type_id = fw_array[i].image_type_id;
  246. image_info[i].image_id = fw_array[i].image_index;
  247. image_info[i].image_id_name = fw_array[i].fw_name;
  248. efi_firmware_fill_version_info(&image_info[i], &fw_array[i]);
  249. image_info[i].size = 0;
  250. image_info[i].attributes_supported =
  251. IMAGE_ATTRIBUTE_IMAGE_UPDATABLE |
  252. IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED;
  253. image_info[i].attributes_setting =
  254. IMAGE_ATTRIBUTE_IMAGE_UPDATABLE;
  255. /* Check if the capsule authentication is enabled */
  256. if (IS_ENABLED(CONFIG_EFI_CAPSULE_AUTHENTICATE))
  257. image_info[0].attributes_setting |=
  258. IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED;
  259. image_info[i].hardware_instance = 1;
  260. image_info[i].dependencies = NULL;
  261. }
  262. return EFI_SUCCESS;
  263. }
  264. /**
  265. * efi_firmware_capsule_authenticate - authenticate the capsule if enabled
  266. * @p_image: Pointer to new image
  267. * @p_image_size: Pointer to size of new image
  268. *
  269. * Authenticate the capsule if authentication is enabled.
  270. * The image pointer and the image size are updated in case of success.
  271. *
  272. * Return: status code
  273. */
  274. static
  275. efi_status_t efi_firmware_capsule_authenticate(const void **p_image,
  276. efi_uintn_t *p_image_size)
  277. {
  278. const void *image = *p_image;
  279. efi_uintn_t image_size = *p_image_size;
  280. void *capsule_payload;
  281. efi_status_t status;
  282. efi_uintn_t capsule_payload_size;
  283. if (IS_ENABLED(CONFIG_EFI_CAPSULE_AUTHENTICATE)) {
  284. capsule_payload = NULL;
  285. capsule_payload_size = 0;
  286. status = efi_capsule_authenticate(image, image_size,
  287. &capsule_payload,
  288. &capsule_payload_size);
  289. if (status == EFI_SECURITY_VIOLATION) {
  290. printf("Capsule authentication check failed. Aborting update\n");
  291. return status;
  292. } else if (status != EFI_SUCCESS) {
  293. return status;
  294. }
  295. debug("Capsule authentication successful\n");
  296. image = capsule_payload;
  297. image_size = capsule_payload_size;
  298. } else {
  299. debug("Capsule authentication disabled. ");
  300. debug("Updating capsule without authenticating.\n");
  301. }
  302. *p_image = image;
  303. *p_image_size = image_size;
  304. return EFI_SUCCESS;
  305. }
  306. /**
  307. * efi_firmware_set_fmp_state_var - set FmpStateXXXX variable
  308. * @state: Pointer to fmp state
  309. * @image_index: image index
  310. *
  311. * Update the FmpStateXXXX variable with the firmware update state.
  312. *
  313. * Return: status code
  314. */
  315. static
  316. efi_status_t efi_firmware_set_fmp_state_var(struct fmp_state *state, u8 image_index)
  317. {
  318. u16 varname[13]; /* u"FmpStateXXXX" */
  319. efi_status_t ret;
  320. efi_guid_t *image_type_id;
  321. struct fmp_state var_state = { 0 };
  322. image_type_id = efi_firmware_get_image_type_id(image_index);
  323. if (!image_type_id)
  324. return EFI_INVALID_PARAMETER;
  325. efi_create_indexed_name(varname, sizeof(varname), "FmpState",
  326. image_index);
  327. /*
  328. * Only the fw_version is set here.
  329. * lowest_supported_version in FmpState variable is ignored since
  330. * it can be tampered if the file based EFI variable storage is used.
  331. */
  332. var_state.fw_version = state->fw_version;
  333. ret = efi_set_variable_int(varname, image_type_id,
  334. EFI_VARIABLE_READ_ONLY |
  335. EFI_VARIABLE_NON_VOLATILE |
  336. EFI_VARIABLE_BOOTSERVICE_ACCESS |
  337. EFI_VARIABLE_RUNTIME_ACCESS,
  338. sizeof(var_state), &var_state, false);
  339. return ret;
  340. }
  341. /**
  342. * efi_firmware_get_fw_version - get fw_version from FMP payload header
  343. * @p_image: Pointer to new image
  344. * @p_image_size: Pointer to size of new image
  345. * @state: Pointer to fmp state
  346. *
  347. * Parse the FMP payload header and fill the fmp_state structure.
  348. * If no FMP payload header is found, fmp_state structure is not updated.
  349. *
  350. */
  351. static void efi_firmware_get_fw_version(const void **p_image,
  352. efi_uintn_t *p_image_size,
  353. struct fmp_state *state)
  354. {
  355. const struct fmp_payload_header *header;
  356. u32 fmp_hdr_signature = FMP_PAYLOAD_HDR_SIGNATURE;
  357. header = *p_image;
  358. if (header->signature == fmp_hdr_signature) {
  359. /* FMP header is inserted above the capsule payload */
  360. state->fw_version = header->fw_version;
  361. *p_image += header->header_size;
  362. *p_image_size -= header->header_size;
  363. }
  364. }
  365. /**
  366. * efi_firmware_verify_image - verify image
  367. * @p_image: Pointer to new image
  368. * @p_image_size: Pointer to size of new image
  369. * @image_index: Image index
  370. * @state: Pointer to fmp state
  371. *
  372. * Verify the capsule authentication and check if the fw_version
  373. * is equal or greater than the lowest supported version.
  374. *
  375. * Return: status code
  376. */
  377. static
  378. efi_status_t efi_firmware_verify_image(const void **p_image,
  379. efi_uintn_t *p_image_size,
  380. u8 image_index,
  381. struct fmp_state *state)
  382. {
  383. u32 lsv;
  384. efi_status_t ret;
  385. efi_guid_t *image_type_id;
  386. ret = efi_firmware_capsule_authenticate(p_image, p_image_size);
  387. if (ret != EFI_SUCCESS)
  388. return ret;
  389. efi_firmware_get_fw_version(p_image, p_image_size, state);
  390. image_type_id = efi_firmware_get_image_type_id(image_index);
  391. if (!image_type_id)
  392. return EFI_INVALID_PARAMETER;
  393. efi_firmware_get_lsv_from_dtb(image_index, image_type_id, &lsv);
  394. if (state->fw_version < lsv) {
  395. log_err("Firmware version %u too low. Expecting >= %u. Aborting update\n",
  396. state->fw_version, lsv);
  397. return EFI_INVALID_PARAMETER;
  398. }
  399. return ret;
  400. }
  401. /**
  402. * efi_firmware_get_image_info - return information about the current
  403. * firmware image
  404. * @this: Protocol instance
  405. * @image_info_size: Size of @image_info
  406. * @image_info: Image information
  407. * @descriptor_version: Pointer to version number
  408. * @descriptor_count: Pointer to number of descriptors
  409. * @descriptor_size: Pointer to descriptor size
  410. * @package_version: Package version
  411. * @package_version_name: Package version's name
  412. *
  413. * Return information bout the current firmware image in @image_info.
  414. * @image_info will consist of a number of descriptors.
  415. * Each descriptor will be created based on "dfu_alt_info" variable.
  416. *
  417. * Return status code
  418. */
  419. static
  420. efi_status_t EFIAPI efi_firmware_get_image_info(
  421. struct efi_firmware_management_protocol *this,
  422. efi_uintn_t *image_info_size,
  423. struct efi_firmware_image_descriptor *image_info,
  424. u32 *descriptor_version,
  425. u8 *descriptor_count,
  426. efi_uintn_t *descriptor_size,
  427. u32 *package_version,
  428. u16 **package_version_name)
  429. {
  430. efi_status_t ret;
  431. EFI_ENTRY("%p %p %p %p %p %p %p %p\n", this,
  432. image_info_size, image_info,
  433. descriptor_version, descriptor_count, descriptor_size,
  434. package_version, package_version_name);
  435. if (!image_info_size)
  436. return EFI_EXIT(EFI_INVALID_PARAMETER);
  437. if (*image_info_size &&
  438. (!image_info || !descriptor_version || !descriptor_count ||
  439. !descriptor_size || !package_version || !package_version_name))
  440. return EFI_EXIT(EFI_INVALID_PARAMETER);
  441. ret = efi_fill_image_desc_array(image_info_size, image_info,
  442. descriptor_version, descriptor_count,
  443. descriptor_size, package_version,
  444. package_version_name);
  445. return EFI_EXIT(ret);
  446. }
  447. #ifdef CONFIG_EFI_CAPSULE_FIRMWARE_FIT
  448. /*
  449. * This FIRMWARE_MANAGEMENT_PROTOCOL driver provides a firmware update
  450. * method with existing FIT image format, and handles
  451. * - multiple regions of firmware via DFU
  452. * but doesn't support
  453. * - versioning of firmware image
  454. * - package information
  455. */
  456. /**
  457. * efi_firmware_fit_set_image - update the firmware image
  458. * @this: Protocol instance
  459. * @image_index: Image index number
  460. * @image: New image
  461. * @image_size: Size of new image
  462. * @vendor_code: Vendor-specific update policy
  463. * @progress: Function to report the progress of update
  464. * @abort_reason: Pointer to string of abort reason
  465. *
  466. * Update the firmware to new image, using dfu. The new image should
  467. * have FIT image format commonly used in U-Boot.
  468. * @vendor_code, @progress and @abort_reason are not supported.
  469. *
  470. * Return: status code
  471. */
  472. static
  473. efi_status_t EFIAPI efi_firmware_fit_set_image(
  474. struct efi_firmware_management_protocol *this,
  475. u8 image_index,
  476. const void *image,
  477. efi_uintn_t image_size,
  478. const void *vendor_code,
  479. efi_status_t (*progress)(efi_uintn_t completion),
  480. u16 **abort_reason)
  481. {
  482. efi_status_t status;
  483. struct fmp_state state = { 0 };
  484. EFI_ENTRY("%p %d %p %zu %p %p %p\n", this, image_index, image,
  485. image_size, vendor_code, progress, abort_reason);
  486. if (!image || image_index != 1)
  487. return EFI_EXIT(EFI_INVALID_PARAMETER);
  488. status = efi_firmware_verify_image(&image, &image_size, image_index,
  489. &state);
  490. if (status != EFI_SUCCESS)
  491. return EFI_EXIT(status);
  492. if (fit_update(image))
  493. return EFI_EXIT(EFI_DEVICE_ERROR);
  494. efi_firmware_set_fmp_state_var(&state, image_index);
  495. return EFI_EXIT(EFI_SUCCESS);
  496. }
  497. const struct efi_firmware_management_protocol efi_fmp_fit = {
  498. .get_image_info = efi_firmware_get_image_info,
  499. .get_image = efi_firmware_get_image_unsupported,
  500. .set_image = efi_firmware_fit_set_image,
  501. .check_image = efi_firmware_check_image_unsupported,
  502. .get_package_info = efi_firmware_get_package_info_unsupported,
  503. .set_package_info = efi_firmware_set_package_info_unsupported,
  504. };
  505. #endif /* CONFIG_EFI_CAPSULE_FIRMWARE_FIT */
  506. #ifdef CONFIG_EFI_CAPSULE_FIRMWARE_RAW
  507. /*
  508. * This FIRMWARE_MANAGEMENT_PROTOCOL driver provides a firmware update
  509. * method with raw data.
  510. */
  511. /**
  512. * efi_firmware_raw_set_image - update the firmware image
  513. * @this: Protocol instance
  514. * @image_index: Image index number
  515. * @image: New image
  516. * @image_size: Size of new image
  517. * @vendor_code: Vendor-specific update policy
  518. * @progress: Function to report the progress of update
  519. * @abort_reason: Pointer to string of abort reason
  520. *
  521. * Update the firmware to new image, using dfu. The new image should
  522. * be a single raw image.
  523. * @vendor_code, @progress and @abort_reason are not supported.
  524. *
  525. * Return: status code
  526. */
  527. static
  528. efi_status_t EFIAPI efi_firmware_raw_set_image(
  529. struct efi_firmware_management_protocol *this,
  530. u8 image_index,
  531. const void *image,
  532. efi_uintn_t image_size,
  533. const void *vendor_code,
  534. efi_status_t (*progress)(efi_uintn_t completion),
  535. u16 **abort_reason)
  536. {
  537. int ret;
  538. efi_status_t status;
  539. struct fmp_state state = { 0 };
  540. EFI_ENTRY("%p %d %p %zu %p %p %p\n", this, image_index, image,
  541. image_size, vendor_code, progress, abort_reason);
  542. if (!image)
  543. return EFI_EXIT(EFI_INVALID_PARAMETER);
  544. status = efi_firmware_verify_image(&image, &image_size, image_index,
  545. &state);
  546. if (status != EFI_SUCCESS)
  547. return EFI_EXIT(status);
  548. if (IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
  549. /*
  550. * Based on the value of update bank, derive the
  551. * image index value.
  552. */
  553. ret = fwu_get_image_index(&image_index);
  554. if (ret) {
  555. log_debug("Unable to get FWU image_index\n");
  556. return EFI_EXIT(EFI_DEVICE_ERROR);
  557. }
  558. }
  559. if (dfu_write_by_alt(image_index - 1, (void *)image, image_size,
  560. NULL, NULL))
  561. return EFI_EXIT(EFI_DEVICE_ERROR);
  562. efi_firmware_set_fmp_state_var(&state, image_index);
  563. return EFI_EXIT(EFI_SUCCESS);
  564. }
  565. const struct efi_firmware_management_protocol efi_fmp_raw = {
  566. .get_image_info = efi_firmware_get_image_info,
  567. .get_image = efi_firmware_get_image_unsupported,
  568. .set_image = efi_firmware_raw_set_image,
  569. .check_image = efi_firmware_check_image_unsupported,
  570. .get_package_info = efi_firmware_get_package_info_unsupported,
  571. .set_package_info = efi_firmware_set_package_info_unsupported,
  572. };
  573. #endif /* CONFIG_EFI_CAPSULE_FIRMWARE_RAW */