All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Secure Boot refactoring
@ 2016-10-11  6:45 Alexandre Courbot
       [not found] ` <20161011064553.10616-1-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Alexandre Courbot @ 2016-10-11  6:45 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hi everyone,

Apologies for the big patchset. This is a rework of the secure boot code that
moves the building of the blob into its own set of source files (and own hooks),
making the code more flexible and (hopefully) easier to understand as well.

This rework is needed to support more signed firmware for existing and new
chips. Since the firmwares in question are not available yet I cannot send the
code for them yet, but hopefully the gain in clarity will be enough to merge
this series ahead of the rest.

Patch 1 is just to make nv*_printk() more tolerent of my use of const pointers.
Patch 2 lays the foundation of a small common falcon library that could avoid
duplicated code in various parts of the driver. Right now only secure boot makes
use of it (patch 3), but there are many potential users (GR, PMU, etc). I will
test users and send further patches making use of it.

Patch 4 renames a hook to something better describing its actual use.

Patch 5 is where the big refactoring occurs. It looks scary, but is really just
moving code (and introducing the nvkm_acr structures).

Patch 6, 7 and 8 remove a few HS hooks that turn out to be unneeded, and add
support for LS hooks.

The end result can be observed by looking at acr_v1_gm20b.c: all the specifics
of GM20B's firmware are handled in a single file, with no data structures shared
with acr_v1.c. The gm20b_acr_v1_ls_func variable also describes clearly what
LS firmwares are to be loaded and how.

Alexandre Courbot (8):
  core: constify nv*_printk macros
  core: add falcon library
  secboot: use falcon library's IMEM/DMEM loading functions
  secboot: rename init() hook to oneinit()
  secboot: move ACR building logic into own source files
  secboot: remove fixup_hs_desc hook
  secboot: add low-secure firmware hooks
  secboot: generate HS BL descriptor in hook

 drm/nouveau/include/nvkm/core/client.h         |    4 +-
 drm/nouveau/include/nvkm/core/device.h         |    2 +-
 drm/nouveau/include/nvkm/core/falcon.h         |   50 +
 drm/nouveau/include/nvkm/core/subdev.h         |    2 +-
 drm/nouveau/include/nvkm/subdev/secboot.h      |   33 +-
 drm/nouveau/nvkm/core/Kbuild                   |    1 +
 drm/nouveau/nvkm/core/falcon.c                 |   62 ++
 drm/nouveau/nvkm/engine/gr/gf100.c             |   16 +-
 drm/nouveau/nvkm/engine/gr/gm200.c             |    6 +-
 drm/nouveau/nvkm/subdev/secboot/Kbuild         |    2 +
 drm/nouveau/nvkm/subdev/secboot/acr.h          |   67 ++
 drm/nouveau/nvkm/subdev/secboot/acr_v1.c       | 1193 ++++++++++++++++++++
 drm/nouveau/nvkm/subdev/secboot/acr_v1.h       |  346 ++++++
 drm/nouveau/nvkm/subdev/secboot/acr_v1_gm20b.c |  135 +++
 drm/nouveau/nvkm/subdev/secboot/base.c         |  113 +-
 drm/nouveau/nvkm/subdev/secboot/gm200.c        | 1386 +-----------------------
 drm/nouveau/nvkm/subdev/secboot/gm200.h        |   43 +
 drm/nouveau/nvkm/subdev/secboot/gm20b.c        |  141 +--
 drm/nouveau/nvkm/subdev/secboot/priv.h         |  208 +---
 19 files changed, 2072 insertions(+), 1738 deletions(-)
 create mode 100644 drm/nouveau/include/nvkm/core/falcon.h
 create mode 100644 drm/nouveau/nvkm/core/falcon.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_v1.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_v1.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_v1_gm20b.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/gm200.h

-- 
2.10.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-10-11  7:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11  6:45 [PATCH 0/8] Secure Boot refactoring Alexandre Courbot
     [not found] ` <20161011064553.10616-1-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-10-11  6:45   ` [PATCH 1/8] core: constify nv*_printk macros Alexandre Courbot
2016-10-11  6:45   ` [PATCH 2/8] core: add falcon library Alexandre Courbot
2016-10-11  6:45   ` [PATCH 3/8] secboot: use falcon library's IMEM/DMEM loading functions Alexandre Courbot
2016-10-11  6:45   ` [PATCH 4/8] secboot: rename init() hook to oneinit() Alexandre Courbot
2016-10-11  6:45   ` [PATCH 5/8] secboot: move ACR building logic into own source files Alexandre Courbot
2016-10-11  6:45   ` [PATCH 6/8] secboot: remove fixup_hs_desc hook Alexandre Courbot
2016-10-11  6:45   ` [PATCH 7/8] secboot: add low-secure firmware hooks Alexandre Courbot
2016-10-11  6:45   ` [PATCH 8/8] secboot: generate HS BL descriptor in hook Alexandre Courbot
2016-10-11  6:57   ` [PATCH 0/8] Secure Boot refactoring Karol Herbst
     [not found]     ` <CAEXux-bmd-wKceqgZTP0P=Vj2uva1MqJ=xhPEPrh_BswAOtH5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-11  7:12       ` Alexandre Courbot
     [not found]         ` <0f006b0c-e46d-cac4-d3e2-124bd36e9b15-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-10-11  7:16           ` Karol Herbst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.