TianoCore EDK2 master
Loading...
Searching...
No Matches
QemuTpm.h
Go to the documentation of this file.
1
12#ifndef __QEMU_TPM_H__
13#define __QEMU_TPM_H__
14
15#include <Base.h>
16
17//
18// whether function is blocked by BIOS settings; bits 0, 1, 2
19//
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)
26
27//
28// The following structure is shared between firmware and ACPI.
29//
30#pragma pack (1)
31typedef struct {
32 UINT8 Func[256]; // func
33 UINT8 In; // ppin
34 UINT32 Ip; // ppip
35 UINT32 Response; // pprp
36 UINT32 Request; // pprq
37 UINT32 RequestParameter; // pprm
38 UINT32 LastRequest; // lppr
39 UINT32 FRet; // fret
40 UINT8 Res1[0x40]; // res1
41 UINT8 NextStep; // next_step
43#pragma pack ()
44
45//
46// The following structure is for the fw_cfg etc/tpm/config file.
47//
48#pragma pack (1)
49typedef struct {
50 UINT32 PpiAddress;
51 UINT8 TpmVersion;
52 UINT8 PpiVersion;
54#pragma pack ()
55
56#define QEMU_TPM_VERSION_UNSPEC 0
57#define QEMU_TPM_VERSION_1_2 1
58#define QEMU_TPM_VERSION_2 2
59
60#define QEMU_TPM_PPI_VERSION_NONE 0
61#define QEMU_TPM_PPI_VERSION_1_30 1
62
63#endif