/*
 * RPC interface for the PCI server user client.
 *
 * This may be used by drivers to access PCI device configuration space.
 */
#include <libpci/UserClientTypes.h>

interface PciDriverUser {
    /// Check whether the given device exists; return its forest path or an empty string.
    GetDeviceAt(address: libpci::BusAddress) => (path: String)

    /// Reads a 32-bit word from the given device's config space.
    ReadCfgSpace32(address: libpci::BusAddress, offset: UInt16) => (result: UInt32)
    /// Writes a 32-bit word to the given device's config space.
    WriteCfgSpace32(address: libpci::BusAddress, offset: UInt16, value: UInt32) => ()
}
