From owner-freebsd-current@freebsd.org Thu Aug 9 11:02:57 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 E5DDC1060F2E for ; Thu, 9 Aug 2018 11:02:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 395C48C9DC for ; Thu, 9 Aug 2018 11:02:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w79B2jib046647 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 9 Aug 2018 14:02:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w79B2jib046647 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w79B2jOh046646; Thu, 9 Aug 2018 14:02:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 9 Aug 2018 14:02:45 +0300 From: Konstantin Belousov To: Johannes Lundberg Cc: freebsd-current Subject: Re: Early kernel boot log? Message-ID: <20180809110245.GJ1884@kib.kiev.ua> References: <20180809082904.GI1884@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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 11:02:57 -0000 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 ?