The HyperNews Linux KHG Discussion Pages

## VM86 mode at which abstraction level?

  Forum: The Linux Kernel Hackers' Guide
  Re: calling interupts from linux (John J. Binder)
  Re: You can't (Michael K. Johnson)
  Re: Calling BIOS interrupts from Linux kernel (Ian Collier)
  Re: Possible, but takes work (Michael K. Johnson)
  Re: VBE video driver (Ian Collier)
  Keywords: interrupts callable from C.
  Date: Fri, 26 Sep 1997 15:53:09 GMT
  From: Michael K. Johnson <johnsonm@redhat.com>

If you mean VM86 mode as implemented by the I386 and higher processors, you want James Turley's Advanced 80386 Programming Techniques. Unfortunately, it is out of print. Fortunately, he has given me permission to scan it in and put it on the web. Unfortunately, that's a slow process, nowhere near completed. If you mean to ask how a user-space program can use Linux's vm86() syscall, use "man vm86". You may find a use to modify a process's ldt, in which case you will want to read "man modify_ldt". Those man pages may be slightly obsolete -- check them against recent dosemu and/or Wine source code. It seems clear to me from your description that your job should be relatively easy to do as a kernel device driver, for two reasons: You can make calls to some address from protected mode. It sets up a framebuffer, and Linux already has a standard way to set up framebuffers through ioctl's, as I already mentioned. Given those two considerations, you shouldn't have to know anything about vm86 mode at all.