Subject: Re: Location for x86emu
To: Joerg Sonnenberger <>
From: Terry Moore <>
List: tech-kern
Date: 12/02/2007 04:12:43
At 02:55 PM 12/1/2007 +0100, Joerg Sonnenberger wrote:
>On Sat, Dec 01, 2007 at 02:16:53AM -0500, Terry Moore wrote:
> > I believe that many ROMs call functions in the base BIOS.  In that case,
> > wouldn't you also have to provide a BIOS image for them to call into?  In
> > the bad old days, certain things were referenced at hard addresses, & I
> > imagine that practice is not totally eliminated.
>I don't think any adapter BIOS has hard-coded addresses for BIOS calls,
>but using the interrupt services seems likely. Yes, those areas have to
>be identified as well.

It is an interesting problem.

You can decide not to support them -- this is all ancient history at 
this point.  However, I knew of adapters that did use hard coded 
addresses.   (If I recall correctly, you can't even get precise 
version information without examining a signature that's close to the 
real-mode reset vector at 0xFFFF:0.)

This is why "PC compatible" BIOS companies like Phoenix had a 
business, because it was hard to legally get that level of 
compatibility without clean-room work -- one team referencing the 
published IBM BIOS source, a team of lawyers in the middle, and a 
second isolated team re-implementing based only on lawyer-approved 

Another thing to consider:  the BIOS data area and interrupt linkage 
also has to be initialized.  Again, no problem if you've booted 
through the real BIOS.  Many adapters stole real-mode memory during 
initialization by adjusting the top of real-mode memory -- that was 
not done through interrupt calls, but by knowing how the BIOS data 
was laid out and adjusting the top-of-memory pointer.

For consistency, and to ensure that you don't get strange 
interactions with the real BIOS -- to do all their graphic tricks at 
boot time, they resort to some pretty wacky practices --, you might 
want to do what other PC emulators do, and supply a BIOS that's used 
in the virtual real-mode machine.  I imagine that there are 
open-source BIOSes that are adequate for this purpose -- what does QEMU use?