tasking: fix syscall handling, use debug_log instead of printf in some places
This commit is contained in:
+5
-15
@@ -36,7 +36,7 @@ Process* task_create(uint32_t func, uint32_t user_esp, uint32_t ring, uint32_t*
|
||||
void *kstack_physical = alloc_page();
|
||||
p->kstack = (char*)((uint32_t)kstack_physical+0xC0000000);
|
||||
map_page(kstack_physical, p->kstack, PAGE_PRESENT | PAGE_RW);
|
||||
printf("kstack: %X!!!!!!!!!!!!\n", p->kstack);
|
||||
debug_log("kstack: %X!!!!!!!!!!!!\n", p->kstack);
|
||||
uint8_t* sp = (uint8_t*)(p->kstack + KSTACKSIZE);
|
||||
|
||||
|
||||
@@ -147,22 +147,12 @@ void scheduler_init()
|
||||
uint32_t* kernel_tasks_pagedir = (uint32_t*)create_page_dir();
|
||||
|
||||
task_create((uint32_t)idle, 0, 0, kernel_tasks_pagedir);
|
||||
|
||||
/*void* args1[] = {(void*)42, (void*)"ebalo"};
|
||||
task_create((uint32_t)task1, args1, 2, 0, kernel_tasks_pagedir);
|
||||
void* args2[] = {(void*)69, (void*)420};
|
||||
task_create((uint32_t)task2, args2, 2, 0, kernel_tasks_pagedir);
|
||||
jump_usermode2();*/
|
||||
}
|
||||
|
||||
void handle_syscall(TrapFrame *tf)
|
||||
{
|
||||
printf("========SYSCALL========\n");
|
||||
printf("EAX: %X\n", tf->eax);
|
||||
printf("EBX: %X\n", tf->ebx);
|
||||
printf("ECX: %s\n", tf->ecx);
|
||||
printf("EDX: %X\n", tf->edx);
|
||||
printf("======== END SYSCALL========\n");
|
||||
printf("SIZEOF TRAPFRAME: %X\n", sizeof(tf));
|
||||
printf("SIZEOF *TRAPFRAME: %X\n", sizeof(*tf));
|
||||
debug_log("EAX: %X ", tf->eax);
|
||||
debug_log("EBX: %X ", tf->ebx);
|
||||
debug_log("ECX: %s ", tf->ecx);
|
||||
debug_log("EDX: %X\n", tf->edx);
|
||||
}
|
||||
Reference in New Issue
Block a user