13335 Commits

Author SHA1 Message Date
Sebastian Huber
8fd021bbb3 m68k: Do not assign to a linker symbol
The _VBR is a symbol defined by linker scripts.  You cannot change this
value at runtime.  The BSP initialization has to ensure that
m68k_set_vbr() is only set to _VBR.

Close #5210.
2025-08-14 07:02:01 +02:00
Lucian Silistru
45b1495a8a record: Avoid dependency on object link order
For the application configuration option
CONFIGURE_RECORD_INTERRUPTS_ENABLED, define
bsp_interrupt_get_dispatch_table_slot() in the application configuration
to avoid issues with the object link order within the RTEMS libraries.

Enable this option in an associated test.

Close #5244.
2025-08-12 13:18:30 -05:00
Joel Sherrill
3470ea15f1 cpukit/include: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
c87131e192 cpukit/libcsupport: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
f33e7c9a0c cpukit/libdl: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
1d23476eb1 cpukit/libfs: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
ea86780bdf cpukit/libmisc: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
be89bf6be0 cpukit/libtrace: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
9d81cacf25 cpukit/sapi: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
7df3c45159 cpukit/posix: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
26aa9106af cpukit/rtems: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
e2d61770d9 cpukit/score: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Kinsey Moore
046ea144a9 cpukit/aarch64: Use correct stack for nested interrupts
When AArch64 exception support was first written, nested exceptions were
configured using the wrong stack. This happened to work since any
changes were unwound from the stack before dispatch occurred. This
implements correct behavior for all SP0 interrupt vectors.

Closes #5140
2025-08-06 10:41:10 -05:00
Kinsey Moore
f664b84280 cpukit/aarch64: Use correct exception targets
The sp0 IRQ and lel32 SError exception targets were left in a bad state
following the exception rework to avoid use of mutable code pages. The
lel32 SError exception is entirely unused by RTEMS. This points the two
erroneous exception vectors at the correct targets.
2025-08-06 10:41:10 -05:00
Joel Sherrill
4c9e41b060 cpukit/sapi/src/exinit.c: Address warning on all ARM builds
The block of embedded assembly language which creates a section
to add auto-loading of the Python pretty printing scripts was
getting this warning on all ARM BSPs.

/tmp/ccMGaqij.s: Assembler messages:
/tmp/ccMGaqij.s:19: missing merge / string entity size, 1 assumed

This was because the @ symbol is a comment on ARM. Changing to
a % as suggested on the binutils mailing list resolved the problem.
2025-08-06 15:33:15 +00:00
Amar Takhar
5fa8c7b52d readme: Add source locations for RTEMS Shell
If you have any ideas about the missing ones let us know.

This also reformats other areas using mdformat since it was used for the tables.
2025-08-01 09:10:55 +10:00
Amar Takhar
3fcf78156d cpukit: Remove utf8proc and add to build
This also moves the header from <utf8proc/utf8proc.h> to <utf8proc.h>  This
follows what the upstream project uses and keeps us from having to modify
upstream source to put it in a subdirectory.
2025-07-31 18:07:34 -05:00
Amar Takhar
e9870fa74f cpukit: Remove uuid and add to build
Did the best I could handling the location of uuid.h
2025-07-31 18:01:42 -05:00
Amar Takhar
3d8ad5c50c cpukit: Delete xz and add to build
No special instructions.
2025-07-31 17:51:28 -05:00
Amar Takhar
9ff0fd6f5b cpukit: Delete zlib and add to build
Includes had to be added to jffs2 and cpukit.
2025-07-31 17:51:28 -05:00
Amar Takhar
fb1ef66175 cpukit: Remove FastLZ and add to build.
This moves the files to contrib/cpukit/fastlz
2025-07-31 17:51:28 -05:00
Kinsey Moore
d19852f3f7 cpukit/libdebugger/server: Use generic TLS accessor
This updates the libdebugger server to use a generic TLS area access
mechanism so that it works across all supported architectures.
2025-07-30 13:41:29 +10:00
Jeremy Lorelli
20baae458d cpukit/libcsupport: Implement malloc_usable_size
Implement malloc_usable_size to get the underlying heap block size of a
memory address on the heap.

Closes #4503
2025-07-26 21:44:11 -04:00
tangkun
c20dc9c7aa cpukit/posix/src/clocknanosleep.c: fix cancellation points
According to the POSIX standard, sleep/nanosleep/clock_nanosleep
should be treated as cancellation points.

Updates #4675
2025-07-25 09:19:41 -05:00
Joel Sherrill
9f5913e132 cpukit/libdl/rtl-mdreloc-powerpc.c: Fix multiple warnings
Incorrect format specifier: printf() adjusted to be clean on both 32
and 64 bit PowerPCs.

Defined but not used: Adjusted _ARCH_PPC64 ifdef's to properly
eliminate code not used on 64 bit PowerPCs.
2025-07-24 22:02:30 -04:00
Joel Sherrill
cef5542bc0 x86_64/include/rtems/score/x86_64.h: Use standard variadic macro
The DBG_PRINTF() macro was using the GNU extension variadic macro
style. Switched to standard C style variadic macro, printk() so
safer for debug than printf(), and included needed files.
2025-07-24 20:37:11 -05:00
Joel Sherrill
a1c30b7f71 mghttpd: Remove Mongoose httpd
Users should migrate to Civitweb.

Closes #5304.
2025-07-24 20:09:59 -05:00
Joel Sherrill
b8408fe39b score/cpu/mips/include/rtems/score/cpu.h: Add single field to structure
GCC warned that the Context_Control_fp structure had no fields.
Added an unused field when there is no FP support.
2025-07-24 19:29:48 -05:00
Kinsey Moore
ddf50dc868 cpukit/libdebugger: Add support for TLS variables
This adds support for the "vGetTLSAddr" GDB query which retrieves the
address of a TLS variable by offset from the beginning of the TLS memory
space for the given thread. This offset does not include the size of the
thread control block which is at the beginning of every TLS area as used
by RTEMS. Notably, the returned address is big-endian rather than the
little-endian typical with other responses.

This functionality does not include retrieval of addresses for TLS
variables hosted in loadable modules, only TLS variables in the host
binary.
2025-07-24 19:20:05 -05:00
yang.zhang
08c005764d posix: pthread_sigmask should return error number when fail
According to the Posix specification:
Upon successful completion pthread_sigmask() shall return 0;
otherwise, it shall return the corresponding error number.
2025-07-24 19:06:30 -05:00
Joel Sherrill
5e2ac1584e cpukit/libblock/src/bdbuf.c: Uninitialized variable warning
On some BSP builds, the variable q was reported as used before
it was initialized. This is a false positive. The variable is now
initialized to NULL to prevent this.
2025-07-24 18:21:59 -05:00
Joel Sherrill
40769810ff cpukit/libfs/src/jffs2/src/fs-rtems.c: Used before initialized warning
Initialized pointer variable to address used before initialized.
2025-07-24 18:16:58 -05:00
Joel Sherrill
82552c7e4d cpukit/score/cpu/m68k/cpu_asm.S: Delete #warning directive
This was warning about the FP context not being restored
when a thread is restarted. The current and long standing
execution path is through _Thread_Handler() which does restore
the FP context.
2025-07-24 18:14:32 -05:00
Joel Sherrill
5af4eda125 cpukit/score/cpu/mips/cpu_asm.S: Add nops in branch delay slot
The assembler was generating warnings about not having a nop
in a branch delay slot. In both cases, the branch needed one.
2025-07-24 18:11:00 -05:00
Joel Sherrill
ecb71667e1 cpukit/score/cpu/or1k/*: Move _CPU_ISR_install_vector() to cpu.c
This function was static inline which means that it must compile
cleanly for all versions of C and C++. Newer C standards make it
an error to cast between incompatible function types. Moving this
function to cpu.c from cpu.h allows the C standard version required
to be narrowed from "whatever the user wants" to the one version
that is used to compile RTEMS.
2025-07-24 17:58:57 -05:00
Joel Sherrill
cc0823b2ca score/cpu/or1k/include/.../or1k-utility.h: enum value must be int
GCC gave the warning that "ISO C restricts enumerator values to
range of 'int' before C23 [-Wpedantic]."

Changed place holder value from 0xffffffff to 0x7fffffff.
2025-07-24 17:57:00 -05:00
Chris Johns
3a2b37826f libcsupport/termios: Wake receiver when ICANON settings change
Closes #5307
2025-07-24 17:41:22 -05:00
tangkun
8d73c4914e cpukit/posix/src/pthreaddetach.c: fix pthreaddetach issue
When calling pthread_detach on a thread which is already detached,
it should return EINVAL.
2025-07-24 17:39:13 -05:00
lei huang
e1ce81a868 cpukit/shell: Fix NULL Pointer Dereference in Shell Memory Dump Commands 2025-07-15 19:05:58 -05:00
Joel Sherrill
e79a30378b cpukit/libdl/rtl-mdreloc-v850.c: Delete this file
This file should have been removed when the v850 port was removed.

Updates #5023
2025-07-16 09:04:48 +10:00
Joel Sherrill
32cf9ea0c6 score/cpu/moxie/.../cpu.h: Address unused variable warning
The Moxie does not implement the interrupt disable/enable functions
and this led to an unused variable warning. Just added proper
annotation to let GCC know it is intentionally unused.
2025-07-15 23:00:32 +00:00
Joel Sherrill
2b06029e7d cpukit/libdl/rtl-mdreloc-moxie.c: Fix printf() warning
Use the correct format specifier (%d not %ld).
2025-07-15 22:48:23 +00:00
Joel Sherrill
e255c2888a libnetwork references misc: Remove libnetwork references
The legacy network stack has been moved to a separate package.
Remove references to it in odd places.
2025-07-15 22:36:46 +00:00
huangshuhua
13cb96d1e3 posix/mmap: validate addr non-null before alignment check 2025-07-14 02:29:01 +00:00
Kinsey Moore
dc0d3149e5 cpukit/aarch64: Refactor exception handling
This refactors the AArch64 exception handling to remove the mutable code
sections that are generally flagged as a bad idea by code analysis
tools. This also removes any casting between data pointers and function
pointers to avoid the need to use pragmas to disable warnings about such
casting.
2025-07-11 11:36:51 -05:00
Joel Sherrill
b66436e1d9 cpukit/acinclude.m4: Removed
A remnant of the autoconf/automake build system. Remove.
2025-07-03 15:03:11 -05:00
Matt Joyce
af4fd0b70b rtems/score/armv7m.h: Edit NVIC struct definition.
Adjust ARMV7M_NVIC structure definition to account for changes
introduced to ARMV8M NVIC.
2025-07-02 23:41:01 -04:00
Matt Joyce
104aea035d cpukit/arm.h: Add ARMV8_M Definitions
Some fixes where necessary to not handle ARMv8M identical to (for
example) ARMv8A. ARMv8M is more similar to ARMv7M.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matteo Concas
19f12d2dca cpu/riscv: Add Smdbltrp extension compatibility
If the Double Trap Extension is implemented, the
MDT bit of the mstatus (or mstatush in RV32)
register will be set when a trap is to be taken.

The MIE (Machine Interrupt Enable) bit can only
be set to 1 if the MDT bit is zero.

Thus, we need to clear MDT first if we want to
enable interrupts when dispatching a thread.

MDT is also cleared in register a1 before
restoring the interrupt frame as writing 1 to MDT
will cause MIE to be set to 0. In RV64 this
happens regardless of the value written to MIE in
the same write.

In RV32, MDT is in the mstatush so we do not need
to clear during restore as this register is not
restored.

With this change all 60 SMP tests pass (compared
to 20/60 before the fix). The tests have been run
on hardware using two RV64 CPUs that implement
the double trap extension.

Update #5274
2025-07-01 16:53:36 -05:00
Sepehr Ganji
20850e7e73 libfs/fatfs: Add rtems-README file
The rtems-README file contains the process for
importing the source, and the hash and changelog
of the current version.
2025-07-01 12:00:56 -06:00