summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-12cpukit/jffs2: Implement JFFS2 spinlocksKinsey Moore
This provides a non-noop implementation of spinlocks for JFFS2 in terms of RTEMS mutexes. POSIX spinlocks are not appropriate for the types of actions that occur during a held JFFS2 spinlock and can cause bad dispatch level conditions.
2023-10-12bsps/xilinx-zynqmp: Unify JFFS2 OOB write lockingKinsey Moore
Ensure that a single locking session is carried over OOB writes including the OOB read that is sometimes required. This removes the possibility of another write occurring between the read and write that would make the write incorrect.
2023-10-12fat_fat_operations.c: Fix incorrect indentationJoel Sherrill
2023-10-12validation: Support powerpc in test caseSebastian Huber
Update #4955.
2023-10-12testsuites/unit: Fix build error on aarch64Sebastian Huber
Update #3716.
2023-10-12testsuites/unit: Add tests for compiler builtinsSebastian Huber
Explicitly test the 64-bit integer division and modulo operations. They are essential for the timekeeping services. On most 32-bit targets, they need a software implementation. Update #3716.
2023-10-12validation: Test CPU performanceSebastian Huber
Measure the runtime of 1000 no-operation instructions. This may help to investigate runtime measurement variations which do not result from code generation or source code changes. The runtime measurement of a function which does nothing and just returns gives an estimate of the measurement overhead. Update #3716.
2023-10-12validation: Check thread dispatching detailSebastian Huber
Update #3716.
2023-10-12sparc: Fix stack corruptionSebastian 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-10-04bsp/i386/pc686: Clean up warningsChris Johns
2023-10-02libtest: Include missing header fileSebastian Huber
This fixes the build if RTEMS_PROFILING is enabled.
2023-09-26cpukit/aarch64: Resolve warnings with ILP32 ABIKinsey Moore
Casts from uint64_t to void* must go through a uintptr_t cast to avoid warnings when building with the ILP32 ABI since this is otherwise an implicit truncation to 32bits for a pointer.
2023-09-26cpukit/jffs2: Avoid use of off-chain semanticsKinsey Moore
This reworks the JFFS2 delayed work queue to avoid use of on-chain/off-chain semantics since they vary in behavior under RTEMS_DEBUG and are not guaranteed to be safe to use in SMP systems. This adds all delayed work structs to the chain on FS init and does not remove them until umount. Updates #4956
2023-09-26bsps/xnandpsu: Ensure buffer cache syncKinsey Moore
When a buffer is modified by both hardware components such as DMA and by software components, the buffer cache state must be kept in sync so that data is not accidentally thrown away during future invalidations.
2023-09-26bsps/xnandpsu: Don't rely on usleep for pollingKinsey Moore
When polling hardware registers in high performance situations, don't rely on usleep or other standard sleep functions since they will necessarily rely on kernel ticks to be woken up. This can easily cause an immense reduction in throughput.
2023-09-26validation: Compatibility for other RTEMS versionsSebastian Huber
Make some performance tests compatible to other RTEMS versions which do not allow changing the priority of a task which owns a priority inheritance mutex. Update #3716.
2023-09-26validation: Simplify partition performance testSebastian Huber
Do not depend on <rtems/chain.h>. Update #3716.
2023-09-26validation: Check stack of interrupted contextSebastian Huber
Check the stack of the interrupted context during the multitasking start. Update #4955.
2023-09-26arm: Use a valid signed integer constantSebastian Huber
Enumerators are restricted to signed integers in some C standards.
2023-09-26psx13: Fix use of uninitialized variable warningSebastian Huber
2023-09-26tests: Add header for RTEMS test printerSebastian Huber
The <rtems/test-info.h> header file is required for every RTEMS test program. Move the RTEMS test printer support to a dedicated header file <rtems/test-printer.h>. This removes an unnecessary dependency to the RTEMS printer support in <rtems/test-info.h>. Tests using the RTEMS Testing Framework no longer depend on the <rtems/printer.h>.
2023-09-23bsps/xqspipsu: Add SFDP config space read abilityKinsey Moore
This adds a function to allow reading of the SFDP configuration space that describes attributes of NOR flash chips.
2023-09-23bsps/xqspipsu: Break out RDIDKinsey Moore
Expose a function to read the NOR flash chip ID information beyond the minimum 3 bytes for the lookup table.
2023-09-22build: 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-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.
2023-08-30microblaze: Add link options to dl07, dl08, and dl09Alex White
This adds `-u__extendsfdf2` to the `ldflags` for the dl07, dl08, and dl09 tests to force the inclusion of `__extendsfdf2` in the base image. This function is part of the GCC software floating point library and is used in the tests to convert floats to doubles when calling `printf`.
2023-08-30build: Allow enabled-by in ldflags for link_cc and link_cxxAlex White
This allows for conditionally setting 'ldflags' in scripts that use `link_cc` and `link_cxx`. The immediate use case is allowing a linker flag to be used only for MicroBlaze builds of certain tests.
2023-08-30microblaze: Add dl05 to expected failuresAlex White
Updates #4949
2023-08-30microblaze: Add dl06 to expected failuresAlex White
Updates #4948
2023-08-30microblaze: Align exception-related sectionsAlex White
This fixes unaligned data access exceptions found while debugging test dl05.
2023-08-30microblaze: Add libdl supportAlex White
2023-08-28cpukit/libdl: Fix incorrect operator precedence access the nameChris Johns
Coverity Issue: CID 1442635 Out-of-bounds access
2023-08-28cpukit/libdl: Correctly account for section alignmentsChris Johns
- Add the section alignment to the size as the allocator may not provide correctly aligned memory - Only include symbols in the section when locating symbols. The powerpc was incorrectly adding SDATA BSS symbols to the BSS offset overrunning the section Closes #4950
2023-08-27libdl: Realloc text memory if there are trampolinesChris Johns
- Add resize to the allocator interface - Rework the trampoline variables in the obj struct to make better sense of what is happening Closes #4944