427 Commits

Author SHA1 Message Date
Joel Sherrill
fa2e0e7e58 bsps/shared/grlib/amba/ambapp_names.c: Address sign comparison warnings
These changes were made to address GCC -Wsign-compare warnings.
In this case, the vendor ID in the management structure was unsigned
and the vendor parameters to various helper functions were signed.
2025-12-04 18:56:03 -06:00
Aaron Nyholm
0ee1c38aa6 bsps/shared/dev/nor: Added support for multiple CFI regions
CFI parser now returns largest block size when multiple regions
are present allowing for block erase to be used with returned size.
2025-12-04 18:52:00 -06:00
Kinsey Moore
d82efbd7d1 bsps/shared/dev/nor: Add SFDP and CFI parsers
Fixed flashdev doxygen group
2025-12-04 18:52:00 -06:00
Kinsey Moore
20faa90860 bsps/shared/dev/flash: Add a flashdev simulation backend
This adds a backend for flashdev that simulates a flash device with
adjustable delays to simulate real flash devices and offers
configurable flash parameters. This also migrates the JFFS2
filesystem tests to the flashdev framework and eliminates the
purpose-built simulated flash in the testsuite in favor of a more
generic and widely usable solution.
2025-12-04 14:12:55 -06:00
Kinsey Moore
ff52b009b5 bsps/shared: Add XNandPsu flashdev backend
Add a flashdev backend supporting the XNandPsu peripheral on ZynqMP
systems.
2025-12-03 08:25:50 -06:00
Kinsey Moore
54de3ac479 bsps/shared/xqspi_flash.c: Add support for sector information 2025-11-10 12:29:31 -06:00
Joel Sherrill
7ab332d86f bsps/shared/ofw/ofw.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:26:10 -06:00
Joel Sherrill
88bce4ee7f grlib/uart/apbuart_cons.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:25:50 -06:00
Joel Sherrill
a4333a4361 bsps/shared/dev/serial/*.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:22:51 -06:00
Sebastian Huber
03ae1fa930 bsps/irq: Fix type limits warnings
Set BSP_INTERRUPT_VECTOR_COUNT to 1 to avoid type limits and array
bounds warnings.

Make sure all functions using the default interrupt controller
implementation return a status of RTEMS_UNSATISFIED.

Update #5298.
Close #5377.
2025-10-29 07:16:41 +00:00
Joel Sherrill
9e8a8dff2e bsps/shared/dev/gpio/gpio-support.c: Address type limit warnings
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
2025-10-28 19:33:35 +00:00
Aaron Nyholm
190899ee61 bsps/shared/jffs2_flashdev.c: Fixed fatal heap error on failed mount
Removed double free of mount_data and instance.
Closes #5381
2025-10-28 15:15:08 +11:00
Kinsey Moore
2cb47d2010 bsps/jffs2_flashdev: Return correct value for OOB size
Return the actual out of bounds size per page instead of the ioctl
return status. JFFS2 will happily operate with an OOB size of 0 and
instead put cleanmarkers in the normal page space of the flash.
2025-10-23 15:31:57 -05:00
Kinsey Moore
955d36ea47 bsps/qspi: Make flashdev control structure private
These structures are not required to be exposed to users for any
functionality and users of the API have no way to make use of them.
2025-10-16 11:26:52 -05:00
Joel Sherrill
243c25d191 bsps ACPI: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.

The ACPI change set includes two headers which define debug macros. When
not building for debug, the instantiated inline functions generate
unused parameter warnings from every file they are included in. The
warning was disabled around the macro instantiations.
2025-10-10 22:04:38 +00:00
Joel Sherrill
f63b5b6661 bsps shared arm: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
bc959e983f bsps/shared/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:52:14 +00:00
Joel Sherrill
1339ef1b10 bsps/shared/grlib: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:52:14 +00:00
Kinsey Moore
ea7a756ea1 bsps/shared/dev/flash/jffs2: Add support for NAND
This adds support for NAND to the JFFS2 flashdev adapter.
2025-10-08 16:43:09 +00:00
Kinsey Moore
7da577f8e6 bsps/shared/dev/flash: Enforce maximum JFFS2 filesystem size
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.

This also resolves some off-nominal memory leaks.
2025-09-22 15:52:43 -05:00
Kinsey Moore
75e7f5cb80 cpukit/flashdev: Add unregister call and private data destructor
This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
2025-09-22 10:04:58 -05:00
Jeremy Lorelli
897a8d3094 libchip/ds1375: Refactor to use i2c-rtc driver
Previously this RTC was using the file system-based i2c interface in
/dev. Since the RTC is initialized pretty early on during system init,
we call open() before stdin/stdout/stderr have been opened. RTEMS
assumes that stdin == 0, stdout == 1, etc., and fails when that isn't
the case. In particular, when stdin != 0, RTEMS assumes that it wasn't
configured with a console driver and skips opening stdout/stderr,
leading to confusing issues with the standard I/O streams.
2025-09-20 08:57:16 +10:00
Joel Sherrill
e45ebbc5c1 bsps/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
ad60ce8c2c bsps/*acpi*: Address unterminated string warnings
The ACPI source has multiple tables where a Name field is defined.
The name field is a character array with a length of 4. All of the
string initializers are four characters plus a NUL. The code is
careful to use strn*() functions and intentionally avoids assuming
there is space for the NUL. With lots of entries in the various
arrays, this was clearly a design decision to save space.

This was caught by GCC's -Wunterminated-string-initialization
warning. The solution used is to use the "nonstring" attribute
recommended by the GCC manual.

Closes #5329
2025-09-19 18:56:55 +00:00
Joel Sherrill
888e5a5d25 bsps/*: Correct spelling of copyright
Multiple files had this spelled incorrectly.
2025-09-09 11:43:24 -05:00
Joel Sherrill
72837b30d8 bsps/shared/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
f665d19812 bsps/shared/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05: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
4549be01e3 bsps/shared: 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
f18fc04657 bsps/shared/gpio: Fix array bounds warning
GCC currently has issues with false positive warnings about array bounds
violations when the value used as the index is a pointer. This slightly
reworks the code to make it cleaner and to avoid this warning.
2025-07-31 18:13:12 -05:00
Kinsey Moore
e36bbd8e25 bsps/dev/spi/xqspipsu-flash-helper: Explain source
This adds a missing header block and better explains the provenance of
the xqspipsu-flash-helper files and their copyright status.
2025-07-24 17:31:48 -05:00
Kinsey Moore
c26259ee2e bsps/shared/serial/pl011: Avoid unnecessary reads
Avoid reading from the pl011 data register unnecessarily. There is no
need to preserve the contents of this register as it is not normal
memory. This unnecessary read causes console spam when running under the
Xen hypervisor when the read FIFO is empty since the read is not
expected.
2025-06-26 23:29:24 +00:00
Joel Sherrill
734208a49b bsp/shared/atomics: New directory
Provide missing GCC atomics helpers as part of BSPs where GCC
does not know how to provide it since the CPU's ISA has no
atomic instructions. The implementation provided in
bsps/shared/atomics/__atomic_test_and_set.c should work
on any single core CPU.

The BSPs that need thie function tend to have older cores. This
is the list of BSPs:

arm - csb336, csb337, csb637, edb7312, gumstix, kit637_v6, lpc24xx_ea,
  lpc24xx_ncs_ram, lpc24xx_ncs_rom_ext, lpc24xx_ncs_rom_int,
  lpc24xx_plx800_ram, lpc24xx_plx800_rom_int, lpc32xx_mzx,
  lpc32xx_mzx_stage_1, lpc32xx_mzx_stage_2, lpc32xx_phycore,
  rtl22xx, rtl22xx_t, smdk2410
m68k - av5282, mcf5329
mips - jmr3904
moxie - moxiesim
nios2 - nios2_iss
riscv - grv32i, grv32im, niosvc10lp, noel32im, rv32i, rv32im,
sparc - ut699
2025-06-19 23:30:57 +00:00
Matteo Concas
8915b72068 grlib/pci: Use unsigned integer for interrupt number
Closes Coverity 1642585
2025-06-10 18:53:04 +00:00
Chris Johns
b0eb259377 bsps/shared/dev/ide: Initalise ATA request links as off chain
- Fixes the asserts when building with RTEMS_DEBUG

Closes #5253
2025-06-05 23:19:48 +00:00
Matteo Concas
24a3ae9fa5 grlib/spwtdp: Remove DEBUG flag
This flag should not be enabled by default
2025-05-06 19:30:06 +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
Joel Sherrill
04db5eaee1 bsps/shared/start/setvec.c: Fix warning across multiple BSPs
GCC 14 flags this method with a warning.
2025-02-24 16:46:58 -06:00
Gedare Bloom
8e6ded473c rtems: update licenses to 2BSD
This is an update of many lingering embedded brains GmbH licenses from
the RTEMS License to the 2-BSD license where possible depending on the
joint copyrights.

Updates #3053.
2025-02-10 15:44:09 +00:00
Kinsey Moore
f4c179c610 bsps/shared/dev/spi: Fix undefined function warning
This adds the appropriate header to resolve a warning about a missing
declaration for the fls() function.
2025-02-07 17:58:16 +00:00
Jan Sommer
ab21dcba06 grlib/occan: Fix baud rate calculation
Fixes #5166
2025-02-07 15:08:07 +00:00
Gedare Bloom
9a1efe6f91 bsps/shared: relicense to 2BSD
Updates #3053.
2025-02-07 14:53:18 +00:00
Gedare Bloom
e27d41a38a bsps/rtc: add copyright and relicense based on git history
Updates #3053.
2025-02-07 14:53:18 +00:00
Matteo Concas
72c0f5ccc1 grlib/grcanfd: Mask frame data length value to prevent overflow 2025-02-07 01:03:33 +00:00
Matteo Concas
0bafb10a69 grlib/grcanfd: Use signed integer to account for errors 2025-02-07 01:03:33 +00:00
Reinking, Janosch
1a4e26e3ea bsps/shared: NS16550 driver updates the line control register during operation
Fixes: #5179
2025-01-23 13:51:07 +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
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
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