MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / print_fdt

Function print_fdt

arch/src/aarch64/fdt.rs:1134–1146  ·  view source on GitHub ↗

Parse the DTB binary and print for debugging

(dtb: &[u8])

Source from the content-addressed store, hash-verified

1132
1133// Parse the DTB binary and print for debugging
1134pub fn print_fdt(dtb: &[u8]) {
1135 match fdt_parser::Fdt::new(dtb) {
1136 Ok(fdt) => {
1137 if let Some(root) = fdt.find_node("/") {
1138 debug!("Printing the FDT:");
1139 print_node(root, 0);
1140 } else {
1141 debug!("Failed to find root node in FDT for debugging.");
1142 }
1143 }
1144 Err(_) => debug!("Failed to parse FDT for debugging."),
1145 }
1146}
1147
1148fn print_node(node: fdt_parser::node::FdtNode<'_, '_>, n_spaces: usize) {
1149 debug!("{:indent$}{}/", "", node.name, indent = n_spaces);

Callers 1

configure_systemFunction · 0.70

Calls 2

newFunction · 0.85
print_nodeFunction · 0.70

Tested by

no test coverage detected