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 | |
---|
20 | #ifndef _BSP_H |
---|
21 | #define _BSP_H |
---|
22 | |
---|
23 | #ifdef __cplusplus |
---|
24 | extern "C" { |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <bspopts.h> |
---|
28 | |
---|
29 | #include <rtems.h> |
---|
30 | #include <leon.h> |
---|
31 | #include <rtems/clockdrv.h> |
---|
32 | #include <rtems/console.h> |
---|
33 | |
---|
34 | /* SPARC CPU variant: LEON3 */ |
---|
35 | #define LEON3 1 |
---|
36 | |
---|
37 | /* |
---|
38 | * BSP provides its own Idle thread body |
---|
39 | */ |
---|
40 | void *bsp_idle_thread( uintptr_t ignored ); |
---|
41 | #define BSP_IDLE_TASK_BODY bsp_idle_thread |
---|
42 | |
---|
43 | /* |
---|
44 | * Network driver configuration |
---|
45 | */ |
---|
46 | struct rtems_bsdnet_ifconfig; |
---|
47 | extern int rtems_leon_open_eth_driver_attach( |
---|
48 | struct rtems_bsdnet_ifconfig *config, |
---|
49 | int attach |
---|
50 | ); |
---|
51 | extern int rtems_smc91111_driver_attach_leon3( |
---|
52 | struct rtems_bsdnet_ifconfig *config, |
---|
53 | int attach |
---|
54 | ); |
---|
55 | extern int rtems_leon_greth_driver_attach( |
---|
56 | struct rtems_bsdnet_ifconfig *config, |
---|
57 | int attach |
---|
58 | ); |
---|
59 | |
---|
60 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_OPENETH "open_eth1" |
---|
61 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH rtems_leon_open_eth_driver_attach |
---|
62 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_SMC91111 "smc_eth1" |
---|
63 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 rtems_smc91111_driver_attach_leon3 |
---|
64 | #define RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH "gr_eth1" |
---|
65 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH_GRETH rtems_leon_greth_driver_attach |
---|
66 | |
---|
67 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
68 | #define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH |
---|
69 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_NETWORK_DRIVER_ATTACH_GRETH |
---|
70 | #endif |
---|
71 | |
---|
72 | #define HAS_SMC91111 |
---|
73 | |
---|
74 | /* Configure GRETH driver */ |
---|
75 | #define GRETH_SUPPORTED |
---|
76 | #define GRETH_MEM_LOAD(addr) leon_r32_no_cache(addr) |
---|
77 | |
---|
78 | extern int CPU_SPARC_HAS_SNOOPING; |
---|
79 | |
---|
80 | |
---|
81 | /* Constants */ |
---|
82 | |
---|
83 | /* |
---|
84 | * Information placed in the linkcmds file. |
---|
85 | */ |
---|
86 | |
---|
87 | extern int RAM_START; |
---|
88 | extern int RAM_END; |
---|
89 | extern int RAM_SIZE; |
---|
90 | |
---|
91 | extern int PROM_START; |
---|
92 | extern int PROM_END; |
---|
93 | extern int PROM_SIZE; |
---|
94 | |
---|
95 | extern int CLOCK_SPEED; |
---|
96 | |
---|
97 | extern int end; /* last address in the program */ |
---|
98 | |
---|
99 | /* miscellaneous stuff assumed to exist */ |
---|
100 | |
---|
101 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
102 | rtems_isr_entry handler, /* isr routine */ |
---|
103 | rtems_vector_number vector, /* vector number */ |
---|
104 | int type /* RTEMS or RAW intr */ |
---|
105 | ); |
---|
106 | |
---|
107 | void BSP_fatal_return( void ); |
---|
108 | |
---|
109 | void bsp_spurious_initialize( void ); |
---|
110 | |
---|
111 | /* Allocate 8-byte aligned non-freeable pre-malloc() memory. The function |
---|
112 | * can be called at any time. The work-area will shrink when called before |
---|
113 | * bsp_get_work_area(). malloc() is called to get memory when this function |
---|
114 | * is called after bsp_get_work_area(). |
---|
115 | */ |
---|
116 | void *bsp_early_malloc(int size); |
---|
117 | |
---|
118 | #ifdef __cplusplus |
---|
119 | } |
---|
120 | #endif |
---|
121 | |
---|
122 | #endif |
---|
123 | |
---|
124 | |
---|