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/memory/region_allocator.hpp8
-rw-r--r--arch/x86_64/include/x86_64/vga/crtc.hpp4
-rw-r--r--arch/x86_64/include/x86_64/vga/text.hpp26
3 files changed, 23 insertions, 15 deletions
diff --git a/arch/x86_64/include/x86_64/memory/region_allocator.hpp b/arch/x86_64/include/x86_64/memory/region_allocator.hpp
index 913b0bb..4a18a0f 100644
--- a/arch/x86_64/include/x86_64/memory/region_allocator.hpp
+++ b/arch/x86_64/include/x86_64/memory/region_allocator.hpp
@@ -66,10 +66,10 @@ namespace teachos::memory::x86_64
frame m_next_frame; ///< The physical_frame after the last allocated one.
std::optional<multiboot2::memory_map::region> m_current_region; ///< The memory region currently allocated from
multiboot2::memory_map m_memory_map; ///< The boot loader supplied memory map.
- frame const m_kernel_start; ///< The start address of the kernel code in memory.
- frame const m_kernel_end; ///< The end address of the kernel code in memory.
- frame const m_multiboot_start; ///< The start address of the multiboot code in memory.
- frame const m_multiboot_end; ///< The end address of the multiboot code in memory.
+ frame m_kernel_start; ///< The start address of the kernel code in memory.
+ frame m_kernel_end; ///< The end address of the kernel code in memory.
+ frame m_multiboot_start; ///< The start address of the multiboot code in memory.
+ frame m_multiboot_end; ///< The end address of the multiboot code in memory.
};
} // namespace teachos::memory::x86_64
diff --git a/arch/x86_64/include/x86_64/vga/crtc.hpp b/arch/x86_64/include/x86_64/vga/crtc.hpp
index be72ac4..8bdc12d 100644
--- a/arch/x86_64/include/x86_64/vga/crtc.hpp
+++ b/arch/x86_64/include/x86_64/vga/crtc.hpp
@@ -10,12 +10,12 @@ namespace teachos::vga::x86_64::crtc
/**
* @brief The address port of the CRT Controller.
*/
- using address = io::x86_64::port<0x3d4, 1>;
+ using address = io::x86_64::port<0x3d4, 1>; // NOLINT(cppcoreguidelines-avoid-magic-numbers)
/**
* @brief The data port of the CRT Controller.
*/
- using data = io::x86_64::port<0x3d5, 1>;
+ using data = io::x86_64::port<0x3d5, 1>; // NOLINT(cppcoreguidelines-avoid-magic-numbers)
namespace registers
{
diff --git a/arch/x86_64/include/x86_64/vga/text.hpp b/arch/x86_64/include/x86_64/vga/text.hpp
index 858350f..d8919bf 100644
--- a/arch/x86_64/include/x86_64/vga/text.hpp
+++ b/arch/x86_64/include/x86_64/vga/text.hpp
@@ -54,7 +54,7 @@ namespace teachos::vga::x86_64::text
{
color foreground_color : 3; ///< The foreground color of the cell, e.g. the color of the code point.
enum foreground_flag foreground_flag : 1; ///< The foreground color modification flag of the cell.
- color bacground_color : 3; ///< The background color of the cell.
+ color background_color : 3; ///< The background color of the cell.
enum background_flag background_flag : 1; ///< The background color modification flag of the cell.
};
@@ -68,26 +68,34 @@ namespace teachos::vga::x86_64::text
/**
* @brief Make the affected cell display with a gray foreground and black background.
*/
- [[maybe_unused]] constexpr auto gray_on_black =
- attribute{color::gray, foreground_flag::none, color::black, background_flag::none};
+ [[maybe_unused]] constexpr auto gray_on_black = attribute{.foreground_color = color::gray,
+ .foreground_flag = foreground_flag::none,
+ .background_color = color::black,
+ .background_flag = background_flag::none};
/**
* @brief Make the affected cell display with a green foreground and black background.
*/
- [[maybe_unused]] constexpr auto green_on_black =
- attribute{color::green, foreground_flag::none, color::black, background_flag::none};
+ [[maybe_unused]] constexpr auto green_on_black = attribute{.foreground_color = color::green,
+ .foreground_flag = foreground_flag::none,
+ .background_color = color::black,
+ .background_flag = background_flag::none};
/**
* @brief Make the affected cell display with a green foreground and black background.
*/
- [[maybe_unused]] constexpr auto red_on_black =
- attribute{color::red, foreground_flag::none, color::black, background_flag::none};
+ [[maybe_unused]] constexpr auto red_on_black = attribute{.foreground_color = color::red,
+ .foreground_flag = foreground_flag::none,
+ .background_color = color::black,
+ .background_flag = background_flag::none};
/**
* @brief Make the affected cell display with a white (gray + intense) foreground and red background.
*/
- [[maybe_unused]] constexpr auto white_on_red =
- attribute{color::gray, foreground_flag::intense, color::red, background_flag::none};
+ [[maybe_unused]] constexpr auto white_on_red = attribute{.foreground_color = color::gray,
+ .foreground_flag = foreground_flag::intense,
+ .background_color = color::red,
+ .background_flag = background_flag::none};
} // namespace common_attributes
struct device final : teachos::cio::output_device