[RFC] Virtual 8086 mode support for kernel drivers

Jan Klötzke <[email protected]> Tue, 29 Apr 2008 00:45:53 +0200
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
Hi,

This the current version of my patch for vm86 mode support. I'm posting this
time here because it looks like the more apropriate place. ;-)

The syscall is now gone. The new API may be used from kernel drivers but only
on behalf of a user thread, e.g. from a ioctl() syscall. A typical usage will
look like the following. Error checking left out for simplicity...

{
	struct vm86_state state;

	vm86_prepare(&state, VM86_MIN_RAM_SIZE);

	state.regs.eax = 0x4f00;
	state.regs.ebx = 0x8115;
	vm86_do_int(&state, 0x10);

	vm86_cleanup(&state);
}

I picked up Ingo's suggestion for a "page_fault_callback" to catch unhandled
page faults in vm86 mode. See the last patch in the series for the details.

Any suggestions/comments are welcome. :-)

/Jan

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone