Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture
Vol. 1 3-11
BASIC EXECUTION ENVIRONMENT
• Real-address mode — When in real-address mode, the processor only supports
the real-address mode memory model.
• System management mode — When in SMM, the processor switches to a
separate address space, called the system management RAM (SMRAM). The
memory model used to address bytes in this address space is similar to the real-
address mode model. See Chapter 24, “System Management,” in the Intel® 64
and IA-32 Architectures Software Developer’s Manual, Volume 3B, for more
information on the memory model used in SMM.
• Compatibility mode — Software that needs to run in compatibility mode should
observe the same memory model as those targeted to run in 32-bit protected
mode. The effect of segmentation is the same as it is in 32-bit protected mode
semantics.
• 64-bit mode — Segmentation is generally (but not completely) disabled,
creating a flat 64-bit linear-address space. Specifically, the processor treats the
segment base of CS, DS, ES, and SS as zero in 64-bit mode (this makes a linear
address equal an effective address). Segmented and real address modes are not
available in 64-bit mode.
3.3.5 32-Bit and 16-Bit Address and Operand Sizes
IA-32 processors in protected mode can be configured for 32-bit or 16-bit address
and operand sizes. With 32-bit address and operand sizes, the maximum linear
address or segment offset is FFFFFFFFH (2
32
-1); operand sizes are typically 8 bits or
32 bits. With 16-bit address and operand sizes, the maximum linear address or
segment offset is FFFFH (2
16
-1); operand sizes are typically 8 bits or 16 bits.
When using 32-bit addressing, a logical address (or far pointer) consists of a 16-bit
segment selector and a 32-bit offset; when using 16-bit addressing, an address
consists of a 16-bit segment selector and a 16-bit offset.
Instruction prefixes allow temporary overrides of the default address and/or operand
sizes from within a program.
When operating in protected mode, the segment descriptor for the currently
executing code segment defines the default address and operand size. A segment
descriptor is a system data structure not normally visible to application code. Assem-
bler directives allow the default addressing and operand size to be chosen for a
program. The assembler and other tools then set up the segment descriptor for the
code segment appropriately.
When operating in real-address mode, the default addressing and operand size is 16
bits. An address-size override can be used in real-address mode to enable 32-bit
addressing. However, the maximum allowable 32-bit linear address is still 000FFFFFH
(2
20
-1).