Skip to content

Secure Boot refactoring

Alexandre Courbot nouveau 5 versions – New

Get series with b4
b4 am cover.6abc6e3ea2c2b633ff9fee39507ab1e2dea8ecc9.1481702469.git-series.acourbot@nvidia.com

Versions newest first · linked by author and title

  1. v5 Latest18 patches 0 repliesNew
  2. v433 patches 0 repliesSuperseded
  3. v315 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v214 patches1 replySuperseded
v18 patches3 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18secboot: rename init() hook to oneinit()drm/nouveau/nvkm/subdev/secboot/base.c drm/nouveau/nvkm/subdev/secboot/gm200.c drm/nouveau/nvkm/subdev/secboot/gm20b.c +1 more+9 -90 replies
2/18secboot: remove fixup_hs_desc hookdrm/nouveau/nvkm/subdev/secboot/gm200.c drm/nouveau/nvkm/subdev/secboot/gm20b.c drm/nouveau/nvkm/subdev/secboot/priv.h+79 -870 replies
3/18secboot: add low-secure firmware hooksdrm/nouveau/nvkm/subdev/secboot/gm200.c drm/nouveau/nvkm/subdev/secboot/gm20b.c drm/nouveau/nvkm/subdev/secboot/priv.h+265 -1970 replies
4/18secboot: generate HS BL descriptor in hookdrm/nouveau/nvkm/subdev/secboot/gm200.c drm/nouveau/nvkm/subdev/secboot/gm20b.c drm/nouveau/nvkm/subdev/secboot/priv.h+138 -1550 replies
5/18secboot: reorganize into more filesdrm/nouveau/include/nvkm/subdev/secboot.h drm/nouveau/nvkm/subdev/secboot/Kbuild drm/nouveau/nvkm/subdev/secboot/acr.c +11 more+1877 -15740 replies
6/18secboot: add LS flags to LS func structuredrm/nouveau/nvkm/subdev/secboot/acr_r352.c drm/nouveau/nvkm/subdev/secboot/acr_r352.h drm/nouveau/nvkm/subdev/secboot/acr_r361.c+8 -60 replies
7/18secboot: split reset functiondrm/nouveau/include/nvkm/subdev/secboot.h drm/nouveau/nvkm/subdev/secboot/acr_r352.c+58 -250 replies
8/18secboot: disable falcon interrupts when running blobdrm/nouveau/nvkm/subdev/secboot/gm200.c+7 -00 replies
9/18secboot: remove unneeded ls_ucode_img memberdrm/nouveau/nvkm/subdev/secboot/acr_r352.c drm/nouveau/nvkm/subdev/secboot/ls_ucode.h drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c+7 -220 replies
10/18secboot: remove ls_ucode_mgrdrm/nouveau/nvkm/subdev/secboot/acr_r352.c+33 -570 replies
11/18secboot: abstract LS firmware loading functionsdrm/nouveau/nvkm/subdev/secboot/acr_r352.c drm/nouveau/nvkm/subdev/secboot/acr_r352.h drm/nouveau/nvkm/subdev/secboot/acr_r361.c +4 more+215 -1670 replies
12/18secboot: safer zeroing of BL descriptorsdrm/nouveau/nvkm/subdev/secboot/acr_r352.c drm/nouveau/nvkm/subdev/secboot/acr_r361.c+2 -40 replies
13/18secboot: add missing fields to BL structuredrm/nouveau/nvkm/subdev/secboot/acr_r352.c+4 -00 replies
14/18secboot: set default error value in error registerdrm/nouveau/nvkm/subdev/secboot/gm200.c+3 -00 replies
15/18secboot: fix WPR descriptor generationdrm/nouveau/nvkm/subdev/secboot/acr_r352.c+12 -90 replies
16/18secboot: add lazy-bootstrap flagdrm/nouveau/nvkm/subdev/secboot/acr_r352.c drm/nouveau/nvkm/subdev/secboot/acr_r352.h+7 -00 replies
17/18falcon: add clear_interrupt functiondrm/nouveau/include/nvkm/engine/falcon.h drm/nouveau/nvkm/falcon/base.c drm/nouveau/nvkm/falcon/v1.c+25 -00 replies
18/18secboot: clear halt interrupt after ACR is rundrm/nouveau/nvkm/subdev/secboot/acr_r352.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/18] Secure Boot refactoring

Sending things in a smaller chunks since it makes their reviewing easier.

This part part 2/3 of the secboot refactoring/PMU command support patch series. Part 1 was the new falcon library which should be merged soon now.

This series is mainly a refactoring/sanitization of the existing secure boot code. It does not add new features (part 3 will).

Secure boot handling is now separated by NVIDIA firmware versions, and LS firmwares are also loaded and managed in their own source files. This makes the code easier to understand (more bite-size chunks instead of thousands of LoC source files) and extend since the proper abstractions are now in place.

The next big chunk will be PMU commands handling. Since PMU is not the only falcon that will have to manage commands (SEC2 will manage security features in newer firmwares), I am currently rewriting it as part of the falcon library instead of the PMU subdev. This will make things more reusable and will allow us to close the loop with the current falcon engine code - please just allow me a few more days to finish this! :)

In the meantime, this code should be good to go and test.

Alexandre Courbot (18):
secboot: rename init() hook to oneinit()
secboot: remove fixup_hs_desc hook
secboot: add low-secure firmware hooks
secboot: generate HS BL descriptor in hook
secboot: reorganize into more files
secboot: add LS flags to LS func structure
secboot: split reset function
secboot: disable falcon interrupts when running blob
secboot: remove unneeded ls_ucode_img member
secboot: remove ls_ucode_mgr
secboot: abstract LS firmware loading functions
secboot: safer zeroing of BL descriptors
secboot: add missing fields to BL structure
secboot: set default error value in error register
secboot: fix WPR descriptor generation
secboot: add lazy-bootstrap flag
falcon: add clear_interrupt function
secboot: clear halt interrupt after ACR is run

 drm/nouveau/include/nvkm/engine/falcon.h      |    2 +-
 drm/nouveau/include/nvkm/subdev/secboot.h     |   10 +-
 drm/nouveau/nvkm/falcon/base.c                |    6 +-
 drm/nouveau/nvkm/falcon/v1.c                  |   17 +-
 drm/nouveau/nvkm/subdev/secboot/Kbuild        |    4 +-
 drm/nouveau/nvkm/subdev/secboot/acr.c         |   54 +-
 drm/nouveau/nvkm/subdev/secboot/acr.h         |   69 +-
 drm/nouveau/nvkm/subdev/secboot/acr_r352.c    |  936 +++++++++++++-
 drm/nouveau/nvkm/subdev/secboot/acr_r352.h    |  250 ++++-
 drm/nouveau/nvkm/subdev/secboot/acr_r361.c    |  138 ++-
 drm/nouveau/nvkm/subdev/secboot/base.c        |   95 +-
 drm/nouveau/nvkm/subdev/secboot/gm200.c       | 1283 +------------------
 drm/nouveau/nvkm/subdev/secboot/gm200.h       |   43 +-
 drm/nouveau/nvkm/subdev/secboot/gm20b.c       |  125 +--
 drm/nouveau/nvkm/subdev/secboot/ls_ucode.h    |  151 ++-
 drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c |  158 ++-
 drm/nouveau/nvkm/subdev/secboot/priv.h        |  200 +---
 17 files changed, 1990 insertions(+), 1551 deletions(-)
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_r352.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_r352.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/acr_r361.c
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/gm200.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/ls_ucode.h
 create mode 100644 drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c
Signature · 5 lines
git-series 0.8.10
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau