aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2017-01-26 16:56:45 +0900
committerBen Skeggs <bskeggs@redhat.com>2017-03-07 17:05:13 +1000
commit48387f0ca5493258add078de7f5520756ddc510a (patch)
tree2480252dcbbe674d4fe7312017c27c7f7459acd5 /drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
parentdrm/nouveau/secboot: get start address of blob from ACR (diff)
downloadlinux-dev-48387f0ca5493258add078de7f5520756ddc510a.tar.xz
linux-dev-48387f0ca5493258add078de7f5520756ddc510a.zip
drm/nouveau/secboot: support running ACR on SEC
Add support for running the ACR binary on the SEC falcon. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c18
1 files changed, 15 insertions, 3 deletions
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 83395147e855..0b563bc9daf8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
@@ -28,6 +28,7 @@
#include <subdev/mc.h>
#include <subdev/pmu.h>
#include <core/msgqueue.h>
+#include <engine/sec2.h>
/**
* struct hsf_fw_header - HS firmware descriptor
@@ -1017,7 +1018,7 @@ acr_r352_reset(struct nvkm_acr *_acr, struct nvkm_secboot *sb,
enum nvkm_secboot_falcon falcon)
{
struct acr_r352 *acr = acr_r352(_acr);
- struct nvkm_pmu *pmu = sb->subdev.device->pmu;
+ struct nvkm_msgqueue *queue;
const char *fname = nvkm_secboot_falcon_name[falcon];
bool wpr_already_set = sb->wpr_set;
int ret;
@@ -1037,9 +1038,20 @@ acr_r352_reset(struct nvkm_acr *_acr, struct nvkm_secboot *sb,
return ret;
}
- /* Otherwise just ask the PMU to reset the falcon */
+ switch (_acr->boot_falcon) {
+ case NVKM_SECBOOT_FALCON_PMU:
+ queue = sb->subdev.device->pmu->queue;
+ break;
+ case NVKM_SECBOOT_FALCON_SEC2:
+ queue = sb->subdev.device->sec2->queue;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ /* Otherwise just ask the LS firmware to reset the falcon */
nvkm_debug(&sb->subdev, "resetting %s falcon\n", fname);
- ret = nvkm_msgqueue_acr_boot_falcon(pmu->queue, falcon);
+ ret = nvkm_msgqueue_acr_boot_falcon(queue, falcon);
if (ret) {
nvkm_error(&sb->subdev, "cannot boot %s falcon\n", fname);
return ret;