nullplan wrote:rdos wrote:ACPI is just software, so they might still use real mode to implement it.
I believe you miss the point: Once there is an interface for the OS to start the APs without caring about real mode, the hardware can be changed to cut out real mode without hurting then-extant operating systems.
Only if people install these operating systems on the target hardware, and the OS developers decide to rely on ACPI for booting AP cores.
nullplan wrote:
rdos wrote:Anyway, even if it would be required to start APs in long mode, I can still switch them back to compatibility mode and turn off long mode to make them run 32-bit code.
For now yes. A future processor that doesn't let you turn off long mode is conceivable.
That's possible, but I can still run my 32-bit OS under long mode using compatibility mode. Done that, and it works.
nullplan wrote:
rdos wrote:32-bit compatibility mode won't disappear anytime soon, and neither will protected mode (they are basically the same).
No they are not. There is no support for hardware task switching in long mode (a rarely used feature, I know, and therefore a prime candidate for removal), and I was under the impression that in long mode, you needed much of the OS to be 64-bit. I honestly never considered a 32-bit compat mode OS.
Nope, only some basics like interrupt & exception handlers needs to be 64-bit. The documentation is not so clear on this, but it is possible to call 32-bit code (using far calls) from long mode both on Intel and AMD. A feature that is unlikely to be removed as long as 32-bit compat mode is supported.
Actually, the long mode paging structure is fully compatible with PAE paging (only has more levels), and so the compat mode OS can use the page tables as if it operated under PAE paging.
I originally experimented with this as part of supporting long mode applications on my 32-bit OS. I would switch the core that currently run the long mode application to long mode, and load IDT with a prefabricated 64-bit variant. I had this running on real hardware, but then decided not to continue with it.
nullplan wrote:
Meaning that a processor that doesn't let you turn off long mode would be able to cut out quite a lot of weird stuff nobody ever needs (task gates, real mode address creation), and all of those transistors could then be reused to do something useful instead.
Most of the complexity is in descriptor handling, and that cannot be removed. Even long mode requires a GDT and a code & data selector.