Commit Graph

1855 Commits

Author SHA1 Message Date
Chris Johns
bc8ffae115 bsp/xilinx-zynq: Add devcfg and slcr drivers
The devfg driver loads the PL with a bitfile image. The driver can also
support scrubbing.

These drivers are from Patrick Gauvin <pggauvin at gmail.com> and a thread
on the devel list: https://lists.rtems.org/pipermail/devel/2017-May/017705.html
2024-10-30 23:04:42 +00:00
Kinsey Moore
1b5549ae69 bsps/arm/zynq: Make secondary core wait on QEMU
When using QEMU configurations that support SMP for Zynq7000 systems,
the second core is started at the same time as the first core instead of
waiting for an event to trigger a check for the value at 0xfffffff0
before jumping into RTEMS code. This makes the erroneously started core
wait as expected and prevents prefetch and data aborts from occurring
before the MMU has been properly configured. This was recently exposed
by cleanup done to the ARM GICv2 driver that removed some delays which
were allowing this to operate normally.
2024-10-30 18:56:36 +00:00
Matteo Concas
8820b8e63f grlib/b1553rt: Fix bit shift direction
The RT_TSW_OK field is set to 1 if there was no error. The Message Error
(ME) field indicates an error and must be set to 0 if there was no error
so the result of tsw&RT_TSW_OK must be negated. It is then left-shifted
to the Messsage Error (ME) bit field of the message information word.

Fix issue CID 1399772
2024-10-29 13:25:14 +00:00
Kinsey Moore
1bba349478 bsps: Remove imported Xilinx headers
This removes the headers imported from the embeddedsw repository in
favor of a much thinner shim. This also removes the complicated build
system configuration necessary to support use of these headers. The
primary reason for removal is that certain external Xilinx libraries
also require use of these headers and this causes version mismatches and
header conflicts that can be avoided.
2024-10-28 19:23:49 +00:00
Ning Yang
79bed0f191 aarch64/raspberrypi: optimize console return 2024-10-28 15:12:21 +00:00
Utkarsh Verma
d17116d310 aarch64/raspberrypi: improve UART
- Add support for four new ports, UART2-UART5.
- Add build options to allow console device configuration.
- Segregate device-specific definitions from the device family files. X macros
  are used to maintain a single source of truth and have the configuration
  done at compile-time
- Add raspberrypi_uart_init() to make it convenient for users to install uart
  devices

Close #5130

Co-authored-by: Ning Yang <yangn0@qq.com>
2024-10-28 15:12:21 +00:00
Purva Yeshi
eaaeebedda riscv/beaglevfire: Rename 'bvf' to 'beaglevfire' 2024-10-25 21:23:23 +00:00
Francescodario Cuzzocrea
9d45cf1b44 riscv: add bsp for beagle v fire
Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
2024-10-25 21:23:23 +00:00
Francescodario Cuzzocrea
0e3792edbf riscv: Work area size based on /memory node in fdt
* It is not granted that we will always access to natually aligned
   access. So, before handling endianess do byte-a-byte load using
   the appropriate libfdt function to avoid unaligned access issues

Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
2024-10-25 21:23:23 +00:00
Kevin Kirspel
e9957cd8e3 riscv/niosv: Adding a new NIOS V BSP to RISC-V 2024-10-25 13:49:36 +00:00
Matteo Concas
a5f64ff27d grlib/ascs: Fix evaluation order violations, CIDs 1399778, 1399782 2024-10-21 07:02:51 +00:00
Matteo Concas
93413ed315 grlib/pwm: Fix PWM enable bit check, CID 1399774 2024-10-21 07:02:51 +00:00
Matteo Concas
de56c23c14 grlib/1553: Remove dead code, CID 1399770 2024-10-21 07:02:51 +00:00
Matteo Concas
ff22dd6f7c grlib/1553: Remove dead code, CID 1399764 2024-10-21 07:02:51 +00:00
Kinsey Moore
685a26315c bsps/aarch64/mmu: Update mapping function to new API
This was missed in the API change.
2024-10-19 02:04:34 +00:00
Sebastian Huber
ad378dcaf7 bsps/aarch64: Use clean invalidate
On other targets, the rtems_cache_flush_entire_data() also performs a
clean and invalidate.

This is a workaround for "Answer 68874 - Zynq UltraScale+ MPSoC, APU -
An Eviction Might Overtake A Cache Clean Operation".
2024-10-11 01:27:48 +02:00
Sebastian Huber
95734e3d6d bsps/aarch64: Simplify aarch64_mmu_map_block() 2024-10-11 01:27:48 +02:00
Sebastian Huber
bb2cd445e1 bsps/aarch64: Add AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS
This avoids dead code in the MMU setup.
2024-10-11 01:27:48 +02:00
Sebastian Huber
269f4ca5db bsps/aarch64: Use dependency injection
Let the caller provide the translation table base and the used page
tables to ease testing.

Simplify the error handling by using early returns.

Return RTEMS_TOO_MANY instead of RTEMS_NO_MEMORY if the page tables are
all used.
2024-10-11 01:27:48 +02:00
Sebastian Huber
4b1e80dff5 bsps/aarch64: Improve MMU mapping
Produce only one fatal error.  Fix potential integer overflow errors.
2024-10-11 01:27:48 +02:00
Sebastian Huber
8c4cc767b5 aarch64/xilinx-zynqmp: Move MMU config table 2024-10-11 01:27:48 +02:00
Sebastian Huber
41ed4b5d26 bsps/aarch64: Assume that all levels have a data cache
This is the case for all currently supported AArch64 targets.
2024-10-11 01:27:48 +02:00
Sebastian Huber
aac760584b bsps/aarch64: Fix entire data cache flush/invalidate
The cache maintenance operations affect only the current PE.  Make sure
that thread dispatching is disabled and interrupts cannot interfere.
2024-10-11 01:27:48 +02:00
Sebastian Huber
064a672fbb bsps/aarch64: Simplify AArch64_clidr_get_cache_type() 2024-10-11 01:27:48 +02:00
Sebastian Huber
098f8cb079 bsps/aarch64: Fix AArch64_get_ccsidr_for_level() 2024-10-11 01:27:48 +02:00
Sebastian Huber
77094f11b1 bsps/aarch64: Simplify I-cache invalidate 2024-10-11 01:27:48 +02:00
Sebastian Huber
cfd885850a bsps/aarch64: Use fatal error for data cache disable
On the Cortex-A cores, at least the L1 data cache is required to provide
support for atomic operations.

Update #5050.
2024-10-11 01:27:48 +02:00
Sebastian Huber
3fd063159d dev/irq: Simplify SMP GIC initialization
There is no need to wait on secondary processors for the GIC distributor
enable since the BSPs for real targets start the secondary processors
in _CPU_SMP_Start_processor().
2024-10-11 01:27:48 +02:00
Sebastian Huber
f43042cd06 bsps: Move <bsp/linker-symbols.h> to shared
Move architecture-independent items to a shared <bsp/linker-symbols.h>.
Allow architectures to customize it through <bsp/linker-symbols-arch.h>.
2024-10-11 01:27:48 +02:00
Sebastian Huber
42c6f727d6 dev/irq: Remove arm_gic_irq_generate_software_irq()
Replace uses with API calls.
2024-10-11 01:27:48 +02:00
Sebastian Huber
5a962e3bb7 arm/aarch64: Optimize _CPU_SMP_Send_interrupt()
Avoid superfluous error checks.
2024-10-11 01:27:48 +02:00
Sebastian Huber
5ff5bd3c10 aarch64: More robust SMP system start
In SMP configurations, check that we run on a configured processor.  If not,
then there is not much that can be done since we do not have a stack available
for this processor.  Just loop forever in this case.  Do this in assemlby to
ensure that no stack memory is used.
2024-10-11 01:27:48 +02:00
Sebastian Huber
1524b5f923 aarch64/xilinx-zynqmp: Move get I2C clocks
Not all applications use I2C.
2024-10-11 01:27:48 +02:00
Sebastian Huber
f630be8933 aarch64/xilinx-zynqmp: Simplify startup
There is no need to copy sections since the linker command file has no separate
runtime and load regions for the sections.
2024-10-11 01:27:48 +02:00
Sebastian Huber
8db6a45009 bsps: Assembly implementation for PSCI bsp_reset()
Avoid issues with potential dead code after the secure monitor or
hypervisor call.
2024-10-11 01:27:48 +02:00
Sebastian Huber
a8d3efe4b0 dev/irq: Simplify GICv2 set/get affinity 2024-10-11 01:27:48 +02:00
Sebastian Huber
07217e3f5c bsps/aarch64: Customize EL2/EL3 start support
Make the support for starting in EL2/EL3 customizable.  A boot loader or
the Arm Trusted Firmware should start RTEMS in non-secure EL1 mode.

In start.S, use local labels.

For the aarch64/xilinx-zynqmp the support for starting in EL2/EL3 is
disabled by default.  For the Qemu xlnx-zcu102 machine, the default is
to start in non-secure EL1 mode.  This can be controlled by options, for
example "-machine xlnx-zcu102,secure=on,virtualization=on".
2024-10-11 01:27:44 +02:00
Sebastian Huber
dd3bc5bfb7 bsps: Remove superfluous include 2024-10-08 00:30:54 +02:00
Sebastian Huber
c388c3d19e bsps/arm: Add missing GICv3 distributor registers 2024-10-08 00:30:54 +02:00
Christian Mauderer
98f2ae3449 bsps/arm/beagle: Remove README.md and old script
The information from the README.md have been merged into the
documentation.

The necessary tools for the sdcard.sh are quite tricky to build. All
necessary information to create an SD image are in the documentation
already. So the script isn't necessary any more.

Update #5088
2024-10-05 19:29:15 +00:00
Kinsey Moore
85ccfe24bf bsps/aarch64/mmu: Align dynamically mapped blocks
Dynamically mapped blocks must be aligned to the MMU page size just like
startup-configured blocks. This was not being enforced and could cause a
hang with bad input.
2024-10-04 13:25:42 +00:00
Sebastian Huber
9624b31408 arm/xilinx-zynqmp-rpu: Implement bsp_reset() 2024-10-02 05:36:00 +02:00
Sebastian Huber
75062c2dbf arm/xilinx-zynqmp-rpu: Simplify MPU configuration
Use the PMSAv7 support from <rtems/score/armv7-pmsa.h> instead of the
one from the Xilinx support.
2024-10-02 05:36:00 +02:00
Sebastian Huber
dddbdf4d9a arm/xilinx-zynqmp-rpu: Add split mode BSP variants
Rename xilinx_zynqmp_rpu BSP variant to zynqmp_rpu_lock_step to
emphasize that this BSP is for the lock-step mode RPU configuration.
Add BSP variants zynqmp_rpu_split_0 and zynqmp_rpu_split_1 for the split
mode RPU configuration for core 0 and 1 respectively.
2024-10-02 05:35:47 +02:00
Sebastian Huber
5f1a9d3346 arm/xilinx-zynqmp-rpu: Simplify startup
There is no need to copy sections since the linker command file has no separate
runtime and load regions for the sections.
2024-10-02 05:24:30 +02:00
Sebastian Huber
1b2ebe1516 arm/xilinx-zynqmp-rpu: Remove superfluous defines 2024-10-02 05:24:30 +02:00
Sebastian Huber
a78d31de7f arm/xilinx-zynqmp-rpu: Fix file header and copyrights
Remove copyright from DornerWorks since the files contain not contributions
from this company.  Fix the copyright years of the embedded brains
contributions.
2024-10-02 05:24:30 +02:00
Sebastian Huber
c4a5dfeb5d arm/xilinx-zynqmp-rpu: Include standard header 2024-10-02 05:24:30 +02:00
Sebastian Huber
ddef4ed1b0 dev/irq: Conditionally enable GIC get/set group 2024-10-02 05:24:30 +02:00
Sebastian Huber
a947bba9df dev/irq: Add BSP_IRQ_HAVE_GET_SET_AFFINITY
Allow BSPs to provide the interrupt get/set affinity implementation even for
non-SMP configurations.
2024-10-02 05:24:30 +02:00