From owner-freebsd-hackers Mon Jun 26 02:50:22 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA05546 for hackers-outgoing; Mon, 26 Jun 1995 02:50:22 -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 CAA05540 for ; Mon, 26 Jun 1995 02:50:18 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id CAA03377; Mon, 26 Jun 1995 02:49:48 -0700 From: "Rodney W. Grimes" Message-Id: <199506260949.CAA03377@gndrsh.aac.dev.com> Subject: Re: 2.05R reboot hangs To: bde@zeta.org.au (Bruce Evans) Date: Mon, 26 Jun 1995 02:49:48 -0700 (PDT) Cc: wpaul@skynet.ctr.columbia.edu, hackers@freebsd.org In-Reply-To: <199506252253.IAA08952@godzilla.zeta.org.au> from "Bruce Evans" at Jun 26, 95 08:53:31 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2293 Sender: hackers-owner@freebsd.org Precedence: bulk > > >I seem to recall reading somewhere that there's a BIOS routine that > >can be used for rebooting the system. Now, I know using BIOS calls is a > > I couldn't find a standard one in the Interrupt List. There is INT 19h > for the bootstrap loader, but it is unusable even from DOS because it > doesn't unhook hooked vectors. > > >no-no without a VM86 interface of some kind, but what I'm wondering > >is if it's possible to force the system back into real mode just long > >enough to call the BIOS reboot routine. > > If you put everything back into real mode exactly as it was at boot > time, then even INT 19h will work. `jmp 0xffff:0xfff0' probably > only requires putting the processor into an 8088'ish mode: no speical > stuff in cr0 (paging, protection, ...) and segment selectors that > make sense in real mode. The BIOS reset routine should handle gateA20. jmp 0xffff:0xfff0 is deadly on some machines unless a hard reset has just occured. Many BIOS writers only expected to start executing from that location on a hard reset and do not do full CPU chip initialization. > > >I've been reluctant to suggest this since I don't know a) how easy it > >would be to do a 'quick and dirty' switch back to real mode, b) if it's > > Very easy :-). The bootstrap does it for every keystroke. Paging > complicates things a bit but all ix86 manuals document the procedure > in detail. And the first requirement is that you have a page that is mapped physical==logical to do run the code in :-(. > >even _possible_ to switch back to real mode this late in the game, > >c) whether or not the BIOS reset call exists or if it's just a figment > >of my imagination or d) if it does exist, does it reset the system > >correctly (i.e. will it cause all hardware to be reset properly). > > There's no way to reset all hardware properly, even for warm boots > under DOS. Some BIOS's don't even reset serial ports that they > support. Correct, but setting location 0x471 to 0 helps a lot, as that tells the BIOS to do a cold boot, memory test and all. Actually any value other than the magic one we stuff in there in locore.s. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD