Lines Matching +full:qemu +full:- +full:x86

1 # SPDX-License-Identifier: GPL-2.0+
8 This document describes the information about U-Boot support for VirtIO [1]
12 --------------
17 paravirtualization. In the U-Boot case, the guest is U-Boot itself, while the
18 virtual environment are normally QEMU [2] targets like ARM, RISC-V and x86.
21 ------
23 spec. While VirtIO devices are commonly implemented as PCI devices on x86,
24 embedded devices models like ARM/RISC-V, which does not normally come with
29 and PCI transport options are supported in U-Boot.
34 The following QEMU targets are supported.
36 - qemu_arm_defconfig
37 - qemu_arm64_defconfig
38 - qemu-riscv32_defconfig
39 - qemu-riscv64_defconfig
40 - qemu-x86_defconfig
41 - qemu-x86_64_defconfig
43 Note ARM and RISC-V targets are configured with VirtIO MMIO transport driver,
44 and on x86 it's the PCI transport driver.
47 ------------------
48 Building U-Boot for pre-configured QEMU targets is no different from others.
55 You can even create a QEMU ARM target with VirtIO devices showing up on both
59 Device Drivers --->
61 VirtIO Drivers --->
68 ------------
69 It is required that QEMU v2.5.0+ should be used to test U-Boot VirtIO support
70 on QEMU ARM and x86, and v2.12.0+ on QEMU RISC-V.
73 -------
74 The following QEMU command line is used to get U-Boot up and running with
77 $ qemu-system-arm -nographic -machine virt -bios u-boot.bin \
78 -netdev tap,ifname=tap0,id=net0 \
79 -device virtio-net-device,netdev=net0 \
80 -drive if=none,file=test.img,format=raw,id=hd0 \
81 -device virtio-blk-device,drive=hd0
83 On x86, command is slightly different to create PCI VirtIO devices.
85 $ qemu-system-i386 -nographic -bios u-boot.rom \
86 -netdev tap,ifname=tap0,id=net0 \
87 -device virtio-net-pci,netdev=net0 \
88 -drive if=none,file=test.img,format=raw,id=hd0 \
89 -device virtio-blk-pci,drive=hd0
91 Additional net and block devices can be created by appending more '-device'
96 $ qemu-system-arm -nographic -machine virt -bios u-boot.bin \
97 -netdev tap,ifname=tap0,id=net0 \
98 -device virtio-net-pci,netdev=net0 \
99 -drive if=none,file=test0.img,format=raw,id=hd0 \
100 -device virtio-blk-device,drive=hd0 \
101 -drive if=none,file=test1.img,format=raw,id=hd1 \
102 -device virtio-blk-pci,drive=hd1
104 By default QEMU creates VirtIO legacy devices by default. To create non-legacy
107 $ qemu-system-i386 -nographic -bios u-boot.rom \
108 -netdev tap,ifname=tap0,id=net0 \
109 -device virtio-net-pci,netdev=net0,disable-legacy=true,disable-modern=false \
110 -drive if=none,file=test.img,format=raw,id=hd0 \
111 -device virtio-blk-pci,drive=hd0,disable-legacy=true,disable-modern=false
113 A 'virtio' command is provided in U-Boot shell.
116 virtio - virtio block devices sub-system
119 virtio scan - initialize virtio bus
120 virtio info - show all available virtio block devices
121 virtio device [dev] - show or set current virtio block device
122 virtio part [dev] - print partition table of one or all virtio block devices
123 virtio read addr blk# cnt - read `cnt' blocks starting at block
125 virtio write addr blk# cnt - write `cnt' blocks starting at block
135 Device 0: QEMU VirtIO Block Device
167 ----------------
170 +---------------------------------------+
172 | +-------------+ +------------+ |
173 | | virtio-net | | virtio-blk | |
174 | +-------------+ +------------+ |
175 +---------------------------------------+
176 +---------------------------------------+
178 | +-------------+ +------------+ |
179 | | virtio-mmio | | virtio-pci | |
180 | +-------------+ +------------+ |
181 +---------------------------------------+
182 +----------------------+
184 +----------------------+
186 The root one is the virtio uclass driver (virtio-uclass.c), which does lots of
220 ----------------
231 #define VIRTIO_XXX_DRV_NAME "virtio-xxx"
251 ----------
252 [1] http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.pdf
253 [2] https://www.qemu.org