hw/misc/led: Add yellow LED
[qemu/ar7.git] / qapi / tpm.json
blob6a10c9ed8d27023eacfc48499c534920582820f9
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = TPM (trusted platform module) devices
7 ##
9 ##
10 # @TpmModel:
12 # An enumeration of TPM models
14 # @tpm-tis: TPM TIS model
15 # @tpm-crb: TPM CRB model (since 2.12)
16 # @tpm-spapr: TPM SPAPR model (since 5.0)
18 # Since: 1.5
20 { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ] }
22 # @query-tpm-models:
24 # Return a list of supported TPM models
26 # Returns: a list of TpmModel
28 # Since: 1.5
30 # Example:
32 # -> { "execute": "query-tpm-models" }
33 # <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
36 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
39 # @TpmType:
41 # An enumeration of TPM types
43 # @passthrough: TPM passthrough type
44 # @emulator: Software Emulator TPM type
45 #            Since: 2.11
47 # Since: 1.5
49 { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] }
52 # @query-tpm-types:
54 # Return a list of supported TPM types
56 # Returns: a list of TpmType
58 # Since: 1.5
60 # Example:
62 # -> { "execute": "query-tpm-types" }
63 # <- { "return": [ "passthrough", "emulator" ] }
66 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
69 # @TPMPassthroughOptions:
71 # Information about the TPM passthrough type
73 # @path: string describing the path used for accessing the TPM device
75 # @cancel-path: string showing the TPM's sysfs cancel file
76 #               for cancellation of TPM commands while they are executing
78 # Since: 1.5
80 { 'struct': 'TPMPassthroughOptions',
81   'data': { '*path': 'str',
82             '*cancel-path': 'str' } }
85 # @TPMEmulatorOptions:
87 # Information about the TPM emulator type
89 # @chardev: Name of a unix socket chardev
91 # Since: 2.11
93 { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' } }
96 # @TpmTypeOptions:
98 # A union referencing different TPM backend types' configuration options
100 # @type: - 'passthrough' The configuration options for the TPM passthrough type
101 #        - 'emulator' The configuration options for TPM emulator backend type
103 # Since: 1.5
105 { 'union': 'TpmTypeOptions',
106    'data': { 'passthrough' : 'TPMPassthroughOptions',
107              'emulator': 'TPMEmulatorOptions' } }
110 # @TPMInfo:
112 # Information about the TPM
114 # @id: The Id of the TPM
116 # @model: The TPM frontend model
118 # @options: The TPM (backend) type configuration options
120 # Since: 1.5
122 { 'struct': 'TPMInfo',
123   'data': {'id': 'str',
124            'model': 'TpmModel',
125            'options': 'TpmTypeOptions' } }
128 # @query-tpm:
130 # Return information about the TPM device
132 # Returns: @TPMInfo on success
134 # Since: 1.5
136 # Example:
138 # -> { "execute": "query-tpm" }
139 # <- { "return":
140 #      [
141 #        { "model": "tpm-tis",
142 #          "options":
143 #            { "type": "passthrough",
144 #              "data":
145 #                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
146 #                  "path": "/dev/tpm0"
147 #                }
148 #            },
149 #          "id": "tpm0"
150 #        }
151 #      ]
152 #    }
155 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }