source: rtems-docs/cpu_supplement/arm.rst @ f916fca

4.115
Last change on this file since f916fca was d755cbd, checked in by Amar Takhar <amar@…>, on 01/17/16 at 01:13:02

Split document into seperate files by section.

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