Stefan Berger | 6f99612 | 2016-04-18 13:26:15 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Definitions for the VTPM proxy driver |
| 3 | * Copyright (c) 2015, 2016, IBM Corporation |
Jarkko Sakkinen | 7ea7861 | 2016-11-03 17:57:50 -0600 | [diff] [blame^] | 4 | * Copyright (C) 2016 Intel Corporation |
Stefan Berger | 6f99612 | 2016-04-18 13:26:15 -0400 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, |
| 8 | * version 2, as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope it will be useful, but WITHOUT |
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 13 | * more details. |
| 14 | */ |
| 15 | |
| 16 | #ifndef _UAPI_LINUX_VTPM_PROXY_H |
| 17 | #define _UAPI_LINUX_VTPM_PROXY_H |
| 18 | |
| 19 | #include <linux/types.h> |
| 20 | #include <linux/ioctl.h> |
| 21 | |
Jarkko Sakkinen | 7ea7861 | 2016-11-03 17:57:50 -0600 | [diff] [blame^] | 22 | /** |
| 23 | * enum vtpm_proxy_flags - flags for the proxy TPM |
| 24 | * @VTPM_PROXY_FLAG_TPM2: the proxy TPM uses TPM 2.0 protocol |
| 25 | */ |
| 26 | enum vtpm_proxy_flags { |
| 27 | VTPM_PROXY_FLAG_TPM2 = 1, |
| 28 | }; |
Stefan Berger | 6f99612 | 2016-04-18 13:26:15 -0400 | [diff] [blame] | 29 | |
Jarkko Sakkinen | 7ea7861 | 2016-11-03 17:57:50 -0600 | [diff] [blame^] | 30 | /** |
| 31 | * struct vtpm_proxy_new_dev - parameter structure for the |
| 32 | * %VTPM_PROXY_IOC_NEW_DEV ioctl |
| 33 | * @flags: flags for the proxy TPM |
| 34 | * @tpm_num: index of the TPM device |
| 35 | * @fd: the file descriptor used by the proxy TPM |
| 36 | * @major: the major number of the TPM device |
| 37 | * @minor: the minor number of the TPM device |
| 38 | */ |
Stefan Berger | 6f99612 | 2016-04-18 13:26:15 -0400 | [diff] [blame] | 39 | struct vtpm_proxy_new_dev { |
| 40 | __u32 flags; /* input */ |
| 41 | __u32 tpm_num; /* output */ |
| 42 | __u32 fd; /* output */ |
| 43 | __u32 major; /* output */ |
| 44 | __u32 minor; /* output */ |
| 45 | }; |
| 46 | |
Jarkko Sakkinen | 7ea7861 | 2016-11-03 17:57:50 -0600 | [diff] [blame^] | 47 | #define VTPM_PROXY_IOC_NEW_DEV _IOWR(0xa1, 0x00, struct vtpm_proxy_new_dev) |
Stefan Berger | 6f99612 | 2016-04-18 13:26:15 -0400 | [diff] [blame] | 48 | |
| 49 | #endif /* _UAPI_LINUX_VTPM_PROXY_H */ |