Subject: Cache Maintenance For SiP buffers
Hi,
I was looking at imx_hab_handler, which forwards calls into the BootROM on i.MX SoCs in response to secure monitor calls. The BootROM call (and thus the SiP call) accepts two pointers as arguments, where it writes data.
The plat/imx/imx8m/imx8m*/imx8m*_bl31_setup.c files map the RAM as MT_MEMORY | MT_RW, which would mean that not only is it writable from TF-A side, but it's also mapped cacheable.
I see no explicit cache maintenance in the i.MX SiP code for these two pointer arguments and haven't been successful to find where in TF-A core code if at all, complete D-Cache is flushed on SMC exit. Therefore I ask:
- Don't shared non-secure memory buffers between EL3 and lower EL
require explicit cache maintenance?
Did I miss the place where this cache maintenance is done?
How did it work so far? barebox does explicit flushing before HAB SiP, invalidation after. U-Boot doesn't do cache maintenance. Both apparently work...
You can refer to the docs/plat/imx8m.rst HAB section. ^_^. RAM is the OCRAM, it is not used in the HAB SiP call for write data buffer.
BR
Thanks, Ahmad
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.p/ engutronix.de%2F&data=05%7C01%7Cping.bai%40nxp.com%7Cea7764cf9a6 740455e8908dbaef6c63e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7 C0%7C638296147136416454%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000% 7C%7C%7C&sdata=eod8jkwJF0ro%2F3F4IRYG2EXpNitykisnag1IwQMJtv8%3D &reserved=0 | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |