source: rtems/doc/cpu_supplement/arm.t @ 08135c85

5
Last change on this file since 08135c85 was 19078dc6, checked in by Sebastian Huber <sebastian.huber@…>, on 07/23/15 at 06:36:30

doc: Add SMP section to CPU Arch Supplement

  • Property mode set to 100644
File size: 6.1 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2002.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5
6@ifinfo
7@end ifinfo
8@chapter ARM Specific Information
9
10This chapter discusses the
11@uref{http://en.wikipedia.org/wiki/ARM_architecture,ARM architecture}
12dependencies in this port of RTEMS.  The ARMv4T (and compatible), ARMv7-A,
13ARMv7-R and ARMv7-M architecture versions are supported by RTEMS.  Processors
14with a MMU use a static configuration which is set up during system start.  SMP
15is supported.
16
17@subheading Architecture Documents
18
19For information on the ARM architecture refer to the
20@uref{http://infocenter.arm.com,ARM Infocenter}.
21
22@section CPU Model Dependent Features
23
24This section presents the set of features which vary
25across ARM implementations and are of importance to RTEMS.  The set of CPU
26model feature macros are defined in the file
27@file{cpukit/score/cpu/arm/rtems/score/arm.h} based upon the particular CPU
28model flags specified on the compilation command line.
29
30@subsection CPU Model Name
31
32The macro @code{CPU_MODEL_NAME} is a string which designates
33the architectural level of this CPU model.  See in
34@file{cpukit/score/cpu/arm/rtems/score/arm.h} for the values.
35
36@subsection Count Leading Zeroes Instruction
37
38The ARMv5 and later has the count leading zeroes @code{clz} instruction which
39could be used to speed up the find first bit operation.  The use of this
40instruction should significantly speed up the scheduling associated with a
41thread blocking.  This is currently not used.
42
43@subsection Floating Point Unit
44
45The following floating point units are supported.
46
47@itemize @bullet
48
49@item VFPv3-D32/NEON (for example available on Cortex-A processors)
50@item VFPv3-D16 (for example available on Cortex-R processors)
51@item FPv4-SP-D16 (for example available on Cortex-M processors)
52
53@end itemize
54
55@c
56@c
57@c
58@section Multilibs
59
60The following multilibs are available:
61
62@enumerate
63@item @code{.}: ARMv4T, ARM instruction set
64@item @code{thumb}: ARMv4T, Thumb-1 instruction set
65@item @code{thumb/armv6-m}: ARMv6M, subset of Thumb-2 instruction set
66@item @code{thumb/armv7-a}: ARMv7-A, Thumb-2 instruction set
67@item @code{thumb/armv7-a/neon/hard}: ARMv7-A, Thumb-2 instruction set with
68hard-float ABI Neon and VFP-D32 support
69@item @code{thumb/armv7-r}: ARMv7-R, Thumb-2 instruction set
70@item @code{thumb/armv7-r/vfpv3-d16/hard}: ARMv7-R, Thumb-2 instruction set
71with hard-float ABI VFP-D16 support
72@item @code{thumb/armv7-m}: ARMv7-M, Thumb-2 instruction set with hardware
73integer division (SDIV/UDIV)
74@item @code{thumb/armv7-m/fpv4-sp-d16}: ARMv7-M, Thumb-2 instruction set with
75hardware integer division (SDIV/UDIV) and hard-float ABI FPv4-SP support
76@item @code{eb/thumb/armv7-r}: ARMv7-R, Big-endian Thumb-2 instruction set
77@item @code{eb/thumb/armv7-r/vfpv3-d16/hard}: ARMv7-R, Big-endian Thumb-2
78instruction set with hard-float ABI VFP-D16 support
79@end enumerate
80
81Multilib 1. and 2. support the standard ARM7TDMI and ARM926EJ-S targets.
82
83Multilib 3. supports the Cortex-M0 and Cortex-M1 cores.
84
85Multilib 8. supports the Cortex-M3 and Cortex-M4 cores, which have a special
86hardware integer division instruction (this is not present in the A and R
87profiles).
88
89Multilib 9. supports the Cortex-M4 cores with a floating point unit.
90
91Multilib 4. and 5. support the Cortex-A processors.
92
93Multilib 6., 7., 10. and 11. support the Cortex-R processors.  Here also
94big-endian variants are available.
95
96Use for example the following GCC options
97
98@example
99-mthumb -march=armv7-a -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9
100@end example
101
102to build an application or BSP for the ARMv7-A architecture and tune the code
103for a Cortex-A9 processor.  It is important to select the options used for the
104multilibs. For example
105
106@example
107-mthumb -mcpu=cortex-a9
108@end example
109
110alone will not select the ARMv7-A multilib.
111
112@section Calling Conventions
113
114Please refer to the
115@uref{http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/IHI0042C_aapcs.pdf,Procedure Call Standard for the ARM Architecture}.
116
117@section Memory Model
118
119A flat 32-bit memory model is supported.  The board support package must take
120care about the MMU if necessary.
121
122@section Interrupt Processing
123
124The ARMv4T (and compatible) architecture has seven exception types:
125
126@itemize @bullet
127
128@item Reset
129@item Undefined
130@item Software Interrupt (SWI)
131@item Prefetch Abort
132@item Data Abort
133@item Interrupt (IRQ)
134@item Fast Interrupt (FIQ)
135
136@end itemize
137
138Of these types only the IRQ has explicit operating system support.  It is
139intentional that the FIQ is not supported by the operating system.  Without
140operating system support for the FIQ it is not necessary to disable them during
141critical sections of the system.
142
143The ARMv7-M architecture has a completely different exception model.  Here
144interrupts are disabled with a write of 0x80 to the @code{basepri_max}
145register.  This means that all exceptions and interrupts with a priority value
146of greater than or equal to 0x80 are disabled.  Thus exceptions and interrupts
147with a priority value of less than 0x80 are non-maskable with respect to the
148operating system and therefore must not use operating system services.  Several
149support libraries of chip vendors implicitly shift the priority value somehow
150before the value is written to the NVIC IPR register.  This can easily lead to
151confusion.
152
153@subsection Interrupt Levels
154
155There are exactly two interrupt levels on ARM with respect to RTEMS.  Level
156zero corresponds to interrupts enabled.  Level one corresponds to interrupts
157disabled.
158 
159@subsection Interrupt Stack
160
161The board support package must initialize the interrupt stack. The memory for
162the stacks is usually reserved in the linker script.
163
164@section Default Fatal Error Processing
165
166The default fatal error handler for this architecture performs the
167following actions:
168
169@itemize @bullet
170@item disables operating system supported interrupts (IRQ),
171@item places the error code in @code{r0}, and
172@item executes an infinite loop to simulate a halt processor instruction.
173@end itemize
174
175@section Symmetric Multiprocessing
176
177SMP is supported on ARMv7-A.  Available platforms are the Altera Cyclone V and
178the Xilinx Zynq.
179
180@section Thread-Local Storage
181
182Thread-local storage is supported.
Note: See TracBrowser for help on using the repository browser.