summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-20sparc: Fix stack corruptionqual-96Sebastian Huber
Fix a potential stack corruption in uniprocessor configurations during start multitasking . The system initialization uses the interrupt stack. A first level interrupt shall never interrupt a context which uses the interrupt stack. Such a use would lead to stack corruption and undefined system behaviour. Unfortunately, in uniprocessor configurations this was the case. Multiprocessing is started using _CPU_Context_restore(). The caller of this function (_Thread_Start_multitasking()) uses the interrupt stack. Later we have in cpukit/score/cpu/sparc/cpu_asm.S: mov %g1, %psr ! restore status register and ! **** ENABLE TRAPS **** ld [%o1 + G5_OFFSET], %g5 ! restore the global registers ld [%o1 + G7_OFFSET], %g7 ! Load thread specific ISR dispatch prevention flag ld [%o1 + ISR_DISPATCH_DISABLE_STACK_OFFSET], %o2 ! Store it to memory later to use the cycles ldd [%o1 + L0_OFFSET], %l0 ! restore the local registers ldd [%o1 + L2_OFFSET], %l2 ldd [%o1 + L4_OFFSET], %l4 ldd [%o1 + L6_OFFSET], %l6 ! Now restore thread specific ISR dispatch prevention flag st %o2, [%g6 + PER_CPU_ISR_DISPATCH_DISABLE] ldd [%o1 + I0_OFFSET], %i0 ! restore the input registers ldd [%o1 + I2_OFFSET], %i2 ldd [%o1 + I4_OFFSET], %i4 ldd [%o1 + I6_FP_OFFSET], %i6 ldd [%o1 + O6_SP_OFFSET], %o6 ! restore the output registers Between the ENABLE TRAPS and the restore of the output registers, we still use the stack of the caller and interrupts may be enabled. If an interrupt happens in this code block, the interrupt stack is concurrently used which may lead to a crash. Fix this by adding a new function _SPARC_Start_multiprocessing() for uniprocessor configurations. This function first sets the stack pointer to use the stack of the heir thread. Close #4955.
2023-09-18build: Remove enabled-by special caseSebastian Huber
Doing the enabled-by processing just for the ldflags and just for the link custom commands is confusing. Use an option instead which is intended to be used for such use cases.
2023-09-18build: Load items on demand during a buildSebastian Huber
If the CSafeLoader is available, load only the necessary build items. This considerably speeds up the build setup time if the CSafeLoader is used.
2023-09-18build: Rename TOPGROUP in TOPGROUP_UIDSebastian Huber
This makes it more obvious that this is an item UID.
2023-09-18build: Avoid cache if CSafeLoader is availableSebastian Huber
Move the item cache handling to a ItemCache class. Implement this class depending on the availability of CSafeLoader.
2023-09-18build: Use CSafeLoader if availableSebastian Huber
The CSafeLoader uses the C libyaml libary to considerably speed up the loading of YAML files.
2023-09-18build: Exclude performance test if RTEMS_GCOV_COVERAGESebastian Huber
2023-09-18build: Do not use coverage for librtemstestSebastian Huber
2023-09-18build: Use -frandom-seed=0Sebastian Huber
2023-09-18libc: Add files to Doxygen groupsFrank Kühndel
2023-09-18libc: Avoid dead code in memset()Sebastian Huber
2023-09-18build: Introduce pre-qualified partsSebastian Huber
2023-09-18build: Add RTEMS_PPS_SYNC CPU optionSebastian Huber
2023-09-18build: Add RTEMS_CLANG_STATIC_ANALYZER optionSebastian Huber
2023-09-18build: Install test executablesSebastian Huber
2023-09-18build: Support conditional build dependenciesSebastian Huber
2023-09-18build: Add BUILD_LIBDL_TESTSSebastian Huber
Make tests for libdl configurable since they are currently not reproducible, see #4941.
2023-09-18Add pre-qualified constraintsSebastian Huber
2023-09-18validation: Test memory allocationSebastian Huber
2023-09-18validation: Add MemorySave() and MemoryRestore()Sebastian Huber
2023-09-18validation: Fix warnings in model based testsSebastian Huber
2023-09-18validation: Fix Doxygen groups of model testsSebastian Huber
2023-09-18validation: Add tests derived from modelsAndrew Butterfield
2023-09-18membench: Add memory benchmark programsSebastian Huber
These memory benchmark programs are not supposed to run. Instead, they can be analysed on the host system to measure the memory usage of features. See the membench module of rtems-central. Update #3716.
2023-09-18doxygen: Replace and move main pageSebastian Huber
Replace the main page with a high level description of the RTEMS feature set similar to: https://docs.rtems.org/branches/master/user/overview/index.html#features The replaced content can be found in the RTEMS Classic API Guide: https://docs.rtems.org/branches/master/c-user/overview.html https://docs.rtems.org/branches/master/c-user/key_concepts.html Update #3705.
2023-09-18bsps/leon3: Use DSU time tag for GR712RCSebastian Huber
Update #4954.
2023-09-18bsps/leon3: leon3_counter_use_irqamp_timestamp()Sebastian Huber
Simplify leon3_counter_use_irqamp_timestamp(). Update #4954.
2023-09-18bsps/leon3: Move code blocksSebastian Huber
Move code blocks to simplify C preprocessor usage. Update #4954.
2023-09-18bsps/leon3: Use custom CPU counter implementationSebastian Huber
Merge the timecounter and CPU counter support for the leon3 BSP family. Remove now unused functions from the CPU counter support of the erc32 and leon3 BSPs. Update #4954.
2023-09-18bsps/leon3: Simplify clock and CPU counterSebastian Huber
Share the timecounter instance between the clock and the CPU counter. This greatly simplifies the clock driver since we have to do the device selection only in one place, the CPU counter support. Update #4954.
2023-09-18bsps/leon3: Make GPTIMER fall back mandatorySebastian Huber
Using the auto reload counter which generates the clock ticks for the timecounter or CPU counter is quite difficult and only works in uniprocessor configurations. Update #4954.
2023-09-18sparc: Move CPU counter implementationSebastian Huber
Enable a BSP-specific CPU counter implementation. Update #4954.
2023-09-18bsps/leon3: Optional IRQ(A)MP timestamp supportSebastian Huber
This is necessary to run the tests on SIS with profiling enabled. Update #4954.
2023-09-15libdl: Use _CPU_Get_TLS_thread_pointer()Sebastian Huber
Update #4920.
2023-09-15score: Add _CPU_Get_TLS_thread_pointer()Sebastian Huber
Add _CPU_Get_TLS_thread_pointer() to get the thread pointer which is used to get the address of thread-local storage objects associated with a thread. Update #4920.
2023-09-15build: Add target to build scriptsSebastian Huber
Document that the build scripts in the testsuites produce a test program.
2023-09-15rtems: rtems_configuration_get_interrupt_stack_size()Sebastian Huber
Fix rtems_configuration_get_interrupt_stack_size() for some code models. The _ISR_Stack_size symbol has an arbitrary absolute address and may not be representable in the code model used by the compiler. Update #4953.
2023-09-15score: Fix TLS support for some code modelsSebastian Huber
Store symbols with an arbitrary absolute address such as _TLS_Size, _TLS_Alignment, _TLS_Data_size, and _TLS_BSS_size in an object to avoid issues with some code models. Update #4953.
2023-09-15bsp/stm32h7: Exclude some testsSebastian Huber
2023-09-15arm/lm3s69xx: Exclude monitor test programSebastian Huber
It is too big with GCC 13.
2023-09-14validation: Add RTEMS_DEFINE_GLOBAL_SYMBOL() testSebastian Huber
Update #4953.
2023-09-14sp37: Check ISR level of system initSebastian Huber
2023-09-13build: Merge regulator build into library itemSebastian Huber
There is no need to use a separate build object item.
2023-09-13tests: Improve RTEMS_DEFINE_GLOBAL_SYMBOL() testsSebastian Huber
Use a symbol value relative to an existing symbol address to make the test work on more code models. Update #4953.
2023-09-13score: Fix RTEMS_DEFINE_GLOBAL_SYMBOL()Sebastian Huber
The availability of a proper RTEMS_DEFINE_GLOBAL_SYMBOL() implementation depends on __asm__() and thus __GNUC__. Clarify documentation. Update #4953.
2023-09-12microblaze: Fix relocation targetsAlex White
Previously the addend was only used in 64 bit relocations. This behavior was incorrect but did not cause the RTEMS libdl tests to fail.
2023-09-11build: Use build context for custom commandsSebastian Huber
Revert duplicated listing of TEST_OPTIMIZATION_FLAGS. Close #4947.
2023-09-06bsps/zynqmp: Add locking around JFFS2 NAND adapterKinsey Moore
The internal JFFS2 locking does not guarantee that delayed writes will not step on other reads and writes to the device. This adds locking to prevent that in the JFFS2 NAND interworking layer.
2023-09-06bsps/xnandpsu: Ensure correct cache maintenanceKinsey Moore
The changes here ensure correct cache maintenance around DMA operations. One cache flush was missing and two cache invalidations occurred before the corresponding read that would make them necessary.
2023-09-06cpukit/jffs2: Avoid delayed work lock inversionKinsey Moore
This moves delayed work to a temporary chain to prevent a locking inversion between the delayed work lock and the alloc_sem lock. Delayed work is now processed after the delayed work lock is released. Locking order is any JFFS2 locks before the delayed work lock.