source: rtems/doc/supplements/m68k/bsp.t @ 17a3c69

4.104.114.84.95
Last change on this file since 17a3c69 was 17a3c69, checked in by Joel Sherrill <joel.sherrill@…>, on 05/30/97 at 22:57:25

fixed typos

  • Property mode set to 100644
File size: 3.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1996.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6
7@ifinfo
8@node Board Support Packages, Board Support Packages Introduction, Default Fatal Error Processing Default Fatal Error Handler Operations, Top
9@end ifinfo
10@chapter Board Support Packages
11@ifinfo
12@menu
13* Board Support Packages Introduction::
14* Board Support Packages System Reset::
15* Board Support Packages Processor Initialization::
16@end menu
17@end ifinfo
18
19@ifinfo
20@node Board Support Packages Introduction, Board Support Packages System Reset, Board Support Packages, Board Support Packages
21@end ifinfo
22@section Introduction
23
24An RTEMS Board Support Package (BSP) must be designed
25to support a particular processor and target board combination.
26This chapter presents a discussion of MC68020 specific BSP
27issues.   For more information on developing a BSP, refer to the
28chapter titled Board Support Packages in the RTEMS
29Applications User's Guide.
30
31@ifinfo
32@node Board Support Packages System Reset, Board Support Packages Processor Initialization, Board Support Packages Introduction, Board Support Packages
33@end ifinfo
34@section System Reset
35
36An RTEMS based application is initiated or
37re-initiated when the MC68020 processor is reset.  When the
38MC68020 is reset, the processor performs the following actions:
39
40@itemize @bullet
41@item The tracing bits of the status register are cleared to
42disable tracing.
43
44@item The supervisor interrupt state is entered by setting the
45supervisor (S) bit and clearing the master/interrupt (M) bit of
46the status register.
47
48@item The interrupt mask of the status register is set to
49level 7 to effectively disable all maskable interrupts.
50
51@item The vector base register (VBR) is set to zero.
52
53@item The cache control register (CACR) is set to zero to
54disable and freeze the processor cache.
55
56@item The interrupt stack pointer (ISP) is set to the value
57stored at vector 0 (bytes 0-3) of the exception vector table
58(EVT).
59
60@item The program counter (PC) is set to the value stored at
61vector 1 (bytes 4-7) of the EVT.
62
63@item The processor begins execution at the address stored in
64the PC.
65@end itemize
66
67@ifinfo
68@node Board Support Packages Processor Initialization, Processor Dependent Information Table, Board Support Packages System Reset, Board Support Packages
69@end ifinfo
70@section Processor Initialization
71
72The address of the application's initialization code
73should be stored in the first vector of the EVT which will allow
74the immediate vectoring to the application code.  If the
75application requires that the VBR be some value besides zero,
76then it should be set to the required value at this point.  All
77tasks share the same MC68020's VBR value.  Because interrupts
78are enabled automatically by RTEMS as part of the initialize
79executive directive, the VBR MUST be set before this directive
80is invoked to insure correct interrupt vectoring.  If processor
81caching is to be utilized, then it should be enabled during the
82reset application initialization code.
83
84In addition to the requirements described in the
85Board Support Packages chapter of the Applications User's
86Manual for the reset code which is executed before the call to
87initialize executive, the MC68020 version has the following
88specific requirements:
89
90@itemize @bullet
91@item Must leave the S bit of the status register set so that
92the MC68020 remains in the supervisor state.
93
94@item Must set the M bit of the status register to remove the
95MC68020 from the interrupt state.
96
97@item Must set the master stack pointer (MSP) such that a
98minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
99the initialize executive directive.
100
101@item Must initialize the MC68020's vector table.
102@end itemize
103
104Note that the BSP is not responsible for allocating
105or installing the interrupt stack.  RTEMS does this
106automatically as part of initialization.  If the BSP does not
107install an interrupt stack and -- for whatever reason -- an
108interrupt occurs before initialize_executive is invoked, then
109the results are unpredictable.
110
Note: See TracBrowser for help on using the repository browser.