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

4.104.114.84.95
Last change on this file since 47901d8 was dfde9d0, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/01 at 21:04:25

2001-10-12 Joel Sherrill <joel@…>

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