Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/virtio/virtio.h
Show All 29 Lines | |||||
#ifndef _VIRTIO_H_ | #ifndef _VIRTIO_H_ | ||||
#define _VIRTIO_H_ | #define _VIRTIO_H_ | ||||
#include <dev/virtio/virtio_endian.h> | #include <dev/virtio/virtio_endian.h> | ||||
#include <dev/virtio/virtio_ids.h> | #include <dev/virtio/virtio_ids.h> | ||||
#include <dev/virtio/virtio_config.h> | #include <dev/virtio/virtio_config.h> | ||||
struct sbuf; | |||||
struct vq_alloc_info; | struct vq_alloc_info; | ||||
/* | /* | ||||
* Each virtqueue indirect descriptor list must be physically contiguous. | * Each virtqueue indirect descriptor list must be physically contiguous. | ||||
* To allow us to malloc(9) each list individually, limit the number | * To allow us to malloc(9) each list individually, limit the number | ||||
* supported to what will fit in one page. With 4KB pages, this is a limit | * supported to what will fit in one page. With 4KB pages, this is a limit | ||||
* of 256 descriptors. If there is ever a need for more, we can switch to | * of 256 descriptors. If there is ever a need for more, we can switch to | ||||
* contigmalloc(9) for the larger allocations, similar to what | * contigmalloc(9) for the larger allocations, similar to what | ||||
Show All 31 Lines | |||||
#define VIRTIO_SIMPLE_PNPINFO(bus, driver) \ | #define VIRTIO_SIMPLE_PNPINFO(bus, driver) \ | ||||
MODULE_PNP_INFO("U32:device_type;D:#", bus, driver, \ | MODULE_PNP_INFO("U32:device_type;D:#", bus, 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 *feature_desc); | uint64_t features, struct virtio_feature_desc *desc); | ||||
int virtio_describe_sbuf(struct sbuf *sb, uint64_t features, | |||||
struct virtio_feature_desc *desc); | |||||
uint64_t virtio_filter_transport_features(uint64_t features); | uint64_t virtio_filter_transport_features(uint64_t features); | ||||
int virtio_bus_is_modern(device_t dev); | int virtio_bus_is_modern(device_t dev); | ||||
void virtio_read_device_config_array(device_t dev, bus_size_t offset, | void virtio_read_device_config_array(device_t dev, bus_size_t offset, | ||||
void *dst, int size, int count); | void *dst, int size, int count); | ||||
/* | /* | ||||
* VirtIO Bus Methods. | * VirtIO Bus Methods. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |