Skip to content

Rust ADT fixes and improvements - #499

Merged
jannau merged 4 commits into
AsahiLinux:mainfrom
jannau:rust-adt-compat
Sep 24, 2025
Merged

jannau merged 4 commits into
AsahiLinux:mainfrom
jannau:rust-adt-compat

Conversation

@jannau

@jannau jannau commented Sep 22, 2025

Copy link
Copy Markdown
Member
-------------------------------------------------------------------------------------------------------------
rust: adt: Add adt property string iterator

This will be used to check all compatible strings in
`adt_is_compatible()`. For now use it to implement ADTNode::compatible()
returning the n-th compatible string on rust side and the C wrapper
function adt_is_compatible_at().
-------------------------------------------------------------------------------------------------------------
kboot_atc: fuses: Check only the first compatible

The t602x atc-phy nodes carry "[atc-phy,t6020, atc-phy,t8112]" as
compatible property. This results in trying to read t8112 fuses on those
machines which fails with SError when the adt_is_compatible() regression
is fixed.
-------------------------------------------------------------------------------------------------------------
rust: adt: Test all compatible strings in adt_is_compatible()

Fixes a regression in the ADT rust reimplementation checking only the
first compatible.

Closes: https://github.com/AsahiLinux/m1n1/issues/496
-------------------------------------------------------------------------------------------------------------
rust: adt: Add ADTNode::root() convenience function

Simplifies referencing the root ADT node in rust code.

This will be used to check all compatible strings in
`adt_is_compatible()`. For now use it to implement ADTNode::compatible()
returning the n-th compatible string on rust side and the C wrapper
function adt_is_compatible_at().

Signed-off-by: Janne Grunau <j@jannau.net>
The t602x atc-phy nodes carry "[atc-phy,t6020, atc-phy,t8112]" as
compatible property. This results in trying to read t8112 fuses on those
machines which fails with SError when the adt_is_compatible() regression
is fixed.

Signed-off-by: Janne Grunau <j@jannau.net>
Comment thread rust/src/adt.rs Resolved
Fixes a regression in the ADT rust reimplementation checking only the
first compatible.

Closes: AsahiLinux#496
Fixes: 5bc1d2f ("adt: replace adt_is_compatible() with Rust")
Signed-off-by: Janne Grunau <j@jannau.net>
Simplifies referencing the root ADT node in rust code.

Signed-off-by: Janne Grunau <j@jannau.net>
@jannau
jannau merged commit 8f5957a into AsahiLinux:main Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants