I am right now trying to understand the booting procedure and how does the processors initializes. I have read the Multiprocessor Specification section B.4.2 but it is not clear to me what INIT IPI
and STARTUP IPI
does to the BSP
and AP
.
In general; INIT IPI
is like a soft reset for the (logical) CPU, that puts it into a "wait for SIPI state". The Intel manuals have a table showing the default values of various registers after power on, after reset, and after INIT IPI
.
The Startup IPI
is a way to tell the CPU to start executing at a certain address (an address derived from the "vector field" of the Startup IPI
) before a usable IDT can be set up. This also bumps the CPU out of the "wait for SIPI state". Some (most) CPUs will respond to a Startup IPI
when they aren't in the "wait for SIPI state", but without a previous INIT IPI
you can't expect the CPU to be in a known/safe state at the time.
All CPUs respond to INIT IPI
and Startup IPI
the same. The main difference between BSP and AP is during power on (BSP executes firmware while AP CPUs wait).