1/** @file
2  VFR file used by the TCG configuration component.
3
4Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution.  The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#include "TcgConfigNvData.h"
16
17formset
18  guid      = TCG_CONFIG_FORM_SET_GUID,
19  title     = STRING_TOKEN(STR_TPM_TITLE),
20  help      = STRING_TOKEN(STR_TPM_HELP),
21  classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID,
22
23  varstore TCG_CONFIGURATION,
24    varid = TCG_CONFIGURATION_VARSTORE_ID,
25    name  = TCG_CONFIGURATION,
26    guid  = TCG_CONFIG_FORM_SET_GUID;
27
28  form formid = TCG_CONFIGURATION_FORM_ID,
29    title = STRING_TOKEN(STR_TPM_TITLE);
30
31    subtitle text = STRING_TOKEN(STR_NULL);
32
33    text
34      help   = STRING_TOKEN(STR_TPM_STATE_HELP),
35      text   = STRING_TOKEN(STR_TPM_STATE_PROMPT),
36        text   = STRING_TOKEN(STR_TPM_STATE_CONTENT);
37
38    subtitle text = STRING_TOKEN(STR_NULL);
39
40    oneof varid  = TCG_CONFIGURATION.TpmOperation,
41          questionid = KEY_TPM_ACTION,
42          prompt = STRING_TOKEN(STR_TPM_OPERATION),
43          help   = STRING_TOKEN(STR_TPM_OPERATION_HELP),
44          flags  = INTERACTIVE | RESET_REQUIRED,
45          //
46          // Disable (TPM_ORD_PhysicalDisable) command is not available when disabled.
47          // Activate/deactivate (TPM_ORD_physicalSetDeactivated) command is not available when disabled.
48          //
49          suppressif ideqval TCG_CONFIGURATION.TpmEnable == 0;
50            option text = STRING_TOKEN(STR_DISABLE), value = PHYSICAL_PRESENCE_DISABLE, flags = 0;
51            option text = STRING_TOKEN(STR_TPM_ACTIVATE), value = PHYSICAL_PRESENCE_ACTIVATE, flags = 0;
52            option text = STRING_TOKEN(STR_TPM_DEACTIVATE), value = PHYSICAL_PRESENCE_DEACTIVATE, flags = 0;
53            option text = STRING_TOKEN(STR_TPM_DEACTIVATE_DISABLE), value = PHYSICAL_PRESENCE_DEACTIVATE_DISABLE, flags = 0;
54          endif
55          //
56          // Clear (TPM_ORD_ForceClear) command is not available when disabled or deactivated.
57          //
58          suppressif ideqval TCG_CONFIGURATION.TpmEnable == 0 OR
59                     ideqval TCG_CONFIGURATION.TpmActivate == 0;
60            option text = STRING_TOKEN(STR_TPM_CLEAR), value = PHYSICAL_PRESENCE_CLEAR, flags = 0;
61            option text = STRING_TOKEN(STR_TPM_CLEAR_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE, flags = 0;
62          endif
63
64          option text = STRING_TOKEN(STR_ENABLE), value = PHYSICAL_PRESENCE_ENABLE, flags = DEFAULT;
65          option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE, flags = 0;
66          option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR, flags = 0;
67          option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR_E_A), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE, flags = 0;
68    endoneof;
69
70    subtitle text = STRING_TOKEN(STR_NULL);
71
72  endform;
73
74endformset;
75