summary refs log tree commit diff
path: root/devices/src/pci
diff options
context:
space:
mode:
authorXiong Zhang <xiong.y.zhang@intel.corp-partner.google.com>2019-10-30 14:59:26 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-10 06:39:34 +0000
commit383b3b520a76a921be17a12640b24fba1419dbbb (patch)
tree1aea1553c2534aab73b265929cf462c0d8999a67 /devices/src/pci
parent87a3b44d9e6caa82ab521a5dd9bafdb56e8b6ed1 (diff)
downloadcrosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.gz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.bz2
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.lz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.xz
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.tar.zst
crosvm-383b3b520a76a921be17a12640b24fba1419dbbb.zip
resource: Rename device memory to mmio
Since unified allocator is used to allocate mmio, this patch remove the
device memory name, and rename device to mmio.

BUG=chromium:992270
TEST=this patch doesn't change function, run build_test

Change-Id: I234b0db4b3c5de8cfee372ace5212a980564d0c7
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1895234
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/src/pci')
-rw-r--r--devices/src/pci/ac97.rs8
-rw-r--r--devices/src/pci/vfio_pci.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/devices/src/pci/ac97.rs b/devices/src/pci/ac97.rs
index 73a5093..9a3c7e5 100644
--- a/devices/src/pci/ac97.rs
+++ b/devices/src/pci/ac97.rs
@@ -149,7 +149,7 @@ impl PciDevice for Ac97Dev {
             .expect("assign_bus_dev must be called prior to allocate_io_bars");
         let mut ranges = Vec::new();
         let mixer_regs_addr = resources
-            .mmio_allocator(MmioType::Mmio)
+            .mmio_allocator(MmioType::Low)
             .allocate_with_align(
                 MIXER_REGS_SIZE,
                 Alloc::PciBar { bus, dev, bar: 0 },
@@ -167,7 +167,7 @@ impl PciDevice for Ac97Dev {
         ranges.push((mixer_regs_addr, MIXER_REGS_SIZE));
 
         let master_regs_addr = resources
-            .mmio_allocator(MmioType::Mmio)
+            .mmio_allocator(MmioType::Low)
             .allocate_with_align(
                 MASTER_REGS_SIZE,
                 Alloc::PciBar { bus, dev, bar: 1 },
@@ -245,8 +245,8 @@ mod tests {
         let mut ac97_dev = Ac97Dev::new(mem, Box::new(DummyStreamSource::new()));
         let mut allocator = SystemAllocator::builder()
             .add_io_addresses(0x1000_0000, 0x1000_0000)
-            .add_mmio_addresses(0x2000_0000, 0x1000_0000)
-            .add_device_addresses(0x3000_0000, 0x1000_0000)
+            .add_low_mmio_addresses(0x2000_0000, 0x1000_0000)
+            .add_high_mmio_addresses(0x3000_0000, 0x1000_0000)
             .create_allocator(5, false)
             .unwrap();
         ac97_dev.assign_bus_dev(0, 0);
diff --git a/devices/src/pci/vfio_pci.rs b/devices/src/pci/vfio_pci.rs
index c10715d..2243990 100644
--- a/devices/src/pci/vfio_pci.rs
+++ b/devices/src/pci/vfio_pci.rs
@@ -502,7 +502,7 @@ impl PciDevice for VfioPciDevice {
                 size |= u64::from(low);
                 size = !size + 1;
                 let bar_addr = resources
-                    .mmio_allocator(MmioType::Mmio)
+                    .mmio_allocator(MmioType::Low)
                     .allocate_with_align(
                         size,
                         Alloc::PciBar {