control.h 1.13 KB
Newer Older
1
2
3
4
5
6
/*
 * SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
 *
 * Copyright (C) 2018 Philippe Gerum  <rpm@xenomai.org>
 */

7
8
#ifndef _EVL_UAPI_CONTROL_H
#define _EVL_UAPI_CONTROL_H
9

10
#include <linux/types.h>
11
#include <uapi/evl/sched.h>
12

13
/* Earliest ABI level we support. */
14
#define EVL_ABI_BASE   23
15
16
17
18
19
20
/*
 * Current/latest ABI level we support. We may decouple the base and
 * current ABI levels by providing backward compatibility from the
 * latter to the former. CAUTION: a litteral value is required for the
 * current ABI definition (scripts reading this may be naive).
 */
21
#define EVL_ABI_LEVEL  25
Philippe Gerum's avatar
Philippe Gerum committed
22

23
24
#define EVL_CONTROL_DEV  "/dev/evl/control"

25
struct evl_core_info {
26
27
	__u32 abi_base;
	__u32 abi_current;
28
29
30
31
	__u32 fpu_features;
	__u64 shm_size;
};

32
33
struct evl_cpu_state {
	__u32 cpu;
34
	__u64 state_ptr;	/* (__u32 __user *state) */
35
36
};

37
38
39
#define EVL_CONTROL_IOCBASE	'C'

#define EVL_CTLIOC_GET_COREINFO		_IOR(EVL_CONTROL_IOCBASE, 0, struct evl_core_info)
40
#define EVL_CTLIOC_SCHEDCTL		_IOWR(EVL_CONTROL_IOCBASE, 1, struct evl_sched_ctlreq)
41
#define EVL_CTLIOC_GET_CPUSTATE		_IOR(EVL_CONTROL_IOCBASE, 2, struct evl_cpu_state)
42

43
#endif /* !_EVL_UAPI_CONTROL_H */