Commit Graph

37026 Commits

Author SHA1 Message Date
Joel Sherrill
69b72bb9df bsps/arm/stm32h7/dma/dma-allocator.c: Fix unused variable warning
Updates &20
2025-05-05 18:34:27 +00:00
Joel Sherrill
ae5655b88b bsps/arm/stm32h7/hal/*: Fix pointer and integer comparison warnings
The HAL code would compare to "0U" instead of NULL.

Updates &20
2025-05-05 18:34:27 +00:00
Joel Sherrill
64070bdf66 bsps/arm/stm32h7: Address missing prototype for SystemInit_ExtMemCtl
Updates &20
2025-05-05 18:34:27 +00:00
Joel Sherrill
f7c9ed4672 cpukit/score/cpu/microblaze/__tls_get_addr.c: Do not include <assert.h>
Updates #5238
2025-04-21 09:27:14 -05:00
Joel Sherrill
10e8c18971 cpukit/score/cpu/arm/__tls_get_addr.c: Do not include <assert.h>
Updates #5238
2025-04-21 09:26:02 -05:00
Chris Johns
e640d6b602 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:28:24 +11:00
Matteo Concas
7205078179 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

Fix issue #5231
2025-03-25 16:04:40 +01:00
Joel Sherrill
3a5069ced6 niosvc10lp/../altera_avalon_sysid_qsys_regs.h: Convert to UNIX format
Accidentally committed in DOS format.
2025-03-19 13:38:36 +00:00
Joel Sherrill
2eb458afa6 sptests/*/*.scn: Convert to UNIX format
Accidentally committed in DOS format.
2025-03-19 13:38:36 +00:00
Joel Sherrill
812901f53b psxtests/*/*.doc: Convert to UNIX format
Accidentally committed in DOS format.
2025-03-19 13:38:36 +00:00
Joel Sherrill
6e5d82c160 fstests/fsdosfsname01/files.h: Convert to UNIX format
Accidentally committed in DOS format.
2025-03-19 13:38:36 +00:00
Gedare Bloom
b66b0d9804 rtems/event: regenerate from central 2025-03-19 02:09:21 +00:00
Joel Sherrill
62e475f386 cpukit/libfs/src/dosfs/msdos_rename.c: Relicense to 2-BSD
This file was by Chris Johns who has previously given permission
to relicense.

Update #3053.
2025-03-19 01:16:19 +00:00
Joel Sherrill
91cc54bcf9 cpukit/dev/i2c/*: Relicense to 2-BSD
All files were written by Chris Johns who has previously given
permission to relicense.

Update #3053.
2025-03-19 01:16:19 +00:00
Joel Sherrill
15c389892b testsuites/sptests/*: Relicense to 2-BSD
These files were by Kuan-Hsun Chen who has previously given
permission to relicense.

Updates #3053.
2025-03-18 15:17:54 -05:00
Jeremy Lorelli
2623dac93c beatnik/include/bsp.h: Fix eeprom/ds1621 device names
The device names were using ', ' in place of '.'.
It seems like this was a mistake made during a refactor.
2025-03-14 09:00:00 -07:00
Joel Sherrill
b6534f3047 testsuites/validation/tc-score-thread.c: Fix warning on assignment
GCC 14 is much pickier and turns some warnings into errors.
This is one example that cross BSPs and architectures.
2025-03-14 07:25:27 +00:00
Kinsey Moore
4fb6342a42 bsps/dev/irq/arm-gic: Document the GICD_IROUTER offset
The GICD_IROUTER register technically starts at offset 0x6000, but the
first 32 IRQ entries are reserved making IRQ 32's entry at 0x6100 the
first usable entry. This register is not currently used, so only a
comment is added to that effect.

Closes #5223
2025-03-13 22:31:23 +00:00
Joel Sherrill
98d38900aa bsps/or1k/generic_or1k: Relicense to 2-BSD
Hesham Almatary has given permission to relicense to 2-BSD.

Updates #3053.
2025-03-13 18:57:12 +00:00
Joel Sherrill
31715959fe raspberrypi/include/bsp/irq.h, raspberrypi.h: Relicense to 2-BSD
These files were written by a combination of contributors who have
given permisison to relicense.

Updates #3053
2025-03-13 14:57:49 +00:00
Joel Sherrill
a4774bb79d moxiesim/console/console-io.c: Relicense to 2-BSD
This file was written by Anthony Green and OAR who both have given
permisison to relicense.

Updates #3053
2025-03-13 14:54:06 +00:00
Amar Takhar
eac33277ce gitlab: Add missed files to ignore
This was caught in !426
2025-03-13 06:49:22 +00:00
Sebastian Huber
4df7021740 build: Make tar archives reproducible
Reduce dependency on umask settings.
2025-03-13 06:45:25 +00:00
Joel Sherrill
9fea354de8 powerpc/ss555: Correct prototype of Clock_isr
The argument is now a void * and this was not reflected in the
prototype or implementation. The argument was unused so this
has no functional impact.
2025-03-13 06:27:35 +00:00
Joel Sherrill
9e05cd72c5 mvme147s: Remove as obsoleted
Updates #5031
2025-03-13 06:12:15 +00:00
Joel Sherrill
01d22874c2 cpukit/.../include/rtems/score/riscv-utility.h: Correct license
This file was taken from BSD by Hesham Almatary. Even though he
left the original BSD license in place, he added the RTEMS historical
license. Hesham has given permission to relicense his work under
2-BSD and this file never should have had the RTEMS historical
license on it anyway.

Update #3053.
2025-03-11 17:43:29 -05:00
Joel Sherrill
7b48e83079 cpukit/score/cpu/riscv/include/libcpu/byteorder.h: Relicense to 2-BSD
History shows this file was written by Jiri Gaisler who has given
permission to relicense his work.

Update #3053.
2025-03-11 17:40:27 -05:00
Sebastian Huber
7d59c6e03c dtc: Update VERSION 2025-03-10 22:44:01 +00:00
Ayush Singh
f85c80bb82 libfdt: Add fdt_setprop_namelen_string()
Macro using fdt_setprop_namelen() internally similar to
`fdt_setprop_string()`.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Message-ID: <20241205-setprop-namelen-v2-4-0d85a3d2e7b1@beagleboard.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Ayush Singh
149d5b1297 libfdt: Add fdt_setprop_namelen()
Allow specifying name length in setprop similar to
`fdt_get_property_namelen` functions.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Message-ID: <20241205-setprop-namelen-v2-3-0d85a3d2e7b1@beagleboard.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Ayush Singh
b42a20221a libfdt_internal: fdt_find_string_len_()
Allow specifying string length to `fdt_find_string_`.
fdt_find_string_() now internally uses this function.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Message-ID: <20241205-setprop-namelen-v2-2-0d85a3d2e7b1@beagleboard.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Ayush Singh
c8a2404c20 libfdt: add fdt_get_property_namelen_w()
Similar to the non-namelen variant, it is implemented in terms of
fdt_get_property_namelen()

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Message-ID: <20241205-setprop-namelen-v2-1-0d85a3d2e7b1@beagleboard.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Bingwu Zhang
c1c2f18e4a libfdt: Remove extra semi-colons outside functions
When compiling with -Werror -Wpedantic, both GCC and Clang fails, saying
that these semi-colons are redundant, so remove them.

Signed-off-by: Bingwu Zhang <xtexchooser@duck.com>
Message-ID: <20241116101228.164707-6-xtex@envs.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
cea524f01e libfdt.h: whitespace consistency fixups
In these cases, spaces are used for indentation/alignment while the
surrounding lines use tab. Fix it up for consistency.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
f82a2d0ae7 libfdt.h: typo and consistency fixes
Most of these are plain typos. Exceptions:

- "devicetree" is only used in that form in the grammar and in mailing
  list references; all other instances, in particular all in prose,
  use "device tree".

- I don't know what "nodeequested" was supposed to be, the sentence
  reads just fine without it.

- "inexistant" is a rare form of nonexistent.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Pierre-Clément Tosi
45be19a34a libfdt: fdt_path_offset_namelen: Reject empty path
Reject empty paths and negative lengths, according to the DT spec v0.4:

    The convention for specifying a device path is:
        /node-name-1/node-name-2/node-name-N

    The path to the root node is /.

This prevents the access to path[0] from ever being out-of-bounds.

Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Message-ID: <20231010092822.qo2nxc3g47t26dqs@google.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Pierre-Clément Tosi
1ce89bdf14 libfdt: fdt_get_alias_namelen: Validate aliases
Ensure that the alias found matches the device tree specification v0.4:

    Each property of the /aliases node defines an alias. The property
    name specifies the alias name. The property value specifies the full
    path to a node in the devicetree.

This protects against a stack overflow caused by

    fdt_path_offset_namelen(fdt, path, namelen)

calling

    fdt_path_offset(fdt, fdt_get_alias_namelen(fdt, path, namelen))

leading to infinite recursion on DTs with "circular" aliases.

This fix was originally written by Mike McTernan for Android in [1].

[1]: 9308e7f977

Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Acked-by: Mike McTernan <mikemcternan@google.com>
Message-ID: <20231010092725.63h7c45p2fnmj577@google.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Pierre-Clément Tosi
48ba49052f libfdt: Fix fdt_appendprop_addrrange documentation
According to the documentation, the function should default to the very
common property name <reg> when none is "specified". However, neither
passing NULL (ends up calling strlen(NULL) and segfaults) nor ""
(appends a property with an empty name) implements this behavior.

Furthermore, the test case supposed to cover this default value actually
passes the value to the function, somewhat defeating its own purpose:

    /* 2. default property name */

    // ...

    err = fdt_appendprop_addrrange(fdt, 0, offset, "reg", addr, size);
    if (err)
            FAIL("Failed to set \"reg\": %s", fdt_strerror(err));
    check_getprop_addrrange(fdt, 0, offset, "reg", 1);

Finally, nothing in the implementation of the function seems to attempt
to cover that use-case.

As the feature can't ever have been used by clients and as the resulting
reduced readability of the caller seems (IMO) to outweigh any potential
benefit this API would bring, remove the erroneous documentation instead
of trying to fix the function.

Reported-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Message-ID: <20230831123918.rf54emwkzgtcb7aw@google.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Yan-Jie Wang
71c63c9cd1 libfdt: Fix a typo in libfdt.h
The function mentioned in the comment, fdt_finished(), should be
changed to fdt_finish().

Signed-off-by: Yan-Jie Wang <yanjiewtw@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
bfaebcc352 improve documentation for fdt_path_offset()
The current documentation doesn't mention the possibility of passing a
non-absolute path and having that treated as an alias. Add that
information, along with an example (which will further be expanded in
a subsequent patch), and clarify when -FDT_ERR_BADPATH can be returned.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
98975f5e93 add fdt_get_symbol() and fdt_get_symbol_namelen() functions
The fdt_get_symbol_namelen() function will be used in a subsequent
patch.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
e3ce2b63ba use fdt_path_getprop_namelen() in fdt_get_alias_namelen()
Simplify the code by making use of the new helper.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Rasmus Villemoes
981699bef0 add fdt_path_getprop_namelen() helper
Add a wrapper for fdt_getprop_namelen() allowing one to specify the node
by path instead of offset.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Kees Cook
de9953c6a0 libfdt: Replace deprecated 0-length arrays with proper flexible arrays
Replace the 0-length arrays in structures with proper flexible
arrays. This will avoid warnings when building under GCC 13 with
-fstrict-flex-arrays, which the Linux kernel will be doing soon:

In file included from ../lib/fdt_ro.c:2:
../lib/../scripts/dtc/cpukit/dtc/libfdt/fdt_ro.c: In function 'fdt_get_name':
../lib/../scripts/dtc/cpukit/dtc/libfdt/fdt_ro.c:319:24: warning: 'strrchr' reading 1 or more bytes from a region of size 0 [-Wstringop-overread]
  319 |                 leaf = strrchr(nameptr, '/');
      |                        ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2025-03-10 22:44:01 +00:00
Kinsey Moore
ece058c6a3 bsps/m68k/shared: Remove unreferenced gdb stub
Closes #5213
2025-03-10 22:32:30 +00:00
Joel Sherrill
9e7371709d m68k (VBR): Change definition and use of m68k_get_vbr() to fix warning
GCC 14 is pickier and flagged this use of a linker symbol.
2025-03-05 16:19:33 +00:00
Joel Sherrill
68baf9eead libmisc/shell/*: Relicense to 2-BSD
Many files in this directory were by persons and organizations
that have previously given relicensing permission. git history
was used to confirm authorship and contributions on files which
had unclear or missing copyrights.

Update #3053.
2025-03-01 20:21:56 +00:00
Gedare Bloom
0149e6e749 spdx: add 2-BSD SPDX tags on relicensed files
Updates the recently merged relicensed files with the 2-Clause BSD
SPDX annotation.

Closes #5208.
2025-03-01 04:14:54 +00:00
Gedare Bloom
e463f8c968 powerpc: Relicense to 2-BSD
This batch of relicensing was enabled by the combination of Eric
Valette and Andy Dachs giving permission.

Updates #3053
2025-03-01 00:40:17 +00:00
yang.zhang
ad81baf160 cpukit/posix: signal() should return SIG_ERR on error
When signum is invalid, return SIG_ERR, and set errno to
indicate the cause.
2025-02-28 16:23:16 +00:00