Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 1995 02:49:48 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        wpaul@skynet.ctr.columbia.edu, hackers@freebsd.org
Subject:   Re: 2.05R reboot hangs
Message-ID:  <199506260949.CAA03377@gndrsh.aac.dev.com>
In-Reply-To: <199506252253.IAA08952@godzilla.zeta.org.au> from "Bruce Evans" at Jun 26, 95 08:53:31 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> >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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506260949.CAA03377>