linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes
@ 2016-06-07  8:37 Lee Jones
  2016-06-07  8:50 ` [STLinux Kernel] " Peter Griffin
  2016-06-17  9:56 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Lee Jones @ 2016-06-07  8:37 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, patrice.chotard, arnd, Lee Jones

This patch fixes a non-booting issue in Mainline.

When booting with a compressed kernel, we need to be careful how we
populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
in multi-arch enabled configurations, which place some restrictions on
where the kernel is placed and where it will be uncompressed to on boot.

AUTO_ZRELADDR takes the decompressor code's start address and masks out
the bottom 28 bits to obtain an address to uncompress the kernel to
(thus a load address of 0x42000000 means that the kernel will be
uncompressed to 0x40000000 i.e. DDR START on this platform).

Even changing the load address to after the co-processor's shared memory
won't render a booting platform, since the AUTO_ZRELADDR algorithm still
ensures the kernel is uncompressed into memory shared with the first
co-processor (0x40000000).

Another option would be to move loading to 0x4A000000, since this will
mean the decompressor will decompress the kernel to 0x48000000. However,
this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of
memory would essentially be wasted for no good reason.

Until we can work with ST to find a suitable memory location to
relocate co-processor shared memory, let's disable the shared memory
nodes.  This will ensure a working platform in the mean time.

NB: The more observant of you will notice that we're leaving the DMU
shared memory node enabled; this is because a) it is the only one in
active use at the time of this writing and b) it is not affected by
the current default behaviour which is causing issues.

Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory)
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/stih407-family.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi
index ad8ba10..d294e824 100644
--- a/arch/arm/boot/dts/stih407-family.dtsi
+++ b/arch/arm/boot/dts/stih407-family.dtsi
@@ -24,18 +24,21 @@
 			compatible = "shared-dma-pool";
 			reg = <0x40000000 0x01000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		gp1_reserved: rproc@41000000 {
 			compatible = "shared-dma-pool";
 			reg = <0x41000000 0x01000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		audio_reserved: rproc@42000000 {
 			compatible = "shared-dma-pool";
 			reg = <0x42000000 0x01000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		dmu_reserved: rproc@43000000 {
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [STLinux Kernel] [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes
  2016-06-07  8:37 [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes Lee Jones
@ 2016-06-07  8:50 ` Peter Griffin
  2016-06-17  9:56 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Griffin @ 2016-06-07  8:50 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, kernel, arnd

On Tue, 07 Jun 2016, Lee Jones wrote:

> This patch fixes a non-booting issue in Mainline.
> 
> When booting with a compressed kernel, we need to be careful how we
> populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
> in multi-arch enabled configurations, which place some restrictions on
> where the kernel is placed and where it will be uncompressed to on boot.
> 
> AUTO_ZRELADDR takes the decompressor code's start address and masks out
> the bottom 28 bits to obtain an address to uncompress the kernel to
> (thus a load address of 0x42000000 means that the kernel will be
> uncompressed to 0x40000000 i.e. DDR START on this platform).
> 
> Even changing the load address to after the co-processor's shared memory
> won't render a booting platform, since the AUTO_ZRELADDR algorithm still
> ensures the kernel is uncompressed into memory shared with the first
> co-processor (0x40000000).
> 
> Another option would be to move loading to 0x4A000000, since this will
> mean the decompressor will decompress the kernel to 0x48000000. However,
> this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of
> memory would essentially be wasted for no good reason.
> 
> Until we can work with ST to find a suitable memory location to
> relocate co-processor shared memory, let's disable the shared memory
> nodes.  This will ensure a working platform in the mean time.
> 
> NB: The more observant of you will notice that we're leaving the DMU
> shared memory node enabled; this is because a) it is the only one in
> active use at the time of this writing and b) it is not affected by
> the current default behaviour which is causing issues.
> 
> Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory)
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  arch/arm/boot/dts/stih407-family.dtsi | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by Peter Griffin <peter.griffin@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes
  2016-06-07  8:37 [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes Lee Jones
  2016-06-07  8:50 ` [STLinux Kernel] " Peter Griffin
@ 2016-06-17  9:56 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2016-06-17  9:56 UTC (permalink / raw)
  To: Lee Jones, linux-arm-kernel, linux-kernel, arnd, Olof Johansson
  Cc: kernel, patrice.chotard

On 06/07/2016 10:37 AM, Lee Jones wrote:
> This patch fixes a non-booting issue in Mainline.
>
> When booting with a compressed kernel, we need to be careful how we
> populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
> in multi-arch enabled configurations, which place some restrictions on
> where the kernel is placed and where it will be uncompressed to on boot.
>
> AUTO_ZRELADDR takes the decompressor code's start address and masks out
> the bottom 28 bits to obtain an address to uncompress the kernel to
> (thus a load address of 0x42000000 means that the kernel will be
> uncompressed to 0x40000000 i.e. DDR START on this platform).
>
> Even changing the load address to after the co-processor's shared memory
> won't render a booting platform, since the AUTO_ZRELADDR algorithm still
> ensures the kernel is uncompressed into memory shared with the first
> co-processor (0x40000000).
>
> Another option would be to move loading to 0x4A000000, since this will
> mean the decompressor will decompress the kernel to 0x48000000. However,
> this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of
> memory would essentially be wasted for no good reason.
>
> Until we can work with ST to find a suitable memory location to
> relocate co-processor shared memory, let's disable the shared memory
> nodes.  This will ensure a working platform in the mean time.
>
> NB: The more observant of you will notice that we're leaving the DMU
> shared memory node enabled; this is because a) it is the only one in
> active use at the time of this writing and b) it is not affected by
> the current default behaviour which is causing issues.
>
> Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory)
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   arch/arm/boot/dts/stih407-family.dtsi | 3 +++
>   1 file changed, 3 insertions(+)
>
>

That sounds reasonable:
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>

Arnd, Olof, can you pick this patch directly in -rc fixes,
as it prevents STi boards to boot correctly?

Thanks in advance,
Maxime

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-17  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07  8:37 [PATCH] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes Lee Jones
2016-06-07  8:50 ` [STLinux Kernel] " Peter Griffin
2016-06-17  9:56 ` Maxime Coquelin

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).