Remove hide TPM support.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15405 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Dong Guo 2014-03-27 11:03:04 +00:00 committed by gdong1
parent 9a12e5825a
commit 2bc363714e
13 changed files with 15 additions and 121 deletions

View File

@ -229,15 +229,7 @@
# If 1, TCG platform type is server. # If 1, TCG platform type is server.
gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass|0|UINT8|0x00000006 gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass|0|UINT8|0x00000006
## The PCD is used to control whether to support hiding the TPM.
# If TRUE, PcdHideTpm controls whether to hide the TPM.
# This pcd is only for validation purpose. It should be set to false in production.
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport|FALSE|BOOLEAN|0x00000007
[PcdsDynamic, PcdsDynamicEx] [PcdsDynamic, PcdsDynamicEx]
## The PCD is used to control whether to hide the TPM.
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm|FALSE|BOOLEAN|0x00010002
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
## This PCD indicates the presence or absence of the platform operator. ## This PCD indicates the presence or absence of the platform operator.
gEfiSecurityPkgTokenSpaceGuid.PcdTpmPhysicalPresence|TRUE|BOOLEAN|0x00010001 gEfiSecurityPkgTokenSpaceGuid.PcdTpmPhysicalPresence|TRUE|BOOLEAN|0x00010001

View File

@ -1,7 +1,7 @@
/** @file /** @file
VFR file used by the TCG configuration component. VFR file used by the TCG configuration component.
Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -44,13 +44,6 @@ formset
endcheckbox; endcheckbox;
endif; endif;
suppressif TRUE;
checkbox varid = TCG_CONFIGURATION.OriginalHideTpm,
prompt = STRING_TOKEN(STR_NULL),
help = STRING_TOKEN(STR_NULL),
endcheckbox;
endif;
text text
help = STRING_TOKEN(STR_TPM_STATE_HELP), help = STRING_TOKEN(STR_TPM_STATE_HELP),
text = STRING_TOKEN(STR_TPM_STATE_PROMPT), text = STRING_TOKEN(STR_TPM_STATE_PROMPT),
@ -58,18 +51,6 @@ formset
subtitle text = STRING_TOKEN(STR_NULL); subtitle text = STRING_TOKEN(STR_NULL);
label LABEL_TCG_CONFIGURATION_HIDETPM;
checkbox varid = TCG_CONFIGURATION.HideTpm,
questionid = KEY_HIDE_TPM,
prompt = STRING_TOKEN(STR_HIDE_TPM_PROMPT),
help = STRING_TOKEN(STR_HIDE_TPM_HELP),
flags = RESET_REQUIRED,
endcheckbox;
label LABEL_END;
grayoutif ideqval TCG_CONFIGURATION.OriginalHideTpm == 1;
oneof varid = TCG_CONFIGURATION.TpmOperation, oneof varid = TCG_CONFIGURATION.TpmOperation,
questionid = KEY_TPM_ACTION, questionid = KEY_TPM_ACTION,
prompt = STRING_TOKEN(STR_TPM_OPERATION), prompt = STRING_TOKEN(STR_TPM_OPERATION),
@ -102,8 +83,6 @@ formset
subtitle text = STRING_TOKEN(STR_NULL); subtitle text = STRING_TOKEN(STR_NULL);
endif;
endform; endform;
endformset; endformset;

View File

@ -1,7 +1,7 @@
/** @file /** @file
The module entry point for Tcg configuration module. The module entry point for Tcg configuration module.
Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -75,7 +75,6 @@ TcgConfigDriverEntryPoint (
} }
PrivateData->TcgProtocol = TcgProtocol; PrivateData->TcgProtocol = TcgProtocol;
PrivateData->HideTpm = (BOOLEAN) (PcdGetBool (PcdHideTpmSupport) && PcdGetBool (PcdHideTpm));
// //
// Install TCG configuration form // Install TCG configuration form

View File

@ -1,7 +1,7 @@
## @file ## @file
# Component name for Tcg configuration module. # Component name for Tcg configuration module.
# #
# Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -63,11 +63,7 @@
gEfiHiiConfigRoutingProtocolGuid ## CONSUMES gEfiHiiConfigRoutingProtocolGuid ## CONSUMES
gEfiTcgProtocolGuid ## CONSUMES gEfiTcgProtocolGuid ## CONSUMES
[FixedPcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
[Pcd] [Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid
[Depex] [Depex]

View File

@ -1,7 +1,7 @@
/** @file /** @file
HII Config Access protocol implementation of TCG configuration module. HII Config Access protocol implementation of TCG configuration module.
Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -182,11 +182,6 @@ TcgExtractConfig (
ZeroMem (&Configuration, sizeof (TCG_CONFIGURATION)); ZeroMem (&Configuration, sizeof (TCG_CONFIGURATION));
Configuration.TpmOperation = PHYSICAL_PRESENCE_ENABLE; Configuration.TpmOperation = PHYSICAL_PRESENCE_ENABLE;
Configuration.HideTpm = (BOOLEAN) (PcdGetBool (PcdHideTpmSupport) && PcdGetBool (PcdHideTpm));
//
// Read the original value of HideTpm from PrivateData which won't be changed by Setup in this boot.
//
Configuration.OriginalHideTpm = PrivateData->HideTpm;
// //
// Display current TPM state. // Display current TPM state.
@ -307,8 +302,6 @@ TcgRouteConfig (
return Status; return Status;
} }
PcdSetBool (PcdHideTpm, TcgConfiguration.HideTpm);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -425,11 +418,6 @@ InstallTcgConfigForm (
EFI_STATUS Status; EFI_STATUS Status;
EFI_HII_HANDLE HiiHandle; EFI_HII_HANDLE HiiHandle;
EFI_HANDLE DriverHandle; EFI_HANDLE DriverHandle;
VOID *StartOpCodeHandle;
VOID *EndOpCodeHandle;
EFI_IFR_GUID_LABEL *StartLabel;
EFI_IFR_GUID_LABEL *EndLabel;
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess; EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
DriverHandle = NULL; DriverHandle = NULL;
@ -473,39 +461,6 @@ InstallTcgConfigForm (
PrivateData->HiiHandle = HiiHandle; PrivateData->HiiHandle = HiiHandle;
//
// Remove the Hide TPM question from the IFR
//
if (!PcdGetBool (PcdHideTpmSupport)) {
//
// Allocate space for creation of UpdateData Buffer
//
StartOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (StartOpCodeHandle != NULL);
EndOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (EndOpCodeHandle != NULL);
//
// Create Hii Extend Label OpCode as the start opcode
//
StartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (StartOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));
StartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
StartLabel->Number = LABEL_TCG_CONFIGURATION_HIDETPM;
//
// Create Hii Extend Label OpCode as the end opcode
//
EndLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (EndOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));
EndLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
EndLabel->Number = LABEL_END;
HiiUpdateForm (HiiHandle, NULL, TCG_CONFIGURATION_FORM_ID, StartOpCodeHandle, EndOpCodeHandle);
HiiFreeOpCodeHandle (StartOpCodeHandle);
HiiFreeOpCodeHandle (EndOpCodeHandle);
}
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@ -2,7 +2,7 @@
The header file of HII Config Access protocol implementation of TCG The header file of HII Config Access protocol implementation of TCG
configuration module. configuration module.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -62,8 +62,6 @@ typedef struct {
EFI_HANDLE DriverHandle; EFI_HANDLE DriverHandle;
EFI_TCG_PROTOCOL *TcgProtocol; EFI_TCG_PROTOCOL *TcgProtocol;
BOOLEAN HideTpm;
} TCG_CONFIG_PRIVATE_DATA; } TCG_CONFIG_PRIVATE_DATA;
extern TCG_CONFIG_PRIVATE_DATA mTcgConfigPrivateDateTemplate; extern TCG_CONFIG_PRIVATE_DATA mTcgConfigPrivateDateTemplate;

View File

@ -1,7 +1,7 @@
/** @file /** @file
Header file for NV data structure definition. Header file for NV data structure definition.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,19 +22,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define TCG_CONFIGURATION_VARSTORE_ID 0x0001 #define TCG_CONFIGURATION_VARSTORE_ID 0x0001
#define TCG_CONFIGURATION_FORM_ID 0x0001 #define TCG_CONFIGURATION_FORM_ID 0x0001
#define KEY_HIDE_TPM 0x2000
#define KEY_TPM_ACTION 0x3000 #define KEY_TPM_ACTION 0x3000
#define KEY_TPM_MOR_ENABLE 0x4000
#define LABEL_TCG_CONFIGURATION_HIDETPM 0x0001 #define LABEL_TCG_CONFIGURATION_TPM_OPERATION 0x0001
#define LABEL_END 0xffff #define LABEL_END 0xffff
// //
// Nv Data structure referenced by IFR // Nv Data structure referenced by IFR
// //
typedef struct { typedef struct {
BOOLEAN HideTpm;
BOOLEAN OriginalHideTpm;
UINT8 TpmOperation; UINT8 TpmOperation;
BOOLEAN TpmEnable; BOOLEAN TpmEnable;
BOOLEAN TpmActivate; BOOLEAN TpmActivate;

View File

@ -1,7 +1,7 @@
/** @file /** @file
Initialize TPM device and measure FVs before handing off control to DXE. Initialize TPM device and measure FVs before handing off control to DXE.
Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR> Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -711,10 +711,6 @@ PeimEntryMA (
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
if (PcdGetBool (PcdHideTpmSupport) && PcdGetBool (PcdHideTpm)) {
return EFI_UNSUPPORTED;
}
// //
// Initialize TPM device // Initialize TPM device
// //

View File

@ -1,7 +1,7 @@
## @file ## @file
# This module will initialize TPM device and measure FVs in PEI phase. # This module will initialize TPM device and measure FVs in PEI phase.
# #
# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -63,7 +63,6 @@
gEfiEndOfPeiSignalPpiGuid gEfiEndOfPeiSignalPpiGuid
[Pcd] [Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm
gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceLifetimeLock gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceLifetimeLock
gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceCmdEnable gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceCmdEnable
gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceHwEnable gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceHwEnable
@ -73,7 +72,6 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpmScrtmPolicy gEfiSecurityPkgTokenSpaceGuid.PcdTpmScrtmPolicy
[FixedPcd] [FixedPcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
[Depex] [Depex]

View File

@ -1,7 +1,7 @@
/** @file /** @file
TPM1.2/dTPM2.0 auto detection. TPM1.2/dTPM2.0 auto detection.
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -69,11 +69,6 @@ DetectTpmDevice (
EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariablePpi; EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariablePpi;
UINTN Size; UINTN Size;
if (PcdGetBool (PcdHideTpmSupport) && PcdGetBool (PcdHideTpm)) {
DEBUG ((EFI_D_ERROR, "DetectTpmDevice: Tpm is hide\n"));
return TPM_DEVICE_NULL;
}
Status = PeiServicesGetBootMode (&BootMode); Status = PeiServicesGetBootMode (&BootMode);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);

View File

@ -2,7 +2,7 @@
# Component name for TrEE configuration module. # Component name for TrEE configuration module.
# NOTE: This module is only for reference only, each platform should have its own setup page. # NOTE: This module is only for reference only, each platform should have its own setup page.
# #
# Copyright (c) 2013, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -55,12 +55,8 @@
[Ppis] [Ppis]
gEfiPeiReadOnlyVariable2PpiGuid gEfiPeiReadOnlyVariable2PpiGuid
[FixedPcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
[Pcd] [Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy
gEfiSecurityPkgTokenSpaceGuid.PcdTpmAutoDetection gEfiSecurityPkgTokenSpaceGuid.PcdTpmAutoDetection
gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress

View File

@ -1,7 +1,7 @@
/** @file /** @file
Initialize TPM2 device and measure FVs before handing off control to DXE. Initialize TPM2 device and measure FVs before handing off control to DXE.
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -620,10 +620,6 @@ PeimEntryMA (
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
if (PcdGetBool (PcdHideTpmSupport) && PcdGetBool (PcdHideTpm)) {
return EFI_UNSUPPORTED;
}
// //
// Update for Performance optimization // Update for Performance optimization
// //

View File

@ -1,7 +1,7 @@
## @file ## @file
# This module will initialize TPM2 device and measure FVs in PEI phase. # This module will initialize TPM2 device and measure FVs in PEI phase.
# #
# Copyright (c) 2013, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -58,7 +58,6 @@
gEfiEndOfPeiSignalPpiGuid gEfiEndOfPeiSignalPpiGuid
[Pcd] [Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy
@ -66,7 +65,6 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2ScrtmPolicy gEfiSecurityPkgTokenSpaceGuid.PcdTpm2ScrtmPolicy
[FixedPcd] [FixedPcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
[Depex] [Depex]