blob: f7ee9d19c52bf1ee9805d3b2c0db45e8d63275f5 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris106b3a82016-08-24 12:15:38 -07007#ifndef _LINUX_KCOV_IOCTLS_H
8#define _LINUX_KCOV_IOCTLS_H
9#include <linux/types.h>
Christopher Ferrisd32ca142020-02-04 16:16:51 -080010struct kcov_remote_arg {
11 __u32 trace_mode;
12 __u32 area_size;
13 __u32 num_handles;
14 __aligned_u64 common_handle;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070015 __aligned_u64 handles[];
Christopher Ferrisd32ca142020-02-04 16:16:51 -080016};
17#define KCOV_REMOTE_MAX_HANDLES 0x100
Christopher Ferris106b3a82016-08-24 12:15:38 -070018#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
Christopher Ferris106b3a82016-08-24 12:15:38 -070019#define KCOV_ENABLE _IO('c', 100)
20#define KCOV_DISABLE _IO('c', 101)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080021#define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg)
Christopher Ferris934ec942018-01-31 15:29:16 -080022enum {
23 KCOV_TRACE_PC = 0,
24 KCOV_TRACE_CMP = 1,
25};
26#define KCOV_CMP_CONST (1 << 0)
27#define KCOV_CMP_SIZE(n) ((n) << 1)
28#define KCOV_CMP_MASK KCOV_CMP_SIZE(3)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080029#define KCOV_SUBSYSTEM_COMMON (0x00ull << 56)
30#define KCOV_SUBSYSTEM_USB (0x01ull << 56)
31#define KCOV_SUBSYSTEM_MASK (0xffull << 56)
32#define KCOV_INSTANCE_MASK (0xffffffffull)
Christopher Ferris106b3a82016-08-24 12:15:38 -070033#endif