diff mbox

[edk2,v2,6/6] OvmfPkg/QemuBootOrderLib: adapt Q35 SATA PMPN to UEFI spec Mantis 1353

Message ID 1462847091-32836-7-git-send-email-hao.a.wu@intel.com
State Accepted
Commit d5aee61bfaaa57357d0c6790d61894ef5d2aab10
Headers show

Commit Message

Wu, Hao A May 10, 2016, 2:24 a.m. UTC
From: Laszlo Ersek <lersek@redhat.com>


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 QemuBootOrderLib.

(Note: QemuBootOrderLib is deprecated at this point (see USE_OLD_BDS in
the DSC files), but until we remove it, it should be kept in sync with
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>

---
 OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
index 15065b7..582b0bc 100644
--- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
+++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
@@ -786,11 +786,11 @@  TranslatePciOfwNodes (
     //
     // UEFI device path:
     //
-    //   PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)
-    //                                   ^   ^   ^
-    //                                   |   |   LUN (always 0 on Q35)
+    //   PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)
+    //                                   ^   ^      ^
+    //                                   |   |      LUN (always 0 on Q35)
     //                                   |   port multiplier port number,
-    //                                   |   always 0 on Q35
+    //                                   |   always 0xFFFF on Q35
     //                                   channel (port) number
     //
     UINT64 Channel;
@@ -805,7 +805,7 @@  TranslatePciOfwNodes (
     Written = UnicodeSPrintAsciiFormat (
       Translated,
       *TranslatedSize * sizeof (*Translated), // BufferSize in bytes
-      "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0x0,0x0)",
+      "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0xFFFF,0x0)",
       PciRoot,
       Bridges,
       PciDevFun[0],