Skip to contentSkip to conversation

gr: did you try turning it off and on again.

RFC PATCH In review Karol Herbst 3 participants 4 messages Nov 28, 2017 – Nov 29, 2017 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 gr: did you try turning it off and on again.

Fixes secure boot on my gp107. No idea why. Otherwise the GPU enters complete lockdown after starting the gpccs and fecs with the LS images loaded.

---
 drm/nouveau/nvkm/engine/gr/gf100.c | 7 +++++++
 1 file changed, 7 insertions(+)
drm/nouveau/nvkm/engine/gr/gf100.c +7 -0
index 2f8dc107..322d9fa6 100644
@@ -1731,8 +1731,15 @@ gf100_gr_init_(struct nvkm_gr *base)
 {
 	struct gf100_gr *gr = gf100_gr(base);
 	struct nvkm_subdev *subdev = &base->engine.subdev;
+	struct nvkm_device *device = subdev->device;
 	u32 ret;
 
+	/* did you try turning it off and on again? Apparently we need this
+	 * on pascal, otherwise secboot will just fail.
+	 */
+	nvkm_mask(device, 0x200, 0x1000, 0x0000);
+	nvkm_mask(device, 0x200, 0x1000, 0x1000);
+
 	nvkm_pmu_pgob(gr->base.engine.subdev.device->pmu, false);
 
 	ret = nvkm_falcon_get(gr->fecs, subdev);
Signature · 6 lines
2.14.3

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
#2 lore raw
In reply to a message not in the archive

Hi,

comments inline

Quoted 14 lines · Karol Herbst

Fixes secure boot on my gp107. No idea why. Otherwise the GPU enters complete lockdown after starting the gpccs and fecs with the LS images loaded.

---
  drm/nouveau/nvkm/engine/gr/gf100.c | 7 +++++++
  1 file changed, 7 insertions(+)
drm/nouveau/nvkm/engine/gr/gf100.c +0 -0
index 2f8dc107..322d9fa6 100644

drm/nouveau/nvkm/engine/gr/gf100.c gf100_gr_init_(struct nvkm_gr *base) · line 1738

Quoted 8 lines
drm/nouveau/nvkm/engine/gr/gf100.c +3 -0
@@ -1731,8 +1731,15 @@ gf100_gr_init_(struct nvkm_gr *base)
  {
  	struct gf100_gr *gr = gf100_gr(base);
  	struct nvkm_subdev *subdev = &base->engine.subdev;
+	struct nvkm_device *device = subdev->device;
  	u32 ret;
 
+	/* did you try turning it off and on again? Apparently we need this
+	 * on pascal, otherwise secboot will just fail.

The comments about the off and on looks silly, at least put it in quotation marks, or rewrite it, e.g. "Apparently we need to turn it off and on for the pascal generation, otherwise secboot will just fail."

drm/nouveau/nvkm/engine/gr/gf100.c gf100_gr_init_(struct nvkm_gr *base) · line 1742

Quoted 4 lines
drm/nouveau/nvkm/engine/gr/gf100.c +4 -0
+	 */
+	nvkm_mask(device, 0x200, 0x1000, 0x0000);
+	nvkm_mask(device, 0x200, 0x1000, 0x1000);
+

It is needed with pascal, but does it harm other generations calling this init? Maybe guard it against exectution on maxwell

Greetings,

Tobias

drm/nouveau/nvkm/engine/gr/gf100.c gf100_gr_init_(struct nvkm_gr *base) · line 1745

Quoted 3 lines
drm/nouveau/nvkm/engine/gr/gf100.c +0 -0
  	nvkm_pmu_pgob(gr->base.engine.subdev.device->pmu, false);
 
  	ret = nvkm_falcon_get(gr->fecs, subdev);

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw
In reply to a message not in the archive
Quoted 27 lines · Tobias Klausmann

Hi,

comments inline

Quoted 22 lines · Karol Herbst

Fixes secure boot on my gp107. No idea why. Otherwise the GPU enters complete lockdown after starting the gpccs and fecs with the LS images loaded.

---
  drm/nouveau/nvkm/engine/gr/gf100.c | 7 +++++++
  1 file changed, 7 insertions(+)
drm/nouveau/nvkm/engine/gr/gf100.c +1 -0
index 2f8dc107..322d9fa6 100644
@@ -1731,8 +1731,15 @@ gf100_gr_init_(struct nvkm_gr *base)
  {
        struct gf100_gr *gr = gf100_gr(base);
        struct nvkm_subdev *subdev = &base->engine.subdev;
+       struct nvkm_device *device = subdev->device;
        u32 ret;
  +     /* did you try turning it off and on again? Apparently we need
Quoted 9 lines
Quoted 2 lines

this
+ * on pascal, otherwise secboot will just fail.

The comments about the off and on looks silly, at least put it in quotation marks, or rewrite it, e.g. "Apparently we need to turn it off and on for the pascal generation, otherwise secboot will just fail."

right... I wasn't entirely serious about this one though. Just a little annoyed, that this was just a painful issue, because it just doesn't make any sense at all in the end. And because this is involving secure boot here, who knows how many bugs of this kind are still there?

Quoted 10 lines

drm/nouveau/nvkm/engine/gr/gf100.c gf100_gr_init_(struct nvkm_gr *base) · line 1742

Quoted 4 lines
drm/nouveau/nvkm/engine/gr/gf100.c +4 -0
+        */
+       nvkm_mask(device, 0x200, 0x1000, 0x0000);
+       nvkm_mask(device, 0x200, 0x1000, 0x1000);
+

It is needed with pascal, but does it harm other generations calling this init? Maybe guard it against exectution on maxwell

Maybe, maybe not? I think it is fairly safe, but I kind of hoped somebody with more knowledge about these kind of things would respond and tells us this has to be done or maybe not.

Quoted 9 lines

Greetings,

Tobias

Quoted 2 lines
        nvkm_pmu_pgob(gr->base.engine.subdev.device->pmu, false);
        ret = nvkm_falcon_get(gr->fecs, subdev);

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw
In reply to a message not in the archive
Quoted 52 lines · Karol Herbst
Quoted 27 lines · Tobias Klausmann

Hi,

comments inline

Quoted 22 lines · Karol Herbst

Fixes secure boot on my gp107. No idea why. Otherwise the GPU enters complete lockdown after starting the gpccs and fecs with the LS images loaded.

---
  drm/nouveau/nvkm/engine/gr/gf100.c | 7 +++++++
  1 file changed, 7 insertions(+)
drm/nouveau/nvkm/engine/gr/gf100.c +1 -0
index 2f8dc107..322d9fa6 100644
@@ -1731,8 +1731,15 @@ gf100_gr_init_(struct nvkm_gr *base)
  {
        struct gf100_gr *gr = gf100_gr(base);
        struct nvkm_subdev *subdev = &base->engine.subdev;
+       struct nvkm_device *device = subdev->device;
        u32 ret;
  +     /* did you try turning it off and on again? Apparently we need
Quoted 9 lines
Quoted 2 lines

this
+ * on pascal, otherwise secboot will just fail.

The comments about the off and on looks silly, at least put it in quotation marks, or rewrite it, e.g. "Apparently we need to turn it off and on for the pascal generation, otherwise secboot will just fail."

right... I wasn't entirely serious about this one though. Just a little annoyed, that this was just a painful issue, because it just doesn't make any sense at all in the end. And because this is involving secure boot here, who knows how many bugs of this kind are still there?

Quoted 7 lines
Quoted 4 lines
drm/nouveau/nvkm/engine/gr/gf100.c +4 -0
+        */
+       nvkm_mask(device, 0x200, 0x1000, 0x0000);
+       nvkm_mask(device, 0x200, 0x1000, 0x1000);
+
Quoted 7 lines
Quoted 3 lines

It is needed with pascal, but does it harm other generations calling this init? Maybe guard it against exectution on maxwell

Maybe, maybe not? I think it is fairly safe, but I kind of hoped somebody with more knowledge about these kind of things would respond and tells us this has to be done or maybe not.

This should already be happening actually, so it's definitely weird that adding it there explicitly does anything at all...

Can you mmiotrace nouveau for me?

Ben.

Quoted 8 lines
Quoted 8 lines

Greetings,

Tobias

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
        nvkm_pmu_pgob(gr->base.engine.subdev.device->pmu, false);
        ret = nvkm_falcon_get(gr->fecs, subdev);

_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau