Fix PIC, add small delays when initializing
This commit is contained in:
@ -253,21 +253,17 @@ void proc_killself(void) {
|
||||
proc_kill(proc);
|
||||
}
|
||||
|
||||
void proc_intr(IntrStackFrame *frame) {
|
||||
proc_sched(frame);
|
||||
}
|
||||
|
||||
void proc_init(void) {
|
||||
spinlock_init(&PROCS.spinlock);
|
||||
PROCS.procs = NULL;
|
||||
|
||||
intr_attchhandler(&proc_intr, INTR_IRQBASE+0);
|
||||
|
||||
Proc *init = proc_spawnuser("base", "/bin/init");
|
||||
PROCS.current = init;
|
||||
proc_register(init);
|
||||
init->state = PROC_READY;
|
||||
|
||||
intr_pic_unmask();
|
||||
|
||||
tss.rsp0 = (uint64_t)VIRT(PROCS.current->platformdata.kstack);
|
||||
proc_switch(&PROCS.current->platformdata.trapframe, (void *)PROCS.current->platformdata.cr3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user