Re: [PATCH] arm64: dts: meson-gx: remove wrong reserved BL31 memory

2021-02-01 Thread Kevin Hilman
Artem Lapkin  writes:

> Kernel boot fail on Khadas VIM1 VIM2 (meson GX) boards
> SOLUTION: just remove wrong mem reservation for 0x1000 0x20

You don't explain why it's wrong.

This region was added becasue there there are definitely GX devices which
have secure memory in this area, and this patch will break those devices.

>  ## Booting kernel from Legacy Image at 0808 ...
>Image Name:   kernel
>Image Type:   AArch64 Linux Kernel Image (lzma compressed)
>Data Size:4657736 Bytes = 4.4 MiB
>Load Address: 0f08
>Entry Point:  0f08
>Verifying Checksum ... OK
>  ## Flattened Device Tree blob at 08008000
>Booting using the fdt blob at 0x8008000
>Uncompressing Kernel Image
>  ERROR: reserving fdt memory region failed (addr=1000 size=20)
>Loading Device Tree to 7bf23000, end 7bf2d3ce ... OK

I suspect if you change the load addresses used by u-boot to avoid this
region, you'll be able to boot just fine.

Kevin

>  Starting kernel ...
>
>  bl31 reboot reason: 0xd
>  bl31 reboot reason: 0x0
>  system cmd  1.
>
> Signed-off-by: Artem Lapkin 
> ---
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 --
>  1 file changed, 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi 
> b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 726b91d3a..71083b89d 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -32,12 +32,6 @@ hwrom_reserved: hwrom@0 {
>   no-map;
>   };
>  
> - /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
> - secmon_reserved: secmon@1000 {
> - reg = <0x0 0x1000 0x0 0x20>;
> - no-map;
> - };
> -
>   /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
>   secmon_reserved_alt: secmon@500 {
>   reg = <0x0 0x0500 0x0 0x30>;
> -- 
> 2.25.1


[PATCH] arm64: dts: meson-gx: remove wrong reserved BL31 memory

2021-01-29 Thread Artem Lapkin
Kernel boot fail on Khadas VIM1 VIM2 (meson GX) boards
SOLUTION: just remove wrong mem reservation for 0x1000 0x20

 ## Booting kernel from Legacy Image at 0808 ...
   Image Name:   kernel
   Image Type:   AArch64 Linux Kernel Image (lzma compressed)
   Data Size:4657736 Bytes = 4.4 MiB
   Load Address: 0f08
   Entry Point:  0f08
   Verifying Checksum ... OK
 ## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
   Uncompressing Kernel Image
 ERROR: reserving fdt memory region failed (addr=1000 size=20)
   Loading Device Tree to 7bf23000, end 7bf2d3ce ... OK

 Starting kernel ...

 bl31 reboot reason: 0xd
 bl31 reboot reason: 0x0
 system cmd  1.

Signed-off-by: Artem Lapkin 
---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 --
 1 file changed, 6 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 726b91d3a..71083b89d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -32,12 +32,6 @@ hwrom_reserved: hwrom@0 {
no-map;
};
 
-   /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
-   secmon_reserved: secmon@1000 {
-   reg = <0x0 0x1000 0x0 0x20>;
-   no-map;
-   };
-
/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
secmon_reserved_alt: secmon@500 {
reg = <0x0 0x0500 0x0 0x30>;
-- 
2.25.1