
From: Simon Glass <sjg@chromium.org> The current implementation of virtio in sandbox is fairly basic. It is enough to test the behaviour of queues, but it does not test the full stack, e.g. using MMIO to access a block device. This series adds a new type of virtio emulator which is capable of handling MMIO. Some support for MMIO is added to sandbox in the process. With this, a dummy block device can be used from within U-Boot, without running on QEMU Simon Glass (11): mbed: Remove check_files.py test: Unset make variables before running make again dm: Move UCLASS_FFA_EMUL into the correct place alist: Allow inclusion from OS headers sandbox: Move memory-related functions to a separate file sandbox: Support memory-mapped I/O virtio: Move bindings for virtio IDs to dt-bindings virtio: Export a few things from virtio_mmio.c virtio: Implement a proper sandbox emulator virtio: Implement a simple block-device emulator sandbox: Enable the new virtio emulator arch/Kconfig | 1 + arch/sandbox/cpu/Makefile | 2 +- arch/sandbox/cpu/cpu.c | 274 +-------- arch/sandbox/cpu/mem.c | 337 +++++++++++ arch/sandbox/cpu/state.c | 2 + arch/sandbox/dts/test.dts | 13 +- arch/sandbox/include/asm/io.h | 15 + arch/sandbox/include/asm/state.h | 67 +++ configs/sandbox_defconfig | 1 + configs/tools-only_defconfig | 2 +- drivers/virtio/Kconfig | 8 + drivers/virtio/Makefile | 1 + drivers/virtio/emul_blk.c | 153 +++++ drivers/virtio/sandbox_emul.c | 313 ++++++++++ drivers/virtio/sandbox_emul.h | 110 ++++ drivers/virtio/virtio_blk.h | 3 + drivers/virtio/virtio_internal.h | 19 + drivers/virtio/virtio_mmio.c | 7 +- include/alist.h | 16 +- include/dm/uclass-id.h | 3 +- include/dt-bindings/virtio.h | 19 + include/virtio.h | 5 +- lib/alist.c | 1 + .../mbedtls/tests/scripts/check_files.py | 537 ------------------ test/run | 3 + 25 files changed, 1085 insertions(+), 827 deletions(-) create mode 100644 arch/sandbox/cpu/mem.c create mode 100644 drivers/virtio/emul_blk.c create mode 100644 drivers/virtio/sandbox_emul.c create mode 100644 drivers/virtio/sandbox_emul.h create mode 100644 drivers/virtio/virtio_internal.h create mode 100644 include/dt-bindings/virtio.h delete mode 100755 lib/mbedtls/external/mbedtls/tests/scripts/check_files.py -- 2.43.0 base-commit: f737237d29a57cc7fe16c6e4b5e67e0df57d87f3 branch: qemd