Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 1999 15:34:00 -0500
From:      Donn Miller <dmm125@bellatlantic.net>
To:        Mike Smith <mike@smith.net.au>
Cc:        hackers@freebsd.org
Subject:   Re: Accessing the BIOS...
Message-ID:  <36D70538.8D09F7F@bellatlantic.net>
References:  <199902261746.JAA08392@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith wrote:

>
> > 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 don't use the BIOS for text output under FreeBSD.
>
> > You have to get a pointer to the protected mode entry
> > point.
>
> Again, no you don't.

The reason I was asking is that I was interested in programming with the VESA
BIOS extensions.  It was saying in their docs
(ftp://ftp.vesa.org/pub/VBE/vbe3.pdf) that an app needs to obtain the entry
points to the BIOS in order to carry out the VESA graphics operations.

>
>
> > (*)  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.
>
> The kernel can (and does) make real-mode, 16- and 32-bit protected mode
> BIOS calls.  Applications make none of the above.

So if I wanted to use the Vesa BIOS extensions to build an extension onto
libvgl, I would have to make certain calls to the kernel, and let the kernel
access the VESA BIOS instead of my letting app doing it directly?

In a nutshell, I wanted to help Soren out with his work on libvgl -- he was
going to add capabilities to libvgl that enable it to use VBE, or VESA BIOS
extensions.  By using VBE, you can get hi-res modes like 1024x768x16 million
colors without having a specific driver for the video card.  The disadvantage
would be, well, you'd have to have your app call the VESA BIOS in protected
mode, and using BIOS graphics would be a lot slower than using a specific
driver for a particular VGA card, without BIOS calls.

How can I access the BIOS then, would I have to use certain kernel functions,
or would I have to use a protected mode entry point?  If so, where is the
entry point located?

Thanks.  I'm kind of confused here. ;)



--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?36D70538.8D09F7F>