Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57ECFC433F5 for ; Wed, 8 Dec 2021 09:39:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBF8582FA3; Wed, 8 Dec 2021 10:39:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="SJyCTNoD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 97A3481423; Wed, 8 Dec 2021 10:39:00 +0100 (CET) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 38B4E80F89 for ; Wed, 8 Dec 2021 10:38:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 8 Dec 2021 18:38:47 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send001-relay.gov-dooray.com with SMTP id e3c1d9fd61b07d27; Wed, 08 Dec 2021 18:38:47 +0900 DKIM-Signature: a=rsa-sha256; b=SJyCTNoDNzFEC1F/iE8fxMVoQSDYeYTLoOnJnkqjguB4GbFC+zjlsPLgh6hRiIy3uCsIoZ1kkt WPZ6v6YLtnT0v3sny4P0V+7f+6HirONLWOgSm96122E9S4a3tHi8Ycl9ztx9Tk/5iGSeQHu4Bo9U yNk3fO5j+F6UWJ0xQHp3r9delvFKXrWyE2SMCL+NmmR4AMUJx3EOzQ7mLR/WDRdQhpM+P81nBGjT hKGqp7fL144HPqG2qHteTEKKulF0RJO7GG0bG6+lKVYPg5Z2UX6JZKHpfkhFmybTeyDyN3Xt9uQ+ ReXhvuetkGo18rOCMXl146j5cwxcW47oAQkFgwAw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=Uv/ro3oQUzMuKTfOLgU3aXvCJZWo6BdsGBsG34iiCWM=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id e6488ad461b07d26; Wed, 08 Dec 2021 18:38:47 +0900 From: "Chan Kim" To: "U-Boot Mailing List" Subject: When is the console connected during spl run? Date: Wed, 8 Dec 2021 18:38:46 +0900 Message-ID: <01e601d7ec17$66119430$3234bc90$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdfsF2BsFZ2wwakhQxuznwSioF3wtQ== Content-Language: ko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.38 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hello experts, I was following u-boot-spl program on our board hoping somewhere serial port will be initialized and also the console using the serial port. In our FPGA board, there is a small 8 BM on-chip memory in place of DDR and I can use two 51kB sram on-chip. The spl program is loaded on the first sram and bss and gd was allocated on sdram (actually it's on-chip sram as I said). I followed u-boot-spl program using some debug prints on memory until it goes into board_init_r function (in common/spl/spl.c). Just inside the function I see this line void board_init_r(gd_t *dummy1, ulong dummy2) { u32 spl_boot_list[] = { BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, }; struct spl_image_info spl_image; int ret; debug(">>" SPL_TPL_PROMPT "board_init_r()\n"); spl_set_bd(); The "debug" macro is the one defined in include/log.h and because I added "#define DEBUG" to the make argument, it uses this definition. #else /* _DEBUG */ /* * Output a debug text when condition "cond" is met. The "cond" should be * computed by a preprocessor in the best case, allowing for the best * optimization. */ #define debug_cond(cond, fmt, args...) \ ({ \ if (cond) \ printf(pr_fmt(fmt), ##args); \ }) #endif /* _DEBUG */ So, am I supposed to see the message in my console? From the reset to this point, I couldn't see any serial port initialization (this is arm64 and board_init_f just returned doing nothing. No need to initialize sdram.). How should I connect uart to console? Should I add my own board_init_f function and do serial_init and console_init_f there? Any comment or help will be really appreciated. Thank you! Chan Kim