Skip to content

CBnT 2.1 and adapting to Fiano changes#424

Open
micgor32 wants to merge 18 commits intomainfrom
cbnt21-refactor
Open

CBnT 2.1 and adapting to Fiano changes#424
micgor32 wants to merge 18 commits intomainfrom
cbnt21-refactor

Conversation

@micgor32
Copy link
Copy Markdown
Contributor

@micgor32 micgor32 commented Apr 7, 2026

Add support for CBnT 2.1 (MTL and newer generations) and adapts to Fiano intel/metadata breaking changes.
Short summary of changes:

  • use unified bg and cbnt packages: also implies that KM and BPM are no longer versioned. Because of the unification, the constructors for the Manifests do the job of returning the correct implementation of either KM or BPM based on the BtG/CBnT version provided. This also implies that we have to make type assertions in few places.
  • add two new tests that are CBnT 2.1 specific to bg-suite. The rationale is given in cmd/core/bg-suite/TESTPLAN.md. Because some runtime tests (5, 6 and 8) are only valid on either 1.0/2.0 or 2.1, add the logic for determining the BtG/CBnT version on runtme.
  • read sysfs to get ME version. Current HFSTS definitions are no longer valid for MTL and newer plaftorms that use ME 18.x/19.x/21.x.

Note: WIP till Fiano changes are upstreamed, the branch can be, however tested in the meantime after setting the replacement in go.mod:

	github.com/linuxboot/fiano => github.com/BlindspotSoftware/fiano v0.0.0-20260407150208-26d4f36f41e0
	github.com/prometheus/procfs => github.com/micgor32/procfs v0.0.0-20260302150133-9cbb6f93e41e

@micgor32 micgor32 self-assigned this Apr 7, 2026
@micgor32 micgor32 added enhancement New feature or request go Pull requests that update go code labels Apr 7, 2026
@micgor32
Copy link
Copy Markdown
Contributor Author

micgor32 commented Apr 7, 2026

force pushed to amend previous commit message :D

@micgor32
Copy link
Copy Markdown
Contributor Author

micgor32 commented Apr 9, 2026

squashed fixup commits

@micgor32 micgor32 marked this pull request as ready for review April 9, 2026 17:08
micgor32 added 15 commits April 10, 2026 11:30
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Fiano has now one package for all three BG/CBnT specifications.
Versions are determined by the type constructor based on the BG version
provided. Similar story for BPM and KM packages.

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
…d KM

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Some runtime tests give representative results if ran on particular
CBnT version (will be documented in TESTPLAN.md in the follow up
commits). We can not assume version based on header version in the
image as with static tests, as there is nothing stopping the user
from using different fw image than the one on the running system.
What we can do instead, is to use CPUID to retrieve Display Model
and compare it to the list of known microachitecture acronyms, and
based on that determine the CBnT version.

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
`fit` package in Fiano now uses the actual firmware image size instead
of assuming it fills out the whole SPI chip from which it was read off.
Thus the fit's api changed a bit, and we have to also pass fw size.

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
…in VersionedData

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
…tion

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
…ified pkgs

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant