Page 1 of 1
MP init question.
Posted: Sun Dec 02, 2012 12:21 am
by numbercrunch
This question probably comes as an annoyance but I can't seem to find clear documentation on the matter. Assuming the following scenario: I have my BSP about to enter protected mode, the AP's will of course follow. The point of confusion for me, can for example 3 cpus be in protected mode maybe even long mode while one is hanging out in real mode?
I guess I just never thought of this. It's not ideal i know, but just a question based on possibility.
Thanks.
Re: MP init question.
Posted: Sun Dec 02, 2012 12:57 am
by thepowersgang
First off - all CPUs have their own copy of internal state (registers and 1st level cache), so they can be in different operating modes.
As a related notes, APs will stay in real mode (in a CLI-HLT loop) until woken by the BSP (using a sequence of Inter-processor interrupts).
Re: MP init question.
Posted: Sun Dec 02, 2012 3:50 am
by rdos
numbercrunch wrote:The point of confusion for me, can for example 3 cpus be in protected mode maybe even long mode while one is hanging out in real mode?
Absolutely. My long mode support even only runs CPUs that execute long mode applications in long mode, while applications that are 32-bit (or 16-bit or even V86) run in protected mode. No CPU is in real mode after boot though, as I let them hibernate in protected mode instead.
This interoperability of x86 modes is the beauty of the architecture.
Re: MP init question.
Posted: Sun Dec 02, 2012 8:04 am
by numbercrunch
thanks for the replies it was just something I was going to experiment for fun. After sending an INIT to my AP's I was going to have one stay in real mode and make use of a few bios interrupts.
again I know it's not feasible, just an experiment