source: rtems/c/src/lib/libbsp/sparc/leon/include/bsp.h @ b21b0ab

4.104.114.84.95
Last change on this file since b21b0ab was b21b0ab, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 13, 2000 at 10:40:29 PM

2000-11-13 Jiri Gaisler <jgais@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.in, times, clock/.cvsignore, clock/Makefile.am, clock/ckinit.c, console/.cvsignore, console/Makefile.am, console/console.c, console/consolereserveresources.c, console/debugputs.c, gnatsupp/.cvsignore, gnatsupp/Makefile.am, gnatsupp/gnatsupp.c, include/.cvsignore, include/Makefile.am, include/bsp.h, include/coverhd.h, include/leon.h, start/.cvsignore, start/Makefile.am, startup/.cvsignore, startup/Makefile.am, startup/boardinit.S, startup/linkcmds, startup/setvec.c, startup/spurious.c, timer/.cvsignore, timer/Makefile.am, timer/timer.c, tools/.cvsignore, tools/Makefile.am, tools/configure.in, tools/runtest.in, wrapup/.cvsignore, wrapup/Makefile.am: New file.
  • 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-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
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 <iosupp.h>
32#include <leon.h>
33#include <clockdrv.h>
34
35#include <console.h>
36
37/*
38 *  confdefs.h overrides for this BSP:
39 *   - two termios serial ports
40 *   - Interrupt stack space is not minimum if defined.
41 */
42
43#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
44#define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
45
46
47/*
48 *  Define the time limits for RTEMS Test Suite test durations.
49 *  Long test and short test duration limits are provided.  These
50 *  values are in seconds and need to be converted to ticks for the
51 *  application.
52 *
53 */
54
55#define MAX_LONG_TEST_DURATION       3   /* 3 seconds */
56#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
57
58/*
59 *  Define the interrupt mechanism for Time Test 27
60 *
61 *  NOTE: Since the interrupt code for the SPARC supports both synchronous
62 *        and asynchronous trap handlers, support for testing with both
63 *        is included.
64 */
65
66#define SIS_USE_SYNCHRONOUS_TRAP  0
67
68/*
69 *  The synchronous trap is an arbitrarily chosen software trap.
70 */
71
72#if (SIS_USE_SYNCHRONOUS_TRAP == 1)
73
74#define TEST_VECTOR SPARC_SYNCHRONOUS_TRAP( 0x90 )
75
76#define MUST_WAIT_FOR_INTERRUPT 1
77
78#define Install_tm27_vector( handler ) \
79  set_vector( (handler), TEST_VECTOR, 1 );
80
81#define Cause_tm27_intr() \
82  asm volatile( "ta 0x10; nop " );
83
84#define Clear_tm27_intr() 
85
86#define Lower_tm27_intr()
87
88/*
89 *  The asynchronous trap is an arbitrarily chosen ERC32 interrupt source.
90 */
91
92#else   /* use a regular asynchronous trap */
93
94#define TEST_INTERRUPT_SOURCE LEON_INTERRUPT_EXTERNAL_1
95#define TEST_VECTOR LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
96 
97#define MUST_WAIT_FOR_INTERRUPT 1
98 
99#define Install_tm27_vector( handler ) \
100  set_vector( (handler), TEST_VECTOR, 1 );
101 
102#define Cause_tm27_intr() \
103  do { \
104    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
105    nop(); \
106    nop(); \
107    nop(); \
108  } while (0)
109 
110#define Clear_tm27_intr() \
111  LEON_Clear_interrupt( TEST_INTERRUPT_SOURCE )
112 
113#define Lower_tm27_intr()
114
115#endif
116
117/*
118 *  Simple spin delay in microsecond units for device drivers.
119 *  This is very dependent on the clock speed of the target.
120 */
121
122extern void Clock_delay(rtems_unsigned32 microseconds);
123
124#define delay( microseconds ) Clock_delay(microseconds)
125
126/* Constants */
127
128/*
129 *  Information placed in the linkcmds file.
130 */
131
132extern int   RAM_START;
133extern int   RAM_END;
134extern int   RAM_SIZE;
135 
136extern int   PROM_START;
137extern int   PROM_END;
138extern int   PROM_SIZE;
139
140extern int   CLOCK_SPEED;
141 
142extern int   end;        /* last address in the program */
143
144/*
145 *  Device Driver Table Entries
146 */
147 
148/*
149 * NOTE: Use the standard Console driver entry
150 */
151 
152/*
153 * NOTE: Use the standard Clock driver entry
154 */
155 
156 
157/* miscellaneous stuff assumed to exist */
158
159void bsp_cleanup( void );
160
161void bsp_start( void );
162
163rtems_isr_entry set_vector(                     /* returns old vector */
164    rtems_isr_entry     handler,                /* isr routine        */
165    rtems_vector_number vector,                 /* vector number      */
166    int                 type                    /* RTEMS or RAW intr  */
167);
168
169void DEBUG_puts( char *string );
170
171void BSP_fatal_return( void );
172
173void bsp_spurious_initialize( void );
174
175extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
176
177extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
178
179#ifdef __cplusplus
180}
181#endif
182
183#endif
184/* end of include file */
Note: See TracBrowser for help on using the repository browser.