Commit Graph

1777 Commits

Author SHA1 Message Date
Joel Sherrill
082fc2d5d2 Fixed use of incorrect macro for minimum stack size. 1998-10-05 12:45:53 +00:00
Joel Sherrill
388be68fbc Patch from Ian Lance Taylor <ian@airs.com>:
The reentrant versions of the malloc functions in
        c/src/lib/libc/malloc.c
    do not match the definitions in newlib.  These will be used if you use
    newlib routines such as fdopen.  I believe this patch to malloc.c is
    needed to provide the correct versions.
1998-10-01 21:44:31 +00:00
Joel Sherrill
f0bca9fb67 changed version to 981001 1998-10-01 20:22:37 +00:00
Joel Sherrill
086836e10e Patch from Thomas Doerfler <td@imd.m.isar.de> to improve 403 support.
- 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...
1998-10-01 18:50:43 +00:00
Joel Sherrill
02c14a0bfc Updated to reflect Thomas Doerfler (td@imd.m.isar.de) submitting the
helas403 BSP.
1998-10-01 13:13:33 +00:00
Joel Sherrill
aecfa2bf09 BSP submitted by Thomas Doerfler <td@imd.m.isar.de>:
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@imd.m.isar.de
1998-09-30 21:55:53 +00:00
Joel Sherrill
be4284d0f2 BSP submitted by Thomas Doerfler <td@imd.m.isar.de>:
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@imd.m.isar.de
1998-09-30 21:50:42 +00:00
Joel Sherrill
2c3840b563 Added new autoconf test for i386 code16/code32 support. The guts of the
test were suggested by Ian Taylor <ian@airs.com> and Joel did the
hard part of putting it in aclocal and editting all the offending
Makefiles and source code which could use this feature.
1998-09-30 20:58:39 +00:00
Joel Sherrill
f65b0903f5 New file from Ralf. 1998-09-30 20:51:54 +00:00
Joel Sherrill
4ca5bd8b93 Changed based on patch from pc386 linkcmds from Ian Lance Taylor
<ian@airs.com>:

    The pc386 linker scripts omits .gnu.linkonce.r* sections.  It's not a
    big deal, but they should be treated like .rodata sections.  ELF
    versions of g++ generate them for static constants defined in template
    classes, such as string::npos.
1998-09-30 17:27:57 +00:00
Joel Sherrill
d1d4766494 Patch from Ian Lance Taylor <ian@airs.com>:
The pc386 linker scripts omits .gnu.linkonce.r* sections.  It's not a
    big deal, but they should be treated like .rodata sections.  ELF
    versions of g++ generate them for static constants defined in template
    classes, such as string::npos.
1998-09-30 17:17:23 +00:00
Joel Sherrill
17408b901b Patch from Eric Norum <eric@skatter.USask.Ca>:
I found that my 68040/68360 test programs would not run even after
    I fixed the `wrong BSP' problem.

    It seems that there's a bug in the interrupt handling code for
    processors with hardware interrupt stacks (e.g. 68040).  The wrong
    status register was getting pushed on the stack for the `return
    from exception' to call _ISR__Dispatch.   This ended up making
    the context switch code run on the interrupt stack, so interrupt-driven
    context switches would always fail.

    I guess that no one has tried running any of the RTEMS-4.0 snapshots
    on a 68040 machine!

    Anyhow, here are the patches for
        1) gen68360.cfg   ---   to fix the `wrong-BSP' problem.
        2) m68k/cpu_asm.s ---   to fix the hardware interrupt stack problem.

    With these patches in place, the network demo programs run on my
    68040/68360 system.  The paranoia program runs with no failures,
    defects nor flaws.
1998-09-30 13:02:30 +00:00
Joel Sherrill
21bfd93aaf Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Please find enclosed a patch which enables me to build the bare-bsp for
    sh-rtems.

    Changes:
        1. Add preinstall to libbsp/bare/include/Makefile.in
        2. Removed FORCEIT, add preinstall to
        libbsp/sh/gensh1/include/Makefile.in
        3. Disabled support of set_vector from sh code (shared/setvec.c is still
        present but isn't used anymore), set_vector replaced with standard rtems
        functions.

    Problems still present:
        1. Support of spin-delays in bare bsp
        2. Proper support of cpu frequency

    To configure I used:
        <srcdir>/configure \
        --target=sh-rtems \
        --prefix=<instdir>/sh-bare \
        --enable-bare-cpu-model=sh7032 \
        --enable-bare-cpu-cflags='-Wall -m1 -DMHZ=20
        -DCPU_CONSOLE_DEVNAME="\"/dev/null\""'
        --enable-rtemsbsp=bare \
        --disable-networking \
        --disable-cxx \
        --disable-posix \
        --disable-tests

    IMO, if there are no objections to this patch, a similar approach should
    be applied to all CPUs/BSPs (esp. hppa1.1, mips64orion, ppc403, because
    they apply set_vector inside of libcpu).
1998-09-29 12:40:33 +00:00
Joel Sherrill
766ed7c0f1 Patch from Eric Norum <eric@skatter.usask.ca>:
Remember the test to see if a socket could be read and written at
    the same time by two different tasks?  I discovered that if both
    tasks attempt to close the socket a panic can occur from inside the
    BSD code.

    Closing the same socket twice from two different threads is
    certainly an error, but a panic is not the greatest error reporting
    method :-)

    The following small change to the socket close routine should reduce
    the chances of the panic.
1998-09-29 12:15:08 +00:00
Joel Sherrill
cb646cb936 New files. 1998-09-27 16:37:16 +00:00
Joel Sherrill
b965227fa1 Now compiles. 1998-09-25 13:28:28 +00:00
Joel Sherrill
97149ba590 Added ENOSYS stubs for a number of process routines. 1998-09-25 13:17:32 +00:00
Joel Sherrill
7a86dc4404 Improved missing directory message. 1998-09-24 20:30:09 +00:00
Joel Sherrill
85420c8e32 Removed blank line. 1998-09-24 20:29:52 +00:00
Joel Sherrill
da38d8a3df Removed superfluous initialization of PC video. 1998-09-24 15:43:38 +00:00
Joel Sherrill
32f3e34d4d Patch from Erik Ivanenko <erik.ivanenko@utoronto.ca>:
Please find attached a start.s that includes a cli prior to the hlt
    instruction.  This ensures that external interrupts cannot restart
    the system after returning to the startup code.  ( According to the hlt
    docs, they will! )

    Also find a new timer.c.   ( I forgot to update the countdowm value
    in the timer when I changed the PSCLK frequency in start.s) .  This
    improves timer accuracy.

    The raw_idt_notify messages are no longer infinite, I tested sp11 and
    sp05, both which were bad, and I have seen the message print once in
    one test.  I think it's ok if it prints out once.  In fact, I don't
    think you can effectively stop it!
1998-09-24 13:55:18 +00:00
Joel Sherrill
287e958464 New version from Erik Ivanenko <erik.ivanenko@utoronto.ca>. 1998-09-24 13:46:27 +00:00
Joel Sherrill
1fd26a529c Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. 1998-09-23 16:46:52 +00:00
Joel Sherrill
ecc3fe3181 IDLE task stack size now specified as a field in the CPU Table for all
ports.
1998-09-23 16:41:00 +00:00
Joel Sherrill
3b93a2dee1 Modifed to zero out the C heap if the CPU Table indicates that the
RTEMS workspace is to be zeroed out.
1998-09-23 16:34:23 +00:00
Joel Sherrill
87c857a983 changed version to 980923 1998-09-23 13:43:44 +00:00
Joel Sherrill
5d17a64258 Updated to remove bad comment. 1998-09-23 13:43:14 +00:00
Joel Sherrill
1cf2df40cb Removed printk() references. 1998-09-23 13:25:37 +00:00
Joel Sherrill
479c86ddbd Patch from Erik Ivanenko <erik.ivanenko@utoronto.ca>:
Please find attached the two files that have been changed  relative to
    980921 .  The changes here are in the handling of the counter-timer used
    as the basis for the rtems executive clock.  For the most part, these
    are housekeeping changes.

    The PSCLK frequency change in start.s... was a part of several
    bug-fixes.  The fix improves executive clock and timer accuracy.

    changes :

    start.s --  All timers are disabled by the initialization routine
            -- PSCLK ( used by clock and timers ) frequency changed to 1MHz

    The clock_initialize routine now assumes that the PSCLK frequency is
    exactly 1 MHz.

    ckinit.c

    Clock_isr            -- removed division by 1000.  Now use 'static'
    variable -- clock_intial_isr_value -- to reset Clock_isrs variable.
    clock_initialize -- moved counter timer initialization here.  Values
    used to configure the timer are totally dependent on
    BSP_configuration.microseconds_per_tick ( and the PSCLK assumption).
    Initializes clock_initial_isr_value used by th Clock_isr to reset
    Clock_isrs.

     clock_on -- no longer configures the timer, just enables it.

    Since altering the number of sections in the BSP, I decided to give it a
    good "once over" .   The clock handling is now cleaner.
1998-09-23 13:22:43 +00:00
Joel Sherrill
8a496e462e Patch from Aleksey (Quality Quorum <qqi@world.std.com>):
1. Finally fixes raw interrupts for pc386
    2. Makes some minor cleanup in console and startup
    3. Makes rtems_termios_dequeue_characters() to return count of
       outstanding chars - it allows to simplify console isrs a little
       bit.
    4. pc386 uart modified to be friendlier to termios parameter changes,
       to have minor performance improvement and to take advantage of
       of above termios modification.
1998-09-23 13:20:34 +00:00
Joel Sherrill
362b88ebb5 Switched "NEW_GAS" flag. 1998-09-23 13:17:23 +00:00
Joel Sherrill
af973e57f3 changed version to 980921 1998-09-21 16:38:20 +00:00
Joel Sherrill
42424efe9b Corrected ColdFire port information. 1998-09-21 01:45:14 +00:00
Joel Sherrill
e62488d4dd New file from Emmanuel Raguet <raguet@crf.canon.fr>. 1998-09-21 01:29:19 +00:00
Joel Sherrill
718dc95384 Patch from Eric Norum <eric@skatter.usask.ca>:
Here's a patch to make the rtems_showroute routine a little more
    useful.  For `host' route table entries the link-level address is now
    displayed.  This is equivalent to the old `show arp table'
    information displayed by the KA9Q code.
1998-09-21 00:46:00 +00:00
Joel Sherrill
7ddcfb8cd4 Patch from Eric Norum and David Fiddes to put ColdFire support in
the inet checksum routine.
1998-09-21 00:42:07 +00:00
Joel Sherrill
97d7b068cb Update from Aleksey (Quality Quorum <qqi@world.std.com>) to pick up some
patches missing from 980911.
1998-09-21 00:40:18 +00:00
Joel Sherrill
75e44fa33f Removed by patch from Aleksey. 1998-09-21 00:39:47 +00:00
Joel Sherrill
3f92975714 Patches from Aleksey which were not in 980911.
I am sending you patch which was lost. As far as I remember there
    were minor patches on top of it, either by Eric Valette or
    by Eric Norum or by both.
1998-09-21 00:38:13 +00:00
Joel Sherrill
c610a1f300 Update from Eric Valette <valette@crf.canon.fr>:
Here are patches that bring 980911 back to what I think is a correct
    version of raw IDT management as well as a correct initialisation
    of video console and rtems managed interrupts.
1998-09-21 00:24:51 +00:00
Joel Sherrill
04bc5d97f1 Update from Erik Ivanenko <erik.ivanenko@utoronto.ca> to bring the
i386ex bsp up to date.

1) A 'hlt' instruction is coded in case of a return from boot_card in
  start.s.
1998-09-21 00:23:02 +00:00
Joel Sherrill
30ba7529f1 Patch from Eric Norum:
I fixed the problems noted by Victor Vengerov.

    1) Fix typo in cfsetispeed().
    2) In rtems_termios_open, ensure that args->iop->data1 is set before calling
    device-specific open routine.
1998-09-21 00:01:26 +00:00
Joel Sherrill
6bd0fe402d Patch from Eric Valette <valette@crf.canon.fr>:
Compiled and booted without problem. However console was set on COM2.
  At least for 4.0 it should be video :-)
1998-09-20 23:52:43 +00:00
Joel Sherrill
bfcf4cb3db Updates to tree to make it build with all desired changes and the conversion
of the SONIC driver to the new FreeBSD stack instead of KA9Q.
1998-09-11 23:35:09 +00:00
Joel Sherrill
b29378e052 Corrected spelling error. 1998-09-11 19:17:49 +00:00
Joel Sherrill
c5bb1e02b6 changed version to 980911 1998-09-11 15:40:41 +00:00
Joel Sherrill
b39563695d Patch from "David J. Fiddes" <D.J@fiddes.surfaid.org>:
I've fixed a few minor probs with the optimised version that Eric put
    together for me the other day and sent the fixes back to him. Provided he
    doesn't have a problem with it we've got a pretty solid in_cksum for the
    ColdFire as well as straight m68k. I've enclosed my updated in_cksum_m68k.c

    At the moment my own bottlenecks are elsewhere...as my driver is pulling
    16bit data chunks through a libchip-esq access routine from the chip which
    for a polled I/O device is never going to be quick.
1998-09-11 13:12:04 +00:00
Joel Sherrill
bd3dec56a6 Patch from Eric Norum <eric@skatter.usask.ca>:
If you're getting close to a new snaphot, here's something that
    might be useful to add to the BSP README notes for systems with
    networking.
1998-09-10 12:46:41 +00:00
Joel Sherrill
23cdd84cff Patch from David Fiddes <D.J.Fiddes@hw.ac.uk> to make this compile
for the ColdFire.
1998-09-10 12:43:00 +00:00
Joel Sherrill
b67245d03b Patch from Chris Johns <ccj@acm.org>:
I have managed to build the bsp ods68302 and the rtti test case I made
    with egcs-1.1b and binutils-2.9.1.

    I have built our C++ application and got no link errors so it looks like
    this is now working. I am yet to test the code but getting the thing to
    link was the problem.

    Please find a patch attached which removes the -fno-rtti option.
1998-09-10 12:31:27 +00:00