X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fefi_loader.h;h=f6651e2c6040506226496dac242bcc162ee0d07d;hb=9b5f9aeb3b48dbc059272168635a397ea5096a31;hp=af36639ec6a779714f7e908a58a202043c445c50;hpb=5f68470d69f853b1652ebe93525b60064717fe2e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/efi_loader.h b/include/efi_loader.h index af36639..f6651e2 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -300,6 +300,8 @@ extern const efi_guid_t efi_guid_image_security_database; extern const efi_guid_t efi_guid_sha256; extern const efi_guid_t efi_guid_cert_x509; extern const efi_guid_t efi_guid_cert_x509_sha256; +extern const efi_guid_t efi_guid_cert_x509_sha384; +extern const efi_guid_t efi_guid_cert_x509_sha512; extern const efi_guid_t efi_guid_cert_type_pkcs7; /* GUID of RNG protocol */ @@ -493,6 +495,8 @@ struct efi_register_notify_event { /* List of all events registered by RegisterProtocolNotify() */ extern struct list_head efi_register_notify_events; +/* called at pre-initialization */ +int efi_init_early(void); /* Initialize efi execution environment */ efi_status_t efi_init_obj_list(void); /* Install device tree */ @@ -523,8 +527,8 @@ void efi_carve_out_dt_rsv(void *fdt); void efi_try_purge_kaslr_seed(void *fdt); /* Called by bootefi to make console interface available */ efi_status_t efi_console_register(void); -/* Called by bootefi to make all disk storage accessible as EFI objects */ -efi_status_t efi_disk_register(void); +/* Called by efi_init_obj_list() to initialize efi_disks */ +efi_status_t efi_disk_init(void); /* Called by efi_init_obj_list() to install EFI_RNG_PROTOCOL */ efi_status_t efi_rng_register(void); /* Called by efi_init_obj_list() to install EFI_TCG2_PROTOCOL */ @@ -593,6 +597,10 @@ efi_status_t efi_create_handle(efi_handle_t *handle); void efi_delete_handle(efi_handle_t obj); /* Call this to validate a handle and find the EFI object for it */ struct efi_object *efi_search_obj(const efi_handle_t handle); +/* Locate device_path handle */ +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol, + struct efi_device_path **device_path, + efi_handle_t *device); /* Load image */ efi_status_t EFIAPI efi_load_image(bool boot_policy, efi_handle_t parent_image, @@ -655,6 +663,9 @@ efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type, /* Call this to signal an event */ void efi_signal_event(struct efi_event *event); +/* return true if the device is removable */ +bool efi_disk_is_removable(efi_handle_t handle); + /* open file system: */ struct efi_simple_file_system_protocol *efi_simple_file_system( struct blk_desc *desc, int part, struct efi_device_path *dp); @@ -671,6 +682,10 @@ efi_status_t efi_file_size(struct efi_file_handle *fh, efi_uintn_t *size); /* get a device path from a Boot#### option */ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid); +/* get len, string (used in u-boot crypto from a guid */ +const char *guid_to_sha_str(const efi_guid_t *guid); +int algo_to_len(const char *algo); + /** * efi_size_in_pages() - convert size in bytes to size in pages * @@ -980,6 +995,42 @@ efi_status_t efi_capsule_authenticate(const void *capsule, #define EFI_CAPSULE_DIR u"\\EFI\\UpdateCapsule\\" /** + * struct efi_fw_image - Information on firmware images updatable through + * capsule update + * + * This structure gives information about the firmware images on the platform + * which can be updated through the capsule update mechanism + * + * @image_type_id: Image GUID. Same value is to be used in the capsule + * @fw_name: Name of the firmware image + * @image_index: Image Index, same as value passed to SetImage FMP + * function + */ +struct efi_fw_image { + efi_guid_t image_type_id; + u16 *fw_name; + u8 image_index; +}; + +/** + * struct efi_capsule_update_info - Information needed for capsule updates + * + * This structure provides information needed for performing firmware + * updates. The structure needs to be initialised per platform, for all + * platforms which enable capsule updates + * + * @dfu_string: String used to populate dfu_alt_info + * @images: Pointer to an array of updatable images + */ +struct efi_capsule_update_info { + const char *dfu_string; + struct efi_fw_image *images; +}; + +extern struct efi_capsule_update_info update_info; +extern u8 num_image_type_guids; + +/** * Install the ESRT system table. * * Return: status code