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

4.104.114.84.95
Last change on this file since 98e4ebf5 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

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