Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 22 | struct kcov_remote_arg { |
| 23 | __u32 trace_mode; |
| 24 | __u32 area_size; |
| 25 | __u32 num_handles; |
| 26 | __aligned_u64 common_handle; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 27 | __aligned_u64 handles[]; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 28 | }; |
| 29 | #define KCOV_REMOTE_MAX_HANDLES 0x100 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 30 | #define KCOV_INIT_TRACE _IOR('c', 1, unsigned long) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 31 | #define KCOV_ENABLE _IO('c', 100) |
| 32 | #define KCOV_DISABLE _IO('c', 101) |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 33 | #define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg) |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 34 | enum { |
| 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 Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 41 | #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 Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 45 | #endif |