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

4.104.11
Last change on this file since 341c6faa was 341c6faa, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 18, 2008 at 5:26:12 PM

2008-09-18 Joel Sherrill <joel.sherrill@…>

  • include/bsp.h: Remove unnecessary boilerplate comments.
  • Property mode set to 100644
File size: 2.0 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 *  Simple spin delay in microsecond units for device drivers.
33 *  This is very dependent on the clock speed of the target.
34 */
35
36#define rtems_bsp_delay( _microseconds ) \
37  { \
38    uint32_t         _counter; \
39    \
40    _counter = (_microseconds); \
41    \
42    asm volatile ( "0: nop;" \
43                   " mov %0,%0 ;" \
44                   " loop 0b" : "=c" (_counter) \
45                              : "0"  (_counter) \
46                 ); \
47    \
48  }
49
50/* Constants */
51
52#define RAM_START 0
53
54/* replaced the earlier EI kludge of 0xfffff */
55
56#define RAM_END   0x100000
57
58/* I/O addressing */
59
60/*
61 *#define Is_tx_ready( _status ) ( (_status) & 0x20 )
62 */
63/* dec 20. try the TE instead of TBE as the check */
64
65#define Is_tx_ready( _status ) ( (_status) & 0x40 )
66
67#define Is_rx_ready( _status ) ( (_status) & 0x01 )
68
69/* Structures */
70
71#ifdef F386_INIT
72#undef BSP_EXTERN
73#define BSP_EXTERN
74#else
75#undef BSP_EXTERN
76#define BSP_EXTERN extern
77#endif
78
79#define IDT_SIZE 256
80#define GDT_SIZE 8192
81
82extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
83extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
84
85BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
86BSP_EXTERN unsigned short Gdt[3];  /* Global Descriptor Table Address */
87BSP_EXTERN unsigned int   Idt_base;
88BSP_EXTERN unsigned int   Gdt_base;
89
90/* routines */
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif
Note: See TracBrowser for help on using the repository browser.