OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [i386ex/] [include/] [bsp.h] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.