source: rtems/c/src/lib/libbsp/m68k/efi332/include/bsp.h @ 6335022e

4.104.114.84.95
Last change on this file since 6335022e was 6335022e, checked in by Joel Sherrill <joel.sherrill@…>, on 03/11/97 at 15:42:59

updates from John Gwynne

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all efi332 board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
6 *  On-Line Applications Research Corporation (OAR).
7 *  All rights assigned to U.S. Government, 1994.
8 *
9 *  This material may be reproduced by or for the U.S. Government pursuant
10 *  to the copyright license under the clause at DFARS 252.227-7013.  This
11 *  notice must appear in all copies of this file and its derivatives.
12 *
13 *  $Id$
14 */
15
16#ifndef __EFI332_BSP_h
17#define __EFI332_BSP_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems.h>
24#include <clockdrv.h>
25#include <console.h>
26#include <iosupp.h>
27#include <efi332.h>
28#include <sim.h>
29#include <qsm.h>
30
31/*
32 *  Define the time limits for RTEMS Test Suite test durations.
33 *  Long test and short test duration limits are provided.  These
34 *  values are in seconds and need to be converted to ticks for the
35 *  application.
36 *
37 */
38
39#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
40#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
41
42/*
43 *  Define the interrupt mechanism for Time Test 27
44 */
45
46/* XXX - JRS - I want to compile the tmtests */
47
48#define MUST_WAIT_FOR_INTERRUPT 1
49
50#define Install_tm27_vector( handler )
51
52#define Cause_tm27_intr()
53
54#define Clear_tm27_intr()
55
56#define Lower_tm27_intr()
57
58/*
59 *  Simple spin delay in microsecond units for device drivers.
60 *  This is very dependent on the clock speed of the target.
61 */
62
63#define delay( microseconds ) \
64  { register rtems_unsigned32 _delay=(microseconds); \
65    register rtems_unsigned32 _tmp=123; \
66    asm volatile( "0: \
67                     nbcd      %0 ; \
68                     nbcd      %0 ; \
69                     dbf       %1,0b" \
70                  : "=d" (_tmp), "=d" (_delay) \
71                  : "0"  (_tmp), "1"  (_delay) ); \
72  }
73
74/* externals */
75
76extern char _endtext[];
77extern char _sdata[];
78extern char _edata[];
79extern char __bss_start[];
80extern char _end[];
81extern char _copy_data_from_rom[];
82extern char __end_of_ram[];
83
84/* constants */
85
86#define RAM_END ((int)__end_of_ram)
87
88#ifdef __START_C__
89#define STACK_SIZE "#0x800"
90#else
91#define STACK_SIZE 0x800
92#endif
93
94/* macros */
95
96#define RAW_PUTS(str) \
97  { register char *ptr = str; \
98    while (*ptr) outbyte(*ptr++); \
99  }
100
101#define RAW_PUTI(n) { \
102    register int i, j; \
103    \
104    RAW_PUTS("0x"); \
105    for (i=28;i>=0;i -= 4) { \
106      j = (n>>i) & 0xf; \
107      outbyte( (j>9 ? j-10+'a' : j+'0') ); \
108    } \
109  }
110
111/* miscellaneous stuff assumed to exist */
112
113extern rtems_configuration_table BSP_Configuration;
114
115extern m68k_isr_entry M68Kvec[];   /* vector table address */
116
117extern int stack_size;
118
119extern int stack_start;
120
121/*
122 *  Device Driver Table Entries
123 */
124 
125/*
126 * NOTE: Use the standard Console driver entry
127 */
128 
129/*
130 * NOTE: Use the standard Clock driver entry
131 */
132
133/*
134 * How many libio files we want
135 */
136 
137#define BSP_LIBIO_MAX_FDS       20
138
139/* functions */
140
141void bsp_cleanup( void );
142
143m68k_isr_entry set_vector(
144  rtems_isr_entry     handler,
145  rtems_vector_number vector,
146  int                 type
147);
148
149void console_init(void);
150
151void Spurious_Initialize(void);
152
153void _UART_flush(void);
154
155void Clock_exit(void);
156
157void outbyte(char);
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif
164/* end of include file */
Note: See TracBrowser for help on using the repository browser.