Commit Graph

34670 Commits

Author SHA1 Message Date
Sebastian Huber
db8f598d56 build: Remove old build system
Close #3250.
Close #4081.
2021-09-21 07:39:09 +02:00
Sebastian Huber
04998451b9 arm/lpc24xx: Use common test definition file 2021-09-21 07:39:09 +02:00
Sebastian Huber
a6636d9957 libtest: Improve T_now_tick()
The T_now_tick() is a fall back time measurement using the CPU counter
in case no Clock Driver is configured.  Some CPU counter may overflow
during the test execution.  Accumulate the elapsed time to reduce the
chance of CPU counter overflows.
2021-09-21 07:39:09 +02:00
Sebastian Huber
cd198a5511 score: Remove unused default scheduler ops
If SMP support is enabled and the system has exactly one processor, then
it may use an uniprocessor scheduler.  The ask for help, reconsider help
request, and withdraw node operations can be NULL in this case, since
they are only used if a thread has at least one helping scheduler node.
At least two schedulers are required to get a helping node and each
scheduler involved must own at least one processor.  This is not
possible on a system with exactly one processor.
2021-09-21 07:39:09 +02:00
Sebastian Huber
3291b2a7d5 score: Ensure only one CPU if required
Issue the new fatal SMP error
SMP_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR if the system starts
with not exactly one processor and an uniprocessor scheduler is
configured.
2021-09-21 07:39:09 +02:00
Sebastian Huber
0036ddf1f6 score: Provide two thread pin/unpin defaults
The uniprocessor schedulers do not support systems with more than more
processors.  So they rivially support thread pinning and thus the
SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED cannot happen.

Add a second default implementation for SMP schedulers which do not
support thread pinning.

Change license to BSD-2-Clause according to file history and re-licensing
agreement.

Update #3053.
2021-09-21 07:39:09 +02:00
Sebastian Huber
59537c9648 score: SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY
Rename SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY in
SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION.  Add Doxygen comment.
2021-09-21 07:39:09 +02:00
Sebastian Huber
92b9f656e1 score: SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP
Rename SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP in
SCHEDULER_DEFAULT_SMP_OPERATIONS.  Add a Doxygen comment.
2021-09-21 07:39:08 +02:00
Ryan Long
3951d4da6f pxcdevctl: Adjust for standard
psxdevctl is supposed to return the value in errno. Before, it was
returning -1 and setting errno. Changed the tests to reflect these
changes. Added code from RRADE's posix_devctl.c.

Closes #4506
2021-09-20 13:31:25 -05:00
Chris Johns
9e30a716a3 powerpc/motorola_powerpc: Map LibBSD bus space to the PCI base address 2021-09-19 10:08:25 +10:00
Sebastian Huber
dbb7c956e6 rtems: Fix message manager documentation
Correct the description of the ``count`` parameter of
rtems_message_queue_flush().

Update #4508.
2021-09-16 09:36:00 +02:00
Chris Johns
691d0edd34 arm/xilinx: Fix zynq-uart interrupt receive
- Trigger on a single character entering the RX FIFO

- Disable the RX timeout

- Send up to a FIFO full of data
2021-09-16 11:11:13 +10:00
Alex White
0490be70ee testsuites: Wrap putchar
The linker flag to wrap putchar was lost in translation from make to waf.
2021-09-16 11:11:13 +10:00
Sebastian Huber
1567d9279b rtems: Add header files to Doxygen groups 2021-09-15 13:56:42 +02:00
Sebastian Huber
79efc81a71 rtems: Move Doxygen group definition
Move the definition of the top-level Classic API implementation group to
an implementation header file.
2021-09-15 13:39:23 +02:00
Sebastian Huber
a45bc321c2 rtems: Improve Classic API group description 2021-09-15 07:50:43 +02:00
Sebastian Huber
fe818cd4b9 rtems: Fix message manager documentation
Remove bogus return status from rtems_message_queue_receive().  Clarify
rtems_message_queue_flush().

Update #4508.
2021-09-15 07:50:43 +02:00
Sebastian Huber
466cd91744 rtems: Generate <rtems/extension.h>
Remove the duplicated description which is an out dated copy and paste
from the Classic API Guide.  Instead, thoroughly document the individual
extensions.

Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
2021-09-15 07:50:43 +02:00
Sebastian Huber
606c9a642a rtems: Generate <rtems/rtems/cache.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
Update #4513.
2021-09-15 07:50:29 +02:00
Sebastian Huber
c274009d2e build: Remove invalid attributes 2021-09-14 14:39:20 +02:00
Sebastian Huber
af722b76d2 bsps/arm: Fix ABI flags for Cortex-M4
Close #4504.
2021-09-14 07:31:28 +02:00
Stephen Clark
7792ab88ca bsps/zynqmp: Added I2C support for ZynqMP
Added I2C drivers for ZynqMP and updated build system accordingly.
2021-09-09 14:19:57 -05:00
Stephen Clark
73c182a5ed bsps/zynq: Moved general i2c files to shared directories
Certain files related to the Zynq BSP's I2C driver are useable by the ZynqMP BSP as well.
Moved these files to shared directory in anticipation of I2C support for ZynqMP.
2021-09-09 14:19:57 -05:00
Sebastian Huber
82a61afd8c rtems: Initialize count of postponed jobs
The rtems_rate_monotonic_get_status() directive returns an arbitrary
number for the count of postponed jobs if it is called for a newly
created period object.  Set the count of postponed jobs to zero during
object creation.

Close #4511.
2021-09-09 15:05:51 +02:00
Sebastian Huber
c0435b5eb2 rtems: Document time of day constraints
Update #4338.
2021-09-06 12:41:02 +02:00
Sebastian Huber
f958d58a6a score: Split up rbtreenext.c
Split up rbtreenext.c since only _RBTree_Minimum() is used by the operating
system core services (thread queues and the EDF scheduler).

Change license to BSD-2-Clause according to file history and re-licensing
agreement.

Update #3053.
2021-09-06 12:24:06 +02:00
Sebastian Huber
ad41c17933 score: Change TOD_LATEST_YEAR to 2099
This simplifies the implementation a bit.  Declare _TOD_Days_to_date[] in
<rtems/score/todimpl.h>.  Make _TOD_Days_per_month[] and
_TOD_Days_since_last_leap_year[] static.

Update #4338.
2021-09-06 12:24:04 +02:00
Sebastian Huber
ff3df9f32f score: Simplify _TOD_Validate()
Split up the multi line if statement into smaller parts.
2021-09-06 12:22:44 +02:00
Sebastian Huber
6d2becb78d score: Limit the CLOCK_REALTIME setting
Limit the CLOCK_REALTIME setting to ensure that the CLOCK_REALTIME is defined
for a system uptime of at least 114 years.
2021-09-06 12:22:44 +02:00
Sebastian Huber
54b4b1f85a score: Add _TOD_Is_valid_new_time_of_day()
Move the TOD validation to the callers of _TOD_Set().  This avoids dead code in
case only rtems_clock_set() is used in an application because rtems_clock_set()
always calls _TOD_Set() with a valid time of day.
2021-09-06 12:22:44 +02:00
Sebastian Huber
c8e4de991d score: Remove TOD_TICKS_PER_SECOND_method()
Use _Watchdog_Ticks_per_second instead.
2021-09-06 12:22:44 +02:00
Sebastian Huber
8abd175669 score: Return status in _TOD_Adjust() 2021-09-06 12:22:44 +02:00
Sebastian Huber
fbd0a3cec3 score: Move _Thread_Dispatch()
The _Thread_Dispatch() function was customized over time and now the
work is done by _Thread_Do_dispatch() and specialized wrappers.  The
plain _Thread_Dispatch() is now only used in some CPU ports.  Move it to
a separate file to avoid dead code in the general.

Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-09-03 17:14:19 +02:00
Sebastian Huber
2647e76e8f score: Document thread queue operations 2021-09-03 08:21:14 +02:00
Sebastian Huber
01d22f7f79 bsps/leon3: Rename fatal error code
Rename LEON3_FATAL_INVALID_CACHE_CONFIG_MAIN_PROCESSOR in
LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR since the term
"boot processor" is used elsewhere in the code base.
2021-09-02 09:22:38 +02:00
Sebastian Huber
b2c626f016 Improve test of rtems_interrupt_get_affinity()
Use a CPU set which is larger than the internal processor set
representation.
2021-09-02 08:54:58 +02:00
Sebastian Huber
a93d0ce2f5 validation: Improve generated test code
Move the transition map members of the test context to a dedicated
structure.  Move the transition variant pre-condition prepare, action,
and post-condition checks to a separate function to reduce the
indentation level and allow skipping of transition variants.
2021-09-02 08:54:58 +02:00
Sebastian Huber
34099baa9c libtest: Return fixture context in T_case_begin()
This makes it similar to T_push_fixture().
2021-09-02 08:54:58 +02:00
Christian Mauderer
e495633887 bsps/imxrt: Improve SPI driver
It wasn't possible to keep the CS line low between multiple message
descriptors in one transfer. This patch reworks the driver so that it is
possible.

Update #4180
2021-09-02 08:38:54 +02:00
Sebastian Huber
25b0fddad9 score: Update priority only if necessary
In _Thread_queue_Flush_critical(), update the priority of the thread
queue owner only if necessary.  The scheduler update priority operation
could be expensive.
2021-09-01 21:23:16 +02:00
Sebastian Huber
ac9f115bdb score: Remove _Thread_queue_Unblock_critical()
This function was only used in one place.  Replace it with a call to
_Thread_queue_Resume().
2021-09-01 21:23:16 +02:00
Sebastian Huber
317774c99a score: Remove _Thread_queue_First_locked()
The _Thread_queue_First_locked() was only used in one place.  Move the code of
this inline function to this place.
2021-09-01 21:23:16 +02:00
Sebastian Huber
d9249c9bff score: Fix blocking message queue receive
In order to ensure FIFO fairness across schedulers, the thread queue
surrender operation must be used to dequeue a thread from the thread
queue.  The thread queue extract operation is intended for timeouts.

Add _Thread_queue_Resume() which may be used to make extracted or
surrendered threads ready again.

Remove the now unused _Thread_queue_Extract_critical() function.

Close #4509.
2021-09-01 20:24:57 +02:00
Sebastian Huber
9c0591f12d score: Fix priority discipline handling
The priority queues in clustered scheduling configurations use a per
scheduler priority queue rotation to ensure FIFO fairness across
schedulers.  This mechanism is implemented in the thread queue surrender
operation.  Unfortunately some semaphore and message queue directives
used wrongly the thread queue extract operation.  Fix this through the
use of _Thread_queue_Surrender().

Update #4358.
2021-09-01 20:24:57 +02:00
Sebastian Huber
ce8f31ced5 score: Document Futex Handler
The behaviour of the futex operations is defined by Linux:

https://man7.org/linux/man-pages/man2/futex.2.html

Use EAGIN instead of EWOULDBLOCK to be in line with the Linux man page.
These error numbers have the same value in Newlib.  Using the same error
numbers helps to avoid confusion.

When you look at the history of the Linux man page you see that they
replaced EWOULDBLOCK with EAGAIN over time.  At the time of the RTEMS
futex implementation they used EWOULDBLOCK.
2021-09-01 14:14:32 +02:00
Sebastian Huber
a8235fe728 rtems: Fix partitions with RTEMS_MULIPROCESSING
Replace call to removed _Partition_Free() with a call to _Objects_Free().
2021-08-31 13:13:15 +02:00
Sebastian Huber
b0f13f3778 psxtests/psxconfstr: Fix test case
Update #3373.
2021-08-30 19:32:18 +02:00
Sebastian Huber
30570b49c5 smpfatal01: Fix test time out on sparc/leon3
End the test on the processor which triggers the test condition.  This avoids
endless power down loops in the sparc/leon3 BSP.
2021-08-30 18:27:48 +02:00
Chris Johns
8f3973fe8d libmisc/shell: Check the shell command pointers when adding a command 2021-08-21 12:49:36 +10:00
Chris Johns
4dc81f65c7 libmisc/fdt: fix node initialise error with RTEMS_DEBUG 2021-08-21 12:46:32 +10:00