diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-01-02 19:56:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-17 10:21:23 +0200 |
commit | ea4c9efbb984e9b2a3e27c98fb53342ec0e60ca8 (patch) | |
tree | d17a96a3c6c3ed91f03e46d7399818674d79c744 /Kernel/VirtIO/VirtIO.cpp | |
parent | 62303d46d1c3ecf097e177f68f0a7c5094426f45 (diff) | |
download | serenity-ea4c9efbb984e9b2a3e27c98fb53342ec0e60ca8.zip |
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>
Diffstat (limited to 'Kernel/VirtIO/VirtIO.cpp')
-rw-r--r-- | Kernel/VirtIO/VirtIO.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/VirtIO/VirtIO.cpp b/Kernel/VirtIO/VirtIO.cpp index 637b079658..aebd3740af 100644 --- a/Kernel/VirtIO/VirtIO.cpp +++ b/Kernel/VirtIO/VirtIO.cpp @@ -25,6 +25,7 @@ */ #include <Kernel/VirtIO/VirtIO.h> +#include <Kernel/VirtIO/VirtIOConsole.h> namespace Kernel { @@ -35,6 +36,11 @@ void VirtIO::detect() return; if (id.vendor_id != VIRTIO_PCI_VENDOR_ID) return; + switch (id.device_id) { + case VIRTIO_CONSOLE_PCI_DEVICE_ID: + [[maybe_unused]] auto& unused = adopt(*new VirtIOConsole(address)).leak_ref(); + break; + } }); } |