Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 1999 03:33:18 -0500
From:      "Donn Miller" <dmm125@bellatlantic.net>
To:        <hackers@freebsd.org>
Subject:   Accessing the BIOS...
Message-ID:  <000701be6162$b52458e0$02000003@dmm125>

next in thread | raw e-mail | index | archive | help
I need to find out some information about how to write apps that access the
BIOS in
FreeBSD.  Obviously, since we are dealing with proteced mode, we can't use
INT 10h.  My
understanding is this (help me out here if I'm wrong):

(*)  FreeBSD makes a copy of the Bios image, which is what, 32kB in length?
We need to
find a pointer to the start of the Bios image, also known as the protected
mode entry point.

(*)  FreeBSD also makes a copy of the first 0x600 bytes of conventional
memory, which may
or may not be stored within the already existing BIOS image.  Obviously, a
far pointer is
required to access this if it is outside the range of the 32kB BIOS image.
FWIU, DOS uses
address locations 0x000-0x600 for some BIOS services, such as writing to the
VGA display.
It does this by passing arguments in the various registers (such as AX or
EAX) and calling INT
10.  In 16-bit or 32-bit protected mode, I don't know which, you can't pass
arguments in AX
and call int10.  You have to get a pointer to the protected mode entry
point.

(*)  Does FBSD use 16 or 32 bit protected-mode BIOS calls?  If they are
16-bit, I think you
use a selector:offest in the format 16:16.  32-bit protected-mode calls have
a selector:offset
format of 16:32.  I know this must involve using some arithmetic with DS or
ES registers, but
I'm not sure.

(*)  When FreeBSD makes a copy of the 32kB of BIOS, does it put it in the
same location
every time?  Also, I imagine Linux is very similar in its handling of
protected-mode BIOS calls,
but it probably puts the image in a different place, etc.

It seems like BIOS calls are pretty complicated in protected mode.  Why
aren't we allowed to
use INT 0x10, and use the registers (AX, etc.) in protected mode, but real
mode allows this?
I know other platforms, such as Macs, Sun SPARCS, and Alpha Stations don't
have an
explicit BIOS, but they do have some equivalent, like some kind of firmware.
Is programming
the "BIOS" in non-intel platforms as difficult as programming the BIOS on
PC's?

I think a good source of info would be Ralph's interrupt list. ;-)

Thanks


Donn










To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701be6162$b52458e0$02000003>