aboutsummaryrefslogtreecommitdiff
path: root/hw/syborg.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/syborg.c')
-rw-r--r--hw/syborg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/syborg.c b/hw/syborg.c
index e54fc95274..99f9dbbdba 100644
--- a/hw/syborg.c
+++ b/hw/syborg.c
@@ -26,6 +26,7 @@
#include "boards.h"
#include "arm-misc.h"
#include "sysemu.h"
+#include "net.h"
static struct arm_boot_info syborg_binfo;
@@ -76,6 +77,19 @@ static void syborg_init(ram_addr_t ram_size,
sysbus_create_simple("syborg,serial", 0xC0008000, pic[7]);
sysbus_create_simple("syborg,serial", 0xC0009000, pic[8]);
+ if (nd_table[0].vlan) {
+ DeviceState *dev;
+ SysBusDevice *s;
+
+ qemu_check_nic_model(&nd_table[0], "virtio");
+ dev = qdev_create(NULL, "syborg,virtio-net");
+ qdev_set_netdev(dev, &nd_table[0]);
+ qdev_init(dev);
+ s = sysbus_from_qdev(dev);
+ sysbus_mmio_map(s, 0, 0xc000c000);
+ sysbus_connect_irq(s, 0, pic[9]);
+ }
+
syborg_binfo.ram_size = ram_size;
syborg_binfo.kernel_filename = kernel_filename;
syborg_binfo.kernel_cmdline = kernel_cmdline;