mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
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>
This commit is contained in:
parent
62303d46d1
commit
ea4c9efbb9
4 changed files with 191 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue