From patchwork Thu Jan 9 12:21:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3459651 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BD81A9F1C4 for ; Thu, 9 Jan 2014 12:21:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FA5F2012E for ; Thu, 9 Jan 2014 12:21:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33649200F0 for ; Thu, 9 Jan 2014 12:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753440AbaAIMVO (ORCPT ); Thu, 9 Jan 2014 07:21:14 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:65167 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbaAIMVN (ORCPT ); Thu, 9 Jan 2014 07:21:13 -0500 Received: by mail-pd0-f169.google.com with SMTP id v10so3131150pde.0 for ; Thu, 09 Jan 2014 04:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fSuw7ehrSK86r+jfRjwXWhStzLPZt/TTpAyBNeqcnBM=; b=0FYr5vQ/vKZysZHiK7WWjsYh+H3ricYoUGvodjx6h9CXoIxJ8uZOFiBIf84vx0tcPB dGjE15byNCXQNVw56TMP1UjxJAkXJFuvoE3WtKTbp7hBm4r4cqaHJtruE/011dUbTut9 KeoY+b2CG9IiDYYZxFxFhpfn8vkje2KoHhHdte3exZ8esQvsSsyjTP9G6mTA35NETS6X VfaIn9IzkslLxmWtvl/vdAfVang5yJ+fvi7ZmN5BoygybdB8azUmSpPhGFyRZGd6YPJu R7XPvEnr0HuHXvuQon7/QspJ8/8p/WFNRCuMbt2fAySJnLa34GoAzmM/HPzqjkhrhdCG BqBQ== MIME-Version: 1.0 X-Received: by 10.66.254.69 with SMTP id ag5mr3337964pad.112.1389270073318; Thu, 09 Jan 2014 04:21:13 -0800 (PST) Received: by 10.70.53.138 with HTTP; Thu, 9 Jan 2014 04:21:13 -0800 (PST) In-Reply-To: <52CE8BC0.7060306@codethink.co.uk> References: <52CE8BC0.7060306@codethink.co.uk> Date: Thu, 9 Jan 2014 13:21:13 +0100 X-Google-Sender-Auth: GvkpNuoWbILx2kK2DbPXmpReFcY Message-ID: Subject: Re: lager - non-booting latest horms' devel branch From: Geert Uytterhoeven To: Ben Dooks Cc: SH-Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Ben, On Thu, Jan 9, 2014 at 12:45 PM, Ben Dooks wrote: > I am using the devel branch from Simon Horms' git tree, SHA1 > 3da593ea7d797d9f59bd6ed1ee629fab681d7a23 and not seeing a > boot when using the multi arch defconfig and device-tree. > > The board does not produce any console output so I am not > sure what is going on. Has anyone else had issues with using > the fdt-only boot? I'm using Koelsch (not Lager), but usually the non-reference version as I need Ethernet for NFS root. The DT-version does boot for me until mounting root. Are you using an initramfs? I noticed the kernel crashes early when using a non-trivial initramfs: Error: unrecognized/unsupported machine ID (r1 = 0x41915083). Available machine support: ID (hex) NAME ffffffff Generic R8A7791 (Flattened Device Tree) ffffffff koelsch Please check your kernel config and/or bootloader. Apparently the device tree gets overwritten in memory. I tried loading the DTB at a different address, but that didn't help. I didn't have more time to investigate, though. FYI, I'm using the following patch to capture early kernel messages in RAM. After a reset, look up the addres of big_buffer[] in System.map, and inspect it from U-Boot to retrieve the messages (translate from 0xc0000000 to 0x40000000). Gr{oetje,eeting}s, Geert --- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index be7c86bae576..609bccc002ca 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -46,6 +46,7 @@ #include #include +#include #include #define CREATE_TRACE_POINTS @@ -1488,6 +1489,9 @@ static size_t cont_print_text(char *text, size_t size) return textlen; } +static char big_buffer[256*1024]; +static size_t big_buffer_index; + asmlinkage int vprintk_emit(int facility, int level, const char *dict, size_t dictlen, const char *fmt, va_list args) @@ -1546,6 +1550,16 @@ asmlinkage int vprintk_emit(int facility, int level, * prefix which might be passed-in as a parameter. */ text_len = vscnprintf(text, sizeof(textbuf), fmt, args); +if (big_buffer_index + text_len < sizeof(big_buffer)) { + memcpy(&big_buffer[big_buffer_index], text, text_len + 1); + big_buffer_index += text_len; +} else if (big_buffer_index < sizeof(big_buffer)) { + memset(&big_buffer[big_buffer_index], '*', + sizeof(big_buffer) - big_buffer_index); + big_buffer[sizeof(big_buffer) - 1] = 0; + big_buffer_index = sizeof(big_buffer); +} +flush_cache_all(); /* mark and strip a trailing newline */ if (text_len && text[text_len-1] == '\n') {