aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-23 15:08:10 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-23 15:08:10 +0000
commit4c97a4e1e2055ce63a0d16d1e5be880792a5e7eb (patch)
treefbd18e0d2ef48554b3063f438c265a0123fa776b /arch
parent97fe123c2d5bd0c49e8d360a989fcee8971c61ba (diff)
downloadteachos-4c97a4e1e2055ce63a0d16d1e5be880792a5e7eb.tar.xz
teachos-4c97a4e1e2055ce63a0d16d1e5be880792a5e7eb.zip
Replace uint64_t with size_t
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/include/arch/memory/paging/virtual_page.hpp4
-rw-r--r--arch/x86_64/src/memory/paging/virtual_page.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/include/arch/memory/paging/virtual_page.hpp b/arch/x86_64/include/arch/memory/paging/virtual_page.hpp
index 79801ee..f01073d 100644
--- a/arch/x86_64/include/arch/memory/paging/virtual_page.hpp
+++ b/arch/x86_64/include/arch/memory/paging/virtual_page.hpp
@@ -35,7 +35,7 @@ namespace teachos::arch::memory::paging
*
* @return Start address of the virtual page.
*/
- auto start_address() const -> uint64_t;
+ auto start_address() const -> size_t;
/**
* @brief Calculates the index into the page table with the given level, which leads to this virtual page.
@@ -43,7 +43,7 @@ namespace teachos::arch::memory::paging
* @param level Level of the page table we want to calculate the index for.
* @return Index into the page table with the given level.
*/
- auto get_level_index(page_table_handle::level level) const -> uint64_t;
+ auto get_level_index(page_table_handle::level level) const -> size_t;
/**
* @brief Defaulted equals operator.
diff --git a/arch/x86_64/src/memory/paging/virtual_page.cpp b/arch/x86_64/src/memory/paging/virtual_page.cpp
index fd2085b..91f63b4 100644
--- a/arch/x86_64/src/memory/paging/virtual_page.cpp
+++ b/arch/x86_64/src/memory/paging/virtual_page.cpp
@@ -17,9 +17,9 @@ namespace teachos::arch::memory::paging
return virtual_page{virtual_address / allocator::PAGE_FRAME_SIZE};
}
- auto virtual_page::start_address() const -> uint64_t { return page_number * allocator::PAGE_FRAME_SIZE; }
+ auto virtual_page::start_address() const -> size_t { return page_number * allocator::PAGE_FRAME_SIZE; }
- auto virtual_page::get_level_index(page_table_handle::level level) const -> uint64_t
+ auto virtual_page::get_level_index(page_table_handle::level level) const -> size_t
{
return (start_address() >> (level * 9U)) & 0x1FF;
}