Skip to content

Remove git_cpu_init() - #6506

Merged
jforissier merged 15 commits into
OP-TEE:masterfrom
jenswikl:rem_git_cpu_init
Dec 14, 2023
Merged

Remove git_cpu_init()#6506
jforissier merged 15 commits into
OP-TEE:masterfrom
jenswikl:rem_git_cpu_init

Conversation

@jenswikl

Copy link
Copy Markdown
Contributor

@Amit-Radur, @b49020, @ChiaweiW, @clementfaure, @ememarar, @etienne-lms, @glneo, @grandpaul, @GseoC, @lorc, @MrVan, @Neal-liu, @pangupta, @sahilnxp, @sdininno

Please check and ack your platforms. One difference for many platforms is that we rely on TF-A or the previous boot stage to initialize the GIC. I assume some unintended copy & paste error has led most platforms to reinitialize the GIC. If I'm wrong in that assumption, we'll see how we can fix it.

@lorc lorc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For rcar platform:

Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

@etienne-lms etienne-lms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> for commits
"plat-stm: use gic_init_per_cpu()",
"plat-stm32mp1: use gic_init_per_cpu()",
"plat-stm32mp2: use gic_init_per_cpu()" and
"core: remove unused deprecated gic_cpu_init()"
with imperative mode in commit messages :)

@glneo

glneo commented Nov 29, 2023

Copy link
Copy Markdown
Contributor

Seems fine, but while testing I ran into a panic() on plat-k3, seems to be caused by a different GIC cleanup:

#6394 (comment)

@ChiaweiW

ChiaweiW commented Nov 30, 2023

Copy link
Copy Markdown

For aspeed platform:

Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>

@jenswikl

Copy link
Copy Markdown
Contributor Author

@glneo, I'm trying to address the issue you mention in #6516

@clementfaure

Copy link
Copy Markdown

I got a crash at boot on old ARMv7 platforms imx-mx6qsabresd

2023-11-30T15:30:43 E/TC:0 0 assertion 'vers == 2' failed at core/drivers/gic.c:469 <gic_init_base_addr>
2023-11-30T15:30:43 E/TC:0 0 Panic at core/kernel/assert.c:28 <_assert_break>
2023-11-30T15:30:43 E/TC:0 0 TEE load address @ 0x14000000
2023-11-30T15:30:43 E/TC:0 0 Call stack:
2023-11-30T15:30:43 E/TC:0 0  0x140039d9
2023-11-30T15:30:43 E/TC:0 0  0x1400c439
2023-11-30T15:30:43 E/TC:0 0  0x14009c03
2023-11-30T15:30:43 E/TC:0 0  0x14008b7b
2023-11-30T15:30:43 E/TC:0 0  0x14009001
2023-11-30T15:30:43 E/TC:0 0  0x14003683
2023-11-30T15:30:43 E/TC:0 0  0x140001fc

I will have a look at it tomorrow

@clementfaure

clementfaure commented Nov 30, 2023

Copy link
Copy Markdown

Actually, the issue comes from this commit : 69171be where vers = 1 on imx6qsabresd. Cortex-A9 i.MX platforms feature GICv1.

@jenswikl

jenswikl commented Dec 1, 2023

Copy link
Copy Markdown
Contributor Author

@glneo and @clementfaure does the updated #6516 fix your issues?

@clementfaure

clementfaure commented Dec 1, 2023

Copy link
Copy Markdown

@jenswi-linaro Yes, I can boot the board now (imx8qmmek was also affected).

@sahilnxp

sahilnxp commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

I was getting the panic while booting on LX2160A-RDB platforms with this pull request.
But after #6516 is merged, board is booting fine.

For commit: plat-ls: use gic_init_per_cpu()
Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>

Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
@jenswikl

jenswikl commented Dec 5, 2023

Copy link
Copy Markdown
Contributor Author

Rebased on master to get the fix from #6516, tags applied and commit messages updated to use imperative mood.

@jenswikl

jenswikl commented Dec 5, 2023

Copy link
Copy Markdown
Contributor Author

A few commits still miss an A-B or R-B tag. I think we can wait a little longer before merging.

@glneo

glneo commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

For plat-k3: Tested-by: Andrew Davis <afd@ti.com>

For the plat-ti it looks good (not sure if this actually changes anything, so not sure it could break anything), but I haven't gotten around to testing, only a visual code review: Reviewed-by: Andrew Davis <afd@ti.com>

@b49020

b49020 commented Dec 6, 2023

Copy link
Copy Markdown
Member

For plat-rzn1: Acked-by: Sumit Garg <sumit.garg@linaro.org>

@jenswikl

jenswikl commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author

Tags applied. A few commits are still missing tags, but perhaps this is as good as it gets.

@clementfaure

Copy link
Copy Markdown

Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6qsabresd, imx-mx6ulevk, imx-mx8qmmek, imx-mx8mnevk)

Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init()

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6qsabresd, imx-mx6ulevk, imx-mx8qmmek, imx-mx8mnevk)
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Andrew Davis <afd@ti.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Andrew Davis <afd@ti.com>
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Remove the unused deprecated function gic_cpu_init().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
@jenswikl

jenswikl commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author

Tag applied.

@jenswikl

Copy link
Copy Markdown
Contributor Author

No more progress on tags now. Perhaps this is as good as it gets.

@jforissier

Copy link
Copy Markdown
Contributor

No more progress on tags now. Perhaps this is as good as it gets.

Yes, I am merging this now. Thanks.

@jforissier
jforissier merged commit fc4adc6 into OP-TEE:master Dec 14, 2023
@jenswikl
jenswikl deleted the rem_git_cpu_init branch December 14, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants