linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Roy Pledge <roy.pledge@nxp.com>
Cc: Rob Herring <robh@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: of_reserved_mem()/kexec interaction
Date: Tue, 2 Apr 2019 11:14:25 +0100	[thread overview]
Message-ID: <f48b0010-a136-48a4-bfc7-7bbaf91b4da9@arm.com> (raw)
In-Reply-To: <DB6PR0402MB2727C7111A5BDBB07F05E29886550@DB6PR0402MB2727.eurprd04.prod.outlook.com>

Hi Roy,

On 01/04/2019 20:09, Roy Pledge wrote:
> I'm trying to understand if memory reserved in the device tree via the
> "reserved-memory" facility is preserved during a kexec system call,
> i.e., is the memory at the same location with the contents undisturbed
> when the new kernel starts?

If the reservation is a static-allocation (so the address appears in the DT) then the new
kernel should know this is reserved too, and not touch it.

If its a dynamic-allocation, the address isn't in the DT, so the new kernel can't know. It
will dynamically allocate a new reservation, which may be in a different place. If the
data didn't matter at the first-boot, it probably doesn't matter over subsequent kexec either.

As an outlier: the gic has some funny requirements around this. It needs to dynamically
allocate a page during first-boot that is preserved over kexec. It does this using
efi_mem_reserve_persistent().


Thanks,

James

      reply	other threads:[~2019-04-02 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 19:09 of_reserved_mem()/kexec interaction Roy Pledge
2019-04-02 10:14 ` James Morse [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=f48b0010-a136-48a4-bfc7-7bbaf91b4da9@arm.com \
    --to=james.morse@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=roy.pledge@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).