1 | /* |
---|
2 | * This include file contains all board IO definitions. |
---|
3 | * |
---|
4 | * sh4 simulator bsp |
---|
5 | * |
---|
6 | * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia |
---|
7 | * Author: Victor V. Vengerov <vvv@oktet.ru> |
---|
8 | * Alexandra Kossovsky <sasha@oktet.ru> |
---|
9 | * |
---|
10 | * Based on work: |
---|
11 | * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
12 | * |
---|
13 | * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany |
---|
14 | * |
---|
15 | * This program is distributed in the hope that it will be useful, |
---|
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
18 | * |
---|
19 | * |
---|
20 | * COPYRIGHT (c) 1998-2001. |
---|
21 | * On-Line Applications Research Corporation (OAR). |
---|
22 | * |
---|
23 | * The license and distribution terms for this file may be |
---|
24 | * found in the file LICENSE in this distribution or at |
---|
25 | * http://www.rtems.com/license/LICENSE. |
---|
26 | * |
---|
27 | * Minor adaptations for sh2 by: |
---|
28 | * John M. Mills (jmills@tga.com) |
---|
29 | * TGA Technologies, Inc. |
---|
30 | * 100 Pinnacle Way, Suite 140 |
---|
31 | * Norcross, GA 30071 U.S.A. |
---|
32 | * |
---|
33 | * This modified file may be copied and distributed in accordance |
---|
34 | * the above-referenced license. It is provided for critique and |
---|
35 | * developmental purposes without any warranty nor representation |
---|
36 | * by the authors or by TGA Technologies. |
---|
37 | * |
---|
38 | * $Id$ |
---|
39 | */ |
---|
40 | |
---|
41 | #ifndef __simsh4_h |
---|
42 | #define __simsh4_h |
---|
43 | |
---|
44 | #ifdef __cplusplus |
---|
45 | extern "C" { |
---|
46 | #endif |
---|
47 | |
---|
48 | #include <rtems.h> |
---|
49 | #include <rtems/clockdrv.h> |
---|
50 | #include <rtems/console.h> |
---|
51 | #include <ramdisk.h> |
---|
52 | |
---|
53 | #include <bspopts.h> |
---|
54 | |
---|
55 | /* |
---|
56 | * confdefs.h overrides for this BSP: |
---|
57 | * - number of termios serial ports (defaults to 1) |
---|
58 | * - Interrupt stack space is not minimum if defined. |
---|
59 | */ |
---|
60 | |
---|
61 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1 |
---|
62 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024) |
---|
63 | |
---|
64 | /* !!! Should be defined in accordance to simulator considerations.*/ |
---|
65 | #define CLOCK_VECTOR 32 |
---|
66 | |
---|
67 | /* |
---|
68 | * Define the time limits for RTEMS Test Suite test durations. |
---|
69 | * Long test and short test duration limits are provided. These |
---|
70 | * values are in seconds and need to be converted to ticks for the |
---|
71 | * application. |
---|
72 | * |
---|
73 | */ |
---|
74 | |
---|
75 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
76 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
77 | |
---|
78 | /* |
---|
79 | * Stuff for Time Test 27 |
---|
80 | */ |
---|
81 | |
---|
82 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
83 | |
---|
84 | #define Install_tm27_vector( handler ) \ |
---|
85 | { \ |
---|
86 | rtems_isr_entry ignored ; \ |
---|
87 | rtems_interrupt_catch( (handler), 0, &ignored ) ; \ |
---|
88 | } |
---|
89 | |
---|
90 | #define Cause_tm27_intr() |
---|
91 | |
---|
92 | #define Clear_tm27_intr() |
---|
93 | |
---|
94 | #define Lower_tm27_intr() |
---|
95 | |
---|
96 | /* Constants */ |
---|
97 | |
---|
98 | /* |
---|
99 | * Simple spin delay in microsecond units for device drivers. |
---|
100 | * This is very dependent on the clock speed of the target. |
---|
101 | */ |
---|
102 | |
---|
103 | #define delay( microseconds ) CPU_delay(microseconds) |
---|
104 | #define sh_delay( microseconds ) CPU_delay( microseconds ) |
---|
105 | |
---|
106 | /* |
---|
107 | * Defined in the linker script 'linkcmds' |
---|
108 | */ |
---|
109 | |
---|
110 | extern uint32_t HeapStart ; |
---|
111 | extern uint32_t HeapEnd ; |
---|
112 | extern uint32_t WorkSpaceStart ; |
---|
113 | extern uint32_t WorkSpaceEnd ; |
---|
114 | |
---|
115 | extern void *CPU_Interrupt_stack_low ; |
---|
116 | extern void *CPU_Interrupt_stack_high ; |
---|
117 | |
---|
118 | /* miscellaneous stuff assumed to exist */ |
---|
119 | |
---|
120 | extern rtems_configuration_table BSP_Configuration; |
---|
121 | |
---|
122 | extern rtems_cpu_table Cpu_table; |
---|
123 | |
---|
124 | extern void bsp_cleanup( void ); |
---|
125 | |
---|
126 | /* |
---|
127 | * Device Driver Table Entries |
---|
128 | */ |
---|
129 | |
---|
130 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
131 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
132 | { console_initialize, console_open, console_close, \ |
---|
133 | console_read, console_write, console_control } |
---|
134 | |
---|
135 | #define RAMDISK_DRIVER_TABLE_ENTRY \ |
---|
136 | { ramdisk_initialize, ramdisk_open, ramdisk_close, \ |
---|
137 | ramdisk_read, ramdisk_write, ramdisk_control } |
---|
138 | |
---|
139 | /* |
---|
140 | * NOTE: Use the standard Clock driver entry |
---|
141 | */ |
---|
142 | |
---|
143 | /* |
---|
144 | * Trap interface with simulator |
---|
145 | */ |
---|
146 | int __trap34(); |
---|
147 | |
---|
148 | #ifdef __cplusplus |
---|
149 | } |
---|
150 | #endif |
---|
151 | |
---|
152 | #endif |
---|
153 | /* end of include file */ |
---|