From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jm4pu-0000v0-8c for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:25:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jm4ps-0000ug-Q3 for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:25:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jm4ps-0000ud-KM for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:25:52 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Jm4ps-00047z-65 for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:25:52 -0400 From: Michal Schulz Subject: Re: [Qemu-devel] Re: [PATCH] Reboot CPU on triple fault Date: Wed, 16 Apr 2008 12:25:49 +0200 References: <47EE86E0.4070703@reactos.org> <4805CC9B.7050809@suse.de> <200804161217.33019.michal.schulz@gmx.de> In-Reply-To: <200804161217.33019.michal.schulz@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804161225.49791.michal.schulz@gmx.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wednesday 16 April 2008, Michal Schulz wrote: > > I have to admit that I'm all but an 286 PM expert. What exactly is a > > triple fault doing there? If it leads to a reset as implemented here, I > > can hardly imagine that it is of much use in regular context switching. > > It is required due to the "feature" of 286 CPU. Once 286 enters protected > mode, it cannot be switched back to the real mode. The only way to perform > it is resetting the CPU. A software which tries to go back from protected > to real mode sets the warm-reset vector in BIOS memory area, sets the > reboot reason variable in CMOS memory and issues a CPU reset. > > CPU may be resetted due to a triple fault :) and some example code using it (with comments): http://www.x86.org/ftp/source/3fault/reset.asm -- Michal Schulz