mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org,
	Rouven Czerwinski <r.czerwinski@pengutronix.de>
Subject: Re: [PATCH 01/13] hab: implement interface for i.MX8MQ
Date: Wed, 26 Jun 2019 12:26:26 +0200	[thread overview]
Message-ID: <20190626102626.vd7joceic5oaro7x@pengutronix.de> (raw)
In-Reply-To: <20190626073114.2ckfwxnueymn75hx@pengutronix.de>

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@pengutronix.de>
> > ---
> > +{
> > +	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@pengutronix.de     |
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-06-26 10:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26  4:58 [PATCH 00/13] HAB " Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 01/13] hab: implement interface " Rouven Czerwinski
2019-06-26  7:31   ` Sascha Hauer
2019-06-26 10:26     ` Roland Hieber [this message]
2019-06-26  4:58 ` [PATCH 02/13] mach-imx: enable HAB on i.MX8MQ Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 03/13] arm: lib: add CSF section between PBL and piggy Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 04/13] esdhc-pbl: extract header parsing from image start Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 05/13] esdhc-pbl: add piggy load function Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 06/13] sections: fix macro for barebox_pbl_size Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 07/13] scripts: imx: support signing for i.MX8MQ Rouven Czerwinski
2019-06-26  7:51   ` Sascha Hauer
2019-07-02  5:47     ` Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 08/13] images: always build sha256sum into pbl Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 09/13] pbl: add sha256 and piggy verification to PBL Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 10/13] arm: uncompress: verify sha256 if enabled Rouven Czerwinski
2019-06-26  7:52   ` Sascha Hauer
2019-07-01  6:19     ` Rouven Czerwinski
2019-07-01  6:45       ` Sascha Hauer
2019-06-26  4:58 ` [PATCH 11/13] mach-imx: add gencsf header for i.MX8MQ Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 12/13] mach-imx: hab: select piggy verification for i.MX8 Rouven Czerwinski
2019-06-26  4:58 ` [PATCH 13/13] boards: nxp-mx8-evk: rework to different boot flow Rouven Czerwinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190626102626.vd7joceic5oaro7x@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=r.czerwinski@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox