mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Denis OSTERLAND <denis.osterland@diehl.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH v2] hab: Print events on info command.
Date: Fri, 12 Oct 2018 08:23:15 +0200	[thread overview]
Message-ID: <f20161e0-4c3b-9cd1-539b-dfd444085e24@pengutronix.de> (raw)
In-Reply-To: <20181010075129.u67xfq247pmn7sfb@pengutronix.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 1409 bytes --]

On 10/10/2018 09:51 AM, Sascha Hauer wrote:
>> +static inline int hab_get_status(void)
>> +{
>> +	if (IS_ENABLED(CONFIG_MMU))
>> +		return -EIO;
> 
> This restriction makes this patch rather unhandy to use. Internally we
> use imx*_hab_get_status() indeed with MMU enabled and it works fine, but
> we call it before mmu_init is called. In this state the MMU is enabled
> already, but the zero page is not yet set to faulting. So I think the
> problem is not the MMU as such, but instead the faulting zero page.

BTW:

The faulting zero page problem doesn't occur on mx25 and mx28 as the HAB
ROM doesn't live at 0x0:

#define HABV4_RVT_IMX28 0xffff8af8

int imx25_hab_get_status(void)
{
        return imx_habv3_get_status(readl(IOMEM(0x780018d4)));
}

> It would be great if we could overcome this issue. One way to do this
> would be to add a function pair mmu_zero_page_map() and
> mmu_zero_page_set_faulting() to be called in hab_get_status().
> 
> I don't know if you are willing to add that, but I don't want to
> motivate people to disable the MMU, so the patch is not acceptable as
> is.
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-10-12  6:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04  7:05 [PATCH] " Denis OSTERLAND
2018-10-04 21:14 ` Andrey Smirnov
2018-10-05  6:58 ` [PATCH v2] " Denis OSTERLAND
2018-10-10  7:51   ` Sascha Hauer
2018-10-10  9:29     ` Denis OSTERLAND
2018-10-12  6:23     ` Marc Kleine-Budde [this message]
2018-10-15  8:41       ` Denis OSTERLAND
2018-10-15  8:46         ` Marc Kleine-Budde

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=f20161e0-4c3b-9cd1-539b-dfd444085e24@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=denis.osterland@diehl.com \
    --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