18 Commits

Author SHA1 Message Date
Cody Wong
2b02c8a046 [virtio][v9p] Add the VirtIO 9p device driver
This commit adds the VirtIO 9p device driver based on the VirtIO driver
stack in LK, `dev/virtio`. The driver supports a subset of 9P2000.L
protocol (https://github.com/chaos/diod/blob/master/protocol.md), which
is able to perform basic file operations (fread, fwrite, dirread, etc.).
The primary interface for sending and receiving the 9p messages is
`virtio_9p_rpc`, which is handy and scalable.

The driver is limited to communicate to the host with only one
outstanding 9p message per device due to the simplified driver design.
Basically that is enough for embedded environments when there is no
massive file IO.

Signed-off-by: Cody Wong <codycswong@google.com>
2024-04-01 23:09:30 -07:00
Travis Geiselbrecht
3288b15a39 [dev][virtio-net] sync feature bits with virtio v1.3
Add new feature bits for the net device
Since the new feature bits are >= 32, add support for reading higher
than 32bit feature words from the virtio mmio interface.
2024-03-20 00:26:58 -07:00
Alex Richardson
99bf8f9c41 [clang] Fix -Wformat warnings
Use %hx for uint16_t instead of %hhx.
2023-04-23 17:23:31 -07:00
Travis Geiselbrecht
914c9c2a2f [dev][virtio-blk] update to newer version of the device
Nothing fundamentally changed, just update to new feature bits and print
them at device detection time.
Try to negotiate the guest feature set as well, though nothing
fundamentally changes at this time.
2022-04-26 00:40:03 -07:00
Travis Geiselbrecht
fcb65c9a88 [dev/lib][warnings] fix -Wmissing-declarations warnings in dev/ and lib/ 2021-10-21 23:16:20 -07:00
Travis Geiselbrecht
0ec24d0b29 [dev][virtio] add no kernel VM workaround
Also add stride to the mmio detect routine. Not all virtio apertures are
tightly packed as they are on arm.
2020-01-19 16:15:58 -08:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
a4ca0a6e00 [vmm] move most users of arch_mmu_query directly to vaddr_to_paddr() 2016-02-14 12:45:53 -08:00
Travis Geiselbrecht
555f16c5c7 [dev][virtio][gpu] add default implementation of virtio-gpu driver
Exports a simple single buffered framebuffer.
2015-10-07 15:44:00 -07:00
Travis Geiselbrecht
ba3d7ce316 [dev][virtio] remove arm specific header 2015-09-11 17:41:29 -07:00
Travis Geiselbrecht
193a57d5d5 [dev][virtio][net] add working implementation of a virtio network interface
-Not optimized yet, but should be pretty complete. Tested against qemu.
-Add switches to qemu script to allow running with a tap interface.
-Enable minip by default on vexpress-a9 platform
2015-09-09 15:41:32 -07:00
Travis Geiselbrecht
e0bca35bd3 [dev][virtio] handle multiple rings (up to 4 currently) per device 2015-09-08 17:59:10 -07:00
Travis Geiselbrecht
579b3314e7 [virtio][block] get the virtio block device driver fully working
Wire up to the bio layer properly.
2015-09-08 16:15:01 -07:00
Travis Geiselbrecht
b1ccb192cf [dev][virtio] update memory allocations to match VM alignment api 2014-08-18 14:56:43 -07:00
Travis Geiselbrecht
3b3ca0e27a [dev][virtio] patch up to work in the post-vm world
Need to translate virtual to physical in a few places
2014-07-24 01:55:05 -07:00
Travis Geiselbrecht
8cdf762391 [dev][virtio] initial stab at getting a generic virtio layer with block device support 2014-07-21 00:43:41 -07:00