From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762095AbcLWJny (ORCPT ); Fri, 23 Dec 2016 04:43:54 -0500 Received: from mout.gmx.net ([212.227.17.21]:63296 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754395AbcLWJnu (ORCPT ); Fri, 23 Dec 2016 04:43:50 -0500 Subject: Re: [RFT PATCH] ARM64: dts: meson-gxbb: Add reserved memory zone and usable memory range To: Heinrich Schuchardt , Neil Armstrong , khilman@baylibre.com References: <20161212101801.28491-1-narmstrong@baylibre.com> <09bb78ed-c8ec-d21f-d464-16e55c481d4e@gmx.de> <56869b90-6bee-f6ae-a7b1-884b4c0d72c0@baylibre.com> <2ac01237-a7f8-5b3b-0f97-dd49ce6623fb@gmx.de> Cc: carlo@caione.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org From: Heinrich Schuchardt Message-ID: <90d5b5a3-6dd8-aab2-8701-112a10e3364c@gmx.de> Date: Fri, 23 Dec 2016 10:42:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <2ac01237-a7f8-5b3b-0f97-dd49ce6623fb@gmx.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:8CVj39PBruvSw7u+1duxG/Zar07DysIAEApeHkESpb17nuHWs77 OQwiqAJ87QFwscxtQp8QSut6hHrUvYqQpDbazut0XrUWLzVL+3orw+5WUDf8AWiu7PrkEN0 2ver1QWzOqyumjPSbml4H+M8d544cotHScFAN0Lw+eAzpvJaUuP6s3RTpV3z6zTYXuBN6QW EQjwO6x7sY3fQsspJGm1g== X-UI-Out-Filterresults: notjunk:1;V01:K0:7nSZlX2VX/c=:T3ogFetSBtlj2ZwecXY/MT I+zDCBvyLXl4shQ03PfHV7EpdnezsI0Isqda9RRPMU+/krqi5UNEWcO0WX5bcspRkiTZXBL15 1T+VAvXkZhy1K2OJggpgCTUdN9Pe6M9mENRS7Vby6Gji0OpFHWi5dC2yP77dJE5+h62Bia0zL rDevDZQXSv/XrJNM8tuA12ZzJXsP4iPqpp6bzytV60D8ro228WruCc74Fwa5OOteNouZstDgx 5T7SKrOiRRhm51OMP9jhghKL5OUvgPPa5XyFwBEWG/qJkErlJLeOQyZjI503YYOuC+N0upJOe LzNM+Kx3JECgRgAdcr2GhGq4pzs2uD5IkS3hvGYFqgtC5k7wPsNojrqCqYmHuKiEZg7KYBg6R aLyzfscdALSNscWxi6OM5/FSdv8LuUQXMptGWSn2iD+Vjx0whdMCrNMrriMalYUpOyzpTkF3i CTeLbhtvIZ56yYgQtt7kA+4QW/lmkq6sHL9ZrrHEqriyzosdve0pa4WwgiEyzbrOUkJslmNfm snHeOovx3eFLAJG9eVDHcN7AAcS3mwZqq8ruaYf88CAL/gJIGpgVbeNbySKID0M9iik+juMcY ZhZjD2qvwBlcJl4GJLNjXGhs3AAOFEd61t3Ov4HznKkyYv91FAGaZ8J4GGb3d1pun+y3WIIJX e+iSWByK+P5isLoIoenFEY0BYp5XWXaKon61bm3+UUixYOEd4lBnJlvdaAF3zFtxFXgfLqXLm E0QSAyzv346pUI94JP8NS24NY2lpXLuB7xMtywC7dhROHEspyZipsYKUxXa4WjIePIVlSTTor JXQpyf8MgGvMbMp1TbDc7UJSJLHFUsWb/itvj9FUSk7oXIfvVRSR9geNFr4u2cyoJtiTIXhdR ulCL9AqRlatOwNmn/8L0o1mEI/nDV9wsuKUxnUefCBtCozfs8rG7krXGJX0eE4Nlt0Am9DOil PeSOFBKODK/a8PwdSCmsiOXC27L7Cc19KNHYSpHX3cQzHX1nYWyDoN7ltDTW0eCU3pij/XCym +y1ZoeBDiNpOkfKvD1I6lZ0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/22/2016 11:02 AM, Heinrich Schuchardt wrote: > On 12/14/2016 10:52 AM, Neil Armstrong wrote: > >> Hi Heinrich, >> >> Thanks for testing and for the report, >> we are still struggling into finding what are these zones and how to label them correctly. >> >> We need to identify the zones on all boards, the patch I provided works on a non-odroid-c2 and gxm and gxl boards. >> >> Neil >> > Hello Neil, > > the configuration below works for me on the Hardkernel Odroid C2. > > ramoops is needed for CONFIG_PSTORE_RAM. > Debian Stretch has CONFIG_PSTORE_RAM=m. Same is true for Fedora. > I have chosen the address arbitrarily. To accommodate 512 MB boards we > would have to put it below 0x20000000. > The size parameters are the same as in hisilicon/hi6220-hikey.dts and > qcom-apq8064-asus-nexus7-flo.dts. > > linux,cma is used for contiguous memory assignment. I have taken the > align parameter from arm-src-kernel-2016-08-18-26e194264c.tar.gz > provided by Amlogic at > http://openlinux.amlogic.com:8000/download/ARM/kernel/ . > See Documentation/DMA-API.txt for the usage of align. > They use the same value 0x400000 for all GXBB boards. > So we want to put this zone into meson-gxbb.dtsi. > > secmon is used by drivers/firmware/meson/meson_sm.c. > Amlogic uses the same address range for all 64bit boards. > > memory@0 { > device_type = "memory"; > linux,usable-memory = <0x0 0x1000000 0x0 0x7f000000>; > }; > > reserved-memory { > #address-cells = <0x2>; > #size-cells = <0x2>; > ranges; > > ramoops@0x23f00000 { > compatible = "ramoops"; > reg = <0x0 0x23f00000 0x0 0x100000>; > record-size = <0x20000>; > console-size = <0x20000>; > ftrace-size = <0x20000>; > }; > > secmon: secmon { > compatible = "amlogic, aml_secmon_memory"; > reg = <0x0 0x10000000 0x0 0x200000>; > no-map; > }; > > linux,cma { > compatible = "shared-dma-pool"; > reusable; > size = <0x0 0xbc00000>; > alignment = <0x0 0x400000>; > linux,cma-default; > }; > }; > > Best regards > > Heinrich Schuchardt > Hello Neil, it really makes a difference if we write memory@0 { device_type = "memory"; linux,usable-memory = <0x0 0x1000000 0x0 0x7f000000>; }; or memory@0 { device_type = "memory"; reg = <0x0 0x1000000 0x0 0x7f000000>; }; The second version leads to failure of the Odroid C2. When I looked at /sys/firmware/fdt I saw this difference: --- fails +++ works memory@0 { - device_type = "memory"; reg = <0x0 0x0 0x0 0x78000000>; + device_type = "memory"; + linux,usable-memory = <0x0 0x1000000 0x0 0x7f000000>; }; I found the following sentence in the NXP forum: In case you want to overwrite the memory usage passed from u-boot, you can use "linux,usable-memory". https://community.nxp.com/thread/382284 Best regards Heinrich Schuchardt