tasking: continue working on page directory switching

This commit is contained in:
2025-05-31 19:43:38 +03:00
parent 33aa97c6ec
commit 9000d76441
4 changed files with 29 additions and 1 deletions
+3
View File
@@ -32,6 +32,9 @@ switchProcess:
mov esp, [edx + 4] ; esp = next_process_ptr->kesp
mov [current], edx ; current = next_process_ptr
mov eax, [edx + 40]
mov cr3, eax
pop edi
pop esi
pop ebx
+1 -1
View File
@@ -71,7 +71,7 @@ Process* task_create(uint32_t func, void** args, uint32_t arg_count, uint32_t ri
p->context->eip = (uint32_t)trapret;
p->kesp = (uint32_t)sp;
p->page_directory = kpage_dir;
p->page_directory = ring == 0 ? kpage_dir : (uint32_t*)create_page_dir();
p->next = 0;