From owner-freebsd-hackers Fri Feb 26 19:48: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id 3E4C1150A6 for ; Fri, 26 Feb 1999 19:48:04 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:EYm3hwZBJx8WPwRqivQuBUJuCmrUpECi@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.1/8.9.1) with ESMTP id MAA22414; Sat, 27 Feb 1999 12:46:16 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id MAA06084; Sat, 27 Feb 1999 12:49:19 +0900 (JST) Message-Id: <199902270349.MAA06084@zodiac.mech.utsunomiya-u.ac.jp> To: Donn Miller Cc: Mike Smith , hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: Accessing the BIOS... In-reply-to: Your message of "Fri, 26 Feb 1999 15:34:00 EST." <36D70538.8D09F7F@bellatlantic.net> References: <199902261746.JAA08392@dingo.cdrom.com> <36D70538.8D09F7F@bellatlantic.net> Date: Sat, 27 Feb 1999 12:49:18 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> > 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. 3.0 or later versions of FreeBSD has the VESA module which will take care of these. The userland programs are not expected call the VESA BIOS directly, but is served by the VESA module to which the programs access via ioctl. >> > (*) 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? The kernel VESA module should provide necessary services. If the current version of the module lacks certain functions you need, it must be added. But, the idea is clear; it is the VESA module which will call the VESA BIOS, not the userland programs. >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. Yes, we need that! >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. The VESA BIOS does not provide any graphic drawing functions. The userland program would set the desired video mode, mmap the video memory to the user memory space, and draws whatever it wants to the memory location. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message