PCI configuration space
PCI configuration space is the underlying way that the Conventional PCI, PCI-X and PCI Express perform auto configuration of the cards inserted into their bus.
This library implements decoding PCI configuration space and PCI Express extended configuration space.
Design
The main purpose of this library is to represent configuration space data as a hierarchical structures. Therefore, CPU and memory usage may not be optimal.
The library is divided into three parts:
- PCI 3.0 Compatible Configuration Space Header
- PCI Configuration Space Capabilities
- Extended Configuration Space Capabilities
Usage
# use ;
let conf_space_data = include_bytes!;
let header = try_from.unwrap;
assert_eq!;
let mut caps = new;
let BridgeSubsystemVendorId = caps
.find_map
.unwrap;
assert_eq!;
let mut ecaps = new;
let VendorSpecificExtendedCapability = ecaps
.find_map
.unwrap;
assert_eq!;
More detailed usage in modules descriptions