6 # = TPM (trusted platform module) devices
12 # An enumeration of TPM models
14 # @tpm-tis: TPM TIS model
16 # @tpm-crb: TPM CRB model (since 2.12)
18 # @tpm-spapr: TPM SPAPR model (since 5.0)
22 { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
28 # Return a list of supported TPM models
30 # Returns: a list of TpmModel
36 # -> { "execute": "query-tpm-models" }
37 # <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
39 { 'command': 'query-tpm-models', 'returns': ['TpmModel'],
45 # An enumeration of TPM types
47 # @passthrough: TPM passthrough type
49 # @emulator: Software Emulator TPM type (since 2.11)
53 { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
59 # Return a list of supported TPM types
61 # Returns: a list of TpmType
67 # -> { "execute": "query-tpm-types" }
68 # <- { "return": [ "passthrough", "emulator" ] }
70 { 'command': 'query-tpm-types', 'returns': ['TpmType'],
74 # @TPMPassthroughOptions:
76 # Information about the TPM passthrough type
78 # @path: string describing the path used for accessing the TPM device
80 # @cancel-path: string showing the TPM's sysfs cancel file for
81 # cancellation of TPM commands while they are executing
85 { 'struct': 'TPMPassthroughOptions',
86 'data': { '*path': 'str',
87 '*cancel-path': 'str' },
91 # @TPMEmulatorOptions:
93 # Information about the TPM emulator type
95 # @chardev: Name of a unix socket chardev
99 { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' },
103 # @TPMPassthroughOptionsWrapper:
107 { 'struct': 'TPMPassthroughOptionsWrapper',
108 'data': { 'data': 'TPMPassthroughOptions' },
112 # @TPMEmulatorOptionsWrapper:
116 { 'struct': 'TPMEmulatorOptionsWrapper',
117 'data': { 'data': 'TPMEmulatorOptions' },
123 # A union referencing different TPM backend types' configuration
127 # - 'passthrough' The configuration options for the TPM
129 # - 'emulator' The configuration options for TPM emulator backend
134 { 'union': 'TpmTypeOptions',
135 'base': { 'type': 'TpmType' },
136 'discriminator': 'type',
137 'data': { 'passthrough' : 'TPMPassthroughOptionsWrapper',
138 'emulator': 'TPMEmulatorOptionsWrapper' },
144 # Information about the TPM
146 # @id: The Id of the TPM
148 # @model: The TPM frontend model
150 # @options: The TPM (backend) type configuration options
154 { 'struct': 'TPMInfo',
155 'data': {'id': 'str',
157 'options': 'TpmTypeOptions' },
163 # Return information about the TPM device
165 # Returns: @TPMInfo on success
171 # -> { "execute": "query-tpm" }
174 # { "model": "tpm-tis",
176 # { "type": "passthrough",
178 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
179 # "path": "/dev/tpm0"
187 { 'command': 'query-tpm', 'returns': ['TPMInfo'],