Commit Graph

33416 Commits

Author SHA1 Message Date
Chris Johns
95036a4591 shell: Only clear std handles when the shell task exits
Clearing the std file handles when the main loop exited crashes
telnetd as it reuses its session threads.

Closes #3859
2020-08-08 18:07:32 +10:00
Sebastian Huber
534f9dbe13 arm/atsam: Make interrupt server configurable
The external UART over SPI device SC16IS752 uses the interrupt server
for interrupt processing. The interrupt server is also heavily used by
libbsd. The interrupt processing for the SC16IS752 is time critical and
doesn't work if network traffic is processed at the same priority.
With #4033 custom interrupt servers are available. Change
atsam_sc16is752_spi_create() to support user-defined interrupt servers.
Introduced atsam_sc16is752_spi_config to cut down the argument count of
this function.

Close #4038.
2020-08-05 06:59:10 +02:00
Christian Mauderer
4a2ac5ef8d dosfs: Fix memory leak on failed mounts.
Currently if mount fails, a converter isn't destroyed. We have to take
care of two cases:

1. The user doesn't provide a converter.

In this case mounting a dosfs creates a default converter. This patch
makes sure that the converter is destroyed again if mount failes for
this case.

2. The user provides a converter.

In this case it's not sure that the dosfs specific routines are reached
because mount can fail before that. Therefore the user has to destroy
the converter himself again. This patch adds a documentation for that
and implements it in the media server.

Closes #4041.
2020-08-04 08:26:58 +02:00
Sebastian Huber
5eb0773159 rtems: Add rtems_interrupt_server_create()
Add rtems_interrupt_server_destroy().

Before this patch, the only way to create interrupt servers was
rtems_interrupt_server_initialize(). This function creates the default
interrupt server and in SMP configurations additional interrupt servers
for the additional processors. The interrupt server is heavily used by
libbsd. This includes the epoch based reclamation which performs time
consuming resource and memory deallocation work. This does not work well
with time critical services, for example an UART over SPI or I2C. One
approach to address this problem is to allow the application to create
custom interrupt servers with the right priority and task properties.
The interrupt server API accounted for this, however, it was not
implemented before this patch.

Close #4033.
2020-08-03 08:43:45 +02:00
Jan Sommer
849d741832 i386: Fix possible race condition on first context restore
Make sure that the esp is restored before the eflags register.

When the init task is initially restored, system interrupts are activated when the
eflags register is loaded.
If the esp register still points to an address in the interrupt stack
area (from early system initlization) the ISR might overwrite its own
stack.

Closes #4030
2020-07-29 11:39:35 +02:00
Jan Sommer
a1f9265c03 bsps/pc386: Fix IPI for non-consecutive APICIDs
- properly use the cpu <-> apic maps for IPIs

Closes #4028.
2020-07-16 08:08:09 -05:00
Sebastian Huber
46c2387181 rtems: Remove RTEMS_MP_NOT_CONFIGURED error
Some objects can be created with a local or global scope in a
multiprocessing network. In non-multiprocessing configurations setting
the scope to local or global had no effect since such a system can be
viewed as a multiprocessing network with just one node. One and all
nodes is the same in such a network. However, if multiprocessing was
configured, creation of a global object in a single node network
resulted in an RTEMS_MP_NOT_CONFIGURED error. Remove this error
condition for symmetry to the non-multiprocessing setup. This is in line
with the task affinity behaviour in SMP systems.

Update #4005.
2020-06-18 07:09:34 +02:00
Chris Johns
bc73a08598 i386/pc: Initialise the printk serial port on first use 2020-06-18 12:03:28 +10:00
Joel Sherrill
4a8b135dd6 bsps/i386/pc386/start/*.S: Remove space before tab 2020-06-17 07:52:15 -05:00
Jan Sommer
96d9823ddd bsp/pc386: Disable interrupt nesting for job handler
- Fixes timeout for smpipi01 where:
    + Main thread sends perform jobs to worker cpu while it is already
    performing jobs
    + Interrupt on worker cpu performs jobs, but with empty job list
    + Worker cpu continues to execut previous job and adds new job list
    to itself, which is never performed, since the interrupt has already
    been handled
    + Main thread blocks forever on barrier D
2020-06-11 13:29:41 +10:00
Jan Sommer
6369dafbb6 smpsignal01: Change state before sending the signal
The signal handler of the consumer might start executing
before rtems_signal_send of the producer returns.
Therefore change the state to SIG_1_SENT before sending the signal.
2020-06-11 13:29:35 +10:00
Jan Sommer
208cd6b794 bsps/pc386: Separate smp API functions. Makes smpfatal08 link 2020-06-11 13:29:27 +10:00
Jan Sommer
c954003fa0 bsps/pc386: Fix Clock_isr for SMP
- Do not forward Clock_isr through Clock_driver_support_at_tick as this
will cause every processor to send IPIs with Clock_isr therby creating
an infinie loop
- Instead the processor handling the clock interrupt causes all other
processors to call rtems_timecounter_tick to update their tick count
2020-06-11 13:29:18 +10:00
Jan Sommer
5d4a1edca0 bsp/pc386: Define interrupt stack frame for smp
- Defines CPU_Interrupt_frame in cpu_impl.h
- Updates isq_asm.S to save/restore registers in matching order to
interrupt frame
2020-06-11 13:29:11 +10:00
Jan Sommer
8937f12f18 bsp/pc386: Update context switch and restore
Uses similar flow in cpu_asm.S for i386 as for arm.
2020-06-11 13:29:03 +10:00
Jan Sommer
85d6a760f5 bsp/pc386: Update GDT to work for SMP
Create a GS segment in the GDT for each processor for storing TLS.
This makes the GDT in startAP.S obsolete as all processors now share the
same GDT, which is passed to each AP at startup.

The correct segment for each processor is calculated in cpu_asm.S.

Update #3335
2020-06-11 13:28:55 +10:00
Jan Sommer
f99b1f02b0 bsp/pc386: Turn start16.S into a startAP.S
start16.S is now only used for SMP configurations to start the
application processors.

This commit removes all unnecessary parts for this job,
i.e. video conssole initalisation, A20 gate activation
and all non-AP related code.

Update #3335
2020-06-11 13:28:46 +10:00
Jan Sommer
a2b7ab0385 bsp/pc386: Fix Makefile for building with SMP 2020-06-11 13:28:36 +10:00
Eshan dhawan
e84587355a tests for fenv.h functions
added tests for fesetexeptflag(), fegetexeptflag(),
fegetround(), fesetround().

In the test fegetround() does not return any flag
other then FE_TONEAREST in tests.
This is probably due to soft float.

The test complies successfully and returns assert
at fegetround()

Other tests run without any errors
tested on RISCV/rv32imac

The test prints nothing if runs successfully.

updates #2971

Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-06-06 15:24:59 -05:00
Sebastian Huber
bd750c9e6e arm: Fix ARMv7-M exception handler
Store the stack pointer of the exception context to the exception frame.

Close #3987.
2020-05-27 10:25:12 +02:00
Sebastian Huber
934cbe7d9f posix: Get real priority in pthread_getattr_np()
This is in line with pthread_setschedparam() and
pthread_getschedparam().

Update #2514.
2020-05-12 07:08:16 +02:00
Sebastian Huber
ea2d9237fc libtests/tar01: Remove files of tar01.tar archive
Update #3968.
2020-05-08 15:12:40 +02:00
Sebastian Huber
153b26699e termios: Replace rtems_termios_isig_status_code
Merge the rtems_termios_isig_status_code and
rtems_termios_iproc_status_code enums into a single
rtems_termios_iproc_status_code which is now a part of the API.

Simplify rtems_termios_posix_isig_handler() to avoid unreachable code.

Close #3800.
2020-05-07 12:31:56 +02:00
Sebastian Huber
ef9517b7d5 libtests/tar0[12]: Add tar archive
Do not generate the test tar archive on the host computer since not all
file systems support symbolic links.

Close #3968.
2020-05-07 12:31:56 +02:00
Chris Johns
084ea83a9b testsuite: Add expected-fail to beagleboneblack
Updates #2962
2020-05-06 18:40:42 +10:00
Chris Johns
7e3af67349 testsuite: Add expected-fail to xilinx's zedboard, a9_qemu, zc702 and zc706
Updates #2962
2020-05-06 18:40:27 +10:00
Chris Johns
1b1755d9a6 testsuite: Add expected-fail to psim
Updates #2962
2020-05-06 18:39:55 +10:00
Chris Johns
e9762d74b8 libdl: Add allocator check script
Use with the trace outout to check for allocation leaks.
2020-05-06 18:39:15 +10:00
Chris Johns
7d00247497 testsuite: Add expected-fail to erc32, leon2, and leon3 BSPs
Updates #2962
2020-05-06 18:39:05 +10:00
Chris Johns
89f57a665f testsuite: Add the BSP architecture to the include path
Updates #2962
2020-05-06 18:38:38 +10:00
Sebastian Huber
3ce3cdfc5b score: Update _Copyright_Notice
Add the _Copyright_Notice to a special linker set to prevent a garbage
collection of this item.
2020-05-06 08:02:15 +02:00
Sebastian Huber
d30a352d4c rtems: Deprecate _Copyright_Notice
Close #3973.
2020-05-06 08:01:57 +02:00
Sebastian Huber
1af8e45bb7 rtems: Add rtems_get_copyright_notice()
Update #3973.
2020-05-06 07:47:34 +02:00
Sebastian Huber
63274daf68 rtems: Deprecate <rtems/system.h>
Close #3972.
2020-05-06 07:47:34 +02:00
Sebastian Huber
3d86d83c1b rtems: Deprecate RTEMS_MAXIMUM_NAME_LENGTH
This define is

* not documented,

* not used in the RTEMS code base, and

* longer than sizeof(rtems_name).

Close #3971.
2020-05-06 07:46:29 +02:00
Sebastian Huber
34b098edc5 rtems: Deprecate use of _RTEMS_version
Close #3970.
2020-05-06 07:39:10 +02:00
Sebastian Huber
4b9b6ddb9f Use rtems_get_version_string()
Update #3970.
2020-05-06 07:39:09 +02:00
Chris Johns
e78c0806cb libtest/dl09: Test trampolines only when supported 2020-05-06 08:46:57 +10:00
Chris Johns
3f50e8e671 testsuite/dl06: Add a local define to control tracing
Closes #3969
2020-05-05 15:00:45 +10:00
Chris Johns
b7702c541c libdl/rap: Correctly check the return enum from rela calls
- The change from bool to an enum did not trip a compiler warning
  and only the rel path was changed. The rela path was missed so
  archs like SPARC failed.

Updates #3969
2020-05-05 14:58:27 +10:00
Chris Johns
3635d6a836 libdl/obj-comp: Add trace prints when decompressing
Updates #3969
2020-05-05 14:57:34 +10:00
Chris Johns
d5fc2a6ad6 libdl/obj-cache: Fail if the read offset is past the file length
- The check was for greater than and not equal or greater

Updates #3969
2020-05-05 14:55:34 +10:00
Chris Johns
b77670fd3f libdl/obj: Fix RAP format call table.
Updates #3969
2020-05-05 14:54:39 +10:00
Chris Johns
fe77587c64 libdl/sparc: Print trace message of reloc failture path
Updates #3969
2020-05-05 14:53:53 +10:00
Chris Johns
285cda38e1 libdl: Fix comment.
Updates #3969
2020-05-05 14:53:14 +10:00
Chris Johns
f767355d39 rtems-bsps: Add markdown support
- Convert to python for better performance
2020-05-01 18:03:49 +10:00
Sebastian Huber
a8f0d941c3 libtests/heapwalk: Fix for RTEMS_DEBUG
Update #2962.
2020-04-29 06:58:16 +02:00
Sebastian Huber
cfe8f7a9b7 doxygen: Switch @brief and @ingroup
This order change fixes the Latex documentation build via Doxygen.
2020-04-28 09:04:00 +02:00
Chris Johns
0b41675971 libdl/mips: Fix MIPS16hi/lo relocation support.
This patch is an updated version from:

https://lists.rtems.org/pipermail/users/2016-January/029740.html

Closes #3693
2020-04-28 13:58:20 +10:00
Chris Johns
396e98305e README: Fix the rtems.git line
Updates #3231
2020-04-27 11:35:21 +10:00