printf("CPU %d local APIC timer is ticking\n", cpu);
/* FIXME assign CPU local idle structure */
- get_cpulocal_var(proc_ptr) = proc_addr(IDLE);
- get_cpulocal_var(bill_ptr) = proc_addr(IDLE);
-
- BKL_UNLOCK();
+ get_cpulocal_var(proc_ptr) = get_cpulocal_var_ptr(idle_proc);
+ get_cpulocal_var(bill_ptr) = get_cpulocal_var_ptr(idle_proc);
ap_boot_finished(cpu);
spinlock_unlock(&boot_lock);
/* finish processor initialisation. */
lapic_enable(cpu);
+ BKL_UNLOCK();
+ for(;;);
+
switch_to_user();
NOT_REACHABLE;
}
/* MINIX is now ready. All boot image processes are on the ready queue.
* Return to the assembly code to start running the current process.
*/
- get_cpulocal_var(bill_ptr) = proc_addr(IDLE); /* it has to point somewhere */
+
+ /* it should point somewhere */
+ get_cpulocal_var(bill_ptr) = get_cpulocal_var_ptr(idle_proc);
+ get_cpulocal_var(proc_ptr) = get_cpulocal_var_ptr(idle_proc);
announce(); /* print MINIX startup banner */
/*
for (i = 0; i < CONFIG_MAX_CPUS; i++) {
struct proc * ip = get_cpu_var_ptr(i, idle_proc);
ip->p_priv = &idle_priv;
+ /* must not let idle ever get scheduled */
+ ip->p_rts_flags |= RTS_PROC_STOP;
set_idle_name(ip->p_name, i);
}
}