[MULTITASKING] Processes

This commit is contained in:
2016-12-16 19:22:33 +01:00
parent 5e8fbcbb78
commit 5ca2b6994a
8 changed files with 177 additions and 8 deletions

View File

@@ -22,7 +22,10 @@ page_table *vmm_new_P4()
void vmm_set_P4(page_table *P4)
{
write_cr3((uint64_t)P4);
if(P4)
write_cr3((uint64_t)P4);
else
write_cr3(V2P(&BootP4));
}
void vmm_free_P4(page_table *P4)
@@ -145,6 +148,8 @@ registers_t *page_fault_handler(registers_t *r)
#ifndef NDEBUG
thread_t *th = get_current_thread();
(void)th;
process_t *proc = get_current_process();
(void)proc;
asm("page_fault_breakpoint:");
#endif
for(;;);