Commit Graph

5 Commits

Author SHA1 Message Date
Idan Horowitz
ecfa7cb824 Kernel: Implement a naive version of virtconsole by memcpying to physical page
This patch allocates a physical page for each of the virtqueues and
memcpys to it when receiving a buffer to get a physical, aligned
contiguous buffer as required by the virtio specification.

Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17 10:21:23 +02:00
Idan Horowitz
42b1eb5af1 Kernel: Activate queues and enable interrutps in VirtIODevices
This patch actually enables virtio queues after configuring them
so the device can use them, it also enables interrupt handling in
VirtIODevice so they are not ignored.

Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17 10:21:23 +02:00
Idan Horowitz
4a467c553a Kernel: Modernize use of pointers in VirtIO
Raw pointers were mostly replaced with smart pointers and references
where appropriate based on kling and smartcomputer7's suggestions :)

Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17 10:21:23 +02:00
Idan Horowitz
ea4c9efbb9 Kernel: Add base support for VirtConsole (VirtIO based consoles)
Based on pull #3236 by tomuta, this is still very much WIP but will
eventually allow us to switch from the considerably slower method of
knocking on port 0xe9 for each character

Co-authored-by: Tom <tomut@yahoo.com>
Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17 10:21:23 +02:00
Idan Horowitz
62303d46d1 Kernel: Add base support for VirtIO devices
Based on pull #3236 by tomuta, this adds helper methods for generic
device initialization, and partily-broken virtqueue helper methods

Co-authored-by: Tom <tomut@yahoo.com>
Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17 10:21:23 +02:00