[haiku-development] Re: Virtual 8086 mode support
- From: Ingo Weinhold <ingo_weinhold@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Sat, 26 Apr 2008 20:38:08 +0200
On 2008-04-26 at 19:02:50 [+0200], Jan Klötzke <jan.kloetzke@xxxxxxxxxx>
wrote:
> Am Samstag, 26. April 2008 schrieb Axel Dörfler:
> > I'm not sure why there should be any page faults inside a vm86 call -
> > wouldn't it be an appropriate requirement to only operate on locked in
> > memory there?
> > Or is there something we might not be able to control?
>
> Normally working on some locked pages should be sufficient. But the BIOS
> might
> go wild ;-) or the caller might forget to initialize a pointer where the
> BIOS
> writes back data.
I don't know about BIOSes going wild, but since the caller is the kernel,
unitialized pointers should never happen.
> The other option would be to create an area which covers
> the whole lower 640kb range (upper 384kb are always identity mapped). But
> then we waste 640k of (locked!) memory where we would need only one or two
> pages and I would rather like to detect such pointer errors.
>
> > In any case, the vm_page_fault() can always handle the problem - it
> > will either panic or crash the app in question if there is a more sever
> > problem. You could also use vm_soft_fault() instead of vm_page_fault()
> > if you need more control over this.
>
> The problem is that vm_page_fault() will just send a SIGSEGV but the vm86
> mode
> is not interrupted due to signals. In this case we end up in a deadlock
> because making vm86 (BIOS) calls interruptable doesn't seem to be a good
> option eighther.
>
> Anyway, using vm_soft_fault() specifically for the vm86 case looks like a
> viable option. I haven't tried it yet because it's declared "static" in
> vm.cpp.
Mmh, why not just use a fault handler?
CU, Ingo
- Follow-Ups:
- [haiku-development] Re: Virtual 8086 mode support
- From: Jan Klötzke
- References:
- [haiku-development] Re: Virtual 8086 mode support
- From: Axel Dörfler
- [haiku-development] Re: Virtual 8086 mode support
- From: Jan Klötzke
Other related posts:
- » [haiku-development] Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- » [haiku-development] Re: Virtual 8086 mode support
- [haiku-development] Re: Virtual 8086 mode support
- From: Jan Klötzke
- [haiku-development] Re: Virtual 8086 mode support
- From: Axel Dörfler
- [haiku-development] Re: Virtual 8086 mode support
- From: Jan Klötzke