Wake up the secondary CPU

Wake up the secondary CPU

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

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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.

The problem has been fixed. Because the wrong instruction was used to halt all the processors.

Thanks, guys.

Leave a Comment

Please sign in to add a comment. Not a member? Join today