Commit Graph

1573 Commits

Author SHA1 Message Date
Joel Sherrill
d9d75fce47 Patch from Emmanuel Raguet <raguet@crf.canon.fr>:
I have reworked the ethernet driver for the BSP pc386 and
  here is the patch to apply.
1998-08-31 23:06:50 +00:00
Joel Sherrill
b285860989 Patch from Eric Valette <valette@crf.canon.fr>:
Eric> NB : there is still a bug on PC386 serial line : exit does not
    Eric> flush the remaining output queue. As this is not a bug in the
    Eric> driver itself but somewhere in PC386 initialization/termios
    Eric> relationship it will be part of another patch.

    Eric> NB2 : As Emmanuel excerced the exception hanlder code, while
    Eric> porting the SMC driver to the new BSD stack, we found a bug
    Eric> in the exception handler : it shall not delete the current
    Eric> thread in case we are running at interrupt level. This will
    Eric> be part of another patch...

    So here is the patch. This patch fixes the two problems mentionned above

    + it use vpath mechanism intead of copying the irq related files in
      the right directory.  This avoid to compile them each time and is
      more homogenous with other Makefiles.
1998-08-31 23:03:45 +00:00
Joel Sherrill
de9edc4b52 Patch from Eric Valette <valette@crf.canon.fr>:
Here is a brief description of the attached patch :

    1) There was a bug in the code for the COM2 serial line driver. Aleksey
    gave me a fix that fixes the driver code itself. I would like to thank
    him again publicly,

    2) I introduced constants in the serial driver code because I had a hard
    time reading the meanning of hexadecimal values in the NS data book :)

    3)You can now mix printk and printf on serial line (tested on COM2).
    There is a #ifdef PRINTK_ON_SERIAL in console.c that enables to have
    printk on console while printf on serial line,
    4) Removed call to displayCpuInfo because anyway if was at the wrong
    place for serial line console (too early). It can anyway be called at
    application level,

    5) The original printk was unable to display negative integer values
    and was also recursive. It now works corectly,

    All the modifications have been tested here on the COM2 port from
    a PC running RTEMS to a PC running linux,

    NB : there is still a bug on PC386 serial line : exit does not flush the
    remaining output queue. As this is not a bug in the driver itself but
    somewhere in PC386 initialization/termios relationship it will be part
    of another patch.

    NB2 : As Emmanuel excerced the exception hanlder code, while porting the
    SMC driver to the new BSD stack, we found a bug in the exception
    handler : it shall not delete the current thread in case we are running
    at interrupt level. This will be part of another patch...
1998-08-31 22:56:20 +00:00
Joel Sherrill
85734b3c8f Patch from Eric Norum <eric@skatter.usask.ca>:
I think I figured out why rtems_panic was locking up instead of
    shutting down the executive and returning to the code that called
    boot_card().

    Later on there is code to print some messages on the standard error
    stream, a recursive call back to rtems_verror (through rtems_error)
    and finally a call to _exit().

    I think that the _Thread_Disable_dispatch() is preventing the final
    context switch back to the boot_card() code.  Does this sound right
    to you?
1998-08-31 22:53:42 +00:00
Joel Sherrill
755923238d changed version to 980824 1998-08-24 17:32:58 +00:00
Joel Sherrill
564d2c3a6b Patch from Eric Valette <valette@crf.canon.fr> to add an extra newline. 1998-08-24 16:59:20 +00:00
Joel Sherrill
69036586b5 Patch from Eric Valette <valette@crf.canon.fr>:
Celso Labinaz <labinaz@tin.it> pointed to me thatthe console on serial
    line was not working. After spending quite a time to find the right
    cable and software, I confirm this.

    I'm going to debug this in the next days because I want to use the
    serial line for debugging. In the meantime, in order to be sure that
    this was a driver initialization/bug, I made printk work on the serial
    line in order to be sure the receiver part and configuration was OK.

    Here is the for printk on serial line. BTW, does anyone else use the
    serial line facilities for PC? printf seems to output nothing (hello.exe
    output everything that has a printk but application printf seems to be
    broken).
1998-08-24 16:58:39 +00:00
Joel Sherrill
ff0b0082b1 Added __RTEMS_INSIDE__ macro to insure that ".inl" files are ALWAYS included
when building the executive source.
1998-08-24 14:50:00 +00:00
Joel Sherrill
9a95524f29 Cleanup patch from Eric Norum. 1998-08-24 14:47:19 +00:00
Joel Sherrill
4baa0f58cc changed version to 980821 1998-08-21 18:19:29 +00:00
Joel Sherrill
4de817dfd2 Added i386 specific version of in_cksum.c and restructured the main
file to switch out to CPU specific implementations.
1998-08-21 18:14:27 +00:00
Joel Sherrill
aa2171bd13 Modified version number to recut snapshot. 1998-08-21 17:42:25 +00:00
Joel Sherrill
617a1a2db1 Another missing piece. Thanks Eric. 1998-08-21 17:37:01 +00:00
Joel Sherrill
025eb96e78 changed version to 980821 1998-08-21 17:09:04 +00:00
Joel Sherrill
7a035ebcc0 Added system task attribute to allow one to create a task with "0" priority
via the user api.
1998-08-21 16:54:17 +00:00
Joel Sherrill
eb562f2c86 Patch from Eric Valette <valette@crf.canon.fr>:
Here is a patch that enables to catch exception
    and get message before crashing RTEMS :)

    It should be generic to any Intel port although enabled
    only for pc386 BSP...

    [Joel] I fixed the bug I introduced in irq_asm.s...
1998-08-21 16:39:52 +00:00
Joel Sherrill
2938140589 Spacing changes 1998-08-21 16:16:00 +00:00
Joel Sherrill
b3fd16416c Fix from Eric Norum <eric@skatter.usask.ca>:
"Thomas Doerfler" <td@imd.m.isar.de> wrote:
>
> While implementing/testing the console/termios support for
> PPC403 in RTEMS-4.0.0-beta3, I am stuck at a certain location in
> termios.c:
>
> During "rtems_termios_initialize", the main control data structure
> "*tty" is allocated using malloc(). (Note, that malloc does not
> clear the allocated memory and my BSP does not clear memory during
> startup). Furtheron, a lot of fields of that structure are
> initialized, but the field "rawOutBufState" is not, and therefore
> keeps an arbitrary contents.
>
> When "osend()" is called the first time(with the serial device
> driver working in interrupt mode), termios gets stuck and will not
> call the device drivers output function.
>
> My questions now are:
>
> - anybody already experienced this bug?
> - is it a bug at all or did I do anything fundamentally wrong?
> - is there already a common bugfix for that?
>
> I don't like poking around in other people code, as long as I am
> not absolutely sure, what I do...

Yes, there's a bug there.
I thought that Joel had patched this already, but here's a patch to
fix this.  This patch also addresses a concern that many others have
raised regarding enabling and disabling of transmitter interrupts.

First, here's the example I've been using of a simple UART-style
interrupt-driven driver:
===============================================================
void
device_write_routine (int minor, char *buf, int count)
{
        UART->control_register &= ~UART_TRANSMITTER_READY;
        UART->output_register = *buf;
        UART->control_register |= UART_TRANSMIT_INTERRUPT_ENABLE;
}

void
device_transmit_interrupt_routine (int vector)
{
        UART->control_register &= ~UART_TRANSMIT_INTERRUPT_ENABLE;
        rtems_termios_dequeue_characters (device_ttyp, 1);
}
==============================================================


Several people have expressed their concern about the disable/enable
of transmitter interrupts for every character.  On some machines
this disable/enable is an expensive operation.  With the attached
patch applied you can write the two routines as:
==============================================================
void
device_write_routine (int minor, char *buf, int count)
{
        code_to_clear_transmitter_ready_status ();
        if (device_ttyp->rawOutBufState == rob_idle)
                code_to_enable_transmitter_interrupts ();
        code_to_send_one_character_to_transmitter (*buf);
}

void
device_transmit_interrupt_routine (int vector)
{
        rtems_termios_dequeue_characters (device_ttyp, 1);
        if (device_ttyp->rawOutBufState == rob_idle)
                code_to_disable_transmitter_interrupts ();
}
===============================================================
1998-08-21 15:32:19 +00:00
Joel Sherrill
d47de32ff7 Update from Eric Norum. 1998-08-21 14:04:31 +00:00
Joel Sherrill
33679ec46e All warnings removed. 1998-08-21 13:04:55 +00:00
Joel Sherrill
c3a1c0585c Removed networkconfig.h since it reflects target specific initialization. 1998-08-21 13:04:36 +00:00
Joel Sherrill
bbdab89563 Added initialization of missing termios structure entries. 1998-08-21 12:52:08 +00:00
Joel Sherrill
ab09043a27 Fixed warning about pointer/integer conversion which turned out to be
a missed "&" on a write.
1998-08-21 12:51:29 +00:00
Joel Sherrill
fd808baef4 Fixed discrepancies noted by John Oleynick <johno@sirius.com>. 1998-08-21 12:48:44 +00:00
Joel Sherrill
a9cfa2380f changed version to 980820pm-BSD 1998-08-20 22:11:31 +00:00
Joel Sherrill
28e7d7faed Patches from Eric Norum 1998-08-20 22:04:22 +00:00
Joel Sherrill
96b3916409 Added CVS Ids 1998-08-20 21:56:40 +00:00
Joel Sherrill
ff0f694d46 Fixed many warnings. 1998-08-20 21:47:37 +00:00
Joel Sherrill
50ea4814aa changed version to 980820-BSD 1998-08-20 16:04:58 +00:00
Joel Sherrill
2394b5abec Changed to avoid use of gets(). 1998-08-20 15:56:57 +00:00
Joel Sherrill
dcc240473f Updated to reflect TCP/IP stack transition. 1998-08-20 15:46:13 +00:00
Joel Sherrill
d9e62248e4 Temporarily leave strsep out of the build. 1998-08-20 15:38:30 +00:00
Joel Sherrill
4e1d5c69f6 Added missing file. 1998-08-20 15:38:15 +00:00
Joel Sherrill
53ee76b453 Removed stub implementation 1998-08-20 15:37:42 +00:00
Joel Sherrill
0280cb66f5 FreeBSD stack compiles for the first time (except libc/strsep.c) 1998-08-20 14:39:09 +00:00
Joel Sherrill
3f098aed45 FreeBSD stack compiles for the first time (except libc/strsep.c). 1998-08-20 14:37:17 +00:00
Joel Sherrill
c197b6c2ec Base files 1998-08-20 12:54:04 +00:00
Joel Sherrill
888497d232 Base files 1998-08-20 12:45:04 +00:00
Joel Sherrill
f31f46d2b2 Base version. 1998-08-20 12:37:35 +00:00
Joel Sherrill
39e6e65a2c Base files 1998-08-19 21:32:28 +00:00
Joel Sherrill
26b5c77fb1 changed version to 980819 1998-08-19 20:25:21 +00:00
Joel Sherrill
8b2ee37c38 Patch from Eric Valette <valette@crf.canon.fr>:
- Use the "hlt" instruction for the Idle thread,
        - Optimise interrupt PATH leadding to thread wakeup,
        - Preparation for Intel exception management that should
        come before the end of the week...
1998-08-19 20:09:59 +00:00
Joel Sherrill
7549e147ae Fixed obsolete reference to BSDINSTALL. 1998-08-19 20:02:10 +00:00
Joel Sherrill
0375c72aaa Patch from Aleksey <qqi@world.std.com>:
This patch has same changes as one I sent to you earlier plus
    it fixes _heap_size problem for pc386 we had discussed earlier.

    Now, _heap_size is defined and set to 0 in pc386/startup/bspstart.c

    It can be patched to desireable value in binary image. If it is
    left unpatched, then startup code will determine size of memory
    (on the assumption that at least 2MB are present) and use
    max possible heap.
1998-08-19 14:47:39 +00:00
Joel Sherrill
2d7d605fdf Patch from Aleksey <qqi@world.std.com>:
It fixes netboot build problem, KA9Q configuration
    for pc386, some compiler wardning, it also removed some stuff
    ifdef'ed with '#if 0'.
1998-08-19 14:41:23 +00:00
Joel Sherrill
06fa582130 Patches from Ralf Corsepius <corsepiu@faw.uni-ulm.de> and myself to
make solaris target buildable.

    > 1.  The ipc check fails since solaris does not define union semun.
    > The unix port code actually defines this type itself on solaris.  Doing
    > the same thing lets it get configured.  Then...

    > 2.  It looks like BSDINSTALL is not defined properly.

    BSDINSTALL is defined in make/host.cfg.in as
    BSDINSTALL=@INSTALL@

    @INSTALL@ is generated by autoconf's standard macro AC_PROG_INSTALL, which
    is widely used in almost any autoconf/automake configured package. In case
    there is really something wrong with it, then it must be considered a bug
    in autoconf.

    I can see a doubious fragment in AC_PROG_INSTALL, which is used when no
    appropriate bsd-install is found.

Finally Ralf saw a problem with the find on solaris which I also saw and
fixed.
1998-08-19 12:56:20 +00:00
Joel Sherrill
f2226f4422 Added 68060 definition from Chris Johns. 1998-08-19 12:41:22 +00:00
Joel Sherrill
e013fe3cd0 If 0 out the code which touches the chip in questionable ways for processing
a giant packet.
1998-08-14 16:55:50 +00:00
Joel Sherrill
7ba7108101 Changed tm27 clear interrupt macro on all PPC BSPs except the papyrus. 1998-08-14 15:24:09 +00:00
Joel Sherrill
db8e8a8bef Added information on caching. 1998-08-14 15:23:33 +00:00