Commit 88490323 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

drm/nouveau/secboot: remove unneeded ls_ucode_img member

ucode_header is not used anywhere, so just get rid of it.
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 3454a034
...@@ -215,12 +215,6 @@ ls_ucode_img_fill_headers(struct acr_r352 *acr, struct ls_ucode_img *img, ...@@ -215,12 +215,6 @@ ls_ucode_img_fill_headers(struct acr_r352 *acr, struct ls_ucode_img *img,
const struct acr_r352_ls_func *func = const struct acr_r352_ls_func *func =
acr->func->ls_func[img->falcon_id]; 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 */ /* Fill WPR header */
whdr->falcon_id = img->falcon_id; whdr->falcon_id = img->falcon_id;
whdr->bootstrap_owner = acr->base.boot_falcon; whdr->bootstrap_owner = acr->base.boot_falcon;
...@@ -309,7 +303,6 @@ ls_ucode_mgr_cleanup(struct ls_ucode_mgr *mgr) ...@@ -309,7 +303,6 @@ ls_ucode_mgr_cleanup(struct ls_ucode_mgr *mgr)
list_for_each_entry_safe(img, t, &mgr->img_list, node) { list_for_each_entry_safe(img, t, &mgr->img_list, node) {
kfree(img->ucode_data); kfree(img->ucode_data);
kfree(img->ucode_header);
kfree(img); kfree(img);
} }
} }
...@@ -362,6 +355,10 @@ ls_ucode_mgr_write_wpr(struct acr_r352 *acr, struct ls_ucode_mgr *mgr, ...@@ -362,6 +355,10 @@ ls_ucode_mgr_write_wpr(struct acr_r352 *acr, struct ls_ucode_mgr *mgr,
nvkm_kmap(wpr_blob); nvkm_kmap(wpr_blob);
list_for_each_entry(img, &mgr->img_list, node) { 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, nvkm_gpuobj_memcpy_to(wpr_blob, pos, &img->wpr_header,
sizeof(img->wpr_header)); sizeof(img->wpr_header));
...@@ -369,18 +366,10 @@ ls_ucode_mgr_write_wpr(struct acr_r352 *acr, struct ls_ucode_mgr *mgr, ...@@ -369,18 +366,10 @@ ls_ucode_mgr_write_wpr(struct acr_r352 *acr, struct ls_ucode_mgr *mgr,
&img->lsb_header, sizeof(img->lsb_header)); &img->lsb_header, sizeof(img->lsb_header));
/* Generate and write BL descriptor */ /* Generate and write BL descriptor */
if (!img->ucode_header) { ls_func->generate_bl_desc(&acr->base, img, wpr_addr, gdesc);
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);
nvkm_gpuobj_memcpy_to(wpr_blob, nvkm_gpuobj_memcpy_to(wpr_blob, img->lsb_header.bl_data_off,
img->lsb_header.bl_data_off, gdesc, ls_func->bl_desc_size);
gdesc, ls_func->bl_desc_size);
}
/* Copy ucode */ /* Copy ucode */
nvkm_gpuobj_memcpy_to(wpr_blob, img->lsb_header.ucode_off, nvkm_gpuobj_memcpy_to(wpr_blob, img->lsb_header.ucode_off,
......
...@@ -173,7 +173,6 @@ struct ls_ucode_img_desc { ...@@ -173,7 +173,6 @@ struct ls_ucode_img_desc {
* @node: to link within lsf_ucode_mgr * @node: to link within lsf_ucode_mgr
* @falcon_id: ID of the falcon this LS firmware is for * @falcon_id: ID of the falcon this LS firmware is for
* @ucode_desc: loaded or generated map of ucode_data * @ucode_desc: loaded or generated map of ucode_data
* @ucode_header: header of the firmware
* @ucode_data: firmware payload (code and data) * @ucode_data: firmware payload (code and data)
* @ucode_size: size in bytes of data in ucode_data * @ucode_size: size in bytes of data in ucode_data
* @wpr_header: WPR header to be written to the LS blob * @wpr_header: WPR header to be written to the LS blob
...@@ -188,7 +187,6 @@ struct ls_ucode_img { ...@@ -188,7 +187,6 @@ struct ls_ucode_img {
enum nvkm_secboot_falcon falcon_id; enum nvkm_secboot_falcon falcon_id;
struct ls_ucode_img_desc ucode_desc; struct ls_ucode_img_desc ucode_desc;
u32 *ucode_header;
u8 *ucode_data; u8 *ucode_data;
u32 ucode_size; u32 ucode_size;
......
...@@ -98,8 +98,6 @@ ls_ucode_img_load_gr(const struct nvkm_subdev *subdev, struct ls_ucode_img *img, ...@@ -98,8 +98,6 @@ ls_ucode_img_load_gr(const struct nvkm_subdev *subdev, struct ls_ucode_img *img,
char f[64]; char f[64];
int ret; int ret;
img->ucode_header = NULL;
snprintf(f, sizeof(f), "gr/%s_bl", falcon_name); snprintf(f, sizeof(f), "gr/%s_bl", falcon_name);
ret = nvkm_firmware_get(subdev->device, f, &bl); ret = nvkm_firmware_get(subdev->device, f, &bl);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment