source: rtems/c/src/lib/libbsp/sparc/erc32/include/bsp.h @ e4c07444

4.104.114.84.95
Last change on this file since e4c07444 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all SPARC simulator definitions.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
13 *  Research Corporation (OAR) under contract to the European Space
14 *  Agency (ESA).
15 *
16 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
17 *  European Space Agency.
18 *
19 *  $Id$
20 */
21
22#ifndef __SIS_h
23#define __SIS_h
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <rtems.h>
30#include <clockdrv.h>
31#include <console.h>
32#include <iosupp.h>
33#include <erc32.h>
34
35/*
36 *  Define the time limits for RTEMS Test Suite test durations.
37 *  Long test and short test duration limits are provided.  These
38 *  values are in seconds and need to be converted to ticks for the
39 *  application.
40 *
41 */
42
43#define MAX_LONG_TEST_DURATION       3   /* 3 seconds */
44#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
45
46/*
47 *  Define the interrupt mechanism for Time Test 27
48 *
49 *  NOTE: Since the interrupt code for the SPARC supports both synchronous
50 *        and asynchronous trap handlers, support for testing with both
51 *        is included.
52 */
53
54#define SIS_USE_SYNCHRONOUS_TRAP  0
55
56/*
57 *  The synchronous trap is an arbitrarily chosen software trap.
58 */
59
60#if (SIS_USE_SYNCHRONOUS_TRAP == 1)
61
62#define TEST_VECTOR SPARC_SYNCHRONOUS_TRAP( 0x90 )
63
64#define MUST_WAIT_FOR_INTERRUPT 1
65
66#define Install_tm27_vector( handler ) \
67  set_vector( (handler), TEST_VECTOR, 1 );
68
69#define Cause_tm27_intr() \
70  asm volatile( "ta 0x10; nop " );
71
72#define Clear_tm27_intr() 
73
74#define Lower_tm27_intr()
75
76/*
77 *  The asynchronous trap is an arbitrarily chosen ERC32 interrupt source.
78 */
79
80#else   /* use a regular asynchronous trap */
81
82#define TEST_INTERRUPT_SOURCE ERC32_INTERRUPT_EXTERNAL_1
83#define TEST_VECTOR ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
84 
85#define MUST_WAIT_FOR_INTERRUPT 1
86 
87#define Install_tm27_vector( handler ) \
88  set_vector( (handler), TEST_VECTOR, 1 );
89 
90#define Cause_tm27_intr() \
91  do { \
92    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
93    nop(); \
94    nop(); \
95    nop(); \
96  } while (0)
97 
98#define Clear_tm27_intr() \
99  ERC32_Clear_interrupt( TEST_INTERRUPT_SOURCE )
100 
101#define Lower_tm27_intr()
102
103#endif
104
105/*
106 *  Simple spin delay in microsecond units for device drivers.
107 *  This is very dependent on the clock speed of the target.
108 */
109
110extern void Clock_delay(rtems_unsigned32 microseconds);
111
112#define delay( microseconds ) Clock_delay(microseconds)
113
114/* Constants */
115
116/*
117 *  Information placed in the linkcmds file.
118 */
119
120extern int   RAM_START;
121extern int   RAM_END;
122extern int   RAM_SIZE;
123 
124extern int   PROM_START;
125extern int   PROM_END;
126extern int   PROM_SIZE;
127
128extern int   CLOCK_SPEED;
129 
130extern int   end;        /* last address in the program */
131
132/*
133 *  Device Driver Table Entries
134 */
135 
136/*
137 * NOTE: Use the standard Console driver entry
138 */
139 
140/*
141 * NOTE: Use the standard Clock driver entry
142 */
143 
144 
145/* miscellaneous stuff assumed to exist */
146
147void bsp_cleanup( void );
148
149void bsp_start( void );
150
151rtems_isr_entry set_vector(                     /* returns old vector */
152    rtems_isr_entry     handler,                /* isr routine        */
153    rtems_vector_number vector,                 /* vector number      */
154    int                 type                    /* RTEMS or RAW intr  */
155);
156
157void DEBUG_puts( char *string );
158
159void BSP_fatal_return( void );
160
161void bsp_spurious_initialize( void );
162
163extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
164
165extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
166
167#ifdef __cplusplus
168}
169#endif
170
171#endif
172/* end of include file */
Note: See TracBrowser for help on using the repository browser.