source: rtems/doc/supplements/sh/bsp.t @ 8f30e3e
Last change on this file since 8f30e3e was 8f30e3e, checked in by Joel Sherrill <joel.sherrill@…>, on 11/25/98 at 16:25:12

First Cut at Hitachi SH.

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