gnujon said:
Are you sure that 32bit versions of Windows and Linux require Real Mode? Do you mean just for booting or something?
Yes, as I said, to run or to boot, depending on the OS.
Not that I would know, but I was under the impression that modern versions of Windows were Protected Mode all the way. Windows 95 and 98 did boot DOS first and then switch to Protected Mode. And Virtual Real Mode was used to keep running the initial DOS environment so as to make use of any DOS drivers that were loaded. But I thought all that went away once we got to Windows 2000/XP running the NT kernel.
All 32 bit Windows versions use a Real Mode boot loader. And Long Mode also doesn't support V86 which Windows NT and OS/2 use to run 16 bit programs.
(Not sure what "virtual Real Mode" is. As far as I know Windows 95 was a type of DPMI client and switched back to Real Mode for running DOS programs.)
If Parallels solve the boot loader problem, I would be curious to learn what would happen if the user attempted to start a 16 bit program with Windows switching into a CPU mode (V86) that the Long Mode CPU Parallels uses doesn't offer.
Also, seeing as one can already compile and run 64bit POSIX applications on Mac OS X machines with x64 CPUs, doesn't that mean that the CPUs must already be running in Long Mode with the current versions of Mac OS X used on these machines?
Can one? Apple's 64 bit info speaks of PowerPC G5 boxen:
http://www.apple.com/macosx/features/64bit/
My G5 certainly can run 64 bit (Darwin) programs. But my Intel? I don't think so. The CPU seems to be in Protected Mode, which is why MS-DOS and OS/2's DOS box can run on it. (Although I am sure the Firmware switches the Core 2 into Protected Mode before the boot loader is even called.)
Long Mode would not allow 16 bit code to run, although I have found conflicting documentation on 16 bit Protected Mode code. Not that I know a lot about that. But it seems like Long Mode supports no Real Mode code (because it offers no V86 mode) but does support 16 bit Protected Mode code while the operating systems that run in Long Mode do not support 16 bit Protected Mode code. In effect Long Mode runs only 64 and 32 bit code and no 16 bit code at all.
I do believe you are right, however, that IF Mac OS X can run 64 bit code it must be running in Long Mode. But I don't think it can. And if it could, I wonder why Windows needs the complicated WoW64 environment to run 32 bit code while Mac OS X does it so naturally.
Apple claim that Leopard will be a 64 bit OS on Intel. My assumption is that Leopard will be 64 bit only on Intel, while the PowerPC version will use the 32 bit kernel (and why not). Thus there will be three kernels:
1. 32 bit PowerPC kernel (which can run 64 bit programs on a G5): G4 and G5 machines.
2. 32 bit Intel kernel (which cannot run 64 bit programs): early 32 bit-only Intel machines.
3. 64 bit Intel kernel (which can run 64 bit and 32 bit programs): all other Intel machines.
I am sure clever hackers will find a way to activate the 32 bit kernel on all Intel machines (for fun).