summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/uapi/asm/papr-physical-attestation.h
blob: ea746837bb9a3cca5969c5028f17daf1d6846b19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_PAPR_PHYSICAL_ATTESTATION_H_
#define _UAPI_PAPR_PHYSICAL_ATTESTATION_H_

#include <linux/types.h>
#include <asm/ioctl.h>
#include <asm/papr-miscdev.h>

#define PAPR_PHYATTEST_MAX_INPUT 4084 /* Max 4K buffer: 4K-12 */

/*
 * Defined in PAPR 2.13+ 21.6 Attestation Command Structures.
 * User space pass this struct and the max size should be 4K.
 */
struct papr_phy_attest_io_block {
	__u8 version;
	__u8 command;
	__u8 TCG_major_ver;
	__u8 TCG_minor_ver;
	__be32 length;
	__be32 correlator;
	__u8 payload[PAPR_PHYATTEST_MAX_INPUT];
};

/*
 * ioctl for /dev/papr-physical-attestation. Returns a attestation
 * command fd handle
 */
#define PAPR_PHY_ATTEST_IOC_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 8, struct papr_phy_attest_io_block)

#endif /* _UAPI_PAPR_PHYSICAL_ATTESTATION_H_ */