运行模式 Operational Mode

概念

After the TPM completes both TPM_Startup and self-tests, the TPM is ready for operation.
There are three discrete states, enabled or disabled, active or inactive and owned or
unowned. These three states when combined form eight operational modes.

TPM1.2 可分为 3种离散状态和 8种工作模式

  • S1 模式下 TPM 全功能可以
  • S8 模式下 TCP 所有特性都被禁用,只能操作一些修改状态的指令

image.png

Enabled / Disabled

  • 启用 / 禁用 TPM
  • 禁用 TPM 后,将无法执行需要使用 TPM 资源的指令

    Active / Inactive

  • 使 TPM 生效 / 失效

  • 使 TPM 失效后,将无法执行需要使用 TPM 资源的指令,和禁用 TPM 不同的是,TPM 失效后还可以执行 TPM_TakeOwnership 指令
  • 使 TPM 失效是为了防止在真实用户创建所有者权限时,被恶意用户远程获取到所有者权限,然后操作 TPM,真实用户通过先让 TPM 失效,执行完成 TPM_TakeOwnership 后再让 TPM 生效的方式来保证安全性

    Owned/Unowned

  • 获取 / 失去 TPM 所有权

  • TPM 所有者可以无限制的控制 TPM

    状态转换

    image.png

    相关变量和指令

    permanent.disable

  • TRUE : 禁用 TPM (默认值)

  • FALSE : 启用 TPM

    permanent.deactivated

  • TRUE : TPM 无效 (默认值)

  • FALSE : TPM 有效

    stclear.deactivated

  • TRUE : TPM 设置为临时无效,直到下次模块启动

  • 没有默认值,初始值取自 permanent.deactivated

    permanent.ownership

  • TRUE : 允许 通过 TPM_TakeOwnership() 获取所有权 (默认值)

  • FALSE : 禁止 通过 TPM_TakeOwnership() 获取所有权

    permanent.disableOwnerClear

  • TRUE : 允许 在所有者授权状态修改 pernament.disable 值

  • FALSE : 禁止 在所有者授权状态修改 pernament.disable 值 (默认值)

    permanent.operator

  • TRUE : 操作者授权数据有效

  • FALSE : 操作者授权数据未设置

    TPM_PhysicalEnable()

  • 启用 TPM,将 permanent.disable 设为 FALSE

  • 需要 物理现场授权

    TPM_PhysicalDisable()

  • 禁用 TPM,将 permanent.disable 设为 TRUE

  • 需要 物理现场授权

    TPM_OwnerSetDisable()

  • 启用 / 禁用 TPM,将 permanent.disable 设为 flase / TRUE

  • 需要 所有者授权

    TPM_PhysicalSetDeactivate()

  • 生效 / 失效 TPM,将 permanent.deactivated 设为 FALSE / TRUE

  • 需要 物理现场授权

    TPM_SetTempDeactivated()

  • 临时失效 TPM,将 stclear.deactivated 设为 TRUE

  • 下次平台启动后恢复到之前状态,仅本次运行时有效
  • 需要 物理现场授权 或 所有者授权

    TPM_SetOwnerInstall()

  • 允许 / 禁止 获取所有者授权, 将 permanent.ownership 设为 TRUE / FALSE

  • 需要 物理现场授权 且 TPM 使能状态