Clean up the private GUID definition in module Level.

0. Remove the unused private GUID from module source files.
1. Use gEfiCallerIdGuid replace of the private module GUID.
2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver.

Signed-off-by: lgao4
Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 ftian



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12375 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2011-09-18 12:25:27 +00:00
parent e24fc1032d
commit a0c56a8219
29 changed files with 223 additions and 156 deletions

View File

@ -29,10 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/SmmCommunication.h>
#include <Protocol/SmmVariable.h>
#define EFI_VARIABLE_GUID \
{ 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d } }
EFI_GUID mEfiVariableGuid = EFI_VARIABLE_GUID;
extern EFI_GUID gEfiVariableGuid;
EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication = NULL;
/**
@ -208,7 +205,7 @@ UefiMain (
VARIABLE_INFO_ENTRY *VariableInfo;
VARIABLE_INFO_ENTRY *Entry;
Status = EfiGetSystemConfigurationTable (&mEfiVariableGuid, (VOID **)&Entry);
Status = EfiGetSystemConfigurationTable (&gEfiVariableGuid, (VOID **)&Entry);
if (EFI_ERROR (Status) || (Entry == NULL)) {
Status = EfiGetSystemConfigurationTable (&gEfiAuthenticatedVariableGuid, (VOID **)&Entry);
}

View File

@ -51,4 +51,4 @@
[Guids]
gEfiAuthenticatedVariableGuid ## CONSUMES ## Configuration Table Guid
gEfiVariableGuid ## CONSUMES ## Configuration Table Guid

View File

@ -0,0 +1,29 @@
/** @file
GUID used as HII FormSet and HII Package list GUID in PwdCredentialProviderDxe driver.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __PWD_CREDENTIAL_PROVIDER_HII_H__
#define __PWD_CREDENTIAL_PROVIDER_HII_H__
//
// Used for save password credential and form browser.
// Also used as provider identifier.
//
#define PWD_CREDENTIAL_PROVIDER_GUID \
{ \
0x78b9ec8b, 0xc000, 0x46c5, { 0xac, 0x93, 0x24, 0xa0, 0xc1, 0xbb, 0x0, 0xce } \
}
extern EFI_GUID gPwdCredentialProviderGuid;
#endif

View File

@ -0,0 +1,25 @@
/** @file
GUIDs used as HII FormSet and HII Package list GUID in TcgConfig driver.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __TCG_CONFIG_HII_GUID_H__
#define __TCG_CONFIG_HII_GUID_H__
#define TCG_CONFIG_FORM_SET_GUID \
{ \
0xb0f901e4, 0xc424, 0x45de, {0x90, 0x81, 0x95, 0xe2, 0xb, 0xde, 0x6f, 0xb5 } \
}
extern EFI_GUID gTcgConfigFormSetGuid;
#endif

View File

@ -0,0 +1,29 @@
/** @file
GUID used as HII Package list GUID in UsbCredentialProviderDxe driver.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __USB_CREDENTIAL_PROVIDER_HII_H__
#define __USB_CREDENTIAL_PROVIDER_HII_H__
//
// Used for save password credential and form browser
// And used as provider identifier
//
#define USB_CREDENTIAL_PROVIDER_GUID \
{ \
0xd0849ed1, 0xa88c, 0x4ba6, { 0xb1, 0xd6, 0xab, 0x50, 0xe2, 0x80, 0xb7, 0xa9 }\
}
extern EFI_GUID gUsbCredentialProviderGuid;
#endif

View File

@ -0,0 +1,25 @@
/** @file
GUID used as HII FormSet and HII Package list GUID in UserIdentifyManagerDxe driver.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __USER_IDENTIFY_MANAGER_HII_H__
#define __USER_IDENTIFY_MANAGER_HII_H__
#define USER_IDENTIFY_MANAGER_GUID \
{ \
0x3ccd3dd8, 0x8d45, 0x4fed, { 0x96, 0x2d, 0x2b, 0x38, 0xcd, 0x82, 0xb3, 0xc4 } \
}
extern EFI_GUID gUserIdentifyManagerGuid;
#endif

View File

@ -0,0 +1,25 @@
/** @file
GUID used as HII FormSet and HII Package list GUID in UserProfileManagerDxe driver.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __USER_PROFILE_MANAGER_HII_H__
#define __USER_PROFILE_MANAGER_HII_H__
#define USER_PROFILE_MANAGER_GUID \
{ \
0xc35f272c, 0x97c2, 0x465a, { 0xa2, 0x16, 0x69, 0x6b, 0x66, 0x8a, 0x8c, 0xfe } \
}
extern EFI_GUID gUserProfileManagerGuid;
#endif

View File

@ -40,6 +40,21 @@
## Include/Guid/PhysicalPresenceData.h
gEfiPhysicalPresenceGuid = { 0xf6499b1, 0xe9ad, 0x493d, { 0xb9, 0xc2, 0x2f, 0x90, 0x81, 0x5c, 0x6c, 0xbc }}
## Include/Guid/PwdCredentialProviderHii.h
gPwdCredentialProviderGuid = { 0x78b9ec8b, 0xc000, 0x46c5, { 0xac, 0x93, 0x24, 0xa0, 0xc1, 0xbb, 0x0, 0xce }}
## Include/Guid/UsbCredentialProviderHii.h
gUsbCredentialProviderGuid = { 0xd0849ed1, 0xa88c, 0x4ba6, { 0xb1, 0xd6, 0xab, 0x50, 0xe2, 0x80, 0xb7, 0xa9 }}
## Include/Guid/UserIdentifyManagerHii.h
gUserIdentifyManagerGuid = { 0x3ccd3dd8, 0x8d45, 0x4fed, { 0x96, 0x2d, 0x2b, 0x38, 0xcd, 0x82, 0xb3, 0xc4 }}
## Include/Guid/UserProfileManagerHii.h
gUserProfileManagerGuid = { 0xc35f272c, 0x97c2, 0x465a, { 0xa2, 0x16, 0x69, 0x6b, 0x66, 0x8a, 0x8c, 0xfe }}
## Include/Guid/TcgConfigHii.h
gTcgConfigFormSetGuid = { 0xb0f901e4, 0xc424, 0x45de, { 0x90, 0x81, 0x95, 0xe2, 0xb, 0xde, 0x6f, 0xb5 }}
[Ppis]
## Include/Ppi/LockPhysicalPresence.h

View File

@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "TcgConfigNvData.h"
formset
guid = TCG_CONFIG_PRIVATE_GUID,
guid = TCG_CONFIG_FORM_SET_GUID,
title = STRING_TOKEN(STR_TPM_TITLE),
help = STRING_TOKEN(STR_TPM_HELP),
classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID,
@ -23,7 +23,7 @@ formset
varstore TCG_CONFIGURATION,
varid = TCG_CONFIGURATION_VARSTORE_ID,
name = TCG_CONFIGURATION,
guid = TCG_CONFIG_PRIVATE_GUID;
guid = TCG_CONFIG_FORM_SET_GUID;
form formid = TCG_CONFIGURATION_FORM_ID,
title = STRING_TOKEN(STR_TPM_TITLE);

View File

@ -14,8 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "TcgConfigImpl.h"
EFI_GUID gTcgConfigPrivateGuid = TCG_CONFIG_PRIVATE_GUID;
/**
The entry point for Tcg configuration driver.
@ -52,7 +50,7 @@ TcgConfigDriverEntryPoint (
Status = gBS->OpenProtocol (
ImageHandle,
&gTcgConfigPrivateGuid,
&gEfiCallerIdGuid,
NULL,
ImageHandle,
ImageHandle,
@ -86,7 +84,7 @@ TcgConfigDriverEntryPoint (
//
Status = gBS->InstallMultipleProtocolInterfaces (
&ImageHandle,
&gTcgConfigPrivateGuid,
&gEfiCallerIdGuid,
PrivateData,
NULL
);
@ -125,7 +123,7 @@ TcgConfigDriverUnload (
Status = gBS->HandleProtocol (
ImageHandle,
&gTcgConfigPrivateGuid,
&gEfiCallerIdGuid,
(VOID **) &PrivateData
);
if (EFI_ERROR (Status)) {
@ -136,7 +134,7 @@ TcgConfigDriverUnload (
gBS->UninstallMultipleProtocolInterfaces (
&ImageHandle,
&gTcgConfigPrivateGuid,
&gEfiCallerIdGuid,
PrivateData,
NULL
);

View File

@ -55,6 +55,7 @@
[Guids]
gEfiPhysicalPresenceGuid
gEfiIfrTianoGuid
gTcgConfigFormSetGuid
[Protocols]
gEfiHiiConfigAccessProtocolGuid ## PRODUCES

View File

@ -14,7 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "TcgConfigImpl.h"
EFI_GUID mTcgFormSetGuid = TCG_CONFIG_PRIVATE_GUID;
CHAR16 mTcgStorageName[] = L"TCG_CONFIGURATION";
TCG_CONFIG_PRIVATE_DATA mTcgConfigPrivateDateTemplate = {
@ -36,7 +35,7 @@ HII_VENDOR_DEVICE_PATH mTcgHiiVendorDevicePath = {
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
TCG_CONFIG_PRIVATE_GUID
TCG_CONFIG_FORM_SET_GUID
},
{
END_DEVICE_PATH_TYPE,
@ -166,7 +165,7 @@ TcgExtractConfig (
}
*Progress = Request;
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &mTcgFormSetGuid, mTcgStorageName)) {
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gTcgConfigFormSetGuid, mTcgStorageName)) {
return EFI_NOT_FOUND;
}
@ -220,7 +219,7 @@ TcgExtractConfig (
// Allocate and fill a buffer large enough to hold the <ConfigHdr> template
// followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator
//
ConfigRequestHdr = HiiConstructConfigHdr (&mTcgFormSetGuid, mTcgStorageName, PrivateData->DriverHandle);
ConfigRequestHdr = HiiConstructConfigHdr (&gTcgConfigFormSetGuid, mTcgStorageName, PrivateData->DriverHandle);
Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
ConfigRequest = AllocateZeroPool (Size);
ASSERT (ConfigRequest != NULL);
@ -290,7 +289,7 @@ TcgRouteConfig (
}
*Progress = Configuration;
if (!HiiIsConfigHdrMatch (Configuration, &mTcgFormSetGuid, mTcgStorageName)) {
if (!HiiIsConfigHdrMatch (Configuration, &gTcgConfigFormSetGuid, mTcgStorageName)) {
return EFI_NOT_FOUND;
}
@ -460,7 +459,7 @@ InstallTcgConfigForm (
// Publish the HII package list
//
HiiHandle = HiiAddPackages (
&mTcgFormSetGuid,
&gTcgConfigFormSetGuid,
DriverHandle,
TcgConfigDxeStrings,
TcgConfigBin,

View File

@ -17,11 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/HiiPlatformSetupFormset.h>
#include <Guid/PhysicalPresenceData.h>
#define TCG_CONFIG_PRIVATE_GUID \
{ \
0xb0f901e4, 0xc424, 0x45de, {0x90, 0x81, 0x95, 0xe2, 0xb, 0xde, 0x6f, 0xb5 } \
}
#include <Guid/TcgConfigHii.h>
#define TCG_CONFIGURATION_VARSTORE_ID 0x0001
#define TCG_CONFIGURATION_FORM_ID 0x0001

View File

@ -18,12 +18,6 @@ CREDENTIAL_TABLE *mPwdTable = NULL;
PWD_PROVIDER_CALLBACK_INFO *mCallbackInfo = NULL;
PASSWORD_CREDENTIAL_INFO *mPwdInfoHandle = NULL;
//
// Used for save password credential and form browser.
// Also used as provider identifier.
//
EFI_GUID mPwdCredentialGuid = PWD_CREDENTIAL_PROVIDER_GUID;
HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
{
{
@ -34,7 +28,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
{ 0xeba7fc2b, 0xa465, 0x4d96, { 0x85, 0xa9, 0xd2, 0xf6, 0x64, 0xdf, 0x9b, 0x45 } }
PWD_CREDENTIAL_PROVIDER_GUID
},
{
END_DEVICE_PATH_TYPE,
@ -180,7 +174,7 @@ ModifyTable (
//
Status = gRT->SetVariable (
L"PwdCredential",
&mPwdCredentialGuid,
&gPwdCredentialProviderGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
mPwdTable->Count * sizeof (PASSWORD_INFO),
&mPwdTable->UserInfo
@ -212,7 +206,7 @@ InitCredentialTable (
Var = NULL;
Status = gRT->GetVariable (
L"PwdCredential",
&mPwdCredentialGuid,
&gPwdCredentialProviderGuid,
NULL,
&VarSize,
Var
@ -224,7 +218,7 @@ InitCredentialTable (
}
Status = gRT->GetVariable (
L"PwdCredential",
&mPwdCredentialGuid,
&gPwdCredentialProviderGuid,
NULL,
&VarSize,
Var
@ -693,7 +687,7 @@ InitFormBrowser (
// Publish HII data.
//
CallbackInfo->HiiHandle = HiiAddPackages (
&mPwdCredentialGuid,
&gPwdCredentialProviderGuid,
CallbackInfo->DriverHandle,
PwdCredentialProviderStrings,
PwdCredentialProviderVfrBin,
@ -888,7 +882,7 @@ CredentialForm (
*Hii = mCallbackInfo->HiiHandle;
*FormId = FORMID_GET_PASSWORD_FORM;
CopyGuid (FormSetId, &mPwdCredentialGuid);
CopyGuid (FormSetId, &gPwdCredentialProviderGuid);
return EFI_SUCCESS;
}
@ -1269,8 +1263,8 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mPwdCredentialGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &mPwdCredentialGuid);
CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &gPwdCredentialProviderGuid);
mPwdInfoHandle->Info[0] = Info;
mPwdInfoHandle->Count++;
@ -1287,7 +1281,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mPwdCredentialGuid);
CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);
CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);
FreePool (ProvNameStr);
@ -1304,7 +1298,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_TYPE_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mPwdCredentialGuid);
CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &gEfiUserCredentialClassPasswordGuid);
mPwdInfoHandle->Info[2] = Info;
@ -1322,7 +1316,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mPwdCredentialGuid);
CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);
CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);
FreePool (ProvNameStr);

View File

@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Uefi.h>
#include <Guid/GlobalVariable.h>
#include <Guid/MdeModuleHii.h>
#include <Protocol/HiiConfigAccess.h>
#include <Protocol/UserCredential.h>

View File

@ -1,7 +1,7 @@
/** @file
Data structure used by the Password Credential Provider driver.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -15,10 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _PWD_CREDENTIAL_PROVIDER_DATA_H_
#define _PWD_CREDENTIAL_PROVIDER_DATA_H_
#define PWD_CREDENTIAL_PROVIDER_GUID \
{ \
0x78b9ec8b, 0xc000, 0x46c5, { 0xac, 0x93, 0x24, 0xa0, 0xc1, 0xbb, 0x0, 0xce } \
}
#include <Guid/PwdCredentialProviderHii.h>
//
// Forms definition

View File

@ -30,6 +30,7 @@
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
CryptoPkg/CryptoPkg.dec
SecurityPkg/SecurityPkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@ -43,8 +44,8 @@
BaseCryptLib
[Guids]
gEfiIfrTianoGuid ## CONSUMES ## Guid
gEfiUserCredentialClassPasswordGuid ## CONSUMES ## Guid
gPwdCredentialProviderGuid ## PRODUCES ## Guid
[Protocols]
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -18,34 +18,6 @@ CREDENTIAL_TABLE *mUsbTable = NULL;
USB_PROVIDER_CALLBACK_INFO *mCallbackInfo = NULL;
USB_CREDENTIAL_INFO *mUsbInfoHandle = NULL;
//
// Used for save password credential and form browser
// And used as provider identifier
//
EFI_GUID mUsbCredentialGuid = USB_CREDENTIAL_PROVIDER_GUID;
HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
{
{
HARDWARE_DEVICE_PATH,
HW_VENDOR_DP,
{
(UINT8) (sizeof (VENDOR_DEVICE_PATH)),
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
{ 0x9463f883, 0x48f6, 0x4a7a, { 0x97, 0x2d, 0x9f, 0x8f, 0x38, 0xf2, 0xdd, 0x91 } }
},
{
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
{
(UINT8) (END_DEVICE_PATH_LENGTH),
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
}
}
};
EFI_USER_CREDENTIAL_PROTOCOL gUsbCredentialProviderDriver = {
USB_CREDENTIAL_PROVIDER_GUID,
EFI_USER_CREDENTIAL_CLASS_SECURE_CARD,
@ -180,7 +152,7 @@ ModifyTable (
//
Status = gRT->SetVariable (
L"UsbCredential",
&mUsbCredentialGuid,
&gUsbCredentialProviderGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
mUsbTable->Count * sizeof (USB_INFO),
&mUsbTable->UserInfo
@ -212,7 +184,7 @@ InitCredentialTable (
Var = NULL;
Status = gRT->GetVariable (
L"UsbCredential",
&mUsbCredentialGuid,
&gUsbCredentialProviderGuid,
NULL,
&VarSize,
Var
@ -224,7 +196,7 @@ InitCredentialTable (
}
Status = gRT->GetVariable (
L"UsbCredential",
&mUsbCredentialGuid,
&gUsbCredentialProviderGuid,
NULL,
&VarSize,
Var
@ -647,7 +619,7 @@ InitFormBrowser (
// Publish HII data.
//
CallbackInfo->HiiHandle = HiiAddPackages (
&mUsbCredentialGuid,
&gUsbCredentialProviderGuid,
CallbackInfo->DriverHandle,
UsbCredentialProviderStrings,
NULL
@ -1249,8 +1221,8 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mUsbCredentialGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &mUsbCredentialGuid);
CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &gUsbCredentialProviderGuid);
mUsbInfoHandle->Info[0] = Info;
mUsbInfoHandle->Count++;
@ -1267,7 +1239,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mUsbCredentialGuid);
CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);
CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);
FreePool (ProvNameStr);
@ -1284,7 +1256,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_TYPE_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mUsbCredentialGuid);
CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);
CopyGuid ((EFI_GUID *)(Info + 1), &gEfiUserCredentialClassSecureCardGuid);
mUsbInfoHandle->Info[2] = Info;
@ -1302,7 +1274,7 @@ CredentialGetNextInfo (
Info->InfoType = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;
Info->InfoSize = (UINT32) InfoLen;
Info->InfoAttribs = EFI_USER_INFO_PROTECTED;
CopyGuid (&Info->Credential, &mUsbCredentialGuid);
CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);
CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);
FreePool (ProvNameStr);

View File

@ -1,7 +1,7 @@
/** @file
Usb Credential Provider driver header file.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -18,9 +18,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Uefi.h>
#include <Guid/GlobalVariable.h>
#include <Guid/MdeModuleHii.h>
#include <Guid/FileInfo.h>
#include <Guid/SecurityPkgTokenSpace.h>
#include <Guid/UsbCredentialProviderHii.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/BlockIo.h>
@ -40,16 +40,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PcdLib.h>
extern UINT8 UsbCredentialProviderStrings[];
extern UINT8 UsbCredentialProviderVfrBin[];
#define USB_TABLE_INC 16
#define HASHED_CREDENTIAL_LEN 20
#define USB_CREDENTIAL_PROVIDER_GUID \
{ \
0xd0849ed1, 0xa88c, 0x4ba6, { 0xb1, 0xd6, 0xab, 0x50, 0xe2, 0x80, 0xb7, 0xa9 }\
}
//
// Save the enroll user credential Information.
//
@ -75,14 +69,6 @@ typedef struct {
EFI_USER_INFO *Info[1];
} USB_CREDENTIAL_INFO;
///
/// HII specific Vendor Device Path definition.
///
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
EFI_DEVICE_PATH_PROTOCOL End;
} HII_VENDOR_DEVICE_PATH;
#define USB_PROVIDER_SIGNATURE SIGNATURE_32 ('U', 'S', 'B', 'P')
typedef struct {

View File

@ -42,7 +42,7 @@
BaseCryptLib
[Guids]
gEfiIfrTianoGuid ## CONSUMES ## Guid
gUsbCredentialProviderGuid ## PRODUCES ## Guid
gEfiFileInfoGuid ## CONSUMES ## Guid
gEfiUserCredentialClassSecureCardGuid ## CONSUMES ## Guid

View File

@ -14,11 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "UserIdentifyManager.h"
//
// Guid used in user profile saving and in form browser.
//
EFI_GUID mUserManagerGuid = USER_IDENTIFY_MANAGER_GUID;
//
// Default user name.
//
@ -54,10 +49,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
//
// {ACA7C06F-743C-454f-9C6D-692138482498}
//
{ 0xaca7c06f, 0x743c, 0x454f, { 0x9c, 0x6d, 0x69, 0x21, 0x38, 0x48, 0x24, 0x98 } }
USER_IDENTIFY_MANAGER_GUID
},
{
END_DEVICE_PATH_TYPE,
@ -1152,7 +1144,7 @@ SaveNvUserProfile (
//
Status = gRT->SetVariable (
User->UserVarName,
&mUserManagerGuid,
&gUserIdentifyManagerGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
Delete ? 0 : User->UserProfileSize,
User->ProfileInfo
@ -2812,7 +2804,7 @@ IdentifyOrTypeUser (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserManagerGuid, // Formset GUID
&gUserIdentifyManagerGuid,// Formset GUID
FORMID_PROVIDER_FORM, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -2916,7 +2908,7 @@ UserIdentifyManagerCallback (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserManagerGuid, // Formset GUID
&gUserIdentifyManagerGuid,// Formset GUID
FORMID_USER_FORM, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -3058,7 +3050,7 @@ InitUserProfileDb (
// Get variable value.
//
VarSize = CurVarSize;
Status = gRT->GetVariable (VarName, &mUserManagerGuid, &VarAttr, &VarSize, VarData);
Status = gRT->GetVariable (VarName, &gUserIdentifyManagerGuid, &VarAttr, &VarSize, VarData);
if (Status == EFI_BUFFER_TOO_SMALL) {
FreePool (VarData);
VarData = AllocatePool (VarSize);
@ -3068,7 +3060,7 @@ InitUserProfileDb (
}
CurVarSize = VarSize;
Status = gRT->GetVariable (VarName, &mUserManagerGuid, &VarAttr, &VarSize, VarData);
Status = gRT->GetVariable (VarName, &gUserIdentifyManagerGuid, &VarAttr, &VarSize, VarData);
}
if (EFI_ERROR (Status)) {
@ -3082,7 +3074,7 @@ InitUserProfileDb (
// Check variable attributes.
//
if (VarAttr != (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)) {
Status = gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL);
Status = gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL);
continue;
}
@ -3095,7 +3087,7 @@ InitUserProfileDb (
//
// Delete invalid user profile
//
gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL);
gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL);
} else if (Status == EFI_OUT_OF_RESOURCES) {
break;
}
@ -3104,7 +3096,7 @@ InitUserProfileDb (
// Delete and save the profile again if some invalid profiles are deleted.
//
if (mUserProfileDb->UserProfileNum < Index) {
gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL);
gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL);
SaveNvUserProfile (mUserProfileDb->UserProfile[mUserProfileDb->UserProfileNum - 1], FALSE);
}
}
@ -3349,7 +3341,7 @@ InitFormBrowser (
// Publish HII data.
//
CallbackInfo->HiiHandle = HiiAddPackages (
&mUserManagerGuid,
&gUserIdentifyManagerGuid,
CallbackInfo->DriverHandle,
UserIdentifyManagerStrings,
UserIdentifyManagerVfrBin,
@ -3590,7 +3582,7 @@ IdentifyUser (
mCallbackInfo->FormBrowser2,
&mCallbackInfo->HiiHandle,
1,
&mUserManagerGuid,
&gUserIdentifyManagerGuid,
0,
NULL,
NULL

View File

@ -1,7 +1,7 @@
/** @file
Data structure used by the user identify manager driver.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -15,15 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _USER_IDENTIFY_MANAGER_DATA_H_
#define _USER_IDENTIFY_MANAGER_DATA_H_
#include "UserIdentifyManagerStrDefs.h"
//
// Guid used in user profile saving and in form browser.
//
#define USER_IDENTIFY_MANAGER_GUID \
{ \
0x3ccd3dd8, 0x8d45, 0x4fed, { 0x96, 0x2d, 0x2b, 0x38, 0xcd, 0x82, 0xb3, 0xc4 } \
}
#include <Guid/UserIdentifyManagerHii.h>
//
// Forms definition.

View File

@ -30,6 +30,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
SecurityPkg/SecurityPkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@ -44,6 +45,7 @@
[Guids]
gEfiIfrTianoGuid ## CONSUMES ## Guid
gEfiEventUserProfileChangedGuid ## CONSUMES ## Guid
gUserIdentifyManagerGuid ## PRODUCES ## Guid
[Protocols]
gEfiFormBrowser2ProtocolGuid ## CONSUMES

View File

@ -1,7 +1,7 @@
/** @file
The functions to delete a user profile.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -303,7 +303,7 @@ SelectUserToDelete (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_DEL_USER, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data

View File

@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "UserProfileManager.h"
EFI_GUID mUserProfileManagerGuid = USER_PROFILE_MANAGER_GUID;
EFI_USER_MANAGER_PROTOCOL *mUserManager = NULL;
CREDENTIAL_PROVIDER_INFO *mProviderInfo = NULL;
UINT8 mProviderChoice;
@ -35,7 +34,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = {
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
{0xad2e3474, 0x93e6, 0x488b, {0x93, 0x19, 0x64, 0x88, 0xfc, 0x68, 0x1f, 0x16}}
USER_PROFILE_MANAGER_GUID
},
{
END_DEVICE_PATH_TYPE,
@ -293,7 +292,7 @@ UserProfileManagerCallback (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_USER_MANAGE, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -786,7 +785,7 @@ UserProfileManagerInit (
// Publish HII data.
//
CallbackInfo->HiiHandle = HiiAddPackages (
&mUserProfileManagerGuid,
&gUserProfileManagerGuid,
CallbackInfo->DriverHandle,
UserProfileManagerStrings,
UserProfileManagerVfrBin,

View File

@ -1,7 +1,7 @@
/** @file
The header file for user profile manager driver.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -112,11 +112,6 @@ extern UINT8 UserProfileManagerVfrBin[];
//
extern UINT8 UserProfileManagerStrings[];
//
// Guid used in the form browse.
//
extern EFI_GUID mUserProfileManagerGuid;
//
// The user manager protocol, used in several function.
//

View File

@ -1,7 +1,7 @@
/** @file
The form data for user profile manager driver.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -15,10 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __USER_PROFILE_MANAGER_DATA_H__
#define __USER_PROFILE_MANAGER_DATA_H__
#define USER_PROFILE_MANAGER_GUID \
{ \
0xc35f272c, 0x97c2, 0x465a, { 0xa2, 0x16, 0x69, 0x6b, 0x66, 0x8a, 0x8c, 0xfe } \
}
#include <Guid/UserProfileManagerHii.h>
//
// Form ID

View File

@ -32,6 +32,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
SecurityPkg/SecurityPkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@ -48,6 +49,7 @@
gEfiUserInfoAccessSetupAdminGuid ## CONSUMES ## Guid
gEfiUserInfoAccessSetupNormalGuid ## CONSUMES ## Guid
gEfiUserInfoAccessSetupRestrictedGuid ## CONSUMES ## Guid
gUserProfileManagerGuid ## PRODUCES ## Guid
[Protocols]
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -1,7 +1,7 @@
/** @file
The functions to modify a user profile.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -90,7 +90,7 @@ SelectUserToModify (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_MODIFY_USER, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -616,7 +616,7 @@ ModifyUserInfo (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_USER_INFO, // Form ID
StartOpCodeHandle, // Label
EndOpCodeHandle // Replace data
@ -1060,7 +1060,7 @@ ModidyAccessPolicy (
//
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_MODIFY_AP, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -1560,7 +1560,7 @@ ModifyIdentityPolicy (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_MODIFY_IP, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -2158,7 +2158,7 @@ DisplayLoadPermit(
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_PERMIT_LOAD_DP, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
@ -2244,7 +2244,7 @@ DisplayLoadForbid (
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&mUserProfileManagerGuid, // Formset GUID
&gUserProfileManagerGuid, // Formset GUID
FORMID_FORBID_LOAD_DP, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data