Commit Graph

95 Commits

Author SHA1 Message Date
Joel Sherrill
d6ebf4067e bsps/shared/*: Change license to BSD-2
Updates #3053.
2022-06-15 12:35:18 -05:00
Sebastian Huber
0725b200e7 bsps: Add gicv3_get_attributes() 2022-04-06 09:48:52 +02:00
Sebastian Huber
d8b23fa488 bsps: Add gicv3_sgi_ppi_get_priority() 2022-04-06 09:48:52 +02:00
Sebastian Huber
f828ddd1a9 bsps: Add gicv3_sgi_ppi_set_priority() 2022-04-06 09:48:52 +02:00
Sebastian Huber
3026859d41 bsps: Move gicv3_init_cpu_interface()
Make the processor index a parameter.
2022-04-06 09:48:52 +02:00
Sebastian Huber
b3519336fd bsps: Move gicv3_init_dist()
Make the distributor register block a parameter.
2022-04-06 09:48:52 +02:00
Sebastian Huber
ea353b4bfa bsps: Add gicv3_sgi_ppi_disable() 2022-04-06 09:48:52 +02:00
Sebastian Huber
f74b120c24 bsps: Add gicv3_sgi_ppi_enable() 2022-04-06 09:48:52 +02:00
Sebastian Huber
42c806fc84 bsps: Add gicv3_sgi_ppi_is_enabled() 2022-04-06 09:48:52 +02:00
Sebastian Huber
be25de5ff8 bsps: Add gicv3_ppi_clear_pending() 2022-04-06 09:48:52 +02:00
Sebastian Huber
2e5b1312c8 bsps: Add gicv3_ppi_set_pending() 2022-04-06 09:48:52 +02:00
Sebastian Huber
518330069d bsps: Add gicv3_trigger_sgi() 2022-04-06 09:48:52 +02:00
Sebastian Huber
f10c551f54 bsps: Add gicv3_sgi_ppi_is_pending() 2022-04-06 09:48:52 +02:00
Sebastian Huber
9abcaaebc3 bsps: Add <dev/irq/arm-gicv3.h>
Separate the Interrupt Manager implementation from the generic Arm GICv3
support.  Move parts of the Arm GICv3 support into a new header file.  This
helps to support systems with a clustered structure in which multiple GICv3
instances are present.  For example, two clusters of two Cortex-R52 cores where
each cluster has a dedicated GICv3 instance.
2022-04-06 09:48:51 +02:00
Christian Mauderer
4a85ce8d6a bsps/shared: Manual file header clean up
Updates #4625.
2022-03-10 09:15:19 +01:00
Joel Sherrill
9bf813c5f1 bsps/shared/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:50 +01:00
Sebastian Huber
4e530464b0 bsps: Default to CPU counter benchmark timer
Most BSPs which used the stubbed benachmark timer provide a CPU counter.
All BSPs provide at least a stub CPU counter.  Simply use the benchmark
timer implementation using the CPU counter.
2022-01-15 19:49:41 +01:00
Gedare Bloom
6c36cb7a48 aarch64: always boot into EL1NS
Always start the executive in Exception Level 1, Non-Secure mode.
If we boot in EL3 Secure with GICv3 then we have to initialize
the distributor and redistributor to set up G1NS interrupts
early in the boot sequence before stepping down from EL3S to EL1NS.

Now there is no need to distinguish between secure and non-secure
world execution after the primary core boots, so get rid of the
AARCH64_IS_NONSECURE configuration option.
2022-01-12 09:00:19 -07:00
Gedare Bloom
63d27156cb arm/gicv3: refactor DIST initialization to helper 2022-01-12 09:00:19 -07:00
Kinsey Moore
670a5089e2 bsps/gicv2: Allow BSPs to define IRQ attributes
ARM's GICv2 is configurable and its attributes vary between
implementations including omission of specific interrupts. This allows
BSPs to accomodate those varying implementations with customized
attribute sets.
2021-09-21 08:58:32 -05:00
Chris Johns
691d0edd34 arm/xilinx: Fix zynq-uart interrupt receive
- Trigger on a single character entering the RX FIFO

- Disable the RX timeout

- Send up to a FIFO full of data
2021-09-16 11:11:13 +10:00
Stephen Clark
73c182a5ed bsps/zynq: Moved general i2c files to shared directories
Certain files related to the Zynq BSP's I2C driver are useable by the ZynqMP BSP as well.
Moved these files to shared directory in anticipation of I2C support for ZynqMP.
2021-09-09 14:19:57 -05:00
Sebastian Huber
c7b4eca7fa bsps/irq: bsp_interrupt_facility_initialize()
Do not return a status code in bsp_interrupt_facility_initialize() since this
leads to unreachable code in bsp_interrupt_initialize().  Use RTEMS_DEBUG
assertions in bsp_interrupt_facility_initialize() if necessary.
2021-07-27 10:03:19 +02:00
Sebastian Huber
fe6ce5ac9c bsps/irq: Implement new directives for GICv2/3
Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
85a378510d bsps/irq: bsp_interrupt_set_affinity()
Return a status code for bsp_interrupt_set_affinity().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
23ec04c48c bsps/irq: bsp_interrupt_get_affinity()
Return a status code for bsp_interrupt_get_affinity().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
32f5a195d7 bsps/irq: bsp_interrupt_vector_disable()
Return a status code for bsp_interrupt_vector_disable().

Update #3269.
2021-07-26 19:57:31 +02:00
Sebastian Huber
bc86a5fa84 bsps/irq: bsp_interrupt_vector_enable()
Return a status code for bsp_interrupt_vector_enable().

Update #3269.
2021-07-26 19:57:30 +02:00
Sebastian Huber
deb5afb2f2 bsps/irq: Add rtems_interrupt_is_pending()
Add a default implementation which just returns RTEMS_UNSATISFIED.

Update #3269.
2021-07-26 17:08:42 +02:00
Sebastian Huber
eebecd09fa bsps/irq: Add rtems_interrupt_get_attributes()
Add a default implementation which clears the attributes to zero and
just returns RTEMS_SUCCESSFUL for valid parameters.

Update #3269.
2021-07-26 17:08:42 +02:00
Sebastian Huber
9832652c53 bsps/irq: Add rtems_interrupt_raise()
Add rtems_interrupt_raise_on() and rtems_interrupt_clear().

Add a default implementation which just returns RTEMS_UNSATISFIED for
valid parameters.

Update #3269.
2021-07-26 07:54:25 +02:00
Sebastian Huber
781213f9ec bsps/irq: Add rtems_interrupt_vector_is_enabled()
Add a default implementation which just returns RTEMS_UNSATISFIED for
valid parameters.

Update #3269.
2021-07-26 07:54:25 +02:00
Sebastian Huber
f2b0877642 bsps: Fix GICv3 support for AArch32
The GICv3 support is shared between AArch32 and AArch64.  For AArch32,
the new AARCH64_IS_NONSECURE is never defined.  Use ARM_MULTILIB_ARCH_V4
instead.

This issue was introduced by 76c6caad52.

There is still a change in bsp_interrupt_vector_enable() for AArch32
compared to the version before 76c6caad52.
2021-06-30 16:28:52 +02:00
Kinsey Moore
26d61c8670 bsps/zynq-uart: Make post baud change kick global
The existing fix for the ZynqMP UART hardware bug only caught the vast
majority of instances where it could occur. To fully fix the data
corruption, this fix must be applied after every baud rate change. This
makes the logic reset and kick apply in any locations where the baud
rate could be changed.
2021-06-29 11:42:06 -05:00
Gedare Bloom
76c6caad52 bsps/aarch64: add non-secure mode and versal support 2021-06-24 09:37:31 -06:00
Gedare Bloom
bcad0aaee6 bsps/aarch64: add mnemonic for ICC_IGRPEN1_EL3 2021-06-24 09:37:31 -06:00
Sebastian Huber
523867de9d rtems: Constify rtems_task_wake_when()
Add a parameter to _TOD_Validate() to disable the validation of the
ticks member.

There are two reasons for this change.  Firstly, in
rtems_task_wake_when() was a double check for time_buffer == NULL (one
in rtems_task_wake_when() and one in _TOD_Validate()).  Secondly, the
ticks member is ignored by rtems_task_wake_when().  This was done with a
write of zero to the ticks member and thus a modification of the
user-provided structure.  Now the structure is no longer modified.
Using a mask parameter is quite efficient. You just have to load an
immediate value and there are no additional branches in _TOD_Validate().

Close #4406.
2021-05-12 21:25:37 +02:00
Frank Kühndel
3af2dc7802 _TOD_Validate(): Fix incorrect return code
This patch fixes bug #4403. Directives

* rtems_timer_fire_when()
* rtems_timer_server_fire_when()
* rtems_task_wake_when()

are documented to return RTEMS_INVALID_ADDRESS when their time-of-day
argument is NULL. But actually they return RTEMS_INVALID_CLOCK. To fix
the issue this patch changes _TOD_Validate() to return a
status code instead of just true/false.

Close #4403
2021-05-12 06:41:10 +02:00
Kinsey Moore
3ea43bc9e7 bsps/xilinx-zynqmp: Avoid constant UART reinit
Constantly reinitializing the Cadence UART on every character output
causes data corruption/loss on some ZynqMP hardware. Only initialize
the UART once for early output and give it a kick on startup.
2021-04-19 10:51:02 -05:00
Ryan Long
3cd58bdf2c disp_hcms29xx.c: Unused value (CID #1399752)
CID 1399752: Unused value in disp_hcms29xx_update_task().

Closes #4342
2021-04-08 17:58:19 -05:00
Jan Sommer
70667b5527 bsps/xilinx_zynq: Add SPI driver for xilinx-axi-spi
Updates #4321
2021-03-30 17:01:36 +02:00
Jan Sommer
cc825d0322 bsps/xilinx_zynq: Add SPI driver for cadence-spi
Updates #4320
2021-03-10 20:12:08 +01:00
Jan Sommer
6ebf376bf2 bsps/shared: Allow setting baud rate for zynq uart 2021-03-05 19:06:25 +01:00
Christian Mauderer
a434cc80cb bsps/shared: Adapt fsl-edma driver for imxrt
Note: The changes have been done with portability in mind. The driver
should (in theory) be able to replace the original one in the MPC BSPs
too. For full compatibility an adaption layer and especially a test
would be necessary. Because both are missing, don't integrate it into
the MPC BSP now.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
301bbc3a4d bsps/shared: Copy fsl-edma from mpc55xx
This is a preparation for making the driver universal.

Update #4180
2021-01-21 10:17:31 +01:00
Sebastian Huber
9f3a08ef2d bsps: Use header file for GIC architecture support
This avoids a function call overhead in the interrupt dispatching.

Update #4202.
2020-12-23 09:24:49 +01:00
Sebastian Huber
39ef7e5496 bsps: Fix includes
Update #4202.
2020-12-22 13:02:41 +01:00
Sebastian Huber
b5aceef5d9 bsps: Remove gicvx_interrupt_dispatch()
Avoid one level of indirection.

Update #4202.
2020-12-16 11:00:03 +01:00
Sebastian Huber
747fb65c6e bsps: Add GICv3 arm_gic_irq_processor_count()
Update #4202.
2020-12-16 11:00:03 +01:00
Kinsey Moore
9edca35dbe bsps/gicv3: Resolve build warnings on 64bit 2020-12-11 15:32:15 -06:00