source: rtems/doc/cpu_supplement/bfin.t @ f9a59795

4.11
Last change on this file since f9a59795 was f9a59795, 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: 4.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2006.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5
6@ifinfo
7@end ifinfo
8@chapter Blackfin Specific Information
9
10This chapter discusses the Blackfin architecture dependencies in this
11port of RTEMS.
12
13@subheading Architecture Documents
14
15For information on the Blackfin architecture, refer to the following
16documents available from Analog Devices.
17
18TBD
19
20@itemize @bullet
21@item @cite{"ADSP-BF533 Blackfin Processor Hardware Reference."}
22@file{http://www.analog.com/UploadedFiles/Associated_Docs/892485982bf533_hwr.pdf}
23
24@end itemize
25
26
27@section CPU Model Dependent Features
28
29CPUs of the Blackfin 53X only differ in the peripherals and thus in the
30device drivers. This port does not yet support the 56X dual core variants.
31
32@subsection Count Leading Zeroes Instruction
33
34The Blackfin CPU has the BITTST instruction which could be used to speed
35up the find first bit operation.  The use of this instruction should
36significantly speed up the scheduling associated with a thread blocking.
37
38@section Calling Conventions
39
40This section is heavily based on content taken from the Blackfin uCLinux
41documentation wiki which is edited by Analog Devices and Arcturus
42Networks.  @file{http://docs.blackfin.uclinux.org/}
43
44@subsection Processor Background
45
46The Blackfin architecture supports a simple call and return mechanism.
47A subroutine is invoked via the call (@code{call}) instruction.
48This instruction saves the return address in the @code{RETS} register
49and transfers the execution to the given address.
50
51It is the called funcions responsability to use the link instruction
52to reserve space on the stack for the local variables.  Returning from
53a subroutine is done by using the RTS (@code{RTS}) instruction which
54loads the PC with the adress stored in RETS.
55
56It is is important to note that the @code{call} instruction does not
57automatically save or restore any registers.  It is the responsibility
58of the high-level language compiler to define the register preservation
59and usage convention.
60
61@subsection Register Usage
62
63A called function may clobber all registers, except RETS, R4-R7, P3-P5,
64FP and SP.  It may also modify the first 12 bytes in the caller’s stack
65frame which is used as an argument area for the first three arguments
66(which are passed in R0...R3 but may be placed on the stack by the
67called function).
68
69@subsection Parameter Passing
70
71RTEMS assumes that the Blackfin GCC calling convention is followed.
72The first three parameters are stored in registers R0, R1, and R2.
73All other parameters are put pushed on the stack.  The result is returned
74through register R0.
75
76@section Memory Model
77
78The Blackfin family architecutre support a single unified 4 GB byte
79address space using 32-bit addresses. It maps all resources like internal
80and external memory and IO registers into separate sections of this
81common address space.
82
83The Blackfin architcture supports some form of memory
84protection via its Memory Management Unit. Since the
85Blackfin port runs in supervisior mode this memory
86protection mechanisms are not used.
87
88@section Interrupt Processing
89
90Discussed in this chapter are the Blackfin's interrupt response and
91control mechanisms as they pertain to RTEMS. The Blackfin architecture
92support 16 kinds of interrupts broken down into Core and general-purpose
93interrupts.
94
95@subsection Vectoring of an Interrupt Handler
96
97RTEMS maps levels 0 -15 directly to Blackfins event vectors EVT0 -
98EVT15. Since EVT0 - EVT6 are core events and it is suggested to use
99EVT15 and EVT15 for Software interrupts, 7 Interrupts (EVT7-EVT13)
100are left for periferical use.
101
102When installing an RTEMS interrupt handler RTEMS installs a generic
103Interrupt Handler which saves some context and enables nested interrupt
104servicing and then vectors to the users interrupt handler.
105
106@subsection Disabling of Interrupts by RTEMS
107
108During interrupt disable critical sections, RTEMS disables interrupts to
109level four (4) before the execution of this section and restores them
110to the previous level upon completion of the section. RTEMS uses the
111instructions CLI and STI to enable and disable Interrupts. Emulation,
112Reset, NMI and Exception Interrupts are never disabled.
113
114@subsection Interrupt Stack
115
116The Blackfin Architecture works with two different kind of stacks,
117User and Supervisor Stack. Since RTEMS and its Application run
118in supervisor mode, all interrupts will use the interrupted
119tasks stack for execution.
120
121@section Default Fatal Error Processing
122
123The default fatal error handler for the Blackfin performs the following
124actions:
125
126@itemize @bullet
127@item disables processor interrupts,
128@item places the error code in @b{r0}, and
129@item executes an infinite loop (@code{while(0);} to
130simulate a halt processor instruction.
131@end itemize
132
133@section Symmetric Multiprocessing
134
135SMP is not supported.
136
137@section Thread-Local Storage
138
139Thread-local storage is not implemented.
140
141@section Board Support Packages
142
143
144@subsection System Reset
145
146TBD
Note: See TracBrowser for help on using the repository browser.