diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 12:19:16 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 12:19:16 +0000 |
| commit | d86af47f0b62cb3ae302fb292747944620542db1 (patch) | |
| tree | e479716344d116ca191be73cc3031f11fb43193f /arch/x86_64/src/memory/paging | |
| parent | 6eec9c34a83fc5c0d93bc485c2ee0252824c2201 (diff) | |
| download | teachos-d86af47f0b62cb3ae302fb292747944620542db1.tar.xz teachos-d86af47f0b62cb3ae302fb292747944620542db1.zip | |
Attempt to fix initalize_page_tables, crashes on n = 1, m = 507
Diffstat (limited to 'arch/x86_64/src/memory/paging')
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_table.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/paging/page_table.cpp b/arch/x86_64/src/memory/paging/page_table.cpp index c9b4a37..93cc0de 100644 --- a/arch/x86_64/src/memory/paging/page_table.cpp +++ b/arch/x86_64/src/memory/paging/page_table.cpp @@ -118,7 +118,7 @@ namespace teachos::arch::memory::paging std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); for (size_t m = 1; m <= PAGE_TABLE_ENTRY_COUNT; ++m) { - size_t offset = sizeof(page_table) * (n + m); + size_t offset = sizeof(page_table) * ((PAGE_TABLE_ENTRY_COUNT * n) + m); std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); } } |
