source: rtems/doc/supplements/sparc/bsp.t @ 03889c1

4.104.114.84.95
Last change on this file since 03889c1 was 03889c1, checked in by Joel Sherrill <joel.sherrill@…>, on 10/19/98 at 21:46:32

All of the Supplemental manuals are now generated as automatically
as possible.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1998.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@chapter Board Support Packages
10
11@section Introduction
12
13An RTEMS Board Support Package (BSP) must be designed
14to support a particular processor and target board combination.
15This chapter presents a discussion of SPARC specific BSP issues.
16For more information on developing a BSP, refer to the chapter
17titled Board Support Packages in the RTEMS
18Applications User's Guide.
19
20@section System Reset
21
22An RTEMS based application is initiated or
23re-initiated when the SPARC processor is reset.  When the SPARC
24is reset, the processor performs the following actions:
25
26@itemize @bullet
27@item the enable trap (ET) of the psr is set to 0 to disable
28traps,
29
30@item the supervisor bit (S) of the psr is set to 1 to enter
31supervisor mode, and
32
33@item the PC is set 0 and the nPC is set to 4.
34@end itemize
35
36The processor then begins to execute the code at
37location 0.  It is important to note that all fields in the psr
38are not explicitly set by the above steps and all other
39registers retain their value from the previous execution mode.
40This is true even of the Trap Base Register (TBR) whose contents
41reflect the last trap which occurred before the reset.
42
43@section Processor Initialization
44
45It is the responsibility of the application's
46initialization code to initialize the TBR and install trap
47handlers for at least the register window overflow and register
48window underflow conditions.  Traps should be enabled before
49invoking any subroutines to allow for register window
50management.  However, interrupts should be disabled by setting
51the Processor Interrupt Level (pil) field of the psr to 15.
52RTEMS installs it's own Trap Table as part of initialization
53which is initialized with the contents of the Trap Table in
54place when the @code{rtems_initialize_executive} directive was invoked.
55Upon completion of executive initialization, interrupts are
56enabled.
57
58If this SPARC implementation supports on-chip caching
59and this is to be utilized, then it should be enabled during the
60reset application initialization code.
61
62In addition to the requirements described in the
63Board Support Packages chapter of the @value{LANGUAGE}
64Applications User's Manual for the reset code
65which is executed before the call to
66@code{rtems_initialize_executive}, the SPARC version has the following
67specific requirements:
68
69@itemize @bullet
70@item Must leave the S bit of the status register set so that
71the SPARC remains in the supervisor state.
72
73@item Must set stack pointer (sp) such that a minimum stack
74size of MINIMUM_STACK_SIZE bytes is provided for the
75@code{rtems_initialize_executive} directive.
76
77@item Must disable all external interrupts (i.e. set the pil
78to 15).
79
80@item Must enable traps so window overflow and underflow
81conditions can be properly handled.
82
83@item Must initialize the SPARC's initial trap table with at
84least trap handlers for register window overflow and register
85window underflow.
86@end itemize
87
Note: See TracBrowser for help on using the repository browser.