Kernel: Add ubsan

My brain has been melting since I'm getting very random bugs.
I hope I can debug them better with ubsan :)
This commit is contained in:
Bananymous
2023-03-06 23:38:05 +02:00
parent e480f9c195
commit 06db890d49
8 changed files with 128 additions and 12 deletions

View File

@@ -47,9 +47,9 @@ MMU::MMU()
m_highest_paging_struct[i] = (uint64_t)page_directory | Flags::Present;
}
// create and identity map first 4 MiB
// create and identity map first 6 MiB
uint64_t* page_directory1 = (uint64_t*)(m_highest_paging_struct[0] & PAGE_MASK);
for (uint64_t i = 0; i < 2; i++)
for (uint64_t i = 0; i < 3; i++)
{
uint64_t* page_table = allocate_page_aligned_page();
for (uint64_t j = 0; j < 512; j++)

View File

@@ -118,9 +118,10 @@ enable_sse:
ret
initialize_paging:
# identity map first 4 MiB
# identity map first 6 MiB
movl $(0x00000000 + 0x83), boot_page_directory1 + 0
movl $(0x00200000 + 0x83), boot_page_directory1 + 8
movl $(0x00400000 + 0x83), boot_page_directory1 + 16
movl $(boot_page_directory1 + 0x01), boot_page_directory_pointer_table
# enable PAE