Commit Graph

35700 Commits

Author SHA1 Message Date
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
Daniel Cederman
5d5b9eeb08 bsps/shared/grlib: 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:08 +01:00
Daniel Cederman
33f6e34b2d bsps/include/grlib: 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:58:31 +01:00
Daniel Cederman
fa427fa1d9 bsps/include/libchip: Remove legacy networking header file 2022-11-14 07:44:35 +01:00
Gedare Bloom
a640854b5e wscript: rename bsp_list to bsplist 2022-11-11 11:58:05 -07:00
Gedare Bloom
9c15524f15 wscript: rename bsp_defaults to bspdefaults 2022-11-11 11:58:05 -07:00
Sebastian Huber
68e1dc87a6 validation: Fix unused variable warning 2022-11-11 16:48:12 +01:00
Sebastian Huber
77c8d822c3 bsps/riscv: Fix software interrupt dispatching
In SMP configurations, there may be no software interrupt handler
installed when the software interrupt is processed.  Add the new
interrupt handler dispatch variant
bsp_interrupt_handler_dispatch_unlikely() for this special case.
2022-11-11 16:38:25 +01:00
Sebastian Huber
55318d17b4 validation: Improve spurious interrupt test case
Use the tm27 support to test a spurious interrupt.  This helps to run the
validation test case on targets which have no software interrupt available for
tests (for example riscv/PLIC/CLINT in the SMP configuration).
2022-11-11 16:38:25 +01:00
Sebastian Huber
908ffc7a93 bsps/noel: Fix interrupt support 2022-11-11 16:38:25 +01:00
Kinsey Moore
b5983c559a cpukit/fdt: Fix typos and clarify params 2022-11-10 15:18:18 -06:00
Joel Sherrill
ecd8aec911 Remove remnants of rtems_io_lookup_name
Updates #3420.
2022-11-10 15:18:12 -06:00
Sebastian Huber
bfdfc979fd bsps/riscv: Fix PLIC enable register count
Each PLIC enable register has 32 bits, so we have to divide by 32.
2022-11-10 15:17:07 +01:00
Sebastian Huber
8f6dd3ca1f arm: Fix Armv7-M TLS support
Set the thread ID register in the CPU context.

Update #3835.
Close #4753.
2022-11-10 11:10:46 +01:00
Sebastian Huber
e4210d5a08 bsps/riscv: Skip init on not configured processors 2022-11-10 08:55:38 +01:00
Sebastian Huber
3e5ccdd34e bsps/riscv: Simplify riscv_plic_init() 2022-11-10 08:55:38 +01:00