Page 277 - Embedded Microprocessor Systems Real World Design
P. 277

Protected  Mode Programming  Intel x86 processors, from the 386 on, imple-
                   ment protected  mode programming.  In  the 8086/8088  and the  80186/188,  the
                   only memory model available is the Real mode. The addressing scheme for these
                   CPUs permits addressing of 1 MB of memory (20-bit address) , in 16 64K segments.
                   The 386 and higher CPUs use a different addressing scheme that permits access to
                   4 GB of memory using 32-bit addresses.

                   Hardware Memory Management  In the Real mode, every task has access to the
                   entire 1 MB memory space. Any task can read or write to any address. In the Pro-
                   tected mode, the memory partitions may be protected so that a task cannot access
                   memory  outside  its  own  segment.  A  segment of  memory  even  can  be  shared
                   between two tasks, so that one task can both write and read to the common area,
                   while another task can only read it. Attempts by a task to execute or access memory
                   outside its bounds cause the hardware to generate an exception condition that can
                   be handled by the operating system.

                   Hardware Debug Registers  The 386 and higher processors have registers that
                   simplify debugging. The four address registers can be set to break on read, write,
                   or read/write  access. Debuggers can take advantage of these onchip resources to
                   simplify debugging.

                   PO Control  The x86 architecture has a 64KI/O space, separate from the memory
                   space, that can be accessed with unique instructions. In the Protected mode, the
                   1/0 space can be protected  so that only the operating system has access to 1/0
                   ports. This forces applications to use the operating system resources to access I/O.




                   Drawbacks of Using a PC Platform


                   So, if it is this easy to design a PGbased system, why doesn’t every system use a PC?
                   This section discusses the few drawbacks to using a PC.

                   Product Cost
                   This may not be an issue for low-volume applications or for systems in which the
                   embedded control components are a small part of a much larger system (such as
                   an automated assembly line), but for consumer and other cost-sensitive applica-
                   tions it is an issue. Imagine a microwave oven that must be sold with a PC attached.
                   Enough said.
                      Another thing that drives product costs higher in PC systems is that you must
                   pay for everything that comes with the PC architecture. If your application needs


                   258                                             EmbeddQd Microprocessor Systems
   272   273   274   275   276   277   278   279   280   281   282