Date: Fri, 7 Nov 1997 18:16:14 -0800 From: Jonathan Mini <mini@d198-232.uoregon.edu> To: Mike Smith <mike@smith.net.au> Cc: hackers@FreeBSD.ORG Subject: Re: x86 gods; advice? Suggestions? Message-ID: <19971107181614.32380@micron.mini.net> In-Reply-To: <199711080201.MAA00452@word.smith.net.au>; from Mike Smith on Sat, Nov 08, 1997 at 12:31:29PM %2B1030 References: <19971107014444.46046@micron.mini.net> <199711080201.MAA00452@word.smith.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith <mike@smith.net.au> stands accused of saying: > > Mike Smith <mike@smith.net.au> stands accused of saying: > > > > What privelege level is this running at? > > > > > > It has to run with DPL = 0. > > > > Why? > > Because it has to in order to meet the spec. If you're interested, or > think you have some ideas on this, you can grab the spec from > microsoft's website. Make sure you get the clarification as well, as > there's a very confusing error in one of the critical digrams... hehehe. It should be possible to just give it i/o access to all of the ports, or if you feel parinoid, just a subset, and then ``emulate'' the exception 13 instruction cases. (there aren't many) Personally, I feel very insecure running a BIOS at DPL = 0. I certainly woulndn't like letting third party software muck with everything. (even if it is on a ROM (ok, a flashable ROM)) > > > > Why not just execute an illegal instruction and catch it? > > > > > > Because this is in the kernel context, and I've no way of knowing how > > > to say "just for now I want illegal instructions to come here". > > > > Although it seems less elegant, it seems to me that it really is the best > > solution to create threads for kernel-started processes for things like > > vm86/16-bit-protected-mode BIOS calls. > > Is it feasible to fork a process running in 16-bit protected mode? I > know the vm86 stuff works; I'm using it now. There should be no reason why not. In fact, most of the code to do it should be in place for the vm86 stuff. It's effectively the same. Just dink with the mode field in the TSS while creating a context for the task. > > What we need is an elegant way to fork a process to do something for the > > kernel. (an interesting concept when you think about it. Kind of a reverse > > syscall) > > It's actually pretty easy; with any luck I'll be happy enough with the > vm86 stuff to commit it tomorrow. Hear me cheer! I have been working on vm86 BIOS/DOS interaction for a while now for my own projects. If you have something elegant it will be a godsend. :) > > mike > -- Jonathan Mini Ingenious Productions Software Development P.O. Box 5693, Eugene, Or. 97405 "A child of five could understand this! Quick -- Fetch me a child of five."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971107181614.32380>