source: rtems/c/src/lib/libbsp/i386/i386ex/include/bsp.h @ d1dbcab9

4.104.114.84.95
Last change on this file since d1dbcab9 was d1dbcab9, checked in by Joel Sherrill <joel.sherrill@…>, on 10/15/96 at 21:00:41

reference to Force CPU-386 removed.

added standard comments about driver entries.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*
2 *  This include file definitions related to an Intel i386ex board.
3 *
4 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
5 *  On-Line Applications Research Corporation (OAR).
6 *  All rights assigned to U.S. Government, 1994.
7 *
8 *  This material may be reproduced by or for the U.S. Government pursuant
9 *  to the copyright license under the clause at DFARS 252.227-7013.  This
10 *  notice must appear in all copies of this file and its derivatives.
11 *
12 *  $Id$
13 */
14
15#ifndef __FORCE386_h
16#define __FORCE386_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <rtems.h>
23#include <iosupp.h>
24
25/*
26 *  Define the time limits for RTEMS Test Suite test durations.
27 *  Long test and short test duration limits are provided.  These
28 *  values are in seconds and need to be converted to ticks for the
29 *  application.
30 *
31 */
32
33#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
34#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
35
36/*
37 *  Define the interrupt mechanism for Time Test 27
38 *
39 *  NOTE: Use a software interrupt for the i386.
40 */
41
42#define MUST_WAIT_FOR_INTERRUTPT 0
43
44#define Install_tm27_vector( handler ) set_vector( (handler), 0x90, 1 )
45
46#define Cause_tm27_intr()              asm volatile( "int $0x90" : : );
47
48#define Clear_tm27_intr()
49
50#define Lower_tm27_intr()
51
52/*
53 *  Simple spin delay in microsecond units for device drivers.
54 *  This is very dependent on the clock speed of the target.
55 */
56
57#define delay( _microseconds ) \
58  { \
59    rtems_unsigned32 _counter; \
60    \
61    _counter = (_microseconds); \
62    \
63    asm volatile ( "0: nop;" \
64                   " mov %0,%0 ;" \
65                   " loop 0b" : "=c" (_counter) \
66                              : "0"  (_counter) \
67                 ); \
68    \
69  }
70
71/* Constants */
72
73#define RAM_START 0
74
75/* replaced the earlier EI kludge of 0xfffff */
76
77#define RAM_END   0x100000
78
79/* I/O addressing */
80
81/*
82 *#define Is_tx_ready( _status ) ( (_status) & 0x20 )
83 */
84/* dec 20. try the TE instead of TBE as the check */
85
86#define Is_tx_ready( _status ) ( (_status) & 0x40 )
87
88
89#define Is_rx_ready( _status ) ( (_status) & 0x01 )
90
91/* Timer constants: WE DON'T use THESE */
92
93#define IERA   0x106     /* Interrupt Enable Register A */
94#define IMRA   0x112     /* Interrupt Mask Register A */
95#define TACR   0x118     /* Timer A Control Register */
96#define TADR   0x11e     /* Timer A Data Register */
97
98#define IERB   0x108     /* Interrupt Enable Register B */
99#define TBCR   0x11a     /* Timer B Control Register */
100#define TBDR   0x120     /* Timer B Data Register */
101
102/* Structures */
103
104#ifdef F386_INIT
105#undef BSP_EXTERN
106#define BSP_EXTERN
107#else
108#undef BSP_EXTERN
109#define BSP_EXTERN extern
110#endif
111
112/*
113 *  Device Driver Table Entries
114 */
115 
116/*
117 * NOTE: Use the standard Console driver entry
118 */
119 
120/*
121 * NOTE: Use the standard Clock driver entry
122 */
123 
124/*
125 * How many libio files we want
126 */
127 
128#define BSP_LIBIO_MAX_FDS       20
129
130/* miscellaneous stuff assumed to exist */
131
132extern rtems_configuration_table BSP_Configuration;
133
134extern i386_IDT_slot Interrupt_descriptor_table[ 256 ];
135extern i386_GDT_slot Global_descriptor_table[ 8192 ];
136
137BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
138BSP_EXTERN unsigned short Gdt[3];  /* Global Descriptor Table Address */
139BSP_EXTERN unsigned int   Idt_base;
140BSP_EXTERN unsigned int   Gdt_base;
141
142/* routines */
143
144i386_isr_entry set_vector(
145  rtems_isr_entry     handler,
146  rtems_vector_number vector,
147  int                 type
148);
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif
155/* end of include file */
Note: See TracBrowser for help on using the repository browser.