Wake up the secondary CPU

Wake up the secondary CPU

Imagen de hxh2160

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

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de David Ott (Intel)

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

Imagen de hxh2160

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.

Imagen de hxh2160

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

Thanks, guys.

Inicie sesión para dejar un comentario.