Prev: 4.2 Systems Instructions

Next: 5.1 Segment Translation

Chapter 5 Memory Management


The 80386 transforms logical addresses (i.e., addresses as viewed by programmers) into physical address (i.e., actual addresses in physical memory) in two steps:

These translations are performed in a way that is not visible to applications programmers. Figure 5-1 illustrates the two translations at a high level of abstraction.

Figure 5-1 and the remainder of this chapter present a simplified view of the 80386 addressing mechanism. In reality, the addressing mechanism also includes memory protection features. For the sake of simplicity, however, the subject of protection is taken up in another chapter, Chapter 6.

Figure 5-1. Address Translation Overview

             15           0      31                           0
    LOGICAL +---------------+   +------------------------------+
    ADDRESS |    SELECTOR   |   |            OFFSET            |
            +---------------+   +---+--------------------------+
                                    !
                     +------------------------------+
                     |     SEGMENT TRANSLATION      |
                     +--------------+---------------+
                                 +--+-+       PAGING ENABLED
                                 |PG ?|--------------------+
                                 +--+-+                    |
                   31        PAGING ! DISABLED       0     |
          LINEAR  +-----------+-----------+-----------+    |
          ADDRESS |    DIR    |   PAGE    |  OFFSET   |    |
                  +-----------+-----+-----+-----------+    |
                                    !                      |
                     +------------------------------+      |
                     |       PAGE TRANSLATION       |      |
                     +--------------+---------------+      |
                                    |<---------------------+
                      31            !              0
            PHYSICAL +------------------------------+
            ADDRESS  |                              |
                     +------------------------------+


Prev: 4.2 Systems Instructions

Next: 5.1 Segment Translation