Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit deca1043 authored by Dinesh K Garg's avatar Dinesh K Garg
Browse files

qseecom: expose a new IOCTL for new FDE design



Adding a new IOCTL QSEECOM_IOCTL_SET_ICE_INFO so that userspace can
provide information to kernel whenever FDE is enabled.

Change-Id: I03b5571effc07fe5b6b261fae98a0bd2d2958744
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 421f436f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -7648,6 +7648,17 @@ static inline long qseecom_ioctl(struct file *file,
		atomic_dec(&data->ioctl_count);
		break;
	}
	case QSEECOM_IOCTL_SET_ICE_INFO: {
		struct qseecom_ice_data_t ice_data;

		ret = copy_from_user(&ice_data, argp, sizeof(ice_data));
		if (ret) {
			pr_err("copy_from_user failed\n");
			return -EFAULT;
		}
		qcom_ice_set_fde_flag(ice_data.flag);
		break;
	}
	default:
		pr_err("Invalid IOCTL: 0x%x\n", cmd);
		return -EINVAL;
+6 −0
Original line number Diff line number Diff line
@@ -268,6 +268,10 @@ struct qseecom_ce_pipe_entry {
	unsigned int ce_pipe_pair;
};

struct qseecom_ice_data_t {
	int flag;
};

#define MAX_CE_INFO_HANDLE_SIZE 32
struct qseecom_ce_info_req {
	unsigned char handle[MAX_CE_INFO_HANDLE_SIZE];
@@ -385,5 +389,7 @@ struct file;
#define QSEECOM_IOCTL_QUERY_CE_PIPE_INFO \
	_IOWR(QSEECOM_IOC_MAGIC, 42, struct qseecom_ce_info_req)

#define QSEECOM_IOCTL_SET_ICE_INFO \
	_IOWR(QSEECOM_IOC_MAGIC, 43, struct qseecom_ice_data_t)

#endif /* _UAPI_QSEECOM_H_ */