Software Archive
Read-only legacy content
17061 Discussions

Wake up the secondary CPU

hxh2160
Beginner
1,577 Views
Hi all,

After BSP's sending IPI messages to wake up the secondary core, how can we know that the AP is booting? We do it in the same manner as Xen.

apic_icr_write(APIC_DM_STARTUP | (start_eip >> 12), phys_apicid);

I am confused with it. Is the start_eip the booting entry for the AP? and I don't think that we can directly specify the start_eip in ICR just in this way, since the corresponding bits that start_eip will write to are reserved in ICR.

Can anyone help me out? Thanks
0 Kudos
3 Replies
David_O_Intel1
Employee
1,577 Views

http://www.intel.com/products/processor/manuals/
Software Developer's Manual Vol 3a, page 10-28:

"110 (Start-Up)

Sends a special start-up IPI (called a SIPI) to the target processor or processors. The vector typically points to a start-up routine that is part of the BIOS boot-strap code (see Section 8.4, Multiple-Processor (MP) Initialization). IPIs sent with this delivery mode are not automatically retried if the source APIC is unable to deliver it. It is up to the software to determine if the SIPI was not successfully delivered and to reissue the SIPI if necessary."

David Ott

0 Kudos
hxh2160
Beginner
1,577 Views
After booting AP, the processor enters into the real mode. After loading gdt, the software is trying to enable CR0.PE by MOV CR0 instruction and then the AP can jump to protected mode. At this point, the system always crashs. I found out that it is the MOV CR0 instruction that causes the crash. Why can't the CR0 be written with CR0.PE? All the manual or cookbook show that it is feasible. But it can't work in my case.
0 Kudos
hxh2160
Beginner
1,577 Views
The problem has been fixed. Because the wrong instruction was used to halt all the processors.

Thanks, guys.
0 Kudos
Reply