Implement PIT.

BUG=chromium:908689
TEST=Unit tests in file.

Change-Id: I796478fc65a69c18e70ffeaaac753b722edf9091
Reviewed-on: https://chromium-review.googlesource.com/1413831
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Miriam Zimmerman <mutexlox@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Steve Rutherford <srutherford@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
Miriam Zimmerman 2019-01-15 16:23:48 -08:00 committed by chrome-bot
parent 5ede85c55f
commit 16f659fe08
5 changed files with 1300 additions and 0 deletions

11
Cargo.lock generated
View file

@ -88,6 +88,7 @@ dependencies = [
"crosvm_plugin 0.17.0",
"data_model 0.1.0",
"devices 0.1.0",
"enumn 0.1.0",
"gpu_buffer 0.1.0",
"io_jail 0.1.0",
"kernel_cmdline 0.1.0",
@ -139,6 +140,7 @@ dependencies = [
"bit_field 0.1.0",
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"data_model 0.1.0",
"enumn 0.1.0",
"gpu_buffer 0.1.0",
"gpu_display 0.1.0",
"gpu_renderer 0.1.0",
@ -159,6 +161,15 @@ dependencies = [
"vm_control 0.1.0",
]
[[package]]
name = "enumn"
version = "0.1.0"
dependencies = [
"proc-macro2 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "getopts"
version = "0.2.18"

View file

@ -34,6 +34,7 @@ arch = { path = "arch" }
audio_streams = "*"
bit_field = { path = "bit_field" }
devices = { path = "devices" }
enumn = { path = "enumn" }
gpu_buffer = { path = "gpu_buffer", optional = true }
io_jail = { path = "io_jail" }
kvm = { path = "kvm" }

View file

@ -16,6 +16,7 @@ data_model = { path = "../data_model" }
gpu_buffer = { path = "../gpu_buffer", optional = true }
gpu_display = { path = "../gpu_display", optional = true }
gpu_renderer = { path = "../gpu_renderer", optional = true }
enumn = { path = "../enumn" }
kvm = { path = "../kvm" }
libc = "*"
io_jail = { path = "../io_jail" }

View file

@ -8,6 +8,7 @@ extern crate audio_streams;
extern crate bit_field;
extern crate byteorder;
extern crate data_model;
extern crate enumn;
extern crate io_jail;
extern crate kvm;
extern crate libc;
@ -30,6 +31,7 @@ mod bus;
mod cmos;
mod i8042;
mod pci;
mod pit;
pub mod pl030;
mod proxy;
mod serial;
@ -42,6 +44,7 @@ pub use self::i8042::I8042Device;
pub use self::pci::{
Ac97Dev, PciConfigIo, PciConfigMmio, PciDevice, PciDeviceError, PciInterruptPin, PciRoot,
};
pub use self::pit::{Pit, PitError};
pub use self::pl030::Pl030;
pub use self::proxy::Error as ProxyError;
pub use self::proxy::ProxyDevice;

1284
devices/src/pit.rs Normal file

File diff suppressed because it is too large Load diff