Skip to content

bootcount: introduce GPT-backed bootcount device

[email protected] u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8cros: add common helpers for GPT flagsinclude/cros_flags.h+74 -02 replies
2/8disk: efi: introduce {read,write}_disk_flagsdisk/part_efi.c include/part.h+153 -01 reply
3/8test: disk: coverage for {read,write}_disk_flagsdisk/part_efi.c test/dm/Makefile test/dm/gpt-flags.c+156 -61 reply
4/8cmd: gpt: enable extension to manipulate GPT PTE attributescmd/Kconfig cmd/gpt.c+105 -02 replies
5/8configs: sandbox: enable GPT flags extensionconfigs/sandbox_defconfig+1 -01 reply
6/8bootcount: gpt: introduce GPT-backed bootcount devicedrivers/bootcount/Kconfig drivers/bootcount/Makefile drivers/bootcount/bootcount-gpt.c+148 -01 reply
7/8bootcount: gpt: ensure coreboot payload enables DM_BOOTCOUNTdrivers/bootcount/Kconfig+2 -11 reply
8/8bootcount: gate bootcount_{inc, error}() behind !CONFIG_DM_BOOTCOUNT_GPTinclude/bootcount.h+2 -11 reply

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchSimon Glass
1/8
2/8
3/8
4/8
5/8R-b
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/8] bootcount: introduce GPT-backed bootcount device

This series adds new GPT-backed bootcount device with ChromiumOS-inspired counters/flags logic [1].

Patch 1 is ChromiumOS-style 16-bit flags manipulation routines

Patch 2-5 introduce extension to existing 'gpt' command allowing
the user to update top 16 bits of selected GPT PTE flags manually.

Patch 6 introduces the new bootcount device with compatible
"u-boot,bootcount-gpt"

Patch 7 allow U-Boot running as a coreboot payload, to use new
bootcount-gpt device.

Patch 8 excludes bootcount-gpt from being used in autoboot code path
to allow custom bootflow logic.

[1] https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/master/cgpt

Denis Mukhin (8):
cros: add common helpers for GPT flags
disk: efi: introduce {read,write}_disk_flags
test: disk: coverage for {read,write}_disk_flags
cmd: gpt: enable extension to manipulate GPT PTE attributes
configs: sandbox: enable GPT flags extension
bootcount: gpt: introduce GPT-backed bootcount device
bootcount: gpt: ensure coreboot payload enables DM_BOOTCOUNT
bootcount: gate bootcount_{inc,error}() behind
!CONFIG_DM_BOOTCOUNT_GPT

 cmd/Kconfig                       |   8 ++
 cmd/gpt.c                         |  97 ++++++++++++++++++++
 configs/sandbox_defconfig         |   1 +
 disk/part_efi.c                   | 141 +++++++++++++++++++++++++++-
 drivers/bootcount/Kconfig         |  10 +-
 drivers/bootcount/Makefile        |   1 +
 drivers/bootcount/bootcount-gpt.c | 140 ++++++++++++++++++++++++++++
 include/bootcount.h               |   3 +-
 include/cros_flags.h              |  74 +++++++++++++++
 include/part.h                    |  24 +++++
 test/dm/Makefile                  |   2 +-
 test/dm/gpt-flags.c               | 148 ++++++++++++++++++++++++++++++
 12 files changed, 641 insertions(+), 8 deletions(-)
 create mode 100644 drivers/bootcount/bootcount-gpt.c
 create mode 100644 include/cros_flags.h
 create mode 100644 test/dm/gpt-flags.c
Signature · 1 line
2.54.0