From mboxrd@z Thu Jan 1 00:00:00 1970 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 7FF20C433EF for ; Fri, 10 Dec 2021 14:16:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A32B83D98; Fri, 10 Dec 2021 15:16:25 +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=pass (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="sgyjT743"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 18B7D83DE7; Fri, 10 Dec 2021 15:16:24 +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 1C66383D6E for ; Fri, 10 Dec 2021 15:16:15 +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; 10 Dec 2021 23:16:12 +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 ba8fef4f61b3612c; Fri, 10 Dec 2021 23:16:12 +0900 DKIM-Signature: a=rsa-sha256; b=sgyjT743hym9c+TnLKNFKQtCH7/aSl4CfoXXb7xyqstwRKwjpSbZHJN2Pfo0R4MdsD46LcFmuz EhKQORQ356eB0/sAH63n8XAI05kra5AEAW20e7675r0Atr/h+sQBijoNaQgMmFGRxiuoLQPoCdcI aiTahlIAziciW5XunU5bZFkNfehPJWfm2bTbGUpw4lKU9/7Mer78EevAjp2MCnwmZMIH0IOj5kI/ iyggAfaymX+Z2nDEPs31r7njh8SxEVPEplb1pb2T9o22zY06wu3HSObNhI/4R8lUiMS0R/laYjrd KMpNxCt5NNai0QYhVG5OZzKNkS6jqLONb2AwP9cw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=1VrfqjGAxigsPuPE02G3502OWKbYoRgWfPcd+v1PZ9c=; 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 d05889d461b3612b; Fri, 10 Dec 2021 23:16:12 +0900 From: "Chan Kim" To: "'U-Boot Mailing List'" References: <01e601d7ec17$66119430$3234bc90$@etri.re.kr> In-Reply-To: <01e601d7ec17$66119430$3234bc90$@etri.re.kr> Subject: RE: When is the console connected during spl run? Date: Fri, 10 Dec 2021 23:16:11 +0900 Message-ID: <03e901d7edd0$7bfeb6f0$73fc24d0$@etri.re.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLg4LzLxMbXFN6nyrPw2L9oIC6m6KoZ3yjQ Content-Language: ko 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? Anybody that can give me some advice on this please ~ Thank you. Chan Kim > -----Original Message----- > From: U-Boot On Behalf Of Chan Kim > Sent: Wednesday, December 8, 2021 6:39 PM > To: U-Boot Mailing List > Subject: When is the console connected during spl run? > > 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 > > >