const struct acr_r352_ls_func *func =
acr->func->ls_func[img->falcon_id];
- if (img->ucode_header) {
- nvkm_fatal(acr->base.subdev,
- "images withough loader are not supported yet!\n");
- return offset;
- }
-
/* Fill WPR header */
whdr->falcon_id = img->falcon_id;
whdr->bootstrap_owner = acr->base.boot_falcon;
list_for_each_entry_safe(img, t, &mgr->img_list, node) {
kfree(img->ucode_data);
- kfree(img->ucode_header);
kfree(img);
}
}
nvkm_kmap(wpr_blob);
list_for_each_entry(img, &mgr->img_list, node) {
+ const struct acr_r352_ls_func *ls_func =
+ acr->func->ls_func[img->falcon_id];
+ u8 gdesc[ls_func->bl_desc_size];
+
nvkm_gpuobj_memcpy_to(wpr_blob, pos, &img->wpr_header,
sizeof(img->wpr_header));
&img->lsb_header, sizeof(img->lsb_header));
/* Generate and write BL descriptor */
- if (!img->ucode_header) {
- const struct acr_r352_ls_func *ls_func =
- acr->func->ls_func[img->falcon_id];
- u8 gdesc[ls_func->bl_desc_size];
-
- ls_func->generate_bl_desc(&acr->base, img, wpr_addr,
- gdesc);
+ ls_func->generate_bl_desc(&acr->base, img, wpr_addr, gdesc);
- nvkm_gpuobj_memcpy_to(wpr_blob,
- img->lsb_header.bl_data_off,
- gdesc, ls_func->bl_desc_size);
- }
+ nvkm_gpuobj_memcpy_to(wpr_blob, img->lsb_header.bl_data_off,
+ gdesc, ls_func->bl_desc_size);
/* Copy ucode */
nvkm_gpuobj_memcpy_to(wpr_blob, img->lsb_header.ucode_off,
* @node: to link within lsf_ucode_mgr
* @falcon_id: ID of the falcon this LS firmware is for
* @ucode_desc: loaded or generated map of ucode_data
- * @ucode_header: header of the firmware
* @ucode_data: firmware payload (code and data)
* @ucode_size: size in bytes of data in ucode_data
* @wpr_header: WPR header to be written to the LS blob
enum nvkm_secboot_falcon falcon_id;
struct ls_ucode_img_desc ucode_desc;
- u32 *ucode_header;
u8 *ucode_data;
u32 ucode_size;