summary refs log tree commit diff
path: root/devices/src/lib.rs
blob: 9d39fbd718ad135460220fb94f7634fb43de30ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//! Emulates virtual and hardware devices.

mod bus;
mod cmos;
mod i8042;
mod ioapic;
mod irqchip;
mod jailed;
mod pci;
mod pic;
mod pit;
pub mod pl030;
mod proxy;
#[macro_use]
mod register_space;
pub mod acpi;
mod serial;
mod serial_device;
pub mod split_irqchip_common;
pub mod usb;
mod utils;
pub mod vfio;
pub mod virtio;

pub use self::acpi::ACPIPMResource;
pub use self::bus::Error as BusError;
pub use self::bus::{Bus, BusDevice, BusRange, BusResumeDevice};
pub use self::cmos::Cmos;
pub use self::i8042::I8042Device;
pub use self::ioapic::{Ioapic, IOAPIC_BASE_ADDRESS, IOAPIC_MEM_LENGTH_BYTES};
pub use self::irqchip::*;
pub use self::jailed::Error as ProxyError;
pub use self::jailed::JailedDevice;
pub use self::pci::{
    Ac97Backend, Ac97Dev, Ac97Parameters, PciAddress, PciConfigIo, PciConfigMmio, PciDevice,
    PciDeviceError, PciInterruptPin, PciRoot, VfioPciDevice,
};
pub use self::pic::Pic;
pub use self::pit::{Pit, PitError};
pub use self::pl030::Pl030;
pub use self::serial::Serial;
pub use self::serial_device::SerialDevice;
pub use self::usb::host_backend::host_backend_device_provider::HostBackendDeviceProvider;
pub use self::usb::xhci::xhci_controller::XhciController;
pub use self::vfio::{VfioContainer, VfioDevice};
pub use self::virtio::VirtioPciDevice;

use msg_socket::MsgOnSocket;

#[derive(Clone, Copy, Debug, MsgOnSocket)]
pub struct MemoryParams {
    /// Physical memory size in bytes for the VM.
    pub size: u64,

    #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
    pub has_bios: bool,
}