aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kapi/cio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/kapi/cio.cpp')
-rw-r--r--arch/x86_64/src/kapi/cio.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86_64/src/kapi/cio.cpp b/arch/x86_64/src/kapi/cio.cpp
new file mode 100644
index 0000000..ade02aa
--- /dev/null
+++ b/arch/x86_64/src/kapi/cio.cpp
@@ -0,0 +1,20 @@
+#include "kapi/cio.hpp"
+
+#include "x86_64/vga/text.hpp"
+
+#include <optional>
+
+namespace teachos::cio
+{
+
+ // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
+ auto static constinit vga_device = std::optional<vga::x86_64::text::device>{};
+
+ auto init() -> void
+ {
+ vga_device.emplace();
+ vga_device->cursor(false);
+ set_output_device(*vga_device);
+ }
+
+} // namespace teachos::cio