From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 23 16:05:09 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 69D2D4BE for ; Tue, 23 Apr 2013 16:05:09 +0000 (UTC) (envelope-from benjamin.villain@gmail.com) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) by mx1.freebsd.org (Postfix) with ESMTP id 01BE21D90 for ; Tue, 23 Apr 2013 16:05:08 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id f11so373068wgh.27 for ; Tue, 23 Apr 2013 09:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=81OUYyjWC06m32TESAcH6J9mYVMSzQc+JeHu4u+DF3M=; b=ovLnUGIeKjiyKTaYnYc3vydhyIQ82aZ7Fiw2Onqz9FuwzD8lt7NTlb9EBjlxkRtowg yQTvfl1Jm/pwdyGJkVHxieM2CrVh2D/w8yszjCO0t2hK6iIZeVpSYQ99z3X2u2KW/LgZ dn2ijXP3C7GI9eJDWz1LfuCg5Q1T8PMz1APF3AOpwAUw2dDss5h58m9jjjoG784KAcCl 2ta7gClqWt5pWjQ6ehoAvLfBQvKIwrYbYJTx4YZA0ujefBWefuQ2WpHLpFD9bF1fSOWH EQzTDWhJza/y1epSObQOhS6GiR9TuubSi+mC74MzQUXS2dEPjsTOmeAzsA746KsRwkVf /R3g== MIME-Version: 1.0 X-Received: by 10.194.119.33 with SMTP id kr1mr62310424wjb.36.1366733108104; Tue, 23 Apr 2013 09:05:08 -0700 (PDT) Received: by 10.194.236.129 with HTTP; Tue, 23 Apr 2013 09:05:08 -0700 (PDT) In-Reply-To: <006B20F1-F67B-4E9D-B0DF-D4ED843F7E8E@FreeBSD.org> References: <20130419162834.GA90217@icarus.home.lan> <20130420014821.GA98555@icarus.home.lan> <5172812A.10309@gmail.com> <201304221129.43119.jhb@freebsd.org> <006B20F1-F67B-4E9D-B0DF-D4ED843F7E8E@FreeBSD.org> Date: Tue, 23 Apr 2013 18:05:08 +0200 Message-ID: Subject: Re: Rebooting from loader causes a "fault" in VMware Workstation From: Benjamin VILLAIN To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Jeremy Chadwick X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 16:05:09 -0000 A little more information in that subject, rebooting from the FreeBSD bootloader doesn't work on VirtualBox either (version 4.2). It juste enter an infinite loop without any error message (Grub does reboot). Hope this could help understanding what's going on here :) -- Ben On Tue, Apr 23, 2013 at 4:36 PM, Dimitry Andric wrote: > On Apr 22, 2013, at 17:29, John Baldwin wrote: > > On Saturday, April 20, 2013 7:51:06 am Joshua Isom wrote: > >> On 4/19/2013 8:48 PM, Jeremy Chadwick wrote: > >>> I'm happy to open up a ticket with VMware about the issue as I'm a > >>> customer, but I find it a little odd that other operating systems do > not > >>> exhibit this problem, including another BSD. Ones which reboot just > >>> fine from their bootloaders: > >>> > >>> - Linux -- so many that I don't know where to begin: ArchLinux > >>> 2012.10.06, CentOS 6.3, Debian 6.0.7, Finnix 1.0.5, Knoppix 7.0.4, > >>> Slackware 14.0, and Ubuntu 11.10 > >>> - OpenBSD 5.2 > >>> - OpenIndiana -- build 151a7 (server version) > >>> > >>> So when you say "Blame VMware", I'd be happy to, except there must be > >>> something FreeBSD's bootstraps are doing differently than everyone else > >>> that causes this oddity. Would you not agree? > >> > >> A triple fault is standard practice as a fail safe guarantee of reboot. > >> It's used either as a reboot, switch to real mode(IBM OS/2), or > >> catastrophic unrecoverable failure. > >> > >> By the looks of grub(Linux and Solaris), it either jumps to it's own > >> instruction, hoping the bios catches it("tell the BIOS a boot failure, > >> which may result in no effect"), or jumps to a location that I can't yet > >> determine what code exists there. I can't seem to find OpenBSD's reboot > >> method from OpenBSD's cvsweb, only an exit but not where that exit leads > >> to. The native operating system is irrelevant, only the boot loader so > >> all the Linux distributions and Solaris forks all count as "grub." Many > >> other bootloaders don't even have the reboot option, just "fail." > >> Here's barebox, a Das U-Boot fork: > >> > >> /** How to reset the machine? */ > >> while(1) > >> > >> In any case, it's a bag of tricks, finding something that works and is > >> "nice." We're talking 30 years of legacy. A triple fault, assuming the > >> mbr and loader ignores or zeroes previous memory, is guaranteed and > >> doesn't hang. > > > > Actually, the traditional reboot method in real-mode (e.g. in DOS) is > > to jump to 0xffff:0. The BIOS is supposed to have a restart routine > > at that location. I've also seen jumps to 0xf000:fff0. > > > > For example, BTX (the mini-kernel that "hosts" the loader and boot2) > > uses the latter: > > > > /* > > * Reboot or await reset. > > */ > > sti # Enable interrupts > > testb $0x1,btx_hdr+0x7 # Reboot? > > exit.3: jz exit.3 # No > > movw $0x1234, BDA_BOOT # Do a warm boot > > ljmp $0xf000,$0xfff0 # reboot the machine > > I have tried to ascertain it actually arrives at this code when > rebooting from the loader, but it does not seem to ever make it there, > at least not to the jump to f000:fff0. Maybe VMware intercepts the > switching back to real mode in the previous part, and dies on that, I am > not sure. It is of course rather tricky to print off any debug messages > at that point. :-) > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >