Subject: RE: i386_VM86
To: 'Frank van der Linden ' <fvdl@wasabisystems.com>
From: Brian Clough <Brian_Clough@phoenix.com>
List: port-i386
Date: 09/28/2001 18:31:49
 All video BIOS access comes from within the video driver.  This is stuff I
can't do at boot time.  An application calls into the video driver via
ioctl, and the driver needs to talk to the BIOS, in order to set the video
mode, and retrieve the address of the frame buffer.

If there's a better way to do this (call a BIOS interrupt during runtime)
please let me know.

-----Original Message-----
From: Frank van der Linden
To: Brian Clough
Cc: NetBSD i386 Mailing List
Sent: 9/28/01 1:51 PM
Subject: Re: i386_VM86

[cc-list trimmed to just port-i386]

On Fri, Sep 28, 2001 at 04:33:18PM -0400, Brian Clough wrote:
> Can someone point me toward an example of how to use i386_VM86() to
call int10?
> 
> I'd intended to access the VESA BIOS via int10 using bioscall(), and
that works
> fine during boot. However, at runtime, although the bioscall function
completes
> successfully, the system hangs soon after.  
> 
> Therefore, I'd like to see if i386_VM86() is a little more friendly,
when called
> at runtime.

bioscall is a kernel interface; i386_vm86 a userspace interface, so
that's
a big difference right there.

I don't know if there is a userspace program to go along with the kernel
part of your software, but if there is, i386_vm86 is a way to call
the BIOS from your user application. For an example, see the NetBSD
xsrc tree in:

	
xsrc/xc/programs/Xserver/hw/xfree86/vga256/drivers/s3_savage/lrmi.c

Using bioscall during runtime is risky business. 16 bit, real-mode BIOS
calls generally aren't made to be called from a system that is normally
in protected mode.

- Frank

-- 
Frank van der Linden                           fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service.   http://www.wasabisystems.com/