Commit Graph
38078 Commits
Author SHA1 Message Date
Gedare Bloom e0818a6658 rtems-fdt: hold handle ref until end of rtems_fdt_prop_value
Fixes #5608
2026-06-03 20:17:45 -06:00
Matteo Concas 5e89997b25 grlib: Reformat headers with clang-format 2026-06-03 12:13:16 -05:00
Matteo Concas 7a2a99e0ef grlib: Reformat source with clang-format 2026-06-03 12:13:16 -05:00
Matteo Concas 84a696fba4 bsps/noel: Reformat headers with clang-format 2026-06-03 12:13:16 -05:00
Matteo Concas c056874472 bsps/noel: Reformat source with clang-format 2026-06-03 12:13:16 -05:00
Matteo Concas 9b0db1bb54 bsps/sparc: Reformat headers with clang-format 2026-06-03 12:13:16 -05:00
Matteo Concas aa904d80af bsps/sparc: Reformat source with clang-format 2026-06-03 12:13:16 -05:00
Gedare Bloom da105bb04f cpukit/rtems-fdt: release internally generated handles
rtems_fdt_prop_value() and rtems_fdt_prop_map() create a handle to
search for a path, but do not drop the handle if successful.

Fixes #5599
2026-06-03 08:28:15 -05:00
Gedare Bloom fd3d811a9c cpukit/rtems-fdt: test and fix index search by offset
The rtems_fdt_subnode_offset and rtems_fdt_get_name try to binary
search the entries index by the DTB offset, but the index is sorted
by alphabetically by the name, so the search is broken. Replace these
searches by directly calling the libfdt functions. Since the DTB offset
is known, the performance hit for invoking the libfdt should not be too
much.

Closes #5606.
2026-06-02 20:53:34 -05:00
Moksh Panicker 19c75efc9e sptests/sp13: Exercise rtems_message_queue_construct() in task1
sp13 already constructs Q3 using rtems_message_queue_construct()
in init.c but task1.c never sends to, receives from, or deletes
the constructed queue.

Extend task1.c to send a message to Q3, receive it back, and
delete the queue after the variable-size loop completes. This
exercises the full lifecycle of a queue created with static
storage and storage_free set to NULL.

Verified on arm/realview_pbx_a9_qemu with QEMU 9.0.2,
RTEMS 7.0.0.a413333f2f04130e82e15addba402887222c345f, GCC 15.2.0.
2026-06-02 20:51:58 -05:00
Avi Weiss 2308b1e588 bsp/arm/tms570: Correct typos in bspstarthooks-hwinit.c 2026-06-02 20:16:45 -05:00
Avi Weiss 370df09442 bps/arm/tms570: Guard parity self-tests for 4357 ECC-protected modules
RAM parity self-tests run on several RAM modules, which work fine for
the 3137 variants, but on 4357 variants some of those modules use
an ECC memory protection scheme.

This commit turns the relevent ones off for 4357 until proper ECC
self-tests are created.
2026-06-02 20:16:45 -05:00
Matteo Concas 0c6605b58b grlib: Add 64 bit compatibility
Work towards having GRLIB be a part of the NOEL BSPs
It is not "true" 64 bit as the devices themselves are still
on a 32bit bus.
2026-06-02 12:49:33 -05:00
Chris Johns 156d429516 spec/ftd01: Fix the DTB python generation code
Closes #5605
2026-06-02 15:28:03 +10:00
Shivam Deolankar 99ea420b1b cpukit: Move FatFs core to contrib and update build integration
Move the upstream FatFs sources from cpukit/libfs/src/fatfs to
contrib/fatfs.Keep the RTEMS integration layer (rtems-fatfs-*.c and
rtems-diskio.c) in libfs. Introduce a wrapper header under rtems/fatfs
and update internal sources to use it.

Update the build specification to reference the new location without
introducing global include paths.

Fixes #5433
2026-06-01 18:37:44 +00:00
Shivam Deolankar 8e54c8816b contrib/fatfs: Import FatFs R0.16
Upstream version: R0.16
Upstream URL: http://elm-chan.org/fsw/ff/
contrib/cpukit/fatfs/R0.16
2026-06-01 18:37:44 +00:00
Jeremy Lorelli 973134e2df cpukit/libdebugger: Fix uninitialized variable
'flags' was being assigned via |=, which is bad news.
2026-05-31 18:36:19 -07:00
Kinsey Moore 5dc63db75b cpukit/libmisc/rtems-fdt: Add missing argument
The recent FDT changes included some refactoring that missed the second
parameter in a rtems_fdt_valid_handle_unprotected() call. This adds the
missing parameter and fixes the build.
2026-05-29 10:32:38 -05:00
Gedare Bloom 0194d301f3 rtems-fdt: add unprotected valid handle check
The change to avoid deadlock could introduce a race condition on the
blobs chain and the handle. Refactor the rtems_fdt_valid_handle() to
create an internal unprotected version, and call it with the global
rtems_fdt_lock() held.
2026-05-28 18:55:53 -06:00
Gedare Bloom b6fb679d44 spec/build: add explicit dependency in fdt01
Updates #5482.
2026-05-28 18:55:53 -06:00
Gedare Bloom 1808a4e568 rtems-fdt: fix deadlock in rtems_fdt_unload
Do not attempt to recursively acquire the rtems_fdt_lock.
2026-05-28 18:55:53 -06:00
Gedare Bloom 7e378389bf rtems-fdt: fix pointer reference in rtems_fdt_node_offset_by_prop_value
The handle was being passed to libfdt instead of the blob.
2026-05-28 18:55:53 -06:00
Gedare Bloom 0f272e1dc1 rtems-fdt: fix pointer reference in check_compatible
The handle was being passed to libfdt instead of the blob.
2026-05-28 18:55:53 -06:00
Gedare Bloom 4bc554b404 rtems-fdt: fix bug for raw dtb files
Reading non-compressed dtb files was broken because of the initial
reading of the first two bytes to check for compression. Reset the
file pointer after making that first read regardless of whether a
gzip header is found or not.
2026-05-28 18:55:53 -06:00
Gedare Bloom 27fc98a01d spec/build: add fdt01 test to build
Also uses the new dtc command to generate the dtbs at compile time.
Reads dts from elsewhere in the rtems tree.
2026-05-28 18:55:53 -06:00
Gedare Bloom 491bbfa134 libtests/fdt01: add new test for rtems-fdt
The rtems-fdt library was not tested.

Updates #4150
2026-05-28 18:55:53 -06:00
Gedare Bloom 50e801531e wscript: add dtc command to compile dts files
Enables building FDT files during compilation.

Updates #5136
2026-05-28 18:55:53 -06:00
Gedare Bloom 296d3872ff libmisc/rtems-fdt: add rtems-fdtimpl.h
Refactor implementation details to rtems-fdtimpl.h to allow further
refactoring of the main source file and access to internal structures
for testing.
2026-05-28 18:55:53 -06:00
Gedare Bloom 6a586c122e libmisc/rtems-fdt: refactor rtems_fdt_load
Splits functionality so that reading from the dtb file is distinct from
loading it into memory. This allows directly loading a dtb from memory
instead of from a file.
2026-05-28 18:55:53 -06:00
Gedare Bloom ce04a97c11 arm/imxrt: update imxrt1050.dtsi with dtc version
Fixes dtc compilation error.
2026-05-28 18:55:53 -06:00
Gedare Bloom 2f81156210 riscv/irq: read maximum interrupts from FDT
The number of external interrupts can be configured through the FDT.
Read it during PLIC initialization and use that to determine the max
valid vector number.
2026-05-28 14:43:42 -06:00
Gedare Bloom 128106b2f1 riscv: enable using PLIC in S-mode
The previous addition of s-mode support avoided touching the PLIC
registers and only allowed limited use of software interrupts for SMP
IPIs. This enables the PLIC in s-mode mapping the registers with the MMU
and unifying some aspects of the m-mode and s-mode implementations.

Updates #3337
2026-05-28 14:43:42 -06:00
Chris Johns 9e0aeb52e0 spec: Add BSD base and family to Makefile.inc
- A base BSP helps applications support aliased BSPs

- Also add ABI_FLAGS to be consistent with the pkgcfg file.

Closes #5592
2026-05-27 20:52:49 -05:00
Avi Weiss 4b3d5e657c bsp/arm/tms570: Fix typo in ball M17 EMIF macro name
A stray 'l' seems have come in at some point.
2026-05-27 17:14:18 +02:00
Avi Weiss a413333f2f bsp/arm/tms570: explicitly set CS8 and CREAD in printk init
Update to tms570-sci.c (commit af77d28) puts a gate to check
requests for non 8-bit bytes and CREAD not set, we therefore
must expclitily set them now.
2026-05-23 23:17:45 -05:00
Avi Weiss 61a03779d4 bsp/arm/tms570: fix SCI termios ignore framing flags bug
- explicitly reject non-8-bit-character requests and return false
- support 1 and 2 stop bits
- support disabling RX by checking CREAD
2026-05-23 23:17:45 -05:00
Samuel Viegas 58c0c344a2 bsps/sparc/leon3: Reject API raise of IRQs 16-31
- Changed the interrupt attributes so extended vectors
report can_raise as false.

- Changed the bsp_interrupt_raise to return
RTEMS_UNSATISFIED for extended vectors 16-31.

- BSP-specific validation for gr712rc and gr740
were added to exercised the extended vectors, and
check that the right interrupt handler is called.

Updates #4846.
2026-05-23 23:14:11 -05:00
Avi Weiss b49c6d7b30 bsp/arm/tms570: Invalidate I-cache after copying .fast_text to RAM
Adds invalidation of cache (using
rtems_cache_invalidate_multiple_instruction_lines which is
included in the wrapper function
rtems_cache_instruction_sync_after_code_change.

This is to ensure full syncing of the I-cache after copying
instructions (in .fast_text into RAM with
bsp_start_copy_sections_compact in bspstarthooks.c
2026-05-21 18:29:27 +02:00
Gedare Bloom 8e6bf772f9 smptests/smpclock01: slow down the tick rate
The smpclock01 test relies on tight synchronization between cores and it
checks cross-core Watchdog.ticks. On some targets the cores can become
de-synchronized so that the tick counts are not reliable. Slowing the
tick rate down seems to help this problem.
2026-05-20 20:46:45 +00:00
Shivam Deolankar f53aa5c3b5 testsuites/sptests: Add post-2100 validation checks
Add post-2100 validation checks in spclock_err02
without increasing runtime and remove excessive prints.
The test verifies century and leap-year rules via RTEMS
clock APIs and gmtime()/mktime() for  future years.

Fixes #5507
2026-05-19 10:55:32 -05:00
Shivam Deolankar c50ffe653f libdl/sparc: Fix overflow in relocation bitmask
_BM(x) produces 64-bit values which are implicitly converted to int
in reloc_target_bitmask. For x = 32, this causes truncation from
4294967295 to -1 on 32-bit targets, triggering -Woverflow.
Used uint32_t and cast the result to avoid implicit narrowing.

Fixes #5557
2026-05-19 01:08:06 +00:00
Kinsey Moore 1f06311c79 bsps/shared/gpio: Resolve assert build issues
Change assert() to _Assert() to resolve build issues with the change of
header.

Closes #5569
2026-05-18 15:12:04 -05:00
Shivam Deolankar b41f83249a bsps/zynq-uart: fix parity configuration handling
Fix parity handling in zynq_uart_set_attributes() by clearing existing
parity bits before setting a new mode instead of always ORing PAR_NONE,
which caused incorrect or ignored parity; also fix inverted PARODD logic
and add ZYNQ_UART_MODE_PAR_MASK to manage the parity field correctly.

Fixes #5554
2026-05-18 14:13:59 -05:00
Chris Johns 2c39475802 libmisc/shell: Add -a to print all vars in the shell getenv command
Closes #5572
2026-05-16 09:40:59 +10:00
Gedare Bloom ce03478700 testsuites/validation: check exactly for unset priority
The use of less-than-or-equal is wrong when the default priority can be
greater than the PRIORITY_UNSET value.
2026-05-15 13:40:17 -06:00
Gedare Bloom d3a6a6540e testsuites: fix usage of rtems_test_spin_for_ticks
The rtems_test_spin_for_ticks( x ) executes one partial tick and the
remaining x - 1 as complete ticks. Some tests assumed it executed x
complete ticks. Fix those tests.

Fixes #5575.
2026-05-15 12:59:10 -05:00
Mohamed Ayman 8f59e18ea3 riscv: fix FDT length check and FDT pointer type
Fix incorrect comparison between fdt_getprop() length (bytes)
and address cells count.
The check now uses ac * sizeof(uint32_t) to avoid
reading invalid data.

Also change FDT pointer type from const char * to const void *
to match libfdt API.

No functional changes.
2026-05-15 14:46:48 +00:00
Michal Lenc 3cb2e57560 cpukit/dev/can: fail controller init if worker task start doesn't start
CAN controllers need a running worker task to function. Check if
the task is actually started and return NULL (and free already allocated
resources) if it fails.

Also assert if cleanup functions fail.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-05-14 15:46:10 +00:00
Samuel Viegas 24eb4ac11a bsps/leon3: Mark interrupt 15 as non-maskable
- leon3 interrupt vector 15 is non-maskable and should
not be reported as disable-capable.

- added leon3_interrupt_is_maskable function, and
used it to set can_disable and maybe_disable in
bsp_interrupt_get_attributes().

- added verification for non-maskable vectors in
bsp_interrupt_vector_disable(), which is rejected
with error RTEMS_UNSATISFIED.

Updates #4830.
2026-05-14 15:42:35 +00:00
Gedare Bloom 2ed6cfbbd5 spec/riscv: fix abspath to riscv-mmu.h
Fixes #5571
2026-05-13 16:08:41 +10:00