Hardware Reference
In-Depth Information
(often called x86-64), which increased the integer computations and virtual address
size to 64 bits. While most extensions were introduced by Intel and later imple-
mented by competitors, this was one case where AMD introduced an extension
that Intel had to adopt.
The Core i7 has three operating modes, two of which make it act like an 8088.
In real mode , all the features that have been added since the 8088 are turned off
and the Core i7 behaves like a simple 8088. If any program does something
wrong, the whole machine just crashes. If Intel had designed human beings, it
would have put in a bit that made them revert back to chimpanzee mode (most of
the brain disabled, no speech, sleeps in trees, eats mostly bananas, etc.)
One step up is virtual 8086 mode , which makes it possible to run old 8088
programs in a protected way. In this mode, a real operating system is in control of
the whole machine. To run an old 8088 program, the operating system creates a
special isolated environment that acts like an 8088, except that if its program
crashes, the operating system is notified instead of the machine crashing. When a
Windows user starts an MS-DOS window, the program run there is started in virtual
8086 mode to protect Windows itself from misbehaving MS-DOS programs.
The final mode is protected mode, in which the Core i7 actually acts like a
Core i7 instead of a very expensive 8088. Four privilege levels are available and
controlled by bits in the PSW . Level 0 corresponds to kernel mode on other com-
puters and has full access to the machine. It is used by the operating system.
Level 3 is for user programs. It blocks access to certain critical instructions and
control registers to prevent a rogue user program from bringing down the entire
machine. Levels 1 and 2 are rarely used.
The Core i7 has a huge address space, with memory divided into 16,384 seg-
ments, each going from address 0 to address 2 32
1. However, most operating
systems (including UNIX and all versions of Windows) support only one segment,
so most application programs effectively see a linear address space of 2 32 bytes,
and sometimes part of this is occupied by the operating system. Every byte in the
address space has its own address, with words being 32 bits long. Words are stored
in little-endian format (the low-order byte has the lowest address).
The Core i7's registers are shown in Fig. 5-3. The first four registers, EAX ,
EBX , ECX , and EDX , are 32-bit, more-or-less general-purpose registers, although
each has its own peculiarities. EAX is the main arithmetic register; EBX is good for
holding pointers (memory addresses); ECX plays a role in looping; EDX is needed
for multiplication and division, where, together with EAX , it holds 64-bit products
and dividends. Each of these registers contains a 16-bit register in the low-order
16 bits and an 8-bit register in the low-order 8 bits. These registers make it easy to
manipulate 16- and 8-bit quantities, respectively. The 8088 and 80286 had only
the 8- and 16-bit registers. The 32-bit registers were added with the 80386, along
with the E prefix, which stands for Extended.
The next four are also somewhat general purpose, but with more peculiarities.
The ESI and EDI registers are intended to hold pointers into memory, especially for
 
Search WWH ::




Custom Search