]> git.proxmox.com Git - mirror_edk2.git/commitdiff
[Description]:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 09:34:35 +0000 (09:34 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 09:34:35 +0000 (09:34 +0000)
 Sync 1 trackers.
 EDK 1098
[Impaction]:
Should be minimal impact as there is no code parsing the HII vendor specific device.
[Reference Info]:
EDK 1098 Seems there are two same device path protocols in NT

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5476 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Include/MdeModuleHii.h
MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c

index 8d9cc5c09b82c9109823973ee34a1b791b6d5f80..e0f1e778414549995bf6ba56ff9966ee0ff99a17 100644 (file)
@@ -29,10 +29,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Tiano Implementation specific Device Path definition.\r
 //\r
+#pragma pack(1)\r
 typedef struct {\r
   VENDOR_DEVICE_PATH             VendorDevicePath;\r
-  UINT32                         MonotonicCount;\r
+  UINT32                         Reserved;\r
+  UINT64                         UniqueId;\r
 } HII_VENDOR_DEVICE_PATH_NODE;\r
+#pragma pack()\r
 \r
 typedef struct {\r
   HII_VENDOR_DEVICE_PATH_NODE    Node;\r
index bfaf49e4b10d81a9c98313a7b085a5521b51b439..58908c5be94c47ac2c28f8e07f8a306f272deb1a 100644 (file)
@@ -40,6 +40,7 @@ HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePathTemplate = {
       },\r
       EFI_IFR_TIANO_GUID\r
     },\r
+    0,\r
     0\r
   },\r
   {\r
@@ -74,22 +75,23 @@ HiiLibCreateHiiDriverHandle (
 {\r
   EFI_STATUS                   Status;\r
   HII_VENDOR_DEVICE_PATH_NODE  *VendorDevicePath;\r
-  UINT64                       MonotonicCount;\r
 \r
   VendorDevicePath = AllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);\r
   if (VendorDevicePath == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  gBS->GetNextMonotonicCount (&MonotonicCount);\r
-  VendorDevicePath->MonotonicCount = (UINT32) MonotonicCount;\r
+  //\r
+  // Use memory address as unique ID to distinguish from different device paths\r
+  //\r
+  VendorDevicePath->UniqueId = (UINT64) ((UINTN) VendorDevicePath);\r
 \r
   *DriverHandle = NULL;\r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   DriverHandle,\r
                   &gEfiDevicePathProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  VendorDevicePath\r
+                  VendorDevicePath,\r
+                  NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r