summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/include/rtems/test-info.h: Change @returns to @returnJoel Sherrill2022-08-101-3/+3
|
* Add support for CONFIGURE_POSIX_TIMERS_FACE_BEHAVIORJoel Sherrill2022-08-104-2/+129
| | | | | | | | | This adds the configure option CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR which allows the application to choose whether to have the POSIX timer_create() function follow the behavior defined by POSIX or the FACE Technical Standard. Updates #4691.
* rtems/malloc.h: Add API level Doxygen groupSebastian Huber2022-08-101-19/+41
| | | | | The interfaces in the MallocSupport group belong to the implementation. They are used by confdefs.h for example.
* libtest: Add T_report_hash_sha256_update()Sebastian Huber2022-08-102-0/+11
| | | | Update #3716.
* libdl: Refactor shared code in ARM and AArch64Ryan Long2022-08-084-158/+113
| | | | | | | | rtl-mdreloc-arm.c was used as the basis for rtl-mdreloc-aarch64.c. This lead to some code being shared by the two files. The code was consolidated into rtl-unwind-arm.c. Closes #4686
* posix: Avoid dead code in clock_nanosleep()Sebastian Huber2022-08-051-5/+2
| | | | | | | | This issue was reported by Coverity Scan for RTEMS: CID 1507760: Control flow issues (DEADCODE) Closes #4690.
* libdl: Fix warnings on 64bit architecturesChris Johns2022-08-054-7/+7
| | | | Updates #4662
* posix: Fix relative CLOCK_REALTIME sleepSebastian Huber2022-08-041-0/+9
| | | | | | | | | A relative CLOCK_REALTIME time out shall not be affected by CLOCK_REALTIME changes through clock_settime(). Since our CLOCK_REALTIME is basically just CLOCK_MONOTONIC plus an offset, we can simply use the CLOCK_MONOTONIC watchdog for relative CLOCK_REALTIME time outs. Update #4690.
* libmisc/shell: Add an 'rtems' command to report a running buildChris Johns2022-08-032-0/+162
| | | | - Report version, cpu, bsp, tools and options.
* cpukit/libdl/rtl-sym.c: Fix increment of variableRyan Long2022-07-291-1/+1
| | | | | | | | | | | | In rtems_rtl_symbol_global_add() the loop that gets to the end of the symbol table used "unsigned long" to increment the index for the table. For most architectures this resulted in 4, but with AArch64, it results in 8. This resulted in the symbols being read in wrong. Changing this to void* along with changing the RISC-V specific code for 8 byte pointers in rtems-tools to work independent of the architecture. Updates #4673 Closes #4682
* cpukit/libdl: Add support for AArch64Ryan Long2022-07-292-0/+855
| | | | | | rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD. Updates #4682
* libdl/rtl-elf.h: Fix aarch64 defineRyan Long2022-07-291-1/+1
| | | | | | | The aarch64 define was incorrect. This was causing the libdl tests to not work correctly. Updates #4682
* sys/exec_elf.h: Bring in newer fileRyan Long2022-07-291-232/+608
| | | | | | Updated this file with the newer version in NetBSD. Updates #4682
* score: Allow linker garbage collectionSebastian Huber2022-07-282-3/+3
| | | | | | | Place the object control blocks in dedicated sections to allow a linker garbage collection. Update #4678.
* score: Use PTHREAD_CANCELED for _Thread_Cancel()Sebastian Huber2022-07-283-10/+7
| | | | | | | | | | The rtems_task_delete() directive is basically just a combined pthread_cancel() and pthread_join(). In addition, it removes the PTHREAD_DETACHED state. The exit value returned by pthread_join() of threads cancelled by rtems_task_delete() should reflect this by getting a PTHREAD_CANCELED value instead of NULL which could be a normal exit value. Close #4680.
* score: Use priority inheritance for thread joinSebastian Huber2022-07-287-143/+159
| | | | | | | | | | | | | | | | | | | | | Threads may join the thread termination of another thread using the pthread_join() or rtems_task_delete() directives. The thread cancel operation used a special case priority boosting mechanism implemented by _Thread_Raise_real_priority(). The problem was that this approach * is not transitive, * does not account for priority adjustments of the calling task while waiting for the join, * does not support clustered scheduling, and * does not detect deadlocks. All these problems are fixed by using a priority inheritance thread queue for the join operation. Close #4679.
* Use __asm__ for standard C compatibilitySebastian Huber2022-07-271-5/+5
|
* score: Fix objects local table initializationSebastian Huber2022-07-272-4/+2
| | | | | | | | The objects local table must be statically zero-initialized so that _Objects_Get() and _Objects_Get_no_protection() return NULL if no object is associated with the identifier. Update #4678.
* score: Remove PRIORITY_PSEUDO_ISR thread prioritySebastian Huber2022-07-2624-193/+287
| | | | | | | | | | | | | | | The uniprocessor schedulers had some special case logic for the PRIORITY_PSEUDO_ISR priority. Tasks with a priority of PRIORITY_PSEUDO_ISR were allowed to preempt a not preemptible task. If other higher priority task are made ready while a PRIORITY_PSEUDO_ISR task preempts a not preemptible task, then the other tasks run before the not preemptible task. This made the RTEMS_NO_PREEMPT mode ineffective. Remove the PRIORITY_PSEUDO_ISR special case logic. This simplifies the uniprocessor schedulers. Move the uniprocessor-specific scheduler support to the new header file <rtems/score/scheduleruniimpl.h>. Close #2365.
* imfs: Add <rtems/imfsimpl.h>Sebastian Huber2022-07-2513-48/+104
|
* libtest: Add missing initializerSebastian Huber2022-07-251-1/+1
|
* aarch64: Use page table level 0Kinsey Moore2022-07-211-1/+0
| | | | | | | | | This alters the AArch64 page table generation and mapping code and MMU configuration to use page table level 0 in addition to levels 1, 2, and 3. This allows the mapping of up to 48 bits of memory space and is the maximum that can be mapped without relying on additional processor extensions. Mappings are restricted based on the number of physical address bits that the CPU supports.
* Support _REENT_THREAD_LOCAL Newlib configurationMatt Joyce2022-07-216-14/+35
| | | | | | | | | In case the Newlib _REENT_THREAD_LOCAL configuration option is enabled, the struct _reent is not defined (there is only a forward declaration in <sys/reent.h>). Instead, the usual members of struct _reent are available as dedicatd thread-local storage objects. Update #4560.
* dtc: Update VERSIONSebastian Huber2022-07-191-5/+12
|
* Fix a UB when fdt_get_string return nullLoveSy2022-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When fdt_get_string return null, `namep` is not correctly reset. From the document of `fdt_getprop_by_offset`, the parameter `namep` will be always overwritten (that is, it will be overwritten without exception of error occurance). As for the caller (like https://github.com/topjohnwu/Magisk/blob/e097c097feb881f6097b6d1dc346f310bc92f5d6/native/jni/magiskboot/dtb.cpp#L42), the code may be like: ```cpp size_t size; const char *name; auto *value = fdt_getprop_by_offset(fdt, prop, &name, &size); ``` and if `value == nullptr`, `size` is also be overwritten correctly but `name` is not, which is quite inconsistent. This commit makes sure `name` and `size` behavior consistently (reset to reasonable value) when error occurs. Signed-off-by: LoveSy <shana@zju.edu.cn> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* score: Fix unlimited objects supportSebastian Huber2022-07-182-9/+32
| | | | | | | | Commit 21275b58a5a69c3c838082ffc8a7a3641f32ea9a ("score: Static Objects_Information initialization") introduced an off-by-one error in the maintenance of inactive objects. Close #4677.
* score: Fix _Objects_Active_count()Sebastian Huber2022-07-181-5/+13
| | | | | | | With unlimited objects the object maximum may be larger than the sum of active and inactive objects. Update #4677.
* score: Extend memory dirty/zero actionsSebastian Huber2022-07-154-3/+74
| | | | | | Dirty or zero also the part of the .noinit section used by RTEMS. Close #4678.
* score: Place object controls into .noinit sectionsSebastian Huber2022-07-152-5/+11
| | | | | | | | | | | | Place the statically allocated object control blocks, local tables, and thread queue heads into the dedicated .noinit intput sections. The output section is not zero initialized. Placing these elements into the .noinit section reduces the system initialization time by decreasing the .bss section size. It may improve the cache efficiency since the mostly read local tables are placed in a contiguous memory area. Update #4678.
* Add in_localip_fib(), in6_localip_fib().Gleb Smirnoff2022-07-112-0/+2
| | | | | | | Check if given address/FIB exists locally. Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D32913
* Use network epoch to protect local IPv4 addresses hash.Gleb Smirnoff2022-07-111-0/+4
| | | | | | | | | | | | | The modification to the hash are already naturally locked by in_control_sx. Convert the hash lists to CK lists. Remove the in_ifaddr_rmlock. Assert the network epoch where necessary. Most cases when the hash lookup is done the epoch is already entered. Cover a few cases, that need entering the epoch, which mostly is initial configuration of tunnel interfaces and multicast addresses. Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D32584
* routing: fix source address selection rules for IPv4 over IPv6.Alexander V. Chernikov2022-07-111-0/+1
| | | | | | | | | | | | Current logic always selects an IFA of the same family from the outgoing interfaces. In IPv4 over IPv6 setup there can be just single non-127.0.0.1 ifa, attached to the loopback interface. Create a separate rt_getifa_family() to handle entire ifa selection for the IPv4 over IPv6. Differential Revision: https://reviews.freebsd.org/D31868 MFC after: 1 week
* Remove copyinfrom() and copyinstrfrom().John Baldwin2022-07-111-4/+0
| | | | | | | | | | | These functions were added in 2001 and are currently unused. copyinfrom() looks to have never been used. copyinstrfrom() was used for two weeks before the code was refactored to remove it's sole use. Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24928
* rtems: Simplify rtems_scheduler_ident()Sebastian Huber2022-07-071-16/+11
| | | | Use early returns to simplify rtems_scheduler_ident().
* score: Use RTEMS_SMP in _Thread_Create_idle()Sebastian Huber2022-07-071-1/+5
| | | | | | Conditional expressions with inline functions are not optimized away if optimization is disabled. Avoid such expressions to prevent dead branches.
* score: Conditional _Thread_Priority_replace()Sebastian Huber2022-07-072-0/+4
| | | | This function is only used in SMP configurations.
* cpukit/aarch64: Remove _CPU_ISR_install_vectorKinsey Moore2022-07-052-31/+0
| | | | This function was never actually used and is dead code.
* score: Add _CPU_Use_thread_local_storage()Sebastian Huber2022-07-0420-0/+207
| | | | | | | | | | | | At some point during system initialization, the idle threads are created. Afterwards, the boot processor basically executes within the context of an idle thread with thread dispatching disabled. On some architectures, the thread-local storage area of the associated thread must be set in dedicated processor registers. Add the new CPU port function to do this: void _CPU_Use_thread_local_storage( const Context_Control *context ) Close #4672.
* gcov: Add wrapper to dump the gcov infoSebastian Huber2022-07-042-0/+108
| | | | Update #4670.
* gcov: Add functions to dump the gcov informationSebastian Huber2022-07-046-0/+402
| | | | Update #4670.
* gcov: Add fork(), etc. gcov wrappersSebastian Huber2022-07-041-0/+94
| | | | | | | | The compiler wraps fork(), etc. system calls if coverage generation is enabled. These functions must be provided by the system. For RTEMS, they just return an error status. Update #4670.
* riscv: Include missing header fileSebastian Huber2022-06-241-0/+2
|
* score: Account for <sys/bitset.h> API changesSebastian Huber2022-06-231-17/+73
| | | | Update #4667.
* score: Remove unused _Processor_mask_Nand()Sebastian Huber2022-06-231-16/+0
| | | | Update #4667.
* score: Make SMP only code explicitSebastian Huber2022-06-235-31/+36
| | | | | | | Conditional expressions with inline functions are not optimized away if optimization is disabled. Avoid such expressions to prevent dead branches. It helps also during code review to immediately see if a loop is used or not.
* kern_tc.c: Provide a weak hardpps() implementationSebastian Huber2022-06-231-0/+12
| | | | | | | The real implementation of hardpps() is defined in kern_ntptime.c. Use it only if the NTP support is needed by the application. Update #2349.
* score: Use right clock for threadq timeoutsSebastian Huber2022-06-231-2/+2
| | | | | | | | Use CLOCK_REALTIME and CLOCK_MONOTONIC for relative thread queue timeouts instead of CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE. This fixes an issue with clock_nanosleep() in combination with clock_gettime(). Close #4669.
* TFTPFS: Implement block and window size optionsFrank Kühndel2022-06-214-672/+2193
| | | | | | | | | | | | | | | | | | | | | The original file cpukit/libfs/src/ftpfs/tftpDriver.c is split into two: tftpfs.c - This file contains the code from tftpDriver.c related to file system operations such as mount(), open(), read(), and so on. tftpDriver.c - In the original file remains only the code related to networking. This code implements the Trivial File Transfer Protocol (TFTP). Moreover, the code is extended to support * RFC 2347 TFTP Option Extension * RFC 2348 TFTP Blocksize Option * RFC 7440 TFTP Windowsize Option Update #4666.
* TFTPFS: Cleanup: Remove spaces at lines endsFrank Kühndel2022-06-211-10/+10
| | | | Update #4666.
* jffs2: Update baseline version to Linux v5.9Sebastian Huber2022-06-201-2/+2
|