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

4.104.114.84.95
Last change on this file since 5c7f274 was 34c4852, checked in by Ralf Corsepius <ralf.corsepius@…>, on May 26, 2005 at 5:36:48 AM

2005-05-26 Ralf Corsepius <ralf.corsepius@…>

  • include/bsp.h: New header guard.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
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.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#ifndef _BSP_H
15#define _BSP_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <bspopts.h>
22
23#include <rtems.h>
24#include <rtems/iosupp.h>
25#include <rtems/console.h>
26#include <rtems/clockdrv.h>
27#include <rtems/bspIo.h>
28#include <libcpu/cpu.h>
29#include <bsp/irq.h>
30
31/*
32 *  confdefs.h overrides for this BSP:
33 *   - number of termios serial ports (defaults to 1)
34 *   - Interrupt stack space is not minimum if defined.
35 */
36
37/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
38#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
39
40/*
41 *  Simple spin delay in microsecond units for device drivers.
42 *  This is very dependent on the clock speed of the target.
43 */
44
45#define rtems_bsp_delay( _microseconds ) \
46  { \
47    uint32_t         _counter; \
48    \
49    _counter = (_microseconds); \
50    \
51    asm volatile ( "0: nop;" \
52                   " mov %0,%0 ;" \
53                   " loop 0b" : "=c" (_counter) \
54                              : "0"  (_counter) \
55                 ); \
56    \
57  }
58
59/* Constants */
60
61#define RAM_START 0
62
63/* replaced the earlier EI kludge of 0xfffff */
64
65#define RAM_END   0x100000
66
67/* I/O addressing */
68
69/*
70 *#define Is_tx_ready( _status ) ( (_status) & 0x20 )
71 */
72/* dec 20. try the TE instead of TBE as the check */
73
74#define Is_tx_ready( _status ) ( (_status) & 0x40 )
75
76#define Is_rx_ready( _status ) ( (_status) & 0x01 )
77
78/* Structures */
79
80#ifdef F386_INIT
81#undef BSP_EXTERN
82#define BSP_EXTERN
83#else
84#undef BSP_EXTERN
85#define BSP_EXTERN extern
86#endif
87
88/*
89 *  Device Driver Table Entries
90 */
91
92/*
93 * NOTE: Use the standard Console driver entry
94 */
95
96/*
97 * NOTE: Use the standard Clock driver entry
98 */
99
100/* miscellaneous stuff assumed to exist */
101
102extern rtems_configuration_table BSP_Configuration;
103
104#define IDT_SIZE 256
105#define GDT_SIZE 8192
106
107extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
108extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
109
110BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
111BSP_EXTERN unsigned short Gdt[3];  /* Global Descriptor Table Address */
112BSP_EXTERN unsigned int   Idt_base;
113BSP_EXTERN unsigned int   Gdt_base;
114
115/* routines */
116
117#ifdef __cplusplus
118}
119#endif
120
121#endif
122/* end of include file */
Note: See TracBrowser for help on using the repository browser.