/** @file\r
- HII Library implementation that uses DXE protocols and services.\r
+Library instance for ExtendedHiiLib.\r
+ \r
+This library instance implements the common HII routines which is\r
+related to HII but reference data structures that are not defined in \r
+UEFI specification, for example HII_VENDOR_DEVICE_PATH.\r
+\r
\r
Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
**/\r
\r
\r
-#include <PiDxe.h>\r
-\r
+#include <Uefi.h>\r
#include <Protocol/DevicePath.h>\r
-\r
-#include <Library/BaseMemoryLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/DevicePathLib.h>\r
#include <MdeModuleHii.h>\r
\r
\r
//\r
// Hii vendor device path template\r
//\r
-HII_VENDOR_DEVICE_PATH mHiiVendorDevicePathTemplate = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED CONST HII_VENDOR_DEVICE_PATH mHiiVendorDevicePathTemplate = {\r
{\r
{\r
{\r
},\r
EFI_IFR_TIANO_GUID\r
},\r
+ 0,\r
0\r
},\r
{\r
{\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