]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state.
authorGonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>
Mon, 4 Feb 2019 06:06:57 +0000 (14:06 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Wed, 20 Feb 2019 13:44:14 +0000 (21:44 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1511

Currently the TCG config setup form defaults the physical presence action to
PHYSICAL_PRESENCE_ENABLE, this prevents the action from being called. When a TPM
1.2 device is in Disabled and Activated state it is not possible to issue the
PHYSICAL_PRESENCE_ENABLE using the menu action.

By having the form default to PHYSICAL_PRESENCE_NO_ACTION, the user is now able
to select PHYSICAL_PRESENCE_ENABLE and toggle the TPM 1.2 device enable state.

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Rodrigo Gonzalez del Cueto <rodrigo.gonzalez.del.cueto@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni

index b0a7bf6f478a39a500a5d9cceb5a6af4078496b2..1047475cef59f299870c5cd0486772da000c2732 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   VFR file used by the TCG configuration component.\r
 \r
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -43,6 +43,10 @@ formset
           help   = STRING_TOKEN(STR_TPM_OPERATION_HELP),\r
           flags  = INTERACTIVE | RESET_REQUIRED,\r
           //\r
+          // Default the form to NO ACTION to allow toggling other options\r
+          //\r
+          option text = STRING_TOKEN(STR_NO_ACTION), value = PHYSICAL_PRESENCE_NO_ACTION, flags = DEFAULT;\r
+          //\r
           // Disable (TPM_ORD_PhysicalDisable) command is not available when disabled.\r
           // Activate/deactivate (TPM_ORD_physicalSetDeactivated) command is not available when disabled.\r
           //\r
@@ -61,7 +65,7 @@ formset
             option text = STRING_TOKEN(STR_TPM_CLEAR_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE, flags = 0;\r
           endif\r
 \r
-          option text = STRING_TOKEN(STR_ENABLE), value = PHYSICAL_PRESENCE_ENABLE, flags = DEFAULT;\r
+          option text = STRING_TOKEN(STR_ENABLE), value = PHYSICAL_PRESENCE_ENABLE, flags = 0;\r
           option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE, flags = 0;\r
           option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR, flags = 0;\r
           option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR_E_A), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE, flags = 0;\r
index a306bbbb5c96f6f231b8c62f7d540d497a778362..4455fd2b48ed46bf9c963a37a9bee6c4f7279d5b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HII Config Access protocol implementation of TCG configuration module.\r
 \r
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -176,7 +176,7 @@ TcgExtractConfig (
   //\r
   // Convert buffer data to <ConfigResp> by helper function BlockToConfig()\r
   //\r
-  PrivateData->Configuration->TpmOperation = PHYSICAL_PRESENCE_ENABLE;\r
+  PrivateData->Configuration->TpmOperation = PHYSICAL_PRESENCE_NO_ACTION;\r
 \r
   //\r
   // Get current TPM state.\r
index 7a84462a6ea7b346a304e7b03a22e7b6f2bff9b8..3c3f0f7ddbfab75980f46ff3ec803aca2c5a0f06 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   String definitions for TCG configuration form.\r
 \r
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_TPM_OPERATION                  #language en-US "TPM Operation"\r
 #string STR_TPM_OPERATION_HELP             #language en-US "Select one of the supported operation to change TPM state."\r
 \r
+#string STR_NO_ACTION                      #language en-US "No Action"\r
 #string STR_ENABLE                         #language en-US "Enable"\r
 #string STR_DISABLE                        #language en-US "Disable"\r
 #string STR_TPM_ACTIVATE                   #language en-US "Activate"\r