source: rtems/c/src/lib/libbsp/powerpc/helas403/include/bsp.h @ 196094eb

4.104.114.84.95
Last change on this file since 196094eb was be4284d0, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 30, 1998 at 9:50:42 PM

BSP submitted by Thomas Doerfler <td@…>:

Finally I am through: I have found the last bugs that made RTEMS-
4.0-beta3 start on my ppc403 board from ROM. So now the '403
support is up to date again.

Roughly I have added the following features:

  • support for the on-chip interrupt controller (in a separate module)
  • interrupt support for the console device
  • termios support for the console device

==============================================
Since the BSP behaivour changed in some details (console no
longer is polling, other memory layout etc) I have created a new
BSP "helas403" rather than changing the "papyrus" BSP. The old
"polled" console driver still sticks around in "console.c.polled"
To get the BSP up and running, I had to create the new BSP files
(derived from papyrus). Besides that, the following source areas
have been changed:

  • c/src/lib/libcpu/powerpc/ppc403: changes to console driver, small changes to clock driver, new "ictrl" interrupt controller driver
  • c/src/exec/score/cpu/powerpc/ppc.h: some small changes (added ppc403 characteristics like a exception vector prefix register, some special register definitions). I am quite sure, they are compatible with the existing sources, although I did not check
  • c/src/exec/score/cpu/powerpc/cpu.c: There is one severe limitation in the exception entries: Due to the current code arrangement, the "branch absolute" to the ISR handler may only jump to the first 128MByte or the last 128MByte of the 4GByte address range. When the ppc403 is running out of ROM, the ROM functions are located in the last 128MByte (0xFFF00000 and up). These addresses were not handled correctly (sign reduced) in "install_raw_handler". The change I added should work on existing ppc BSPs aswell...
  • c/src/lib/libc/termios.c: During my tests, I added one change you sent me, so this patch will already be incorporated in the current source tree.

There are some smaller changes, see the attached diff file.

=========================================
Concerning the GNU toolchain:

I tried several tool chains. Finally I almost succeeded with

egcs-1.0.3a with patch egcs-1.0.3-rtems-diff-19980527

I had to add the following lines to the egcs files. Without them
configure complaint that the cross compiler could not generate
executable output.

  • additional lines needed in egcs distribution in file gcc/config/rs6000/rtems.h:

+++ lines start
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "ecrti.o%s"

#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "ecrtn.o%s"
++++ lines end

As far as I have seen in the Changelog of egcs, you have recently
sent two patches affecting the powerpc support, but they were
added in the wrong order.... :-(

egcs-19980628 with patch egcs-19980628-rtems-diff-19980707 does
not work!

I used binutils 2.9.1 with patch binutils-2.9.1-rtems-diff-19980515

(binutils 2.8.1 does not work, internal error in gas)

and newlib-1.8.0 with patch newlib-1.8.0-rtems-diff-19980707

Finally I had to poke a line in the "bit" script, since, on my LINUX
machine, the GNU make is only available as "make", not as
"gmake"...

For all the tools and newlib I selected configuration "powerpc-
rtems".


IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: td@…

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all HELAS-403 board IO definitions.
4 *
5 *  Author:     Thomas Doerfler <td@imd.m.isar.de>
6 *              IMD Ingenieurbuero fuer Microcomputertechnik
7 *
8 *  COPYRIGHT (c) 1998 by IMD
9 *
10 *  Changes from IMD are covered by the original distributions terms.
11 *  This file has been derived from the papyrus BSP.
12 *
13 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
14 *
15 *  COPYRIGHT (c) 1995 by i-cubed ltd.
16 *
17 *  To anyone who acknowledges that this file is provided "AS IS"
18 *  without any express or implied warranty:
19 *      permission to use, copy, modify, and distribute this file
20 *      for any purpose is hereby granted without fee, provided that
21 *      the above copyright notice and this notice appears in all
22 *      copies, and that the name of i-cubed limited not be used in
23 *      advertising or publicity pertaining to distribution of the
24 *      software without specific, written prior permission.
25 *      i-cubed limited makes no representations about the suitability
26 *      of this software for any purpose.
27 *
28 *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
29 *
30 *  COPYRIGHT (c) 1989-1998.
31 *  On-Line Applications Research Corporation (OAR).
32 *  Copyright assigned to U.S. Government, 1994.
33 *
34 *  The license and distribution terms for this file may be
35 *  found in the file LICENSE in this distribution or at
36 *  http://www.OARcorp.com/rtems/license.html.
37 *
38 *  $Id$
39 */
40
41#ifndef __HELAS403_h
42#define __HELAS403_h
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#ifdef ASM
49/* Definition of where to store registers in alignment handler */
50#define ALIGN_REGS 0x0140
51
52#else
53#include <rtems.h>
54#include <console.h>
55#include <clockdrv.h>
56#include <console.h>
57#include <iosupp.h>
58
59/*
60 *  Define the time limits for RTEMS Test Suite test durations.
61 *  Long test and short test duration limits are provided.  These
62 *  values are in seconds and need to be converted to ticks for the
63 *  application.
64 *
65 */
66
67#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
68#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
69
70
71/*
72 *  Stuff for Time Test 27
73 */
74
75#define MUST_WAIT_FOR_INTERRUPT 0
76
77#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 )
78
79#define Cause_tm27_intr()  asm volatile ("sc")
80
81#define Clear_tm27_intr()
82
83#define Lower_tm27_intr()
84
85/* Constants */
86
87#define RAM_START 0
88#define RAM_END   0x00800000
89
90
91/* miscellaneous stuff assumed to exist */
92
93extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
94extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
95
96/*
97 *  Device Driver Table Entries
98 */
99 
100/*
101 * NOTE: Use the standard Console driver entry
102 */
103 
104/*
105 * NOTE: Use the standard Clock driver entry
106 */
107 
108/* functions */
109
110rtems_isr_entry set_vector(                    /* returns old vector */
111  rtems_isr_entry     handler,                  /* isr routine        */
112  rtems_vector_number vector,                   /* vector number      */
113  int                 type                      /* RTEMS or RAW intr  */
114);
115#endif /* ASM */
116
117#ifdef __cplusplus
118}
119#endif
120
121#endif
122/* end of include file */
Note: See TracBrowser for help on using the repository browser.