[b812f84] | 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 |
---|
[1626fcc] | 11 | * http://www.rtems.com/license/LICENSE. |
---|
[b812f84] | 12 | * |
---|
| 13 | * $Id$ |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | #ifndef __BSVC_SIM |
---|
| 17 | #define __BSVC_SIM |
---|
| 18 | |
---|
| 19 | #ifdef __cplusplus |
---|
| 20 | extern "C" { |
---|
| 21 | #endif |
---|
| 22 | |
---|
[4906d72f] | 23 | #include <bspopts.h> |
---|
| 24 | |
---|
[b812f84] | 25 | #include <rtems.h> |
---|
[fb7a141] | 26 | #include <rtems/iosupp.h> |
---|
| 27 | #include <rtems/console.h> |
---|
| 28 | #include <rtems/clockdrv.h> |
---|
[b812f84] | 29 | |
---|
| 30 | /* |
---|
| 31 | * Define some hardware constants here |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | /* |
---|
| 35 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 36 | * Long test and short test duration limits are provided. These |
---|
| 37 | * values are in seconds and need to be converted to ticks for the |
---|
| 38 | * application. |
---|
| 39 | * |
---|
| 40 | */ |
---|
| 41 | |
---|
| 42 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 43 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 44 | |
---|
| 45 | /* |
---|
| 46 | * Define the interrupt mechanism for Time Test 27 |
---|
| 47 | * |
---|
| 48 | * NOTE: Following are not defined for the BSVC Simulator YET. |
---|
| 49 | * |
---|
| 50 | */ |
---|
| 51 | |
---|
| 52 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 53 | |
---|
| 54 | #define Install_tm27_vector( handler ) /* set_vector( (handler), 6, 1 ) */ |
---|
| 55 | |
---|
| 56 | #define Cause_tm27_intr() |
---|
| 57 | |
---|
| 58 | #define Clear_tm27_intr() |
---|
| 59 | |
---|
| 60 | #define Lower_tm27_intr() |
---|
| 61 | |
---|
| 62 | /* |
---|
| 63 | * Simple spin delay in microsecond units for device drivers. |
---|
| 64 | * This is very dependent on the clock speed of the target. |
---|
| 65 | */ |
---|
| 66 | |
---|
[cf282090] | 67 | #define rtems_bsp_delay( microseconds ) \ |
---|
[f3e486aa] | 68 | { register uint32_t _delay=(microseconds); \ |
---|
| 69 | register uint32_t _tmp = 0; /* initialized to avoid warning */ \ |
---|
[b812f84] | 70 | asm volatile( "0: \ |
---|
| 71 | remo 3,31,%0 ; \ |
---|
| 72 | cmpo 0,%0 ; \ |
---|
| 73 | subo 1,%1,%1 ; \ |
---|
| 74 | cmpobne.t 0,%1,0b " \ |
---|
| 75 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 76 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | /* Constants */ |
---|
| 80 | |
---|
| 81 | /* miscellaneous stuff assumed to exist */ |
---|
| 82 | |
---|
| 83 | extern rtems_configuration_table BSP_Configuration; |
---|
| 84 | |
---|
| 85 | /* |
---|
| 86 | * Device Driver Table Entries |
---|
| 87 | */ |
---|
| 88 | |
---|
| 89 | /* |
---|
| 90 | * NOTE: Use the standard Console driver entry |
---|
| 91 | */ |
---|
| 92 | |
---|
| 93 | /* |
---|
| 94 | * NOTE: Use the standard Clock driver entry |
---|
| 95 | */ |
---|
| 96 | |
---|
| 97 | /* functions */ |
---|
| 98 | |
---|
| 99 | void bsp_cleanup( void ); |
---|
| 100 | |
---|
| 101 | m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); |
---|
| 102 | |
---|
| 103 | #ifdef __cplusplus |
---|
| 104 | } |
---|
| 105 | #endif |
---|
| 106 | |
---|
| 107 | #endif |
---|
| 108 | /* end of include file */ |
---|