[Nouveau] [PATCH 3/8] core: add falcon library functions
Alexandre Courbot
acourbot at nvidia.com
Tue Dec 6 06:09:10 UTC 2016
Oops, realized I made a last minute mistake - the following should be
squashed into this patch for proper behavior when secure boot is used.
Sorry for the inconvenience.
diff --git a/drm/nouveau/nvkm/falcon/base.c b/drm/nouveau/nvkm/falcon/base.c
index efef9fc63407..75663bd1f650 100644
--- a/drm/nouveau/nvkm/falcon/base.c
+++ b/drm/nouveau/nvkm/falcon/base.c
@@ -103,10 +103,7 @@ nvkm_falcon_get(const struct nvkm_subdev *subdev,
enum nvkm_falconidx id)
reg = nvkm_rd32(device, falcon->addr + 0xc08);
falcon->debug = (reg >> 20) & 0x1;
- if (falcon->secret == 0)
- falcon->func = &nvkm_falcon_v1_func;
- else
- falcon->func = &nvkm_falcon_v1_secure_func;
+ falcon->func = &nvkm_falcon_v1_func;
list_add(&falcon->head, &device->falcons);
} else if (falcon->subdev) {
diff --git a/drm/nouveau/nvkm/falcon/falcon_v1.c
b/drm/nouveau/nvkm/falcon/falcon_v1.c
index 25a791f0fb9a..ae6a6098e098 100644
--- a/drm/nouveau/nvkm/falcon/falcon_v1.c
+++ b/drm/nouveau/nvkm/falcon/falcon_v1.c
@@ -115,12 +115,6 @@ nvkm_falcon_v1_set_start_addr(struct nvkm_falcon
*falcon, u32 start_addr)
static void
nvkm_falcon_v1_start(struct nvkm_falcon *falcon)
{
- nvkm_falcon_wr32(falcon, 0x100, 0x2);
-}
-
-static void
-nvkm_falcon_v1_secure_start(struct nvkm_falcon *falcon)
-{
u32 reg = nvkm_falcon_rd32(falcon, 0x100);
if (reg & BIT(6))
@@ -197,16 +191,3 @@ nvkm_falcon_v1_func = {
.disable = nvkm_falcon_v1_disable,
.set_start_addr = nvkm_falcon_v1_set_start_addr,
};
-
-const struct nvkm_falcon_func
-nvkm_falcon_v1_secure_func = {
- .load_imem = nvkm_falcon_v1_load_imem,
- .load_dmem = nvkm_falcon_v1_load_dmem,
- .read_dmem = nvkm_falcon_v1_read_dmem,
- .bind_context = nvkm_falcon_v1_bind_context,
- .start = nvkm_falcon_v1_secure_start,
- .wait_for_halt = nvkm_falcon_v1_wait_for_halt,
- .enable = nvkm_falcon_v1_enable,
- .disable = nvkm_falcon_v1_disable,
- .set_start_addr = nvkm_falcon_v1_set_start_addr,
-};
diff --git a/drm/nouveau/nvkm/falcon/priv.h b/drm/nouveau/nvkm/falcon/priv.h
index f30729f14ad3..347dc61a8a41 100644
--- a/drm/nouveau/nvkm/falcon/priv.h
+++ b/drm/nouveau/nvkm/falcon/priv.h
@@ -26,6 +26,5 @@
#include <engine/falcon.h>
extern const struct nvkm_falcon_func nvkm_falcon_v1_func;
-extern const struct nvkm_falcon_func nvkm_falcon_v1_secure_func;
#endif
More information about the Nouveau
mailing list