source: rtems/doc/cpu_supplement/arm.t @ 48cfe68

4.115
Last change on this file since 48cfe68 was 48cfe68, checked in by Sebastian Huber <sebastian.huber@…>, on 12/15/14 at 14:22:18

doc: Add multilib section to CPU supplement

Add multilib section for ARM and PowerPC

  • Property mode set to 100644
File size: 5.5 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 ARM family has a wide variety of
13implementations by a wide range of vendors.  Consequently, there are many, many
14CPU models within it.  Currently the ARMv5 (and compatible) architecture
15version as defined in the @code{ARMv5 Architecture Reference Manual} is supported by RTEMS.
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 ARMv5 (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
143@subsection Interrupt Levels
144
145The RTEMS interrupt level mapping scheme for the ARM is not a numeric level as
146on most RTEMS ports.  It is a bit mapping that corresponds the enable bit
147postions in the Current Program Status Register (CPSR).  There are only two
148levels: IRQ enabled and IRQ disabled.
149 
150@subsection Interrupt Stack
151
152The board support package must initialize the interrupt stack. The memory for
153the stacks is usually reserved in the linker script.
154
155@section Default Fatal Error Processing
156
157The default fatal error handler for this architecture performs the
158following actions:
159
160@itemize @bullet
161@item disables operating system supported interrupts (IRQ),
162@item places the error code in @code{r0}, and
163@item executes an infinite loop to simulate a halt processor instruction.
164@end itemize
165
166@section Thread-Local Storage
167
168Thread-local storage is supported.
Note: See TracBrowser for help on using the repository browser.