Skip to content

Conversation

JiafeiPan
Copy link
Contributor

  1. Enabled DMA noncoherent for GIC v3 and GIC v3 ITS
  2. Fixed some bugs for GIC v3 ITS
  3. Enabled GIC ITS on i.MX 95 EVK A55 platform
  4. Added i.MX 95 EVK support for test arm64_gicv3_its

GIC redistributor on Some platform are connected to a non-coherent
downstream interconnect, it need to use Non-cahable and Non-shareable
access atttributes to access external memory. And also flush the
data cache after CPU update related memory.

Signed-off-by: Jiafei Pan <[email protected]>
@@ -73,4 +73,13 @@ config GIC_SAFE_CONFIG
crash the OS has already been started. With this enabled, it will bypass
GIC distributor configuration if it has been configured by other OS.

config GIC_V3_RDIST_DMA_NONCOHERENT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to use a new properity 'dma-noncoherent' in GIC and ITS DT node to indicate this hardware feature respectively instead of a CONFIG entry, just like GICv3/ITS driver in Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to use kconfig to make the code to be static includable but not checking properties at runtime in order to reduce the resource usage. thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per your suggestion, added a new kconfig GIC_V3_ITS_DMA_NONCOHERENT for ITS driver, so that GIC redistribute and ITS could configure dma coherent separately, thanks.

@JiafeiPan JiafeiPan force-pushed the develop/imx95-netc-gic branch from eb1aab7 to 6d877ca Compare July 25, 2025 09:09
@JiafeiPan JiafeiPan requested a review from Zhiqiang-Hou July 25, 2025 09:11
Add DMA noncoherent support on GICv3 ITS driver.

Signed-off-by: Jiafei Pan <[email protected]>
For RDbase used by its command, When GITS_TYPER.PTA = 1, physicall address
is used, the RDbase field consist of bits[51:16] of the address, so need
to left shift the address by 16 bits. But when GITS_TYPER.PTA = 0, PE
number is used, no need to shit anymore.

Signed-off-by: Jiafei Pan <[email protected]>
GIC v3 ITS is initialized in pre-kernel stage in which sleep function
can't work yet, so use busy delay in pre-kernel stage and use sleep
delay in post-kernel stage.

Signed-off-by: Jiafei Pan <[email protected]>
Enlarge the memory size to 10M bytes as it is not enough if run some
networking application.

Signed-off-by: Jiafei Pan <[email protected]>
Added dts node for GIC v3 ITS.

Signed-off-by: Jiafei Pan <[email protected]>
In case of ITS is enabled, need to include LPI in the total number
of irq.

Signed-off-by: Jiafei Pan <[email protected]>
GIC redistribute and ITS on i.MX 95 is DMA noncoherent, so enable
CONFIG_GIC_V3_RDIST_DMA_NONCOHERENT and CONFIG_GIC_V3_GIC_DMA_NONCOHERENT.

Signed-off-by: Jiafei Pan <[email protected]>
GIC ITS depends on kernel heap, so move GIC initialize to be behind of
heap which initialization priority is CONFIG_KERNEL_INIT_PRIORITY_OBJECTS
(it is 30 by default).

MU mailbox and SCMI objects depend on GIC, so set their init priority
to be same with GIC, the initialization sequence decided by the dts
dependency although they use the same init priority.

Signed-off-by: Jiafei Pan <[email protected]>
Add imx95_evk support, as hardware limication, it only has 832 LPIs.

Signed-off-by: Jiafei Pan <[email protected]>
Copy link

Copy link
Contributor

@Zhiqiang-Hou Zhiqiang-Hou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@dleach02 dleach02 assigned carlocaione and JiafeiPan and unassigned carlocaione Jul 29, 2025
@fabiobaltieri fabiobaltieri merged commit 8bdd114 into zephyrproject-rtos:main Jul 29, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants