diff --git a/src/vmm/src/arch/aarch64/fdt.rs b/src/vmm/src/arch/aarch64/fdt.rs index 71dc401fb32b..82963d1b0862 100644 --- a/src/vmm/src/arch/aarch64/fdt.rs +++ b/src/vmm/src/arch/aarch64/fdt.rs @@ -14,10 +14,9 @@ use vm_memory::GuestMemoryError; use super::super::{DeviceType, InitrdConfig}; use super::cache_info::{read_cache_config, CacheEntry}; -use super::get_fdt_addr; use super::gic::GICDevice; use crate::devices::acpi::vmgenid::{VmGenId, VMGENID_MEM_SIZE}; -use crate::vstate::memory::{Address, Bytes, GuestAddress, GuestMemory, GuestMemoryMmap}; +use crate::vstate::memory::{Address, GuestMemory, GuestMemoryMmap}; // This is a value for uniquely identifying the FDT node declaring the interrupt controller. const GIC_PHANDLE: u32 = 1; @@ -65,11 +64,11 @@ pub enum FdtError { } /// Creates the flattened device tree for this aarch64 microVM. -pub fn create_fdt( +pub fn create_fdt( guest_mem: &GuestMemoryMmap, vcpu_mpidr: Vec, cmdline: CString, - device_info: &HashMap<(DeviceType, String), T, S>, + device_info: &HashMap<(DeviceType, String), T>, gic_device: &GICDevice, vmgenid: &Option, initrd: &Option, @@ -106,10 +105,6 @@ pub fn create_fdt Vec<(GuestAddress, usize)> { /// * `device_info` - A hashmap containing the attached devices for building FDT device nodes. /// * `gic_device` - The GIC device. /// * `initrd` - Information about an optional initrd. -pub fn configure_system( +pub fn configure_system( guest_mem: &GuestMemoryMmap, cmdline_cstring: CString, vcpu_mpidr: Vec, - device_info: &HashMap<(DeviceType, String), T, S>, + device_info: &HashMap<(DeviceType, String), T>, gic_device: &GICDevice, vmgenid: &Option, initrd: &Option, ) -> Result<(), ConfigurationError> { - fdt::create_fdt( + let fdt = fdt::create_fdt( guest_mem, vcpu_mpidr, cmdline_cstring, @@ -73,6 +77,10 @@ pub fn configure_system