Re: [PATCH] arm64: dts: marvell: armada_8k: reserve memory for ATF

2018-11-13 Thread Russell King - ARM Linux
On Tue, Nov 13, 2018 at 02:48:07PM +0100, Emmanuel Vadot wrote:
> Like 4436a371 for 37xx, reserve the PSCI area memory region so kernels
> can call the code there.
> Region address is taken from the ATF code [1] and is 2MiB aligned.
> 
> [1] plat/marvell/a8k/common/include/platform_def.h
> 
> Signed-off-by: Emmanuel Vadot 
> ---
>  arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 15 +++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi 
> b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> index 073610ac0a53..d8a79bb69de1 100644
> --- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
> @@ -23,6 +23,21 @@
>   spi0 = &spi0;
>   };
>  
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /*
> +  * The PSCI firmware region depicted below is the default one
> +  * and should be updated by the bootloader.
> +  */
> + psci-area@400 {
> + reg = <0 0x400 0 0x20>;
> + no-map;
> + };
> + };

Does this really apply to everything?  I'm not sure it does.
If I look at a memory dump from the Macchiatobin, I see:

 0400   0007 0005 0040
 0410  0001 1000 0007 0001
 0420  0008  0009 
 0430  000a  fff7 
 0440  fbf7dfc7 fdff f2fe fbfdfffb
 0450  af7ffefb fbfff7ff efbfffe3 5efdbf4d
 0460  ff7e fdffedff ff9f8fff ef9d
 0470  bffc ff7fff7a eff7ff7d 7fffbfff
 0480  ffefefff fedfff7f ffdf ffbdff7f
 0490  f3ff7fdb 76ff ffeffefe ff7f
 04a0  9fff fff7ffdf edff fcffdfff
 04b0  fffbefff fefb ffe7 6fff
 04c0  ffdffdfb fd7fff9e fbefefbf eeefdfeb
 04d0  bbdfbda3 9dfdef92 7b6ffaee fffde3fc
 04e0  ff9efffd ff79ffdb ffaef57f ffaec1fe
 04f0  bff7 fffeffdb eb3f eaedffee
 04000100  fffb ffdf ffdffebf bfefbff3
 04000110   feff f7ff ffeeefff
 04000120  f77f fedf fffe fffefefe
 04000130  fb7d fffd fdff b7ff
 04000140  6fff ffee7fed feff fffbfe6d
 04000150  fd5ff7ff f7bfffdc fdfff3c7 f7ff6f1d

Doesn't look like firmware to me.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up


[PATCH] arm64: dts: marvell: armada_8k: reserve memory for ATF

2018-11-13 Thread Emmanuel Vadot
Like 4436a371 for 37xx, reserve the PSCI area memory region so kernels
can call the code there.
Region address is taken from the ATF code [1] and is 2MiB aligned.

[1] plat/marvell/a8k/common/include/platform_def.h

Signed-off-by: Emmanuel Vadot 
---
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi 
b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
index 073610ac0a53..d8a79bb69de1 100644
--- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
@@ -23,6 +23,21 @@
spi0 = &spi0;
};
 
+   reserved-memory {
+   #address-cells = <2>;
+   #size-cells = <2>;
+   ranges;
+
+   /*
+* The PSCI firmware region depicted below is the default one
+* and should be updated by the bootloader.
+*/
+   psci-area@400 {
+   reg = <0 0x400 0 0x20>;
+   no-map;
+   };
+   };
+
psci {
compatible = "arm,psci-0.2";
method = "smc";
-- 
2.19.0