From 425c816a806230bcaf17ceb41faeb477f285f781 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Wed, 14 Dec 2016 17:02:50 +0900 Subject: [PATCH] drm/nouveau/secboot: add lazy-bootstrap flag 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 Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c index d4f04239b124..421cf78d2aa5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c @@ -241,6 +241,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/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h index f335dced1e61..ad5923b0fd3c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h +++ b/drivers/gpu/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*/ -- 2.20.1