mirror of https://github.com/acidanthera/audk.git
OvmfPkg: QemuBootOrder: recognize virtio-blk OFW device paths
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13801 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ec01afdbbf
commit
e06a4cd134
|
@ -606,6 +606,32 @@ TranslateOfwNodes (
|
||||||
PciDevFun[1],
|
PciDevFun[1],
|
||||||
AcpiUid
|
AcpiUid
|
||||||
);
|
);
|
||||||
|
} else if (NumNodes >= 3 &&
|
||||||
|
SubstringEq (OfwNode[1].DriverName, "scsi") &&
|
||||||
|
SubstringEq (OfwNode[2].DriverName, "disk")
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
// OpenFirmware device path (virtio-blk disk):
|
||||||
|
//
|
||||||
|
// /pci@i0cf8/scsi@6[,3]/disk@0,0
|
||||||
|
// ^ ^ ^ ^ ^
|
||||||
|
// | | | fixed
|
||||||
|
// | | PCI function corresponding to disk (optional)
|
||||||
|
// | PCI slot holding disk
|
||||||
|
// PCI root at system bus port, PIO
|
||||||
|
//
|
||||||
|
// UEFI device path prefix:
|
||||||
|
//
|
||||||
|
// PciRoot(0x0)/Pci(0x6,0x0)/HD( -- if PCI function is 0 or absent
|
||||||
|
// PciRoot(0x0)/Pci(0x6,0x3)/HD( -- if PCI function is present and nonzero
|
||||||
|
//
|
||||||
|
Written = UnicodeSPrintAsciiFormat (
|
||||||
|
Translated,
|
||||||
|
*TranslatedSize * sizeof (*Translated), // BufferSize in bytes
|
||||||
|
"PciRoot(0x0)/Pci(0x%x,0x%x)/HD(",
|
||||||
|
PciDevFun[0],
|
||||||
|
PciDevFun[1]
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return RETURN_UNSUPPORTED;
|
return RETURN_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue