Commit Graph
38198 Commits
Author SHA1 Message Date
Avi Weiss 305224bb62 bsp/arm/tms570: documentation updates (out-of-date @retvals)
Some retval's have come out of date after refactors. Correct them.

No code/logic changes, doxygen only.
2026-07-12 15:46:17 +03:00
Avi Weiss 3d5a8ed674 bsp/arm/tms570: apply snake_case to variable names in irq.c
Apply snake_case formatting to names in irq.c for clarity, to
align with RTEMS style guide and to ease future maintenance.
2026-07-12 15:46:17 +03:00
Avi Weiss 8244f83e3d bsp/arm/tms570: add leading underscore to CPP macro paramaters
Add leading underscore to preprocessor macro paramater names
as per RTEMS style guide.
2026-07-12 15:46:17 +03:00
Avi Weiss 34510f3ec2 bsp/arm/tms570: apply RTEMS clang_format to irq.c
Ease future maintenance by standardising the formatting
according to RTEMS guidelines.

No logic changes in this commit, only clang-format applied.
2026-07-12 15:46:14 +03:00
Avi Weiss e07f69641b bsp/arm/tms570: protect against vector < 2 in irq_set_priority
calls to tms570_irq_set_priority protect against requesting a
priority < 2, but not against inputs with vector < 2.

for example calling tms570_irq_set_priority(ESM_HIGH, 10)
will not only get through the guard, it will attempt to write
to CHANCTRL0 (which gets blocked by hardware), puts whatever
was there (apparently hardcoded INT-REQ0) into channel 10,
and returns success.

So the channel 10 request dissappeared from the VIM channel
map completely - yet this call returns RTEMS_SUCCESSFUL

TRM (for both TMS570LS31x and TMS570LC43x) states:
NOTE: CHAN0 and CHAN1 are hard wired to INT_REQ0 and
INT_REQ1, so they cannot be remapped.

This commit puts a guard to fail on requests with vector < 2.
2026-07-12 15:45:29 +03:00
Chris Johns 155f798c0a libdebugger: Add TCB to extra thread info
Closes #5639
2026-07-09 16:43:02 +00:00
Ran Hong b4e6231d23 bsps/powerpc: Update and add the u-boot support
uboot_environment and uboot_environment_size are configured through
 build options UBOOT_ENV_BASE and UBOOT_ENV_SIZE.

 Support for powerpc/qoriq is added.

 For qoriq boards with u-boot, user can use the same environment
 access fuctions shared with other bsps like gen83xx.

 Closes #5481
2026-07-09 13:43:33 +00:00
Chris Johns 020b094c5f libmisc/cpuuse: Fix thread names in top
- Show classic and POSIX thread names working around the mess we now
  have with the name management in threads

Closes #5637
2026-07-09 09:22:33 +10:00
Yang Zhang 0c6821f020 bsps/pc386: Fix RTC diagnostic format
The RTC driver used the unsupported BSD-style %b conversion with
only the diagnostic register value. This did not provide the
intended bitmask decoding.

Print the diagnostic register as a two-digit hexadecimal value
instead and remove the unused RTCDG_BITS definition.
2026-07-08 20:32:25 +00:00
Chris Johns 11d1425d3f libdebugger: Format AARCH64 supportin the libdebugger style
Fix some of the spelling.
2026-07-08 02:08:20 -04:00
Chris Johns c98f9f6ce4 libdebugger: Align the warning formatting with libdeugger
Fix some of the spelling.
2026-07-08 02:08:20 -04:00
Chris Johns 3b0de038c7 libdebugger: Fix corruption of thread registers with 32 or more threads
The block logic uses realloc to resize memory used by libdebugger
when creating a snapshot of threads. Thread registers take a
reference to the block and if a realloc changes the base address
any references are invalid. Add rebase handler support to blocks
that is called when the block base changes and add a handler to
thread register blocks to rebase a thread's registers.

Exclude threads using both types of names they can have. This lets
all names be reported in extra thread info packets.

Closes #5635
2026-07-08 02:08:20 -04:00
Michal Lenc 7f98bd8469 i2c: move drivers from cpukit to bsps/shared
More i2c drivers from cpukit to bsps/shared to allow them use BSP
infrastructure if needed. The framework code i2c-bus.c and i2c-dev.c
kept at its original location.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-07-02 18:33:01 -05:00
Michal Lenc 5ebf57e2af can: move drivers from cpukit to bsps/shared
Move CAN controllers from cputik to bsps/shared directory. This will
allow to use BSP level interface which may be needed for some
controllers. Generic CAN stack implementation is still kept in the
original directory as this shoudl be independent from the low level
driver interface.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-07-02 18:33:01 -05:00
Cheng Mingming 641f589b37 psxfile01: Add hard link O_NOFOLLOW regression
Extend the existing open() O_NOFOLLOW coverage to verify that a hard
link to a regular file is still resolved to its target, while symbolic
links remain subject to the O_NOFOLLOW check. This is the regression
test for the do_open() fix that uses RTEMS_FS_FOLLOW_HARD_LINK instead
of zero for the O_NOFOLLOW case.

The test writes a known marker to the regular file, creates a hard link
to it, opens the hard link with O_NOFOLLOW, and then checks both the
inode identity and the file contents read back through the descriptor.

Reading the contents is the part that actually distinguishes a correct
resolution from the bug. In the IMFS a hard link is a distinct node
(IMFS_node_control_hard_link) whose fstat handler forwards to the target
(IMFS_stat_hard_link), but whose read and mmap handlers are the default
ones that fail with ENOTSUP. When open() wrongly clears the follow flags
for O_NOFOLLOW, path evaluation stops at the hard link node instead of
resolving it, yet fstat() still reports the target's mode and inode. A
test that only checks st_mode/st_ino therefore passes even with the bug
present. Reading the marker back forces the descriptor to refer to the
real regular file, so the test fails (read returns ENOTSUP) unless the
hard link was actually followed.
2026-07-02 18:30:03 -05:00
Cheng Mingming 4ef704aac4 cpukit/libcsupport: Keep hard links with O_NOFOLLOW
When O_NOFOLLOW is used, open() should only prevent following
symbolic links. Hard links are still ordinary directory entries and
should continue to resolve to the target object.

Switch the follow flags from zero to RTEMS_FS_FOLLOW_HARD_LINK so the
path evaluator keeps hard links working while suppressing symbolic link
following.
2026-07-02 18:30:03 -05:00
Sebastian Huber 5ea6c565f6 validation: Test rtems_barrier_get_number_waiting()
Add a validation test for rtems_barrier_get_number_waiting() based on an
action requirement.

Update #5336.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de
2026-07-02 17:55:53 -05:00
M Mithilesh 77eda6f760 cpukit/confdefs: Add CAN stack resource calculation
The CAN/CAN FD stack requires a worker task per configured queue.
Empirical profiling confirms the CAN worker task utilizes ~404 bytes
of stack space on 32-bit architectures.

This patch introduces CONFIGURE_MAXIMUM_CAN_QUEUES to dynamically
inject the required CAN worker tasks into the master _CONFIGURE_TASKS
pool. Because the 404-byte usage falls below RTEMS_MINIMUM_STACK_SIZE,
provisioning them as standard system tasks automatically guarantees
sufficient stack space overhead.

Additionally, this patch removes the hardcoded +0x1000 stack padding
in rtems_task_create to prevent workspace exhaustion, and adds the
spcan01 test to verify the CONFIGURE_MAXIMUM_CAN_QUEUES macro behavior.

Closes #5193
2026-07-02 17:36:27 -05:00
Sebastian Huber 0a0b69aeb0 contrib/cpukit/posix-newlib: Use local div()
Drop dependency on C library for div(). The _mktime_div() implementation
is in line with glibc, musl, and FreeBSD.

Update #5143.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-07-02 17:24:27 -05:00
Sebastian Huber dfa323c7d5 cpukit: Reformat header with clang-format
Reformat `<rtems/extension.h>` with clang-format.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-07-02 21:18:50 +00:00
Sebastian Huber 184957d88d fstests: Remove duplicate test program
The fsclose01 test program contains general test cases for fclose().  It
does not depend on a particular filesystem.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-07-01 04:12:42 +02:00
Chris Johns 2f16291408 powerpc/beatnik: Convert MOTLoad GEV variables into env variables
Closes #5573
2026-06-27 09:46:32 +10:00
Sebastian Huber dd5b257aaf libi2c: Fix unused parameter error
Fix the following errors:

```
cpukit/libi2c/libi2c.c: In function 'rtems_i2c_init':
cpukit/libi2c/libi2c.c:162:29:
error: unused parameter 'minor' [-Werror=unused-parameter]
  162 |   rtems_device_minor_number minor,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
cpukit/libi2c/libi2c.c:163:29:
error: unused parameter 'arg' [-Werror=unused-parameter]
  163 |   void                     *arg
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
```

Update #5387.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-26 04:17:08 +02:00
Aaron Nyholm ed072a2501 iodev: Add iodev driver
Add iodev driver and related test
2026-06-25 17:37:09 -05:00
Vijay Banerjee 4a513030e2 mvme3100: Initialize libi2c at device driver order
To use the libi2c, application needs to be configured with

 #define CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER

Update #5387
2026-06-25 09:51:58 -05:00
Vijay Banerjee e09a580116 confdefs: Add configure macro for libi2c
Add CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER define

Update #5387
2026-06-25 09:51:58 -05:00
Vijay Kumar Banerjee c185664998 libi2c: Use rtems thread api
Replace custom mutex handling with rtems thread API

Update #5387
2026-06-25 09:51:58 -05:00
Sebastian Huber c802016c09 bsps/altera-cyclone-v: Fix warning
bsps/arm/altera-cyclone-v/contrib/hwlib/src/hwmgr/alt_qspi.c:
In function 'alt_qspi_read':
bsps/arm/altera-cyclone-v/contrib/hwlib/src/hwmgr/alt_qspi.c:747:12:
error: variable 'data' set but not used
[-Werror=unused-but-set-variable=]
  747 |     char * data = (char *)dst;
      |            ^~~~

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-25 02:15:41 +00:00
Chris Johns 639444039d powerpc/motorola_powerpc: Convert PPCBug NVRAM vars into env vars
Closes #5621
2026-06-25 10:08:11 +10:00
Yang Zhang 3f505ddcf2 testsuites/psxtests/psxmsgq01: Fix timeval subtraction
This patch fixes the timeval subtraction logic in psxmsgq01/init.c
which previously failed to borrow from the seconds component when
the microsecond difference was negative.

This bug resulted in negative microsecond values and an off-by-one
incorrect seconds count during timed queue verifications.

Additionally, this patch removes the associated "FIXME: This is wrong."
comment.
2026-06-24 01:41:58 +00:00
Sebastian Huber 4420185b44 bsps/sparc: SPARC_Clear_and_unmask_interrupt()
Remove SPARC_Clear_and_unmask_interrupt(). This functionality is
available through the Interrupt Manager:

- rtems_interrupt_clear()

- rtems_interrupt_vector_enable()

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-23 13:35:52 -05:00
Sebastian Huber 387648f674 bsps/sparc: Remove superflous intr clear/unmask
The SPARC_Clear_and_unmask_interrupt() is a no-operation except for
interrupt traps.  In __gnat_install_handler_common(), handler for
interrupt traps are installed in another block at line 100.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-23 13:35:52 -05:00
Sebastian Huber b2b0e0c10f bsps/sparc: Fix interrupt handler installs
Calling SPARC_Clear_and_unmask_interrupt() after installing an interrupt
handler with rtems_interrupt_handler_install() has two issues:

1. It is superfluous, since rtems_interrupt_handler_install() already
   enables the interrupt vector.

2. While interrupts are disabled, clearing the interrupt may lead to a
   lost edge triggered interrupt.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-23 13:35:52 -05:00
Sebastian Huber c12b4d5881 bsps/noel: Fix build
Declare and provide riscv_send_ipi().

Build issue was introduced by commit
128106b2f1.

Update #3337.
Update #5617.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-23 14:28:46 +02:00
Sebastian Huber 385d322d81 bsps: Fix variable set but not used error
Fix this error:

xnandpsu_onfi.c: In function 'XNandPsu_OnfiParamPageCrc':
xnandpsu_onfi.c:62:13: error: variable 'DataByteCount' set but not used
[-Werror=unused-but-set-variable=]
   62 |         u32 DataByteCount = 0U;
      |             ^~~~~~~~~~~~~

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-22 14:45:34 -05:00
Sebastian Huber 6af9da17ed validation: Add SOFTWARE_TIMECOUNTER_INTERVAL
Remove test-specific magic value CPUUSE_SOFT_TICKS and replace it with
SOFTWARE_TIMECOUNTER_INTERVAL defined by the validation test support
API.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-22 14:45:05 -05:00
Sebastian Huber 54a57d9614 validation: Improve data cache disable test cases
Add a test case plan to ensure that all test steps were executed.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-22 14:44:03 -05:00
Joel Sherrill c0dcfb75d6 bsps/shared/dev/gpio/gpio-support.c: Address unused variable warning
release_sc was set but not used by anything other than _Assert()
statements. Added "(void) release_sc"
2026-06-22 10:49:12 -05:00
Chris Johns 66323ab56f powerpc/motorola_powerpc: Fix p_clock driver
Add the clock on and off calls as the current interrupt
API does not make them.

Closes #5628
2026-06-22 06:31:17 -05:00
Sebastian Huber 60ea0d6897 validation: Rework get/set interrupt priorities
For some interrupt controllers like the RISC-V PLIC, a maximum interrupt
priority value of UINT32_MAX is valid. Adjust the validation tests to
take this into account.

In general, all the present interrupt controller API validation tests
have a structural issue. They contain the loop over all interrupt
vectors directly in the action requirement. This is not the right
approach. It is better to use an action requirement which produces a
test run function by defining a test header through the `test-header`
attribute. Then call the test run function for all interrupt vectors.
This approach allows to using the `${.:skip}` feature.

In this commit, this is new approach is applied to the interrupt get/set
priority validation tests.

Close #5578.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-22 10:10:05 +00:00
Sebastian Huber 9e8901a75d validation: Raise interrupt only if possible
In the interrupt clear validation test case, raise the interrupt only if
it can be done.

Update #4846.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-22 10:10:05 +00:00
Sebastian Huber 6c2d789b4a doxygen: CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
Adjust the file size limits to the values present in the RTEMS Classic
API Guide.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-19 01:44:11 +02:00
Sebastian Huber 98d6179ead validation: Fix wording
Correct wording according to ISVV finding:

  RTEMS-SMP-REQ-VER-020 - Colliding descriptions

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-18 17:31:33 -05:00
Sebastian Huber 4000cb50c7 validation: Improve SMP EDF test case
Update #3716.
2026-06-18 17:31:33 -05:00
Sebastian Huber 8ee33e32c1 validation: Test no scheduler assignment 2026-06-18 17:31:33 -05:00
Sebastian Huber 86a0a9de70 record: Fix ISR lock usage
Disable interrupts while using the ISR lock.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2026-06-18 17:30:19 -05:00
Sam Price d55f44cfb5 microblaze: Install uartlite/xil-compat headers
Microblaze is most likely built with uartlite for uart.
We will install the <bsp/uartlite.h> / <bsp/uartlite_l.h>
header files for users to use.
2026-06-18 14:52:46 -05:00
Yang Zhang 5661c6531f bsps/shared/gpio: Fix group define leaks
In rtems_gpio_define_pin_group(), several malloc() calls did not
check their return values. This could lead to NULL pointer
dereferences in later initialization steps.

The previous error handling also leaked memory and hardware pin
resources if an intermediate step.

This patch refactors the error handling path to address these issues.
2026-06-18 16:48:55 +00:00
Yang Zhang 7e68b06641 bsps/shared/gpio: Correct spelling
Rename the struct member bsp_speficifc_pins to bsp_specific_pins.
2026-06-18 16:48:55 +00:00
Avi Weiss adf8402fe4 bsps/arm/tms570: emacm.h comment typo corrections
Clean up some incorrect comments in the emacm.h header.
2026-06-18 16:47:47 +00:00