[cd67dca] | 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 |
---|
[b5bc659] | 25 | * http://www.rtems.com/license/LICENSE. |
---|
[cd67dca] | 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 <clockdrv.h> |
---|
| 50 | #include <console.h> |
---|
| 51 | #include <ramdisk.h> |
---|
| 52 | |
---|
[19b704cd] | 53 | #include <bspopts.h> |
---|
| 54 | |
---|
[cd67dca] | 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 | /* |
---|
| 108 | * Defined in the linker script 'linkcmds' |
---|
| 109 | */ |
---|
| 110 | |
---|
| 111 | extern unsigned32 HeapStart ; |
---|
| 112 | extern unsigned32 HeapEnd ; |
---|
| 113 | extern unsigned32 WorkSpaceStart ; |
---|
| 114 | extern unsigned32 WorkSpaceEnd ; |
---|
| 115 | |
---|
| 116 | extern void *CPU_Interrupt_stack_low ; |
---|
| 117 | extern void *CPU_Interrupt_stack_high ; |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | /* miscellaneous stuff assumed to exist */ |
---|
| 121 | |
---|
| 122 | extern rtems_configuration_table BSP_Configuration; |
---|
| 123 | |
---|
| 124 | extern rtems_cpu_table Cpu_table; |
---|
| 125 | |
---|
| 126 | extern void bsp_cleanup( void ); |
---|
| 127 | |
---|
| 128 | /* |
---|
| 129 | * Device Driver Table Entries |
---|
| 130 | */ |
---|
| 131 | |
---|
| 132 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
| 133 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
| 134 | { console_initialize, console_open, console_close, \ |
---|
| 135 | console_read, console_write, console_control } |
---|
| 136 | |
---|
| 137 | #define RAMDISK_DRIVER_TABLE_ENTRY \ |
---|
| 138 | { ramdisk_initialize, ramdisk_open, ramdisk_close, \ |
---|
| 139 | ramdisk_read, ramdisk_write, ramdisk_control } |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | /* |
---|
| 143 | * NOTE: Use the standard Clock driver entry |
---|
| 144 | */ |
---|
| 145 | |
---|
| 146 | /* |
---|
| 147 | * Trap interface with simulator |
---|
| 148 | */ |
---|
| 149 | int __trap34(); |
---|
| 150 | |
---|
| 151 | #ifdef __cplusplus |
---|
| 152 | } |
---|
| 153 | #endif |
---|
| 154 | |
---|
| 155 | #endif |
---|
| 156 | /* end of include file */ |
---|