Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/virtio/virtio.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
#define VIRTIO_IVAR_SUBDEVICE 6 | #define VIRTIO_IVAR_SUBDEVICE 6 | ||||
#define VIRTIO_IVAR_MODERN 7 | #define VIRTIO_IVAR_MODERN 7 | ||||
struct virtio_feature_desc { | struct virtio_feature_desc { | ||||
uint64_t vfd_val; | uint64_t vfd_val; | ||||
const char *vfd_str; | const char *vfd_str; | ||||
}; | }; | ||||
#define VIRTIO_DRIVER_MODULE(name, driver, devclass, evh, arg) \ | |||||
DRIVER_MODULE(name, virtio_mmio, driver, devclass, evh, arg); \ | |||||
DRIVER_MODULE(name, virtio_pci, driver, devclass, evh, arg) | |||||
struct virtio_pnp_match { | struct virtio_pnp_match { | ||||
uint32_t device_type; | uint32_t device_type; | ||||
const char *description; | const char *description; | ||||
}; | }; | ||||
#define VIRTIO_SIMPLE_PNPTABLE(driver, devtype, desc) \ | #define VIRTIO_SIMPLE_PNPINFO(driver, devtype, desc) \ | ||||
static const struct virtio_pnp_match driver ## _match = { \ | static const struct virtio_pnp_match driver ## _match = { \ | ||||
.device_type = devtype, \ | .device_type = devtype, \ | ||||
.description = desc, \ | .description = desc, \ | ||||
} | }; \ | ||||
#define VIRTIO_SIMPLE_PNPINFO(bus, driver) \ | MODULE_PNP_INFO("U32:device_type;D:#", virtio_mmio, driver, \ | ||||
MODULE_PNP_INFO("U32:device_type;D:#", bus, driver, \ | &driver ## _match, 1); \ | ||||
MODULE_PNP_INFO("U32:device_type;D:#", virtio_pci, driver, \ | |||||
&driver ## _match, 1) | &driver ## _match, 1) | ||||
#define VIRTIO_SIMPLE_PROBE(dev, driver) \ | #define VIRTIO_SIMPLE_PROBE(dev, driver) \ | ||||
(virtio_simple_probe(dev, &driver ## _match)) | (virtio_simple_probe(dev, &driver ## _match)) | ||||
const char *virtio_device_name(uint16_t devid); | const char *virtio_device_name(uint16_t devid); | ||||
void virtio_describe(device_t dev, const char *msg, | void virtio_describe(device_t dev, const char *msg, | ||||
uint64_t features, struct virtio_feature_desc *desc); | uint64_t features, struct virtio_feature_desc *desc); | ||||
int virtio_describe_sbuf(struct sbuf *sb, uint64_t features, | int virtio_describe_sbuf(struct sbuf *sb, uint64_t features, | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |