[SLOF] [PATCH v1 18/27] virtio: enable 1.0 device setup
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Jan 13 22:17:05 AEDT 2016
Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
board-qemu/slof/virtio.fs | 1 +
lib/libvirtio/virtio.code | 7 +++++++
lib/libvirtio/virtio.in | 2 ++
3 files changed, 10 insertions(+)
diff --git a/board-qemu/slof/virtio.fs b/board-qemu/slof/virtio.fs
index 29d0a19..9f71694 100644
--- a/board-qemu/slof/virtio.fs
+++ b/board-qemu/slof/virtio.fs
@@ -41,6 +41,7 @@ CONSTANT /vd-cap-len
s" 10 config-l@ translate-my-address 3 not AND" evaluate
( io-base ) r@ vd>base !
0 r@ vd>type l!
+ r@ virtio-setup-device
ELSE
." unsupported virtio interface!" cr
1 r@ vd>type l!
diff --git a/lib/libvirtio/virtio.code b/lib/libvirtio/virtio.code
index 258b9bb..82aa1ca 100644
--- a/lib/libvirtio/virtio.code
+++ b/lib/libvirtio/virtio.code
@@ -18,6 +18,13 @@
/******** core virtio ********/
+// : virtio-setup-device ( dev -- )
+PRIM(virtio_X2d_setup_X2d_device)
+ void *dev = TOS.a; POP;
+ virtio_setup_device(dev);
+MIRP
+
+
// : virtio-vring-size ( queuesize -- ringsize )
PRIM(virtio_X2d_vring_X2d_size)
TOS.u = virtio_vring_size(TOS.u);
diff --git a/lib/libvirtio/virtio.in b/lib/libvirtio/virtio.in
index c36d127..3bbc1d4 100644
--- a/lib/libvirtio/virtio.in
+++ b/lib/libvirtio/virtio.in
@@ -10,6 +10,8 @@
* IBM Corporation - initial implementation
*****************************************************************************/
+cod(virtio-setup-device)
+
cod(virtio-vring-size)
cod(virtio-get-qsize)
cod(virtio-get-config)
--
2.5.0
More information about the SLOF
mailing list