Covered on Intel Volume 3. Specially useful is the "Transitions Among the Processor’s Operating Modes" diagram.
- Protected
- Real address
- System management
- IA-32e. Has two sub modes:
- Compatibility
- 64-bit
CPU starts here for backwards compatibility.
http://wiki.osdev.org/Real_Mode
It is possible to use 32-bit registers in this mode with the "Operand Size Override Prefix" 0x66
.
TODO: is it possible to access memory above 1M like this:
mov $1, 0xF0000000
mov $1, (%eax)
Wikipedia seems to call it long mode: https://en.wikipedia.org/wiki/Long_mode
Contains two sub-modes: 64-bit and compatibility.
64-bit is the major mode of operation, compatibility mode emulates IA-32. This is where systems run most of the time.
The other mode is legacy mode, which as the name implies, should not be used on new programs.
Controlled by the CS.L
bit of the segment descriptor.
It appears that it is possible for user programs to modify that during execution: http://stackoverflow.com/questions/12716419/can-you-enter-x64-32-bit-long-compatibility-sub-mode-outside-of-kernel-mode