Mail Archives: djgpp/1996/12/30/19:48:37
Once upon a time (on 30 Dec 96 at 15:32) Colin W. Glenn said:
> On Mon, 30 Dec 1996, Mark Habersack wrote:
> > And what about the 0x0602 -- 0x0604 and 0x0702, 0x0703 functions?
> > The
> <...>
> > 286-compliant servers would have to implement them. But how? 286
> > hardware does not support pages.
>
> Hold on a minute here, I'm under the impression that the only
> difference between 286 & 386 is the the segment descriptor structure
> was enhanced in the 386 to allow for difference types of memory
> setups. And that switching bewteen PM & RM was easier on the 386.
If you're talking about system structures then, yes, the only
difference between 386 and 286 is that in i386 were introduced some
new descriptor formats and the TSS structure has been enhanced.
But it's only a top of an iceberg. Here's a short list of diffs
between the two CPU types:
1. in i386 Intel introduced a new level of indirection in memory
addressing - paging. Memory in i386 can be divided into units as
small as 4KB (PAGES) while in iAPX286 the smallest swappable (in
virtual memory sense) was a SEGMENT (64KB). While i386 retains all
the segmentation mechanisms of 286, it adds the new paging feature to
make virtual memory management easier (there's more to it, see below)
Pages also enable complete separation of programs in memory - it is
possible to forbid one program changing or even looking into another
program's memory arena. Windows NT takes advantage of this feature.
2. Memory protection. On 286 memory has been protected by means of
segment sizes and location stored in descriptors in either LDT or
GDT. i386 enables another protection scheme: each page, information
on which is stored in Page Directories and Directory Tables, can have
its own set of protection bits - this allows for a very minute memory
protection. i486 extends the scheme even more by making possible
creation of read-only pages for all users of the OS (including the OS
itself - unlike on i386 where OS, i.e. software running at the Ring
0, can read/write any area of memory).
3. Additional segment registers (fs, gs)
4. Many operations which could be peroformed on 286 only with certain
registers now can use almost all the general registers present in
CPU.
5. i386 is a 32 bit CPU which means its bus is 32 bit wide (16 bit on
286), it has 32 bit wide registers, 32 bit FLAGS register, 32 bit
address lines which allows it to address 4GB of memory (16MB on 286)
- with paging enabled the addressable VIRTUAL MEMORY size is 64TB.
6. i386 introduced test registers (for testing cache), debug
registers (for hardware-assisted debugging - one of the most powerful
features of i386) and changed structure of some CPU-control registers
(by adding CONTROL registers not preset on 286 and moving the 286 MSW
register to another place)
7. i386 enables switching back to RM without the need of putting the
RESET line in high logical state (which in fact means resetting the
entire system)
8. i386 contains a self-test program in its microcode that is
executed every time the CPU is reset.
There are more features, and those mentioned above are not even
closely explained here. If you wait a while, then at the end of
January I will release to the DJGPP Book Project a tutorial on i386
protected mode. It will make all the differences more clear.
-----------------------------------------------------
So I talked about conscience and I talked about pain,
And he looked out of window and it started to rain
I thought maybe I've already gone crazy...
----
Visit http://ananke.amu.edu.pl/~grendel
- Raw text -