From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH v2 12/14] secboot: remove unneeded ls_ucode_img member
Date: Thu, 27 Oct 2016 13:37:06 +0900 [thread overview]
Message-ID: <20161027043708.22538-13-acourbot@nvidia.com> (raw)
In-Reply-To: <20161027043708.22538-1-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
ucode_header is not used anywhere, so just get rid of it.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 25 +++++++------------------
drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 2 --
drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 2 --
3 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
index d9f02c1c0de6..15e1d829f265 100644
--- a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
+++ b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
@@ -212,12 +212,6 @@ ls_ucode_img_fill_headers(struct nvkm_acr_r352 *acr, struct ls_ucode_img *img,
const struct nvkm_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.func->boot_falcon;
@@ -307,7 +301,6 @@ ls_ucode_mgr_cleanup(struct ls_ucode_mgr *mgr)
list_for_each_entry_safe(img, t, &mgr->img_list, node) {
kfree(img->ucode_data);
- kfree(img->ucode_header);
kfree(img);
}
}
@@ -360,6 +353,10 @@ ls_ucode_mgr_write_wpr(struct nvkm_acr_r352 *acr, struct ls_ucode_mgr *mgr,
nvkm_kmap(wpr_blob);
list_for_each_entry(img, &mgr->img_list, node) {
+ const struct nvkm_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));
@@ -367,18 +364,10 @@ ls_ucode_mgr_write_wpr(struct nvkm_acr_r352 *acr, struct ls_ucode_mgr *mgr,
&img->lsb_header, sizeof(img->lsb_header));
/* Generate and write BL descriptor */
- if (!img->ucode_header) {
- const struct nvkm_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,
diff --git a/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h b/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h
index 0518371a287c..3d8c42e11847 100644
--- a/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h
+++ b/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h
@@ -173,7 +173,6 @@ struct ls_ucode_img_desc {
* @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
@@ -188,7 +187,6 @@ struct ls_ucode_img {
enum nvkm_falconidx falcon_id;
struct ls_ucode_img_desc ucode_desc;
- u32 *ucode_header;
u8 *ucode_data;
u32 ucode_size;
diff --git a/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c b/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c
index 09f5f1f1a50d..1c32cb0f16f9 100644
--- a/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c
+++ b/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c
@@ -98,8 +98,6 @@ ls_ucode_img_load_gr(const struct nvkm_subdev *subdev, struct ls_ucode_img *img,
char f[64];
int ret;
- img->ucode_header = NULL;
-
snprintf(f, sizeof(f), "gr/%s_bl", falcon_name);
ret = nvkm_firmware_get(subdev->device, f, &bl);
if (ret)
--
2.10.0
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2016-10-27 4:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 4:36 [PATCH v2 00/14] Secure Boot refactoring Alexandre Courbot
[not found] ` <20161027043708.22538-1-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-10-27 4:36 ` [PATCH v2 01/14] core: constify nv*_printk macros Alexandre Courbot
2016-10-27 4:36 ` [PATCH v2 02/14] core: add falcon library Alexandre Courbot
2016-10-27 4:36 ` [PATCH v2 03/14] secboot: use falcon library's IMEM/DMEM loading functions Alexandre Courbot
2016-10-27 4:36 ` [PATCH v2 04/14] secboot: rename init() hook to oneinit() Alexandre Courbot
2016-10-27 4:36 ` [PATCH v2 05/14] secboot: remove fixup_hs_desc hook Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 06/14] secboot: add low-secure firmware hooks Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 07/14] secboot: generate HS BL descriptor in hook Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 08/14] secboot: reorganize into more files Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 09/14] secboot: add LS flags to LS func structure Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 10/14] secboot: split reset function Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 11/14] secboot: disable falcon interrupts before running Alexandre Courbot
2016-10-27 4:37 ` Alexandre Courbot [this message]
2016-10-27 4:37 ` [PATCH v2 13/14] secboot: remove ls_ucode_mgr Alexandre Courbot
2016-10-27 4:37 ` [PATCH v2 14/14] secboot: abstract LS firmware loading functions Alexandre Courbot
2016-10-27 8:27 ` [PATCH v2 00/14] Secure Boot refactoring Alexandre Courbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161027043708.22538-13-acourbot@nvidia.com \
--to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox