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

4.104.114.84.95
Last change on this file since 7f96eef was 7f96eef, checked in by Joel Sherrill <joel.sherrill@…>, on 12/02/96 at 22:36:28

Replacement for the sis bsp which supports the simulator and real
hardware. From Jiri Gaisler <jgais@…>. Supports sis
2.6 and later.

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