From mboxrd@z Thu Jan 1 00:00:00 1970 From: LABBE Corentin Date: Tue, 18 Feb 2020 10:59:52 +0100 Subject: [PATCH v3 0/3] Ethernet support for Raspberry Pi 4 In-Reply-To: <6bb10931-ea87-2bf9-f1e6-9f9a2c0a2fe3@samsung.com> References: <20200127011444.8114-1-andre.przywara@arm.com> <20200127100949.GA14303@Red> <20200127115016.GA4896@Red> <20200127120616.73342ed4@donnerap.cambridge.arm.com> <3c107710-5617-5a7a-d783-d6c6dc8f9037@samsung.com> <20200203094816.GA4164@Red> <97d8973a-2403-689b-525f-9eb0847c3222@samsung.com> <6bb10931-ea87-2bf9-f1e6-9f9a2c0a2fe3@samsung.com> Message-ID: <20200218095952.GA10369@Red> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Feb 18, 2020 at 11:13:03AM +0900, Jaehoon Chung wrote: > Hi LABBE, > > On 2/17/20 8:37 PM, Jaehoon Chung wrote: > > On 2/3/20 6:48 PM, LABBE Corentin wrote: > >> On Wed, Jan 29, 2020 at 07:21:09AM +0900, Jaehoon Chung wrote: > >>> On 1/27/20 9:06 PM, Andre Przywara wrote: > >>>> On Mon, 27 Jan 2020 12:50:16 +0100 > >>>> LABBE Corentin wrote: > >>>> > >>>> Hi, > >>>> > >>>>> On Mon, Jan 27, 2020 at 04:27:03PM +0530, Amit Tomer wrote: > >>>>>> Hi, > >>>>>> > >>>>>>> The kernel panic just after with "OF: reserved mem: failed to allocate memory for node 'linux,cma'" but that's another story. > >>>>>> > >>>>>> But this comes even without having Ethernet patches and when one use > >>>>>> booti instead of bootefi, right ? > >>>>>> > >>>>> > >>>>> So booti is unsupported on rpi 4 ? > >>>> > >>>> It should be supported, but apparently there is some bug. I guess it's about not properly reserving memory used by the armstub/ATF. Do you use the embedded RPi foundation armstub or ATF (do you have an "armstub=..." line in config.txt)? > >>>> > >>>> I will try take a look at this later. > >>> > >>> I'm not sure, i had similar issue about failed to allocate memory cma. > >>> I had enabled CONFIG_ARCH_FIXUP_OF_MEMORY. And i changed the loading address (kernel/ramdisk/device-tree) in boot script for our environment. > >>> Because sometime some address range is overwritten. > >>> > >> > >> Hello > >> > >> I have searched both in uboot and linux sources and didnt found any CONFIG_ARCH_FIXUP_OF_MEMORY. > > > > Sorry. It's CONFIG_ARCH_FIXUP_FDT_MEMORY. > > In my case, disable CONFIG_ARCH_FIXUP_FDT_MEMORY. (RAM size is returned to 0.) > > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 4.19.81-arm-rpi4-v7l (abuild at obspw03) (gcc version 9.2.0 (Tizen GCC 9.2.0 20190812 3.5)) #1 SMP Thu Feb 13 12:18:13 UTC 2020 > [ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d > [ 0.000000] CPU: div instructions available: patching division code > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache > [ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B > [ 0.000000] earlycon: uart8250 at MMIO32 0x00000000fe215040 (options '') > [ 0.000000] bootconsole [uart8250] enabled > [ 0.000000] INITRD: 0x02700000+0x00800000 is not a memory region - disabling initrd > [ 0.000000] cma: Size (0x0000000010000000) of region at 0x0000000000000000 exceeds limit (0x0000000000000000) > [ 0.000000] cma: Failed to reserve 256 MiB > > After enabled CONFIG_ARCH_FIXUP_FDT_MEMORY. > > tarting kernel ... > > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 4.19.81-arm-rpi4-v7l (abuild at obspw03) (gcc version 9.2.0 (Tizen GCC 9.2.0 20190812 3.5)) #1 SMP Thu Feb 13 12:18:13 UTC 2020 > [ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d > [ 0.000000] CPU: div instructions available: patching division code > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache > [ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B > [ 0.000000] earlycon: uart8250 at MMIO32 0x00000000fe215040 (options '') > [ 0.000000] bootconsole [uart8250] enabled > [ 0.000000] Memory policy: Data cache writealloc > [ 0.000000] cma: Reserved 256 MiB at 0x000000001ec00000 > [ 0.000000] random: get_random_bytes called from start_kernel+0xc0/0x4f0 with crng_init=0 > [ 0.000000] percpu: Embedded 16 pages/cpu s36812 r8192 d20532 u65536 > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1011008 > > Kernel is based on RPI vendor kernel. (32bit) And I have changed ramdisk/kernel/fdt loading address.(I think that it's not important.) > > I have checked 1G/2G/4G RPI4 target. Each board is displayed correct ram-size on Kernel side. > Thanks after enabling CONFIG_ARCH_FIXUP_FDT_MEMORY, I successully booted a linux-next via booti. Thanks again. Regards