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

Re: [Xen-users] Booting efi and bios with one binary.



On Wed, 2015-02-25 at 15:21 -0800, Chris Takemura wrote:
> Hi everyone,
> 
> 
> My scenario involves virtualizing a variety of Windows machines, some
> of which have been installed with pure EFI bootloaders, some of which
> use BIOS.  I'm on Xen 4.4.1 with upstream QEMU 2.1.0, using xl.  I can
> boot EFI by setting "bios='ovmf'" or BIOS by setting "bios='seabios'",
> but not both.  I'd really like to be able to use OVMF with the seabios
> CSM to automatically boot whichever is appropriate.
> 
> 
> Here's the approach I've tried, based on instructions that I've found
> from the internet:
> 
> 
>  * build normally (modify Config.mk, configure --enable-ovmf, make
> dist)
>  * build seabios csm in tools/firmware/seabios-dir
>  * copy bios.bin into ovmf-dir/OvmfPkg/Csm/Csm16/Csm16.bin.

Have you seen http://www.seabios.org/Build_overview? It seems to suggest
that the output of the Seabios build in CSM mode is out/Csm16.bin, not
bios.bin.

>  * clean seabios-dir; reconfigure for xen/qemu directly.
>  * rebuild seabios
>  * modify ovmf-dir/Makefile to include -D ENABLE_CSM
>  * build ovmf
>  * build hvmloader
> 
> 
> I *think* that hvmloader includes the ovmf and seabios images within
> it.  Is that correct?  Is there any way I can check that the seabios
> csm is included?  Is it getting used?

I've no idea how this CSM stuff works, but would it not be expected that
Csm16.bin would be baked into the ovmf image somehow, and then that ovmf
image baked into hvmloader? (that wiki page seems to suggest that).

I'd be very surprised if ovmf was able to use the separate seabios baked
into hvmloader, it just has no way of even knowing it is there.
hvmloader just copies the appropriate blob (per BIOS selection) into the
right place in RAM and then jumps to it, so any other blob is
effectively lost at that point.

Other than the above filename thing, perhaps as an experiment try
putting a seabios CSM image into the ESP (EFI System Partition) of a
guest and loading it as an EFI application from the EFI shell (or adding
it to boot manager)? Once you have that aspect working then figure out
separately how to embed the CSM (if that's even possible, maybe ESP is
the right answer?).

If you do figure this out then it would be very appreciated if you could
document it at http://wiki.xen.org/wiki/OVMF [0]. Eventually I'd really
like to embed this stuff into the regular build (and perhaps make OVMF
w/ SeaBIOS CSM available the default BIOS, and perhaps deprecate bare
SeaBIOS with time). If you fancy doing some xen.git Makefile hacking let
me know ;-)

Ian.

[0] Due to a sustained spam attack wiki editor rights need to be
manually granted, once you've created a wiki account either drop me a
line or fill in the form at [1] and we'll set the bit on your account.

[1]
http://xenproject.org/component/content/article/100-misc/145-request-to-be-made-a-wiki-editor.html


>   Do I need a different source tree entirely?  (I'm just using the
> default git repos that the xen 4.4.1 makefile refers to.)  Is my
> understanding of how CSM is supposed to work incorrect?
> 
> 
> Thanks,
> 
> 
> -- 
> chris
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxx
> http://lists.xen.org/xen-users



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.