All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
	Jason Cooper <jason@lakedaemon.net>,
	devicetree@vger.kernel.org,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Will Deacon <will.deacon@arm.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Rob Herring <robh+dt@kernel.org>, Victor Gu <xigu@marvell.com>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH] arm64: dts: marvell: armada-37xx: reserve memory for ATF
Date: Mon, 23 Apr 2018 17:15:59 +0200	[thread overview]
Message-ID: <20180423171559.53bcc2d9@xps13> (raw)
In-Reply-To: <20180423144940.64fa884d@windsurf>

Hi Thomas,

On Mon, 23 Apr 2018 14:49:40 +0200, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Mon, 23 Apr 2018 10:31:27 +0200, Miquel Raynal wrote:
> 
> > > Shouldn't this be done automatically by the bootloader, before passing
> > > the DTB to the kernel ?    
> > 
> > I am working with a 2017.09 mainline U-Boot.
> > 
> > I did not know the bootloader was supposedly in charge of that.  
> 
> I thought it should be the case, but I indeed see nothing in U-Boot
> that does that, except for OMAP2 platforms.
> 
> > But what if it fails doing it?  
> 
> Well if something fails in the boot process, the platform fails to boot.
> I find this question a bit weird/silly. It's like "and what if the user
> used the wrong DT for the wrong platform ?"

Sorry, I meant "what if the bootloader does not do it?", in other
words: currently the bootloader does not do it, let's assume it should,
shall we take into account that it does not and add this code to Linux
too, or shall we say to people "upgrade your bootloader/ATF"? But from
the rest of your answer I assume the latter is the right approach.

> 
> > Fixing the bootloader is one thing, I assume very few people would
> > update it. Is it worth keeping this in Linux DT?  
> 
> The issue I see with having this in the Linux DT is that depending on
> the bootloader, the memory area that is used to keep the PSCI firmware
> may very well be different. It's really not a property of the HW
> itself, but a pure software choice of the bootloader. For example, are
> you sure the mainline U-Boot puts the PSCI firmware at the same place
> as the vendor U-Boot ?
> 
> What are other platforms doing to solve this problem ?

I will also check if it is actually U-Boot or ATF choice. My
understanding is that ATF's handle the PSCI firmware but U-Boot should
propagate a reserved node (for this firmware) in Linux's DTB. Let me
check all of that.

> 
> Best regards,
> 
> Thomas


Thanks,
Miquèl

-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: miquel.raynal@bootlin.com (Miquel Raynal)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: marvell: armada-37xx: reserve memory for ATF
Date: Mon, 23 Apr 2018 17:15:59 +0200	[thread overview]
Message-ID: <20180423171559.53bcc2d9@xps13> (raw)
In-Reply-To: <20180423144940.64fa884d@windsurf>

Hi Thomas,

On Mon, 23 Apr 2018 14:49:40 +0200, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Mon, 23 Apr 2018 10:31:27 +0200, Miquel Raynal wrote:
> 
> > > Shouldn't this be done automatically by the bootloader, before passing
> > > the DTB to the kernel ?    
> > 
> > I am working with a 2017.09 mainline U-Boot.
> > 
> > I did not know the bootloader was supposedly in charge of that.  
> 
> I thought it should be the case, but I indeed see nothing in U-Boot
> that does that, except for OMAP2 platforms.
> 
> > But what if it fails doing it?  
> 
> Well if something fails in the boot process, the platform fails to boot.
> I find this question a bit weird/silly. It's like "and what if the user
> used the wrong DT for the wrong platform ?"

Sorry, I meant "what if the bootloader does not do it?", in other
words: currently the bootloader does not do it, let's assume it should,
shall we take into account that it does not and add this code to Linux
too, or shall we say to people "upgrade your bootloader/ATF"? But from
the rest of your answer I assume the latter is the right approach.

> 
> > Fixing the bootloader is one thing, I assume very few people would
> > update it. Is it worth keeping this in Linux DT?  
> 
> The issue I see with having this in the Linux DT is that depending on
> the bootloader, the memory area that is used to keep the PSCI firmware
> may very well be different. It's really not a property of the HW
> itself, but a pure software choice of the bootloader. For example, are
> you sure the mainline U-Boot puts the PSCI firmware at the same place
> as the vendor U-Boot ?
> 
> What are other platforms doing to solve this problem ?

I will also check if it is actually U-Boot or ATF choice. My
understanding is that ATF's handle the PSCI firmware but U-Boot should
propagate a reserved node (for this firmware) in Linux's DTB. Let me
check all of that.

> 
> Best regards,
> 
> Thomas


Thanks,
Miqu?l

-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-04-23 15:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-21 14:03 [PATCH] arm64: dts: marvell: armada-37xx: reserve memory for ATF Miquel Raynal
2018-04-21 14:03 ` Miquel Raynal
2018-04-21 14:18 ` Thomas Petazzoni
2018-04-21 14:18   ` Thomas Petazzoni
2018-04-23  8:31   ` Miquel Raynal
2018-04-23  8:31     ` Miquel Raynal
2018-04-23 12:49     ` Thomas Petazzoni
2018-04-23 12:49       ` Thomas Petazzoni
2018-04-23 15:15       ` Miquel Raynal [this message]
2018-04-23 15:15         ` Miquel Raynal

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=20180423171559.53bcc2d9@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=nadavh@marvell.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=will.deacon@arm.com \
    --cc=xigu@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.