Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 1 | # -*- Mode: Python -*- |
| 2 | # |
| 3 | |
| 4 | ## |
| 5 | # = TPM (trusted platform module) devices |
| 6 | ## |
| 7 | |
| 8 | ## |
| 9 | # @TpmModel: |
| 10 | # |
| 11 | # An enumeration of TPM models |
| 12 | # |
| 13 | # @tpm-tis: TPM TIS model |
Marc-André Lureau | 4ab6cb4 | 2018-01-29 19:33:07 +0100 | [diff] [blame] | 14 | # @tpm-crb: TPM CRB model (since 2.12) |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 15 | # |
| 16 | # Since: 1.5 |
| 17 | ## |
Marc-André Lureau | 4ab6cb4 | 2018-01-29 19:33:07 +0100 | [diff] [blame] | 18 | { 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb' ] } |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 19 | |
| 20 | ## |
| 21 | # @query-tpm-models: |
| 22 | # |
| 23 | # Return a list of supported TPM models |
| 24 | # |
| 25 | # Returns: a list of TpmModel |
| 26 | # |
| 27 | # Since: 1.5 |
| 28 | # |
| 29 | # Example: |
| 30 | # |
| 31 | # -> { "execute": "query-tpm-models" } |
Marc-André Lureau | 4ab6cb4 | 2018-01-29 19:33:07 +0100 | [diff] [blame] | 32 | # <- { "return": [ "tpm-tis", "tpm-crb" ] } |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 33 | # |
| 34 | ## |
| 35 | { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } |
| 36 | |
| 37 | ## |
| 38 | # @TpmType: |
| 39 | # |
| 40 | # An enumeration of TPM types |
| 41 | # |
| 42 | # @passthrough: TPM passthrough type |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 43 | # @emulator: Software Emulator TPM type |
| 44 | # Since: 2.11 |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 45 | # |
| 46 | # Since: 1.5 |
| 47 | ## |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 48 | { 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] } |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 49 | |
| 50 | ## |
| 51 | # @query-tpm-types: |
| 52 | # |
| 53 | # Return a list of supported TPM types |
| 54 | # |
| 55 | # Returns: a list of TpmType |
| 56 | # |
| 57 | # Since: 1.5 |
| 58 | # |
| 59 | # Example: |
| 60 | # |
| 61 | # -> { "execute": "query-tpm-types" } |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 62 | # <- { "return": [ "passthrough", "emulator" ] } |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 63 | # |
| 64 | ## |
| 65 | { 'command': 'query-tpm-types', 'returns': ['TpmType'] } |
| 66 | |
| 67 | ## |
| 68 | # @TPMPassthroughOptions: |
| 69 | # |
| 70 | # Information about the TPM passthrough type |
| 71 | # |
| 72 | # @path: string describing the path used for accessing the TPM device |
| 73 | # |
| 74 | # @cancel-path: string showing the TPM's sysfs cancel file |
| 75 | # for cancellation of TPM commands while they are executing |
| 76 | # |
| 77 | # Since: 1.5 |
| 78 | ## |
| 79 | { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str', |
| 80 | '*cancel-path' : 'str'} } |
| 81 | |
| 82 | ## |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 83 | # @TPMEmulatorOptions: |
| 84 | # |
| 85 | # Information about the TPM emulator type |
| 86 | # |
| 87 | # @chardev: Name of a unix socket chardev |
| 88 | # |
| 89 | # Since: 2.11 |
| 90 | ## |
| 91 | { 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' } } |
| 92 | |
| 93 | ## |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 94 | # @TpmTypeOptions: |
| 95 | # |
| 96 | # A union referencing different TPM backend types' configuration options |
| 97 | # |
| 98 | # @type: 'passthrough' The configuration options for the TPM passthrough type |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 99 | # 'emulator' The configuration options for TPM emulator backend type |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 100 | # |
| 101 | # Since: 1.5 |
| 102 | ## |
| 103 | { 'union': 'TpmTypeOptions', |
Amarnath Valluri | f4ede81 | 2017-09-29 14:10:20 +0300 | [diff] [blame] | 104 | 'data': { 'passthrough' : 'TPMPassthroughOptions', |
| 105 | 'emulator': 'TPMEmulatorOptions' } } |
Markus Armbruster | 3859b6c | 2017-08-24 21:14:03 +0200 | [diff] [blame] | 106 | |
| 107 | ## |
| 108 | # @TPMInfo: |
| 109 | # |
| 110 | # Information about the TPM |
| 111 | # |
| 112 | # @id: The Id of the TPM |
| 113 | # |
| 114 | # @model: The TPM frontend model |
| 115 | # |
| 116 | # @options: The TPM (backend) type configuration options |
| 117 | # |
| 118 | # Since: 1.5 |
| 119 | ## |
| 120 | { 'struct': 'TPMInfo', |
| 121 | 'data': {'id': 'str', |
| 122 | 'model': 'TpmModel', |
| 123 | 'options': 'TpmTypeOptions' } } |
| 124 | |
| 125 | ## |
| 126 | # @query-tpm: |
| 127 | # |
| 128 | # Return information about the TPM device |
| 129 | # |
| 130 | # Returns: @TPMInfo on success |
| 131 | # |
| 132 | # Since: 1.5 |
| 133 | # |
| 134 | # Example: |
| 135 | # |
| 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 | # } |
| 151 | # |
| 152 | ## |
| 153 | { 'command': 'query-tpm', 'returns': ['TPMInfo'] } |