qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] hw/loongarch: Add virtio-mmio bus support


From: gaosong
Subject: Re: [PATCH v3] hw/loongarch: Add virtio-mmio bus support
Date: Thu, 14 Sep 2023 16:49:23 +0800
User-agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

在 2023/9/11 下午4:59, Tianrui Zhao 写道:
+static void fdt_add_virtio_mmio_node(LoongArchMachineState *lams)
+{
+    int i;
+    MachineState *ms = MACHINE(lams);
+
+    for (i = VIRT_VIRTIO_MMIO_NUM - 1; i >= 0; i--) {
+        char *nodename;
+        hwaddr base = VIRT_VIRTIO_MMIO_BASE + i * VIRT_VIRTIO_MMIO_SIZE;
+
+        nodename = g_strdup_printf("/virtio_mmio@%" PRIx64, base);
+        qemu_fdt_add_subnode(ms->fdt, nodename);
+        qemu_fdt_setprop_string(ms->fdt, nodename,
+                                "compatible", "virtio,mmio");
+        qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",
+                                     2, base, 2, VIRT_VIRTIO_MMIO_SIZE);
Missing node interrupts.

Thanks.
Song Gao

+        g_free(nodename);
+    }
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]