tpm: use loop iterator to set sts data field
[qemu/ar7.git] / qapi / tpm.json
blobd50deef5e97c3481a9dd5ce8fba29a9866f7422b
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)
16 # Since: 1.5
18 { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb' ] }
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" ] }
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', 'data': { '*path' : 'str',
80                                              '*cancel-path' : 'str'} }
83 # @TPMEmulatorOptions:
85 # Information about the TPM emulator type
87 # @chardev: Name of a unix socket chardev
89 # Since: 2.11
91 { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' } }
94 # @TpmTypeOptions:
96 # A union referencing different TPM backend types' configuration options
98 # @type: 'passthrough' The configuration options for the TPM passthrough type
99 #        'emulator' The configuration options for TPM emulator backend type
101 # Since: 1.5
103 { 'union': 'TpmTypeOptions',
104    'data': { 'passthrough' : 'TPMPassthroughOptions',
105              'emulator': 'TPMEmulatorOptions' } }
108 # @TPMInfo:
110 # Information about the TPM
112 # @id: The Id of the TPM
114 # @model: The TPM frontend model
116 # @options: The TPM (backend) type configuration options
118 # Since: 1.5
120 { 'struct': 'TPMInfo',
121   'data': {'id': 'str',
122            'model': 'TpmModel',
123            'options': 'TpmTypeOptions' } }
126 # @query-tpm:
128 # Return information about the TPM device
130 # Returns: @TPMInfo on success
132 # Since: 1.5
134 # Example:
136 # -> { "execute": "query-tpm" }
137 # <- { "return":
138 #      [
139 #        { "model": "tpm-tis",
140 #          "options":
141 #            { "type": "passthrough",
142 #              "data":
143 #                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
144 #                  "path": "/dev/tpm0"
145 #                }
146 #            },
147 #          "id": "tpm0"
148 #        }
149 #      ]
150 #    }
153 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }