2 * Definitions for the VTPM proxy driver
3 * Copyright (c) 2015, 2016, IBM Corporation
4 * Copyright (C) 2016 Intel Corporation
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.
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
16 #ifndef _UAPI_LINUX_VTPM_PROXY_H
17 #define _UAPI_LINUX_VTPM_PROXY_H
19 #include <linux/types.h>
20 #include <linux/ioctl.h>
23 * enum vtpm_proxy_flags - flags for the proxy TPM
24 * @VTPM_PROXY_FLAG_TPM2: the proxy TPM uses TPM 2.0 protocol
26 enum vtpm_proxy_flags {
27 VTPM_PROXY_FLAG_TPM2 = 1,
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
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 */
47 #define VTPM_PROXY_IOC_NEW_DEV _IOWR(0xa1, 0x00, struct vtpm_proxy_new_dev)
49 #endif /* _UAPI_LINUX_VTPM_PROXY_H */