pub enum BusRequest {
GetHostBridgeInfo {
responder: BusGetHostBridgeInfoResponder,
},
GetDevices {
responder: BusGetDevicesResponder,
},
ReadBar {
device: Address,
bar_id: u8,
offset: u64,
size: u64,
responder: BusReadBarResponder,
},
}
Expand description
The Bus protocol provides information about PCI device children on the PCI providing the service.
Variants§
GetHostBridgeInfo
Retrieve information about the segment group and buses covered by a Bus.
Fields
responder: BusGetHostBridgeInfoResponder
GetDevices
Retrieve all Devices on the Bus.
Fields
responder: BusGetDevicesResponder
ReadBar
Read from a Device’s base address register (BAR). The BAR must be an MMIO type.
Parameters |device|: The address of the device to read from. |bar_id|: The ID of the BAR to read. |offset|: The offset, in bytes, to start the read (default: 0 bytes). |size|: The size of the read (default: 128 bytes). The max size for a read is |READBAR_MAX_SIZE|.
Errors: |ZX_ERR_NOT_FOUND|: |device| was not found, or |bar_id| did not exist in |device|. |ZX_ERR_INVALID_ARGS|: |bar_id| is invalid, or offset / size combined are invalid for the given BAR’s size. |ZX_ERR_NOT_SUPPORTED|: The BAR specified by |bar_id| is not an MMIO BAR.
Implementations§
Source§impl BusRequest
impl BusRequest
pub fn into_get_host_bridge_info(self) -> Option<BusGetHostBridgeInfoResponder>
pub fn into_get_devices(self) -> Option<BusGetDevicesResponder>
pub fn into_read_bar( self, ) -> Option<(Address, u8, u64, u64, BusReadBarResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL