sm501: Drop unneded variable
[qemu/ar7.git] / qapi / tpm.json
blobdc1f081739988697b1a9c1a1cec736ba2234efb7
1 # -*- Mode: Python -*-
4 ##
5 # = TPM (trusted platform module) devices
6 ##
8 ##
9 # @TpmModel:
11 # An enumeration of TPM models
13 # @tpm-tis: TPM TIS model
14 # @tpm-crb: TPM CRB model (since 2.12)
15 # @tpm-spapr: TPM SPAPR model (since 5.0)
17 # Since: 1.5
19 { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ] }
21 # @query-tpm-models:
23 # Return a list of supported TPM models
25 # Returns: a list of TpmModel
27 # Since: 1.5
29 # Example:
31 # -> { "execute": "query-tpm-models" }
32 # <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
35 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
38 # @TpmType:
40 # An enumeration of TPM types
42 # @passthrough: TPM passthrough type
43 # @emulator: Software Emulator TPM type
44 #            Since: 2.11
46 # Since: 1.5
48 { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] }
51 # @query-tpm-types:
53 # Return a list of supported TPM types
55 # Returns: a list of TpmType
57 # Since: 1.5
59 # Example:
61 # -> { "execute": "query-tpm-types" }
62 # <- { "return": [ "passthrough", "emulator" ] }
65 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
68 # @TPMPassthroughOptions:
70 # Information about the TPM passthrough type
72 # @path: string describing the path used for accessing the TPM device
74 # @cancel-path: string showing the TPM's sysfs cancel file
75 #               for cancellation of TPM commands while they are executing
77 # Since: 1.5
79 { 'struct': 'TPMPassthroughOptions',
80   'data': { '*path': 'str',
81             '*cancel-path': 'str' } }
84 # @TPMEmulatorOptions:
86 # Information about the TPM emulator type
88 # @chardev: Name of a unix socket chardev
90 # Since: 2.11
92 { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' } }
95 # @TpmTypeOptions:
97 # A union referencing different TPM backend types' configuration options
99 # @type: - 'passthrough' The configuration options for the TPM passthrough type
100 #        - 'emulator' The configuration options for TPM emulator backend type
102 # Since: 1.5
104 { 'union': 'TpmTypeOptions',
105    'data': { 'passthrough' : 'TPMPassthroughOptions',
106              'emulator': 'TPMEmulatorOptions' } }
109 # @TPMInfo:
111 # Information about the TPM
113 # @id: The Id of the TPM
115 # @model: The TPM frontend model
117 # @options: The TPM (backend) type configuration options
119 # Since: 1.5
121 { 'struct': 'TPMInfo',
122   'data': {'id': 'str',
123            'model': 'TpmModel',
124            'options': 'TpmTypeOptions' } }
127 # @query-tpm:
129 # Return information about the TPM device
131 # Returns: @TPMInfo on success
133 # Since: 1.5
135 # Example:
137 # -> { "execute": "query-tpm" }
138 # <- { "return":
139 #      [
140 #        { "model": "tpm-tis",
141 #          "options":
142 #            { "type": "passthrough",
143 #              "data":
144 #                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
145 #                  "path": "/dev/tpm0"
146 #                }
147 #            },
148 #          "id": "tpm0"
149 #        }
150 #      ]
151 #    }
154 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }