blob: a69e991eb0808498794127702146a5baf09a3863 [file] [log] [blame]
Stefan Berger6f996122016-04-18 13:26:15 -04001/*
2 * Definitions for the VTPM proxy driver
3 * Copyright (c) 2015, 2016, IBM Corporation
Jarkko Sakkinen7ea78612016-11-03 17:57:50 -06004 * Copyright (C) 2016 Intel Corporation
Stefan Berger6f996122016-04-18 13:26:15 -04005 *
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 Sakkinen7ea78612016-11-03 17:57:50 -060022/**
23 * enum vtpm_proxy_flags - flags for the proxy TPM
24 * @VTPM_PROXY_FLAG_TPM2: the proxy TPM uses TPM 2.0 protocol
25 */
26enum vtpm_proxy_flags {
27 VTPM_PROXY_FLAG_TPM2 = 1,
28};
Stefan Berger6f996122016-04-18 13:26:15 -040029
Jarkko Sakkinen7ea78612016-11-03 17:57:50 -060030/**
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 Berger6f996122016-04-18 13:26:15 -040039struct 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 Sakkinen7ea78612016-11-03 17:57:50 -060047#define VTPM_PROXY_IOC_NEW_DEV _IOWR(0xa1, 0x00, struct vtpm_proxy_new_dev)
Stefan Berger6f996122016-04-18 13:26:15 -040048
49#endif /* _UAPI_LINUX_VTPM_PROXY_H */