fdt
fdt copied to clipboard
Rust crate for Flattened Devicetree parsing
Adds an `Option` return type to `FdtData::skip` to allow bubbling up a `None` value when the end of the slice is reached. Avoids blowing up the stack with an infinite...
PCI Host bridges have a property called `bus-range`. This property is for example `bus-range = ` indicating a range from 0 to 255 (inclusive). This crate however prints it as...
Bubble up a `None` value instead of `panic`ing by calling `unwrap`.
Adds a `NodeProperty::as_usize_list` helper function to parse the property value as a `usize` list.
Adds a helper function to convert a `NodeProperty` value into a list of `&str`.
If a `interrupt-parent` property or parent `interrupt-cells` property value cannot be found in the current node, searches the parent node for the `interrupt-parent` property. `dtb/test.dtb` was recompiled with: ```bash $...
Removes the `unwrap` calls in `BigEndian*::from_bytes` implementations. Currently, the implementation will never panic on the `unwrap` call, because the prior `get` call always returns the appropriate length byte slice. However,...
Instead of wrapping a byte slice in the local `CStr`, wraps the `core::ffi::CStr` type. Avoids duplication of effort on the `core` library, and should help future-proof for additions like the...
This is needed to support interrupts from PCI devices. I can only really find information on how these properties are used for PCI interrupt parsing, so hopefully it's correct more...
I think it would be nice to get rid of some of these panics in favor of propagating up errors