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

4.104.114.84.95
Last change on this file since bd8c8b2a was bd8c8b2a, checked in by Joel Sherrill <joel.sherrill@…>, on 08/05/98 at 16:51:39

Patch from Eric Valette <valette@…> which brings the i386ex BSP
inline with the new IRQ structure.

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