1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains some definitions specific to the |
---|
4 | * BSVC simulator BSP. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2000. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.OARcorp.com/rtems/license.html. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __BSVC_SIM |
---|
17 | #define __BSVC_SIM |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <rtems.h> |
---|
24 | #include <iosupp.h> |
---|
25 | #include <console.h> |
---|
26 | #include <clockdrv.h> |
---|
27 | |
---|
28 | /* |
---|
29 | * Define some hardware constants here |
---|
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 | * Define the interrupt mechanism for Time Test 27 |
---|
45 | * |
---|
46 | * NOTE: Following are not defined for the BSVC Simulator YET. |
---|
47 | * |
---|
48 | */ |
---|
49 | |
---|
50 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
51 | |
---|
52 | #define Install_tm27_vector( handler ) /* set_vector( (handler), 6, 1 ) */ |
---|
53 | |
---|
54 | #define Cause_tm27_intr() |
---|
55 | |
---|
56 | #define Clear_tm27_intr() |
---|
57 | |
---|
58 | #define Lower_tm27_intr() |
---|
59 | |
---|
60 | /* |
---|
61 | * Simple spin delay in microsecond units for device drivers. |
---|
62 | * This is very dependent on the clock speed of the target. |
---|
63 | */ |
---|
64 | |
---|
65 | #define delay( microseconds ) \ |
---|
66 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
67 | register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \ |
---|
68 | asm volatile( "0: \ |
---|
69 | remo 3,31,%0 ; \ |
---|
70 | cmpo 0,%0 ; \ |
---|
71 | subo 1,%1,%1 ; \ |
---|
72 | cmpobne.t 0,%1,0b " \ |
---|
73 | : "=d" (_tmp), "=d" (_delay) \ |
---|
74 | : "0" (_tmp), "1" (_delay) ); \ |
---|
75 | } |
---|
76 | |
---|
77 | /* Constants */ |
---|
78 | |
---|
79 | /* miscellaneous stuff assumed to exist */ |
---|
80 | |
---|
81 | extern rtems_configuration_table BSP_Configuration; |
---|
82 | |
---|
83 | /* |
---|
84 | * Device Driver Table Entries |
---|
85 | */ |
---|
86 | |
---|
87 | /* |
---|
88 | * NOTE: Use the standard Console driver entry |
---|
89 | */ |
---|
90 | |
---|
91 | /* |
---|
92 | * NOTE: Use the standard Clock driver entry |
---|
93 | */ |
---|
94 | |
---|
95 | /* functions */ |
---|
96 | |
---|
97 | void bsp_cleanup( void ); |
---|
98 | |
---|
99 | m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); |
---|
100 | |
---|
101 | #ifdef __cplusplus |
---|
102 | } |
---|
103 | #endif |
---|
104 | |
---|
105 | #endif |
---|
106 | /* end of include file */ |
---|