From owner-cvs-src@FreeBSD.ORG Tue Apr 24 21:23:05 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50DF816A404; Tue, 24 Apr 2007 21:23:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id D065B13C469; Tue, 24 Apr 2007 21:23:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l3OLN06b060425; Tue, 24 Apr 2007 17:23:00 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 24 Apr 2007 17:21:46 -0400 User-Agent: KMail/1.9.6 References: <200704242117.l3OLHjRn017578@repoman.freebsd.org> In-Reply-To: <200704242117.l3OLHjRn017578@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704241721.46689.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 24 Apr 2007 17:23:00 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3156/Tue Apr 24 13:07:43 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 vm_machdep.c src/sys/i386/i386 vm_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 21:23:05 -0000 On Tuesday 24 April 2007 05:17:45 pm John Baldwin wrote: > jhb 2007-04-24 21:17:45 UTC > > FreeBSD src repository > > Modified files: > sys/amd64/amd64 vm_machdep.c > sys/i386/i386 vm_machdep.c > Log: > Fix the triple fault used as a last resort during a reboot to actually > fault. The previous method zero'd out the page tables, invalidated the > TLB, and then entered a spin loop. The idea was that the instruction after > the TLB invalidate would result in a page fault and the page fault and > subsequent double fault wouldn't be able to determine the physical page > for their fault handlers' first instruction. This stopped working when > PGE (PG_G PTE/PDE bit) support was added as a TLB invalidate via %cr3 > reload doesn't clear TLB entries with PG_G set. Thus, the CPU was still > able to map the virtual address for the spin loop and happily performed > its infinite loop. > > The triple fault now uses a much more deterministic sledge-hammer approach > to generate a triple fault. First, the IDT descriptor is set to point to > an empty IDT, so any interrupts (including a double fault) will instantly > fault. Second, we trigger a int 3 breakpoint to force an interrupt and > kick off a triple fault. > > MFC after: 3 days This and the other changes to support more methods for kicking off a reset might fix problems people have with machines not rebooting but just hanging. IIRC, there was a problem on some Dell 1950s that wouldn't reboot properly, so they might be a good candidate for this. I ran into this at work on a machine that didn't have a functional keyboard controller, so it didn't reboot when the keyboard reset failed, but just hung. -- John Baldwin