[edk2] [PATCH v2 08/12] ArmVirtualizationPkg: VirtFdtDxe: use dedicated VIRTIO_MMIO_TRANSPORT_GUID

Subject: [edk2] [PATCH v2 08/12] ArmVirtualizationPkg: VirtFdtDxe: use dedicated VIRTIO_MMIO_TRANSPORT_GUID

From: Laszlo Ersek <lersek@redhat.com>

To: edk2-devel@lists.sourceforge.net, drjones@redhat.com, ard.biesheuvel@linaro.org, peter.maydell@linaro.org

Date: 2014-12-06 03:17:30

  • 2014-12-06 03:17:30  Laszlo Ersek   [edk2] [PATCH v2 08/12] ArmVirtualizationPkg: VirtFdtDxe: use dedicated VIRTIO_MMIO_TRANSPORT_GUID
Installing VenHw() device paths with this GUID, for the virtio-mmio
transports that we detect, enables other modules to recognize those
VenHw() nodes. (Note that the actual value doesn't change.)

In addition, to avoid reusing GUIDs in unrelated contexts, detach the
driver's FILE_GUID from its previous value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek 
---
 ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf | 3 ++-
 ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c   | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
index daafe6c..514ce2f 100644
--- a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
+++ b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
@@ -16,7 +16,7 @@
 [Defines]
   INF_VERSION                    = 0x00010005
   BASE_NAME                      = VirtFdtDxe
-  FILE_GUID                      = 837DCA9E-E874-4D82-B29A-23FE0E23D1E2
+  FILE_GUID                      = 9AD7DCB4-E6EC-472E-96BF-81C219A3F77E
   MODULE_TYPE                    = DXE_DRIVER
   VERSION_STRING                 = 1.0
 
@@ -43,6 +43,7 @@
 
 [Guids]
   gFdtTableGuid
+  gVirtioMmioTransportGuid
 
 [Pcd]
   gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeBaseAddress
diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
index 55c0278..cc829d2 100644
--- a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
+++ b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 
 #pragma pack (1)
 typedef struct {
@@ -199,7 +200,8 @@ InitializeVirtFdtDxe (
         break;
       }
 
-      CopyMem (&DevicePath->Vendor.Guid, &gEfiCallerIdGuid, sizeof (EFI_GUID));
+      CopyMem (&DevicePath->Vendor.Guid, &gVirtioMmioTransportGuid,
+        sizeof (EFI_GUID));
       DevicePath->PhysBase = RegBase;
       SetDevicePathNodeLength (&DevicePath->Vendor,
                                sizeof (*DevicePath) - sizeof (DevicePath->End));
-- 
1.8.3.1



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel