On Jan 21, 2013, at 4:17 PM, David Woodhouse <dw...@infradead.org> wrote:

> When I have a virtio disk attached to a qemu VM, it doesn't appear in
> the OVMF boot menu, so I can't boot from it. This is because the
> BdsGetBootTypeFromDevicePath() function in GenericBdsLib.c only works on
> the device path and isn't able to infer that 'PciRoot(0x0)/Pci(0x5,0x0)'
> is a virtio disk. It could be *any* PCI device, if the path is all
> you're looking at.
> 
> Should the VirtioBlk driver actually be registering a *child* of the Pci
> device node, such as PciRoot(0x0)/Pci(0x5,0x0)/Virtio(0), so that we can
> automatically work out what it is from the path? Or is there a better
> way?
> 

Not sure if BdsGetBootTypeFromDevicePath() is broken, or functioning as 
intended. Remember in EFI there is not a concept of a bootable non-removable 
block IO device.  The OS installs the OS loader as a file and updates a 
variable to contain the path to the OS loader. This allows an arbitrary number 
of operating systems to boot from a single disk. So if you add a "bootable" 
disk into a system you still have to manually config the file that is the OS 
loader. 

It is possible to add heuristics to know about well known loader names, etc, 
but the open source code does not do any of this. 

If BdsGetBootTypeFromDevicePath() is broken it will be to not treat any device 
that produces Block IO as potentially bootable. 

> I expected to see it appear *twice* in my boot menu; once for EFI
> booting and once for the CSM. But neither of them appear...

I've not thought about legacy BIOS for a long time, but you boot from C: or A:. 
It is up to the BIOS to define what is A: or what is C:  The BBS spec allows 
selection of what is C: but that is a CSM and not EFI thing. You should be able 
to add a BBS device path node for C: and let the CSM figure out what is C:. 

Thanks,

Andrew

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to