source: rtems/c/src/lib/libbsp/sparc/leon2/include/bsp.h @ d2a30c77

Last change on this file since d2a30c77 was d2a30c77, checked in by Joel Sherrill <joel.sherrill@…>, on 10/05/05 at 19:25:45

2005-10-05 Jiri Gaisler <jiri@…>

Edvin Catovic <edvin@…>
Konrad Eisele <konrad@…>

PR 827/bsps

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