2 * Created on: 12.11.2013
3 * Author: Matthias Lange <matthias.lange@kernkonzept.com>
4 * Alexander Warg <alexander.wagr@kernkonzept.com>
7 #include <l4/l4virtio/virtio.h>
8 #include <l4/l4virtio/l4virtio>
11 l4virtio_set_status(l4_cap_idx_t cap, unsigned status) L4_NOTHROW
13 return L4::Cap<L4virtio::Device>(cap)->set_status(status);
17 l4virtio_config_queue(l4_cap_idx_t cap, unsigned queue) L4_NOTHROW
19 return L4::Cap<L4virtio::Device>(cap)->config_queue(queue);
23 l4virtio_register_ds(l4_cap_idx_t cap, l4_cap_idx_t ds_cap,
24 l4_uint64_t base, l4_umword_t offset,
25 l4_umword_t sz) L4_NOTHROW
27 L4::Ipc::Cap<L4Re::Dataspace> ds;
28 ds = L4::Ipc::Cap<L4Re::Dataspace>::from_ci(ds_cap);
29 return L4::Cap<L4virtio::Device>(cap)->register_ds(ds, base, offset, sz);
33 l4virtio_register_iface(l4_cap_idx_t cap, l4_cap_idx_t guest_irq,
34 l4_cap_idx_t host_irq, l4_cap_idx_t config_ds) L4_NOTHROW
36 L4::Ipc::Cap<L4::Irq> girq;
37 girq = L4::Ipc::make_cap(L4::Cap<L4::Irq>(guest_irq), L4_CAP_FPAGE_RW);
38 return L4::Cap<L4virtio::Device>(cap)
39 ->register_iface(girq, L4::Cap<L4::Irq>(host_irq),
40 L4::Cap<L4Re::Dataspace>(config_ds));