summary refs log tree commit diff
path: root/aarch64/src
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2018-05-23 16:45:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-23 21:05:03 -0700
commita697d31fc697a6f02489f11d58d23cb2380d4013 (patch)
treecabc0d5fe9ca09794130746814023c055a2d5adb /aarch64/src
parentb847858e66d58a3bf7506f43f1a22781014a527e (diff)
downloadcrosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar.gz
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar.bz2
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar.lz
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar.xz
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.tar.zst
crosvm-a697d31fc697a6f02489f11d58d23cb2380d4013.zip
mptable: Add ability to allocate pci interrupts
PCI devices will require interrupts, allow this by passing a vector of
IRQs to the mptable so the guest kernel can find the IRQs.

Change-Id: I9fa8a2ed0a34089e631441570521082ffde9c4ef
Reviewed-on: https://chromium-review.googlesource.com/1072578
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'aarch64/src')
-rw-r--r--aarch64/src/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/aarch64/src/lib.rs b/aarch64/src/lib.rs
index 6a25a26..86fa03a 100644
--- a/aarch64/src/lib.rs
+++ b/aarch64/src/lib.rs
@@ -20,7 +20,7 @@ use std::io::stdout;
 use std::sync::{Arc, Mutex};
 use std::ffi::CStr;
 
-use devices::Bus;
+use devices::{Bus, PciInterruptPin};
 use sys_util::{EventFd, GuestAddress, GuestMemory};
 use resources::{AddressRanges, SystemAllocator};
 use std::os::unix::io::FromRawFd;
@@ -171,8 +171,12 @@ impl arch::LinuxArch for AArch64 {
         Ok(())
     }
 
-    fn setup_system_memory(mem: &GuestMemory, mem_size: u64, vcpu_count: u32,
-                           cmdline: &CStr) -> Result<()> {
+    fn setup_system_memory(mem: &GuestMemory,
+                           mem_size: u64,
+                           vcpu_count: u32,
+                           cmdline: &CStr,
+                           _pci_irqs: Vec<(u32, PciInterruptPin)>) -> Result<()> {
+        // TODO(dgreid) set up PCI in the device tree.
         fdt::create_fdt(AARCH64_FDT_MAX_SIZE as usize,
                         mem,
                         vcpu_count,