blob: 5b6f6b1fde69ac6bee73b3083c870809ed0fd678 [file] [log] [blame]
Christopher Ferris106b3a82016-08-24 12:15:38 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_KCOV_IOCTLS_H
20#define _LINUX_KCOV_IOCTLS_H
21#include <linux/types.h>
Christopher Ferrisd32ca142020-02-04 16:16:51 -080022struct kcov_remote_arg {
23 __u32 trace_mode;
24 __u32 area_size;
25 __u32 num_handles;
26 __aligned_u64 common_handle;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070027 __aligned_u64 handles[];
Christopher Ferrisd32ca142020-02-04 16:16:51 -080028};
29#define KCOV_REMOTE_MAX_HANDLES 0x100
Christopher Ferris106b3a82016-08-24 12:15:38 -070030#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
Christopher Ferris106b3a82016-08-24 12:15:38 -070031#define KCOV_ENABLE _IO('c', 100)
32#define KCOV_DISABLE _IO('c', 101)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080033#define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg)
Christopher Ferris934ec942018-01-31 15:29:16 -080034enum {
35 KCOV_TRACE_PC = 0,
36 KCOV_TRACE_CMP = 1,
37};
38#define KCOV_CMP_CONST (1 << 0)
39#define KCOV_CMP_SIZE(n) ((n) << 1)
40#define KCOV_CMP_MASK KCOV_CMP_SIZE(3)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080041#define KCOV_SUBSYSTEM_COMMON (0x00ull << 56)
42#define KCOV_SUBSYSTEM_USB (0x01ull << 56)
43#define KCOV_SUBSYSTEM_MASK (0xffull << 56)
44#define KCOV_INSTANCE_MASK (0xffffffffull)
Christopher Ferris106b3a82016-08-24 12:15:38 -070045#endif