aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/vga/text
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-01-16 13:36:38 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-01-16 13:36:38 +0100
commit7d6f0ed063790042a808f4bf07c50d308b3f2de4 (patch)
tree1a2e1c4ed7e2f3d8e6cdcfb012e554d1a4eb1e5a /arch/x86_64/src/vga/text
parent9750405757396d006ab6992fb93baf414b3e2ae8 (diff)
downloadteachos-7d6f0ed063790042a808f4bf07c50d308b3f2de4.tar.xz
teachos-7d6f0ed063790042a808f4bf07c50d308b3f2de4.zip
chore: restructure namespaces
Diffstat (limited to 'arch/x86_64/src/vga/text')
-rw-r--r--arch/x86_64/src/vga/text/buffer.cpp8
-rw-r--r--arch/x86_64/src/vga/text/device.cpp24
2 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86_64/src/vga/text/buffer.cpp b/arch/x86_64/src/vga/text/buffer.cpp
index 2dcf084..7112573 100644
--- a/arch/x86_64/src/vga/text/buffer.cpp
+++ b/arch/x86_64/src/vga/text/buffer.cpp
@@ -1,6 +1,6 @@
-#include "x86_64/vga/text/buffer.hpp"
+#include "arch/vga/text/buffer.hpp"
-#include "x86_64/vga/text/attribute.hpp"
+#include "arch/vga/text/attribute.hpp"
#include <algorithm>
#include <bit>
@@ -9,7 +9,7 @@
#include <string_view>
#include <utility>
-namespace teachos::vga::x86_64::text
+namespace arch::vga::text
{
buffer::buffer(std::size_t width, std::size_t height, cell * start, std::size_t position)
: m_width{width}
@@ -98,4 +98,4 @@ namespace teachos::vga::x86_64::text
m_buffer[m_position++] = std::pair{code_point, std::bit_cast<std::byte>(attribute)};
}
-} // namespace teachos::vga::x86_64::text
+} // namespace arch::vga::text
diff --git a/arch/x86_64/src/vga/text/device.cpp b/arch/x86_64/src/vga/text/device.cpp
index 2da9e06..dcacd8c 100644
--- a/arch/x86_64/src/vga/text/device.cpp
+++ b/arch/x86_64/src/vga/text/device.cpp
@@ -1,16 +1,16 @@
#include "kapi/cio.hpp"
-#include "x86_64/boot/boot.hpp"
-#include "x86_64/boot/ld.hpp"
-#include "x86_64/vga/crtc.hpp"
-#include "x86_64/vga/text.hpp"
+#include "arch/boot/boot.hpp"
+#include "arch/boot/ld.hpp"
+#include "arch/vga/crtc.hpp"
+#include "arch/vga/text.hpp"
#include <bit>
#include <cstddef>
#include <cstdint>
#include <string_view>
-namespace teachos::vga::x86_64::text
+namespace arch::vga::text
{
namespace
{
@@ -22,10 +22,10 @@ namespace teachos::vga::x86_64::text
} // namespace
device::device()
- : m_buffer{default_buffer_width, default_buffer_height,
- std::bit_cast<buffer::cell *>(default_buffer_address +
- std::bit_cast<std::uintptr_t>(&teachos::boot::x86_64::TEACHOS_VMA)),
- boot::bootstrap_information.vga_buffer_index}
+ : m_buffer{
+ default_buffer_width, default_buffer_height,
+ std::bit_cast<buffer::cell *>(default_buffer_address + std::bit_cast<std::uintptr_t>(&boot::TEACHOS_VMA)),
+ kapi::boot::bootstrap_information.vga_buffer_index}
{
clear();
}
@@ -43,12 +43,12 @@ namespace teachos::vga::x86_64::text
crtc::data::write(crtc::data::read() | cursor_disable_byte);
}
- auto device::write(cio::output_stream stream, std::string_view text) -> void
+ auto device::write(kapi::cio::output_stream stream, std::string_view text) -> void
{
auto attributes = [&] -> attribute {
switch (stream)
{
- case cio::output_stream::stderr:
+ case kapi::cio::output_stream::stderr:
return red_on_black;
default:
return green_on_black;
@@ -57,4 +57,4 @@ namespace teachos::vga::x86_64::text
m_buffer.write(text, attributes);
}
-} // namespace teachos::vga::x86_64::text
+} // namespace arch::vga::text