aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/boot/boot.hpp3
-rw-r--r--arch/x86_64/include/x86_64/vga/crtc.hpp4
-rw-r--r--arch/x86_64/include/x86_64/vga/text.hpp28
3 files changed, 24 insertions, 11 deletions
diff --git a/arch/x86_64/include/x86_64/boot/boot.hpp b/arch/x86_64/include/x86_64/boot/boot.hpp
index 86f8ce3..3a3620d 100644
--- a/arch/x86_64/include/x86_64/boot/boot.hpp
+++ b/arch/x86_64/include/x86_64/boot/boot.hpp
@@ -2,6 +2,7 @@
#define TEACHOS_X86_64_BOOT_BOOT_H
#ifdef __ASSEMBLER__
+/* clang-format off */
/**
* @brief The number of huge pages to map during bootstrap.
*/
@@ -41,7 +42,7 @@
* @brief The "L" bit in a GDT entry.
*/
#define GDT_LONG_MODE (1 << 53)
-
+/* clang-format on */
#else
#include <multiboot2/information.hpp>
diff --git a/arch/x86_64/include/x86_64/vga/crtc.hpp b/arch/x86_64/include/x86_64/vga/crtc.hpp
index e5ab9f1..be72ac4 100644
--- a/arch/x86_64/include/x86_64/vga/crtc.hpp
+++ b/arch/x86_64/include/x86_64/vga/crtc.hpp
@@ -22,12 +22,12 @@ namespace teachos::vga::x86_64::crtc
/**
* @brief The address of the Cursor Start register of the CRTC.
*/
- [[maybe_unused]] auto constexpr cursor_start = std::byte{0x0a};
+ [[maybe_unused]] constexpr auto cursor_start = std::byte{0x0a};
/**
* @brief The address of the Cursor End register of the CRTC.
*/
- [[maybe_unused]] auto constexpr cursor_end = std::byte{0x0b};
+ [[maybe_unused]] constexpr auto cursor_end = std::byte{0x0b};
} // namespace registers
} // namespace teachos::vga::x86_64::crtc
diff --git a/arch/x86_64/include/x86_64/vga/text.hpp b/arch/x86_64/include/x86_64/vga/text.hpp
index c193576..858350f 100644
--- a/arch/x86_64/include/x86_64/vga/text.hpp
+++ b/arch/x86_64/include/x86_64/vga/text.hpp
@@ -68,25 +68,25 @@ namespace teachos::vga::x86_64::text
/**
* @brief Make the affected cell display with a gray foreground and black background.
*/
- [[maybe_unused]] auto constexpr gray_on_black =
+ [[maybe_unused]] constexpr auto gray_on_black =
attribute{color::gray, foreground_flag::none, color::black, background_flag::none};
/**
* @brief Make the affected cell display with a green foreground and black background.
*/
- [[maybe_unused]] auto constexpr green_on_black =
+ [[maybe_unused]] constexpr auto green_on_black =
attribute{color::green, foreground_flag::none, color::black, background_flag::none};
/**
* @brief Make the affected cell display with a green foreground and black background.
*/
- [[maybe_unused]] auto constexpr red_on_black =
+ [[maybe_unused]] constexpr auto red_on_black =
attribute{color::red, foreground_flag::none, color::black, background_flag::none};
/**
* @brief Make the affected cell display with a white (gray + intense) foreground and red background.
*/
- [[maybe_unused]] auto constexpr white_on_red =
+ [[maybe_unused]] constexpr auto white_on_red =
attribute{color::gray, foreground_flag::intense, color::red, background_flag::none};
} // namespace common_attributes
@@ -108,10 +108,22 @@ namespace teachos::vga::x86_64::text
*/
auto cursor(bool enabled) -> void;
- auto write(std::string_view text) -> void override { write(text, common_attributes::green_on_black); }
- auto writeln(std::string_view text) -> void override { writeln(text, common_attributes::green_on_black); }
- auto write_error(std::string_view text) -> void override { write(text, common_attributes::red_on_black); }
- auto writeln_error(std::string_view text) -> void override { writeln(text, common_attributes::red_on_black); }
+ auto write(std::string_view text) -> void override
+ {
+ write(text, common_attributes::green_on_black);
+ }
+ auto writeln(std::string_view text) -> void override
+ {
+ writeln(text, common_attributes::green_on_black);
+ }
+ auto write_error(std::string_view text) -> void override
+ {
+ write(text, common_attributes::red_on_black);
+ }
+ auto writeln_error(std::string_view text) -> void override
+ {
+ writeln(text, common_attributes::red_on_black);
+ }
private:
/**