Commit Graph

35715 Commits

Author SHA1 Message Date
Randy Dunlap
819374bebc jffs2: Fix if/else empty body warnings
When debug (print) macros are not enabled, change them to use the
no_printk() macro instead of <nothing>. This fixes gcc warnings when
-Wextra is used:

../cpukit/libfs/src/jffs2/src/nodelist.c:255:37: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../cpukit/libfs/src/jffs2/src/nodelist.c:278:38: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../cpukit/libfs/src/jffs2/src/nodelist.c:558:52: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../cpukit/libfs/src/jffs2/src/xattr.c:1247:58: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../cpukit/libfs/src/jffs2/src/xattr.c:1281:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Builds without warnings on all 3 levels of CONFIG_JFFS2_FS_DEBUG.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Richard Weinberger <richard@nod.at>
2023-01-12 08:16:30 +01:00
Sebastian Huber
e5a53d636e jffs2: Add <linux/printk.h>
A follow up patch uses no_printk().
2023-01-12 08:16:30 +01:00
Sebastian Huber
d46366a2e7 riscv: Resurrect RISCV_ENABLE_HTIF_SUPPORT
Low-end configurations may want to have the HTIF support removed.
Enable the option by default.  Fix formatting.  Fix node validity
checks.

Updates #4779.
2023-01-12 08:15:58 +01:00
Kinsey Moore
b76f382bd4 bsps/xil: Use the LP64 header for ILP32
Xilinx's upstream ILP32 xil_cache.h header is out of date and broken.
This provides a copy of the LP64 header in place of the ILP32 header
since the LP64 header includes all the correct types to work with either
data model.
2023-01-04 13:11:29 -06:00
Kinsey Moore
f65bbb4059 bsps: Move ZynqMP-specific info into the BSP
The address of the nandpsu peripheral is specific to the ZynqMP SoC and
not relevant to other devices that might have one or more instances of
this peripheral.
2023-01-04 13:11:29 -06:00
Sebastian Huber
f8cb1f483d arm: Enable thread ID register for ARMv6
Close #4759.
2023-01-03 09:01:46 +01:00
Sebastian Huber
0c0b2837a7 bsp/qoriq: Add qoriq_mmu_adjust_and_write_to_tlb1() 2023-01-03 09:01:46 +01:00
Sebastian Huber
0e052bcb3e bsp/qoriq: Add qoriq_mmu_find_free_tlb1_entry() 2023-01-03 09:01:46 +01:00
Sebastian Huber
ad454d1c63 bsp/qoriq: Support message signaled interrupts 2023-01-03 09:01:46 +01:00
Sebastian Huber
62932ec0cc bsp/qoriq: Clear shared message signaled interrupts 2023-01-03 08:24:03 +01:00
Sebastian Huber
ecbb565653 bsp/qoriq: Use only pic_is_ipi() 2023-01-03 08:18:07 +01:00
zack leung
c8c713c6bd rtems_shell_main_chmod: Correct argument indexing
Closes #4751
2022-12-26 13:51:03 -06:00
zack leung
4523c71340 rtems_shell_main_mmove problem
--0000000000006acec205efd38cd6
Content-Type: text/plain; charset="UTF-8"

Closes #4556
2022-12-23 13:10:39 -06:00
Kinsey Moore
30ca711d19 bsps: Import Xilinx NAND driver
This adds Xilinx's driver for the Xilinx NAND controller embedded in the
ZynqMP SoC. Within that device alone, it is possible to access this
peripheral from MicroBlaze, ARMv7, and ARMv8 cores. This has been added
to the hardware ZynqMP BSPs since QEMU does not support emulation of
this peripheral. This driver supports polled operation only. The
imported files are and should be able to remain unmodified. Import
information is kept in bsps/shared/dev/nand/VERSION.
2022-12-23 13:06:42 -06:00
Kinsey Moore
50539ba881 bsps: Import Xilinx support code
This support code is necessary for many Xilinx-provided bare metal device
drivers supported on ARM, AArch64, and MicroBlaze platforms. Support for
all of these architectures is kept under bsps/include due to multiple
architecture variants being supported which requires complex logic in
the build system. The imported files are and should be able to remain
unmodified. Import information is kept in bsps/shared/xil/VERSION.
2022-12-23 13:06:42 -06:00
Hesham Almatary
88b80a5fd0 RISC-V: Always probe for HTIF and remove RISCV_ENABLE_HTIF_SUPPORT
Updates #4779
2022-12-23 09:21:14 +00:00
Hesham Almatary
a430dd43d9 spec/build/riscv: Start all riscv/riscv BSPs at 0x80000000
To follow other RISC-V-based OSes conventions. Delete generic
BSPs that start at 0x70000000 as BSPs are now medany by default.

Updates #4775
2022-12-23 09:21:07 +00:00
Hesham Almatary
dd28005490 spec/build/riscv: Default rv64* BSPs to medany cmodel
Currently generic RISC-V BSPs (riscv/riscv) that start with rv64 and not
rv64*_medany will start at 0x70000000. This adds high maintenance overhead
and deviates from almost all other RISC-V-based OSes and baremetal programs
that start at 0x80000000. Further, testing now has to account for an extra
parameter (medany or not) that doubles the number of BSPs need to be
tested.

This commit defaults all RV64 BSPs to use medany code model to allow starting
all BSPs at 0x80000000. BSPs that require different code models and/or
start addresses are custom and need to add their own entries.

Updates #4775
2022-12-23 09:21:02 +00:00
Sebastian Huber
4bd504053b dtc: Update VERSION 2022-12-22 08:02:57 +01:00
Tadeusz Struk
b5db3f64e3 libfdt: prevent integer overflow in fdt_next_tag
Since fdt_next_tag() in a public API function all input parameters,
including the fdt blob should not be trusted. It is possible to forge
a blob with invalid property length that will cause integer overflow
during offset calculation. To prevent that, validate the property length
read from the blob before doing calculations.

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Message-Id: <20221005232931.3016047-1-tadeusz.struk@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-12-22 08:02:57 +01:00
Tadeusz Struk
8632d58f97 libfdt: add fdt_get_property_by_offset_w helper
Add a new fdt_get_property_by_offset_w helper function.
It is a wrapper on fdt_get_property_by_offset that returns
a writable pointer to a property at a given offset.

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Message-Id: <20221011182611.116011-1-tadeusz.struk@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-12-22 08:02:57 +01:00
Jia Xianhua
b4d005e3fb libdtc: remove duplicate judgments
There is no need to check the VALID_DTB repeatedly, and can be combined
into one if statement.

Signed-off-by: Jia Xianhua <jiaxianhua@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-12-22 08:02:57 +01:00
Sebastian Huber
f169b513d2 score: Fix _Processor_mask_To_uint32_t()
Correctly calculate the array index and shift value in
_Processor_mask_To_uint32_t().  The bugs had no impact yet since this
function was always called with a zero value for the index in RTEMS.
2022-12-20 17:08:14 +01:00
Christian Mauderer
f845b95a16 bsp/atsam: Allow to use custom SDRAM
With the old build system in RTEMS 5 that was possible by just
overwriting BOARD_Sdram_Config and setting a custom
ATSAM_MEMORY_SDRAM_SIZE during building the BSP. In the new build system
that ATSAM_MEMORY_SDRAM_SIZE is set exclusively by the selected SDRAM
chip.

This patch adds the possibility to specify a "custom-0x100000" or
similar as SDRAM type where the number gives the SDRAM size.
2022-12-15 09:20:53 +01:00
Christian Mauderer
7b968a2eb4 bsps/atsam: Add NULL pointer protection 2022-12-15 09:20:52 +01:00
Christian Mauderer
26050b5fb4 bsps/atsam: Fix unidirectional SPI transfers
A SPI transfer where the Rx or Tx buffer is set to NULL currently
transfers or overwrites data starting from address 0x00000000 via DMA.

This patch changes the DMA setup so that dummy transfers are done.
Just reading / writing to a single location is simpler than changing the
whole logic of the transfer depending on the passed buffers.
2022-12-15 09:20:52 +01:00
Kinsey Moore
1c189e1aa7 bsps/zynqmp: Fix and update device trees
Add ref-clock-num identifiers to the device tree to ensure that
interfaces use the correct clocks even when some are not used due to
unconnected MII busses. This also adjusts the default ZynqMP PHY
attachment to RGMII-ID which was the default before device trees were
introduced.
2022-12-07 07:38:03 -06:00
Frank Kühndel
997ba1d905 tftpDriver.c: Fix Coverity issues
CID 1506523: Unchecked return value from library (CHECKED_RETURN)
CID 1506522: Unchecked return value from library (CHECKED_RETURN)
CID 1437618: Unchecked return value from library (CHECKED_RETURN)

Close #4718
2022-12-02 09:32:01 -06:00
Sebastian Huber
c46fbb9552 config: Add CONFIGURE_RECORD_INTERRUPTS_ENABLED
This enables the tracing of interrupt entry/exit events through an
application configuration option.  The interrupt processing can be
viewed with Trace Compass using rtems-record-lttng from the RTEMS Tools.

Update #4769.
2022-12-02 10:25:44 +01:00
Sebastian Huber
0d5e41afde bsps/irq: Add bsp_interrupt_get_dispatch_table_slot()
Update #4769.
2022-12-02 10:25:44 +01:00
Sebastian Huber
71d1acd41d bsps/irq: Rename handler in dispatch table
The name handler table was a bit misleading after the last rework.
Rename it to distach table.  Update the documentation accordingly.

Update #4769.
2022-12-02 10:25:39 +01:00
Sebastian Huber
e012671cfd aarch64/raspberrypi: Remove duplicate files
These files are already provided by "../../objirq".
2022-12-01 13:05:19 +01:00
Alex White
c3e14019c8 bsps/microblaze: Fix console interrupt build errors
This fixes build errors seen when building with console interrupts
enabled. A few places were missing bspopts.h includes, and one of the
UART functions was not defined.
2022-11-29 16:59:26 -06:00
Kinsey Moore
240987228f spec/beagle: Add missing spi.h install
The beagle SPI functions are unusable by applications unless this file
is installed with the BSP. This ensures that the file is installed
properly.
2022-11-28 10:09:40 +11:00
Chris Johns
408dbeb922 libmisc/rtems-fdt: Support prop map items up to the size of uintptr_t
Updates #4729
2022-11-25 12:43:29 +11:00
Chris Johns
904a9112de libmisc/shell: Fix edit Coverity error
Coverity Id: CID 1517029, CID 1517030, CID 1517031
2022-11-25 12:16:02 +11:00
Sebastian Huber
d9c7db505c bsps/riscv: Simplify PLIC support
In uniprocessor configurations there is no need to take interrupt affinities
into account for the interrupt vector enable/disable.
2022-11-23 07:56:12 +01:00
Sebastian Huber
d448aa4d05 bsps/riscv: Fix PLIC enable register count 2022-11-23 07:56:12 +01:00
Sebastian Huber
733d9b750c bsps/riscv: Add riscv_plic_cpu_0_init()
Move boot processor initialization of PLIC to separate function.
2022-11-23 07:56:12 +01:00
Sebastian Huber
5756a6af10 bsps/riscv: Fix bsp_fdt_map_intr()
The interrupt numbers in the device tree are usually PLIC interrupts.  Map the
number to the vector number associated with an external interrupt.
2022-11-23 07:56:12 +01:00
Chris Johns
8425e679c1 libmisc/shell: Support terminal size as env variables
Closes #4763
2022-11-23 07:00:08 +11:00
Chris Johns
8436cf9764 aarch64/versal: Add UART interrupt support 2022-11-22 21:14:58 +11:00
Aaron Nyholm
c5fa19ecb3 rtems/versal: Updated mmu to include mapping for SDHCI devices on versal
Tested on VCK190

Updates #4762
2022-11-22 13:25:49 +11:00
Kinsey Moore
5b7eea631d cpukit/rtems-fdt: Avoid use of malloc/errno
Use of malloc implies errno which adds TLS dependencies and prevents use
of this FDT wrapper library in BSP initialization code. This change
makes use of rtems_malloc and rtems_calloc which avoid TLS dependencies.
2022-11-18 16:02:46 -06:00
Kinsey Moore
efe8c37046 bsps/zynqmp: Use direct fdt_* calls
This changes the ZynqMP device tree parsing over to direct libfdt calls
to avoid inclusion of malloc() in the base BSP which currently causes
sp01 to fail due to unexpected use of TLS space.
2022-11-18 09:21:10 -06:00
Kinsey Moore
a9861ceea0 aarch64/mmu: Prevent block descriptors at level -1
In the original implementation, level -1 was unused and all levels could
have block-like descriptors (level 2 block descriptors are called page
descriptors). When support for level -1 page tables was added the
constraint on level -1 block descriptors was not honored. This prevents
block descriptors from being mapped at level -1 since the hardware will
not map them properly.
2022-11-17 10:29:04 +11:00
Daniel Cederman
3f644aa874 testsuites/smptests: Change license to BSD-2 for files with Gaisler copyright
This patch changes the license to BSD-2 for all source files where the
copyright is held by Aeroflex Gaisler, Cobham Gaisler, or Gaisler Research.

Updates #3053.
2022-11-14 11:01:36 +01:00
Daniel Cederman
9384ac2d65 cpukit: Change license to BSD-2 for files with Gaisler copyright
This patch changes the license to BSD-2 for all source files where the
copyright is held by Aeroflex Gaisler, Cobham Gaisler, or Gaisler Research.
Some files also includes copyright right statements from OAR and/or
embedded Brains in addition to Gaisler.

Updates #3053.
2022-11-14 11:00:58 +01:00
Daniel Cederman
18a181c267 bsps/riscv: Change license to BSD-2 for files with Gaisler copyright
This patch changes the license to BSD-2 for all source files where the
copyright is held by Aeroflex Gaisler, Cobham Gaisler, or Gaisler Research.
Some files also includes copyright right statements from OAR and/or
embedded Brains in addition to Gaisler.

Updates #3053.
2022-11-14 11:00:14 +01:00
Daniel Cederman
e01e499490 bsps/sparc: Change license to BSD-2 for files with Gaisler copyright
This patch changes the license to BSD-2 for all source files where the
copyright is held by Aeroflex Gaisler, Cobham Gaisler, or Gaisler Research.
Some files also includes copyright right statements from OAR and/or
embedded Brains in addition to Gaisler.

Updates #3053.
2022-11-14 10:59:44 +01:00