--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/56DC49AD.2050102%40xfguo.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAGge8_ONd2bLb5SkkDM_tkQFeZVCkOBEBjy5P5YwyfxXkMng8g%40mail.gmail.com.
The best way to get ethernet working in qemu is to use virtio. We used to just
hard-code everything, with a call like
sysbus_create_simple("virtio-mmio", 0x400, env->irq[1]);
in the RISC-V QEMU board emulation file (qemu/hw/riscv/riscv_board.c) and an
option like
CONFIG_CMDLINE="virtio_mmio.device=0x200@0x400:1"
in linux/.config. This approach should still work, but the right way to fix
this is to present a the virtio device as part of the device tree (or whatever
Andrew is calling his replacement) that QEMU exposes to Linux, which doesn't
require hard-coding all these offsets.
On Fri, 11 Mar 2016 22:50:34 PST (-0800), xf...@xfguo.org wrote:
The another way to use the Ethernet in qemu is to implement a HTIF ethernet device and its driver both in qemu and riscv-linux, right? - Alex On 2016年03月07日 08:41, Sagar Karandikar wrote:
The new version of riscv-qemu doesn't have the --disable-riscv-htif flag, since only htif devices have been tested at this point. To enable virtio, you’ll need to add a line to riscv_board.c in hw/riscv in QEMU [1] and then make some modifications to riscv-linux (which I haven’t worked out yet). -Sagar [1]