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

Last change on this file since 09b6a093 was 09b6a093, checked in by Joel Sherrill <joel.sherrill@…>, on 05/24/00 at 17:06:54

Significantly lowered the default memory requirements:

  • CONFIGURE_RTEMS_INIT_TASKS_TABLE was 10 now 0
  • CONFIGURE_POSIX_INIT_THREAD_TABLE was 10 now 0
  • CONFIGURE_ITRON_INIT_TASK_TABLE was 10 now 0
  • CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS was 20 now 3
  • added CONFIGURE_NUMBER_OF_TERMIOS_PORTS and defaulted to 1
  • added CONFIGURE_TERMIOS_DISABLED defaulted to "enabled"
  • miniIMFS is now the default

Added configuration error checks that:

+ Ensure > 0 tasks/threads are configured
+ Ensure at least one inititalization task/thread is defined

bsp.h now defines these so BSP specific requirements
are accounted for.

+ CONFIGURE_NUMBER_OF_TERMIOS_PORTS
+ CONFIGURE_INTERRUPT_STACK_MEMORY

console_reserve_resources and rtems_termios_reserve_resources
are no longer required and considered obsolete. Calls to
rtems_termios_reserve_resources have been eliminated although
the routine is still there and the body "if 0'ed".

We are very close to having NO reason to modify the
configuration tables in the BSP. Be warned that eventually
we would like to see the need for BSP_Configuration
eliminated!

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