mirror of https://github.com/acidanthera/audk.git
Produce the same HiiVendor device path for each Pack that causes Framework HII NewPack service can't be called more than once.
Fix this bug to produce the difference HiiVendor device path for each Pack to support framework HII NewPack service. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8041 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4376a6f273
commit
6d931089df
|
@ -22,24 +22,25 @@ BOOLEAN mHiiPackageListUpdated = FALSE;
|
|||
HII_VENDOR_DEVICE_PATH mUefiHiiVendorDevicePath = {
|
||||
{
|
||||
{
|
||||
HARDWARE_DEVICE_PATH,
|
||||
HW_VENDOR_DP,
|
||||
{
|
||||
(UINT8) (sizeof (VENDOR_DEVICE_PATH)),
|
||||
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
|
||||
}
|
||||
HARDWARE_DEVICE_PATH,
|
||||
HW_VENDOR_DP,
|
||||
{
|
||||
(UINT8) (sizeof (HII_VENDOR_DEVICE_PATH_NODE)),
|
||||
(UINT8) ((sizeof (HII_VENDOR_DEVICE_PATH_NODE)) >> 8)
|
||||
}
|
||||
},
|
||||
EFI_CALLER_ID_GUID
|
||||
},
|
||||
//
|
||||
// {2A1F1827-03E2-4b2f-83DE-89B6073A0182}
|
||||
//
|
||||
{ 0x2a1f1827, 0x3e2, 0x4b2f, { 0x83, 0xde, 0x89, 0xb6, 0x7, 0x3a, 0x1, 0x82 } }
|
||||
0,
|
||||
0
|
||||
},
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
(UINT8) (sizeof (EFI_DEVICE_PATH_PROTOCOL)),
|
||||
(UINT8) ((sizeof (EFI_DEVICE_PATH_PROTOCOL)) >> 8)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -220,6 +221,7 @@ InstallDefaultConfigAccessProtocol (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
CONFIG_ACCESS_PRIVATE *ConfigAccessInstance;
|
||||
HII_VENDOR_DEVICE_PATH *HiiVendorPath;
|
||||
|
||||
ASSERT (ThunkContext->IfrPackageCount != 0);
|
||||
|
||||
|
@ -228,11 +230,23 @@ InstallDefaultConfigAccessProtocol (
|
|||
&gConfigAccessPrivateTempate
|
||||
);
|
||||
ASSERT (ConfigAccessInstance != NULL);
|
||||
|
||||
|
||||
//
|
||||
// Use memory address as unique ID to distinguish from different device paths
|
||||
// This function may be called multi times by the framework HII driver.
|
||||
//
|
||||
HiiVendorPath = AllocateCopyPool (
|
||||
sizeof (HII_VENDOR_DEVICE_PATH),
|
||||
&mUefiHiiVendorDevicePath
|
||||
);
|
||||
ASSERT (HiiVendorPath != NULL);
|
||||
|
||||
HiiVendorPath->Node.UniqueId = (UINT64) ((UINTN) HiiVendorPath);
|
||||
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&ThunkContext->UefiHiiDriverHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&mUefiHiiVendorDevicePath,
|
||||
HiiVendorPath,
|
||||
&gEfiHiiConfigAccessProtocolGuid,
|
||||
&ConfigAccessInstance->ConfigAccessProtocol,
|
||||
NULL
|
||||
|
|
|
@ -45,7 +45,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/HiiLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
|
||||
#include <Library/IfrSupportLib.h>
|
||||
|
@ -186,15 +185,22 @@ typedef struct {
|
|||
} BUFFER_STORAGE_ENTRY;
|
||||
|
||||
#pragma pack(1)
|
||||
///
|
||||
/// HII specific Vendor Device Path Node definition.
|
||||
///
|
||||
typedef struct {
|
||||
VENDOR_DEVICE_PATH VendorDevicePath;
|
||||
UINT32 Reserved;
|
||||
UINT64 UniqueId;
|
||||
} HII_VENDOR_DEVICE_PATH_NODE;
|
||||
|
||||
///
|
||||
/// HII specific Vendor Device Path definition.
|
||||
///
|
||||
typedef struct {
|
||||
VENDOR_DEVICE_PATH VendorDevicePath;
|
||||
HII_VENDOR_DEVICE_PATH_NODE Node;
|
||||
EFI_DEVICE_PATH_PROTOCOL End;
|
||||
} HII_VENDOR_DEVICE_PATH;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#define CONFIG_ACCESS_PRIVATE_SIGNATURE SIGNATURE_32 ('H', 'T', 'c', 'a')
|
||||
|
|
Loading…
Reference in New Issue