summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/MdeModuleHii.h5
-rw-r--r--MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/MdeModulePkg/Include/MdeModuleHii.h b/MdeModulePkg/Include/MdeModuleHii.h
index 8d9cc5c..e0f1e77 100644
--- a/MdeModulePkg/Include/MdeModuleHii.h
+++ b/MdeModulePkg/Include/MdeModuleHii.h
@@ -29,10 +29,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Tiano Implementation specific Device Path definition.
//
+#pragma pack(1)
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
- UINT32 MonotonicCount;
+ UINT32 Reserved;
+ UINT64 UniqueId;
} HII_VENDOR_DEVICE_PATH_NODE;
+#pragma pack()
typedef struct {
HII_VENDOR_DEVICE_PATH_NODE Node;
diff --git a/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c b/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c
index bfaf49e..58908c5 100644
--- a/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c
+++ b/MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c
@@ -40,6 +40,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePathTemplate = {
},
EFI_IFR_TIANO_GUID
},
+ 0,
0
},
{
@@ -74,22 +75,23 @@ HiiLibCreateHiiDriverHandle (
{
EFI_STATUS Status;
HII_VENDOR_DEVICE_PATH_NODE *VendorDevicePath;
- UINT64 MonotonicCount;
VendorDevicePath = AllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);
if (VendorDevicePath == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- gBS->GetNextMonotonicCount (&MonotonicCount);
- VendorDevicePath->MonotonicCount = (UINT32) MonotonicCount;
+ //
+ // Use memory address as unique ID to distinguish from different device paths
+ //
+ VendorDevicePath->UniqueId = (UINT64) ((UINTN) VendorDevicePath);
*DriverHandle = NULL;
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
DriverHandle,
&gEfiDevicePathProtocolGuid,
- EFI_NATIVE_INTERFACE,
- VendorDevicePath
+ VendorDevicePath,
+ NULL
);
if (EFI_ERROR (Status)) {
return Status;