Why is protected mode needed in addition to compatibility mode in Intel x86 64 bit CPUs?
Asked Answered
M

1

8

I'm reading intel software developer manual (section 3.1). Here is said that

The IA-32 architecture supports three basic operating modes: protected mode, real-address mode, and system management mode.

and

Intel 64 architecture adds IA-32e mode. IA-32e mode has two sub-modes.

This two sub-modes is Compatibility mode and 64-bit mode. Thus Intel 64 architecture contains 4 operating modes (protected mode, real-address mode, system management mode, IA-32e mode). But I don't understand for what protected mode is needed in Intel 64? Compatibility sub-mode of IA-32e permit to run legacy 16- and 32-bits application without re-compilation to 64-bit OS and 64-bit sub-mode permits OS to run application which access to 64-bit linear address space. Where protected mode is used when I'm using 64-bit OS? Application running ensured by IA-32e mode.

Minaret answered 30/12, 2013 at 22:12 Comment(3)
It was a drop-in replacement for machines that boot an operating system that never heard of IA-32e mode. Backwards compatibility is very important to get a new chip design to start selling quickly.Lated
In fact, you lose one, the V8086 mode which is not supported in IA-32e mode. I suggest you review the x86 & Windows history, and then you'll get the answer.Tomsk
Normally a 64-bit OS doesn't use protected-mode at all, after booting. Pure protected mode is for 32-bit OSes.Loughlin
G
5

I believe the organization is like this. At any given time, the entire CPU must be in precisely one of the following modes (excluding the maintenance mode):

IA-32 Real Mode: This is how the processor powers on.

IA-32 Protected Mode: 32-bit execution environment. The usual protection mechanisms are in play; the CPU can selectively move into virtual-8086 mode.

IA-32e Mode: This is only available on 64-bit CPUs. The CPU can selectively move between compatibility and long mode.

That is, if you want to execute any 64-bit code, you need to go into IA-32e mode. You can now decide on a per-segment basis whether to execute 32-bit code in compatibility mode or 64-bit code in long mode.

Gober answered 31/12, 2013 at 0:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.