Subject: Re: i386_VM86
To: Brian Clough <Brian_Clough@phoenix.com>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: port-i386
Date: 09/28/2001 22:51:50
[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/