Hardware Reference
In-Depth Information
When AMD released the first x86-64 processor in 2003 (Intel followed suit in 2004), the
64-biterawasborn.Inadditionto16-bitand32-bitmodes,thesechipshavea64-bitmode
(commonly referred to as x64). 64-bit processors have three distinctly different modes,
with unique memory architectures in each. For backward compatibility, 64-bit processors
canrunin64-bit,32-bit,or16-bitmodes,and32-bitprocessors canrunin32-bitor16-bit
modes, each with different memory limitations. For example, a 64-bit processor running
in 32-bit mode can only address 4GB of RAM, and a 64-bit or 32-bit processor running
in 16-bit mode can only address 1MB of RAM. All Intel-compatible PC processors be-
gin operation in 16-bit real mode when they are powered on. When a 32-bit or 64-bit OS
loads, it is that OS code that instructs the processor to switch into 32-bit or 64-bit protec-
ted mode.
When a 32-bit OS such as Windows is loaded, the processor is switched into 32-bit pro-
tectedmodeearlyintheloadingsequence.Then,32-bitdriversforallthehardwarecanbe
loaded,andtherestoftheOScanload.In32-bitprotectedmode,theOSsandapplications
can access all the memory in the system up to 4GB. Similarly, on a 64-bit OS, the system
switches into64-bitprotected modeearlyinthebootprocessandloads64-bitdrivers,fol-
lowed by the remainder of the OS.
The 32-bit editions of Windows support 4GB of physical memory (RAM). What many
don't realize is that the PC system hardware uses some or all of the fourth gigabyte for
the BIOS, motherboard resources, memory mapped I/O, PCI configuration space, device
memory (graphics aperture), VGA memory, and so on. This means that if you install 4GB
(or more) RAM, none of it past 4GB will be seen at all, and most or all of the fourth giga-
byte (that is, the RAM between 3GB and 4GB) will be disabled because it is already oc-
cupied by other system hardware. This is called the
3GB limit
, which is analogous to the
640Kmemorylimit wehadon16-bitsystemsinthe1980s.The16-bitaddressingsuppor-
ted 1MB, but the upper 384K was already in use by the system hardware (BIOS, video,
adapter ROM, and so on).
Figure 6.21
shows the memory map for a modern system using an Intel G45 chipset,
which supports a maximum of 16GB of RAM. For a 32-bit OS, the line labeled “Top of
usable DRAM (32-bit OS)” is at 4,096MB. Note that the PCI memory range, FLASH,
APIC (Advanced Programmable Interrupt Controller), and Reserved areas take up a total
of 770MB of the memory below 4GB. You can also see the 384K (0.375MB) of memory
below 1MB that is used by the system as well. This means that if you are running a
32-bit OS, even if you have 4GB of RAM installed, the amount usable by the OS would
be 4,096MB - 770MB - 0.375MB, which is 3,325.625MB (or about 3.24GB, rounded
down).
Figure 6.21
Memory map for a system using an Intel G45 chipset.