Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2039076ybv; Fri, 14 Feb 2020 10:16:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwpiTUuYpHH+nRKOVe1/TsvPY1HXJFV/+UTSCVzLErMqxEiCXQlUZDXT5aac/QLTOZQCoQS X-Received: by 2002:a9d:6f11:: with SMTP id n17mr3324946otq.126.1581704173378; Fri, 14 Feb 2020 10:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581704173; cv=none; d=google.com; s=arc-20160816; b=c1zxt6LU0tdHkczif66vGkQOuoKZ/wf/J5eChc78eZg/8hbgCJOtYAhVkybgRn1I+Q Fxt8fXa6okYw6FigXHmpOwYfqIXZen0f55lD2fLZRzHxwVC1LRVhrYtbMjnpOyVe2wG3 P7aVWZBw9NECDetZ1mXziujWg5I26RiPexIP62McWirEEgait05Bh3EnQI7/z5jBUD4M kBucrgnVJLFgJMRyCmc0IX6mVqkaWGWw1WPaqAhA3Yh4Qeq20ocY8UnQBvQ3Di7WVW5W HjgptEkjDWNw9SoSgy2ZmLTGIAuhRy6MVMCUHyR/qXI+dQjCpwFNxA7Vp0NWUi1+t5S2 eTCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject; bh=Q2/YSZaroMiHDwEVazeOxl/9vRxTpD4adND2IMRiwW8=; b=kRuUmmCBAmNpabJ/bR69/OD3JdZg4q1burVTuzmp1PUtb5LcpKo3sqJjKQ1U5Y1zEN yZpeIgzhAGtZ8PoQlMwGAszK0D4N9cBAE8YtQ1I1iPOtoczwGxNtfocM7A+flWjPFW4n rtZiGD8zqgmhvCeNP/dURJQlIB951Xw7jixK1DnH6GC3C42i3/YVuJh2ZnUqNFr8tIOq 2Mg74WOmhWXdtho8QaRDtv/uixhEaJ1EXMLY9TSvhltBcGwbRQQfa4GCeObaD87VJC7I pTgV6qmMEzUHNxfOb/BbIvyrszU05p6cbgWaxifnOPw4D7HylwGFF5mgKTyiirLEwdkW 1Lrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si3195803oif.92.2020.02.14.10.16.01; Fri, 14 Feb 2020 10:16:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393568AbgBNSPa (ORCPT + 99 others); Fri, 14 Feb 2020 13:15:30 -0500 Received: from foss.arm.com ([217.140.110.172]:42868 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389512AbgBNSP3 (ORCPT ); Fri, 14 Feb 2020 13:15:29 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5531C328; Fri, 14 Feb 2020 10:15:29 -0800 (PST) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6F09B3F68E; Fri, 14 Feb 2020 10:15:28 -0800 (PST) Subject: Re: RPI4: fail too boot with an initrd To: LABBE Corentin References: <20200214132748.GA23276@Red> Cc: u-boot@lists.denx.de, nsaenzjulienne@suse.de, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: James Morse Message-ID: Date: Fri, 14 Feb 2020 18:15:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200214132748.GA23276@Red> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Corentin, On 14/02/2020 13:27, LABBE Corentin wrote: > Since the inclusion of the "enable network support in RPi4 config" serie on uboot, I > have started to work on adding the rpi4 in kernelCI. > But I fail to succeed in using a kernel/dtb/ramdisk downloaded via tftp. > > Using booti I hit: > [ 0.000000] Linux version 5.6.0-rc1-next-20200212 (clabbe@build2-bionic-1804) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #66 SMP PREEMPT Wed Feb 12 10:14:20 UTC 2020 > [ 0.000000] Machine model: Raspberry Pi 4 Model B > [ 0.000000] earlycon: uart0 at MMIO32 0x00000000fe215040 (options '') > [ 0.000000] printk: bootconsole [uart0] enabled > [ 0.000000] efi: Getting EFI parameters from FDT: > [ 0.000000] efi: UEFI not found. So no EFI, > [ 0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma' Out of memory. > [ 0.000000] cma: Failed to reserve 32 MiB > [ 0.000000] Kernel panic - not syncing: Failed to allocate page table page Out of memory... > [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-rc1-next-20200212 #66 > [ 0.000000] Hardware name: Raspberry Pi 4 Model B (DT) > [ 0.000000] Call trace: > [ 0.000000] dump_backtrace+0x0/0x1a0 > [ 0.000000] show_stack+0x14/0x20 > [ 0.000000] dump_stack+0xbc/0x104 > [ 0.000000] panic+0x16c/0x37c > [ 0.000000] early_pgtable_alloc+0x30/0xa0 ... really early! > [ 0.000000] __create_pgd_mapping+0x36c/0x588 > [ 0.000000] map_kernel_segment+0x70/0xa4 > [ 0.000000] paging_init+0xf4/0x528 > [ 0.000000] setup_arch+0x250/0x5d8 > [ 0.000000] start_kernel+0x90/0x6d8 > > > Since the same kernel boot with bootefi and that bootefi lack ramdisk address, Booting with EFI will cause linux to use the EFI memory map. Does your DT have a memory node? (or does it expect EFI to provide the information) > I tried to add the address in the dtb via: > fdt addr 0x02400000; fdt resize; fdt set /chosen linux,initrd-start 0x02700000; fdt set /chosen linux,initrd-end 0x10000000; bootefi 0x00080000 0x02400000 > But with that, I get: > initrd not fully accessible via the linear mapping -- please check your bootloader ... So this one is an EFI boot, but you can't find where to put the initramfs such that the kernel agrees its in memory. If you boot with 'efi=debug', linux will print the EFI memory map. Could you compare that to where U-Boot thinks memory is? (it sounds like your DT memory node is missing, and your EFI memory map is surprisingly small) Thanks, James