[haiku-development] Re: vm86 Question

  • From: Jan Klötzke <jan.kloetzke@xxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 1 Oct 2008 00:34:41 +0200

Gerald Zajac <zajacg@xxxxxxxxxxxxx> wrote:
> My question:  Is there any particular reason that 0x1000 is used as the
> address for vbeModeInfo which is then set in the es & edi regs.?  From
> trial & error with the EDID code in the S3 driver, it appears that any
> address can be used as long as the address and the data are completely
> within the ram area set up by a previous call to vm86_prepare().  Is
> this correct?  The ram area has a starting address of 0.

The lowest possible address for such buffers is actually 0x1000. This is 
because of the interrupt vector table and the "BIOS Data Area" which goes up 
to 0x4ff. The rest until 0x1000 is used as real mode stack and therefore 
shouldn't be used. Beginning from 0x1000 you can then use any address up to 
the memory size given to vm86_prepare().

/Jan

Other related posts: