Commit Graph

35682 Commits

Author SHA1 Message Date
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
Sebastian Huber
12a03bea4f score: Fix unlimited objects support
Commit 21275b58a5 ("score: Static
Objects_Information initialization") introduced an off-by-one error in the
maintenance of inactive objects.

Close #4677.
2022-07-18 09:33:16 +02:00
Sebastian Huber
3bb79aabca spunlimited01: New test
Update #4677.
2022-07-18 09:33:16 +02:00
Sebastian Huber
e0942613f1 score: Fix _Objects_Active_count()
With unlimited objects the object maximum may be larger than the sum of active
and inactive objects.

Update #4677.
2022-07-18 09:33:16 +02:00
Kinsey Moore
1e360d3140 aarch64: Memory map the noinit section
This section was added recently and must be mapped to be accessed
without generating an exception.
2022-07-18 09:33:32 +10:00
Sebastian Huber
1bf878f7ff score: Extend memory dirty/zero actions
Dirty or zero also the part of the .noinit section used by RTEMS.

Close #4678.
2022-07-15 10:46:02 +02:00
Sebastian Huber
4b911a7516 score: Place object controls into .noinit sections
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.
2022-07-15 10:46:02 +02:00
Sebastian Huber
5ed0035377 bsps: 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-15 10:46:02 +02:00
Sebastian Huber
656765c74b cdtest: Restrict exceptions during sysinit
Exceptions during system initialization work only on targets which do not need
a registration of exception frames during the global construction.  In
particular, targets which use the DWARF2 unwinder cannot use exceptions during
system initialization.
2022-07-14 10:47:36 +02:00
Sebastian Huber
da016421cd spextensions01: Fix assertion
Commit 80090639a6 altered the system state
change.  Account for this in assert_allocator_protected_thread_context().
2022-07-14 10:47:36 +02:00
Sebastian Huber
cdc1eb7dcc validation: SMP-specific spurious interrupt test
Update #3716.
2022-07-14 10:46:43 +02:00
Sebastian Huber
013e028f87 sppps01: Fix test in SMP configurations
Update #2349.
2022-07-13 16:06:00 +02:00
Joel Sherrill
405639a67d bsps/v850/gdbv850sim: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
c1008e9da1 bsps/sparc64/usiii: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
ae71cf38eb bsps/sparc64/shared: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
a49acb6bef bsps/sparc64/niagara: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
749e9b63bd bsps/sparc64/include: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
f436fc7a18 bsps/sh/shsim: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
00913bb163 bsps/sh/shared: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:42 -05:00
Joel Sherrill
aacf9e23fb bsps/sh/gensh2: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:41 -05:00
Joel Sherrill
0fc7a4499c bsps/sh/gensh1: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:41 -05:00
Joel Sherrill
a73615a948 bsps/powerpc/virtex5: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:41 -05:00
Joel Sherrill
8a41efe424 bsps/powerpc/virtex4: Change license to BSD-2
Updates #3053.
2022-07-12 08:15:41 -05:00