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

4.104.114.84.95
Last change on this file since 45805cc was 45805cc, checked in by Joel Sherrill <joel.sherrill@…>, on 01/06/02 at 20:06:53

2002-01-03 Ralf Corsepius <corsepiu@…>

  • include/bsp.h: Include rtems/bspIo.h instead of bspIo.h.
  • Property mode set to 100644
File size: 3.2 KB
RevLine 
[d1dbcab9]1/*
2 *  This include file definitions related to an Intel i386ex board.
[752cd8f]3 *
[08311cc3]4 *  COPYRIGHT (c) 1989-1999.
[752cd8f]5 *  On-Line Applications Research Corporation (OAR).
6 *
[98e4ebf5]7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
[03f2154e]9 *  http://www.OARcorp.com/rtems/license.html.
[752cd8f]10 *
11 *  $Id$
12 */
13
[b22feedc]14#ifndef __I386EX_BSP_h
15#define __I386EX_BSP_h
[752cd8f]16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
[cac4c75]21#include <bspopts.h>
22
[752cd8f]23#include <rtems.h>
24#include <iosupp.h>
[fe6ef776]25#include <console.h>
26#include <clockdrv.h>
[45805cc]27#include <rtems/bspIo.h>
[bd8c8b2a]28#include <irq.h>
29 
[df49c60]30/*
31 *  confdefs.h overrides for this BSP:
32 *   - number of termios serial ports (defaults to 1)
33 *   - Interrupt stack space is not minimum if defined.
34 */
35
36/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
37#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
38
[752cd8f]39/*
40 *  Define the time limits for RTEMS Test Suite test durations.
41 *  Long test and short test duration limits are provided.  These
42 *  values are in seconds and need to be converted to ticks for the
43 *  application.
44 *
45 */
46
47#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
48#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
49
50/*
51 *  Define the interrupt mechanism for Time Test 27
52 *
53 *  NOTE: Use a software interrupt for the i386.
54 */
55
56#define MUST_WAIT_FOR_INTERRUTPT 0
57
58
[04bc5d9]59#define Install_tm27_vector(handler) \
60{ \
61  rtems_isr_entry dummy; \
62  rtems_interrupt_catch(handler, 0x90, &dummy); \
63}
[752cd8f]64#define Cause_tm27_intr()              asm volatile( "int $0x90" : : );
65
66#define Clear_tm27_intr()
67
68#define Lower_tm27_intr()
69
70/*
71 *  Simple spin delay in microsecond units for device drivers.
72 *  This is very dependent on the clock speed of the target.
73 */
74
[cf282090]75#define rtems_bsp_delay( _microseconds ) \
[752cd8f]76  { \
77    rtems_unsigned32 _counter; \
78    \
79    _counter = (_microseconds); \
80    \
81    asm volatile ( "0: nop;" \
82                   " mov %0,%0 ;" \
83                   " loop 0b" : "=c" (_counter) \
84                              : "0"  (_counter) \
85                 ); \
86    \
87  }
88
89/* Constants */
90
91#define RAM_START 0
92
93/* replaced the earlier EI kludge of 0xfffff */
94
95#define RAM_END   0x100000
96
97/* I/O addressing */
98
99/*
100 *#define Is_tx_ready( _status ) ( (_status) & 0x20 )
101 */
102/* dec 20. try the TE instead of TBE as the check */
103
104#define Is_tx_ready( _status ) ( (_status) & 0x40 )
105
106
107#define Is_rx_ready( _status ) ( (_status) & 0x01 )
108
109/* Structures */
110
111#ifdef F386_INIT
112#undef BSP_EXTERN
113#define BSP_EXTERN
114#else
115#undef BSP_EXTERN
116#define BSP_EXTERN extern
117#endif
118
[d1dbcab9]119/*
120 *  Device Driver Table Entries
121 */
122 
123/*
124 * NOTE: Use the standard Console driver entry
125 */
126 
127/*
128 * NOTE: Use the standard Clock driver entry
129 */
130 
[752cd8f]131/* miscellaneous stuff assumed to exist */
132
133extern rtems_configuration_table BSP_Configuration;
134
[ab0df696]135#define IDT_SIZE 256
136#define GDT_SIZE 8192
137
138extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
139extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
[752cd8f]140
141BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
142BSP_EXTERN unsigned short Gdt[3];  /* Global Descriptor Table Address */
143BSP_EXTERN unsigned int   Idt_base;
144BSP_EXTERN unsigned int   Gdt_base;
145
146/* routines */
147
148#ifdef __cplusplus
149}
150#endif
151
152#endif
153/* end of include file */
Note: See TracBrowser for help on using the repository browser.