SMP - proc_ptr and bill_ptr initialization

- they should point somewhere
This commit is contained in:
Tomas Hruby 2010-09-15 14:10:24 +00:00
parent 865e21b884
commit 67f039540c
3 changed files with 11 additions and 5 deletions

View file

@ -216,10 +216,8 @@ PRIVATE void ap_finish_booting(void)
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);
@ -227,6 +225,9 @@ PRIVATE void ap_finish_booting(void)
/* finish processor initialisation. */
lapic_enable(cpu);
BKL_UNLOCK();
for(;;);
switch_to_user();
NOT_REACHABLE;
}

View file

@ -48,7 +48,10 @@ PUBLIC void bsp_finish_booting(void)
/* 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 */
/*

View file

@ -150,6 +150,8 @@ PUBLIC void proc_init(void)
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);
}
}