]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuNewBootOrderLib: adapt Q35 SATA PMPN to UEFI spec Mantis 1353
authorLaszlo Ersek <lersek@redhat.com>
Mon, 9 May 2016 11:32:26 +0000 (19:32 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 12 May 2016 06:18:49 +0000 (14:18 +0800)
On the Q35 machine type of QEMU, there is no port multiplier connected to
the on-board SATA controller. Therefore the AtaAtapiPassThru driver update
for Mantis ticket 1353 <https://mantis.uefi.org/mantis/view.php?id=1353>
changes the middle number (the Port Multiplier Port Number) in the Sata()
device path nodes from 0x0 to 0xFFFF.

Adapt the translation from OpenFirmware in QemuNewBootOrderLib.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c

index 6c576121c2d0971f0bfd3fe59fc39400d74f87bb..c5f165ae4e234f64b03309384a844ad6f22df011 100644 (file)
@@ -786,11 +786,11 @@ TranslatePciOfwNodes (
     //\r
     // UEFI device path:\r
     //\r
-    //   PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)\r
-    //                                   ^   ^   ^\r
-    //                                   |   |   LUN (always 0 on Q35)\r
+    //   PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)\r
+    //                                   ^   ^      ^\r
+    //                                   |   |      LUN (always 0 on Q35)\r
     //                                   |   port multiplier port number,\r
-    //                                   |   always 0 on Q35\r
+    //                                   |   always 0xFFFF on Q35\r
     //                                   channel (port) number\r
     //\r
     UINT64 Channel;\r
@@ -805,7 +805,7 @@ TranslatePciOfwNodes (
     Written = UnicodeSPrintAsciiFormat (\r
       Translated,\r
       *TranslatedSize * sizeof (*Translated), // BufferSize in bytes\r
-      "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0x0,0x0)",\r
+      "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0xFFFF,0x0)",\r
       PciRoot,\r
       Bridges,\r
       PciDevFun[0],\r