Re: The way of mapping BIOS into the guest's address space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 14, 2012 at 04:13:42PM +0400, Cyrill Gorcunov wrote:
> On Tue, Feb 14, 2012 at 01:10:59PM +0200, Pekka Enberg wrote:
> > On Tue, Feb 14, 2012 at 1:03 PM, Yang Bai <hamo.by@xxxxxxxxx> wrote:
> > > Since on X86, bios is always at the end of the address space, so I
> > > have some thought about how to implement the seabios support for kvm
> > > tool.
> > >
> > > 1. using kvm__register_mem to map the end of address space to the
> > > guest then copy the code of seabios to this mem region. Just emulating
> > > the bios chip.
> 
> I think this is what should be done.
> 
> > >
> > > 2. leave the bios code alone and don't touch the guest's address
> > > space. If the guest accesses the address belonging to the bios, it
> > > will be an IO request and we can emulate the IO access to the bios
> > > chip.
> > >
> > > Any ideas about this?
> > 
> > The latter solution doesn't make any sense to me. Cyrill, do we really
> > need to put the BIOS at the end of the address space? Don't we have
> > unused space below 1 MB?
> 
> I don't remember for sure how SeaBIOS works actually. What I rememer
> is that it aquires all hw environment might have. So without real look
> into seabios code I fear I can't answer. But reserving end of 4G address
> space for bios copy sounds reasonable if we going to behave as real
> hardware. Maybe we could poke someone from KVM camp for a hint?

SeaBIOS has two ways to be deployed - first is to copy the image to
the top of the first 1MB (eg, 0xe0000-0xfffff) and jump to
0xf000:0xfff0 in 16bit mode.  The second way is to use the SeaBIOS elf
and deploy into memory (according to the elf memory map) and jump to
SeaBIOS in 32bit mode (according to the elf entry point).

SeaBIOS doesn't really need to be in the top 4G of ram.  SeaBIOS does
expect to have normal PC hardware devices (eg, a PIC), though many
hardware devices can be compiled out via its kconfig interface.  The
more interesting challenge will likely be in communicating critical
pieces of information (eg, total memory size) into SeaBIOS.

The SeaBIOS mailing list (seabios@xxxxxxxxxxx) is probably a better
location for technical seabios questions.

-Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux