diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-07 17:15:28 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-07 17:17:15 +0530 |
commit | cca4e987ec30229a77a7cd4bf27c9d6670ad79db (patch) | |
tree | 1747ef03b987221e2c655f0fc42e1161a0e8958d /kernel/mm | |
parent | d19eaaef708a51d1ac6a89a86c14745ad948e6c8 (diff) |
IDT: Initialize IDT with a very basic exception handler that does nothing
Diffstat (limited to 'kernel/mm')
-rw-r--r-- | kernel/mm/virtual_mm/virtual_mm.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/mm/virtual_mm/virtual_mm.cc b/kernel/mm/virtual_mm/virtual_mm.cc index 3ba0735..e1bef9d 100644 --- a/kernel/mm/virtual_mm/virtual_mm.cc +++ b/kernel/mm/virtual_mm/virtual_mm.cc @@ -50,7 +50,7 @@ get_page_directory(void) ALWAYS_INLINE void load_page_directory(uint32_t *page_directory) { - __asm__("movl %0, %%cr3" ::"r"(page_directory)); + __asm__ volatile("movl %0, %%cr3" ::"r"(page_directory)); } bool @@ -67,10 +67,10 @@ switch_page_directory(uint32_t *page_directory) ALWAYS_INLINE static void enable_paging(void) { - __asm__("movl %%cr0, %%eax;" - "orl $0x80000000, %%eax;" - "movl %%eax, %%cr0" :: - : "eax"); + __asm__ volatile("movl %%cr0, %%eax;" + "orl $0x80000000, %%eax;" + "movl %%eax, %%cr0" :: + : "eax"); } void |