mirror of https://github.com/acidanthera/audk.git
[Description]:
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
This commit is contained in:
parent
b4d95a4da0
commit
c7493fe5f3
|
@ -29,10 +29,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
// Tiano Implementation specific Device Path definition.
|
// Tiano Implementation specific Device Path definition.
|
||||||
//
|
//
|
||||||
|
#pragma pack(1)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
VENDOR_DEVICE_PATH VendorDevicePath;
|
VENDOR_DEVICE_PATH VendorDevicePath;
|
||||||
UINT32 MonotonicCount;
|
UINT32 Reserved;
|
||||||
|
UINT64 UniqueId;
|
||||||
} HII_VENDOR_DEVICE_PATH_NODE;
|
} HII_VENDOR_DEVICE_PATH_NODE;
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
HII_VENDOR_DEVICE_PATH_NODE Node;
|
HII_VENDOR_DEVICE_PATH_NODE Node;
|
||||||
|
|
|
@ -40,6 +40,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePathTemplate = {
|
||||||
},
|
},
|
||||||
EFI_IFR_TIANO_GUID
|
EFI_IFR_TIANO_GUID
|
||||||
},
|
},
|
||||||
|
0,
|
||||||
0
|
0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -74,22 +75,23 @@ HiiLibCreateHiiDriverHandle (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
HII_VENDOR_DEVICE_PATH_NODE *VendorDevicePath;
|
HII_VENDOR_DEVICE_PATH_NODE *VendorDevicePath;
|
||||||
UINT64 MonotonicCount;
|
|
||||||
|
|
||||||
VendorDevicePath = AllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);
|
VendorDevicePath = AllocateCopyPool (sizeof (HII_VENDOR_DEVICE_PATH), &mHiiVendorDevicePathTemplate);
|
||||||
if (VendorDevicePath == NULL) {
|
if (VendorDevicePath == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
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;
|
*DriverHandle = NULL;
|
||||||
Status = gBS->InstallProtocolInterface (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
DriverHandle,
|
DriverHandle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
EFI_NATIVE_INTERFACE,
|
VendorDevicePath,
|
||||||
VendorDevicePath
|
NULL
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue