Commit Graph

26823 Commits

Author SHA1 Message Date
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
8a9bdc565f libchip/serial: Task driven mode for NS16550 2014-10-07 16:35:20 +02:00
Sebastian Huber
2fd3e65fac libchip/serial: Fix NS16550 for pppstart()
Call rtems_termios_dequeue_characters() only in case all characters of
the last write handler invocation have been transmitted.  This avoids
problems with pppstart() since the start line discipline does not know
how many characters have been dequeued and assumes the maximum.
2014-10-07 16:35:20 +02:00
Sebastian Huber
6ec438e8a3 libchip/serial: Add alternative NS16550 driver
Use the Termios device API.
2014-10-07 16:35:20 +02:00
Sebastian Huber
d5cc923fea bsps: Add Termios console driver initialization
Add a simple Termios console driver using a table for statically
registered devices used in console_initialize() and dynamic installation
via console_device_install().
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
74f5eaffb9 erc32,leon2: replace bsp_reset with SPARC fatal handler
Now that a SPARC fatal handler is defined, we no longer
need the BSP specific reset routine.
2014-10-06 14:52:16 +02:00
Daniel Hellstrom
5e92a40a38 LEON3: use CPU_Fatal_halt for halt
By removing the bsp_reset() mechanism and instead relying on the
CPU_Fatal_halt() routine SMP and single-core can halt by updating
the _Internal_errors_What_happened structure and set the state to
SYSTEM_STATE_TERMINATED (the generic way). This will be better
for test scripts and debugger that can generically look into why
the OS stopped.

For SMP systems, only the fatal-reporting CPU waits until all other
CPUs are powered down (with a time out of one clock tick). The
reason why a fatal stop happend may be because CPU0 was soft-locked
up so we can never trust that CPU0 should do the halt for us.
2014-10-06 14:44:44 +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
Daniel Hellstrom
ce4a7ae9da SPARC: add BSP specific error handler
Instead of calling the system call TA instruction directly it
is better paractise to isolate the trap implementation to the
system call functions.

BSP_fatal_exit() is added.
2014-10-06 09:34:24 +02:00
Daniel Hellstrom
dfc2786d4d SPARC BSPs: remove BSP_fatal_return unreached code 2014-10-06 09:34:24 +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
Tomasz Gregorek
7db695311b bsp/stm32f4XXXX: System clock configuration
Added simple math to caclulate register values for the PLL
and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
Also it will set latency on the Flash memory for the high speeds.

Limitations:
It is assumed that 1MHz resolution is enough.
Best fits for the clocks are achieved with multiplies of 42MHz.
Even though APB1, APB2 and AHB are calculated user is still required
to provide correct values for the bsp configuration for the:
STM32F4_PCLK1
STM32F4_PCLK2
STM32F4_HCLK (= system clock)
as those are used for the peripheral clocking calculations.
2014-10-02 07:54:52 +02:00
Moroz.Oleg
9a8b29848d Fix assertion "BUF != NULL" for i386
BSP_uart_termios_write_com1 and BSP_uart_termios_write_com2
2014-10-02 07:31:58 +02:00
Daniel Cederman
93b000e645 bsp/leon3: Replace the define LEON3_MP_IRQ with a weakly linked variable
The LEON3_MP_IRQ define is used to pick the IRQ to be used by the
shared memory driver and for inter-processor interrupts. On some LEON3
systems, for example the GR712RC, the default value of 14 is not suitable.
To make this value configurable from the application, it is replaced with
a weakly linked variable that can be overridden from the application.
2014-10-02 07:29:05 +02: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
fbe59f7c67 or1ksim: Console: implement uart_read_polled
Implement uart_read_polled which is needed for any application that
reads input from users. It works fine with pppd, capture, and all
termios tests.
2014-09-29 14:37:25 -05: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
79bbb1cb67 bsp/genmcf548x: Use inline cache implementation 2014-09-23 10:46:37 +02:00
Sebastian Huber
c3bf343052 bsp/genmcf548x: Delete duplicate network config 2014-09-23 10:46:37 +02: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
6f1e1b308c sptests/spintrcritical22: New test 2014-09-19 14:25:34 +02:00
Joel Sherrill
b422c54948 doc/shell: Correct build issues from fc9f8f5085 2014-09-18 08:57:11 -05:00
Sebastian Huber
386d8b5235 sparc: Add comment 2014-09-18 15:33:33 +02:00
Sebastian Huber
bdd6082618 bsps: Fix build error
Fix build error introduced in f535fe5311.
2014-09-18 11:07:41 +02:00
Sebastian Huber
15d7261bec telnetd: Use socklen_t 2014-09-18 08:09:09 +02:00
Sebastian Huber
8f0a2c995b smptests/smpload01: Report profiling only once
Rely on test extension to report profiling.
2014-09-17 10:31:30 +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
6cd20744e5 pc386/.../bsp.h: Do not include crt.h
crt.h defines such lovely constants as "RED" and "GREEN" which
have a nasty habit of conflicting with non-BSP code. There is
no reason to include this private .h from bsp.h and pollute the
namespace for applications.
2014-09-16 16:09:12 -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
c080c3434b or1k: New cache manager.
Implement new cache functions for or1k and create new bspstart function
for or1ksim to initialize instruction and data caches. Also, sim.cfg
is modified to enable/confiure cache units.
2014-09-16 12:46:42 -05:00
Hesham ALMatary
bbecf04172 or1ksim: Update README
Modify README to provide instruction on how to run or1ksim BSP on
latest or1ksim emulator built from github repo and add commands
to run or1ksim BSP on QEMU.
2014-09-16 09:53:28 -05:00
Hesham ALMatary
d2c7616057 or1ksim: Implement cpu counter functions. 2014-09-16 09:53:05 -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
5f56d2679a or1ksim: work-around to make or1ksim tick timer accurate.
This patch avoids unexpected behavior when initializing tick timer registers.
Initializing these registers fires unexpected exceptions and interrupts even
though RTEMS has not enabled interrupts yet. So, a little long interval added
to allow RTEMS to finish the remaining initialization work before running the
application. The tick timer interval is adjusted to reflect an accurate
timing for RTEMS applications.
2014-09-16 09:52:58 -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
Sebastian Huber
7f8a978e6b sptests/sp07: Minimize thread dispatch latency
Do not use sprintf() in thread dispatch critical sections to avoid
corruption of profiling samples.  Update test to reflect thread the life
cycle changes.
2014-09-16 15:43:15 +02:00
Daniel Cederman
6e1206ab46 smptests/smpcache01: Remove invalidation of data cache lines from test
Invalidation of entire data cache might cause data written to the stack
to get lost.
2014-09-16 10:29:42 +02:00
Chris Johns
fc9f8f5085 doc: Sort the shell file commands into alphabetical order. 2014-09-16 15:19:58 +10:00