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
52 { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
58 # Return a list of supported TPM types
60 # Returns: a list of TpmType
66 # -> { "execute": "query-tpm-types" }
67 # <- { "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
81 # for 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' },
105 # A union referencing different TPM backend types' configuration options
107 # @type: - 'passthrough' The configuration options for the TPM passthrough type
108 # - 'emulator' The configuration options for TPM emulator backend type
112 { 'union': 'TpmTypeOptions',
113 'data': { 'passthrough' : 'TPMPassthroughOptions',
114 'emulator': 'TPMEmulatorOptions' },
120 # Information about the TPM
122 # @id: The Id of the TPM
124 # @model: The TPM frontend model
126 # @options: The TPM (backend) type configuration options
130 { 'struct': 'TPMInfo',
131 'data': {'id': 'str',
133 'options': 'TpmTypeOptions' },
139 # Return information about the TPM device
141 # Returns: @TPMInfo on success
147 # -> { "execute": "query-tpm" }
150 # { "model": "tpm-tis",
152 # { "type": "passthrough",
154 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
155 # "path": "/dev/tpm0"
164 { 'command': 'query-tpm', 'returns': ['TPMInfo'],