From owner-freebsd-bugs Thu Jun 22 17:50:19 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA08959 for bugs-outgoing; Thu, 22 Jun 1995 17:50:19 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id RAA08953 for ; Thu, 22 Jun 1995 17:50:15 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id RAA09004; Thu, 22 Jun 1995 17:50:08 -0700 From: "Rodney W. Grimes" Message-Id: <199506230050.RAA09004@gndrsh.aac.dev.com> Subject: Re: i386/541: Alternate Reset method by unmapping ALSO broken To: terry@cs.weber.edu (Terry Lambert) Date: Thu, 22 Jun 1995 17:50:08 -0700 (PDT) Cc: regnauld@tetard.frmug.fr.net, freebsd-bugs@freefall.cdrom.com In-Reply-To: <9506222341.AA04029@cs.weber.edu> from "Terry Lambert" at Jun 22, 95 05:41:33 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1913 Sender: bugs-owner@FreeBSD.org Precedence: bulk > > > /* force a shutdown by unmapping entire address space ! */ > > -> printf("Unmapping address space:"); > > bzero((caddr_t) PTD, NBPG); > > -> printf(" Done.\n"); > > > > /* "good night, sweet prince .... " */ > > -> printf("Pmap Update:"); > > pmap_update(); > > -> printf(" Done.\n"); > > > > /* NOTREACHED */ > > while(1); > > > > --- > > > > After recompiling a kernel and booting it, the result is this: > > > > Keyboard reset did not work, attempting CPU shutdown > > Unmapping address space: > > > > ... and nothing more. > > > > Obviously bzero((caddr_t) PTD, NBPG) never makes it... > > (Pretty annoying, as I can't be away long if it crashes and > > attempts to reboot while I'm not around (like this summer...)) > > Theory: printf will fail with an unmapped address space. Not so much theory. I've tried to debug in this area of code in the past. It is quite painful and I found the only practical solution was to go out to Intel and use an ICE to find out just what was going on. What happens depends a lot on just what is in the TLB before we bzero the PTD. If you have the TLB entries that cover the pages for printf then you are usually okay. And since we call printf right before we do the bzero this is normally the case. Take that ``printf("Unmapping address space:");'' out and any later printf is probably going to blow chunks all over the place. Even the fact that this printf: printf("Keyboard reset did not work, attempting CPU shutdown\n"); works on some systems amazes me, as gateA20 should have been slammed by then screwing up any hope of doing much else. I guess if the reset fails so does the gateA20 switch :-) -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD