1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

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>
This commit is contained in:
Idan Horowitz 2021-04-15 19:22:02 +10:00 committed by Andreas Kling
parent 42b1eb5af1
commit ecfa7cb824
8 changed files with 35 additions and 18 deletions

View file

@ -59,8 +59,8 @@ private:
virtual bool handle_device_config_change() override;
virtual String device_name() const override { return String::formatted("hvc{}", minor()); }
VirtIOQueue* m_receive_queue { nullptr };
VirtIOQueue* m_send_queue { nullptr };
OwnPtr<Region> m_receive_region;
OwnPtr<Region> m_transmit_region;
};
}