From owner-freebsd-current@freebsd.org Thu Aug 9 16:13:02 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B7BD106B600 for ; Thu, 9 Aug 2018 16:13:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 028157BB8E for ; Thu, 9 Aug 2018 16:13:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1CEAB10B45E; Thu, 9 Aug 2018 12:13:01 -0400 (EDT) Subject: Re: Early kernel boot log? To: Konstantin Belousov , Johannes Lundberg References: <20180809082904.GI1884@kib.kiev.ua> <20180809110245.GJ1884@kib.kiev.ua> Cc: freebsd-current From: John Baldwin Message-ID: <52335ad7-6c8f-065d-9e9d-23dec5727b12@FreeBSD.org> Date: Thu, 9 Aug 2018 09:13:00 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180809110245.GJ1884@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 09 Aug 2018 12:13:01 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 16:13:02 -0000 On 8/9/18 4:02 AM, Konstantin Belousov wrote: > On Thu, Aug 09, 2018 at 10:26:06AM +0100, Johannes Lundberg wrote: >> On Thu, Aug 9, 2018 at 9:29 AM Konstantin Belousov >> wrote: >> >>> On Thu, Aug 09, 2018 at 08:54:31AM +0100, Johannes Lundberg wrote: >>>> Hi >>>> >>>> So I believe the reason I'm not seeing and printf output in dmesg is that >>>> it is too early in some functions. >>>> For example >>>> machdep.s >>>> getmemsize() >>>> add_efi_map_entries() >>>> etc >>>> >>>> However, these functions do contain debug printf statements so if they're >>>> logging to somewhere, where/how can I see this? >>>> >>>> I also tried booting in bhyve too see if I could get any output via >>> serial >>>> console but nothing there either. >>> Disable efi console, only leaving comconsole around, then set >>> debug.late_console=0 >>> in loader. >>> >> >> Thanks for the tip. I found the comment in machdep.c that explains this >> now. >> However, running in bhyve with >> console="comconsole" (not needed in bhyve I guess?) >> debug.late_console=0 >> >> Boot hangs after >> Booting... >> output. >> Caused by late_console=0. > > That early hangs are typically due to an exception occuring before > IDT is set up and trap machinery operational. Double-check that > there is no any early framebuffer access, as a drastic measure remove > all framebuffer drivers from your kernel config. > > I do not remember, where gdb stubs added to bhyve ? Is there a way > to inspect the vm guest state in bhyve by other means ? For this case the gdb stub in FreeBSD head should be sufficient. You need to add '-G 1234' to the command line when starting bhyve and then you can use 'target remote localhost:1234' from either gdb or kgdb. -- John Baldwin