1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2002. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter CPU Model Dependent Features |
---|
10 | |
---|
11 | @section Introduction |
---|
12 | |
---|
13 | Microprocessors are generally classified into |
---|
14 | families with a variety of CPU models or implementations within |
---|
15 | that family. Within a processor family, there is a high level |
---|
16 | of binary compatibility. This family may be based on either an |
---|
17 | architectural specification or on maintaining compatibility with |
---|
18 | a popular processor. Recent microprocessor families such as the |
---|
19 | SPARC or PA-RISC are based on an architectural specification |
---|
20 | which is independent or any particular CPU model or |
---|
21 | implementation. Older families such as the M68xxx and the iX86 |
---|
22 | evolved as the manufacturer strived to produce higher |
---|
23 | performance processor models which maintained binary |
---|
24 | compatibility with older models. |
---|
25 | |
---|
26 | RTEMS takes advantage of the similarity of the |
---|
27 | various models within a CPU family. Although the models do vary |
---|
28 | in significant ways, the high level of compatibility makes it |
---|
29 | possible to share the bulk of the CPU dependent executive code |
---|
30 | across the entire family. Each processor family supported by |
---|
31 | RTEMS has a list of features which vary between CPU models |
---|
32 | within a family. For example, the most common model dependent |
---|
33 | feature regardless of CPU family is the presence or absence of a |
---|
34 | floating point unit or coprocessor. When defining the list of |
---|
35 | features present on a particular CPU model, one simply notes |
---|
36 | that floating point hardware is or is not present and defines a |
---|
37 | single constant appropriately. Conditional compilation is |
---|
38 | utilized to include the appropriate source code for this CPU |
---|
39 | model's feature set. It is important to note that this means |
---|
40 | that RTEMS is thus compiled using the appropriate feature set |
---|
41 | and compilation flags optimal for this CPU model used. The |
---|
42 | alternative would be to generate a binary which would execute on |
---|
43 | all family members using only the features which were always |
---|
44 | present. |
---|
45 | |
---|
46 | This chapter presents the set of features which vary |
---|
47 | across i386 implementations and are of importance to RTEMS. |
---|
48 | The set of CPU model feature macros are defined in the file |
---|
49 | cpukit/score/cpu/i386/i386.h based upon the particular CPU |
---|
50 | model defined on the compilation command line. |
---|
51 | |
---|
52 | @section CPU Model Name |
---|
53 | |
---|
54 | The macro CPU_MODEL_NAME is a string which designates |
---|
55 | the name of this CPU model. For example, for the Intel i386 without an |
---|
56 | i387 coprocessor, this macro is set to the string "i386 with i387". |
---|
57 | |
---|
58 | @section bswap Instruction |
---|
59 | |
---|
60 | The macro I386_HAS_BSWAP is set to 1 to indicate that |
---|
61 | this CPU model has the @code{bswap} instruction which |
---|
62 | endian swaps a thirty-two bit quantity. This instruction |
---|
63 | appears to be present in all CPU models |
---|
64 | i486's and above. |
---|
65 | |
---|
66 | @section Floating Point Unit |
---|
67 | |
---|
68 | The macro I386_HAS_FPU is set to 1 to indicate that |
---|
69 | this CPU model has a hardware floating point unit and 0 |
---|
70 | otherwise. The hardware floating point may be on-chip (as in the |
---|
71 | case of an i486DX or Pentium) or as a coprocessor (as in the case of |
---|
72 | an i386/i387 combination). |
---|