Hi,
XBear wrote:
Hi! Could anyone explain me a method that bios use for disable selected logical processor?
I didn't found any information about it.
In general...
To stop a logical CPU; you'd disable and then flush caches; then disable IRQs with CLI; and then you'd either do HLT or MONITOR then MWAIT. This (almost) puts the CPU into a "do nothing forever" state where the only things that can wake it from this state is an INIT IPI (the first part of the "INIT, SIPI, SIPI" startup sequence), an SMI, an NMI or a machine check exception. Of course you'd also make sure machine check exceptions are disabled so they won't happen, and (at least for BIOS) would mask SMI and NMI sources so they won't happen either. Also, hopefully the BIOS would put the CPU into its "lowest power consumption" state before stopping the CPU (or when stopping the CPU if MONITOR/MWAIT was used); so that it consumes the least power to do nothing.
Depending on why the BIOS was stopping a CPU (e.g. if the CPU was faulty, or "disabled" because hyper-threading was turned off), it might also not mention the CPU in ACPI tables (and MultiProcessor tables) so that operating systems don't know the CPU exists and won't try to re-start the CPU. This is one of the reasons why an operating system should never broadcast the "INIT, SIPI, SIPI" sequence to all CPUs (it might start faulty CPUs that should not be started or used).
Note that there might or might not be CPU specific/model specific things and/or motherboard specific things on top of this. For a random theoretical example (which doesn't really exist in practice because almost no real hardware has ever supported it); if a system supports "hot-plug CPUs" (and if the entire chip is being disabled and not just one of its logical CPU or on of its cores) then the motherboard would probably have some way to (electrically) disconnect the CPU so that it can be removed safely.
Cheers,
Brendan