6 # = TPM (trusted platform module) devices
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)
20 { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
26 # Return a list of supported TPM models
28 # Returns: a list of TpmModel
34 # -> { "execute": "query-tpm-models" }
35 # <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
38 { 'command': 'query-tpm-models', 'returns': ['TpmModel'],
44 # An enumeration of TPM types
46 # @passthrough: TPM passthrough type
47 # @emulator: Software Emulator TPM type (since 2.11)
51 { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
57 # Return a list of supported TPM types
59 # Returns: a list of TpmType
65 # -> { "execute": "query-tpm-types" }
66 # <- { "return": [ "passthrough", "emulator" ] }
69 { 'command': 'query-tpm-types', 'returns': ['TpmType'],
73 # @TPMPassthroughOptions:
75 # Information about the TPM passthrough type
77 # @path: string describing the path used for accessing the TPM device
79 # @cancel-path: string showing the TPM's sysfs cancel file
80 # for cancellation of TPM commands while they are executing
84 { 'struct': 'TPMPassthroughOptions',
85 'data': { '*path': 'str',
86 '*cancel-path': 'str' },
90 # @TPMEmulatorOptions:
92 # Information about the TPM emulator type
94 # @chardev: Name of a unix socket chardev
98 { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' },
102 # @TPMPassthroughOptionsWrapper:
106 { 'struct': 'TPMPassthroughOptionsWrapper',
107 'data': { 'data': 'TPMPassthroughOptions' },
111 # @TPMEmulatorOptionsWrapper:
115 { 'struct': 'TPMEmulatorOptionsWrapper',
116 'data': { 'data': 'TPMEmulatorOptions' },
122 # A union referencing different TPM backend types' configuration options
124 # @type: - 'passthrough' The configuration options for the TPM passthrough type
125 # - 'emulator' The configuration options for TPM emulator backend type
129 { 'union': 'TpmTypeOptions',
130 'base': { 'type': 'TpmType' },
131 'discriminator': 'type',
132 'data': { 'passthrough' : 'TPMPassthroughOptionsWrapper',
133 'emulator': 'TPMEmulatorOptionsWrapper' },
139 # Information about the TPM
141 # @id: The Id of the TPM
143 # @model: The TPM frontend model
145 # @options: The TPM (backend) type configuration options
149 { 'struct': 'TPMInfo',
150 'data': {'id': 'str',
152 'options': 'TpmTypeOptions' },
158 # Return information about the TPM device
160 # Returns: @TPMInfo on success
166 # -> { "execute": "query-tpm" }
169 # { "model": "tpm-tis",
171 # { "type": "passthrough",
173 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
174 # "path": "/dev/tpm0"
183 { 'command': 'query-tpm', 'returns': ['TPMInfo'],