pub struct PciGenericDeviceHeader {
pub base_addr: [u32; 6],
pub cardbus_cis_ptr: u32,
pub subsystem_device_id: u16,
pub subsystem_vendor_id: u16,
pub expansion_rom_base_addr: u32,
pub capabilities_ptr: u16,
pub max_latency: u8,
pub min_grant: u8,
pub interrupt_pin: u8,
pub interrupt_line: u8,
}
Expand description
The header for generic PCI devices.
All fields are the raw values of every non-reserved register part in the configuration space.
The format of the header in PCI configuration space is the following.
+----------+---------+-------------+--------------+----------------+----------------+
| Register | Offset | Bits 31-24 | Bits 23-16 | Bits 15-8 | Bits 7-0 |
+----------+---------+-------------+--------------+----------------+----------------+
| 0x4 | 0x10 | Base address #0 (BAR0) |
| 0x5 | 0x14 | Base address #1 (BAR1) |
| 0x6 | 0x18 | Base address #2 (BAR2) |
| 0x7 | 0x1C | Base address #3 (BAR3) |
| 0x8 | 0x20 | Base address #4 (BAR4) |
| 0x9 | 0x24 | Base address #5 (BAR5) |
| 0xA | 0x28 | Cardbus CIS Pointer |
| 0xB | 0x2C | Subsystem ID | Subsystem Vendor ID |
| 0xC | 0x30 | Expansion ROM base address |
| 0xD | 0x34 | Reserved | Capabilities Pointer |
| 0xE | 0x38 | Reserved |
| 0xF | 0x3C | Max latency | Min Grant | Interrupt PIN | Interrupt Line |
+----------+---------+-------------+--------------+----------------+----------------+
Fields§
§base_addr: [u32; 6]
§cardbus_cis_ptr: u32
§subsystem_device_id: u16
§subsystem_vendor_id: u16
§expansion_rom_base_addr: u32
§capabilities_ptr: u16
§max_latency: u8
§min_grant: u8
§interrupt_pin: u8
§interrupt_line: u8
Implementations§
Trait Implementations§
Source§impl Clone for PciGenericDeviceHeader
impl Clone for PciGenericDeviceHeader
Source§fn clone(&self) -> PciGenericDeviceHeader
fn clone(&self) -> PciGenericDeviceHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PciGenericDeviceHeader
impl RefUnwindSafe for PciGenericDeviceHeader
impl Send for PciGenericDeviceHeader
impl Sync for PciGenericDeviceHeader
impl Unpin for PciGenericDeviceHeader
impl UnwindSafe for PciGenericDeviceHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more