apic: rename apic specific bitopts
[qemu/ar7.git] / hw / tpm / tpm_int.h
blob2f582caaee6e332b27ad0fc9052fe6a2c35081f3
1 /*
2 * TPM configuration
4 * Copyright (C) 2011-2013 IBM Corporation
6 * Authors:
7 * Stefan Berger <stefanb@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
12 #ifndef TPM_TPM_INT_H
13 #define TPM_TPM_INT_H
15 #include "exec/memory.h"
16 #include "tpm_tis.h"
18 /* overall state of the TPM interface */
19 struct TPMState {
20 ISADevice busdev;
21 MemoryRegion mmio;
23 union {
24 TPMTISEmuState tis;
25 } s;
27 uint8_t locty_number;
28 TPMLocality *locty_data;
30 char *backend;
31 TPMBackend *be_driver;
34 #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
36 #define TPM_STANDARD_CMDLINE_OPTS \
37 { \
38 .name = "type", \
39 .type = QEMU_OPT_STRING, \
40 .help = "Type of TPM backend", \
43 struct tpm_req_hdr {
44 uint16_t tag;
45 uint32_t len;
46 uint32_t ordinal;
47 } QEMU_PACKED;
49 struct tpm_resp_hdr {
50 uint16_t tag;
51 uint32_t len;
52 uint32_t errcode;
53 } QEMU_PACKED;
55 #define TPM_TAG_RQU_COMMAND 0xc1
56 #define TPM_TAG_RQU_AUTH1_COMMAND 0xc2
57 #define TPM_TAG_RQU_AUTH2_COMMAND 0xc3
59 #define TPM_TAG_RSP_COMMAND 0xc4
60 #define TPM_TAG_RSP_AUTH1_COMMAND 0xc5
61 #define TPM_TAG_RSP_AUTH2_COMMAND 0xc6
63 #define TPM_FAIL 9
65 #define TPM_ORD_GetTicks 0xf1
67 #endif /* TPM_TPM_INT_H */