Commit Graph

34601 Commits

Author SHA1 Message Date
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
Sebastian Huber
9e1fc36692 validation: GetTestableInterruptVector()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
bfec448682 validation: GetValidInterruptVectorNumber()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
1465e78a59 validation: HasInterruptVectorEntriesInstalled()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
f89cf8e8c4 validation: Add CallWithinISR()
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
b910e60e60 bsp/raspberrypi: Add interrupt get/set affinity
Add default implementations for bsp_interrupt_get_affinity() and
bsp_interrupt_set_affinity() which are required to link all tests in SMP
configurations.

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
e518323872 bsps/irq: Add rtems_interrupt_entry_install()
Add rtems_interrupt_entry_remove().  Split up irq-generic.c into several files.
In particular, place all functions which use dynamic memory into their own
file.

Add optional macros to let the BSP customize the vector installation after
installing the first entry and the vector removal before removing the last
entry:

* bsp_interrupt_vector_install()

* bsp_interrupt_vector_remove()

Use these new customization options in the m68k/genmcf548x BSP so re-use the
generic interrupt controller support.

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
70357f1731 bsps/irq: Move bsp_interrupt_handler_is_empty()
This function is only used by one BSP.

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
63d9e840b7 bsps/irq: Add bsp_interrupt_check_and_lock()
Return RTEMS_INCORRECT_STATE instead of RTEMS_INTERNAL_ERROR in case the
interrupt support is not initialized.  This is similar to
rtems_timer_server_fire_after() for example.

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
73fcbf4cff bsps/irq: Use rtems_interrupt_entry
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
81358d7586 rtems: Add rtems_interrupt_entry_install()
Add RTEMS_INTERRUPT_ENTRY_INITIALIZER(),
rtems_interrupt_entry_initialize(), and
rtems_interrupt_entry_remove().  This allows to install interrupt
handlers using user-provided storage as an alternative to
rtems_interrupt_handler_install() which has to allocate memory.

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
09be98d910 sparc/irq: Implement new interrupt directives
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
fe6ce5ac9c bsps/irq: Implement new directives for GICv2/3
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
85a378510d bsps/irq: bsp_interrupt_set_affinity()
Return a status code for bsp_interrupt_set_affinity().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
23ec04c48c bsps/irq: bsp_interrupt_get_affinity()
Return a status code for bsp_interrupt_get_affinity().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
32f5a195d7 bsps/irq: bsp_interrupt_vector_disable()
Return a status code for bsp_interrupt_vector_disable().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
bc86a5fa84 bsps/irq: bsp_interrupt_vector_enable()
Return a status code for bsp_interrupt_vector_enable().

Update #3269.
2021-07-26 19:57:30 +02:00
Sebastian Huber
deb5afb2f2 bsps/irq: Add rtems_interrupt_is_pending()
Add a default implementation which just returns RTEMS_UNSATISFIED.

Update #3269.
2021-07-26 17:08:42 +02:00
Sebastian Huber
eebecd09fa bsps/irq: Add rtems_interrupt_get_attributes()
Add a default implementation which clears the attributes to zero and
just returns RTEMS_SUCCESSFUL for valid parameters.

Update #3269.
2021-07-26 17:08:42 +02:00
Sebastian Huber
9832652c53 bsps/irq: Add rtems_interrupt_raise()
Add rtems_interrupt_raise_on() and rtems_interrupt_clear().

Add a default implementation which just returns RTEMS_UNSATISFIED for
valid parameters.

Update #3269.
2021-07-26 07:54:25 +02:00