source: rtems/c/src/lib/libbsp/i960/rxgen960/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.5 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains some definitions specific to the
4 *  Ramix PMC901 board
5 *
6 *  COPYRIGHT (c) 1989-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may in
11 *  the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __PMC901_h
18#define __PMC901_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems.h>
25#include <iosupp.h>
26#include <console.h>
27#include <clockdrv.h>
28
29/*
30 *  confdefs.h overrides for this BSP:
31 *   - number of termios serial ports (defaults to 1)
32 *   - Interrupt stack space is not minimum if defined.
33 */
34
35/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
36#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
37
38/*
39 *  Define the time limits for RTEMS Test Suite test durations.
40 *  Long test and short test duration limits are provided.  These
41 *  values are in seconds and need to be converted to ticks for the
42 *  application.
43 *
44 */
45
46#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
47#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
48
49/*
50 *  Define the interrupt mechanism for Time Test 27
51 *
52 *  NOTE: Following are for i960CA and are board independent
53 *
54 */
55
56#define MUST_WAIT_FOR_INTERRUPT 0
57
58#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
59
60#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
61
62#define Clear_tm27_intr()  i960_clear_intr( 6 )
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 = 0; /* initialized to avoid warning */ \
74    asm volatile( "0: \
75                     remo      3,31,%0 ; \
76                     cmpo      0,%0 ; \
77                     subo      1,%1,%1 ; \
78                     cmpobne.t 0,%1,0b " \
79                  : "=d" (_tmp), "=d" (_delay) \
80                  : "0"  (_tmp), "1"  (_delay) ); \
81  }
82
83/* Constants */
84
85#define RAM_START 0xfed00000
86#define RAM_END   0xfef00000 /* this should actually be 16MB, most likely */
87
88/* NINDY console I/O requests:
89 *   CO sends a single character to stdout,
90 *   CI reads one.
91 */
92
93#define NINDY_INPUT   0
94#define NINDY_OUTPUT  1
95
96/*
97 *  get_prcb
98 *
99 *  Returns the PRCB pointer.
100 */
101
102static inline i960_PRCB *get_prcb( void )
103{
104  register i960_PRCB *_prcb = 0;
105
106  asm volatile( "calls 5; \
107                 mov   g0,%0" \
108                 : "=d" (_prcb) \
109                 : "0" (_prcb) );
110  return ( _prcb );
111}
112
113/*
114#ifdef C961_INIT
115#undef BSP_EXTERN
116#define BSP_EXTERN
117#else
118#undef BSP_EXTERN
119#define BSP_EXTERN extern
120#endif
121*/
122
123#undef BSP_EXTERN
124#define BSP_EXTERN
125
126/* miscellaneous stuff assumed to exist */
127
128extern rtems_configuration_table BSP_Configuration;
129
130BSP_EXTERN i960_PRCB          *Prcb;
131BSP_EXTERN i960_control_table *Ctl_tbl;
132
133/*
134 *  Device Driver Table Entries
135 */
136
137/*
138 * NOTE: Use the standard Console driver entry
139 */
140 
141/*
142 * NOTE: Use the standard Clock driver entry
143 */
144
145/*
146 * How many libio files we want
147 */
148
149#define BSP_LIBIO_MAX_FDS       20
150
151/* functions */
152
153void bsp_cleanup( void );
154
155i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
156i960_isr_entry set_tmr_vector( rtems_isr_entry, unsigned int, unsigned int );
157
158#ifdef __cplusplus
159}
160#endif
161
162#else
163#error "Did not get any definitions from here!"
164#endif
165/* end of include file */
Note: See TracBrowser for help on using the repository browser.