summaryrefslogtreecommitdiff
path: root/cpukit/score (follow)
AgeCommit message (Collapse)Author
2020-10-10rtems: Improve RTEMS_NO_RETURN attributeSebastian Huber
Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors like this: error: no return statement in function returning non-void [-Werror=return-type] Use C11 and C++11 standard means to declare a no-return function. Close #4122.
2020-10-05score: Add AArch64 portKinsey Moore
This adds a CPU port for AArch64(ARMv8) with support for exceptions and interrupts.
2020-10-01Decouple the C Program Heap initializationSebastian Huber
Before this patch RTEMS_Malloc_Initialize() had a fixed dependency on _Workspace_Area. Introduce _Workspace_Malloc_initializer to have this dependency only if CONFIGURE_UNIFIED_WORK_AREAS is defined by the application configuration.
2020-09-28rtems: Add rtems_message_queue_construct()Sebastian Huber
In contrast to message queues created by rtems_message_queue_create(), the message queues constructed by this directive use a user-provided message buffer storage area. Add RTEMS_MESSAGE_QUEUE_BUFFER() to define a message buffer type for message buffer storage areas. Update #4007.
2020-09-28score: Simplify CORE_message_queue_BufferSebastian Huber
Merge CORE_message_queue_Buffer structure into CORE_message_queue_Buffer_control. Use a zero-length array for the actual message buffer. This reduces the structure size on all targets. Update #4007.
2020-09-28score: Improve _CORE_message_queue_Initialize()Sebastian Huber
Return a status code and differentiate between error conditions. Update #4007.
2020-09-28score: Gather message queue control initializationSebastian Huber
Initialize the structure in a single code block after the error checks and calculations. Update #4007.
2020-09-28score: Fix allocation size calculationSebastian Huber
The previous multiplication error check is broken on 64-bit machines. Use the recommended check from SEI CERT C Coding Standard, "INT30-C. Ensure that unsigned integer operations do not wrap". Make sure the message size computation does not overflow. Update #4007.
2020-09-28score: Use RTEMS_ALIGN_UP()Sebastian Huber
Update #4007.
2020-09-23or1k: Do not use printk() for _CPU_Fatal_halt()Sebastian Huber
Debug output can be added to user-defined fatal error handlers.
2020-09-23or1k: Remove superfluous includesSebastian Huber
Including <stdio.h> in <rtems/score/cpu.h> breaks libbsd.
2020-09-17CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZESebastian Huber
Add this application configuration option. This configuration option can be used to reserve space for the dynamic linking of modules with thread-local storage objects. Add RTEMS_TASK_STORAGE_ALIGNMENT to define the minium alignment of a thread-local storage size. Update #4074.
2020-09-17arm: Fix arm_cp15_set_translation_table_entries()Sebastian Huber
In a multi-processor system we must broadcast the TLB maintenance operation to the Inner Shareable domain to ensure that the other processors update their TLB caches accordingly. Close #4068.
2020-09-12i386/score: fix assembly mnemonicGedare Bloom
Closes #4076.
2020-09-11score: Fix _Thread_Initialize()Sebastian Huber
Fix an error cleanup path in SMP configurations to avoid a NULL pointer access. Update #3959.
2020-08-31score: Add stack free handler to TCBSebastian Huber
This avoids a dependency to the stack free function in the thread destruction. Update #3959.
2020-08-31score: Move _Stack_Allocator_free to separate fileSebastian Huber
This decouples the task stack allocation from the deallocation. Update #3959.
2020-08-31score: Add _Stack_Allocator_do_initialize()Sebastian Huber
Do the stack allocator initialization and sanity check only if a user-provided stack allocator was configured. This avoids a dependency of _Thread_Handler_initialization() on the stack allocator. Update #3959.
2020-08-31score: Use _Freechain_Push()Sebastian Huber
The nodes are never NULL. Update #3959.
2020-08-31score: Add <rtems/score/freechainimpl.h>Sebastian Huber
Hide implementation details. Update #3959.
2020-08-31score: Add _Freechain_Push()Sebastian Huber
Update #3959.
2020-08-31score: Fix debug assertSebastian Huber
Do not access executing->current_state outside the protection of the thread state lock. Add missing state with a comment.
2020-08-31score: Optimize _Objects_Name_to_id_u32()Sebastian Huber
Remove the superfluous invalid name check since the object creation directives ensure that objects with such a name cannot exist. Also finding an object with such a name would be no catastrophy if it really exists.
2020-08-31rtems: Add _RTEMS_Name_to_id()Sebastian Huber
Simplify object name to identifier directives. Using _RTEMS_Name_to_id() to implement the directives enables a tail call optimization. Change license to BSD-2-Clause according to file history. Update #3053.
2020-08-31score: Constify objects name to id functionsSebastian Huber
2020-08-21score: Fix set but not used warningSebastian Huber
2020-08-20sparc: Use RTEMS_XCONCAT()Sebastian Huber
Prefer macros with a proper namespace.
2020-07-29i386: Fix possible race condition on first context restoreJan Sommer
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 #4031
2020-07-05epiphany: Remove support for this targetSebastian Huber
Due to an unmaintained toolchain (internal errors in GCC, no FSF GDB integration) the Epiphany architecture was obsoleted in RTEMS 5.1. Update #3941.
2020-07-05i386: Replace fpcr clobber with memory clobberSebastian Huber
Update #3943.
2020-06-30score: Clarify CPU_USE_LIBC_INIT_FINI_ARRAY optionSebastian Huber
Update #4018.
2020-06-30score: Add CPU_USE_LIBC_INIT_FINI_ARRAYKinsey Moore
This introduces the CPU_USE_LIBC_INIT_FINI_ARRAY define for use by CPU ports to determine which global constructor and destructor methods are used instead of placing architecture defines where they shouldn't be. Close #4018
2020-06-11bsp/pc386: Define interrupt stack frame for smpJan Sommer
- Defines CPU_Interrupt_frame in cpu_impl.h - Updates isq_asm.S to save/restore registers in matching order to interrupt frame
2020-06-11bsp/pc386: Update context switch and restoreJan Sommer
Uses similar flow in cpu_asm.S for i386 as for arm.
2020-06-11bsp/pc386: Update GDT to work for SMPJan Sommer
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-05-27arm: Fix ARMv7-M exception handlerSebastian Huber
Store the stack pointer of the exception context to the exception frame. Close #3987.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-04-14score: Check time of day in _TOD_Set()Sebastian Huber
Close #3949.
2020-04-14score: Return status in _TOD_Set()Sebastian Huber
Update #3949.
2020-04-05Revert "score: Fix _ISR_Stack_area_end"Sebastian Huber
This reverts commit 8e80876bdd54e36fb668eee655eec1dd588daf13 which broke several architectures.
2020-04-03score: Fix _ISR_Stack_area_endSebastian Huber
The _ISR_Stack_area_begin and _ISR_Stack_area_end symbols are in different sections. They must have the same alignment, otherwise the following linker directive could separate them: *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.rtemsstack*))) Update #3799.
2020-04-03arm: ARMv7-M statically initialized vector tableSebastian Huber
Statically initialize the ARMv7-M vector table to allow a placement in ROM with read-only MPU settings. Change licence to BSD-2-Clause in some files.
2020-03-16score: Add _IO_Base64()Sebastian Huber
Update #3904.
2020-02-28score: Fix context switch extensions (SMP)Sebastian Huber
In uniprocessor and SMP configurations, the context switch extensions were called during _Thread_Do_dispatch(): void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ) { Thread_Control *executing; executing = cpu_self->executing; ... do { Thread_Control *heir; heir = _Thread_Get_heir_and_make_it_executing( cpu_self ); ... _User_extensions_Thread_switch( executing, heir ); ... _Context_Switch( &executing->Registers, &heir->Registers ); ... } while ( cpu_self->dispatch_necessary ); ... } In uniprocessor configurations, this is fine and the context switch extensions are called for all thread switches except the very first thread switch to the initialization thread. However, in SMP configurations, the context switch may be invalidated and updated in the low-level _Context_Switch() routine. See: https://docs.rtems.org/branches/master/c-user/symmetric_multiprocessing_services.html#thread-dispatch-details In case such an update happens, a thread will execute on the processor which was not seen in the previous call of the context switch extensions. This can confuse for example event record consumers which use events generated by a context switch extension. Fixing this is not straight forward. The context switch extensions call must move after the low-level context switch. The problem here is that we may end up in _Thread_Handler(). Adding the context switch extensions call to _Thread_Handler() covers now also the thread switch to the initialization thread. We also have to save the last executing thread (ancestor) of the processor. Registers or the stack cannot be used for this purpose. We have to add it to the per-processor information. Existing extensions may be affected, since now context switch extensions use the stack of the heir thread. The stack checker is affected by this. Calling the thread switch extensions in the low-level context switch is difficult since at this point an intermediate stack is used which is only large enough to enable servicing of interrupts. Update #3885.
2020-02-25score: Fix label defined but not used warningSebastian Huber
Update #3835.
2020-02-25score: _Scheduler_Is_non_preempt_mode_supported()Sebastian Huber
If the non-preempt mode for threads is supported depends on the scheduler implementation. Add _Scheduler_Is_non_preempt_mode_supported() to indicate this. Update #3876.
2020-02-25score: Add _SMP_Need_inter_processor_interrupts()Sebastian Huber
Test for the proper system condition instead of using the rtems_configuration_is_smp_enabled() workaround. Update #3876.
2020-02-25config: Add _Workspace_Is_unifiedSebastian Huber
Move the unified workspace configuration constant out of the configuration table. Provide a default definition of the unified workspace constant. Update #3875.
2020-02-25config: Add _Thread_Idle_bodySebastian Huber
Move the idle thread body configuration constant out of the configuration table. Provide a default definition of the idle thread body constant. Update #3875.