mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-25 04:14:06 +00:00
devices: Add pci_types
Start PCI work by defining an enum to represent the four PCI interrupt lines. Change-Id: Ib95a4e4a03f0d6917ed2bed4b1afb97d18ff4f9e Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072573 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
This commit is contained in:
parent
228e4a6a91
commit
9b871c2db3
2 changed files with 22 additions and 0 deletions
|
@ -20,6 +20,7 @@ extern crate vm_control;
|
|||
mod bus;
|
||||
mod cmos;
|
||||
mod i8042;
|
||||
mod pci;
|
||||
mod proxy;
|
||||
mod serial;
|
||||
pub mod pl030;
|
||||
|
@ -29,6 +30,7 @@ pub use self::bus::{Bus, BusDevice};
|
|||
pub use self::cmos::Cmos;
|
||||
pub use self::pl030::Pl030;
|
||||
pub use self::i8042::I8042Device;
|
||||
pub use self::pci::PciInterruptPin;
|
||||
pub use self::proxy::ProxyDevice;
|
||||
pub use self::proxy::Error as ProxyError;
|
||||
pub use self::serial::Serial;
|
||||
|
|
20
devices/src/pci/mod.rs
Normal file
20
devices/src/pci/mod.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2018 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.
|
||||
|
||||
//! Implements pci devices and busses.
|
||||
|
||||
/// PCI has four interrupt pins A->D.
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum PciInterruptPin {
|
||||
IntA,
|
||||
IntB,
|
||||
IntC,
|
||||
IntD,
|
||||
}
|
||||
|
||||
impl PciInterruptPin {
|
||||
pub fn to_mask(self) -> u32 {
|
||||
self as u32
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue