Kernel/Graphics: Untie Text mode console from VGACompatibleAdapter class

Instead, we can construct this type of object without having to
instantiate a VGACompatibleAdapter object first.
This can help instantiate such console very early on boot to aid debug
issues on bare metal hardware.
This commit is contained in:
Liav A 2022-02-09 20:53:17 +02:00 committed by Linus Groh
commit 90a194377c
Notes: sideshowbarker 2024-07-17 19:05:18 +09:00
5 changed files with 10 additions and 12 deletions

View file

@ -14,7 +14,7 @@
namespace Kernel::Graphics {
class TextModeConsole final : public VGAConsole {
public:
static NonnullRefPtr<TextModeConsole> initialize(const VGACompatibleAdapter& adapter);
static NonnullRefPtr<TextModeConsole> initialize();
virtual size_t chars_per_line() const override { return width(); };
virtual bool has_hardware_cursor() const override { return true; }
@ -36,7 +36,7 @@ public:
private:
void clear_vga_row(u16 row);
explicit TextModeConsole(const VGACompatibleAdapter&);
TextModeConsole();
mutable Spinlock m_vga_lock;