Lynx OS runs only single processors. Under Lynx, I am trying to start
the second processor on a Dual P3 system to run as co-processor. The
second processor will have little interaction with the main system, so I
believe the main challenge is getting the processor started.
According to Intel documentation, the running processor should send a
Start IPI via APIC. I have tried this, but there are no signs of
processor 2 starting. I am trying to vector it to 0x1000 physical, where
there is a jump-to-yourself instruction planted. I hope to find
processor 2 looping there.
In Linux 2.4.5 smpboot.c, the Start IPI is used only as a secondary
method of startup. The primary method twiddles some stuff in the CMOS
and low memory, which I do not understand; then raises and lowers INIT.
Can someone explain what the first few lines - CMOS_WRITE and setting
phys 0x469 and 0x467 are doing? Is this standard BIOS stuff, or is it
Linunx-specific?
Any other suggestions on processor startup appreciated.
Thanks - Bill Sakoda
/* From smpboot.c; */
CMOS_WRITE(0xa, 0xf);
local_flush_tlb();
Dprintk("1.\n");
*((volatile unsigned short *) phys_to_virt(0x469)) = start_eip >> 4;
Dprintk("2.\n");
*((volatile unsigned short *) phys_to_virt(0x467)) = start_eip & 0xf;
Dprintk("3.\n");
/*
* Be paranoid about clearing APIC errors.
*/
if (APIC_INTEGRATED(apic_version[apicid])) {
apic_read_around(APIC_SPIV);
apic_write(APIC_ESR, 0);
apic_read(APIC_ESR);
}
/*
* Status is now clean
*/
send_status = 0;
accept_status = 0;
boot_status = 0;
/*
* Starting actual IPI sequence...
*/
Dprintk("Asserting INIT.\n");
/*
* Turn INIT on target chip
*/
apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
/*
* Send IPI
*/
apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_INT_ASSERT
| APIC_DM_INIT);
Dprintk("Waiting for send to finish...\n");