source: rtems/doc/supplements/sparc/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.7 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 SPARC specific BSP issues.
27For more information on developing a BSP, refer to the chapter
28titled 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 SPARC processor is reset.  When the SPARC
38is reset, the processor performs the following actions:
39
40@itemize @bullet
41@item the enable trap (ET) of the psr is set to 0 to disable
42traps,
43
44@item the supervisor bit (S) of the psr is set to 1 to enter
45supervisor mode, and
46
47@item the PC is set 0 and the nPC is set to 4.
48@end itemize
49
50The processor then begins to execute the code at
51location 0.  It is important to note that all fields in the psr
52are not explicitly set by the above steps and all other
53registers retain their value from the previous execution mode.
54This is true even of the Trap Base Register (TBR) whose contents
55reflect the last trap which occurred before the reset.
56
57@ifinfo
58@node Board Support Packages Processor Initialization, Processor Dependent Information Table, Board Support Packages System Reset, Board Support Packages
59@end ifinfo
60@section Processor Initialization
61
62It is the responsibility of the application's
63initialization code to initialize the TBR and install trap
64handlers for at least the register window overflow and register
65window underflow conditions.  Traps should be enabled before
66invoking any subroutines to allow for register window
67management.  However, interrupts should be disabled by setting
68the Processor Interrupt Level (pil) field of the psr to 15.
69RTEMS installs it's own Trap Table as part of initialization
70which is initialized with the contents of the Trap Table in
71place when the rtems_initialize_executive directive was invoked.
72Upon completion of executive initialization, interrupts are
73enabled.
74
75If this SPARC implementation supports on-chip caching
76and this is to be utilized, then it should be enabled during the
77reset application initialization code.
78
79In addition to the requirements described in the
80Board Support Packages chapter of the @value{RTEMS-LANGUAGE}
81Applications User's Manual for the reset code
82which is executed before the call to
83rtems_initialize executive, the SPARC version has the following
84specific requirements:
85
86@itemize @bullet
87@item Must leave the S bit of the status register set so that
88the SPARC remains in the supervisor state.
89
90@item Must set stack pointer (sp) such that a minimum stack
91size of MINIMUM_STACK_SIZE bytes is provided for the
92rtems_initialize executive directive.
93
94@item Must disable all external interrupts (i.e. set the pil
95to 15).
96
97@item Must enable traps so window overflow and underflow
98conditions can be properly handled.
99
100@item Must initialize the SPARC's initial trap table with at
101least trap handlers for register window overflow and register
102window underflow.
103@end itemize
104
Note: See TracBrowser for help on using the repository browser.