Commit Graph
59452 Commits
Author SHA1 Message Date
pre-commit-ci[bot] ca99b25624 pre-commit: autoupdate hooks
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0)
- [github.com/talos-systems/conform: v0.1.0-alpha.27 → v0.1.0-alpha.31](https://github.com/talos-systems/conform/compare/v0.1.0-alpha.27...v0.1.0-alpha.31)
- [github.com/3mdeb/hooks: v0.1.7 → v0.2.2](https://github.com/3mdeb/hooks/compare/v0.1.7...v0.2.2)
2026-01-12 19:55:37 +00:00
Sergii Dmytruk e4f7fa45c4 security/tpm: detect and use all active PCR banks
All of the client has already been updated to permit use of multiple
banks, but at most one was ever enabled.  TPM 2 log was also updated to
permit handling of multiple digests, but similarly only one was in use.

From now on, it's possible to configure more than one digest (only SHA1
and SHA256 are selected by default).  This changes previous TSPI API of
`tpm_log_alg()` (single hash) to `tpm_log_alg_active(enum
vb2_hash_algorithm)` coupled with `enabled_tpm_algs` array (multiple
hashes).

The bulk of the code here is for dealing with the set of banks of TPM:
 - querying it from the device to know what digests should be used
 - synchronizing set of digests in the log with the actual set of active
   banks
The latter is needed in case TPM is initialized in ramstage while
measurements are accumulated starting from the bootblock.  An
alternative was to require initializing TPM in the bootblock, but
bootblock may not have enough space for the extra code required for
TPM, hence a different approach was taken: take all supported hashes
before TPM is initialized, trim unnecessary digests after the
initialization.

Change-Id: Ia326b22869c4983fc4e02e150461e7a9ff94dc4e
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:17 +01:00
Sergii Dmytruk 3bb636b711 lib/cbfs.c,security/tpm/tspi: support multiple banks
Updates the code to support hashing for more than one digest algorithm
when that's available, the code should work as before at this point.

Change-Id: I6a89d8d430986bda7ee77053ca3768a292e1b53b
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:17 +01:00
Sergii Dmytruk 194f4ca39f security/vboot/tpm_common.c: support multiple banks
Updates the code to support hashing for more than one digest algorithm
when that's available, the code should work as before at this point.

Change-Id: I243531e699d927896278df2822e80c69db2715dd
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk 06a919b111 security/intel/cbnt/measurement.c: support multiple PCR banks
Updates the code to support hashing for more than one digest algorithm
when that's available, the code should work as before at this point.

Change-Id: I4e0ea97946e6c8cafbc21a6418b8cb5e7d087df0
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk 43d9efbd99 security/intel/cbnt/measurement.c: extract measurement functions
Get rid of the large if-else statement in
intel_cbnt_inject_ibg_measurements() by moving code from branches into
separate functions.

Upstream-Status: Pending
Change-Id: I892c56d37abac1b43c68ac761d428c3560007246
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk e30e24df79 security/tpm: stop using fixed-size entries in TPM 2.0 log
* Update vendor data to drop entry size and maximum count and add offset
  to the first unused byte and total number of available bytes.  This
  bumps its major version because the update breaks compatibility.
* Represent log table as two structures, tpm_2_log_table and
  tpm_2_log_bottom, separate by a list of digests in the header.
* Remove tpm_2_log_entry.
* Add functions to store and parse log entries and use them instead of
  array operations.
* cbmem tool doesn't need an update because it already parses the log as
  an agile format rather than an array of entries of the same size.

Change-Id: I13cebe2a40c220375cc14124ef9b13ea7ee0207f
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk 0d078b09e3 security/tpm/tss/tcg-2.0: enable extending multiple PCR banks
The marshaling code was already there.  This change only increases
maximum number of hashes and initializes `tpm2_pcr_extend_cmd` with all
digests that were passed in.

Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk f91432127c security/tpm: prepare API for multiple active banks
No functional changes are intended, merely changing interface and how
places that make use of it.  A few places got extra error checks, but
their conditions shouldn't be satisfied at this point.

Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:16 +01:00
Sergii Dmytruk 1d9783f81c security/tpm/tss/tcg-2.0/tss: move tpm2_get_capability_pcrs() here
Out of vendorcode/eltan/security/mboot/mboot.c to not duplicate the
implementation.

Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-12 18:54:15 +01:00
Sergii Dmytruk 8c3789c148 configs/config.msi_*: enable EDK2_CAPSULE_ON_DISK_SUPPORT
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I12e79c2b6e3ace47f2d4883442b735740bb8723c
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:46 +01:00
Sergii Dmytruk 3ea91b801c payloads/edk2: add EDK2_CAPSULE_ON_DISK_SUPPORT option
It permits submitting update capsules by putting them in
`/EFI/UpdateCapsule/`, setting the third bit in `OsIndications` EFI
variable and rebooting.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I04edcd5b7d6944670267bb4dbb0ef4149ffd7bb3
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:46 +01:00
Sergii Dmytruk 45f5034ea5 mb/hardkernel/odroid-h4/mainboard.c: generate SMBIOS table with ME FWSTS
This board supports both Intel Boot Guard and capsule updates, not
providing this table results in capsules conservatively assuming the
platform is fused when that's not actually the case.

Change-Id: Ib7db31131c2642f7edeed5f561894ecf6cefd77e
Upstream-Status: Pending
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:45 +01:00
Sergii Dmytruk 8f8f6e6c73 payloads/edk2/Kconfig.dasharo: bump EDK for "immediate" on-disk capsules
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I9007ac5040b984c51af2eda972210256f40e7059
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:45 +01:00
Sergii Dmytruk 73c145e7f9 drivers/efi/capsules.c: enable capsule access for "disc capsules" boot
EDK requests this boot kind from coreboot in order to discover, load and
process on-disk capsules.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I2faed8e4f633bac9f475a480887aa2be526cb26d
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:45 +01:00
Sergii Dmytruk d4ca1786f5 lib/coreboot_table: report "disk capsules" boot in CBMEM
Add a new CBMEM entry that informs payload about current boot.  For now,
this is only to indicate that "disk capsules" boot is active and is
needed because in EDK's early stages can't check for EFI variables.
However, it's also nice to have a confirmation from coreboot that it
processed the request.

Change-Id: I6894409542dece959480d7f11784f8c00f069ee7
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:45 +01:00
Sergii Dmytruk 86ae818fc8 vendor/dasharo/options.c: introduce "disk capsules" boot
Changes:
 - add handling of Dasharo/"DiskCapsulesBoot" EFI variable which
   requests such a boot from coreboot (EDK sets it if OsIndications
   requests processing of on-disk capsules and at least one seems to be
   present)
 - permit HMRFPO during this boot as on-disk capsules are not affected
   by cold resets
 - act as if FUM is enabled during such a boot because capsules need it
   and this way there is no need to ensure several variables are in sync

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I6722fb5ebc5deaa4b2f383f076ee9e3126468ad5
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:45 +01:00
Sergii Dmytruk c504b651bc vendorcode/dasharo/options.c: extract fum_is_active()
This deduplicates and simplifies bodies of several functions.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I64beb41f8e103f7c7c7accf497e3cb36f0a914c9
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-09 08:59:44 +01:00
Wiktor Mowinski b5b8c8186e configs/config.protectli_vp66xx: bump to rc3
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com>
protectli_vault_adl_v0.9.3-rc3
2026-01-08 17:21:13 +01:00
Wiktor Mowinski 3d2a28414d src/mainboard/protectli/vault_adl_p/devicetree.cb:add all 3 ports
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com>
2026-01-08 17:21:13 +01:00
Wiktor Mowinski 61fbb2419a src/mainboard/protectli/vault_adl_p/devicetree.cb: enable wake on eth
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com>
2026-01-08 17:21:13 +01:00
Wiktor Mowinski f0d99392fe configs/config.protectli_vp66xx: enable ME
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com>
2026-01-08 17:21:13 +01:00
Wiktor Mowinski 9de28ad4cf src/mainboard/protectli/vault_adl_p/devicetree.cb: add usb wake
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com>
2026-01-08 17:21:13 +01:00
Michał Kopeć dc779c4604 payloads/external/edk2/Kconfig.dasharo: bump rev for BtG key checking
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: If0d50df52e8eca52816d66d6d80bcdc2a617ef59
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-12-18 20:29:53 +02:00
Michał Kopeć 1ac3d129f1 mb/novacustom/mtl-h/ramstage.c: Generate SMBIOS table with ME FWSTS
Upstream-Status: Pending
Change-Id: Id9375d1a883d485b14132f76dfa36aa3ae150b72
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-12-18 20:29:53 +02:00