OvmfPkg/QemuBootOrderLib: clean up translation of virtio-net over MMIO
authorLaszlo Ersek <lersek@redhat.com>
Tue, 13 Mar 2018 14:55:12 +0000 (15:55 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 14 Mar 2018 10:24:22 +0000 (11:24 +0100)
The "/MAC(" suffix of the translated UEFI devpath prefix is unnecessary
for matching, because the virtio-mmio base address in VenHwString is
unique anyway. Furthermore, the partial string "MAC(" cannot be processed
by ConvertTextToDevicePath(), which will become relevant later in this
series. Remove "/MAC(".

While at it, remove a bogus comment on PCI.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Shannon Zhao <zhaoshenglong@huawei.com>
Cc: Xiang Zheng <xiang.zheng@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # ArmVirtQemu
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Xiang Zheng <xiang.zheng@linaro.org>

index b699970b12ab4603d1a2a1a68ea98216820b0c8f..a4213cf6d267660a56cc34c3e405a5c03e09ec96 100644 (file)
@@ -1217,14 +1217,14 @@ TranslateMmioOfwNodes (
     //                |                             fixed\r
     //                base address of virtio-mmio register block\r
-    // UEFI device path prefix (dependent on presence of nonzero PCI function):\r
+    // UEFI device path prefix:\r
-    //   <VenHwString>/MAC(\r
+    //   <VenHwString>\r
     Written = UnicodeSPrintAsciiFormat (\r
                 *TranslatedSize * sizeof (*Translated), // BufferSize in bytes\r
-                "%s/MAC(",\r
+                "%s",\r
   } else {\r