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

Function create_devices_node

arch/src/riscv64/fdt.rs:290–302  ·  view source on GitHub ↗
(
    fdt: &mut FdtWriter,
    dev_info: &HashMap<(DeviceType, String), T, S>,
)

Source from the content-addressed store, hash-verified

288}
289
290fn create_devices_node<T: DeviceInfoForFdt + Clone + Debug, S: ::std::hash::BuildHasher>(
291 fdt: &mut FdtWriter,
292 dev_info: &HashMap<(DeviceType, String), T, S>,
293) -> FdtWriterResult<()> {
294 for ((device_type, _device_id), info) in dev_info {
295 match device_type {
296 DeviceType::Serial => create_serial_node(fdt, info)?,
297 DeviceType::Virtio(_) => unreachable!(),
298 }
299 }
300
301 Ok(())
302}
303
304fn create_pci_nodes(fdt: &mut FdtWriter, pci_device_info: &[PciSpaceInfo]) -> FdtWriterResult<()> {
305 // Add node for PCIe controller.

Callers 1

create_fdtFunction · 0.70

Calls 1

create_serial_nodeFunction · 0.70

Tested by

no test coverage detected