1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains all C4X Simulator IO definitions. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1999. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef __C4XSIM_h |
---|
16 | #define __C4XSIM_h |
---|
17 | |
---|
18 | #ifdef __cplusplus |
---|
19 | extern "C" { |
---|
20 | #endif |
---|
21 | |
---|
22 | #ifdef ASM |
---|
23 | |
---|
24 | #else |
---|
25 | #include <rtems.h> |
---|
26 | #include <console.h> |
---|
27 | #include <clockdrv.h> |
---|
28 | #include <console.h> |
---|
29 | #include <iosupp.h> |
---|
30 | |
---|
31 | |
---|
32 | /* |
---|
33 | * Define the time limits for RTEMS Test Suite test durations. |
---|
34 | * Long test and short test duration limits are provided. These |
---|
35 | * values are in seconds and need to be converted to ticks for the |
---|
36 | * application. |
---|
37 | * |
---|
38 | */ |
---|
39 | |
---|
40 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
41 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
42 | |
---|
43 | |
---|
44 | /* |
---|
45 | * Stuff for Time Test 27 |
---|
46 | */ |
---|
47 | |
---|
48 | #include <c4xio.h> |
---|
49 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
50 | |
---|
51 | /* XXX */ |
---|
52 | #define Install_tm27_vector( _handler ) \ |
---|
53 | set_vector( (_handler), 0x20, 1 ) |
---|
54 | |
---|
55 | #define Cause_tm27_intr() \ |
---|
56 | do { \ |
---|
57 | __asm__ volatile ( "trapu 0" ); \ |
---|
58 | } while (0) |
---|
59 | |
---|
60 | #define Clear_tm27_intr() \ |
---|
61 | do { \ |
---|
62 | ; \ |
---|
63 | } while (0) |
---|
64 | |
---|
65 | #define Lower_tm27_intr() \ |
---|
66 | do { \ |
---|
67 | c4x_global_interrupts_enable(); \ |
---|
68 | } while (0) |
---|
69 | |
---|
70 | /* Constants */ |
---|
71 | |
---|
72 | /* |
---|
73 | * Device Driver Table Entries |
---|
74 | */ |
---|
75 | |
---|
76 | /* |
---|
77 | * NOTE: Use the standard Console driver entry |
---|
78 | */ |
---|
79 | |
---|
80 | /* |
---|
81 | * NOTE: Use the standard Clock driver entry |
---|
82 | */ |
---|
83 | |
---|
84 | |
---|
85 | /* |
---|
86 | * Information placed in the linkcmds file. |
---|
87 | */ |
---|
88 | |
---|
89 | /* functions */ |
---|
90 | |
---|
91 | void bsp_start( void ); |
---|
92 | |
---|
93 | void bsp_cleanup( void ); |
---|
94 | |
---|
95 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
96 | rtems_isr_entry handler, /* isr routine */ |
---|
97 | rtems_vector_number vector, /* vector number */ |
---|
98 | int type /* RTEMS or RAW intr */ |
---|
99 | ); |
---|
100 | |
---|
101 | void BSP_fatal_return( void ); |
---|
102 | |
---|
103 | void bsp_spurious_initialize( void ); |
---|
104 | |
---|
105 | extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ |
---|
106 | |
---|
107 | extern rtems_cpu_table Cpu_table; /* owned by BSP */ |
---|
108 | |
---|
109 | extern rtems_unsigned32 bsp_isr_level; |
---|
110 | |
---|
111 | #endif /* ASM */ |
---|
112 | |
---|
113 | #ifdef __cplusplus |
---|
114 | } |
---|
115 | #endif |
---|
116 | |
---|
117 | #endif |
---|
118 | /* end of include file */ |
---|