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

4.104.114.84.95
Last change on this file since 3344730a was 3344730a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/21/04 at 16:21:25

2004-04-21 Ralf Corsepius <ralf_corsepius@…>

PR 613/bsps

  • include/bsp.h: Remove MAX_LONG_TEST_DURATION.
  • Property mode set to 100644
File size: 4.1 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.rtems.com/license/LICENSE.
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 <rtems/iosupp.h>
33#include <leon.h>
34#include <rtems/clockdrv.h>
35
36#include <rtems/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 * Network driver configuration
49 */
50
51struct rtems_bsdnet_ifconfig;
52extern int rtems_leon_open_eth_driver_attach (struct rtems_bsdnet_ifconfig *config);
53#define RTEMS_BSP_NETWORK_DRIVER_NAME   "open_eth1"
54#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_leon_open_eth_driver_attach
55
56/*
57 *  Define the interrupt mechanism for Time Test 27
58 *
59 *  NOTE: Since the interrupt code for the SPARC supports both synchronous
60 *        and asynchronous trap handlers, support for testing with both
61 *        is included.
62 */
63
64#define SIS_USE_SYNCHRONOUS_TRAP  0
65
66/*
67 *  The synchronous trap is an arbitrarily chosen software trap.
68 */
69
70#if (SIS_USE_SYNCHRONOUS_TRAP == 1)
71
72#define TEST_VECTOR SPARC_SYNCHRONOUS_TRAP( 0x90 )
73
74#define MUST_WAIT_FOR_INTERRUPT 1
75
76#define Install_tm27_vector( handler ) \
77  set_vector( (handler), TEST_VECTOR, 1 );
78
79#define Cause_tm27_intr() \
80  asm volatile( "ta 0x10; nop " );
81
82#define Clear_tm27_intr()
83
84#define Lower_tm27_intr()
85
86/*
87 *  The asynchronous trap is an arbitrarily chosen ERC32 interrupt source.
88 */
89
90#else   /* use a regular asynchronous trap */
91
92#define TEST_INTERRUPT_SOURCE LEON_INTERRUPT_EXTERNAL_1
93#define TEST_VECTOR LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
94#define TEST_INTERRUPT_SOURCE2 LEON_INTERRUPT_EXTERNAL_1+1
95#define TEST_VECTOR2 LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 )
96#define MUST_WAIT_FOR_INTERRUPT 1
97
98#define Install_tm27_vector( handler ) \
99  set_vector( (handler), TEST_VECTOR, 1 ); \
100  set_vector( (handler), TEST_VECTOR2, 1 );
101
102#define Cause_tm27_intr() \
103  do { \
104    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1)); \
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(uint32_t         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/* miscellaneous stuff assumed to exist */
157
158void bsp_cleanup( void );
159
160void bsp_start( void );
161
162rtems_isr_entry set_vector(                     /* returns old vector */
163    rtems_isr_entry     handler,                /* isr routine        */
164    rtems_vector_number vector,                 /* vector number      */
165    int                 type                    /* RTEMS or RAW intr  */
166);
167
168void DEBUG_puts( char *string );
169
170void BSP_fatal_return( void );
171
172void bsp_spurious_initialize( void );
173
174extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
175
176extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
177
178#ifdef __cplusplus
179}
180#endif
181
182#endif
183/* end of include file */
Note: See TracBrowser for help on using the repository browser.