Commit Graph

35454 Commits

Author SHA1 Message Date
Ryan Long
df3fa4e005 interr.h: Fix gcc 12 warning
The warning that this fixes states that "ISO C restricts enumerator values to
range of 'int'."

Updates #4662
2022-08-19 15:34:46 -05:00
Ryan Long
f930206724 linkersets.h: Fix gcc 12 warning
Changing the offset from 0 to 1 got rid of a warning stating that offset 0 is
out of bounds.

Updates #4662
2022-08-19 15:34:46 -05:00
Ryan Long
ec7d6c092f threads.h: Add pragmas to get rid of gcc 12 errors
Updates #4662
2022-08-19 15:34:46 -05:00
Sebastian Huber
21a36ed19b bsps: Fix .data.rel.ro placement
The .data.rel.ro* linker input section pattern accidentally matches with
writeable data those symbol name starts with "ro".

Close #4701.
2022-08-12 10:10:17 +02:00
Joel Sherrill
996d18c212 psxtimer_face01: Improve coverage and documentation
Updates #4691.
2022-08-11 13:10:11 -05:00
Duc Doan
c655c72d05 build/cpukit: Add confdefs/face.h to install rule
Updates #4691
2022-08-11 15:49:15 +10:00
Joel Sherrill
36895bd2c5 cpukit/include/rtems/test-info.h: Change @returns to @return 2022-08-10 14:15:47 -05:00
Joel Sherrill
b6e00691ff psxtimer0[12]/psxtimer.c: Reformat file header. 2022-08-10 14:15:46 -05:00
Joel Sherrill
4b04589b09 Add support for CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
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.
2022-08-10 14:15:46 -05:00
Sebastian Huber
cf3d2b37c8 rtems/malloc.h: Add API level Doxygen group
The interfaces in the MallocSupport group belong to the implementation.  They
are used by confdefs.h for example.
2022-08-10 15:41:58 +02:00
Sebastian Huber
f6a38fb254 validation: Use T_report_hash_sha256_update()
Add the direct BSP character ouput to the report hash.

Update #3716.
2022-08-10 07:51:19 +02:00
Sebastian Huber
7219d3c0e9 libtest: Add T_report_hash_sha256_update()
Update #3716.
2022-08-10 07:51:14 +02:00
Ryan Long
5500232a89 libdl: Refactor shared code in ARM and AArch64
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
2022-08-08 12:02:03 -05:00
Sebastian Huber
c3c4525a32 posix: Avoid dead code in clock_nanosleep()
This issue was reported by Coverity Scan for RTEMS:

CID 1507760: Control flow issues (DEADCODE)

Closes #4690.
2022-08-05 08:20:58 +02:00
Chris Johns
c36d608079 testsuite: Fix warnings
Updates #4662
2022-08-05 07:54:13 +10:00
Chris Johns
46131ce0e1 libdl: Fix warnings on 64bit architectures
Updates #4662
2022-08-05 07:54:13 +10:00
Chris Johns
1a883b9b55 testsuite/psxclock: Check setting realtime clock does not effect sleeping tasks
Closes #4690
2022-08-05 07:53:10 +10:00
Sebastian Huber
52b7a5840a build: Install <rtems/score/gcov.h>
Update #4670.
2022-08-04 19:37:46 +02:00
Sebastian Huber
c64c638f6d posix: Fix relative CLOCK_REALTIME sleep
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.
2022-08-04 07:55:30 +02:00
Chris Johns
071640d310 libmisc/shell: Add an 'rtems' command to report a running build
- Report version, cpu, bsp, tools and options.
2022-08-03 10:46:10 +10:00
Sebastian Huber
4d77f725ca sp54: Fix test case
Since commit 6a6580331d, the local table is
zero-initialized.  Use an initial object control block instead.

Update #4678.
2022-08-01 09:15:36 +02:00
Ryan Long
1c6ac88f93 cpukit/libdl/rtl-sym.c: Fix increment of variable
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
2022-07-29 08:32:47 -05:00
Ryan Long
2ea37e8b0d libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE
Updates #4682
2022-07-29 08:32:47 -05:00
Ryan Long
0bd6514aa2 cpukit/libdl: Add support for AArch64
rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
2022-07-29 08:32:47 -05:00
Ryan Long
f643215648 libdl/rtl-elf.h: Fix aarch64 define
The aarch64 define was incorrect. This was causing the libdl tests to not
work correctly.

Updates #4682
2022-07-29 08:32:47 -05:00
Ryan Long
ad94dc352e sys/exec_elf.h: Bring in newer file
Updated this file with the newer version in NetBSD.

Updates #4682
2022-07-29 08:32:47 -05:00
Sebastian Huber
6a6580331d score: Allow linker garbage collection
Place the object control blocks in dedicated sections to allow a linker garbage
collection.

Update #4678.
2022-07-28 08:21:57 +02:00
Sebastian Huber
8a864bc62c score: Use PTHREAD_CANCELED for _Thread_Cancel()
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.
2022-07-28 07:53:04 +02:00
Sebastian Huber
31036f1dc8 score: Use priority inheritance for thread join
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.
2022-07-28 07:52:59 +02:00
Chris Johns
51ffa21011 aarch64/versal: Support DDRMC0 region 0 and 1
- Support DDRMC0 region 0 up to 2G in size

- Support DDRMC0 region 1 with DDR memory greater than 2G
  up to the DDRMC0 max amount

- Extend the heap with region 1's memory

Closes #4684
2022-07-28 09:04:46 +10:00
Chris Johns
b868d0a722 basp/aarch64: Make the unexpected sections origin address 64bit
Update #4684
2022-07-28 09:04:46 +10:00
Sebastian Huber
5810a08b57 Use __asm__ for standard C compatibility 2022-07-27 17:01:14 +02:00
Sebastian Huber
e1fdf975ac psxconfig01: Increase region area
This fixes a test failure on 64-bit systems with RTEMS_DEBUG enabled.
2022-07-27 10:03:54 +02:00
Sebastian Huber
2501c64bb6 score: Fix objects local table initialization
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.
2022-07-27 08:59:45 +02:00
Sebastian Huber
4f94d47bc5 build: Move RISCV_MAXIMUM_EXTERNAL_INTERRUPTS 2022-07-26 13:38:33 +02:00
Sebastian Huber
7fe6d60bf0 score: Remove PRIORITY_PSEUDO_ISR thread priority
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.
2022-07-26 11:26:22 +02:00
Sebastian Huber
0a1d2d7814 sptests/spstdc17: New test 2022-07-25 16:11:36 +02:00
Sebastian Huber
8dc651f8fc imfs: Add <rtems/imfsimpl.h> 2022-07-25 16:11:36 +02:00
Alex White
c0a4d56b16 bsps/microblaze: Fix build option definition order
The build option definitions were rearranged such that the option
definitions used in the linker script were not available. This caused
linker errors when building.
2022-07-25 09:01:51 -05:00
Sebastian Huber
e584ee4bde libtest: Add missing initializer 2022-07-25 10:02:18 +02:00
Kinsey Moore
10ef7087f6 aarch64: Use page table level 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.
2022-07-21 12:26:35 -05:00
Matt Joyce
6d4b390f99 Support _REENT_THREAD_LOCAL Newlib configuration
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.
2022-07-21 07:22:13 +02:00
Matt Joyce
57a569efe1 sptests: Disable Newlib reentrancy
Update #4560.
2022-07-21 07:22:13 +02:00
Sebastian Huber
ca7c2dd89b sptls04: Test an external TLS object 2022-07-21 07:22:13 +02:00
Sebastian Huber
d4c21e516a ada/sp09: The year 2100 cannot be set
Update #4338.
2022-07-20 09:47:03 +02:00
Sebastian Huber
25ccc19ae9 bsps/riscv: Sort .noinit* sections
Sort the .noinit* input sections by name first, then by alignment if two
sections have the same name.  This allows the placement of begin/end symbols to
initialize some areas with a special value.

Update #4678.
2022-07-20 08:46:13 +02:00
Sebastian Huber
329a1ccf93 build: Add missing cxxflags
Update #4670.
2022-07-20 08:46:13 +02:00
Sebastian Huber
098186b9b3 dtc: Update VERSION 2022-07-19 09:28:22 +02:00
LoveSy
6f79435915 Fix a UB when fdt_get_string return null
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
e097c097fe/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>
2022-07-19 09:28:22 +02:00
Sebastian Huber
0e5f4c5d32 spsysinit01: Account for use of .noinit section
The objects control blocks cannot be used to check the pre-initialization state
since they are allocated in a .noinit section.

Update #4678.
2022-07-18 15:52:20 +02:00