mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3 1/2] ARM: mmu64: allow to disable null pointer trap on zero page
Date: Thu, 22 Oct 2020 09:31:19 +0200	[thread overview]
Message-ID: <20201022073119.GN26805@pengutronix.de> (raw)
In-Reply-To: <20201021145140.597728-1-m.tretter@pengutronix.de>

On Wed, Oct 21, 2020 at 04:51:39PM +0200, Michael Tretter wrote:
> Barebox uses the zero page to trap NULL pointer dereferences. However,
> if the SDRAM starts at address 0x0, this makes the first page of the
> SDRAM inaccessible and makes it impossible to load images to offset 0x0
> in the SDRAM.
> 
> Trapping NULL pointer dereferences on such systems is still desirable.
> Therefore, add a function to disable the traps if accessing the zero
> page is necessary and to re-enable the traps after the access is done.
> 
> The zero_page_memcpy function simplifies copying to the SDRAM, because
> this is the most common required functionality, but memtest also
> accesses the zero page and does not use memcpy.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      parent reply	other threads:[~2020-10-22  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 14:51 Michael Tretter
2020-10-21 14:51 ` [PATCH v3 2/2] uimage: disable zero page when loading to SDRAM at address 0x0 Michael Tretter
2020-10-22  7:31 ` Sascha Hauer [this message]

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=20201022073119.GN26805@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.tretter@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