Commit Graph

34670 Commits

Author SHA1 Message Date
Chris Johns
522db76a96 cpukit/mghttpd: Support all descriptors in select
- Support all possible descriptors in a select call. Borrowed
  from Christain and his mDNS change in LibBSD

- If select (or poll) fails pause for a bit rather than
  locking up in a hard loop
2021-08-19 08:51:39 +10:00
Chris Johns
de14073960 aarch64/versal: Enable TX and RX FIFOs
- Wait for the tx holding register to empty in a tx flush
2021-08-19 08:47:30 +10:00
pranav
1c06068196 bsps/raspberrypi: Add SEV Instruction for RPi SMP firmware changes.
The Pi firmware added a wfe(wait for event), the cores 1-3 wait
for the start address being written to the mailbox register, followed
by a SEV poke to the mailbox that acts as a wfe wake-up event.
2021-08-18 13:50:34 -05:00
Eshan dhawan
574cd83b5d confstr() support for RTEMS
Closes #3373

confstr() style update

Signed-off-by: Eshan Dhawan <eshandhawan51@gmail.com>
2021-08-18 09:18:56 -05:00
Sebastian Huber
1dff0a382d score: Delete unused rtems_ada_self 2021-08-18 13:36:02 +02:00
Sebastian Huber
d433690591 score: Make zombie registry observable
This helps to write tests for _Thread_Wait_for_execution_stop().

Rename Thread_Zombie_control in Thread_Zombie_registry.
2021-08-18 13:36:02 +02:00
Sebastian Huber
923a922e01 score: Simplify _Thread_Kill_zombies() 2021-08-18 13:36:02 +02:00
Sebastian Huber
2f45324bb8 score: Simplify _Per_CPU_Wait_for_job()
The _SMP_Fatal() is a no-return function, so the "break" statement is
superfluous.
2021-08-18 13:36:02 +02:00
Sebastian Huber
7e85f4d6ca score: Simplify _Thread_Create_idle_for_CPU()
Online processors have a scheduler assigned.
2021-08-18 13:36:02 +02:00
Sebastian Huber
ebdfa24bff build: Merge default-by-family into by-variant
Prefix the BSP family name with "bsps/" to make it distinct to the BSP
variant names.

Update #4468.
2021-08-18 11:25:35 +02:00
Sebastian Huber
75af5be6a8 bsp/leon3: Fix rtems_interrupt_is_pending()
Take the interrupt force register into account in all configurations.

Update #3269.
2021-08-12 21:06:39 +02:00
Sebastian Huber
0a69ce0fb4 score: Simplify _Scheduler_Tick()
The NULL pointer check for the executing thread was introduced by
commit:

commit be3c257286
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Thu Jun 5 11:17:26 2014 +0200

    score: Avoid NULL pointer access

    Check that the executing thread is not NULL in _Scheduler_Tick().  It
    may be NULL in case the processor has an optional scheduler assigned and
    the system was not able to start the processor.

However, it is no longer necessary since now the clock interrupt is
distributed to the online processors.
2021-08-12 21:00:05 +02:00
Sebastian Huber
a0ec14ca22 score: Replace the single use of a sequence lock
In SMP configurations, on 64-bit architectures use plain atomic
operations to set/get the priority value of a scheduler node.  On 32-bit
architectures use an ISR lock.  Using a sequence lock has no real
benefit since it uses atomic read-modify-write operations for both the
read and the write lock.  Simply use a ticket lock instead so that only
one SMP synchronization primitive is used for everything.
2021-08-12 21:00:05 +02:00
Sebastian Huber
a5aaf20a2d score: Replace priority prepend it with an enum
Use the new Priority_Group_order enum instead of a boolean to indicated if a
priority should be inserted as the first or last node into its priority group.
This makes the code more expressive.  It is also a bit more efficient since a
branch in _Scheduler_Node_set_priority() is avoided and a simple bitwise or
operation can be used.
2021-08-12 20:58:26 +02:00
Sebastian Huber
9399e12c21 rtems: Fix rtems_partition_return_buffer()
The rtems_partition_return_buffer() wrongly accepted which were exactly
at the buffer area end.  Use the buffer area limit address for the range
checking.

Close #4490.
2021-08-12 10:09:04 +02:00
Sebastian Huber
59472042ec bsps/arm: More robust SMP start
Do not continue execution on processors which are not configured to prevent the
use of arbitrary memory for the initialization stack.
2021-08-12 10:04:11 +02:00
Zacchaeus Leung
8df57649b0 Test needed for timer_create with CLOCK_MONOTONC
the timer_create() method can use CLOCK_MONOTONIC
but there was  no test for this.
Also it implements the functionality to
create a CLOCK_MONOTONIC timer and gettime() .
Closes #3888
2021-08-11 11:47:11 -05:00
pranav
c71e34bee0 bsps: Move optfdt* files to shared parent directory 2021-08-09 12:14:18 -05:00
Joel Sherrill
6199de889d Turn off executable permissions for a number of source files
Cloning under Cygwin turned off executable permission on these
files. This shows them as modified even though they have not
explicitly been touched. Executable permission should not have
been on for these files so this is just a minor clean up.
2021-08-09 10:08:17 -05:00
Sebastian Huber
53c84ac5e5 score: Disable interrupts in SMP shutdown 2021-08-03 10:33:21 +02:00
Sebastian Huber
d999f865ea rtems: Generate <rtems/bspIo.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Place the group into the I/O Manager group.  Add all source files to the
group.

Update #3899.
Update #3993.
Update #4482.
2021-08-02 07:14:05 +02:00
Sebastian Huber
913b326a12 sptests: CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER
Remove obsolete CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER application
configuration option which is unsupported since commit
69aa33490b.
2021-07-30 15:42:24 +02:00
Sebastian Huber
0ea2638441 bsps/cache: Optimize smp_cache_broadcast()
Directly call the handler on the executing processor instead of doing this
indirectly via a per-CPU job.
2021-07-29 09:14:33 +02:00
Sebastian Huber
6c39df7e73 score: Change _SMP_Send_message() parameter type
Use the processor control to specify the target processor since this is what
the callers have available.
2021-07-29 09:03:50 +02:00
Sebastian Huber
c61b855c1a score: Assert job properties in _Per_CPU_Add_job() 2021-07-29 09:03:50 +02:00
Sebastian Huber
98a57511b6 score: Add _Per_CPU_Submit_job() 2021-07-29 09:03:50 +02:00
Sebastian Huber
59168e2ae3 score: Split SMP multicast action module
Split up the SMP multicast action module since the use of the SMP multicast
action variants depend on the architecture and BSP.
2021-07-29 08:05:26 +02:00
Sebastian Huber
28028961b1 score: Return value in _SMP_Process_message() 2021-07-28 21:08:13 +02:00
Sebastian Huber
8b65b57472 score: Canonicalize _CPU_Fatal_halt()
Move _CPU_Fatal_halt() declaration to <rtems/score/cpuimpl.h> and make sure it
is a proper declaration of a function which does not return.  Fix the type of
the error code.  If necessary, add the implementation to cpu.c.  Implementing
_CPU_Fatal_halt() as a function makes it possible to wrap this function for
example to fully test _Terminate().
2021-07-28 21:04:20 +02:00
Sebastian Huber
f799b4522f score: Move per-CPU jobs support
Add percpujobs.c to contain the per-CPU jobs implementation.
2021-07-28 19:32:24 +02:00
Sebastian Huber
70ec9bd44d score: Remove SMP message multicast/broadcast
Remove the unused _SMP_Send_message_multicast() and
_SMP_Send_message_broadcast().
2021-07-28 19:32:24 +02:00
Sebastian Huber
cbb1103a3c score: Simplify SMP processor state handling
The per-CPU states which control the SMP system initialization were added quite
early during the SMP support development.  Replace this initial implementation
with a simplified one.  There is no longer a global SMP lock required which
serialized the state changes of all processors.  The new implementation better
integrates with the per-CPU jobs.
2021-07-28 19:32:24 +02:00
Sebastian Huber
4adaed7328 score: Remove processor event broadcast/receive
Remove _CPU_SMP_Processor_event_broadcast() and
_CPU_SMP_Processor_event_receive().  These functions are hard to use since they
are subject to the lost wake up problem.
2021-07-28 19:07:37 +02:00
Sebastian Huber
6e82e9e89e libcsupport: Consistent rtems_putc() output
Use the same function to output the '\r\n' combination produced by
rtems_putc().  Fix the format.

Change licence according to file history.

Update #3053.
2021-07-28 19:05:42 +02:00
Sebastian Huber
79b94a2dcd libcsupport: Fix TOCTOU in getchark()
Use the same function pointer value to check against NULL and call the
function (if non-NULL).

Fix format, add Doxygen comments, and reduce includes.
2021-07-28 19:05:42 +02:00
Sebastian Huber
bf338f04c0 score: Remove _Internal_errors_What_happened
Users have access to the fatal error source and code though the fatal error
extension.  The user-specific fatal error handling should be done in statically
initialized fatal error handlers.  The _Internal_errors_What_happened was
updated after the fatal error extension. In addition, there was no API to get
the information stored in _Internal_errors_What_happened.  In SMP
configurations, this object could contain a mix of different fatal errors.
Remove this object to save some bytes of storage.
2021-07-28 08:39:54 +02:00
Sebastian Huber
c7b4eca7fa bsps/irq: bsp_interrupt_facility_initialize()
Do not return a status code in bsp_interrupt_facility_initialize() since this
leads to unreachable code in bsp_interrupt_initialize().  Use RTEMS_DEBUG
assertions in bsp_interrupt_facility_initialize() if necessary.
2021-07-27 10:03:19 +02:00
Sebastian Huber
67c033d39a validation: Test rtems_interrupt_handler_iterate()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
17fb523964 validation: Test rtems_interrupt_set_affinity()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
aab3713655 validation: Test rtems_interrupt_get_affinity()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
32c0cd8ff8 validation: Test rtems_interrupt_raise_on()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
163c1fd1a6 validation: Test rtems_interrupt_is_pending()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
1bf8139a9e validation: Test rtems_interrupt_clear()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
434105805f validation: Test rtems_interrupt_raise()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
7dbab6afee validation: Test rtems_interrupt_entry_remove()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
0996036986 validation: Test rtems_interrupt_entry_install()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
aa6c962668 validation: Test rtems_interrupt_vector_disable()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
7a3e6c74e3 validation: Test rtems_interrupt_vector_enable()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
d8be2b974e validation: rtems_interrupt_vector_is_enabled()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
e2894df9aa validation: Test rtems_interrupt_get_attributes()
Update #3269.
2021-07-26 19:57:31 +02:00