Commit Graph

8546 Commits

Author SHA1 Message Date
Joel Sherrill
461f9f4882 nios2-iic-irq.c: Fix warnings 2014-10-09 10:11:55 -05:00
Joel Sherrill
905b656c5b nios2-iic-irq.c: Include <rtems/score/interr.h> so it builds 2014-10-09 10:11:54 -05:00
Sebastian Huber
3e1bf786bd ppp: PR1943: Avoid NULL pointer access
Waiting for mbufs at this level is a bad solution.  It would be better
to try to allocate a new mbuf chain before we hand over the current mbuf
chain to the upper layer.  In case the allocation fails we should drop
the current packet and use its mbuf chain for a new packet.
2014-10-08 11:55:15 +02:00
Sebastian Huber
22cd2821de IMFS: Avoid NULL pointer access
Avoid NULL pointer access in IMFS_is_imfs_instance().  File systems
mounted via mount() always have a valid type string.
2014-10-08 11:26:27 +02:00
Sebastian Huber
b9f952254b posix: Add auto initializaton for rwlock 2014-10-08 11:26:27 +02:00
Sebastian Huber
dfdad6ab1d posix: Fix mutex auto initialization
Use the once lock to prevent race conditions during auto initialization.
2014-10-08 11:26:27 +02:00
Sebastian Huber
419accf6a6 posix: Use function instead of macros 2014-10-08 11:26:26 +02:00
Sebastian Huber
044cf4d713 ppp: Add ppp_unit()
This makes porting to the new network stack easier.
2014-10-08 08:12:24 +02:00
Sebastian Huber
77dd9a4f8a ppp: Nothing to transmit hint for Termios driver 2014-10-07 16:35:20 +02:00
Sebastian Huber
7fd5e89c96 termios: Partially hide rtems_termios_tty
Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler.  This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.
2014-10-07 16:35:13 +02:00
Sebastian Huber
a830cb864d termios: Separate flow control from normal handler 2014-10-07 16:27:51 +02:00
Sebastian Huber
ff7217b2f0 termios: Fix transmit daemon
Do not call rtems_termios_refill_transmitter() in case a PPP line
discipline is present.  This is similar to
rtems_termios_dequeue_characters().
2014-10-07 15:09:47 +02:00
Daniel Hellstrom
9bd7b3b1a2 SPARC: Fatal_halt use source and exit codes
The Fatal_halt handler now have two options, either halt
as before or enter system error state to return to
debugger or simulator. The exit-code is now also
propagated to the debugger which is very useful for
testing.

The CPU_Fatal_halt handler was split up into two, since
the only the LEON3 support the CPU power down.

The LEON3 halt now uses the power-down instruction to save
CPU power. This doesn't stop a potential watch-dog timer
from expiring.
2014-10-06 13:19:18 +02:00
Chris Johns
56ed56a641 libmisc/shell: Remove the need for -lm when linking from the ping command.
Remove the use of sqrt and so the need to link to -lm.
Clean up some warnings.
2014-10-04 08:55:12 +10:00
Sebastian Huber
456eab7dc8 pppd: Import change from NetBSD
This avoids the use of gethostbyname() in case the "noipdefault" option
is given.  The gethostbyname() uses DNS by default.
2014-09-30 14:06:09 +02:00
Sebastian Huber
805360b8e5 pppd: Fix warnings 2014-09-30 14:06:09 +02:00
Sebastian Huber
33739be8af libnetworking: Update due to Termios changes 2014-09-30 14:06:09 +02:00
Hesham ALMatary
5464752f79 or1k fix bug: Initialize thread context with higher stack address.
Since or1k architecture stack grows down, threads should be initialized
with high stack addresses instead of lower ones. This is done in
_CPU_Context_Initialize function.
2014-09-29 14:36:52 -05:00
Sebastian Huber
5323247c31 m68k: Use CPU_TIMESTAMP_USE_STRUCT_TIMESPEC
Converting 64-bit nanoseconds values into the common struct timeval or
struct timespec formats requires a 64-bit division to get the seconds
value.  Performance analysis of high network loads revealed that this is
too costly on PowerPC.
2014-09-23 10:46:36 +02:00
Sebastian Huber
30e5e76540 powerpc: Use CPU_TIMESTAMP_USE_STRUCT_TIMESPEC
Converting 64-bit nanoseconds values into the common struct timeval or
struct timespec formats requires a 64-bit division to get the seconds
value.  Performance analysis of high network loads revealed that this is
too costly on PowerPC.
2014-09-23 10:46:36 +02:00
Sebastian Huber
dadd7cd2fd score: Delete Thread_Wait_information::Block2n
This field is no longer used.
2014-09-23 10:46:36 +02:00
Sebastian Huber
90ce69b0f1 score: Critical fix for _Thread_queue_Dequeue()
Do not return NULL in case we can dequeue the executing thread.  This
bug was introduced with 3250664700.
2014-09-19 14:25:34 +02:00
Sebastian Huber
386d8b5235 sparc: Add comment 2014-09-18 15:33:33 +02:00
Sebastian Huber
15d7261bec telnetd: Use socklen_t 2014-09-18 08:09:09 +02:00
Sebastian Huber
c040b113da redirector: Rename rtems_stdio_redirect_t
Rename rtems_stdio_redirect_t to rtems_stdio_redirect since the
namespace *_t is reserved by POSIX, see also The Open Group Base
Specifications Issue 6 IEEE Std 1003.1, 2004 Edition, 2.2.2 The Name
Space.
2014-09-17 07:21:35 +02:00
Joel Sherrill
2195a95fb7 Libmisc/Makefile.am: Build with networking disabled 2014-09-16 17:41:43 -05:00
Joel Sherrill
f535fe5311 tod.h -> libcsupport like other driver and helper prototype files
This rippled into the handful of files that should have been using
<rtems/tod.h>.
2014-09-16 16:09:13 -05:00
Joel Sherrill
f641b15e18 Revert: rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate warnings
This may actually be a problem in inttypes.h.
2014-09-16 16:09:13 -05:00
Joel Sherrill
8fbe2e69b5 Use correct prototype of benchmark_timer_read()
This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.
2014-09-16 16:09:12 -05:00
Hesham ALMatary
e0aef221a2 score/cpu/or1k: Follow no_cpu ISR_Handler algorithm.
This patch adjusts ISR_Handler to exactly follow the pseudo code introduced
in
http://rtems.org/onlinedocs/doc-current/share/rtems/html/porting/Interrupts-Interrupt-Dispatching.html
It adds two new checkings on _Thread_Dispatch_disable_level and _ISR_Nest_level
after returning from the C handler.
2014-09-16 09:53:01 -05:00
Hesham ALMatary
eb14fc2b2e OpenRISC: Account for red-zone (fixup printf bug).
This patch allocate a space in the stack to account for red-zone
that gcc may utilize for the use of leaf functions. Care must be
taken to handle this red-zone from many places:
1- Upon creation of a new thread stack.
2- Once an interrupt entred.

Also moving the enable-thread-dispach() and increment ISR level before
checking if dispatch needed was required.

The previous modifications solved the printf bug which disabled ticker
to output strings after context switches that arise from Thread_Delay_ended.
2014-09-16 09:52:56 -05:00
Chris Johns
b299960aed shell: Add an md5 hash command for files.
This command lets you get an MD5 hash for a file in an RTEMS file system.
2014-09-16 15:19:58 +10:00
Chris Johns
ebf9a057b5 libmisc: Add a stdio redirector helper.
This module makes it easy to redirect and capture stdout, stderr or any
other fd in your application.

The captured data can be sent off board, for example using syslog,
or buffered and displayed in a web page.
2014-09-16 15:19:58 +10:00
Chris Johns
a8fa078f1e shell: Add a ping command.
The ping code is taken from a recent FreeBSD release. Some options have been
tested, other not tested or do not work. This could be due to the age of
our TCP/IP stack.

This version of ping will not work if more than 64 file descriptors are
open at once because the select FD size is 64 as set in newlib.
2014-09-16 15:19:58 +10:00
Sebastian Huber
4c9f02d3b3 dosfs: Check error status 2014-09-11 13:04:42 +02:00
Sebastian Huber
c48cf0bd0c score: Rename _BSP_Exception_frame_print()
Rename _BSP_Exception_frame_print() to _CPU_Exception_frame_print() to
be in line with other CPU port functions.
2014-09-11 09:10:16 +02:00
Sebastian Huber
6e0000ca61 powerpc: Delete PPC_BSP_HAS_FIXED_PR288 2014-09-11 09:07:36 +02:00
Hesham ALMatary
0facefc30f or1k: Let CPU/BSP Fatal handler have access to source
This patchs follows the latest commit by Daniel Hellstrom that
requires _CPU_Fatal_halt to have _source passed to it along with
_error number.
2014-09-10 15:10:41 +02:00
Daniel Hellstrom
f82752a474 Let CPU/BSP Fatal handler have access to source
Without the source the error code does not say that much.
Let it be up to the CPU/BSP to determine the error code
reported on fatal shutdown.

This patch does not change the current behaviour, just
adds the option to handle the source of the fatal halt.
2014-09-10 14:06:08 +02:00
Pavel Pisa
80ad7090ab score: More strict RTEMS_DEQUALIFY implementation.
This implementation is able to catch cast to type
which differs not only in qualifiers. The error
diagnostic message when used in function is self
descriptive. Macro is compatible with used in initializers
but there message about not constant initial value
signals types incompatibility.

The actual implementation does not distinguish between
volatile and const removal.
2014-09-08 14:17:04 +02:00
Sebastian Huber
05ac47d75e posix: Use RTEMS_DECONST() 2014-09-08 07:53:02 +02:00
Sebastian Huber
4d5250c165 posix: Fix warning 2014-09-08 07:53:02 +02:00
Sebastian Huber
8dab980932 libcsupport: Use RTEMS_DECONST() 2014-09-08 07:53:02 +02:00
Sebastian Huber
a72f16e47b score: Add RTEMS_DECONST|DEVOLATILE|DEQUALIFY() 2014-09-08 07:53:02 +02:00
Jennifer Averett
2a86615b98 capture: Add support for variable length records. 2014-09-05 06:50:29 -05:00
Jennifer Averett
133962bf2f capture: Split user extension methods out. 2014-09-05 06:50:29 -05:00
Hesham ALMatary
bc35eeca85 Regenerate preinstall.am for score/cpu/or1k
This patch regenerates preinstall.am file after Chris fixup regarding
preinstall.am files gerenration from bootstrap -p command.
2014-09-04 13:12:33 -05:00
Joel Sherrill
06ac8b7122 shell.c: Add cast to match printf() expectations for width specifier 2014-09-04 09:08:05 -05:00
Joel Sherrill
2dd1e75ed9 rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate warnings 2014-09-04 09:08:05 -05:00
Joel Sherrill
3bff410eec rtems/score/assert.h: Rework to allow use of NDEBUG 2014-09-04 09:08:04 -05:00