[Nouveau] [PATCH v4 19/33] secboot: add lazy-bootstrap flag

Alexandre Courbot acourbot at nvidia.com
Mon Nov 21 08:29:16 UTC 2016


When the PMU firmware is present, the falcons it manages need to have
the lazy-bootstrap flag of their WPR header set so the ACR does not boot
them. Add support for this.

Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
 drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++++
 drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
index fcde0634f209..ddecec4d2dbc 100644
--- a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
+++ b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
@@ -240,6 +240,10 @@ acr_r352_ls_img_fill_headers(struct acr_r352 *acr,
 	whdr->bootstrap_owner = acr->base.boot_falcon;
 	whdr->status = LSF_IMAGE_STATUS_COPY;
 
+	/* Skip bootstrapping falcons started by someone else than ACR */
+	if (acr->lazy_bootstrap & BIT(_img->falcon_id))
+		whdr->lazy_bootstrap = 1;
+
 	/* Align, save off, and include an LSB header size */
 	offset = ALIGN(offset, LSF_LSB_HEADER_ALIGN);
 	whdr->lsb_offset = offset;
diff --git a/drm/nouveau/nvkm/subdev/secboot/acr_r352.h b/drm/nouveau/nvkm/subdev/secboot/acr_r352.h
index 18dd3d95cc56..b92125abfc7b 100644
--- a/drm/nouveau/nvkm/subdev/secboot/acr_r352.h
+++ b/drm/nouveau/nvkm/subdev/secboot/acr_r352.h
@@ -223,6 +223,9 @@ struct acr_r352 {
 	/* Firmware already loaded? */
 	bool firmware_ok;
 
+	/* Falcons to lazy-bootstrap */
+	u32 lazy_bootstrap;
+
 	/* To keep track of the state of all managed falcons */
 	enum {
 		/* In non-secure state, no firmware loaded, no privileges*/
-- 
git-series 0.8.10


More information about the Nouveau mailing list