]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/IndustryStandard/QemuTpm.h
2 Macro and type definitions corresponding to the QEMU TPM interface.
4 Refer to "docs/specs/tpm.txt" in the QEMU source directory.
6 Copyright (C) 2018, Red Hat, Inc.
7 Copyright (c) 2018, IBM Corporation. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef __QEMU_TPM_H__
13 #define __QEMU_TPM_H__
18 // whether function is blocked by BIOS settings; bits 0, 1, 2
20 #define QEMU_TPM_PPI_FUNC_NOT_IMPLEMENTED (0 << 0)
21 #define QEMU_TPM_PPI_FUNC_BIOS_ONLY (1 << 0)
22 #define QEMU_TPM_PPI_FUNC_BLOCKED (2 << 0)
23 #define QEMU_TPM_PPI_FUNC_ALLOWED_USR_REQ (3 << 0)
24 #define QEMU_TPM_PPI_FUNC_ALLOWED_USR_NOT_REQ (4 << 0)
25 #define QEMU_TPM_PPI_FUNC_MASK (7 << 0)
28 // The following structure is shared between firmware and ACPI.
32 UINT8 Func
[256]; // func
35 UINT32 Response
; // pprp
36 UINT32 Request
; // pprq
37 UINT32 RequestParameter
; // pprm
38 UINT32 LastRequest
; // lppr
40 UINT8 Res1
[0x40]; // res1
41 UINT8 NextStep
; // next_step
46 // The following structure is for the fw_cfg etc/tpm/config file.
53 } QEMU_FWCFG_TPM_CONFIG
;
56 #define QEMU_TPM_VERSION_UNSPEC 0
57 #define QEMU_TPM_VERSION_1_2 1
58 #define QEMU_TPM_VERSION_2 2
60 #define QEMU_TPM_PPI_VERSION_NONE 0
61 #define QEMU_TPM_PPI_VERSION_1_30 1