aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-10-29 17:01:22 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-10-29 17:01:22 +0100
commit7b9df8bec5038e0316540d2397df632fb14c9169 (patch)
tree3b5959510cbfd336479b97413427a35972e6e305 /arch/x86_64/src/kapi
parentb157e2c472d8bd67ac1656404a6a6ee821260f4b (diff)
downloadteachos-7b9df8bec5038e0316540d2397df632fb14c9169.tar.xz
teachos-7b9df8bec5038e0316540d2397df632fb14c9169.zip
chore: configure clang-tidy
Diffstat (limited to 'arch/x86_64/src/kapi')
-rw-r--r--arch/x86_64/src/kapi/cio.cpp1
-rw-r--r--arch/x86_64/src/kapi/memory.cpp14
2 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86_64/src/kapi/cio.cpp b/arch/x86_64/src/kapi/cio.cpp
index eb0142a..456477a 100644
--- a/arch/x86_64/src/kapi/cio.cpp
+++ b/arch/x86_64/src/kapi/cio.cpp
@@ -5,6 +5,7 @@
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
diff --git a/arch/x86_64/src/kapi/memory.cpp b/arch/x86_64/src/kapi/memory.cpp
index 61d462f..e05fde9 100644
--- a/arch/x86_64/src/kapi/memory.cpp
+++ b/arch/x86_64/src/kapi/memory.cpp
@@ -19,19 +19,23 @@ namespace teachos::memory
namespace
{
+ // NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables)
auto constinit is_initialized = std::atomic_flag{};
auto constinit allocator = static_cast<frame_allocator *>(nullptr);
+ // NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables)
auto create_memory_information() -> x86_64::region_allocator::memory_information
{
auto const & mbi = boot::x86_64::multiboot_information_pointer.get();
auto map = mbi->memory_map();
- return {std::make_pair(physical_address{&boot::x86_64::_start_physical},
- physical_address{&boot::x86_64::_end_physical}),
- std::make_pair(physical_address{std::bit_cast<std::byte *>(mbi)},
- physical_address{std::bit_cast<std::byte *>(mbi) + mbi->size_bytes()}),
- map};
+ // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic)
+ return {.image_range = std::make_pair(physical_address{&boot::x86_64::_start_physical},
+ physical_address{&boot::x86_64::_end_physical}),
+ .mbi_range = std::make_pair(physical_address{std::bit_cast<std::byte *>(mbi)},
+ physical_address{std::bit_cast<std::byte *>(mbi) + mbi->size_bytes()}),
+ .memory_map = map};
+ // NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic)
};
auto create_early_frame_allocator()