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 _BSP_H |
---|
23 | #define _BSP_H |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | #include <bspopts.h> |
---|
30 | |
---|
31 | #include <rtems.h> |
---|
32 | #include <leon.h> |
---|
33 | #include <rtems/clockdrv.h> |
---|
34 | #include <rtems/console.h> |
---|
35 | |
---|
36 | /* SPARC CPU variant: LEON3 */ |
---|
37 | #define LEON3 1 |
---|
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 | |
---|
47 | /* |
---|
48 | * Network driver configuration |
---|
49 | */ |
---|
50 | |
---|
51 | struct rtems_bsdnet_ifconfig; |
---|
52 | extern int rtems_leon_open_eth_driver_attach( |
---|
53 | struct rtems_bsdnet_ifconfig *config, |
---|
54 | int attach |
---|
55 | ); |
---|
56 | extern int rtems_smc91111_driver_attach_leon3( |
---|
57 | struct rtems_bsdnet_ifconfig *config, |
---|
58 | int attach |
---|
59 | ); |
---|
60 | extern int rtems_leon_greth_driver_attach( |
---|
61 | struct rtems_bsdnet_ifconfig *config, |
---|
62 | int attach |
---|
63 | ); |
---|
64 | |
---|
65 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_OPENETH "open_eth1" |
---|
66 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH rtems_leon_open_eth_driver_attach |
---|
67 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_SMC91111 "smc_eth1" |
---|
68 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 rtems_smc91111_driver_attach_leon3 |
---|
69 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH "gr_eth1" |
---|
70 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_GRETH rtems_leon_greth_driver_attach |
---|
71 | |
---|
72 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
73 | #define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH |
---|
74 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_NETWORK_DRIVER_ATTACH_GRETH |
---|
75 | #endif |
---|
76 | |
---|
77 | extern int CPU_SPARC_HAS_SNOOPING; |
---|
78 | |
---|
79 | |
---|
80 | /* Constants */ |
---|
81 | |
---|
82 | /* |
---|
83 | * Information placed in the linkcmds file. |
---|
84 | */ |
---|
85 | |
---|
86 | extern int RAM_START; |
---|
87 | extern int RAM_END; |
---|
88 | extern int RAM_SIZE; |
---|
89 | |
---|
90 | extern int PROM_START; |
---|
91 | extern int PROM_END; |
---|
92 | extern int PROM_SIZE; |
---|
93 | |
---|
94 | extern int CLOCK_SPEED; |
---|
95 | |
---|
96 | extern int end; /* last address in the program */ |
---|
97 | |
---|
98 | /* miscellaneous stuff assumed to exist */ |
---|
99 | |
---|
100 | void bsp_cleanup( void ); |
---|
101 | |
---|
102 | void bsp_start( void ); |
---|
103 | |
---|
104 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
105 | rtems_isr_entry handler, /* isr routine */ |
---|
106 | rtems_vector_number vector, /* vector number */ |
---|
107 | int type /* RTEMS or RAW intr */ |
---|
108 | ); |
---|
109 | |
---|
110 | void BSP_fatal_return( void ); |
---|
111 | |
---|
112 | void bsp_spurious_initialize( void ); |
---|
113 | |
---|
114 | #ifdef __cplusplus |
---|
115 | } |
---|
116 | #endif |
---|
117 | |
---|
118 | #endif |
---|
119 | |
---|
120 | |
---|