source: rtems/doc/supplements/powerpc/cpumodel.t @ aa84e20

4.104.114.84.95
Last change on this file since aa84e20 was aa84e20, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/22/03 at 08:10:04

Merger from rtems-4-6-branch

  • Property mode set to 100644
File size: 5.7 KB
Line 
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
13Microprocessors are generally classified into
14families with a variety of CPU models or implementations within
15that family.  Within a processor family, there is a high level
16of binary compatibility.  This family may be based on either an
17architectural specification or on maintaining compatibility with
18a popular processor.  Recent microprocessor families such as the
19PowerPC, SPARC, and PA-RISC are based on an architectural specification
20which is independent or any particular CPU model or
21implementation.  Older families such as the M68xxx and the iX86
22evolved as the manufacturer strived to produce higher
23performance processor models which maintained binary
24compatibility with older models.
25
26RTEMS takes advantage of the similarity of the
27various models within a CPU family.  Although the models do vary
28in significant ways, the high level of compatibility makes it
29possible to share the bulk of the CPU dependent executive code
30across the entire family.
31
32@section CPU Model Feature Flags
33
34Each processor family supported by RTEMS has a
35list of features which vary between CPU models
36within a family.  For example, the most common model dependent
37feature regardless of CPU family is the presence or absence of a
38floating point unit or coprocessor.  When defining the list of
39features present on a particular CPU model, one simply notes
40that floating point hardware is or is not present and defines a
41single constant appropriately.  Conditional compilation is
42utilized to include the appropriate source code for this CPU
43model's feature set.  It is important to note that this means
44that RTEMS is thus compiled using the appropriate feature set
45and compilation flags optimal for this CPU model used.  The
46alternative would be to generate a binary which would execute on
47all family members using only the features which were always
48present.
49
50This section presents the set of features which vary
51across PowerPC implementations and are of importance to RTEMS.
52The set of CPU model feature macros are defined in the file
53cpukit/score/cpu/ppc/ppc.h based upon the particular CPU
54model defined on the compilation command line.
55
56@subsection CPU Model Name
57
58The macro CPU_MODEL_NAME is a string which designates
59the name of this CPU model.  For example, for the PowerPC 603e
60model, this macro is set to the string "PowerPC 603e".
61
62@subsection Floating Point Unit
63
64The macro PPC_HAS_FPU is set to 1 to indicate that this CPU model
65has a hardware floating point unit and 0 otherwise.
66
67@subsection Alignment
68
69The macro PPC_ALIGNMENT is set to the PowerPC model's worst case alignment
70requirement for data types on a byte boundary.  This value is used
71to derive the alignment restrictions for memory allocated from
72regions and partitions.
73
74@subsection Cache Alignment
75
76The macro PPC_CACHE_ALIGNMENT is set to the line size of the cache.  It is
77used to align the entry point of critical routines so that as much code
78as possible can be retrieved with the initial read into cache.  This
79is done for the interrupt handler as well as the context switch routines.
80
81In addition, the "shortcut" data structure used by the PowerPC implementation
82to ease access to data elements frequently accessed by RTEMS routines
83implemented in assembly language is aligned using this value.
84
85@subsection Maximum Interrupts
86
87The macro PPC_INTERRUPT_MAX is set to the number of exception sources
88supported by this PowerPC model.
89
90@subsection Has Double Precision Floating Point
91
92The macro PPC_HAS_DOUBLE is set to 1 to indicate that the PowerPC model
93has support for double precision floating point numbers.  This is
94important because the floating point registers need only be four bytes
95wide (not eight) if double precision is not supported.
96
97@subsection Critical Interrupts
98
99The macro PPC_HAS_RFCI is set to 1 to indicate that the PowerPC model
100has the Critical Interrupt capability as defined by the IBM 403 models.
101
102@subsection Use Multiword Load/Store Instructions
103
104The macro PPC_USE_MULTIPLE is set to 1 to indicate that multiword load and
105store instructions should be used to perform context switch operations.
106The relative efficiency of multiword load and store instructions versus
107an equivalent set of single word load and store instructions varies based
108upon the PowerPC model.
109
110@subsection Instruction Cache Size
111
112The macro PPC_I_CACHE is set to the size in bytes of the instruction cache.
113
114@subsection Data Cache Size
115
116The macro PPC_D_CACHE is set to the size in bytes of the data cache.
117
118@subsection Debug Model
119
120The macro PPC_DEBUG_MODEL is set to indicate the debug support features
121present in this CPU model.  The following debug support feature sets
122are currently supported:
123
124@table @b
125
126@item @code{PPC_DEBUG_MODEL_STANDARD}
127indicates that the single-step trace enable (SE) and branch trace
128enable (BE) bits in the MSR are supported by this CPU model.
129
130@item @code{PPC_DEBUG_MODEL_SINGLE_STEP_ONLY}
131indicates that only the single-step trace enable (SE) bit in the MSR
132is supported by this CPU model.
133
134@item @code{PPC_DEBUG_MODEL_IBM4xx}
135indicates that the debug exception enable (DE) bit in the MSR is supported
136by this CPU model.  At this time, this particular debug feature set
137has only been seen in the IBM 4xx series.
138
139@end table
140
141@subsection Low Power Model
142
143The macro PPC_LOW_POWER_MODE is set to indicate the low power model
144supported by this CPU model.  The following low power modes are currently
145supported.
146
147@table @b
148
149@item @code{PPC_LOW_POWER_MODE_NONE}
150indicates that this CPU model has no low power mode support.
151
152@item @code{PPC_LOW_POWER_MODE_STANDARD}
153indicates that this CPU model follows the low power model defined for
154the PPC603e.
155
156@end table
Note: See TracBrowser for help on using the repository browser.