Commit Graph

36920 Commits

Author SHA1 Message Date
Matteo Concas
d010f6ae8b bsps/sparc/leon3: Fix GPTIMER timer index logic
The old logic would lead to an error when
multiprocessing was enabled and
`LEON3_GPTIMER_BASE` was defined due to
`leon3_timer_core_index` being undefined.

The new logic fixes this and keeps the same
intent:
 - If multiprocessing is not enabled, the timer
   index is 0
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is defined, the timer
   index is twice the CPU boot index
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is not defined, we
   fallback to the old logic using the GPTIMER
   core index.

Close #5281
2025-06-25 08:22:13 +02:00
Kinsey Moore
3d8b56f10c cpukit/libdebugger: Prevent hang on memory access
When memory is accessed by the remote debugging client, the access is
sandboxed with setjmp/longjmp and appropriate exception handlers to
prevent the attempted access from causing a failure of the debugger or
otherwise altering execution. The existing implementation works as
expected when the context executing the memory access and the exception
context resulting from a failed access do not share a stack.

In the case of AArch64, a failed access when the debugger is already in
exception context causes a re-entry into exception context where the
machine state is pushed onto the same stack that was in use where the
exception occurred. When setjmp is called inside a stack frame and the
exception occurs outside that stack frame, the stack frame is unwound
before the exception occurs and the exception entry overwrites the area
previously occupied by the stack frame housing the setjmp and corrupting
the link register that is stored there. After restoration of state using
longjmp(), this corrupted link register information is loaded from the
stack frame and undesired behavior occurs.

In the instance of this bug that was encountered, the corrupted link
register contained an unaligned pointer which caused an unending cascade
of prefetch abort exceptions presenting as a hard hang.

Closes #5273
2025-06-18 13:53:35 -05:00
Chris Johns
cb3fba0447 bsps/shared/dev/ide: Initalise ATA request links as off chain
- Fixes the asserts when building with RTEMS_DEBUG

Closes #5254
2025-05-28 13:01:00 +10:00
Chris Johns
6335d7e48a machine/timecounters: Add missing _Timecounter_ decls
Add:

 - _Timecounter_Getboottime
 - _Timecounter_Getboottimebin

Closes #5212
2025-05-09 08:37:01 +10:00
Chris Johns
f769b20c98 cpukit/libdl: Fix loading symbols from an object file at runtime
- Assume a relocation record with a symbol name with a length of
  0 is resolved. ARM seems to create a symbol with no name for
  R_ARM_V4BX relocation records.

- Move the addition of the rtems_rtl_base_sym_global_add symbol
  to the global symbol table to the weak
  rtems_rtl_base_global_syms_init call. If symbols are
  embedded the support for runtime loading symbols is over
  loaded. This change is required so the base object has a
  valid global symbol table attached to track dependencies.

Fixes #5234
2025-04-01 12:31:32 +11:00
Matteo Concas
9dae9f5fe8 spec: Install missing header files for GRLIB and SPARC
The following files will be installed during SPARC/GRLIB builds:
- bsps/include/grlib/apbuart-regs.h
- bsps/include/grlib/gptimer-regs.h
- bsps/include/grlib/irqamp-regs.h
- bsps/sparc/include/grlib/io.h

Closes issue #5232
2025-03-26 17:43:13 +01:00
Amar Takhar
b4149b2282 gitlab: Add link to CI
This runs only the commit message and merge request checker.

Required so we can have 'all pipelines must pass' enabled due to a bug in
Gitlab
2025-02-12 22:22:24 -05:00
Chris Johns
87bf49b715 Revert "build: Provide LDFLAGS for pkg-config"
This reverts commit e36ba91110
2025-02-11 05:38:19 +00:00
Sebastian Huber
e421c922a8 bsp/qoriq: Ignore spurious interrupts
For example, with edge triggered external interrupts we may see spurious
interrupts.   Ignore them instead of issuing a fatal error.

Use eieio to synchronize access to the IACK and EOI registers.

Use a loop to immediately services the next pending interrupt without
having to go through the exception epiloge and prologue.

Close #5173.
2025-02-07 16:18:23 -07:00
Sebastian Huber
e36ba91110 build: Provide LDFLAGS for pkg-config
Some pkg-config variants perform transformations on the --libs options.
This may lead to completely broken linker options.  Provide the LDFLAGS
as a variable.  Remove "Ldflags:" since this is an unsupported field.

Update #5165.
2025-02-07 18:28:01 +00:00
Jan Sommer
a0e4be53f4 grlib/occan: Fix baud rate calculation
Fixes #5205
2025-02-07 08:50:42 -07:00
Jan Sommer
9641e1e97d cpukit/termios: Fix ordering of baud rate table
rtems_termios_set_best_baud expects a sorted baud rate table.

Fixes #5202
2025-02-03 12:04:33 -07:00
Reinking, Janosch
f1c201c508 bsps/shared: NS16550 driver updates the line control register during operation
Fixes: #5179
2025-01-24 00:08:29 +00:00
Zhaoyue Wang
603c168a0b cpukit/libmisc: fix flag in capture.c
The RTEMS_CAPTURE_OVERFLOW is an overflow flag for each CPU, and its
value is the same as RTEMS_CAPTURE_INIT. Executing rtems_capture_flush
will set the RTEMS_CAPTURE_INIT flag to 0 in the global flags.

Fixes #5184.
2025-01-23 23:45:01 +00:00
Ranulfo Raphael
84c2cf3da9 cpukit/libdl/arm: Fix trampoline alignment
This commit aligns trampolines for THUMB and ARM instructions
(CALL/JUMP24 and THM_JUMP24/THM_PC22).

According to the ARM technical reference in section "Register-relative
and PC-relative expressions":
    In Thumb code:
    - For B, BL, CBNZ, and CBZ instructions, the value of the PC is the
      address of the current instruction plus 4 bytes.
    - For all other instructions that use labels, the value of the PC is
      the address of the current instruction plus 4 bytes, with bit[1]
      of the result cleared to 0 to make it word-aligned.

Closes #5189
2025-01-23 19:38:05 -03:00
Chris Johns
0a46769ba4 waf: Handle no version label in VERSION when a release
Closes #5185
6.1
2025-01-22 13:55:03 +11:00
Kinsey Moore
f7de6d5425 spec/pkgconfig: Account for separate compilation and linking
When compilation and linking are performed separately, some platforms
(i.e. RISC-V) may require that ABI flags are provided during the linking
step as well as the compilation step.

Closes #5183
2025-01-16 19:02:56 -06:00
Sebastian Huber
34ba74f4f4 score: Fix RTEMS_DEBUG build
Close #5159.
2025-01-08 06:41:12 +01:00
Chris Johns
d61a739e41 waf: Update to waf-2.1.4
Closes #5167
2024-12-22 10:42:40 +11:00
Sebastian Huber
a357119bd6 build: Improve Makefile.inc
Support relocated BSP installations by letting the user provide
RTEMS_ROOT.

Close #5171.
2024-12-05 04:11:45 +01:00
Sebastian Huber
e79dc64c8e rtems: Remove pre-qualified constraints
The pre-qualified constraints are not applicable to mainline RTEMS.
2024-11-27 04:47:26 +01:00
Sebastian Huber
7f00921b07 score: Support scheduler change inhibitors
For example, the POSIX sporadic server adds a second priority to a
thread.  We cannot account for this priority in a scheduler change.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
63c5d062c3 score: Fix _Thread_Priority_change()
The POSIX sporadic server may temporarily remove the real priority of a
thread.  Check that the priority node is active before the change is
propagated.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
65e480312c posix: Use real priority for sporadic server state
This allows to other areas to use the real priority node state.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
78e5e76572 psxtests/psx09: Change prio while at low prio
Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
5eb938283d psxtests/psx09: Improve sporadic server tests
Drop thread parameter from get_current_prio().

Lock/unlock ceiling mutex while executing at low and high priority.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
e565dbba65 psxtests/psx09: Use local variables
Update #5164.
2024-11-27 02:17:14 +00:00
Kinsey Moore
106d00537e posix/lio_listio: corrected addition of system event
Previously the system event used by lio_listio was manually added to
event.h and not using rtems-central. This patch corrects that and renames
the event to make it clearer.

Some related dead code has also been removed.


(cherry picked from commit cabc8c3a78)

Co-authored-by: alessandronardin <ale.daluch@gmail.com>
2024-11-26 19:42:12 +00:00
Chris Johns
c529694656 cpukit/jffs2/rtime: Fix off-by-one error in decompression check
Closes #5072


(cherry picked from commit abaea2b798)

Co-authored-by: Kinsey Moore <kinsey.moore@oarcorp.com>
2024-11-22 02:22:32 +00:00
Chris Johns
e14a740a99 spec/cpukit: Add libdl RISCV support
Closes #5144
base/6
2024-11-22 00:13:36 +00:00
Chris Johns
4a00b66bc6 cpukit/libdl/riscv: Fix warnings
Updates #5144
2024-11-22 00:13:36 +00:00
Kinsey Moore
9e42e61e6e bsps/aarch64/zynqmp: Factor out the CFC-400X management console
This moves the management console implementation into its own file so
that BSPs which do not need it do not carry the code around with them.

Closes #5120
2024-11-22 00:06:16 +00:00
Gedare Bloom
24c964e83c confdefs: do not CONFIGURE_FILESYSTEM_NFS in ALL
Fixes #5118.
2024-11-22 00:03:19 +00:00
Kinsey Moore
7d1a934884 bsps/shared/flash: Add a JFFS2 flashdev driver
This adds generic JFFS2 interworking code that allows JFFS2 to be used
on top of any flashdev backend. It currently only supports NOR flashdev
backends.
2024-11-21 23:44:37 +00:00
Aaron Nyholm
9d6367fd4f bsps/xilinx-zynq: Fixed QSPI Flash sector erase
Erases of exactly the sector size only erase one sector instead of
two.

Closes #5161
2024-11-21 16:54:56 +11:00
Sebastian Huber
f45ccfa167 build: Remove Windows quirk
The current version of gccdeps.py works on Windows.
2024-11-21 04:22:31 +01:00
Sebastian Huber
7c099f5613 build: Fix native Windows build
Replace the Windows path separator to get proper UIDs.
2024-11-21 04:22:31 +01:00
Sebastian Huber
f6e55fa4b0 build: Remove Python 2 quirks 2024-11-21 04:22:31 +01:00
Sebastian Huber
ae7a21c5e9 build: Report normal Git hash
Commit 3d782180ea changed the reported Git
hash to short.  Change this back to the normal Git hash.  Existing
support code may rely on this.  The short hash is generated based on the
current repository state.  The reported hash should be useful also for
future states of the repository.  If Git changes the hash algorithm in
the future, then the hash length may be used as an indicator for the
hash algorithm.  With a variable hash length this is more difficult.

Simplify expression.

Update #5037.
2024-11-20 15:13:45 +00:00
Sebastian Huber
e53dfabe36 sparc/leon3: Add leon3_l2c_lock
Use a single lock for all L2C support functions.

Close #4925.
2024-11-20 15:08:04 +00:00
Sebastian Huber
7d5c08db80 validation: Check bootloader L2C settings
Update #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
85add65a91 grlib/l2c: Prevent concurrent register access
Accesses to the L2C registers performed by the L2C driver are now
serialized with spin locks. This avoids concurrent access to the L2C
registers by multiple processors. Proposed by GRLIB-TN-0021.

Update #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
1ce6347976 grlib/l2c: Write to flush registers using atomic instructions
All writes to the L2C flush registers performed by the driver are now
done using atomic write instructions. Proposed by GRLIB-TN-0021.

Update #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
6198260d26 grlib/l2c: Access registers with helper functions 2024-11-20 15:08:04 +00:00
Martin Åberg
0a2c310d39 grlib/l2c: Use printk for debug print 2024-11-20 15:08:04 +00:00
Martin Åberg
ed55634d51 grlib/l2c: Fix whitespace
No functional change
2024-11-20 15:08:04 +00:00
Sebastian Huber
e5854b2a69 bsps/sparc: Add comments
Close #4875.
2024-11-20 15:07:29 +00:00
Martin Åberg
26b11e3830 LEON3: Update power-down function
This updates the implementation of the LEON3 processor power-down
function.

It now contains the workaround for the GR712RC power-down errata
described in GR712RC-UM, version 2.16, section 1.7.8. The workaround is
compatible with other LEON3/LEON4 components.

Update #4875.
2024-11-20 15:07:29 +00:00
Sebastian Huber
e661f400e2 score: Fix _Thread_Priority_apply()
Properly serialize explicit thread priority changes (for example
rtems_task_set_priority()) and thread priority changes carried out by
thread queues (locking protocols such as priority inheritance).

Update #5159.
2024-11-20 02:32:39 +01:00
Sebastian Huber
7ff3438cba validation: Test thread priority change detail
Test the proper serialization of explicit thread priority changes (for
example rtems_task_set_priority()) and thread priority changes carried
out by thread queues (locking protocols such as priority inheritance).

With RTEMS_DEBUG enabled, the new test case fails with an assertion.  It
is fixed in a follow up commit.

Update #5159.
2024-11-20 02:32:38 +01:00