pub struct Fdt<'a> { /* private fields */ }
Expand description
The reference to the FDT raw data.
Implementations§
Source§impl<'a> Fdt<'a>
impl<'a> Fdt<'a>
Sourcepub fn from_bytes(data: &'a [u8]) -> Result<Fdt<'a>, FdtError<'a>>
pub fn from_bytes(data: &'a [u8]) -> Result<Fdt<'a>, FdtError<'a>>
Create a new FDT from raw data.
Sourcepub fn from_ptr(ptr: NonNull<u8>) -> Result<Fdt<'a>, FdtError<'a>>
pub fn from_ptr(ptr: NonNull<u8>) -> Result<Fdt<'a>, FdtError<'a>>
Create a new FDT from a pointer.
pub fn total_size(&self) -> usize
pub fn version(&self) -> usize
Sourcepub fn boot_cpuid_phys(&self) -> u32
pub fn boot_cpuid_phys(&self) -> u32
This field shall contain the physical ID of the system’s boot CPU. It shall be identical to the physical ID given in the reg property of that CPU node within the devicetree.
Sourcepub fn memory_reservation_block(&self) -> impl Iterator<Item = MemoryRegion>
pub fn memory_reservation_block(&self) -> impl Iterator<Item = MemoryRegion>
The memory reservation block provides the client program with a list of areas in physical memory which are reserved; that is, which shall not be used for general memory allocations. It is used to protect vital data structures from being overwritten by the client program.
Sourcepub fn reserved_memory(&'a self) -> impl Iterator<Item = Node<'a>> + 'a
pub fn reserved_memory(&'a self) -> impl Iterator<Item = Node<'a>> + 'a
Reserved memory is specified as a node under the /reserved-memory
node. The operating system shall exclude reserved
memory from normal usage. One can create child nodes describing particular reserved (excluded from normal use) memory
regions. Such memory regions are usually designed for the special usage by various device drivers.
pub fn all_nodes(&'a self) -> impl Iterator<Item = Node<'a>>
pub fn chosen(&'a self) -> Option<Chosen<'a>>
pub fn get_node_by_phandle(&'a self, phandle: Phandle) -> Option<Node<'a>>
pub fn get_node_by_name(&'a self, name: &str) -> Option<Node<'a>>
pub fn find_compatible( &'a self, with: &'a [&'a str], ) -> impl Iterator<Item = Node<'a>> + 'a
Sourcepub fn find_nodes(
&'a self,
path: &'a str,
) -> impl Iterator<Item = Node<'a>> + 'a
pub fn find_nodes( &'a self, path: &'a str, ) -> impl Iterator<Item = Node<'a>> + 'a
if path start with ‘/’ then search by path, else search by aliases