All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB
@ 2015-01-21 12:22 Marek Szyprowski
  2015-01-23  6:35 ` Kukjin Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Szyprowski @ 2015-01-21 12:22 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Marek Szyprowski, Kukjin Kim, Javier Martinez Canillas,
	jy0922.shim, Kevin Hilman, Sjoerd Simons

Last 22 MiB is RAM is reserved by secure monitor code and cannot be
accessed from Linux kernel, so adjust total RAM size to 0x7EA00000
(2 GiB - 22 MiB). This fixes random 'imprecise kernel abort' kernel
failures.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos5422-odroidxu3.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index f6fc9442f631..50843208860d 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -18,7 +18,7 @@
 	compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
 
 	memory {
-		reg = <0x40000000 0x80000000>;
+		reg = <0x40000000 0x7EA00000>;
 	};
 
 	chosen {
-- 
1.9.2

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

* RE: [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB
  2015-01-21 12:22 [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB Marek Szyprowski
@ 2015-01-23  6:35 ` Kukjin Kim
  2015-01-23  7:26   ` Marek Szyprowski
  2015-01-23  8:52   ` Sjoerd Simons
  0 siblings, 2 replies; 5+ messages in thread
From: Kukjin Kim @ 2015-01-23  6:35 UTC (permalink / raw)
  To: 'Marek Szyprowski', linux-samsung-soc
  Cc: 'Kukjin Kim', 'Javier Martinez Canillas',
	jy0922.shim, 'Kevin Hilman', 'Sjoerd Simons'

Marek Szyprowski wrote:
> 
> Last 22 MiB is RAM is reserved by secure monitor code and cannot be
> accessed from Linux kernel, so adjust total RAM size to 0x7EA00000
> (2 GiB - 22 MiB). This fixes random 'imprecise kernel abort' kernel
> failures.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> index f6fc9442f631..50843208860d 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> @@ -18,7 +18,7 @@
>  	compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
> 
>  	memory {
> -		reg = <0x40000000 0x80000000>;
> +		reg = <0x40000000 0x7EA00000>;
>  	};
> 
>  	chosen {
> --

Hi,

Maybe is it related to the SoC not only for odriodxu3 board. If so, following
would be better?

---8<------------8<---
diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
index c0bb356..54840e3 100644
--- a/arch/arm/boot/dts/exynos5800.dtsi
+++ b/arch/arm/boot/dts/exynos5800.dtsi
@@ -13,6 +13,8 @@
  * published by the Free Software Foundation.
  */

+/memreserve/ 0x80000000 0x1600000;
+
 #include "exynos5420.dtsi"

 / {
---8<------------8<---

- Kukjin

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

* Re: [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB
  2015-01-23  6:35 ` Kukjin Kim
@ 2015-01-23  7:26   ` Marek Szyprowski
  2015-01-23  7:50     ` Kukjin Kim
  2015-01-23  8:52   ` Sjoerd Simons
  1 sibling, 1 reply; 5+ messages in thread
From: Marek Szyprowski @ 2015-01-23  7:26 UTC (permalink / raw)
  To: Kukjin Kim, linux-samsung-soc
  Cc: 'Javier Martinez Canillas',
	jy0922.shim, 'Kevin Hilman', 'Sjoerd Simons'

Hello,

On 2015-01-23 07:35, Kukjin Kim wrote:
> Marek Szyprowski wrote:
>> Last 22 MiB is RAM is reserved by secure monitor code and cannot be
>> accessed from Linux kernel, so adjust total RAM size to 0x7EA00000
>> (2 GiB - 22 MiB). This fixes random 'imprecise kernel abort' kernel
>> failures.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>   arch/arm/boot/dts/exynos5422-odroidxu3.dts | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> index f6fc9442f631..50843208860d 100644
>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> @@ -18,7 +18,7 @@
>>   	compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
>>
>>   	memory {
>> -		reg = <0x40000000 0x80000000>;
>> +		reg = <0x40000000 0x7EA00000>;
>>   	};
>>
>>   	chosen {
>> --
> Hi,
>
> Maybe is it related to the SoC not only for odriodxu3 board. If so, following
> would be better?
>
> ---8<------------8<---
> diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
> index c0bb356..54840e3 100644
> --- a/arch/arm/boot/dts/exynos5800.dtsi
> +++ b/arch/arm/boot/dts/exynos5800.dtsi
> @@ -13,6 +13,8 @@
>    * published by the Free Software Foundation.
>    */
>
> +/memreserve/ 0x80000000 0x1600000;
> +
>   #include "exynos5420.dtsi"
>
>   / {

I don't think so. It is related only to the setup done by the respective 
board's bootloader,
not the SoC itself. It is already known that exynos 5800-based 
Chromebooks uses different
bootloader setup (BL1+BL2+Trustzone) than Odroid XU3. Also please note 
that u-boot for Odroid
XU3 limits the total memory passed to Linux kernel to 0x7EA00000, so we 
should not confuse
the kernel about such 'reserved' regions. The same approach is used for 
Odroid X2/U3.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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

* RE: [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB
  2015-01-23  7:26   ` Marek Szyprowski
@ 2015-01-23  7:50     ` Kukjin Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2015-01-23  7:50 UTC (permalink / raw)
  To: 'Marek Szyprowski', 'Kukjin Kim', linux-samsung-soc
  Cc: 'Javier Martinez Canillas',
	jy0922.shim, 'Kevin Hilman', 'Sjoerd Simons'

Marek Szyprowski wrote:
> 
> Hello,
> 
Hi,

> On 2015-01-23 07:35, Kukjin Kim wrote:
> > Marek Szyprowski wrote:
> >> Last 22 MiB is RAM is reserved by secure monitor code and cannot be
> >> accessed from Linux kernel, so adjust total RAM size to 0x7EA00000
> >> (2 GiB - 22 MiB). This fixes random 'imprecise kernel abort' kernel
> >> failures.
> >>
> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >> ---
> >>   arch/arm/boot/dts/exynos5422-odroidxu3.dts | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-
> odroidxu3.dts
> >> index f6fc9442f631..50843208860d 100644
> >> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> >> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> >> @@ -18,7 +18,7 @@
> >>   	compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
> >>
> >>   	memory {
> >> -		reg = <0x40000000 0x80000000>;
> >> +		reg = <0x40000000 0x7EA00000>;
> >>   	};
> >>
> >>   	chosen {
> >> --
> > Hi,
> >
> > Maybe is it related to the SoC not only for odriodxu3 board. If so, following
> > would be better?
> >
> > ---8<------------8<---
> > diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
> > index c0bb356..54840e3 100644
> > --- a/arch/arm/boot/dts/exynos5800.dtsi
> > +++ b/arch/arm/boot/dts/exynos5800.dtsi
> > @@ -13,6 +13,8 @@
> >    * published by the Free Software Foundation.
> >    */
> >
> > +/memreserve/ 0x80000000 0x1600000;
> > +
> >   #include "exynos5420.dtsi"
> >
> >   / {
> 
> I don't think so. It is related only to the setup done by the respective
> board's bootloader,
> not the SoC itself. It is already known that exynos 5800-based
> Chromebooks uses different
> bootloader setup (BL1+BL2+Trustzone) than Odroid XU3. Also please note
> that u-boot for Odroid
> XU3 limits the total memory passed to Linux kernel to 0x7EA00000, so we
> should not confuse
> the kernel about such 'reserved' regions. The same approach is used for
> Odroid X2/U3.
> 
If the boot-loader  passes limited memory, it makes sense. Thanks for the
explanation.

Will apply.

- Kukjin

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

* Re: [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB
  2015-01-23  6:35 ` Kukjin Kim
  2015-01-23  7:26   ` Marek Szyprowski
@ 2015-01-23  8:52   ` Sjoerd Simons
  1 sibling, 0 replies; 5+ messages in thread
From: Sjoerd Simons @ 2015-01-23  8:52 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: 'Marek Szyprowski',
	linux-samsung-soc, 'Javier Martinez Canillas',
	jy0922.shim, 'Kevin Hilman'

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

On Fri, 2015-01-23 at 15:35 +0900, Kukjin Kim wrote:
> Marek Szyprowski wrote:
> > 
> > Last 22 MiB is RAM is reserved by secure monitor code and cannot be
> > accessed from Linux kernel, so adjust total RAM size to 0x7EA00000
> > (2 GiB - 22 MiB). This fixes random 'imprecise kernel abort' kernel
> > failures.
> > 
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > index f6fc9442f631..50843208860d 100644
> > --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
> > @@ -18,7 +18,7 @@
> >  	compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
> > 
> >  	memory {
> > -		reg = <0x40000000 0x80000000>;
> > +		reg = <0x40000000 0x7EA00000>;
> >  	};
> > 
> >  	chosen {
> > --

Just checked hardkernels bootloader which defines:
  #define CONFIG_TRUSTZONE_RESERVED_DRAM  0x1600000

So looks good,

Reviewed-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

> Hi,
> 
> Maybe is it related to the SoC not only for odriodxu3 board. If so, following
> would be better?
> 
> ---8<------------8<---
> diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
> index c0bb356..54840e3 100644
> --- a/arch/arm/boot/dts/exynos5800.dtsi
> +++ b/arch/arm/boot/dts/exynos5800.dtsi
> @@ -13,6 +13,8 @@
>   * published by the Free Software Foundation.
>   */
> 
> +/memreserve/ 0x80000000 0x1600000;
> +
>  #include "exynos5420.dtsi"
> 
>  / {
> ---8<------------8<---
> 
> - Kukjin
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6170 bytes --]

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

end of thread, other threads:[~2015-01-23  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 12:22 [PATCH] ARM: dts: exynos5422-odroidxu3: reduce total RAM by 22 MiB Marek Szyprowski
2015-01-23  6:35 ` Kukjin Kim
2015-01-23  7:26   ` Marek Szyprowski
2015-01-23  7:50     ` Kukjin Kim
2015-01-23  8:52   ` Sjoerd Simons

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.