Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 1999 12:38:16 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Donn Miller <dmm125@bellatlantic.net>
Cc:        hackers@freebsd.org
Subject:   Re: Accessing the BIOS... 
Message-ID:  <199902262038.MAA09282@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 26 Feb 1999 15:34:00 EST." <36D70538.8D09F7F@bellatlantic.net> 

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

The kernel will/should make the VESA BIOS calls on your behalf.  There 
is already basic support for this in the kernel; it probably needs to 
be extended.

> > > (*)  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?

Yup.

> 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.

Since the VESA BIOS doesn't actually contain any drawing functions, 
the only "speed" issues are page flipping and palette operations.  Page 
flipping shouldn't be a real problem because in almost every case you 
would want to use the linear framebuffer mode and memory-map the LFB 
aperture into your application.

> 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?

Again, you cannot call the BIOS from your application.  Noway, nohow.  
Forget about even *dreaming* of doing that.

See /sys/i386/isa/vesa.c, consult with Soren and Kazu about how best to 
implement any missing functionality inre VESA calls, and then do 
everything across the /dev/vesa interface.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com




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?199902262038.MAA09282>