On Wed, Jun 26, 2019 at 09:31:14AM +0200, Sascha Hauer wrote: > On Wed, Jun 26, 2019 at 06:58:42AM +0200, Rouven Czerwinski wrote: > > The HAB interface for i.MX8MQ only implements the retrieval of status > > and events. The SoC status is retrieved using the TF-A SIP API found in > > the downstream imx TF-A. After calling into the TF-A the passed data > > structures need to be invalidated, since otherwise the cached zero value > > is used. > > Currently the TF-A report event call only supports FAILURE events. > > Testing the TF-A with other event types resulted in a freeze in the > > bootrom code, which was not investigated further. > > We instead walk the memory containing the events and retrieve the events > > ourselves. They are exposed using the same API. > > > > Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx> > > --- > > +{ > > + return habv4_get_status(&hab_smc_ops); > > +} > > + > > +static int init_imx8_hab_get_status(void) > > +{ > > + int ret = 0; > > + > > + if (cpu_is_mx8mq()) > > + ret = imx8_hab_get_status(); > > + else > > + return 0; > > + > > + /* > > + * Nobody will check the return value if there were HAB errors, but the > > + * initcall will fail spectaculously with a strange error message. > > + */ > > + if (ret == -EPERM) > > + return 0; > > Maybe just ignore the return value of imx8_hab_get_status() completely > and just add a comment that this is called for error printing only here? This was probably copied from the i.MX6 HAB implementation, feel free to change it there too. - Roland -- Roland Hieber | r.hieber@xxxxxxxxxxxxxx | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox