Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.development > #10000

Re: resetting RM IVT BIOS vectors to their defaults

From Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam>
Newsgroups alt.os.development, comp.os.msdos.programmer, alt.comp.bios
Subject Re: resetting RM IVT BIOS vectors to their defaults
Date 2016-08-27 19:11 -0400
Organization Aioe.org NNTP Server
Message-ID <20160827191129.16737d57@_> (permalink)
References <20160825185407.4aab5263@_> <nps366$r3i$1@dont-email.me>

Cross-posted to 3 groups.

Show all headers | View raw


On Sat, 27 Aug 2016 14:05:10 +0100
James Harris <james.harris.1@gmail.com> wrote:

> On 25/08/2016 23:54, Rod Pemberton wrote:
> >
> > This topic came up on alt.os.development.
> > Cross-posting to other DOS and BIOS groups.

> > While this issue of resetting the RM IVT came up in regards to OS
> > security, it is needed for other projects like Jim "Trixter"
> > Leonard's Flopper project which starts PC games which normally boot
> > directly from disk without DOS having been load.  DOS hooks BIOS
> > interrupts that are incompatible with the games.
> >
> > In order to effectively reset the RM IVT BIOS vectors to their
> > defaults, I think the best option is to simply save a clean copy of
> > the RM BIOS IVT and load that if you suspect something has hooked
> > the BIOS vectors.  
> 
> That, of course, would only work if you have access to the original
> IVT.
> 
> When an OS is started it may have no way to know what the original
> IVT was.
> 

I think the best we can assume is that the IVT is clean during install
of the OS.

> > That said, many BIOS vectors can be reset.  There are default
> > values, fixed entry points, and/or are saved by BIOS or DOS. These
> > can be used to reset most of the important vectors.  If you want to
> > do something like this, this information will be a start.  
> 
> I don't believe we can expect all BIOSes to follow the kinds of 
> addressing you mentioned (snipped).

It's true that we can't assume 100% compliance, but they should be very
reliable.  They're the historical values.  They're also required by the
EFI document Mike Gonta posted a link to.  I've checked about a dozen
different sources such as original AT BIOS, some leaked Award BIOS
source, BOCHs BIOS, Coreboot, and U-boot.  That's not including many
dozens of IVT dumps.  (I mistakenly said BIOS dumps earlier.)

> AISI, and from reading lots of AT BIOS code a year or so ago, the
> only way to reset the IVT to the BIOS defaults is to run through the
> BIOS bootup routine again.

That may very well be true for some of the vectors.  Some are hooked by
option ROMs or possibly set later by the BIOS.

> And as that won't return to our code the
> only way to run the BIOS boot process and get control back is to run
> the BIOS boot under a CPU (but not machine) emulator.

Hence, save a good copy of the IVT and load it.  Write your own 7C00h
code to save the IVT.  The IVT may have some hooked vectors, but if the
machine is clean, then they represent installed hardware or BIOS
settings.

An IVT is small enough that you don't need to use a checksum, but you
could checksum the IVT instead, as long as you have a good initial copy.


Rod Pemberton

Back to alt.os.development | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

resetting RM IVT BIOS vectors to their defaults Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-25 18:54 -0400
  Re: resetting RM IVT BIOS vectors to their defaults "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-08-25 20:22 -0700
  Re: resetting RM IVT BIOS vectors to their defaults Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-26 16:17 -0400
    Re: resetting RM IVT BIOS vectors to their defaults "Mike Gonta" <mikegonta@gmail.com> - 2016-08-26 18:10 -0400
  Re: resetting RM IVT BIOS vectors to their defaults James Harris <james.harris.1@gmail.com> - 2016-08-27 14:05 +0100
    Re: resetting RM IVT BIOS vectors to their defaults Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-27 19:11 -0400
      Re: resetting RM IVT BIOS vectors to their defaults James Harris <james.harris.1@gmail.com> - 2016-08-28 11:09 +0100
        Re: resetting RM IVT BIOS vectors to their defaults "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-08-28 03:35 -0700
          Re: resetting RM IVT BIOS vectors to their defaults James Harris <james.harris.1@gmail.com> - 2016-08-28 14:03 +0100
        Re: resetting RM IVT BIOS vectors to their defaults "Mike Gonta" <mikegonta@gmail.com> - 2016-08-28 09:08 -0400
        Re: resetting RM IVT BIOS vectors to their defaults rridge@taurine.csclub.uwaterloo.ca (Ross Ridge) - 2016-08-28 19:30 -0400
          Re: resetting RM IVT BIOS vectors to their defaults James Harris <james.harris.1@gmail.com> - 2016-08-29 07:59 +0100
          Re: resetting RM IVT BIOS vectors to their defaults "Mike Gonta" <mikegonta@gmail.com> - 2016-08-29 06:29 -0400
            Re: resetting RM IVT BIOS vectors to their defaults rridge@taurine.csclub.uwaterloo.ca (Ross Ridge) - 2016-09-03 20:43 -0400
          Re: resetting RM IVT BIOS vectors to their defaults "wolfgang kern" <nowhere@never.at> - 2016-08-30 10:06 +0200
            Re: resetting RM IVT BIOS vectors to their defaults "Mike Gonta" <mikegonta@gmail.com> - 2016-08-30 06:37 -0400
              Re: resetting RM IVT BIOS vectors to their defaults "wolfgang kern" <nowhere@never.at> - 2016-08-31 12:25 +0200

csiph-web