source: rtems/c/src/lib/libbsp/m68k/efi68k/include/bsp.h @ a858910

4.104.114.84.95
Last change on this file since a858910 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all efi68k board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-1997.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __EFI68K_BSP_h
17#define __EFI68K_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 <efi68k.h>
28#include <DP8570A.h>
29#include <16550.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
121extern rtems_unsigned32 Timer_interrupts;
122
123/*
124 *  Device Driver Table Entries
125 */
126 
127/*
128 * NOTE: Use the standard Console driver entry
129 */
130 
131/*
132 * NOTE: Use the standard Clock driver entry
133 */
134 
135/*
136 * How many libio files we want
137 */
138 
139#define BSP_LIBIO_MAX_FDS       20
140 
141/* functions */
142
143void bsp_cleanup( void );
144
145m68k_isr_entry set_vector(
146  rtems_isr_entry     handler,
147  rtems_vector_number vector,
148  int                 type
149);
150
151void console_init(void);
152
153void watch_dog_init(void);
154
155void tcp_init(void);
156
157void Spurious_Initialize(void);
158
159void _UART_flush(void);
160
161void Clock_exit(void);
162
163void outbyte(char);
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
170/* end of include file */
Note: See TracBrowser for help on using the repository browser.