mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
update musl headers to musl v1.1.23
This commit is contained in:
parent
b1f8b53d20
commit
f70ce707e2
@ -26,3 +26,7 @@
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SB (1 << 29)
|
||||
#define HWCAP_PACA (1 << 30)
|
||||
#define HWCAP_PACG (1UL << 31)
|
||||
@ -1,47 +0,0 @@
|
||||
/* generated for aarch64-linux-musleabi-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
@ -1,401 +0,0 @@
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
|
||||
typedef __builtin_va_list va_list;
|
||||
#define __DEFINED_va_list
|
||||
#endif
|
||||
|
||||
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
|
||||
typedef __builtin_va_list __isoc_va_list;
|
||||
#define __DEFINED___isoc_va_list
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
|
||||
typedef unsigned wchar_t;
|
||||
#define __DEFINED_wchar_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef int blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned int nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
|
||||
typedef float float_t;
|
||||
#define __DEFINED_float_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
|
||||
typedef double double_t;
|
||||
#define __DEFINED_double_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
|
||||
typedef struct { long long __ll; long double __ld; } max_align_t;
|
||||
#define __DEFINED_max_align_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
|
||||
typedef long time_t;
|
||||
#define __DEFINED_time_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
|
||||
typedef long suseconds_t;
|
||||
#define __DEFINED_suseconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
#define __DEFINED_pthread_attr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
#define __DEFINED_pthread_mutex_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
#define __DEFINED_mtx_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
#define __DEFINED_pthread_cond_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
#define __DEFINED_cnd_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
#define __DEFINED_pthread_rwlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
#define __DEFINED_pthread_barrier_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
|
||||
typedef unsigned _Addr size_t;
|
||||
#define __DEFINED_size_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
|
||||
typedef unsigned _Addr uintptr_t;
|
||||
#define __DEFINED_uintptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
|
||||
typedef _Addr ptrdiff_t;
|
||||
#define __DEFINED_ptrdiff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
|
||||
typedef _Addr ssize_t;
|
||||
#define __DEFINED_ssize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
|
||||
typedef _Addr intptr_t;
|
||||
#define __DEFINED_intptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
|
||||
typedef _Addr regoff_t;
|
||||
#define __DEFINED_regoff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
|
||||
typedef _Reg register_t;
|
||||
#define __DEFINED_register_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
|
||||
typedef signed char int8_t;
|
||||
#define __DEFINED_int8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
|
||||
typedef signed short int16_t;
|
||||
#define __DEFINED_int16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
|
||||
typedef signed int int32_t;
|
||||
#define __DEFINED_int32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
|
||||
typedef signed _Int64 int64_t;
|
||||
#define __DEFINED_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
|
||||
typedef signed _Int64 intmax_t;
|
||||
#define __DEFINED_intmax_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
|
||||
typedef unsigned char uint8_t;
|
||||
#define __DEFINED_uint8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
|
||||
typedef unsigned short uint16_t;
|
||||
#define __DEFINED_uint16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
|
||||
typedef unsigned int uint32_t;
|
||||
#define __DEFINED_uint32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
|
||||
typedef unsigned _Int64 uint64_t;
|
||||
#define __DEFINED_uint64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
|
||||
typedef unsigned _Int64 u_int64_t;
|
||||
#define __DEFINED_u_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
|
||||
typedef unsigned _Int64 uintmax_t;
|
||||
#define __DEFINED_uintmax_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
|
||||
typedef unsigned mode_t;
|
||||
#define __DEFINED_mode_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned _Reg nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
|
||||
typedef _Int64 off_t;
|
||||
#define __DEFINED_off_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
|
||||
typedef unsigned _Int64 ino_t;
|
||||
#define __DEFINED_ino_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
|
||||
typedef unsigned _Int64 dev_t;
|
||||
#define __DEFINED_dev_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef long blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
|
||||
typedef _Int64 blkcnt_t;
|
||||
#define __DEFINED_blkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
|
||||
typedef unsigned _Int64 fsblkcnt_t;
|
||||
#define __DEFINED_fsblkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
|
||||
typedef unsigned _Int64 fsfilcnt_t;
|
||||
#define __DEFINED_fsfilcnt_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
|
||||
typedef unsigned long wctype_t;
|
||||
#define __DEFINED_wctype_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
|
||||
typedef void * timer_t;
|
||||
#define __DEFINED_timer_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
|
||||
typedef int clockid_t;
|
||||
#define __DEFINED_clockid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
|
||||
typedef long clock_t;
|
||||
#define __DEFINED_clock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
|
||||
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
|
||||
#define __DEFINED_struct_timeval
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
|
||||
struct timespec { time_t tv_sec; long tv_nsec; };
|
||||
#define __DEFINED_struct_timespec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
|
||||
typedef int pid_t;
|
||||
#define __DEFINED_pid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
|
||||
typedef unsigned id_t;
|
||||
#define __DEFINED_id_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
|
||||
typedef unsigned uid_t;
|
||||
#define __DEFINED_uid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
|
||||
typedef unsigned gid_t;
|
||||
#define __DEFINED_gid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
|
||||
typedef int key_t;
|
||||
#define __DEFINED_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
|
||||
typedef unsigned useconds_t;
|
||||
#define __DEFINED_useconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef unsigned long pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef struct __pthread * pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
|
||||
typedef int pthread_once_t;
|
||||
#define __DEFINED_pthread_once_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
|
||||
typedef unsigned pthread_key_t;
|
||||
#define __DEFINED_pthread_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
|
||||
typedef int pthread_spinlock_t;
|
||||
#define __DEFINED_pthread_spinlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_mutexattr_t;
|
||||
#define __DEFINED_pthread_mutexattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_condattr_t;
|
||||
#define __DEFINED_pthread_condattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_barrierattr_t;
|
||||
#define __DEFINED_pthread_barrierattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
|
||||
typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
#define __DEFINED_pthread_rwlockattr_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
|
||||
typedef struct _IO_FILE FILE;
|
||||
#define __DEFINED_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
|
||||
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
|
||||
#define __DEFINED_mbstate_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
|
||||
typedef struct __locale_struct * locale_t;
|
||||
#define __DEFINED_locale_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
|
||||
typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
|
||||
#define __DEFINED_sigset_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
|
||||
struct iovec { void *iov_base; size_t iov_len; };
|
||||
#define __DEFINED_struct_iovec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
|
||||
typedef unsigned socklen_t;
|
||||
#define __DEFINED_socklen_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
|
||||
typedef unsigned short sa_family_t;
|
||||
#define __DEFINED_sa_family_t
|
||||
#endif
|
||||
|
||||
|
||||
#undef _Addr
|
||||
#undef _Int64
|
||||
#undef _Reg
|
||||
@ -1,28 +0,0 @@
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
@ -1,555 +0,0 @@
|
||||
#define __NR_io_setup 0
|
||||
#define __NR_io_destroy 1
|
||||
#define __NR_io_submit 2
|
||||
#define __NR_io_cancel 3
|
||||
#define __NR_io_getevents 4
|
||||
#define __NR_setxattr 5
|
||||
#define __NR_lsetxattr 6
|
||||
#define __NR_fsetxattr 7
|
||||
#define __NR_getxattr 8
|
||||
#define __NR_lgetxattr 9
|
||||
#define __NR_fgetxattr 10
|
||||
#define __NR_listxattr 11
|
||||
#define __NR_llistxattr 12
|
||||
#define __NR_flistxattr 13
|
||||
#define __NR_removexattr 14
|
||||
#define __NR_lremovexattr 15
|
||||
#define __NR_fremovexattr 16
|
||||
#define __NR_getcwd 17
|
||||
#define __NR_lookup_dcookie 18
|
||||
#define __NR_eventfd2 19
|
||||
#define __NR_epoll_create1 20
|
||||
#define __NR_epoll_ctl 21
|
||||
#define __NR_epoll_pwait 22
|
||||
#define __NR_dup 23
|
||||
#define __NR_dup3 24
|
||||
#define __NR_fcntl 25
|
||||
#define __NR_inotify_init1 26
|
||||
#define __NR_inotify_add_watch 27
|
||||
#define __NR_inotify_rm_watch 28
|
||||
#define __NR_ioctl 29
|
||||
#define __NR_ioprio_set 30
|
||||
#define __NR_ioprio_get 31
|
||||
#define __NR_flock 32
|
||||
#define __NR_mknodat 33
|
||||
#define __NR_mkdirat 34
|
||||
#define __NR_unlinkat 35
|
||||
#define __NR_symlinkat 36
|
||||
#define __NR_linkat 37
|
||||
#define __NR_renameat 38
|
||||
#define __NR_umount2 39
|
||||
#define __NR_mount 40
|
||||
#define __NR_pivot_root 41
|
||||
#define __NR_nfsservctl 42
|
||||
#define __NR_statfs 43
|
||||
#define __NR_fstatfs 44
|
||||
#define __NR_truncate 45
|
||||
#define __NR_ftruncate 46
|
||||
#define __NR_fallocate 47
|
||||
#define __NR_faccessat 48
|
||||
#define __NR_chdir 49
|
||||
#define __NR_fchdir 50
|
||||
#define __NR_chroot 51
|
||||
#define __NR_fchmod 52
|
||||
#define __NR_fchmodat 53
|
||||
#define __NR_fchownat 54
|
||||
#define __NR_fchown 55
|
||||
#define __NR_openat 56
|
||||
#define __NR_close 57
|
||||
#define __NR_vhangup 58
|
||||
#define __NR_pipe2 59
|
||||
#define __NR_quotactl 60
|
||||
#define __NR_getdents64 61
|
||||
#define __NR_lseek 62
|
||||
#define __NR_read 63
|
||||
#define __NR_write 64
|
||||
#define __NR_readv 65
|
||||
#define __NR_writev 66
|
||||
#define __NR_pread64 67
|
||||
#define __NR_pwrite64 68
|
||||
#define __NR_preadv 69
|
||||
#define __NR_pwritev 70
|
||||
#define __NR_sendfile 71
|
||||
#define __NR_pselect6 72
|
||||
#define __NR_ppoll 73
|
||||
#define __NR_signalfd4 74
|
||||
#define __NR_vmsplice 75
|
||||
#define __NR_splice 76
|
||||
#define __NR_tee 77
|
||||
#define __NR_readlinkat 78
|
||||
#define __NR_newfstatat 79
|
||||
#define __NR_fstat 80
|
||||
#define __NR_sync 81
|
||||
#define __NR_fsync 82
|
||||
#define __NR_fdatasync 83
|
||||
#define __NR_sync_file_range 84
|
||||
#define __NR_timerfd_create 85
|
||||
#define __NR_timerfd_settime 86
|
||||
#define __NR_timerfd_gettime 87
|
||||
#define __NR_utimensat 88
|
||||
#define __NR_acct 89
|
||||
#define __NR_capget 90
|
||||
#define __NR_capset 91
|
||||
#define __NR_personality 92
|
||||
#define __NR_exit 93
|
||||
#define __NR_exit_group 94
|
||||
#define __NR_waitid 95
|
||||
#define __NR_set_tid_address 96
|
||||
#define __NR_unshare 97
|
||||
#define __NR_futex 98
|
||||
#define __NR_set_robust_list 99
|
||||
#define __NR_get_robust_list 100
|
||||
#define __NR_nanosleep 101
|
||||
#define __NR_getitimer 102
|
||||
#define __NR_setitimer 103
|
||||
#define __NR_kexec_load 104
|
||||
#define __NR_init_module 105
|
||||
#define __NR_delete_module 106
|
||||
#define __NR_timer_create 107
|
||||
#define __NR_timer_gettime 108
|
||||
#define __NR_timer_getoverrun 109
|
||||
#define __NR_timer_settime 110
|
||||
#define __NR_timer_delete 111
|
||||
#define __NR_clock_settime 112
|
||||
#define __NR_clock_gettime 113
|
||||
#define __NR_clock_getres 114
|
||||
#define __NR_clock_nanosleep 115
|
||||
#define __NR_syslog 116
|
||||
#define __NR_ptrace 117
|
||||
#define __NR_sched_setparam 118
|
||||
#define __NR_sched_setscheduler 119
|
||||
#define __NR_sched_getscheduler 120
|
||||
#define __NR_sched_getparam 121
|
||||
#define __NR_sched_setaffinity 122
|
||||
#define __NR_sched_getaffinity 123
|
||||
#define __NR_sched_yield 124
|
||||
#define __NR_sched_get_priority_max 125
|
||||
#define __NR_sched_get_priority_min 126
|
||||
#define __NR_sched_rr_get_interval 127
|
||||
#define __NR_restart_syscall 128
|
||||
#define __NR_kill 129
|
||||
#define __NR_tkill 130
|
||||
#define __NR_tgkill 131
|
||||
#define __NR_sigaltstack 132
|
||||
#define __NR_rt_sigsuspend 133
|
||||
#define __NR_rt_sigaction 134
|
||||
#define __NR_rt_sigprocmask 135
|
||||
#define __NR_rt_sigpending 136
|
||||
#define __NR_rt_sigtimedwait 137
|
||||
#define __NR_rt_sigqueueinfo 138
|
||||
#define __NR_rt_sigreturn 139
|
||||
#define __NR_setpriority 140
|
||||
#define __NR_getpriority 141
|
||||
#define __NR_reboot 142
|
||||
#define __NR_setregid 143
|
||||
#define __NR_setgid 144
|
||||
#define __NR_setreuid 145
|
||||
#define __NR_setuid 146
|
||||
#define __NR_setresuid 147
|
||||
#define __NR_getresuid 148
|
||||
#define __NR_setresgid 149
|
||||
#define __NR_getresgid 150
|
||||
#define __NR_setfsuid 151
|
||||
#define __NR_setfsgid 152
|
||||
#define __NR_times 153
|
||||
#define __NR_setpgid 154
|
||||
#define __NR_getpgid 155
|
||||
#define __NR_getsid 156
|
||||
#define __NR_setsid 157
|
||||
#define __NR_getgroups 158
|
||||
#define __NR_setgroups 159
|
||||
#define __NR_uname 160
|
||||
#define __NR_sethostname 161
|
||||
#define __NR_setdomainname 162
|
||||
#define __NR_getrlimit 163
|
||||
#define __NR_setrlimit 164
|
||||
#define __NR_getrusage 165
|
||||
#define __NR_umask 166
|
||||
#define __NR_prctl 167
|
||||
#define __NR_getcpu 168
|
||||
#define __NR_gettimeofday 169
|
||||
#define __NR_settimeofday 170
|
||||
#define __NR_adjtimex 171
|
||||
#define __NR_getpid 172
|
||||
#define __NR_getppid 173
|
||||
#define __NR_getuid 174
|
||||
#define __NR_geteuid 175
|
||||
#define __NR_getgid 176
|
||||
#define __NR_getegid 177
|
||||
#define __NR_gettid 178
|
||||
#define __NR_sysinfo 179
|
||||
#define __NR_mq_open 180
|
||||
#define __NR_mq_unlink 181
|
||||
#define __NR_mq_timedsend 182
|
||||
#define __NR_mq_timedreceive 183
|
||||
#define __NR_mq_notify 184
|
||||
#define __NR_mq_getsetattr 185
|
||||
#define __NR_msgget 186
|
||||
#define __NR_msgctl 187
|
||||
#define __NR_msgrcv 188
|
||||
#define __NR_msgsnd 189
|
||||
#define __NR_semget 190
|
||||
#define __NR_semctl 191
|
||||
#define __NR_semtimedop 192
|
||||
#define __NR_semop 193
|
||||
#define __NR_shmget 194
|
||||
#define __NR_shmctl 195
|
||||
#define __NR_shmat 196
|
||||
#define __NR_shmdt 197
|
||||
#define __NR_socket 198
|
||||
#define __NR_socketpair 199
|
||||
#define __NR_bind 200
|
||||
#define __NR_listen 201
|
||||
#define __NR_accept 202
|
||||
#define __NR_connect 203
|
||||
#define __NR_getsockname 204
|
||||
#define __NR_getpeername 205
|
||||
#define __NR_sendto 206
|
||||
#define __NR_recvfrom 207
|
||||
#define __NR_setsockopt 208
|
||||
#define __NR_getsockopt 209
|
||||
#define __NR_shutdown 210
|
||||
#define __NR_sendmsg 211
|
||||
#define __NR_recvmsg 212
|
||||
#define __NR_readahead 213
|
||||
#define __NR_brk 214
|
||||
#define __NR_munmap 215
|
||||
#define __NR_mremap 216
|
||||
#define __NR_add_key 217
|
||||
#define __NR_request_key 218
|
||||
#define __NR_keyctl 219
|
||||
#define __NR_clone 220
|
||||
#define __NR_execve 221
|
||||
#define __NR_mmap 222
|
||||
#define __NR_fadvise64 223
|
||||
#define __NR_swapon 224
|
||||
#define __NR_swapoff 225
|
||||
#define __NR_mprotect 226
|
||||
#define __NR_msync 227
|
||||
#define __NR_mlock 228
|
||||
#define __NR_munlock 229
|
||||
#define __NR_mlockall 230
|
||||
#define __NR_munlockall 231
|
||||
#define __NR_mincore 232
|
||||
#define __NR_madvise 233
|
||||
#define __NR_remap_file_pages 234
|
||||
#define __NR_mbind 235
|
||||
#define __NR_get_mempolicy 236
|
||||
#define __NR_set_mempolicy 237
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_move_pages 239
|
||||
#define __NR_rt_tgsigqueueinfo 240
|
||||
#define __NR_perf_event_open 241
|
||||
#define __NR_accept4 242
|
||||
#define __NR_recvmmsg 243
|
||||
#define __NR_wait4 260
|
||||
#define __NR_prlimit64 261
|
||||
#define __NR_fanotify_init 262
|
||||
#define __NR_fanotify_mark 263
|
||||
#define __NR_name_to_handle_at 264
|
||||
#define __NR_open_by_handle_at 265
|
||||
#define __NR_clock_adjtime 266
|
||||
#define __NR_syncfs 267
|
||||
#define __NR_setns 268
|
||||
#define __NR_sendmmsg 269
|
||||
#define __NR_process_vm_readv 270
|
||||
#define __NR_process_vm_writev 271
|
||||
#define __NR_kcmp 272
|
||||
#define __NR_finit_module 273
|
||||
#define __NR_sched_setattr 274
|
||||
#define __NR_sched_getattr 275
|
||||
#define __NR_renameat2 276
|
||||
#define __NR_seccomp 277
|
||||
#define __NR_getrandom 278
|
||||
#define __NR_memfd_create 279
|
||||
#define __NR_bpf 280
|
||||
#define __NR_execveat 281
|
||||
#define __NR_userfaultfd 282
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_mlock2 284
|
||||
#define __NR_copy_file_range 285
|
||||
#define __NR_preadv2 286
|
||||
#define __NR_pwritev2 287
|
||||
#define __NR_pkey_mprotect 288
|
||||
#define __NR_pkey_alloc 289
|
||||
#define __NR_pkey_free 290
|
||||
#define __NR_statx 291
|
||||
#define __NR_io_pgetevents 292
|
||||
|
||||
#define SYS_io_setup 0
|
||||
#define SYS_io_destroy 1
|
||||
#define SYS_io_submit 2
|
||||
#define SYS_io_cancel 3
|
||||
#define SYS_io_getevents 4
|
||||
#define SYS_setxattr 5
|
||||
#define SYS_lsetxattr 6
|
||||
#define SYS_fsetxattr 7
|
||||
#define SYS_getxattr 8
|
||||
#define SYS_lgetxattr 9
|
||||
#define SYS_fgetxattr 10
|
||||
#define SYS_listxattr 11
|
||||
#define SYS_llistxattr 12
|
||||
#define SYS_flistxattr 13
|
||||
#define SYS_removexattr 14
|
||||
#define SYS_lremovexattr 15
|
||||
#define SYS_fremovexattr 16
|
||||
#define SYS_getcwd 17
|
||||
#define SYS_lookup_dcookie 18
|
||||
#define SYS_eventfd2 19
|
||||
#define SYS_epoll_create1 20
|
||||
#define SYS_epoll_ctl 21
|
||||
#define SYS_epoll_pwait 22
|
||||
#define SYS_dup 23
|
||||
#define SYS_dup3 24
|
||||
#define SYS_fcntl 25
|
||||
#define SYS_inotify_init1 26
|
||||
#define SYS_inotify_add_watch 27
|
||||
#define SYS_inotify_rm_watch 28
|
||||
#define SYS_ioctl 29
|
||||
#define SYS_ioprio_set 30
|
||||
#define SYS_ioprio_get 31
|
||||
#define SYS_flock 32
|
||||
#define SYS_mknodat 33
|
||||
#define SYS_mkdirat 34
|
||||
#define SYS_unlinkat 35
|
||||
#define SYS_symlinkat 36
|
||||
#define SYS_linkat 37
|
||||
#define SYS_renameat 38
|
||||
#define SYS_umount2 39
|
||||
#define SYS_mount 40
|
||||
#define SYS_pivot_root 41
|
||||
#define SYS_nfsservctl 42
|
||||
#define SYS_statfs 43
|
||||
#define SYS_fstatfs 44
|
||||
#define SYS_truncate 45
|
||||
#define SYS_ftruncate 46
|
||||
#define SYS_fallocate 47
|
||||
#define SYS_faccessat 48
|
||||
#define SYS_chdir 49
|
||||
#define SYS_fchdir 50
|
||||
#define SYS_chroot 51
|
||||
#define SYS_fchmod 52
|
||||
#define SYS_fchmodat 53
|
||||
#define SYS_fchownat 54
|
||||
#define SYS_fchown 55
|
||||
#define SYS_openat 56
|
||||
#define SYS_close 57
|
||||
#define SYS_vhangup 58
|
||||
#define SYS_pipe2 59
|
||||
#define SYS_quotactl 60
|
||||
#define SYS_getdents64 61
|
||||
#define SYS_lseek 62
|
||||
#define SYS_read 63
|
||||
#define SYS_write 64
|
||||
#define SYS_readv 65
|
||||
#define SYS_writev 66
|
||||
#define SYS_pread64 67
|
||||
#define SYS_pwrite64 68
|
||||
#define SYS_preadv 69
|
||||
#define SYS_pwritev 70
|
||||
#define SYS_sendfile 71
|
||||
#define SYS_pselect6 72
|
||||
#define SYS_ppoll 73
|
||||
#define SYS_signalfd4 74
|
||||
#define SYS_vmsplice 75
|
||||
#define SYS_splice 76
|
||||
#define SYS_tee 77
|
||||
#define SYS_readlinkat 78
|
||||
#define SYS_newfstatat 79
|
||||
#define SYS_fstat 80
|
||||
#define SYS_sync 81
|
||||
#define SYS_fsync 82
|
||||
#define SYS_fdatasync 83
|
||||
#define SYS_sync_file_range 84
|
||||
#define SYS_timerfd_create 85
|
||||
#define SYS_timerfd_settime 86
|
||||
#define SYS_timerfd_gettime 87
|
||||
#define SYS_utimensat 88
|
||||
#define SYS_acct 89
|
||||
#define SYS_capget 90
|
||||
#define SYS_capset 91
|
||||
#define SYS_personality 92
|
||||
#define SYS_exit 93
|
||||
#define SYS_exit_group 94
|
||||
#define SYS_waitid 95
|
||||
#define SYS_set_tid_address 96
|
||||
#define SYS_unshare 97
|
||||
#define SYS_futex 98
|
||||
#define SYS_set_robust_list 99
|
||||
#define SYS_get_robust_list 100
|
||||
#define SYS_nanosleep 101
|
||||
#define SYS_getitimer 102
|
||||
#define SYS_setitimer 103
|
||||
#define SYS_kexec_load 104
|
||||
#define SYS_init_module 105
|
||||
#define SYS_delete_module 106
|
||||
#define SYS_timer_create 107
|
||||
#define SYS_timer_gettime 108
|
||||
#define SYS_timer_getoverrun 109
|
||||
#define SYS_timer_settime 110
|
||||
#define SYS_timer_delete 111
|
||||
#define SYS_clock_settime 112
|
||||
#define SYS_clock_gettime 113
|
||||
#define SYS_clock_getres 114
|
||||
#define SYS_clock_nanosleep 115
|
||||
#define SYS_syslog 116
|
||||
#define SYS_ptrace 117
|
||||
#define SYS_sched_setparam 118
|
||||
#define SYS_sched_setscheduler 119
|
||||
#define SYS_sched_getscheduler 120
|
||||
#define SYS_sched_getparam 121
|
||||
#define SYS_sched_setaffinity 122
|
||||
#define SYS_sched_getaffinity 123
|
||||
#define SYS_sched_yield 124
|
||||
#define SYS_sched_get_priority_max 125
|
||||
#define SYS_sched_get_priority_min 126
|
||||
#define SYS_sched_rr_get_interval 127
|
||||
#define SYS_restart_syscall 128
|
||||
#define SYS_kill 129
|
||||
#define SYS_tkill 130
|
||||
#define SYS_tgkill 131
|
||||
#define SYS_sigaltstack 132
|
||||
#define SYS_rt_sigsuspend 133
|
||||
#define SYS_rt_sigaction 134
|
||||
#define SYS_rt_sigprocmask 135
|
||||
#define SYS_rt_sigpending 136
|
||||
#define SYS_rt_sigtimedwait 137
|
||||
#define SYS_rt_sigqueueinfo 138
|
||||
#define SYS_rt_sigreturn 139
|
||||
#define SYS_setpriority 140
|
||||
#define SYS_getpriority 141
|
||||
#define SYS_reboot 142
|
||||
#define SYS_setregid 143
|
||||
#define SYS_setgid 144
|
||||
#define SYS_setreuid 145
|
||||
#define SYS_setuid 146
|
||||
#define SYS_setresuid 147
|
||||
#define SYS_getresuid 148
|
||||
#define SYS_setresgid 149
|
||||
#define SYS_getresgid 150
|
||||
#define SYS_setfsuid 151
|
||||
#define SYS_setfsgid 152
|
||||
#define SYS_times 153
|
||||
#define SYS_setpgid 154
|
||||
#define SYS_getpgid 155
|
||||
#define SYS_getsid 156
|
||||
#define SYS_setsid 157
|
||||
#define SYS_getgroups 158
|
||||
#define SYS_setgroups 159
|
||||
#define SYS_uname 160
|
||||
#define SYS_sethostname 161
|
||||
#define SYS_setdomainname 162
|
||||
#define SYS_getrlimit 163
|
||||
#define SYS_setrlimit 164
|
||||
#define SYS_getrusage 165
|
||||
#define SYS_umask 166
|
||||
#define SYS_prctl 167
|
||||
#define SYS_getcpu 168
|
||||
#define SYS_gettimeofday 169
|
||||
#define SYS_settimeofday 170
|
||||
#define SYS_adjtimex 171
|
||||
#define SYS_getpid 172
|
||||
#define SYS_getppid 173
|
||||
#define SYS_getuid 174
|
||||
#define SYS_geteuid 175
|
||||
#define SYS_getgid 176
|
||||
#define SYS_getegid 177
|
||||
#define SYS_gettid 178
|
||||
#define SYS_sysinfo 179
|
||||
#define SYS_mq_open 180
|
||||
#define SYS_mq_unlink 181
|
||||
#define SYS_mq_timedsend 182
|
||||
#define SYS_mq_timedreceive 183
|
||||
#define SYS_mq_notify 184
|
||||
#define SYS_mq_getsetattr 185
|
||||
#define SYS_msgget 186
|
||||
#define SYS_msgctl 187
|
||||
#define SYS_msgrcv 188
|
||||
#define SYS_msgsnd 189
|
||||
#define SYS_semget 190
|
||||
#define SYS_semctl 191
|
||||
#define SYS_semtimedop 192
|
||||
#define SYS_semop 193
|
||||
#define SYS_shmget 194
|
||||
#define SYS_shmctl 195
|
||||
#define SYS_shmat 196
|
||||
#define SYS_shmdt 197
|
||||
#define SYS_socket 198
|
||||
#define SYS_socketpair 199
|
||||
#define SYS_bind 200
|
||||
#define SYS_listen 201
|
||||
#define SYS_accept 202
|
||||
#define SYS_connect 203
|
||||
#define SYS_getsockname 204
|
||||
#define SYS_getpeername 205
|
||||
#define SYS_sendto 206
|
||||
#define SYS_recvfrom 207
|
||||
#define SYS_setsockopt 208
|
||||
#define SYS_getsockopt 209
|
||||
#define SYS_shutdown 210
|
||||
#define SYS_sendmsg 211
|
||||
#define SYS_recvmsg 212
|
||||
#define SYS_readahead 213
|
||||
#define SYS_brk 214
|
||||
#define SYS_munmap 215
|
||||
#define SYS_mremap 216
|
||||
#define SYS_add_key 217
|
||||
#define SYS_request_key 218
|
||||
#define SYS_keyctl 219
|
||||
#define SYS_clone 220
|
||||
#define SYS_execve 221
|
||||
#define SYS_mmap 222
|
||||
#define SYS_fadvise64 223
|
||||
#define SYS_swapon 224
|
||||
#define SYS_swapoff 225
|
||||
#define SYS_mprotect 226
|
||||
#define SYS_msync 227
|
||||
#define SYS_mlock 228
|
||||
#define SYS_munlock 229
|
||||
#define SYS_mlockall 230
|
||||
#define SYS_munlockall 231
|
||||
#define SYS_mincore 232
|
||||
#define SYS_madvise 233
|
||||
#define SYS_remap_file_pages 234
|
||||
#define SYS_mbind 235
|
||||
#define SYS_get_mempolicy 236
|
||||
#define SYS_set_mempolicy 237
|
||||
#define SYS_migrate_pages 238
|
||||
#define SYS_move_pages 239
|
||||
#define SYS_rt_tgsigqueueinfo 240
|
||||
#define SYS_perf_event_open 241
|
||||
#define SYS_accept4 242
|
||||
#define SYS_recvmmsg 243
|
||||
#define SYS_wait4 260
|
||||
#define SYS_prlimit64 261
|
||||
#define SYS_fanotify_init 262
|
||||
#define SYS_fanotify_mark 263
|
||||
#define SYS_name_to_handle_at 264
|
||||
#define SYS_open_by_handle_at 265
|
||||
#define SYS_clock_adjtime 266
|
||||
#define SYS_syncfs 267
|
||||
#define SYS_setns 268
|
||||
#define SYS_sendmmsg 269
|
||||
#define SYS_process_vm_readv 270
|
||||
#define SYS_process_vm_writev 271
|
||||
#define SYS_kcmp 272
|
||||
#define SYS_finit_module 273
|
||||
#define SYS_sched_setattr 274
|
||||
#define SYS_sched_getattr 275
|
||||
#define SYS_renameat2 276
|
||||
#define SYS_seccomp 277
|
||||
#define SYS_getrandom 278
|
||||
#define SYS_memfd_create 279
|
||||
#define SYS_bpf 280
|
||||
#define SYS_execveat 281
|
||||
#define SYS_userfaultfd 282
|
||||
#define SYS_membarrier 283
|
||||
#define SYS_mlock2 284
|
||||
#define SYS_copy_file_range 285
|
||||
#define SYS_preadv2 286
|
||||
#define SYS_pwritev2 287
|
||||
#define SYS_pkey_mprotect 288
|
||||
#define SYS_pkey_alloc 289
|
||||
#define SYS_pkey_free 290
|
||||
#define SYS_statx 291
|
||||
#define SYS_io_pgetevents 292
|
||||
@ -1,47 +0,0 @@
|
||||
/* generated for aarch64_be-linux-musl-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
@ -1,401 +0,0 @@
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
|
||||
typedef __builtin_va_list va_list;
|
||||
#define __DEFINED_va_list
|
||||
#endif
|
||||
|
||||
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
|
||||
typedef __builtin_va_list __isoc_va_list;
|
||||
#define __DEFINED___isoc_va_list
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
|
||||
typedef unsigned wchar_t;
|
||||
#define __DEFINED_wchar_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef int blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned int nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
|
||||
typedef float float_t;
|
||||
#define __DEFINED_float_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
|
||||
typedef double double_t;
|
||||
#define __DEFINED_double_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
|
||||
typedef struct { long long __ll; long double __ld; } max_align_t;
|
||||
#define __DEFINED_max_align_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
|
||||
typedef long time_t;
|
||||
#define __DEFINED_time_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
|
||||
typedef long suseconds_t;
|
||||
#define __DEFINED_suseconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
#define __DEFINED_pthread_attr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
#define __DEFINED_pthread_mutex_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
#define __DEFINED_mtx_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
#define __DEFINED_pthread_cond_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
#define __DEFINED_cnd_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
#define __DEFINED_pthread_rwlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
#define __DEFINED_pthread_barrier_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
|
||||
typedef unsigned _Addr size_t;
|
||||
#define __DEFINED_size_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
|
||||
typedef unsigned _Addr uintptr_t;
|
||||
#define __DEFINED_uintptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
|
||||
typedef _Addr ptrdiff_t;
|
||||
#define __DEFINED_ptrdiff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
|
||||
typedef _Addr ssize_t;
|
||||
#define __DEFINED_ssize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
|
||||
typedef _Addr intptr_t;
|
||||
#define __DEFINED_intptr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
|
||||
typedef _Addr regoff_t;
|
||||
#define __DEFINED_regoff_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
|
||||
typedef _Reg register_t;
|
||||
#define __DEFINED_register_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
|
||||
typedef signed char int8_t;
|
||||
#define __DEFINED_int8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
|
||||
typedef signed short int16_t;
|
||||
#define __DEFINED_int16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
|
||||
typedef signed int int32_t;
|
||||
#define __DEFINED_int32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
|
||||
typedef signed _Int64 int64_t;
|
||||
#define __DEFINED_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
|
||||
typedef signed _Int64 intmax_t;
|
||||
#define __DEFINED_intmax_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
|
||||
typedef unsigned char uint8_t;
|
||||
#define __DEFINED_uint8_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
|
||||
typedef unsigned short uint16_t;
|
||||
#define __DEFINED_uint16_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
|
||||
typedef unsigned int uint32_t;
|
||||
#define __DEFINED_uint32_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
|
||||
typedef unsigned _Int64 uint64_t;
|
||||
#define __DEFINED_uint64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
|
||||
typedef unsigned _Int64 u_int64_t;
|
||||
#define __DEFINED_u_int64_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
|
||||
typedef unsigned _Int64 uintmax_t;
|
||||
#define __DEFINED_uintmax_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
|
||||
typedef unsigned mode_t;
|
||||
#define __DEFINED_mode_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned _Reg nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
|
||||
typedef _Int64 off_t;
|
||||
#define __DEFINED_off_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
|
||||
typedef unsigned _Int64 ino_t;
|
||||
#define __DEFINED_ino_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
|
||||
typedef unsigned _Int64 dev_t;
|
||||
#define __DEFINED_dev_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef long blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
|
||||
typedef _Int64 blkcnt_t;
|
||||
#define __DEFINED_blkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
|
||||
typedef unsigned _Int64 fsblkcnt_t;
|
||||
#define __DEFINED_fsblkcnt_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
|
||||
typedef unsigned _Int64 fsfilcnt_t;
|
||||
#define __DEFINED_fsfilcnt_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
|
||||
typedef unsigned long wctype_t;
|
||||
#define __DEFINED_wctype_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
|
||||
typedef void * timer_t;
|
||||
#define __DEFINED_timer_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
|
||||
typedef int clockid_t;
|
||||
#define __DEFINED_clockid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
|
||||
typedef long clock_t;
|
||||
#define __DEFINED_clock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
|
||||
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
|
||||
#define __DEFINED_struct_timeval
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
|
||||
struct timespec { time_t tv_sec; long tv_nsec; };
|
||||
#define __DEFINED_struct_timespec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
|
||||
typedef int pid_t;
|
||||
#define __DEFINED_pid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
|
||||
typedef unsigned id_t;
|
||||
#define __DEFINED_id_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
|
||||
typedef unsigned uid_t;
|
||||
#define __DEFINED_uid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
|
||||
typedef unsigned gid_t;
|
||||
#define __DEFINED_gid_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
|
||||
typedef int key_t;
|
||||
#define __DEFINED_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
|
||||
typedef unsigned useconds_t;
|
||||
#define __DEFINED_useconds_t
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef unsigned long pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
|
||||
typedef struct __pthread * pthread_t;
|
||||
#define __DEFINED_pthread_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
|
||||
typedef int pthread_once_t;
|
||||
#define __DEFINED_pthread_once_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
|
||||
typedef unsigned pthread_key_t;
|
||||
#define __DEFINED_pthread_key_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
|
||||
typedef int pthread_spinlock_t;
|
||||
#define __DEFINED_pthread_spinlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_mutexattr_t;
|
||||
#define __DEFINED_pthread_mutexattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_condattr_t;
|
||||
#define __DEFINED_pthread_condattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
|
||||
typedef struct { unsigned __attr; } pthread_barrierattr_t;
|
||||
#define __DEFINED_pthread_barrierattr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
|
||||
typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
#define __DEFINED_pthread_rwlockattr_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
|
||||
typedef struct _IO_FILE FILE;
|
||||
#define __DEFINED_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
|
||||
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
|
||||
#define __DEFINED_mbstate_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
|
||||
typedef struct __locale_struct * locale_t;
|
||||
#define __DEFINED_locale_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
|
||||
typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
|
||||
#define __DEFINED_sigset_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
|
||||
struct iovec { void *iov_base; size_t iov_len; };
|
||||
#define __DEFINED_struct_iovec
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
|
||||
typedef unsigned socklen_t;
|
||||
#define __DEFINED_socklen_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
|
||||
typedef unsigned short sa_family_t;
|
||||
#define __DEFINED_sa_family_t
|
||||
#endif
|
||||
|
||||
|
||||
#undef _Addr
|
||||
#undef _Int64
|
||||
#undef _Reg
|
||||
@ -1,5 +0,0 @@
|
||||
#if __AARCH64EB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
@ -1,19 +0,0 @@
|
||||
#define FE_INVALID 1
|
||||
#define FE_DIVBYZERO 2
|
||||
#define FE_OVERFLOW 4
|
||||
#define FE_UNDERFLOW 8
|
||||
#define FE_INEXACT 16
|
||||
#define FE_ALL_EXCEPT 31
|
||||
#define FE_TONEAREST 0
|
||||
#define FE_DOWNWARD 0x800000
|
||||
#define FE_UPWARD 0x400000
|
||||
#define FE_TOWARDZERO 0xc00000
|
||||
|
||||
typedef unsigned int fexcept_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int __fpcr;
|
||||
unsigned int __fpsr;
|
||||
} fenv_t;
|
||||
|
||||
#define FE_DFL_ENV ((const fenv_t *) -1)
|
||||
@ -1,16 +0,0 @@
|
||||
#define FLT_EVAL_METHOD 0
|
||||
|
||||
#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
|
||||
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
|
||||
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
|
||||
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
|
||||
|
||||
#define LDBL_MANT_DIG 113
|
||||
#define LDBL_MIN_EXP (-16381)
|
||||
#define LDBL_MAX_EXP 16384
|
||||
|
||||
#define LDBL_DIG 33
|
||||
#define LDBL_MIN_10_EXP (-4931)
|
||||
#define LDBL_MAX_10_EXP 4932
|
||||
|
||||
#define DECIMAL_DIG 36
|
||||
@ -1,14 +0,0 @@
|
||||
struct ipc_perm {
|
||||
key_t __ipc_perm_key;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
uid_t cuid;
|
||||
gid_t cgid;
|
||||
mode_t mode;
|
||||
unsigned short __ipc_perm_seq;
|
||||
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
@ -1,7 +0,0 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#endif
|
||||
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL
|
||||
@ -1,2 +0,0 @@
|
||||
#define _POSIX_V6_LP64_OFF64 1
|
||||
#define _POSIX_V7_LP64_OFF64 1
|
||||
@ -1,2 +0,0 @@
|
||||
#undef __WORDSIZE
|
||||
#define __WORDSIZE 64
|
||||
@ -1,14 +0,0 @@
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm;
|
||||
time_t sem_otime;
|
||||
time_t sem_ctime;
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
unsigned short sem_nsems;
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
#else
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
unsigned short sem_nsems;
|
||||
#endif
|
||||
time_t __unused3;
|
||||
time_t __unused4;
|
||||
};
|
||||
@ -1 +0,0 @@
|
||||
typedef unsigned long __jmp_buf[22];
|
||||
@ -1,153 +0,0 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MINSIGSTKSZ 6144
|
||||
#define SIGSTKSZ 12288
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef unsigned long greg_t;
|
||||
typedef unsigned long gregset_t[34];
|
||||
|
||||
typedef struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
} fpregset_t;
|
||||
typedef struct sigcontext {
|
||||
unsigned long fault_address;
|
||||
unsigned long regs[31];
|
||||
unsigned long sp, pc, pstate;
|
||||
long double __reserved[256];
|
||||
} mcontext_t;
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
#define ESR_MAGIC 0x45535201
|
||||
#define EXTRA_MAGIC 0x45585401
|
||||
#define SVE_MAGIC 0x53564501
|
||||
struct _aarch64_ctx {
|
||||
unsigned int magic;
|
||||
unsigned int size;
|
||||
};
|
||||
struct fpsimd_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
long double vregs[32];
|
||||
};
|
||||
struct esr_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long esr;
|
||||
};
|
||||
struct extra_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned long datap;
|
||||
unsigned int size;
|
||||
unsigned int __reserved[3];
|
||||
};
|
||||
struct sve_context {
|
||||
struct _aarch64_ctx head;
|
||||
unsigned short vl;
|
||||
unsigned short __reserved[3];
|
||||
};
|
||||
#define SVE_VQ_BYTES 16
|
||||
#define SVE_VQ_MIN 1
|
||||
#define SVE_VQ_MAX 512
|
||||
#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
|
||||
#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
|
||||
#define SVE_NUM_ZREGS 32
|
||||
#define SVE_NUM_PREGS 16
|
||||
#define sve_vl_valid(vl) \
|
||||
((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
|
||||
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
|
||||
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
|
||||
#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
|
||||
#define SVE_SIG_REGS_OFFSET \
|
||||
((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
|
||||
/ SVE_VQ_BYTES * SVE_VQ_BYTES)
|
||||
#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
|
||||
#define SVE_SIG_ZREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_ZREGS_SIZE(vq) \
|
||||
(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
|
||||
#define SVE_SIG_PREGS_OFFSET(vq) \
|
||||
(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
|
||||
#define SVE_SIG_PREG_OFFSET(vq, n) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
|
||||
#define SVE_SIG_PREGS_SIZE(vq) \
|
||||
(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
|
||||
#define SVE_SIG_FFR_OFFSET(vq) \
|
||||
(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
|
||||
#define SVE_SIG_REGS_SIZE(vq) \
|
||||
(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
|
||||
#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
|
||||
#else
|
||||
typedef struct {
|
||||
long double __regs[18+256];
|
||||
} mcontext_t;
|
||||
#endif
|
||||
|
||||
struct sigaltstack {
|
||||
void *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
};
|
||||
|
||||
typedef struct __ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct __ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t uc_mcontext;
|
||||
} ucontext_t;
|
||||
|
||||
#define SA_NOCLDSTOP 1
|
||||
#define SA_NOCLDWAIT 2
|
||||
#define SA_SIGINFO 4
|
||||
#define SA_ONSTACK 0x08000000
|
||||
#define SA_RESTART 0x10000000
|
||||
#define SA_NODEFER 0x40000000
|
||||
#define SA_RESETHAND 0x80000000
|
||||
#define SA_RESTORER 0x04000000
|
||||
|
||||
#endif
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 6
|
||||
#define SIGIOT SIGABRT
|
||||
#define SIGBUS 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGUSR1 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGUSR2 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGSTKFLT 16
|
||||
#define SIGCHLD 17
|
||||
#define SIGCONT 18
|
||||
#define SIGSTOP 19
|
||||
#define SIGTSTP 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22
|
||||
#define SIGURG 23
|
||||
#define SIGXCPU 24
|
||||
#define SIGXFSZ 25
|
||||
#define SIGVTALRM 26
|
||||
#define SIGPROF 27
|
||||
#define SIGWINCH 28
|
||||
#define SIGIO 29
|
||||
#define SIGPOLL 29
|
||||
#define SIGPWR 30
|
||||
#define SIGSYS 31
|
||||
#define SIGUNUSED SIGSYS
|
||||
|
||||
#define _NSIG 65
|
||||
@ -1,33 +0,0 @@
|
||||
#include <endian.h>
|
||||
|
||||
struct msghdr {
|
||||
void *msg_name;
|
||||
socklen_t msg_namelen;
|
||||
struct iovec *msg_iov;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1, msg_iovlen;
|
||||
#else
|
||||
int msg_iovlen, __pad1;
|
||||
#endif
|
||||
void *msg_control;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad2;
|
||||
socklen_t msg_controllen;
|
||||
#else
|
||||
socklen_t msg_controllen;
|
||||
int __pad2;
|
||||
#endif
|
||||
int msg_flags;
|
||||
};
|
||||
|
||||
struct cmsghdr {
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
int __pad1;
|
||||
socklen_t cmsg_len;
|
||||
#else
|
||||
socklen_t cmsg_len;
|
||||
int __pad1;
|
||||
#endif
|
||||
int cmsg_level;
|
||||
int cmsg_type;
|
||||
};
|
||||
@ -1,18 +0,0 @@
|
||||
struct stat {
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
mode_t st_mode;
|
||||
nlink_t st_nlink;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
dev_t st_rdev;
|
||||
unsigned long __pad;
|
||||
off_t st_size;
|
||||
blksize_t st_blksize;
|
||||
int __pad2;
|
||||
blkcnt_t st_blocks;
|
||||
struct timespec st_atim;
|
||||
struct timespec st_mtim;
|
||||
struct timespec st_ctim;
|
||||
unsigned __unused[2];
|
||||
};
|
||||
@ -1,555 +0,0 @@
|
||||
#define __NR_io_setup 0
|
||||
#define __NR_io_destroy 1
|
||||
#define __NR_io_submit 2
|
||||
#define __NR_io_cancel 3
|
||||
#define __NR_io_getevents 4
|
||||
#define __NR_setxattr 5
|
||||
#define __NR_lsetxattr 6
|
||||
#define __NR_fsetxattr 7
|
||||
#define __NR_getxattr 8
|
||||
#define __NR_lgetxattr 9
|
||||
#define __NR_fgetxattr 10
|
||||
#define __NR_listxattr 11
|
||||
#define __NR_llistxattr 12
|
||||
#define __NR_flistxattr 13
|
||||
#define __NR_removexattr 14
|
||||
#define __NR_lremovexattr 15
|
||||
#define __NR_fremovexattr 16
|
||||
#define __NR_getcwd 17
|
||||
#define __NR_lookup_dcookie 18
|
||||
#define __NR_eventfd2 19
|
||||
#define __NR_epoll_create1 20
|
||||
#define __NR_epoll_ctl 21
|
||||
#define __NR_epoll_pwait 22
|
||||
#define __NR_dup 23
|
||||
#define __NR_dup3 24
|
||||
#define __NR_fcntl 25
|
||||
#define __NR_inotify_init1 26
|
||||
#define __NR_inotify_add_watch 27
|
||||
#define __NR_inotify_rm_watch 28
|
||||
#define __NR_ioctl 29
|
||||
#define __NR_ioprio_set 30
|
||||
#define __NR_ioprio_get 31
|
||||
#define __NR_flock 32
|
||||
#define __NR_mknodat 33
|
||||
#define __NR_mkdirat 34
|
||||
#define __NR_unlinkat 35
|
||||
#define __NR_symlinkat 36
|
||||
#define __NR_linkat 37
|
||||
#define __NR_renameat 38
|
||||
#define __NR_umount2 39
|
||||
#define __NR_mount 40
|
||||
#define __NR_pivot_root 41
|
||||
#define __NR_nfsservctl 42
|
||||
#define __NR_statfs 43
|
||||
#define __NR_fstatfs 44
|
||||
#define __NR_truncate 45
|
||||
#define __NR_ftruncate 46
|
||||
#define __NR_fallocate 47
|
||||
#define __NR_faccessat 48
|
||||
#define __NR_chdir 49
|
||||
#define __NR_fchdir 50
|
||||
#define __NR_chroot 51
|
||||
#define __NR_fchmod 52
|
||||
#define __NR_fchmodat 53
|
||||
#define __NR_fchownat 54
|
||||
#define __NR_fchown 55
|
||||
#define __NR_openat 56
|
||||
#define __NR_close 57
|
||||
#define __NR_vhangup 58
|
||||
#define __NR_pipe2 59
|
||||
#define __NR_quotactl 60
|
||||
#define __NR_getdents64 61
|
||||
#define __NR_lseek 62
|
||||
#define __NR_read 63
|
||||
#define __NR_write 64
|
||||
#define __NR_readv 65
|
||||
#define __NR_writev 66
|
||||
#define __NR_pread64 67
|
||||
#define __NR_pwrite64 68
|
||||
#define __NR_preadv 69
|
||||
#define __NR_pwritev 70
|
||||
#define __NR_sendfile 71
|
||||
#define __NR_pselect6 72
|
||||
#define __NR_ppoll 73
|
||||
#define __NR_signalfd4 74
|
||||
#define __NR_vmsplice 75
|
||||
#define __NR_splice 76
|
||||
#define __NR_tee 77
|
||||
#define __NR_readlinkat 78
|
||||
#define __NR_newfstatat 79
|
||||
#define __NR_fstat 80
|
||||
#define __NR_sync 81
|
||||
#define __NR_fsync 82
|
||||
#define __NR_fdatasync 83
|
||||
#define __NR_sync_file_range 84
|
||||
#define __NR_timerfd_create 85
|
||||
#define __NR_timerfd_settime 86
|
||||
#define __NR_timerfd_gettime 87
|
||||
#define __NR_utimensat 88
|
||||
#define __NR_acct 89
|
||||
#define __NR_capget 90
|
||||
#define __NR_capset 91
|
||||
#define __NR_personality 92
|
||||
#define __NR_exit 93
|
||||
#define __NR_exit_group 94
|
||||
#define __NR_waitid 95
|
||||
#define __NR_set_tid_address 96
|
||||
#define __NR_unshare 97
|
||||
#define __NR_futex 98
|
||||
#define __NR_set_robust_list 99
|
||||
#define __NR_get_robust_list 100
|
||||
#define __NR_nanosleep 101
|
||||
#define __NR_getitimer 102
|
||||
#define __NR_setitimer 103
|
||||
#define __NR_kexec_load 104
|
||||
#define __NR_init_module 105
|
||||
#define __NR_delete_module 106
|
||||
#define __NR_timer_create 107
|
||||
#define __NR_timer_gettime 108
|
||||
#define __NR_timer_getoverrun 109
|
||||
#define __NR_timer_settime 110
|
||||
#define __NR_timer_delete 111
|
||||
#define __NR_clock_settime 112
|
||||
#define __NR_clock_gettime 113
|
||||
#define __NR_clock_getres 114
|
||||
#define __NR_clock_nanosleep 115
|
||||
#define __NR_syslog 116
|
||||
#define __NR_ptrace 117
|
||||
#define __NR_sched_setparam 118
|
||||
#define __NR_sched_setscheduler 119
|
||||
#define __NR_sched_getscheduler 120
|
||||
#define __NR_sched_getparam 121
|
||||
#define __NR_sched_setaffinity 122
|
||||
#define __NR_sched_getaffinity 123
|
||||
#define __NR_sched_yield 124
|
||||
#define __NR_sched_get_priority_max 125
|
||||
#define __NR_sched_get_priority_min 126
|
||||
#define __NR_sched_rr_get_interval 127
|
||||
#define __NR_restart_syscall 128
|
||||
#define __NR_kill 129
|
||||
#define __NR_tkill 130
|
||||
#define __NR_tgkill 131
|
||||
#define __NR_sigaltstack 132
|
||||
#define __NR_rt_sigsuspend 133
|
||||
#define __NR_rt_sigaction 134
|
||||
#define __NR_rt_sigprocmask 135
|
||||
#define __NR_rt_sigpending 136
|
||||
#define __NR_rt_sigtimedwait 137
|
||||
#define __NR_rt_sigqueueinfo 138
|
||||
#define __NR_rt_sigreturn 139
|
||||
#define __NR_setpriority 140
|
||||
#define __NR_getpriority 141
|
||||
#define __NR_reboot 142
|
||||
#define __NR_setregid 143
|
||||
#define __NR_setgid 144
|
||||
#define __NR_setreuid 145
|
||||
#define __NR_setuid 146
|
||||
#define __NR_setresuid 147
|
||||
#define __NR_getresuid 148
|
||||
#define __NR_setresgid 149
|
||||
#define __NR_getresgid 150
|
||||
#define __NR_setfsuid 151
|
||||
#define __NR_setfsgid 152
|
||||
#define __NR_times 153
|
||||
#define __NR_setpgid 154
|
||||
#define __NR_getpgid 155
|
||||
#define __NR_getsid 156
|
||||
#define __NR_setsid 157
|
||||
#define __NR_getgroups 158
|
||||
#define __NR_setgroups 159
|
||||
#define __NR_uname 160
|
||||
#define __NR_sethostname 161
|
||||
#define __NR_setdomainname 162
|
||||
#define __NR_getrlimit 163
|
||||
#define __NR_setrlimit 164
|
||||
#define __NR_getrusage 165
|
||||
#define __NR_umask 166
|
||||
#define __NR_prctl 167
|
||||
#define __NR_getcpu 168
|
||||
#define __NR_gettimeofday 169
|
||||
#define __NR_settimeofday 170
|
||||
#define __NR_adjtimex 171
|
||||
#define __NR_getpid 172
|
||||
#define __NR_getppid 173
|
||||
#define __NR_getuid 174
|
||||
#define __NR_geteuid 175
|
||||
#define __NR_getgid 176
|
||||
#define __NR_getegid 177
|
||||
#define __NR_gettid 178
|
||||
#define __NR_sysinfo 179
|
||||
#define __NR_mq_open 180
|
||||
#define __NR_mq_unlink 181
|
||||
#define __NR_mq_timedsend 182
|
||||
#define __NR_mq_timedreceive 183
|
||||
#define __NR_mq_notify 184
|
||||
#define __NR_mq_getsetattr 185
|
||||
#define __NR_msgget 186
|
||||
#define __NR_msgctl 187
|
||||
#define __NR_msgrcv 188
|
||||
#define __NR_msgsnd 189
|
||||
#define __NR_semget 190
|
||||
#define __NR_semctl 191
|
||||
#define __NR_semtimedop 192
|
||||
#define __NR_semop 193
|
||||
#define __NR_shmget 194
|
||||
#define __NR_shmctl 195
|
||||
#define __NR_shmat 196
|
||||
#define __NR_shmdt 197
|
||||
#define __NR_socket 198
|
||||
#define __NR_socketpair 199
|
||||
#define __NR_bind 200
|
||||
#define __NR_listen 201
|
||||
#define __NR_accept 202
|
||||
#define __NR_connect 203
|
||||
#define __NR_getsockname 204
|
||||
#define __NR_getpeername 205
|
||||
#define __NR_sendto 206
|
||||
#define __NR_recvfrom 207
|
||||
#define __NR_setsockopt 208
|
||||
#define __NR_getsockopt 209
|
||||
#define __NR_shutdown 210
|
||||
#define __NR_sendmsg 211
|
||||
#define __NR_recvmsg 212
|
||||
#define __NR_readahead 213
|
||||
#define __NR_brk 214
|
||||
#define __NR_munmap 215
|
||||
#define __NR_mremap 216
|
||||
#define __NR_add_key 217
|
||||
#define __NR_request_key 218
|
||||
#define __NR_keyctl 219
|
||||
#define __NR_clone 220
|
||||
#define __NR_execve 221
|
||||
#define __NR_mmap 222
|
||||
#define __NR_fadvise64 223
|
||||
#define __NR_swapon 224
|
||||
#define __NR_swapoff 225
|
||||
#define __NR_mprotect 226
|
||||
#define __NR_msync 227
|
||||
#define __NR_mlock 228
|
||||
#define __NR_munlock 229
|
||||
#define __NR_mlockall 230
|
||||
#define __NR_munlockall 231
|
||||
#define __NR_mincore 232
|
||||
#define __NR_madvise 233
|
||||
#define __NR_remap_file_pages 234
|
||||
#define __NR_mbind 235
|
||||
#define __NR_get_mempolicy 236
|
||||
#define __NR_set_mempolicy 237
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_move_pages 239
|
||||
#define __NR_rt_tgsigqueueinfo 240
|
||||
#define __NR_perf_event_open 241
|
||||
#define __NR_accept4 242
|
||||
#define __NR_recvmmsg 243
|
||||
#define __NR_wait4 260
|
||||
#define __NR_prlimit64 261
|
||||
#define __NR_fanotify_init 262
|
||||
#define __NR_fanotify_mark 263
|
||||
#define __NR_name_to_handle_at 264
|
||||
#define __NR_open_by_handle_at 265
|
||||
#define __NR_clock_adjtime 266
|
||||
#define __NR_syncfs 267
|
||||
#define __NR_setns 268
|
||||
#define __NR_sendmmsg 269
|
||||
#define __NR_process_vm_readv 270
|
||||
#define __NR_process_vm_writev 271
|
||||
#define __NR_kcmp 272
|
||||
#define __NR_finit_module 273
|
||||
#define __NR_sched_setattr 274
|
||||
#define __NR_sched_getattr 275
|
||||
#define __NR_renameat2 276
|
||||
#define __NR_seccomp 277
|
||||
#define __NR_getrandom 278
|
||||
#define __NR_memfd_create 279
|
||||
#define __NR_bpf 280
|
||||
#define __NR_execveat 281
|
||||
#define __NR_userfaultfd 282
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_mlock2 284
|
||||
#define __NR_copy_file_range 285
|
||||
#define __NR_preadv2 286
|
||||
#define __NR_pwritev2 287
|
||||
#define __NR_pkey_mprotect 288
|
||||
#define __NR_pkey_alloc 289
|
||||
#define __NR_pkey_free 290
|
||||
#define __NR_statx 291
|
||||
#define __NR_io_pgetevents 292
|
||||
|
||||
#define SYS_io_setup 0
|
||||
#define SYS_io_destroy 1
|
||||
#define SYS_io_submit 2
|
||||
#define SYS_io_cancel 3
|
||||
#define SYS_io_getevents 4
|
||||
#define SYS_setxattr 5
|
||||
#define SYS_lsetxattr 6
|
||||
#define SYS_fsetxattr 7
|
||||
#define SYS_getxattr 8
|
||||
#define SYS_lgetxattr 9
|
||||
#define SYS_fgetxattr 10
|
||||
#define SYS_listxattr 11
|
||||
#define SYS_llistxattr 12
|
||||
#define SYS_flistxattr 13
|
||||
#define SYS_removexattr 14
|
||||
#define SYS_lremovexattr 15
|
||||
#define SYS_fremovexattr 16
|
||||
#define SYS_getcwd 17
|
||||
#define SYS_lookup_dcookie 18
|
||||
#define SYS_eventfd2 19
|
||||
#define SYS_epoll_create1 20
|
||||
#define SYS_epoll_ctl 21
|
||||
#define SYS_epoll_pwait 22
|
||||
#define SYS_dup 23
|
||||
#define SYS_dup3 24
|
||||
#define SYS_fcntl 25
|
||||
#define SYS_inotify_init1 26
|
||||
#define SYS_inotify_add_watch 27
|
||||
#define SYS_inotify_rm_watch 28
|
||||
#define SYS_ioctl 29
|
||||
#define SYS_ioprio_set 30
|
||||
#define SYS_ioprio_get 31
|
||||
#define SYS_flock 32
|
||||
#define SYS_mknodat 33
|
||||
#define SYS_mkdirat 34
|
||||
#define SYS_unlinkat 35
|
||||
#define SYS_symlinkat 36
|
||||
#define SYS_linkat 37
|
||||
#define SYS_renameat 38
|
||||
#define SYS_umount2 39
|
||||
#define SYS_mount 40
|
||||
#define SYS_pivot_root 41
|
||||
#define SYS_nfsservctl 42
|
||||
#define SYS_statfs 43
|
||||
#define SYS_fstatfs 44
|
||||
#define SYS_truncate 45
|
||||
#define SYS_ftruncate 46
|
||||
#define SYS_fallocate 47
|
||||
#define SYS_faccessat 48
|
||||
#define SYS_chdir 49
|
||||
#define SYS_fchdir 50
|
||||
#define SYS_chroot 51
|
||||
#define SYS_fchmod 52
|
||||
#define SYS_fchmodat 53
|
||||
#define SYS_fchownat 54
|
||||
#define SYS_fchown 55
|
||||
#define SYS_openat 56
|
||||
#define SYS_close 57
|
||||
#define SYS_vhangup 58
|
||||
#define SYS_pipe2 59
|
||||
#define SYS_quotactl 60
|
||||
#define SYS_getdents64 61
|
||||
#define SYS_lseek 62
|
||||
#define SYS_read 63
|
||||
#define SYS_write 64
|
||||
#define SYS_readv 65
|
||||
#define SYS_writev 66
|
||||
#define SYS_pread64 67
|
||||
#define SYS_pwrite64 68
|
||||
#define SYS_preadv 69
|
||||
#define SYS_pwritev 70
|
||||
#define SYS_sendfile 71
|
||||
#define SYS_pselect6 72
|
||||
#define SYS_ppoll 73
|
||||
#define SYS_signalfd4 74
|
||||
#define SYS_vmsplice 75
|
||||
#define SYS_splice 76
|
||||
#define SYS_tee 77
|
||||
#define SYS_readlinkat 78
|
||||
#define SYS_newfstatat 79
|
||||
#define SYS_fstat 80
|
||||
#define SYS_sync 81
|
||||
#define SYS_fsync 82
|
||||
#define SYS_fdatasync 83
|
||||
#define SYS_sync_file_range 84
|
||||
#define SYS_timerfd_create 85
|
||||
#define SYS_timerfd_settime 86
|
||||
#define SYS_timerfd_gettime 87
|
||||
#define SYS_utimensat 88
|
||||
#define SYS_acct 89
|
||||
#define SYS_capget 90
|
||||
#define SYS_capset 91
|
||||
#define SYS_personality 92
|
||||
#define SYS_exit 93
|
||||
#define SYS_exit_group 94
|
||||
#define SYS_waitid 95
|
||||
#define SYS_set_tid_address 96
|
||||
#define SYS_unshare 97
|
||||
#define SYS_futex 98
|
||||
#define SYS_set_robust_list 99
|
||||
#define SYS_get_robust_list 100
|
||||
#define SYS_nanosleep 101
|
||||
#define SYS_getitimer 102
|
||||
#define SYS_setitimer 103
|
||||
#define SYS_kexec_load 104
|
||||
#define SYS_init_module 105
|
||||
#define SYS_delete_module 106
|
||||
#define SYS_timer_create 107
|
||||
#define SYS_timer_gettime 108
|
||||
#define SYS_timer_getoverrun 109
|
||||
#define SYS_timer_settime 110
|
||||
#define SYS_timer_delete 111
|
||||
#define SYS_clock_settime 112
|
||||
#define SYS_clock_gettime 113
|
||||
#define SYS_clock_getres 114
|
||||
#define SYS_clock_nanosleep 115
|
||||
#define SYS_syslog 116
|
||||
#define SYS_ptrace 117
|
||||
#define SYS_sched_setparam 118
|
||||
#define SYS_sched_setscheduler 119
|
||||
#define SYS_sched_getscheduler 120
|
||||
#define SYS_sched_getparam 121
|
||||
#define SYS_sched_setaffinity 122
|
||||
#define SYS_sched_getaffinity 123
|
||||
#define SYS_sched_yield 124
|
||||
#define SYS_sched_get_priority_max 125
|
||||
#define SYS_sched_get_priority_min 126
|
||||
#define SYS_sched_rr_get_interval 127
|
||||
#define SYS_restart_syscall 128
|
||||
#define SYS_kill 129
|
||||
#define SYS_tkill 130
|
||||
#define SYS_tgkill 131
|
||||
#define SYS_sigaltstack 132
|
||||
#define SYS_rt_sigsuspend 133
|
||||
#define SYS_rt_sigaction 134
|
||||
#define SYS_rt_sigprocmask 135
|
||||
#define SYS_rt_sigpending 136
|
||||
#define SYS_rt_sigtimedwait 137
|
||||
#define SYS_rt_sigqueueinfo 138
|
||||
#define SYS_rt_sigreturn 139
|
||||
#define SYS_setpriority 140
|
||||
#define SYS_getpriority 141
|
||||
#define SYS_reboot 142
|
||||
#define SYS_setregid 143
|
||||
#define SYS_setgid 144
|
||||
#define SYS_setreuid 145
|
||||
#define SYS_setuid 146
|
||||
#define SYS_setresuid 147
|
||||
#define SYS_getresuid 148
|
||||
#define SYS_setresgid 149
|
||||
#define SYS_getresgid 150
|
||||
#define SYS_setfsuid 151
|
||||
#define SYS_setfsgid 152
|
||||
#define SYS_times 153
|
||||
#define SYS_setpgid 154
|
||||
#define SYS_getpgid 155
|
||||
#define SYS_getsid 156
|
||||
#define SYS_setsid 157
|
||||
#define SYS_getgroups 158
|
||||
#define SYS_setgroups 159
|
||||
#define SYS_uname 160
|
||||
#define SYS_sethostname 161
|
||||
#define SYS_setdomainname 162
|
||||
#define SYS_getrlimit 163
|
||||
#define SYS_setrlimit 164
|
||||
#define SYS_getrusage 165
|
||||
#define SYS_umask 166
|
||||
#define SYS_prctl 167
|
||||
#define SYS_getcpu 168
|
||||
#define SYS_gettimeofday 169
|
||||
#define SYS_settimeofday 170
|
||||
#define SYS_adjtimex 171
|
||||
#define SYS_getpid 172
|
||||
#define SYS_getppid 173
|
||||
#define SYS_getuid 174
|
||||
#define SYS_geteuid 175
|
||||
#define SYS_getgid 176
|
||||
#define SYS_getegid 177
|
||||
#define SYS_gettid 178
|
||||
#define SYS_sysinfo 179
|
||||
#define SYS_mq_open 180
|
||||
#define SYS_mq_unlink 181
|
||||
#define SYS_mq_timedsend 182
|
||||
#define SYS_mq_timedreceive 183
|
||||
#define SYS_mq_notify 184
|
||||
#define SYS_mq_getsetattr 185
|
||||
#define SYS_msgget 186
|
||||
#define SYS_msgctl 187
|
||||
#define SYS_msgrcv 188
|
||||
#define SYS_msgsnd 189
|
||||
#define SYS_semget 190
|
||||
#define SYS_semctl 191
|
||||
#define SYS_semtimedop 192
|
||||
#define SYS_semop 193
|
||||
#define SYS_shmget 194
|
||||
#define SYS_shmctl 195
|
||||
#define SYS_shmat 196
|
||||
#define SYS_shmdt 197
|
||||
#define SYS_socket 198
|
||||
#define SYS_socketpair 199
|
||||
#define SYS_bind 200
|
||||
#define SYS_listen 201
|
||||
#define SYS_accept 202
|
||||
#define SYS_connect 203
|
||||
#define SYS_getsockname 204
|
||||
#define SYS_getpeername 205
|
||||
#define SYS_sendto 206
|
||||
#define SYS_recvfrom 207
|
||||
#define SYS_setsockopt 208
|
||||
#define SYS_getsockopt 209
|
||||
#define SYS_shutdown 210
|
||||
#define SYS_sendmsg 211
|
||||
#define SYS_recvmsg 212
|
||||
#define SYS_readahead 213
|
||||
#define SYS_brk 214
|
||||
#define SYS_munmap 215
|
||||
#define SYS_mremap 216
|
||||
#define SYS_add_key 217
|
||||
#define SYS_request_key 218
|
||||
#define SYS_keyctl 219
|
||||
#define SYS_clone 220
|
||||
#define SYS_execve 221
|
||||
#define SYS_mmap 222
|
||||
#define SYS_fadvise64 223
|
||||
#define SYS_swapon 224
|
||||
#define SYS_swapoff 225
|
||||
#define SYS_mprotect 226
|
||||
#define SYS_msync 227
|
||||
#define SYS_mlock 228
|
||||
#define SYS_munlock 229
|
||||
#define SYS_mlockall 230
|
||||
#define SYS_munlockall 231
|
||||
#define SYS_mincore 232
|
||||
#define SYS_madvise 233
|
||||
#define SYS_remap_file_pages 234
|
||||
#define SYS_mbind 235
|
||||
#define SYS_get_mempolicy 236
|
||||
#define SYS_set_mempolicy 237
|
||||
#define SYS_migrate_pages 238
|
||||
#define SYS_move_pages 239
|
||||
#define SYS_rt_tgsigqueueinfo 240
|
||||
#define SYS_perf_event_open 241
|
||||
#define SYS_accept4 242
|
||||
#define SYS_recvmmsg 243
|
||||
#define SYS_wait4 260
|
||||
#define SYS_prlimit64 261
|
||||
#define SYS_fanotify_init 262
|
||||
#define SYS_fanotify_mark 263
|
||||
#define SYS_name_to_handle_at 264
|
||||
#define SYS_open_by_handle_at 265
|
||||
#define SYS_clock_adjtime 266
|
||||
#define SYS_syncfs 267
|
||||
#define SYS_setns 268
|
||||
#define SYS_sendmmsg 269
|
||||
#define SYS_process_vm_readv 270
|
||||
#define SYS_process_vm_writev 271
|
||||
#define SYS_kcmp 272
|
||||
#define SYS_finit_module 273
|
||||
#define SYS_sched_setattr 274
|
||||
#define SYS_sched_getattr 275
|
||||
#define SYS_renameat2 276
|
||||
#define SYS_seccomp 277
|
||||
#define SYS_getrandom 278
|
||||
#define SYS_memfd_create 279
|
||||
#define SYS_bpf 280
|
||||
#define SYS_execveat 281
|
||||
#define SYS_userfaultfd 282
|
||||
#define SYS_membarrier 283
|
||||
#define SYS_mlock2 284
|
||||
#define SYS_copy_file_range 285
|
||||
#define SYS_preadv2 286
|
||||
#define SYS_pwritev2 287
|
||||
#define SYS_pkey_mprotect 288
|
||||
#define SYS_pkey_alloc 289
|
||||
#define SYS_pkey_free 290
|
||||
#define SYS_statx 291
|
||||
#define SYS_io_pgetevents 292
|
||||
@ -1,16 +0,0 @@
|
||||
struct user_regs_struct {
|
||||
unsigned long long regs[31];
|
||||
unsigned long long sp;
|
||||
unsigned long long pc;
|
||||
unsigned long long pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_struct {
|
||||
long double vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
};
|
||||
|
||||
#define ELF_NREG 34
|
||||
typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
|
||||
typedef struct user_fpsimd_struct elf_fpregset_t;
|
||||
@ -1,4 +1,4 @@
|
||||
#if __RISCVEB__
|
||||
#if __ARMEB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
/* generated for arm-linux-musleabi-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
/* generated for arm-linux-musleabihf-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
@ -1,40 +0,0 @@
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DSYNC 010000
|
||||
#define O_SYNC 04010000
|
||||
#define O_RSYNC 04010000
|
||||
#define O_DIRECTORY 040000
|
||||
#define O_NOFOLLOW 0100000
|
||||
#define O_CLOEXEC 02000000
|
||||
|
||||
#define O_ASYNC 020000
|
||||
#define O_DIRECT 0200000
|
||||
#define O_LARGEFILE 0400000
|
||||
#define O_NOATIME 01000000
|
||||
#define O_PATH 010000000
|
||||
#define O_TMPFILE 020040000
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
|
||||
#define F_DUPFD 0
|
||||
#define F_GETFD 1
|
||||
#define F_SETFD 2
|
||||
#define F_GETFL 3
|
||||
#define F_SETFL 4
|
||||
|
||||
#define F_SETOWN 8
|
||||
#define F_GETOWN 9
|
||||
#define F_SETSIG 10
|
||||
#define F_GETSIG 11
|
||||
|
||||
#define F_GETLK 12
|
||||
#define F_SETLK 13
|
||||
#define F_SETLKW 14
|
||||
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
||||
@ -1,53 +0,0 @@
|
||||
#define HWCAP_SWP (1 << 0)
|
||||
#define HWCAP_HALF (1 << 1)
|
||||
#define HWCAP_THUMB (1 << 2)
|
||||
#define HWCAP_26BIT (1 << 3)
|
||||
#define HWCAP_FAST_MULT (1 << 4)
|
||||
#define HWCAP_FPA (1 << 5)
|
||||
#define HWCAP_VFP (1 << 6)
|
||||
#define HWCAP_EDSP (1 << 7)
|
||||
#define HWCAP_JAVA (1 << 8)
|
||||
#define HWCAP_IWMMXT (1 << 9)
|
||||
#define HWCAP_CRUNCH (1 << 10)
|
||||
#define HWCAP_THUMBEE (1 << 11)
|
||||
#define HWCAP_NEON (1 << 12)
|
||||
#define HWCAP_VFPv3 (1 << 13)
|
||||
#define HWCAP_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_TLS (1 << 15)
|
||||
#define HWCAP_VFPv4 (1 << 16)
|
||||
#define HWCAP_IDIVA (1 << 17)
|
||||
#define HWCAP_IDIVT (1 << 18)
|
||||
#define HWCAP_VFPD32 (1 << 19)
|
||||
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
|
||||
#define HWCAP_LPAE (1 << 20)
|
||||
#define HWCAP_EVTSTRM (1 << 21)
|
||||
|
||||
#define HWCAP2_AES (1 << 0)
|
||||
#define HWCAP2_PMULL (1 << 1)
|
||||
#define HWCAP2_SHA1 (1 << 2)
|
||||
#define HWCAP2_SHA2 (1 << 3)
|
||||
#define HWCAP2_CRC32 (1 << 4)
|
||||
|
||||
#define HWCAP_ARM_SWP (1 << 0)
|
||||
#define HWCAP_ARM_HALF (1 << 1)
|
||||
#define HWCAP_ARM_THUMB (1 << 2)
|
||||
#define HWCAP_ARM_26BIT (1 << 3)
|
||||
#define HWCAP_ARM_FAST_MULT (1 << 4)
|
||||
#define HWCAP_ARM_FPA (1 << 5)
|
||||
#define HWCAP_ARM_VFP (1 << 6)
|
||||
#define HWCAP_ARM_EDSP (1 << 7)
|
||||
#define HWCAP_ARM_JAVA (1 << 8)
|
||||
#define HWCAP_ARM_IWMMXT (1 << 9)
|
||||
#define HWCAP_ARM_CRUNCH (1 << 10)
|
||||
#define HWCAP_ARM_THUMBEE (1 << 11)
|
||||
#define HWCAP_ARM_NEON (1 << 12)
|
||||
#define HWCAP_ARM_VFPv3 (1 << 13)
|
||||
#define HWCAP_ARM_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_ARM_TLS (1 << 15)
|
||||
#define HWCAP_ARM_VFPv4 (1 << 16)
|
||||
#define HWCAP_ARM_IDIVA (1 << 17)
|
||||
#define HWCAP_ARM_IDIVT (1 << 18)
|
||||
#define HWCAP_ARM_VFPD32 (1 << 19)
|
||||
#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
|
||||
#define HWCAP_ARM_LPAE (1 << 20)
|
||||
#define HWCAP_ARM_EVTSTRM (1 << 21)
|
||||
@ -1,2 +0,0 @@
|
||||
#undef FIOQSIZE
|
||||
#define FIOQSIZE 0x545e
|
||||
@ -1,15 +0,0 @@
|
||||
struct msqid_ds {
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
int __unused1;
|
||||
time_t msg_rtime;
|
||||
int __unused2;
|
||||
time_t msg_ctime;
|
||||
int __unused3;
|
||||
unsigned long msg_cbytes;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msg_lrpid;
|
||||
unsigned long __unused[2];
|
||||
};
|
||||
@ -1,25 +0,0 @@
|
||||
#define PTRACE_GETWMMXREGS 18
|
||||
#define PTRACE_SETWMMXREGS 19
|
||||
#define PTRACE_GET_THREAD_AREA 22
|
||||
#define PTRACE_SET_SYSCALL 23
|
||||
#define PTRACE_GETCRUNCHREGS 25
|
||||
#define PTRACE_SETCRUNCHREGS 26
|
||||
#define PTRACE_GETVFPREGS 27
|
||||
#define PTRACE_SETVFPREGS 28
|
||||
#define PTRACE_GETHBPREGS 29
|
||||
#define PTRACE_SETHBPREGS 30
|
||||
#define PTRACE_GETFDPIC 31
|
||||
#define PTRACE_GETFDPIC_EXEC 0
|
||||
#define PTRACE_GETFDPIC_INTERP 1
|
||||
|
||||
#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
|
||||
#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
|
||||
#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
|
||||
#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
|
||||
#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
|
||||
#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
|
||||
#define PT_GETVFPREGS PTRACE_GETVFPREGS
|
||||
#define PT_SETVFPREGS PTRACE_SETVFPREGS
|
||||
#define PT_GETHBPREGS PTRACE_GETHBPREGS
|
||||
#define PT_SETHBPREGS PTRACE_SETHBPREGS
|
||||
#define PT_GETFDPIC PTRACE_GETFDPIC
|
||||
@ -1,27 +0,0 @@
|
||||
#define SHMLBA 4096
|
||||
|
||||
struct shmid_ds {
|
||||
struct ipc_perm shm_perm;
|
||||
size_t shm_segsz;
|
||||
time_t shm_atime;
|
||||
int __unused1;
|
||||
time_t shm_dtime;
|
||||
int __unused2;
|
||||
time_t shm_ctime;
|
||||
int __unused3;
|
||||
pid_t shm_cpid;
|
||||
pid_t shm_lpid;
|
||||
unsigned long shm_nattch;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
struct shminfo {
|
||||
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
|
||||
};
|
||||
|
||||
struct shm_info {
|
||||
int __used_ids;
|
||||
unsigned long shm_tot, shm_rss, shm_swp;
|
||||
unsigned long __swap_attempts, __swap_successes;
|
||||
};
|
||||
@ -1,20 +0,0 @@
|
||||
typedef int32_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef uint32_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
#define INT_FAST16_MIN INT32_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
|
||||
#define INT_FAST16_MAX INT32_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
|
||||
#define UINT_FAST16_MAX UINT32_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
/* generated for armeb-linux-musleabi-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
@ -1,40 +0,0 @@
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DSYNC 010000
|
||||
#define O_SYNC 04010000
|
||||
#define O_RSYNC 04010000
|
||||
#define O_DIRECTORY 040000
|
||||
#define O_NOFOLLOW 0100000
|
||||
#define O_CLOEXEC 02000000
|
||||
|
||||
#define O_ASYNC 020000
|
||||
#define O_DIRECT 0200000
|
||||
#define O_LARGEFILE 0400000
|
||||
#define O_NOATIME 01000000
|
||||
#define O_PATH 010000000
|
||||
#define O_TMPFILE 020040000
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
|
||||
#define F_DUPFD 0
|
||||
#define F_GETFD 1
|
||||
#define F_SETFD 2
|
||||
#define F_GETFL 3
|
||||
#define F_SETFL 4
|
||||
|
||||
#define F_SETOWN 8
|
||||
#define F_GETOWN 9
|
||||
#define F_SETSIG 10
|
||||
#define F_GETSIG 11
|
||||
|
||||
#define F_GETLK 12
|
||||
#define F_SETLK 13
|
||||
#define F_SETLKW 14
|
||||
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
||||
@ -1,53 +0,0 @@
|
||||
#define HWCAP_SWP (1 << 0)
|
||||
#define HWCAP_HALF (1 << 1)
|
||||
#define HWCAP_THUMB (1 << 2)
|
||||
#define HWCAP_26BIT (1 << 3)
|
||||
#define HWCAP_FAST_MULT (1 << 4)
|
||||
#define HWCAP_FPA (1 << 5)
|
||||
#define HWCAP_VFP (1 << 6)
|
||||
#define HWCAP_EDSP (1 << 7)
|
||||
#define HWCAP_JAVA (1 << 8)
|
||||
#define HWCAP_IWMMXT (1 << 9)
|
||||
#define HWCAP_CRUNCH (1 << 10)
|
||||
#define HWCAP_THUMBEE (1 << 11)
|
||||
#define HWCAP_NEON (1 << 12)
|
||||
#define HWCAP_VFPv3 (1 << 13)
|
||||
#define HWCAP_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_TLS (1 << 15)
|
||||
#define HWCAP_VFPv4 (1 << 16)
|
||||
#define HWCAP_IDIVA (1 << 17)
|
||||
#define HWCAP_IDIVT (1 << 18)
|
||||
#define HWCAP_VFPD32 (1 << 19)
|
||||
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
|
||||
#define HWCAP_LPAE (1 << 20)
|
||||
#define HWCAP_EVTSTRM (1 << 21)
|
||||
|
||||
#define HWCAP2_AES (1 << 0)
|
||||
#define HWCAP2_PMULL (1 << 1)
|
||||
#define HWCAP2_SHA1 (1 << 2)
|
||||
#define HWCAP2_SHA2 (1 << 3)
|
||||
#define HWCAP2_CRC32 (1 << 4)
|
||||
|
||||
#define HWCAP_ARM_SWP (1 << 0)
|
||||
#define HWCAP_ARM_HALF (1 << 1)
|
||||
#define HWCAP_ARM_THUMB (1 << 2)
|
||||
#define HWCAP_ARM_26BIT (1 << 3)
|
||||
#define HWCAP_ARM_FAST_MULT (1 << 4)
|
||||
#define HWCAP_ARM_FPA (1 << 5)
|
||||
#define HWCAP_ARM_VFP (1 << 6)
|
||||
#define HWCAP_ARM_EDSP (1 << 7)
|
||||
#define HWCAP_ARM_JAVA (1 << 8)
|
||||
#define HWCAP_ARM_IWMMXT (1 << 9)
|
||||
#define HWCAP_ARM_CRUNCH (1 << 10)
|
||||
#define HWCAP_ARM_THUMBEE (1 << 11)
|
||||
#define HWCAP_ARM_NEON (1 << 12)
|
||||
#define HWCAP_ARM_VFPv3 (1 << 13)
|
||||
#define HWCAP_ARM_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_ARM_TLS (1 << 15)
|
||||
#define HWCAP_ARM_VFPv4 (1 << 16)
|
||||
#define HWCAP_ARM_IDIVA (1 << 17)
|
||||
#define HWCAP_ARM_IDIVT (1 << 18)
|
||||
#define HWCAP_ARM_VFPD32 (1 << 19)
|
||||
#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
|
||||
#define HWCAP_ARM_LPAE (1 << 20)
|
||||
#define HWCAP_ARM_EVTSTRM (1 << 21)
|
||||
@ -1,2 +0,0 @@
|
||||
#undef FIOQSIZE
|
||||
#define FIOQSIZE 0x545e
|
||||
@ -1,15 +0,0 @@
|
||||
struct msqid_ds {
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
int __unused1;
|
||||
time_t msg_rtime;
|
||||
int __unused2;
|
||||
time_t msg_ctime;
|
||||
int __unused3;
|
||||
unsigned long msg_cbytes;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msg_lrpid;
|
||||
unsigned long __unused[2];
|
||||
};
|
||||
@ -1,25 +0,0 @@
|
||||
#define PTRACE_GETWMMXREGS 18
|
||||
#define PTRACE_SETWMMXREGS 19
|
||||
#define PTRACE_GET_THREAD_AREA 22
|
||||
#define PTRACE_SET_SYSCALL 23
|
||||
#define PTRACE_GETCRUNCHREGS 25
|
||||
#define PTRACE_SETCRUNCHREGS 26
|
||||
#define PTRACE_GETVFPREGS 27
|
||||
#define PTRACE_SETVFPREGS 28
|
||||
#define PTRACE_GETHBPREGS 29
|
||||
#define PTRACE_SETHBPREGS 30
|
||||
#define PTRACE_GETFDPIC 31
|
||||
#define PTRACE_GETFDPIC_EXEC 0
|
||||
#define PTRACE_GETFDPIC_INTERP 1
|
||||
|
||||
#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
|
||||
#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
|
||||
#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
|
||||
#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
|
||||
#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
|
||||
#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
|
||||
#define PT_GETVFPREGS PTRACE_GETVFPREGS
|
||||
#define PT_SETVFPREGS PTRACE_SETVFPREGS
|
||||
#define PT_GETHBPREGS PTRACE_GETHBPREGS
|
||||
#define PT_SETHBPREGS PTRACE_SETHBPREGS
|
||||
#define PT_GETFDPIC PTRACE_GETFDPIC
|
||||
@ -1,27 +0,0 @@
|
||||
#define SHMLBA 4096
|
||||
|
||||
struct shmid_ds {
|
||||
struct ipc_perm shm_perm;
|
||||
size_t shm_segsz;
|
||||
time_t shm_atime;
|
||||
int __unused1;
|
||||
time_t shm_dtime;
|
||||
int __unused2;
|
||||
time_t shm_ctime;
|
||||
int __unused3;
|
||||
pid_t shm_cpid;
|
||||
pid_t shm_lpid;
|
||||
unsigned long shm_nattch;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
struct shminfo {
|
||||
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
|
||||
};
|
||||
|
||||
struct shm_info {
|
||||
int __used_ids;
|
||||
unsigned long shm_tot, shm_rss, shm_swp;
|
||||
unsigned long __swap_attempts, __swap_successes;
|
||||
};
|
||||
@ -1,20 +0,0 @@
|
||||
typedef int32_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef uint32_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
#define INT_FAST16_MIN INT32_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
|
||||
#define INT_FAST16_MAX INT32_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
|
||||
#define UINT_FAST16_MAX UINT32_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
/* generated for armeb-linux-musleabihf-gcc (GCC) 8.3.0 */
|
||||
|
||||
#ifndef GCC_GENERATED_STDINT_H
|
||||
#define GCC_GENERATED_STDINT_H 1
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
/* glibc uses these symbols as guards to prevent redefinitions. */
|
||||
#ifdef __int8_t_defined
|
||||
#define _INT8_T
|
||||
#define _INT16_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifdef __uint32_t_defined
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems have guard macros to prevent redefinitions, define them. */
|
||||
#ifndef _INT8_T
|
||||
#define _INT8_T
|
||||
#endif
|
||||
#ifndef _INT16_T
|
||||
#define _INT16_T
|
||||
#endif
|
||||
#ifndef _INT32_T
|
||||
#define _INT32_T
|
||||
#endif
|
||||
#ifndef _UINT8_T
|
||||
#define _UINT8_T
|
||||
#endif
|
||||
#ifndef _UINT16_T
|
||||
#define _UINT16_T
|
||||
#endif
|
||||
#ifndef _UINT32_T
|
||||
#define _UINT32_T
|
||||
#endif
|
||||
|
||||
/* system headers have good uint64_t and int64_t */
|
||||
#ifndef _INT64_T
|
||||
#define _INT64_T
|
||||
#endif
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
#endif
|
||||
|
||||
#endif /* GCC_GENERATED_STDINT_H */
|
||||
@ -1,40 +0,0 @@
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DSYNC 010000
|
||||
#define O_SYNC 04010000
|
||||
#define O_RSYNC 04010000
|
||||
#define O_DIRECTORY 040000
|
||||
#define O_NOFOLLOW 0100000
|
||||
#define O_CLOEXEC 02000000
|
||||
|
||||
#define O_ASYNC 020000
|
||||
#define O_DIRECT 0200000
|
||||
#define O_LARGEFILE 0400000
|
||||
#define O_NOATIME 01000000
|
||||
#define O_PATH 010000000
|
||||
#define O_TMPFILE 020040000
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
|
||||
#define F_DUPFD 0
|
||||
#define F_GETFD 1
|
||||
#define F_SETFD 2
|
||||
#define F_GETFL 3
|
||||
#define F_SETFL 4
|
||||
|
||||
#define F_SETOWN 8
|
||||
#define F_GETOWN 9
|
||||
#define F_SETSIG 10
|
||||
#define F_GETSIG 11
|
||||
|
||||
#define F_GETLK 12
|
||||
#define F_SETLK 13
|
||||
#define F_SETLKW 14
|
||||
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
||||
@ -1,53 +0,0 @@
|
||||
#define HWCAP_SWP (1 << 0)
|
||||
#define HWCAP_HALF (1 << 1)
|
||||
#define HWCAP_THUMB (1 << 2)
|
||||
#define HWCAP_26BIT (1 << 3)
|
||||
#define HWCAP_FAST_MULT (1 << 4)
|
||||
#define HWCAP_FPA (1 << 5)
|
||||
#define HWCAP_VFP (1 << 6)
|
||||
#define HWCAP_EDSP (1 << 7)
|
||||
#define HWCAP_JAVA (1 << 8)
|
||||
#define HWCAP_IWMMXT (1 << 9)
|
||||
#define HWCAP_CRUNCH (1 << 10)
|
||||
#define HWCAP_THUMBEE (1 << 11)
|
||||
#define HWCAP_NEON (1 << 12)
|
||||
#define HWCAP_VFPv3 (1 << 13)
|
||||
#define HWCAP_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_TLS (1 << 15)
|
||||
#define HWCAP_VFPv4 (1 << 16)
|
||||
#define HWCAP_IDIVA (1 << 17)
|
||||
#define HWCAP_IDIVT (1 << 18)
|
||||
#define HWCAP_VFPD32 (1 << 19)
|
||||
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
|
||||
#define HWCAP_LPAE (1 << 20)
|
||||
#define HWCAP_EVTSTRM (1 << 21)
|
||||
|
||||
#define HWCAP2_AES (1 << 0)
|
||||
#define HWCAP2_PMULL (1 << 1)
|
||||
#define HWCAP2_SHA1 (1 << 2)
|
||||
#define HWCAP2_SHA2 (1 << 3)
|
||||
#define HWCAP2_CRC32 (1 << 4)
|
||||
|
||||
#define HWCAP_ARM_SWP (1 << 0)
|
||||
#define HWCAP_ARM_HALF (1 << 1)
|
||||
#define HWCAP_ARM_THUMB (1 << 2)
|
||||
#define HWCAP_ARM_26BIT (1 << 3)
|
||||
#define HWCAP_ARM_FAST_MULT (1 << 4)
|
||||
#define HWCAP_ARM_FPA (1 << 5)
|
||||
#define HWCAP_ARM_VFP (1 << 6)
|
||||
#define HWCAP_ARM_EDSP (1 << 7)
|
||||
#define HWCAP_ARM_JAVA (1 << 8)
|
||||
#define HWCAP_ARM_IWMMXT (1 << 9)
|
||||
#define HWCAP_ARM_CRUNCH (1 << 10)
|
||||
#define HWCAP_ARM_THUMBEE (1 << 11)
|
||||
#define HWCAP_ARM_NEON (1 << 12)
|
||||
#define HWCAP_ARM_VFPv3 (1 << 13)
|
||||
#define HWCAP_ARM_VFPv3D16 (1 << 14)
|
||||
#define HWCAP_ARM_TLS (1 << 15)
|
||||
#define HWCAP_ARM_VFPv4 (1 << 16)
|
||||
#define HWCAP_ARM_IDIVA (1 << 17)
|
||||
#define HWCAP_ARM_IDIVT (1 << 18)
|
||||
#define HWCAP_ARM_VFPD32 (1 << 19)
|
||||
#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
|
||||
#define HWCAP_ARM_LPAE (1 << 20)
|
||||
#define HWCAP_ARM_EVTSTRM (1 << 21)
|
||||
@ -1,2 +0,0 @@
|
||||
#undef FIOQSIZE
|
||||
#define FIOQSIZE 0x545e
|
||||
@ -1,15 +0,0 @@
|
||||
struct msqid_ds {
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
int __unused1;
|
||||
time_t msg_rtime;
|
||||
int __unused2;
|
||||
time_t msg_ctime;
|
||||
int __unused3;
|
||||
unsigned long msg_cbytes;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msg_lrpid;
|
||||
unsigned long __unused[2];
|
||||
};
|
||||
@ -1,25 +0,0 @@
|
||||
#define PTRACE_GETWMMXREGS 18
|
||||
#define PTRACE_SETWMMXREGS 19
|
||||
#define PTRACE_GET_THREAD_AREA 22
|
||||
#define PTRACE_SET_SYSCALL 23
|
||||
#define PTRACE_GETCRUNCHREGS 25
|
||||
#define PTRACE_SETCRUNCHREGS 26
|
||||
#define PTRACE_GETVFPREGS 27
|
||||
#define PTRACE_SETVFPREGS 28
|
||||
#define PTRACE_GETHBPREGS 29
|
||||
#define PTRACE_SETHBPREGS 30
|
||||
#define PTRACE_GETFDPIC 31
|
||||
#define PTRACE_GETFDPIC_EXEC 0
|
||||
#define PTRACE_GETFDPIC_INTERP 1
|
||||
|
||||
#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
|
||||
#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
|
||||
#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
|
||||
#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
|
||||
#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
|
||||
#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
|
||||
#define PT_GETVFPREGS PTRACE_GETVFPREGS
|
||||
#define PT_SETVFPREGS PTRACE_SETVFPREGS
|
||||
#define PT_GETHBPREGS PTRACE_GETHBPREGS
|
||||
#define PT_SETHBPREGS PTRACE_SETHBPREGS
|
||||
#define PT_GETFDPIC PTRACE_GETFDPIC
|
||||
@ -1,27 +0,0 @@
|
||||
#define SHMLBA 4096
|
||||
|
||||
struct shmid_ds {
|
||||
struct ipc_perm shm_perm;
|
||||
size_t shm_segsz;
|
||||
time_t shm_atime;
|
||||
int __unused1;
|
||||
time_t shm_dtime;
|
||||
int __unused2;
|
||||
time_t shm_ctime;
|
||||
int __unused3;
|
||||
pid_t shm_cpid;
|
||||
pid_t shm_lpid;
|
||||
unsigned long shm_nattch;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
struct shminfo {
|
||||
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
|
||||
};
|
||||
|
||||
struct shm_info {
|
||||
int __used_ids;
|
||||
unsigned long shm_tot, shm_rss, shm_swp;
|
||||
unsigned long __swap_attempts, __swap_successes;
|
||||
};
|
||||
@ -1,20 +0,0 @@
|
||||
typedef int32_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef uint32_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
#define INT_FAST16_MIN INT32_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
|
||||
#define INT_FAST16_MAX INT32_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
|
||||
#define UINT_FAST16_MAX UINT32_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
@ -1,402 +0,0 @@
|
||||
/* ANSI and traditional C compatability macros
|
||||
Copyright (C) 1991-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
PTR `void *' `char *'
|
||||
const not defined `'
|
||||
volatile not defined `'
|
||||
signed not defined `'
|
||||
|
||||
For ease of writing code which uses GCC extensions but needs to be
|
||||
portable to other compilers, we provide the GCC_VERSION macro that
|
||||
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
|
||||
wrappers around __attribute__. Also, __extension__ will be #defined
|
||||
to nothing if it doesn't work. See below. */
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||
older preprocessors. Thus we can't define something like this:
|
||||
|
||||
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||
|
||||
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||
|
||||
So instead we use the macro below and test it against specific values. */
|
||||
|
||||
/* This macro simplifies testing whether we are using gcc, and if it
|
||||
is of a particular minimum version. (Both major & minor numbers are
|
||||
significant.) This macro will evaluate to 0 if we are not using
|
||||
gcc at all. */
|
||||
#ifndef GCC_VERSION
|
||||
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
||||
/* All known AIX compilers implement these things (but don't always
|
||||
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||
in SVR4 mode, but does not define __STDC__. */
|
||||
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
||||
C++ compilers, does not define __STDC__, though it acts as if this
|
||||
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
|
||||
|
||||
#define PTR void *
|
||||
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
|
||||
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
||||
it too, but it's not in C89. */
|
||||
#undef inline
|
||||
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
|
||||
/* it's a keyword */
|
||||
#else
|
||||
# if GCC_VERSION >= 2007
|
||||
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
||||
# else
|
||||
# define inline /* nothing */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#define PTR char *
|
||||
|
||||
/* some systems define these in header files for non-ansi mode */
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
#undef inline
|
||||
#define const
|
||||
#define volatile
|
||||
#define signed
|
||||
#define inline
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
/* Define macros for some gcc attributes. This permits us to use the
|
||||
macros freely, and know that they will come into play for the
|
||||
version of gcc in which they are supported. */
|
||||
|
||||
#if (GCC_VERSION < 2007)
|
||||
# define __attribute__(x)
|
||||
#endif
|
||||
|
||||
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# if (GCC_VERSION >= 2096)
|
||||
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC
|
||||
# endif /* GNUC >= 2.96 */
|
||||
#endif /* ATTRIBUTE_MALLOC */
|
||||
|
||||
/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For
|
||||
g++ an attribute on a label must be followed by a semicolon. */
|
||||
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||
# ifndef __cplusplus
|
||||
# if GCC_VERSION >= 2093
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif
|
||||
# else
|
||||
# if GCC_VERSION >= 4005
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Similarly to ARG_UNUSED below. Prior to GCC 3.4, the C++ frontend
|
||||
couldn't parse attributes placed after the identifier name, and now
|
||||
the entire compiler is built with C++. */
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#if GCC_VERSION >= 3004
|
||||
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
|
||||
/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
|
||||
identifier name. */
|
||||
#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
|
||||
# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
|
||||
#else /* !__cplusplus || GNUC >= 3.4 */
|
||||
# define ARG_UNUSED(NAME) NAME
|
||||
#endif /* !__cplusplus || GNUC >= 3.4 */
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif /* ATTRIBUTE_NORETURN */
|
||||
|
||||
/* Attribute `nonnull' was valid as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NONNULL
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
|
||||
# else
|
||||
# define ATTRIBUTE_NONNULL(m)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
#endif /* ATTRIBUTE_NONNULL */
|
||||
|
||||
/* Attribute `returns_nonnull' was valid as of gcc 4.9. */
|
||||
#ifndef ATTRIBUTE_RETURNS_NONNULL
|
||||
# if (GCC_VERSION >= 4009)
|
||||
# define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
|
||||
# else
|
||||
# define ATTRIBUTE_RETURNS_NONNULL
|
||||
# endif /* GNUC >= 4.9 */
|
||||
#endif /* ATTRIBUTE_RETURNS_NONNULL */
|
||||
|
||||
/* Attribute `pure' was valid as of gcc 3.0. */
|
||||
#ifndef ATTRIBUTE_PURE
|
||||
# if (GCC_VERSION >= 3000)
|
||||
# define ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
# else
|
||||
# define ATTRIBUTE_PURE
|
||||
# endif /* GNUC >= 3.0 */
|
||||
#endif /* ATTRIBUTE_PURE */
|
||||
|
||||
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
|
||||
This was the case for the `printf' format attribute by itself
|
||||
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
||||
attribute to retain this behavior. */
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
||||
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_PRINTF */
|
||||
|
||||
/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
|
||||
a function pointer. Format attributes were allowed on function
|
||||
pointers as of gcc 3.1. */
|
||||
#ifndef ATTRIBUTE_FPTR_PRINTF
|
||||
# if (GCC_VERSION >= 3001)
|
||||
# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
|
||||
# else
|
||||
# define ATTRIBUTE_FPTR_PRINTF(m, n)
|
||||
# endif /* GNUC >= 3.1 */
|
||||
# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_FPTR_PRINTF */
|
||||
|
||||
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
|
||||
NULL format specifier was allowed as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NULL_PRINTF
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||
# else
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_NULL_PRINTF */
|
||||
|
||||
/* Attribute `sentinel' was valid as of gcc 3.5. */
|
||||
#ifndef ATTRIBUTE_SENTINEL
|
||||
# if (GCC_VERSION >= 3005)
|
||||
# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
|
||||
# else
|
||||
# define ATTRIBUTE_SENTINEL
|
||||
# endif /* GNUC >= 3.5 */
|
||||
#endif /* ATTRIBUTE_SENTINEL */
|
||||
|
||||
|
||||
#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
|
||||
# if (GCC_VERSION >= 3000)
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
|
||||
# else
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
|
||||
# endif /* GNUC >= 3.0 */
|
||||
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
|
||||
|
||||
/* Useful for structures whose layout must match some binary specification
|
||||
regardless of the alignment and padding qualities of the compiler. */
|
||||
#ifndef ATTRIBUTE_PACKED
|
||||
# define ATTRIBUTE_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
/* Attribute `hot' and `cold' was valid as of gcc 4.3. */
|
||||
#ifndef ATTRIBUTE_COLD
|
||||
# if (GCC_VERSION >= 4003)
|
||||
# define ATTRIBUTE_COLD __attribute__ ((__cold__))
|
||||
# else
|
||||
# define ATTRIBUTE_COLD
|
||||
# endif /* GNUC >= 4.3 */
|
||||
#endif /* ATTRIBUTE_COLD */
|
||||
#ifndef ATTRIBUTE_HOT
|
||||
# if (GCC_VERSION >= 4003)
|
||||
# define ATTRIBUTE_HOT __attribute__ ((__hot__))
|
||||
# else
|
||||
# define ATTRIBUTE_HOT
|
||||
# endif /* GNUC >= 4.3 */
|
||||
#endif /* ATTRIBUTE_HOT */
|
||||
|
||||
/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9. */
|
||||
#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
|
||||
# if (GCC_VERSION >= 4009)
|
||||
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
|
||||
# else
|
||||
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED
|
||||
# endif /* GNUC >= 4.9 */
|
||||
#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
|
||||
|
||||
/* Attribute 'nonstring' was valid as of gcc 8. */
|
||||
#ifndef ATTRIBUTE_NONSTRING
|
||||
# if GCC_VERSION >= 8000
|
||||
# define ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
|
||||
# else
|
||||
# define ATTRIBUTE_NONSTRING
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||
about GCC extensions. This feature didn't work properly before
|
||||
gcc 2.8. */
|
||||
#if GCC_VERSION < 2008
|
||||
#define __extension__
|
||||
#endif
|
||||
|
||||
/* This is used to declare a const variable which should be visible
|
||||
outside of the current compilation unit. Use it as
|
||||
EXPORTED_CONST int i = 1;
|
||||
This is because the semantics of const are different in C and C++.
|
||||
"extern const" is permitted in C but it looks strange, and gcc
|
||||
warns about it when -Wc++-compat is not used. */
|
||||
#ifdef __cplusplus
|
||||
#define EXPORTED_CONST extern const
|
||||
#else
|
||||
#define EXPORTED_CONST const
|
||||
#endif
|
||||
|
||||
/* Be conservative and only use enum bitfields with C++ or GCC.
|
||||
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define ENUM_BITFIELD(TYPE) enum TYPE
|
||||
#elif (GCC_VERSION > 2000)
|
||||
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
|
||||
#else
|
||||
#define ENUM_BITFIELD(TYPE) unsigned int
|
||||
#endif
|
||||
|
||||
#if __cpp_constexpr >= 200704
|
||||
#define CONSTEXPR constexpr
|
||||
#else
|
||||
#define CONSTEXPR
|
||||
#endif
|
||||
|
||||
/* C++11 adds the ability to add "override" after an implementation of a
|
||||
virtual function in a subclass, to:
|
||||
(A) document that this is an override of a virtual function
|
||||
(B) allow the compiler to issue a warning if it isn't (e.g. a mismatch
|
||||
of the type signature).
|
||||
|
||||
Similarly, it allows us to add a "final" to indicate that no subclass
|
||||
may subsequently override the vfunc.
|
||||
|
||||
Provide OVERRIDE and FINAL as macros, allowing us to get these benefits
|
||||
when compiling with C++11 support, but without requiring C++11.
|
||||
|
||||
For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
|
||||
this by default (actually GNU++14). */
|
||||
|
||||
#if defined __cplusplus
|
||||
# if __cplusplus >= 201103
|
||||
/* C++11 claims to be available: use it. Final/override were only
|
||||
implemented in 4.7, though. */
|
||||
# if GCC_VERSION < 4007
|
||||
# define OVERRIDE
|
||||
# define FINAL
|
||||
# else
|
||||
# define OVERRIDE override
|
||||
# define FINAL final
|
||||
# endif
|
||||
# elif GCC_VERSION >= 4007
|
||||
/* G++ 4.7 supports __final in C++98. */
|
||||
# define OVERRIDE
|
||||
# define FINAL __final
|
||||
# else
|
||||
/* No C++11 support; leave the macros empty. */
|
||||
# define OVERRIDE
|
||||
# define FINAL
|
||||
# endif
|
||||
#else
|
||||
/* No C++11 support; leave the macros empty. */
|
||||
# define OVERRIDE
|
||||
# define FINAL
|
||||
#endif
|
||||
|
||||
/* A macro to disable the copy constructor and assignment operator.
|
||||
When building with C++11 and above, the methods are explicitly
|
||||
deleted, causing a compile-time error if something tries to copy.
|
||||
For C++03, this just declares the methods, causing a link-time
|
||||
error if the methods end up called (assuming you don't
|
||||
define them). For C++03, for best results, place the macro
|
||||
under the private: access specifier, like this,
|
||||
|
||||
class name_lookup
|
||||
{
|
||||
private:
|
||||
DISABLE_COPY_AND_ASSIGN (name_lookup);
|
||||
};
|
||||
|
||||
so that most attempts at copy are caught at compile-time. */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#define DISABLE_COPY_AND_ASSIGN(TYPE) \
|
||||
TYPE (const TYPE&) = delete; \
|
||||
void operator= (const TYPE &) = delete
|
||||
#else
|
||||
#define DISABLE_COPY_AND_ASSIGN(TYPE) \
|
||||
TYPE (const TYPE&); \
|
||||
void operator= (const TYPE &)
|
||||
#endif /* __cplusplus >= 201103 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ansidecl.h */
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,958 +0,0 @@
|
||||
/* bfdlink.h -- header file for BFD link routines
|
||||
Copyright (C) 1993-2019 Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#ifndef BFDLINK_H
|
||||
#define BFDLINK_H
|
||||
|
||||
/* Which symbols to strip during a link. */
|
||||
enum bfd_link_strip
|
||||
{
|
||||
strip_none, /* Don't strip any symbols. */
|
||||
strip_debugger, /* Strip debugging symbols. */
|
||||
strip_some, /* keep_hash is the list of symbols to keep. */
|
||||
strip_all /* Strip all symbols. */
|
||||
};
|
||||
|
||||
/* Which local symbols to discard during a link. This is irrelevant
|
||||
if strip_all is used. */
|
||||
enum bfd_link_discard
|
||||
{
|
||||
discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
|
||||
sections. */
|
||||
discard_none, /* Don't discard any locals. */
|
||||
discard_l, /* Discard local temporary symbols. */
|
||||
discard_all /* Discard all locals. */
|
||||
};
|
||||
|
||||
/* Whether to generate ELF common symbols with the STT_COMMON type
|
||||
during a relocatable link. */
|
||||
enum bfd_link_elf_stt_common
|
||||
{
|
||||
unchanged,
|
||||
elf_stt_common,
|
||||
no_elf_stt_common
|
||||
};
|
||||
|
||||
/* Describes the type of hash table entry structure being used.
|
||||
Different hash table structure have different fields and so
|
||||
support different linking features. */
|
||||
enum bfd_link_hash_table_type
|
||||
{
|
||||
bfd_link_generic_hash_table,
|
||||
bfd_link_elf_hash_table
|
||||
};
|
||||
|
||||
/* These are the possible types of an entry in the BFD link hash
|
||||
table. */
|
||||
|
||||
enum bfd_link_hash_type
|
||||
{
|
||||
bfd_link_hash_new, /* Symbol is new. */
|
||||
bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
|
||||
bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
|
||||
bfd_link_hash_defined, /* Symbol is defined. */
|
||||
bfd_link_hash_defweak, /* Symbol is weak and defined. */
|
||||
bfd_link_hash_common, /* Symbol is common. */
|
||||
bfd_link_hash_indirect, /* Symbol is an indirect link. */
|
||||
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
|
||||
};
|
||||
|
||||
enum bfd_link_common_skip_ar_symbols
|
||||
{
|
||||
bfd_link_common_skip_none,
|
||||
bfd_link_common_skip_text,
|
||||
bfd_link_common_skip_data,
|
||||
bfd_link_common_skip_all
|
||||
};
|
||||
|
||||
struct bfd_link_hash_common_entry
|
||||
{
|
||||
unsigned int alignment_power; /* Alignment. */
|
||||
asection *section; /* Symbol section. */
|
||||
};
|
||||
|
||||
/* The linking routines use a hash table which uses this structure for
|
||||
its elements. */
|
||||
|
||||
struct bfd_link_hash_entry
|
||||
{
|
||||
/* Base hash table entry structure. */
|
||||
struct bfd_hash_entry root;
|
||||
|
||||
/* Type of this entry. */
|
||||
ENUM_BITFIELD (bfd_link_hash_type) type : 8;
|
||||
|
||||
/* Symbol is referenced in a normal regular object file,
|
||||
as distinct from a LTO IR object file. */
|
||||
unsigned int non_ir_ref_regular : 1;
|
||||
|
||||
/* Symbol is referenced in a normal dynamic object file,
|
||||
as distinct from a LTO IR object file. */
|
||||
unsigned int non_ir_ref_dynamic : 1;
|
||||
|
||||
/* Symbol is a built-in define. These will be overridden by PROVIDE
|
||||
in a linker script. */
|
||||
unsigned int linker_def : 1;
|
||||
|
||||
/* Symbol defined in a linker script. */
|
||||
unsigned int ldscript_def : 1;
|
||||
|
||||
/* Symbol will be converted from absolute to section-relative. Set for
|
||||
symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
|
||||
outside of an output section statement. */
|
||||
unsigned int rel_from_abs : 1;
|
||||
|
||||
/* A union of information depending upon the type. */
|
||||
union
|
||||
{
|
||||
/* Nothing is kept for bfd_hash_new. */
|
||||
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
|
||||
struct
|
||||
{
|
||||
/* Undefined and common symbols are kept in a linked list through
|
||||
this field. This field is present in all of the union element
|
||||
so that we don't need to remove entries from the list when we
|
||||
change their type. Removing entries would either require the
|
||||
list to be doubly linked, which would waste more memory, or
|
||||
require a traversal. When an undefined or common symbol is
|
||||
created, it should be added to this list, the head of which is in
|
||||
the link hash table itself. As symbols are defined, they need
|
||||
not be removed from the list; anything which reads the list must
|
||||
doublecheck the symbol type.
|
||||
|
||||
Weak symbols are not kept on this list.
|
||||
|
||||
Defined and defweak symbols use this field as a reference marker.
|
||||
If the field is not NULL, or this structure is the tail of the
|
||||
undefined symbol list, the symbol has been referenced. If the
|
||||
symbol is undefined and becomes defined, this field will
|
||||
automatically be non-NULL since the symbol will have been on the
|
||||
undefined symbol list. */
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* BFD symbol was found in. */
|
||||
bfd *abfd;
|
||||
} undef;
|
||||
/* bfd_link_hash_defined, bfd_link_hash_defweak. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* Symbol section. */
|
||||
asection *section;
|
||||
/* Symbol value. */
|
||||
bfd_vma value;
|
||||
} def;
|
||||
/* bfd_link_hash_indirect, bfd_link_hash_warning. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* Real symbol. */
|
||||
struct bfd_link_hash_entry *link;
|
||||
/* Warning message (bfd_link_hash_warning only). */
|
||||
const char *warning;
|
||||
} i;
|
||||
/* bfd_link_hash_common. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* The linker needs to know three things about common
|
||||
symbols: the size, the alignment, and the section in
|
||||
which the symbol should be placed. We store the size
|
||||
here, and we allocate a small structure to hold the
|
||||
section and the alignment. The alignment is stored as a
|
||||
power of two. We don't store all the information
|
||||
directly because we don't want to increase the size of
|
||||
the union; this structure is a major space user in the
|
||||
linker. */
|
||||
struct bfd_link_hash_common_entry *p;
|
||||
/* Common symbol size. */
|
||||
bfd_size_type size;
|
||||
} c;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* This is the link hash table. It is a derived class of
|
||||
bfd_hash_table. */
|
||||
|
||||
struct bfd_link_hash_table
|
||||
{
|
||||
/* The hash table itself. */
|
||||
struct bfd_hash_table table;
|
||||
/* A linked list of undefined and common symbols, linked through the
|
||||
next field in the bfd_link_hash_entry structure. */
|
||||
struct bfd_link_hash_entry *undefs;
|
||||
/* Entries are added to the tail of the undefs list. */
|
||||
struct bfd_link_hash_entry *undefs_tail;
|
||||
/* Function to free the hash table on closing BFD. */
|
||||
void (*hash_table_free) (bfd *);
|
||||
/* The type of the link hash table. */
|
||||
enum bfd_link_hash_table_type type;
|
||||
};
|
||||
|
||||
/* Look up an entry in a link hash table. If FOLLOW is TRUE, this
|
||||
follows bfd_link_hash_indirect and bfd_link_hash_warning links to
|
||||
the real symbol. */
|
||||
extern struct bfd_link_hash_entry *bfd_link_hash_lookup
|
||||
(struct bfd_link_hash_table *, const char *, bfd_boolean create,
|
||||
bfd_boolean copy, bfd_boolean follow);
|
||||
|
||||
/* Look up an entry in the main linker hash table if the symbol might
|
||||
be wrapped. This should only be used for references to an
|
||||
undefined symbol, not for definitions of a symbol. */
|
||||
|
||||
extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
|
||||
(bfd *, struct bfd_link_info *, const char *, bfd_boolean,
|
||||
bfd_boolean, bfd_boolean);
|
||||
|
||||
/* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_"
|
||||
and the remainder is found in wrap_hash, return the real symbol. */
|
||||
|
||||
extern struct bfd_link_hash_entry *unwrap_hash_lookup
|
||||
(struct bfd_link_info *, bfd *, struct bfd_link_hash_entry *);
|
||||
|
||||
/* Traverse a link hash table. */
|
||||
extern void bfd_link_hash_traverse
|
||||
(struct bfd_link_hash_table *,
|
||||
bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
|
||||
void *);
|
||||
|
||||
/* Add an entry to the undefs list. */
|
||||
extern void bfd_link_add_undef
|
||||
(struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
|
||||
|
||||
/* Remove symbols from the undefs list that don't belong there. */
|
||||
extern void bfd_link_repair_undef_list
|
||||
(struct bfd_link_hash_table *table);
|
||||
|
||||
/* Read symbols and cache symbol pointer array in outsymbols. */
|
||||
extern bfd_boolean bfd_generic_link_read_symbols (bfd *);
|
||||
|
||||
/* Check the relocs in the BFD. Called after all the input
|
||||
files have been loaded, and garbage collection has tagged
|
||||
any unneeded sections. */
|
||||
extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *);
|
||||
|
||||
struct bfd_sym_chain
|
||||
{
|
||||
struct bfd_sym_chain *next;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/* How to handle unresolved symbols.
|
||||
There are four possibilities which are enumerated below: */
|
||||
enum report_method
|
||||
{
|
||||
/* This is the initial value when then link_info structure is created.
|
||||
It allows the various stages of the linker to determine whether they
|
||||
allowed to set the value. */
|
||||
RM_NOT_YET_SET = 0,
|
||||
RM_IGNORE,
|
||||
RM_GENERATE_WARNING,
|
||||
RM_GENERATE_ERROR
|
||||
};
|
||||
|
||||
typedef enum {with_flags, without_flags} flag_type;
|
||||
|
||||
/* A section flag list. */
|
||||
struct flag_info_list
|
||||
{
|
||||
flag_type with;
|
||||
const char *name;
|
||||
bfd_boolean valid;
|
||||
struct flag_info_list *next;
|
||||
};
|
||||
|
||||
/* Section flag info. */
|
||||
struct flag_info
|
||||
{
|
||||
flagword only_with_flags;
|
||||
flagword not_with_flags;
|
||||
struct flag_info_list *flag_list;
|
||||
bfd_boolean flags_initialized;
|
||||
};
|
||||
|
||||
struct bfd_elf_dynamic_list;
|
||||
struct bfd_elf_version_tree;
|
||||
|
||||
/* Types of output. */
|
||||
|
||||
enum output_type
|
||||
{
|
||||
type_pde,
|
||||
type_pie,
|
||||
type_relocatable,
|
||||
type_dll,
|
||||
};
|
||||
|
||||
#define bfd_link_pde(info) ((info)->type == type_pde)
|
||||
#define bfd_link_dll(info) ((info)->type == type_dll)
|
||||
#define bfd_link_relocatable(info) ((info)->type == type_relocatable)
|
||||
#define bfd_link_pie(info) ((info)->type == type_pie)
|
||||
#define bfd_link_executable(info) (bfd_link_pde (info) || bfd_link_pie (info))
|
||||
#define bfd_link_pic(info) (bfd_link_dll (info) || bfd_link_pie (info))
|
||||
|
||||
/* This structure holds all the information needed to communicate
|
||||
between BFD and the linker when doing a link. */
|
||||
|
||||
struct bfd_link_info
|
||||
{
|
||||
/* Output type. */
|
||||
ENUM_BITFIELD (output_type) type : 2;
|
||||
|
||||
/* TRUE if BFD should pre-bind symbols in a shared object. */
|
||||
unsigned int symbolic: 1;
|
||||
|
||||
/* TRUE if executable should not contain copy relocs.
|
||||
Setting this true may result in a non-sharable text segment. */
|
||||
unsigned int nocopyreloc: 1;
|
||||
|
||||
/* TRUE if BFD should export all symbols in the dynamic symbol table
|
||||
of an executable, rather than only those used. */
|
||||
unsigned int export_dynamic: 1;
|
||||
|
||||
/* TRUE if a default symbol version should be created and used for
|
||||
exported symbols. */
|
||||
unsigned int create_default_symver: 1;
|
||||
|
||||
/* TRUE if unreferenced sections should be removed. */
|
||||
unsigned int gc_sections: 1;
|
||||
|
||||
/* TRUE if exported symbols should be kept during section gc. */
|
||||
unsigned int gc_keep_exported: 1;
|
||||
|
||||
/* TRUE if every symbol should be reported back via the notice
|
||||
callback. */
|
||||
unsigned int notice_all: 1;
|
||||
|
||||
/* TRUE if the LTO plugin is active. */
|
||||
unsigned int lto_plugin_active: 1;
|
||||
|
||||
/* TRUE if global symbols in discarded sections should be stripped. */
|
||||
unsigned int strip_discarded: 1;
|
||||
|
||||
/* TRUE if all data symbols should be dynamic. */
|
||||
unsigned int dynamic_data: 1;
|
||||
|
||||
/* TRUE if section groups should be resolved. */
|
||||
unsigned int resolve_section_groups: 1;
|
||||
|
||||
/* Which symbols to strip. */
|
||||
ENUM_BITFIELD (bfd_link_strip) strip : 2;
|
||||
|
||||
/* Which local symbols to discard. */
|
||||
ENUM_BITFIELD (bfd_link_discard) discard : 2;
|
||||
|
||||
/* Whether to generate ELF common symbols with the STT_COMMON type. */
|
||||
ENUM_BITFIELD (bfd_link_elf_stt_common) elf_stt_common : 2;
|
||||
|
||||
/* Criteria for skipping symbols when determining
|
||||
whether to include an object from an archive. */
|
||||
ENUM_BITFIELD (bfd_link_common_skip_ar_symbols) common_skip_ar_symbols : 2;
|
||||
|
||||
/* What to do with unresolved symbols in an object file.
|
||||
When producing executables the default is GENERATE_ERROR.
|
||||
When producing shared libraries the default is IGNORE. The
|
||||
assumption with shared libraries is that the reference will be
|
||||
resolved at load/execution time. */
|
||||
ENUM_BITFIELD (report_method) unresolved_syms_in_objects : 2;
|
||||
|
||||
/* What to do with unresolved symbols in a shared library.
|
||||
The same defaults apply. */
|
||||
ENUM_BITFIELD (report_method) unresolved_syms_in_shared_libs : 2;
|
||||
|
||||
/* TRUE if shared objects should be linked directly, not shared. */
|
||||
unsigned int static_link: 1;
|
||||
|
||||
/* TRUE if symbols should be retained in memory, FALSE if they
|
||||
should be freed and reread. */
|
||||
unsigned int keep_memory: 1;
|
||||
|
||||
/* TRUE if BFD should generate relocation information in the final
|
||||
executable. */
|
||||
unsigned int emitrelocations: 1;
|
||||
|
||||
/* TRUE if PT_GNU_RELRO segment should be created. */
|
||||
unsigned int relro: 1;
|
||||
|
||||
/* TRUE if separate code segment should be created. */
|
||||
unsigned int separate_code: 1;
|
||||
|
||||
/* Nonzero if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
|
||||
should be created. 1 for DWARF2 tables, 2 for compact tables. */
|
||||
unsigned int eh_frame_hdr_type: 2;
|
||||
|
||||
/* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
|
||||
unsigned int warn_shared_textrel: 1;
|
||||
|
||||
/* TRUE if we should error when adding a DT_TEXTREL. */
|
||||
unsigned int error_textrel: 1;
|
||||
|
||||
/* TRUE if .hash section should be created. */
|
||||
unsigned int emit_hash: 1;
|
||||
|
||||
/* TRUE if .gnu.hash section should be created. */
|
||||
unsigned int emit_gnu_hash: 1;
|
||||
|
||||
/* If TRUE reduce memory overheads, at the expense of speed. This will
|
||||
cause map file generation to use an O(N^2) algorithm and disable
|
||||
caching ELF symbol buffer. */
|
||||
unsigned int reduce_memory_overheads: 1;
|
||||
|
||||
/* TRUE if the output file should be in a traditional format. This
|
||||
is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
|
||||
on the output file, but may be checked when reading the input
|
||||
files. */
|
||||
unsigned int traditional_format: 1;
|
||||
|
||||
/* TRUE if non-PLT relocs should be merged into one reloc section
|
||||
and sorted so that relocs against the same symbol come together. */
|
||||
unsigned int combreloc: 1;
|
||||
|
||||
/* TRUE if a default symbol version should be created and used for
|
||||
imported symbols. */
|
||||
unsigned int default_imported_symver: 1;
|
||||
|
||||
/* TRUE if the new ELF dynamic tags are enabled. */
|
||||
unsigned int new_dtags: 1;
|
||||
|
||||
/* FALSE if .eh_frame unwind info should be generated for PLT and other
|
||||
linker created sections, TRUE if it should be omitted. */
|
||||
unsigned int no_ld_generated_unwind_info: 1;
|
||||
|
||||
/* TRUE if BFD should generate a "task linked" object file,
|
||||
similar to relocatable but also with globals converted to
|
||||
statics. */
|
||||
unsigned int task_link: 1;
|
||||
|
||||
/* TRUE if ok to have multiple definition. */
|
||||
unsigned int allow_multiple_definition: 1;
|
||||
|
||||
/* TRUE if ok to have prohibit multiple definition of absolute symbols. */
|
||||
unsigned int prohibit_multiple_definition_absolute: 1;
|
||||
|
||||
/* TRUE if ok to have version with no definition. */
|
||||
unsigned int allow_undefined_version: 1;
|
||||
|
||||
/* TRUE if some symbols have to be dynamic, controlled by
|
||||
--dynamic-list command line options. */
|
||||
unsigned int dynamic: 1;
|
||||
|
||||
/* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
|
||||
flags. */
|
||||
unsigned int execstack: 1;
|
||||
|
||||
/* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
|
||||
flags. */
|
||||
unsigned int noexecstack: 1;
|
||||
|
||||
/* TRUE if we want to produced optimized output files. This might
|
||||
need much more time and therefore must be explicitly selected. */
|
||||
unsigned int optimize: 1;
|
||||
|
||||
/* TRUE if user should be informed of removed unreferenced sections. */
|
||||
unsigned int print_gc_sections: 1;
|
||||
|
||||
/* TRUE if we should warn alternate ELF machine code. */
|
||||
unsigned int warn_alternate_em: 1;
|
||||
|
||||
/* TRUE if the linker script contained an explicit PHDRS command. */
|
||||
unsigned int user_phdrs: 1;
|
||||
|
||||
/* TRUE if program headers ought to be loaded. */
|
||||
unsigned int load_phdrs: 1;
|
||||
|
||||
/* TRUE if we should check relocations after all input files have
|
||||
been opened. */
|
||||
unsigned int check_relocs_after_open_input: 1;
|
||||
|
||||
/* TRUE if BND prefix in PLT entries is always generated. */
|
||||
unsigned int bndplt: 1;
|
||||
|
||||
/* TRUE if IBT-enabled PLT entries should be generated. */
|
||||
unsigned int ibtplt: 1;
|
||||
|
||||
/* TRUE if GNU_PROPERTY_X86_FEATURE_1_IBT should be generated. */
|
||||
unsigned int ibt: 1;
|
||||
|
||||
/* TRUE if GNU_PROPERTY_X86_FEATURE_1_SHSTK should be generated. */
|
||||
unsigned int shstk: 1;
|
||||
|
||||
/* TRUE if generation of .interp/PT_INTERP should be suppressed. */
|
||||
unsigned int nointerp: 1;
|
||||
|
||||
/* TRUE if we shouldn't check relocation overflow. */
|
||||
unsigned int no_reloc_overflow_check: 1;
|
||||
|
||||
/* TRUE if generate a 1-byte NOP as suffix for x86 call instruction. */
|
||||
unsigned int call_nop_as_suffix : 1;
|
||||
|
||||
/* TRUE if common symbols should be treated as undefined. */
|
||||
unsigned int inhibit_common_definition : 1;
|
||||
|
||||
/* TRUE if "-Map map" is passed to linker. */
|
||||
unsigned int has_map_file : 1;
|
||||
|
||||
/* The 1-byte NOP for x86 call instruction. */
|
||||
char call_nop_byte;
|
||||
|
||||
/* Char that may appear as the first char of a symbol, but should be
|
||||
skipped (like symbol_leading_char) when looking up symbols in
|
||||
wrap_hash. Used by PowerPC Linux for 'dot' symbols. */
|
||||
char wrap_char;
|
||||
|
||||
/* Separator between archive and filename in linker script filespecs. */
|
||||
char path_separator;
|
||||
|
||||
/* Compress DWARF debug sections. */
|
||||
enum compressed_debug_section_type compress_debug;
|
||||
|
||||
/* Default stack size. Zero means default (often zero itself), -1
|
||||
means explicitly zero-sized. */
|
||||
bfd_signed_vma stacksize;
|
||||
|
||||
/* Enable or disable target specific optimizations.
|
||||
|
||||
Not all targets have optimizations to enable.
|
||||
|
||||
Normally these optimizations are disabled by default but some targets
|
||||
prefer to enable them by default. So this field is a tri-state variable.
|
||||
The values are:
|
||||
|
||||
zero: Enable the optimizations (either from --relax being specified on
|
||||
the command line or the backend's before_allocation emulation function.
|
||||
|
||||
positive: The user has requested that these optimizations be disabled.
|
||||
(Via the --no-relax command line option).
|
||||
|
||||
negative: The optimizations are disabled. (Set when initializing the
|
||||
args_type structure in ldmain.c:main. */
|
||||
signed int disable_target_specific_optimizations;
|
||||
|
||||
/* Function callbacks. */
|
||||
const struct bfd_link_callbacks *callbacks;
|
||||
|
||||
/* Hash table handled by BFD. */
|
||||
struct bfd_link_hash_table *hash;
|
||||
|
||||
/* Hash table of symbols to keep. This is NULL unless strip is
|
||||
strip_some. */
|
||||
struct bfd_hash_table *keep_hash;
|
||||
|
||||
/* Hash table of symbols to report back via the notice callback. If
|
||||
this is NULL, and notice_all is FALSE, then no symbols are
|
||||
reported back. */
|
||||
struct bfd_hash_table *notice_hash;
|
||||
|
||||
/* Hash table of symbols which are being wrapped (the --wrap linker
|
||||
option). If this is NULL, no symbols are being wrapped. */
|
||||
struct bfd_hash_table *wrap_hash;
|
||||
|
||||
/* Hash table of symbols which may be left unresolved during
|
||||
a link. If this is NULL, no symbols can be left unresolved. */
|
||||
struct bfd_hash_table *ignore_hash;
|
||||
|
||||
/* The output BFD. */
|
||||
bfd *output_bfd;
|
||||
|
||||
/* The import library generated. */
|
||||
bfd *out_implib_bfd;
|
||||
|
||||
/* The list of input BFD's involved in the link. These are chained
|
||||
together via the link.next field. */
|
||||
bfd *input_bfds;
|
||||
bfd **input_bfds_tail;
|
||||
|
||||
/* If a symbol should be created for each input BFD, this is section
|
||||
where those symbols should be placed. It must be a section in
|
||||
the output BFD. It may be NULL, in which case no such symbols
|
||||
will be created. This is to support CREATE_OBJECT_SYMBOLS in the
|
||||
linker command language. */
|
||||
asection *create_object_symbols_section;
|
||||
|
||||
/* List of global symbol names that are starting points for marking
|
||||
sections against garbage collection. */
|
||||
struct bfd_sym_chain *gc_sym_list;
|
||||
|
||||
/* If a base output file is wanted, then this points to it */
|
||||
void *base_file;
|
||||
|
||||
/* The function to call when the executable or shared object is
|
||||
loaded. */
|
||||
const char *init_function;
|
||||
|
||||
/* The function to call when the executable or shared object is
|
||||
unloaded. */
|
||||
const char *fini_function;
|
||||
|
||||
/* Number of relaxation passes. Usually only one relaxation pass
|
||||
is needed. But a backend can have as many relaxation passes as
|
||||
necessary. During bfd_relax_section call, it is set to the
|
||||
current pass, starting from 0. */
|
||||
int relax_pass;
|
||||
|
||||
/* Number of relaxation trips. This number is incremented every
|
||||
time the relaxation pass is restarted due to a previous
|
||||
relaxation returning true in *AGAIN. */
|
||||
int relax_trip;
|
||||
|
||||
/* > 0 to treat protected data defined in the shared library as
|
||||
reference external. 0 to treat it as internal. -1 to let
|
||||
backend to decide. */
|
||||
int extern_protected_data;
|
||||
|
||||
/* 1 to make undefined weak symbols dynamic when building a dynamic
|
||||
object. 0 to resolve undefined weak symbols to zero. -1 to let
|
||||
the backend decide. */
|
||||
int dynamic_undefined_weak;
|
||||
|
||||
/* Non-zero if auto-import thunks for DATA items in pei386 DLLs
|
||||
should be generated/linked against. Set to 1 if this feature
|
||||
is explicitly requested by the user, -1 if enabled by default. */
|
||||
int pei386_auto_import;
|
||||
|
||||
/* Non-zero if runtime relocs for DATA items with non-zero addends
|
||||
in pei386 DLLs should be generated. Set to 1 if this feature
|
||||
is explicitly requested by the user, -1 if enabled by default. */
|
||||
int pei386_runtime_pseudo_reloc;
|
||||
|
||||
/* How many spare .dynamic DT_NULL entries should be added? */
|
||||
unsigned int spare_dynamic_tags;
|
||||
|
||||
/* May be used to set DT_FLAGS for ELF. */
|
||||
bfd_vma flags;
|
||||
|
||||
/* May be used to set DT_FLAGS_1 for ELF. */
|
||||
bfd_vma flags_1;
|
||||
|
||||
/* Start and end of RELRO region. */
|
||||
bfd_vma relro_start, relro_end;
|
||||
|
||||
/* List of symbols should be dynamic. */
|
||||
struct bfd_elf_dynamic_list *dynamic_list;
|
||||
|
||||
/* The version information. */
|
||||
struct bfd_elf_version_tree *version_info;
|
||||
};
|
||||
|
||||
/* This structures holds a set of callback functions. These are called
|
||||
by the BFD linker routines. */
|
||||
|
||||
struct bfd_link_callbacks
|
||||
{
|
||||
/* A function which is called when an object is added from an
|
||||
archive. ABFD is the archive element being added. NAME is the
|
||||
name of the symbol which caused the archive element to be pulled
|
||||
in. This function may set *SUBSBFD to point to an alternative
|
||||
BFD from which symbols should in fact be added in place of the
|
||||
original BFD's symbols. Returns TRUE if the object should be
|
||||
added, FALSE if it should be skipped. */
|
||||
bfd_boolean (*add_archive_element)
|
||||
(struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
|
||||
/* A function which is called when a symbol is found with multiple
|
||||
definitions. H is the symbol which is defined multiple times.
|
||||
NBFD is the new BFD, NSEC is the new section, and NVAL is the new
|
||||
value. NSEC may be bfd_com_section or bfd_ind_section. */
|
||||
void (*multiple_definition)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *h,
|
||||
bfd *nbfd, asection *nsec, bfd_vma nval);
|
||||
/* A function which is called when a common symbol is defined
|
||||
multiple times. H is the symbol appearing multiple times.
|
||||
NBFD is the BFD of the new symbol. NTYPE is the type of the new
|
||||
symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
|
||||
bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
|
||||
is the size of the new symbol. */
|
||||
void (*multiple_common)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *h,
|
||||
bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
|
||||
/* A function which is called to add a symbol to a set. ENTRY is
|
||||
the link hash table entry for the set itself (e.g.,
|
||||
__CTOR_LIST__). RELOC is the relocation to use for an entry in
|
||||
the set when generating a relocatable file, and is also used to
|
||||
get the size of the entry when generating an executable file.
|
||||
ABFD, SEC and VALUE identify the value to add to the set. */
|
||||
void (*add_to_set)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *entry,
|
||||
bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
|
||||
/* A function which is called when the name of a g++ constructor or
|
||||
destructor is found. This is only called by some object file
|
||||
formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
|
||||
destructor. This will use BFD_RELOC_CTOR when generating a
|
||||
relocatable file. NAME is the name of the symbol found. ABFD,
|
||||
SECTION and VALUE are the value of the symbol. */
|
||||
void (*constructor)
|
||||
(struct bfd_link_info *, bfd_boolean constructor, const char *name,
|
||||
bfd *abfd, asection *sec, bfd_vma value);
|
||||
/* A function which is called to issue a linker warning. For
|
||||
example, this is called when there is a reference to a warning
|
||||
symbol. WARNING is the warning to be issued. SYMBOL is the name
|
||||
of the symbol which triggered the warning; it may be NULL if
|
||||
there is none. ABFD, SECTION and ADDRESS identify the location
|
||||
which trigerred the warning; either ABFD or SECTION or both may
|
||||
be NULL if the location is not known. */
|
||||
void (*warning)
|
||||
(struct bfd_link_info *, const char *warning, const char *symbol,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a relocation is attempted against
|
||||
an undefined symbol. NAME is the symbol which is undefined.
|
||||
ABFD, SECTION and ADDRESS identify the location from which the
|
||||
reference is made. IS_FATAL indicates whether an undefined symbol is
|
||||
a fatal error or not. In some cases SECTION may be NULL. */
|
||||
void (*undefined_symbol)
|
||||
(struct bfd_link_info *, const char *name, bfd *abfd,
|
||||
asection *section, bfd_vma address, bfd_boolean is_fatal);
|
||||
/* A function which is called when a reloc overflow occurs. ENTRY is
|
||||
the link hash table entry for the symbol the reloc is against.
|
||||
NAME is the name of the local symbol or section the reloc is
|
||||
against, RELOC_NAME is the name of the relocation, and ADDEND is
|
||||
any addend that is used. ABFD, SECTION and ADDRESS identify the
|
||||
location at which the overflow occurs; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
void (*reloc_overflow)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *entry,
|
||||
const char *name, const char *reloc_name, bfd_vma addend,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a dangerous reloc is performed.
|
||||
MESSAGE is an appropriate message.
|
||||
ABFD, SECTION and ADDRESS identify the location at which the
|
||||
problem occurred; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
void (*reloc_dangerous)
|
||||
(struct bfd_link_info *, const char *message,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a reloc is found to be attached
|
||||
to a symbol which is not being written out. NAME is the name of
|
||||
the symbol. ABFD, SECTION and ADDRESS identify the location of
|
||||
the reloc; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
void (*unattached_reloc)
|
||||
(struct bfd_link_info *, const char *name,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a symbol in notice_hash is
|
||||
defined or referenced. H is the symbol, INH the indirect symbol
|
||||
if applicable. ABFD, SECTION and ADDRESS are the (new) value of
|
||||
the symbol. If SECTION is bfd_und_section, this is a reference.
|
||||
FLAGS are the symbol BSF_* flags. */
|
||||
bfd_boolean (*notice)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *h,
|
||||
struct bfd_link_hash_entry *inh,
|
||||
bfd *abfd, asection *section, bfd_vma address, flagword flags);
|
||||
/* Error or warning link info message. */
|
||||
void (*einfo)
|
||||
(const char *fmt, ...);
|
||||
/* General link info message. */
|
||||
void (*info)
|
||||
(const char *fmt, ...);
|
||||
/* Message to be printed in linker map file. */
|
||||
void (*minfo)
|
||||
(const char *fmt, ...);
|
||||
/* This callback provides a chance for users of the BFD library to
|
||||
override its decision about whether to place two adjacent sections
|
||||
into the same segment. */
|
||||
bfd_boolean (*override_segment_assignment)
|
||||
(struct bfd_link_info *, bfd * abfd,
|
||||
asection * current_section, asection * previous_section,
|
||||
bfd_boolean new_segment);
|
||||
};
|
||||
|
||||
/* The linker builds link_order structures which tell the code how to
|
||||
include input data in the output file. */
|
||||
|
||||
/* These are the types of link_order structures. */
|
||||
|
||||
enum bfd_link_order_type
|
||||
{
|
||||
bfd_undefined_link_order, /* Undefined. */
|
||||
bfd_indirect_link_order, /* Built from a section. */
|
||||
bfd_data_link_order, /* Set to explicit data. */
|
||||
bfd_section_reloc_link_order, /* Relocate against a section. */
|
||||
bfd_symbol_reloc_link_order /* Relocate against a symbol. */
|
||||
};
|
||||
|
||||
/* This is the link_order structure itself. These form a chain
|
||||
attached to the output section whose contents they are describing. */
|
||||
|
||||
struct bfd_link_order
|
||||
{
|
||||
/* Next link_order in chain. */
|
||||
struct bfd_link_order *next;
|
||||
/* Type of link_order. */
|
||||
enum bfd_link_order_type type;
|
||||
/* Offset within output section. */
|
||||
bfd_vma offset;
|
||||
/* Size within output section. */
|
||||
bfd_size_type size;
|
||||
/* Type specific information. */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/* Section to include. If this is used, then
|
||||
section->output_section must be the section the
|
||||
link_order is attached to, section->output_offset must
|
||||
equal the link_order offset field, and section->size
|
||||
must equal the link_order size field. Maybe these
|
||||
restrictions should be relaxed someday. */
|
||||
asection *section;
|
||||
} indirect;
|
||||
struct
|
||||
{
|
||||
/* Size of contents, or zero when contents should be filled by
|
||||
the architecture-dependent fill function.
|
||||
A non-zero value allows filling of the output section
|
||||
with an arbitrary repeated pattern. */
|
||||
unsigned int size;
|
||||
/* Data to put into file. */
|
||||
bfd_byte *contents;
|
||||
} data;
|
||||
struct
|
||||
{
|
||||
/* Description of reloc to generate. Used for
|
||||
bfd_section_reloc_link_order and
|
||||
bfd_symbol_reloc_link_order. */
|
||||
struct bfd_link_order_reloc *p;
|
||||
} reloc;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* A linker order of type bfd_section_reloc_link_order or
|
||||
bfd_symbol_reloc_link_order means to create a reloc against a
|
||||
section or symbol, respectively. This is used to implement -Ur to
|
||||
generate relocs for the constructor tables. The
|
||||
bfd_link_order_reloc structure describes the reloc that BFD should
|
||||
create. It is similar to a arelent, but I didn't use arelent
|
||||
because the linker does not know anything about most symbols, and
|
||||
any asymbol structure it creates will be partially meaningless.
|
||||
This information could logically be in the bfd_link_order struct,
|
||||
but I didn't want to waste the space since these types of relocs
|
||||
are relatively rare. */
|
||||
|
||||
struct bfd_link_order_reloc
|
||||
{
|
||||
/* Reloc type. */
|
||||
bfd_reloc_code_real_type reloc;
|
||||
|
||||
union
|
||||
{
|
||||
/* For type bfd_section_reloc_link_order, this is the section
|
||||
the reloc should be against. This must be a section in the
|
||||
output BFD, not any of the input BFDs. */
|
||||
asection *section;
|
||||
/* For type bfd_symbol_reloc_link_order, this is the name of the
|
||||
symbol the reloc should be against. */
|
||||
const char *name;
|
||||
} u;
|
||||
|
||||
/* Addend to use. The object file should contain zero. The BFD
|
||||
backend is responsible for filling in the contents of the object
|
||||
file correctly. For some object file formats (e.g., COFF) the
|
||||
addend must be stored into in the object file, and for some
|
||||
(e.g., SPARC a.out) it is kept in the reloc. */
|
||||
bfd_vma addend;
|
||||
};
|
||||
|
||||
/* Allocate a new link_order for a section. */
|
||||
extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
|
||||
|
||||
/* These structures are used to describe version information for the
|
||||
ELF linker. These structures could be manipulated entirely inside
|
||||
BFD, but it would be a pain. Instead, the regular linker sets up
|
||||
these structures, and then passes them into BFD. */
|
||||
|
||||
/* Glob pattern for a version. */
|
||||
|
||||
struct bfd_elf_version_expr
|
||||
{
|
||||
/* Next glob pattern for this version. */
|
||||
struct bfd_elf_version_expr *next;
|
||||
/* Glob pattern. */
|
||||
const char *pattern;
|
||||
/* Set if pattern is not a glob. */
|
||||
unsigned int literal : 1;
|
||||
/* Defined by ".symver". */
|
||||
unsigned int symver : 1;
|
||||
/* Defined by version script. */
|
||||
unsigned int script : 1;
|
||||
/* Pattern type. */
|
||||
#define BFD_ELF_VERSION_C_TYPE 1
|
||||
#define BFD_ELF_VERSION_CXX_TYPE 2
|
||||
#define BFD_ELF_VERSION_JAVA_TYPE 4
|
||||
unsigned int mask : 3;
|
||||
};
|
||||
|
||||
struct bfd_elf_version_expr_head
|
||||
{
|
||||
/* List of all patterns, both wildcards and non-wildcards. */
|
||||
struct bfd_elf_version_expr *list;
|
||||
/* Hash table for non-wildcards. */
|
||||
void *htab;
|
||||
/* Remaining patterns. */
|
||||
struct bfd_elf_version_expr *remaining;
|
||||
/* What kind of pattern types are present in list (bitmask). */
|
||||
unsigned int mask;
|
||||
};
|
||||
|
||||
/* Version dependencies. */
|
||||
|
||||
struct bfd_elf_version_deps
|
||||
{
|
||||
/* Next dependency for this version. */
|
||||
struct bfd_elf_version_deps *next;
|
||||
/* The version which this version depends upon. */
|
||||
struct bfd_elf_version_tree *version_needed;
|
||||
};
|
||||
|
||||
/* A node in the version tree. */
|
||||
|
||||
struct bfd_elf_version_tree
|
||||
{
|
||||
/* Next version. */
|
||||
struct bfd_elf_version_tree *next;
|
||||
/* Name of this version. */
|
||||
const char *name;
|
||||
/* Version number. */
|
||||
unsigned int vernum;
|
||||
/* Regular expressions for global symbols in this version. */
|
||||
struct bfd_elf_version_expr_head globals;
|
||||
/* Regular expressions for local symbols in this version. */
|
||||
struct bfd_elf_version_expr_head locals;
|
||||
/* List of versions which this version depends upon. */
|
||||
struct bfd_elf_version_deps *deps;
|
||||
/* Index of the version name. This is used within BFD. */
|
||||
unsigned int name_indx;
|
||||
/* Whether this version tree was used. This is used within BFD. */
|
||||
int used;
|
||||
/* Matching hook. */
|
||||
struct bfd_elf_version_expr *(*match)
|
||||
(struct bfd_elf_version_expr_head *head,
|
||||
struct bfd_elf_version_expr *prev, const char *sym);
|
||||
};
|
||||
|
||||
struct bfd_elf_dynamic_list
|
||||
{
|
||||
struct bfd_elf_version_expr_head head;
|
||||
struct bfd_elf_version_expr *(*match)
|
||||
(struct bfd_elf_version_expr_head *head,
|
||||
struct bfd_elf_version_expr *prev, const char *sym);
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,6 +1,6 @@
|
||||
#define _Addr int
|
||||
#define _Int64 long long
|
||||
#define _Reg int
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
|
||||
typedef __builtin_va_list va_list;
|
||||
@ -20,6 +20,22 @@ typedef unsigned wchar_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
|
||||
typedef unsigned wint_t;
|
||||
#define __DEFINED_wint_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
|
||||
typedef int blksize_t;
|
||||
#define __DEFINED_blksize_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
|
||||
typedef unsigned int nlink_t;
|
||||
#define __DEFINED_nlink_t
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
|
||||
typedef float float_t;
|
||||
@ -50,37 +66,37 @@ typedef long suseconds_t;
|
||||
|
||||
|
||||
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
|
||||
typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
#define __DEFINED_pthread_attr_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
|
||||
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
#define __DEFINED_pthread_mutex_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
|
||||
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
|
||||
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
#define __DEFINED_mtx_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
#define __DEFINED_pthread_cond_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
|
||||
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
#define __DEFINED_cnd_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
|
||||
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
#define __DEFINED_pthread_rwlock_t
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
|
||||
typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
|
||||
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
#define __DEFINED_pthread_barrier_t
|
||||
#endif
|
||||
|
||||
@ -339,6 +355,11 @@ typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE)
|
||||
struct _IO_FILE { char __x; };
|
||||
#define __DEFINED_struct__IO_FILE
|
||||
#endif
|
||||
|
||||
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
|
||||
typedef struct _IO_FILE FILE;
|
||||
#define __DEFINED_FILE
|
||||
|
||||
@ -1,5 +1 @@
|
||||
#if __ARMEB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
@ -64,6 +64,8 @@
|
||||
#define TIOCGPTLCK 0x80045439
|
||||
#define TIOCGEXCL 0x80045440
|
||||
#define TIOCGPTPEER 0x5441
|
||||
#define TIOCGISO7816 0x80285442
|
||||
#define TIOCSISO7816 0xc0285443
|
||||
|
||||
#define FIONCLEX 0x5450
|
||||
#define FIOCLEX 0x5451
|
||||
@ -82,24 +84,6 @@
|
||||
#define TIOCGICOUNT 0x545D
|
||||
#define FIOQSIZE 0x5460
|
||||
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
@ -115,23 +99,6 @@ struct winsize {
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
@ -140,67 +107,4 @@ struct winsize {
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
#include <bits/ioctl_fix.h>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,107 +0,0 @@
|
||||
/* Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef DIAGNOSTICS_H
|
||||
#define DIAGNOSTICS_H
|
||||
|
||||
/* If at all possible, fix the source rather than using these macros
|
||||
to silence warnings. If you do use these macros be aware that
|
||||
you'll need to condition their use on particular compiler versions,
|
||||
which can be done for gcc using ansidecl.h's GCC_VERSION macro.
|
||||
|
||||
gcc versions between 4.2 and 4.6 do not allow pragma control of
|
||||
diagnostics inside functions, giving a hard error if you try to use
|
||||
the finer control available with later versions.
|
||||
gcc prior to 4.2 warns about diagnostic push and pop.
|
||||
|
||||
The other macros have restrictions too, for example gcc-5, gcc-6
|
||||
and gcc-7 warn that -Wstringop-truncation is unknown, unless you
|
||||
also add DIAGNOSTIC_IGNORE ("-Wpragma"). */
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
|
||||
# define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
|
||||
|
||||
/* Stringification. */
|
||||
# define DIAGNOSTIC_STRINGIFY_1(x) #x
|
||||
# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
|
||||
|
||||
# define DIAGNOSTIC_IGNORE(option) \
|
||||
_Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
|
||||
#else
|
||||
# define DIAGNOSTIC_PUSH
|
||||
# define DIAGNOSTIC_POP
|
||||
# define DIAGNOSTIC_IGNORE(option)
|
||||
#endif
|
||||
|
||||
#if defined (__clang__) /* clang */
|
||||
|
||||
# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
|
||||
# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \
|
||||
DIAGNOSTIC_IGNORE ("-Wdeprecated-declarations")
|
||||
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
|
||||
DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
|
||||
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
|
||||
DIAGNOSTIC_IGNORE ("-Wunused-function")
|
||||
# if __has_warning ("-Wenum-compare-switch")
|
||||
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \
|
||||
DIAGNOSTIC_IGNORE ("-Wenum-compare-switch")
|
||||
# endif
|
||||
|
||||
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
|
||||
DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
|
||||
|
||||
#elif defined (__GNUC__) /* GCC */
|
||||
|
||||
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
|
||||
DIAGNOSTIC_IGNORE ("-Wunused-function")
|
||||
|
||||
# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
|
||||
DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
|
||||
|
||||
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
|
||||
DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
|
||||
# define DIAGNOSTIC_IGNORE_SELF_MOVE
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
|
||||
# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
|
||||
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
|
||||
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
|
||||
# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
|
||||
# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
|
||||
#endif
|
||||
|
||||
#ifndef DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
|
||||
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
|
||||
#endif
|
||||
|
||||
#endif /* DIAGNOSTICS_H */
|
||||
@ -1,397 +0,0 @@
|
||||
/* Interface between the opcode library and its callers.
|
||||
|
||||
Copyright (C) 1999-2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
Written by Cygnus Support, 1993.
|
||||
|
||||
The opcode library (libopcodes.a) provides instruction decoders for
|
||||
a large variety of instruction sets, callable with an identical
|
||||
interface, for making instruction-processing programs more independent
|
||||
of the instruction set being processed. */
|
||||
|
||||
#ifndef DIS_ASM_H
|
||||
#define DIS_ASM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "bfd.h"
|
||||
|
||||
typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
|
||||
|
||||
enum dis_insn_type
|
||||
{
|
||||
dis_noninsn, /* Not a valid instruction. */
|
||||
dis_nonbranch, /* Not a branch instruction. */
|
||||
dis_branch, /* Unconditional branch. */
|
||||
dis_condbranch, /* Conditional branch. */
|
||||
dis_jsr, /* Jump to subroutine. */
|
||||
dis_condjsr, /* Conditional jump to subroutine. */
|
||||
dis_dref, /* Data reference instruction. */
|
||||
dis_dref2 /* Two data references in instruction. */
|
||||
};
|
||||
|
||||
/* This struct is passed into the instruction decoding routine,
|
||||
and is passed back out into each callback. The various fields are used
|
||||
for conveying information from your main routine into your callbacks,
|
||||
for passing information into the instruction decoders (such as the
|
||||
addresses of the callback functions), or for passing information
|
||||
back from the instruction decoders to their callers.
|
||||
|
||||
It must be initialized before it is first passed; this can be done
|
||||
by hand, or using one of the initialization macros below. */
|
||||
|
||||
typedef struct disassemble_info
|
||||
{
|
||||
fprintf_ftype fprintf_func;
|
||||
void *stream;
|
||||
void *application_data;
|
||||
|
||||
/* Target description. We could replace this with a pointer to the bfd,
|
||||
but that would require one. There currently isn't any such requirement
|
||||
so to avoid introducing one we record these explicitly. */
|
||||
/* The bfd_flavour. This can be bfd_target_unknown_flavour. */
|
||||
enum bfd_flavour flavour;
|
||||
/* The bfd_arch value. */
|
||||
enum bfd_architecture arch;
|
||||
/* The bfd_mach value. */
|
||||
unsigned long mach;
|
||||
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
|
||||
enum bfd_endian endian;
|
||||
/* Endianness of code, for mixed-endian situations such as ARM BE8. */
|
||||
enum bfd_endian endian_code;
|
||||
/* An arch/mach-specific bitmask of selected instruction subsets, mainly
|
||||
for processors with run-time-switchable instruction sets. The default,
|
||||
zero, means that there is no constraint. CGEN-based opcodes ports
|
||||
may use ISA_foo masks. */
|
||||
void *insn_sets;
|
||||
|
||||
/* Some targets need information about the current section to accurately
|
||||
display insns. If this is NULL, the target disassembler function
|
||||
will have to make its best guess. */
|
||||
asection *section;
|
||||
|
||||
/* An array of pointers to symbols either at the location being disassembled
|
||||
or at the start of the function being disassembled. The array is sorted
|
||||
so that the first symbol is intended to be the one used. The others are
|
||||
present for any misc. purposes. This is not set reliably, but if it is
|
||||
not NULL, it is correct. */
|
||||
asymbol **symbols;
|
||||
/* Number of symbols in array. */
|
||||
int num_symbols;
|
||||
|
||||
/* Symbol table provided for targets that want to look at it. This is
|
||||
used on Arm to find mapping symbols and determine Arm/Thumb code. */
|
||||
asymbol **symtab;
|
||||
int symtab_pos;
|
||||
int symtab_size;
|
||||
|
||||
/* For use by the disassembler.
|
||||
The top 16 bits are reserved for public use (and are documented here).
|
||||
The bottom 16 bits are for the internal use of the disassembler. */
|
||||
unsigned long flags;
|
||||
/* Set if the disassembler has determined that there are one or more
|
||||
relocations associated with the instruction being disassembled. */
|
||||
#define INSN_HAS_RELOC (1 << 31)
|
||||
/* Set if the user has requested the disassembly of data as well as code. */
|
||||
#define DISASSEMBLE_DATA (1 << 30)
|
||||
/* Set if the user has specifically set the machine type encoded in the
|
||||
mach field of this structure. */
|
||||
#define USER_SPECIFIED_MACHINE_TYPE (1 << 29)
|
||||
|
||||
/* Use internally by the target specific disassembly code. */
|
||||
void *private_data;
|
||||
|
||||
/* Function used to get bytes to disassemble. MEMADDR is the
|
||||
address of the stuff to be disassembled, MYADDR is the address to
|
||||
put the bytes in, and LENGTH is the number of bytes to read.
|
||||
INFO is a pointer to this struct.
|
||||
Returns an errno value or 0 for success. */
|
||||
int (*read_memory_func)
|
||||
(bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
|
||||
struct disassemble_info *dinfo);
|
||||
|
||||
/* Function which should be called if we get an error that we can't
|
||||
recover from. STATUS is the errno value from read_memory_func and
|
||||
MEMADDR is the address that we were trying to read. INFO is a
|
||||
pointer to this struct. */
|
||||
void (*memory_error_func)
|
||||
(int status, bfd_vma memaddr, struct disassemble_info *dinfo);
|
||||
|
||||
/* Function called to print ADDR. */
|
||||
void (*print_address_func)
|
||||
(bfd_vma addr, struct disassemble_info *dinfo);
|
||||
|
||||
/* Function called to determine if there is a symbol at the given ADDR.
|
||||
If there is, the function returns 1, otherwise it returns 0.
|
||||
This is used by ports which support an overlay manager where
|
||||
the overlay number is held in the top part of an address. In
|
||||
some circumstances we want to include the overlay number in the
|
||||
address, (normally because there is a symbol associated with
|
||||
that address), but sometimes we want to mask out the overlay bits. */
|
||||
int (* symbol_at_address_func)
|
||||
(bfd_vma addr, struct disassemble_info *dinfo);
|
||||
|
||||
/* Function called to check if a SYMBOL is can be displayed to the user.
|
||||
This is used by some ports that want to hide special symbols when
|
||||
displaying debugging outout. */
|
||||
bfd_boolean (* symbol_is_valid)
|
||||
(asymbol *, struct disassemble_info *dinfo);
|
||||
|
||||
/* These are for buffer_read_memory. */
|
||||
bfd_byte *buffer;
|
||||
bfd_vma buffer_vma;
|
||||
size_t buffer_length;
|
||||
|
||||
/* This variable may be set by the instruction decoder. It suggests
|
||||
the number of bytes objdump should display on a single line. If
|
||||
the instruction decoder sets this, it should always set it to
|
||||
the same value in order to get reasonable looking output. */
|
||||
int bytes_per_line;
|
||||
|
||||
/* The next two variables control the way objdump displays the raw data. */
|
||||
/* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
|
||||
/* output will look like this:
|
||||
00: 00000000 00000000
|
||||
with the chunks displayed according to "display_endian". */
|
||||
int bytes_per_chunk;
|
||||
enum bfd_endian display_endian;
|
||||
|
||||
/* Number of octets per incremented target address
|
||||
Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
|
||||
unsigned int octets_per_byte;
|
||||
|
||||
/* The number of zeroes we want to see at the end of a section before we
|
||||
start skipping them. */
|
||||
unsigned int skip_zeroes;
|
||||
|
||||
/* The number of zeroes to skip at the end of a section. If the number
|
||||
of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
|
||||
they will be disassembled. If there are fewer than
|
||||
SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
|
||||
attempt to avoid disassembling zeroes inserted by section
|
||||
alignment. */
|
||||
unsigned int skip_zeroes_at_end;
|
||||
|
||||
/* Whether the disassembler always needs the relocations. */
|
||||
bfd_boolean disassembler_needs_relocs;
|
||||
|
||||
/* Results from instruction decoders. Not all decoders yet support
|
||||
this information. This info is set each time an instruction is
|
||||
decoded, and is only valid for the last such instruction.
|
||||
|
||||
To determine whether this decoder supports this information, set
|
||||
insn_info_valid to 0, decode an instruction, then check it. */
|
||||
|
||||
char insn_info_valid; /* Branch info has been set. */
|
||||
char branch_delay_insns; /* How many sequential insn's will run before
|
||||
a branch takes effect. (0 = normal) */
|
||||
char data_size; /* Size of data reference in insn, in bytes */
|
||||
enum dis_insn_type insn_type; /* Type of instruction */
|
||||
bfd_vma target; /* Target address of branch or dref, if known;
|
||||
zero if unknown. */
|
||||
bfd_vma target2; /* Second target address for dref2 */
|
||||
|
||||
/* Command line options specific to the target disassembler. */
|
||||
const char *disassembler_options;
|
||||
|
||||
/* If non-zero then try not disassemble beyond this address, even if
|
||||
there are values left in the buffer. This address is the address
|
||||
of the nearest symbol forwards from the start of the disassembly,
|
||||
and it is assumed that it lies on the boundary between instructions.
|
||||
If an instruction spans this address then this is an error in the
|
||||
file being disassembled. */
|
||||
bfd_vma stop_vma;
|
||||
|
||||
} disassemble_info;
|
||||
|
||||
/* This struct is used to pass information about valid disassembler
|
||||
option arguments from the target to the generic GDB functions
|
||||
that set and display them. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Option argument name to use in descriptions. */
|
||||
const char *name;
|
||||
|
||||
/* Vector of acceptable option argument values, NULL-terminated. */
|
||||
const char **values;
|
||||
} disasm_option_arg_t;
|
||||
|
||||
/* This struct is used to pass information about valid disassembler
|
||||
options, their descriptions and arguments from the target to the
|
||||
generic GDB functions that set and display them. Options are
|
||||
defined by tuples of vector entries at each index. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Vector of option names, NULL-terminated. */
|
||||
const char **name;
|
||||
|
||||
/* Vector of option descriptions or NULL if none to be shown. */
|
||||
const char **description;
|
||||
|
||||
/* Vector of option argument information pointers or NULL if no
|
||||
option accepts an argument. NULL entries denote individual
|
||||
options that accept no argument. */
|
||||
const disasm_option_arg_t **arg;
|
||||
} disasm_options_t;
|
||||
|
||||
/* This struct is used to pass information about valid disassembler
|
||||
options and arguments from the target to the generic GDB functions
|
||||
that set and display them. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Valid disassembler options. Individual options that support
|
||||
an argument will refer to entries in the ARGS vector. */
|
||||
disasm_options_t options;
|
||||
|
||||
/* Vector of acceptable option arguments, NULL-terminated. This
|
||||
collects all possible option argument choices, some of which
|
||||
may be shared by different options from the OPTIONS member. */
|
||||
disasm_option_arg_t *args;
|
||||
} disasm_options_and_args_t;
|
||||
|
||||
/* Standard disassemblers. Disassemble one instruction at the given
|
||||
target address. Return number of octets processed. */
|
||||
typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
|
||||
|
||||
/* Disassemblers used out side of opcodes library. */
|
||||
extern int print_insn_m32c (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mep (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_s12z (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sh (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sparc (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rx (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rl78 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rl78_g13 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rl78_g14 (bfd_vma, disassemble_info *);
|
||||
|
||||
extern disassembler_ftype arc_get_disassembler (bfd *);
|
||||
extern disassembler_ftype cris_get_disassembler (bfd *);
|
||||
|
||||
extern void print_aarch64_disassembler_options (FILE *);
|
||||
extern void print_i386_disassembler_options (FILE *);
|
||||
extern void print_mips_disassembler_options (FILE *);
|
||||
extern void print_nfp_disassembler_options (FILE *);
|
||||
extern void print_ppc_disassembler_options (FILE *);
|
||||
extern void print_riscv_disassembler_options (FILE *);
|
||||
extern void print_arm_disassembler_options (FILE *);
|
||||
extern void print_arc_disassembler_options (FILE *);
|
||||
extern void print_s390_disassembler_options (FILE *);
|
||||
extern void print_wasm32_disassembler_options (FILE *);
|
||||
extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
|
||||
extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
|
||||
extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *);
|
||||
extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
|
||||
extern void disassemble_init_powerpc (struct disassemble_info *);
|
||||
extern void disassemble_init_s390 (struct disassemble_info *);
|
||||
extern void disassemble_init_wasm32 (struct disassemble_info *);
|
||||
extern void disassemble_init_nds32 (struct disassemble_info *);
|
||||
extern const disasm_options_and_args_t *disassembler_options_arm (void);
|
||||
extern const disasm_options_and_args_t *disassembler_options_mips (void);
|
||||
extern const disasm_options_and_args_t *disassembler_options_powerpc (void);
|
||||
extern const disasm_options_and_args_t *disassembler_options_s390 (void);
|
||||
|
||||
/* Fetch the disassembler for a given architecture ARC, endianess (big
|
||||
endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
|
||||
is available. ABFD may be NULL. */
|
||||
extern disassembler_ftype disassembler (enum bfd_architecture arc,
|
||||
bfd_boolean big, unsigned long mach,
|
||||
bfd *abfd);
|
||||
|
||||
/* Amend the disassemble_info structure as necessary for the target architecture.
|
||||
Should only be called after initialising the info->arch field. */
|
||||
extern void disassemble_init_for_target (struct disassemble_info * dinfo);
|
||||
|
||||
/* Document any target specific options available from the disassembler. */
|
||||
extern void disassembler_usage (FILE *);
|
||||
|
||||
/* Remove whitespace and consecutive commas. */
|
||||
extern char *remove_whitespace_and_extra_commas (char *);
|
||||
|
||||
/* Like STRCMP, but treat ',' the same as '\0' so that we match
|
||||
strings like "foobar" against "foobar,xxyyzz,...". */
|
||||
extern int disassembler_options_cmp (const char *, const char *);
|
||||
|
||||
/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */
|
||||
static inline const char *
|
||||
next_disassembler_option (const char *options)
|
||||
{
|
||||
const char *opt = strchr (options, ',');
|
||||
if (opt != NULL)
|
||||
opt++;
|
||||
return opt;
|
||||
}
|
||||
|
||||
/* A macro for iterating over each comma separated option in OPTIONS. */
|
||||
#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \
|
||||
for ((OPT) = (OPTIONS); \
|
||||
(OPT) != NULL; \
|
||||
(OPT) = next_disassembler_option (OPT))
|
||||
|
||||
|
||||
/* This block of definitions is for particular callers who read instructions
|
||||
into a buffer before calling the instruction decoder. */
|
||||
|
||||
/* Here is a function which callers may wish to use for read_memory_func.
|
||||
It gets bytes from a buffer. */
|
||||
extern int buffer_read_memory
|
||||
(bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
|
||||
|
||||
/* This function goes with buffer_read_memory.
|
||||
It prints a message using info->fprintf_func and info->stream. */
|
||||
extern void perror_memory (int, bfd_vma, struct disassemble_info *);
|
||||
|
||||
|
||||
/* Just print the address in hex. This is included for completeness even
|
||||
though both GDB and objdump provide their own (to print symbolic
|
||||
addresses). */
|
||||
extern void generic_print_address
|
||||
(bfd_vma, struct disassemble_info *);
|
||||
|
||||
/* Always true. */
|
||||
extern int generic_symbol_at_address
|
||||
(bfd_vma, struct disassemble_info *);
|
||||
|
||||
/* Also always true. */
|
||||
extern bfd_boolean generic_symbol_is_valid
|
||||
(asymbol *, struct disassemble_info *);
|
||||
|
||||
/* Method to initialize a disassemble_info struct. This should be
|
||||
called by all applications creating such a struct. */
|
||||
extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
|
||||
fprintf_ftype fprintf_func);
|
||||
|
||||
/* For compatibility with existing code. */
|
||||
#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
|
||||
init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! defined (DIS_ASM_H) */
|
||||
@ -1,994 +0,0 @@
|
||||
/* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*-
|
||||
*
|
||||
* Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* Copyright 2000 VA Linux Systems, Inc., Fremont, California.
|
||||
* Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* Copyright 2014 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Kevin E. Martin <martin@valinux.com>
|
||||
* Gareth Hughes <gareth@valinux.com>
|
||||
* Keith Whitwell <keith@tungstengraphics.com>
|
||||
*/
|
||||
|
||||
#ifndef __AMDGPU_DRM_H__
|
||||
#define __AMDGPU_DRM_H__
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_AMDGPU_GEM_CREATE 0x00
|
||||
#define DRM_AMDGPU_GEM_MMAP 0x01
|
||||
#define DRM_AMDGPU_CTX 0x02
|
||||
#define DRM_AMDGPU_BO_LIST 0x03
|
||||
#define DRM_AMDGPU_CS 0x04
|
||||
#define DRM_AMDGPU_INFO 0x05
|
||||
#define DRM_AMDGPU_GEM_METADATA 0x06
|
||||
#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07
|
||||
#define DRM_AMDGPU_GEM_VA 0x08
|
||||
#define DRM_AMDGPU_WAIT_CS 0x09
|
||||
#define DRM_AMDGPU_GEM_OP 0x10
|
||||
#define DRM_AMDGPU_GEM_USERPTR 0x11
|
||||
#define DRM_AMDGPU_WAIT_FENCES 0x12
|
||||
#define DRM_AMDGPU_VM 0x13
|
||||
#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14
|
||||
#define DRM_AMDGPU_SCHED 0x15
|
||||
|
||||
#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
|
||||
#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx)
|
||||
#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list)
|
||||
#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs)
|
||||
#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va)
|
||||
#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
|
||||
#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
|
||||
#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences)
|
||||
#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm)
|
||||
#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle)
|
||||
#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
|
||||
|
||||
/**
|
||||
* DOC: memory domains
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_CPU System memory that is not GPU accessible.
|
||||
* Memory in this pool could be swapped out to disk if there is pressure.
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_GTT GPU accessible system memory, mapped into the
|
||||
* GPU's virtual address space via gart. Gart memory linearizes non-contiguous
|
||||
* pages of system memory, allows GPU access system memory in a linezrized
|
||||
* fashion.
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_VRAM Local video memory. For APUs, it is memory
|
||||
* carved out by the BIOS.
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_GDS Global on-chip data storage used to share data
|
||||
* across shader threads.
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_GWS Global wave sync, used to synchronize the
|
||||
* execution of all the waves on a device.
|
||||
*
|
||||
* %AMDGPU_GEM_DOMAIN_OA Ordered append, used by 3D or Compute engines
|
||||
* for appending data.
|
||||
*/
|
||||
#define AMDGPU_GEM_DOMAIN_CPU 0x1
|
||||
#define AMDGPU_GEM_DOMAIN_GTT 0x2
|
||||
#define AMDGPU_GEM_DOMAIN_VRAM 0x4
|
||||
#define AMDGPU_GEM_DOMAIN_GDS 0x8
|
||||
#define AMDGPU_GEM_DOMAIN_GWS 0x10
|
||||
#define AMDGPU_GEM_DOMAIN_OA 0x20
|
||||
#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
|
||||
AMDGPU_GEM_DOMAIN_GTT | \
|
||||
AMDGPU_GEM_DOMAIN_VRAM | \
|
||||
AMDGPU_GEM_DOMAIN_GDS | \
|
||||
AMDGPU_GEM_DOMAIN_GWS | \
|
||||
AMDGPU_GEM_DOMAIN_OA)
|
||||
|
||||
/* Flag that CPU access will be required for the case of VRAM domain */
|
||||
#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
|
||||
/* Flag that CPU access will not work, this VRAM domain is invisible */
|
||||
#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1)
|
||||
/* Flag that USWC attributes should be used for GTT */
|
||||
#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
|
||||
/* Flag that the memory should be in VRAM and cleared */
|
||||
#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3)
|
||||
/* Flag that create shadow bo(GTT) while allocating vram bo */
|
||||
#define AMDGPU_GEM_CREATE_SHADOW (1 << 4)
|
||||
/* Flag that allocating the BO should use linear VRAM */
|
||||
#define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5)
|
||||
/* Flag that BO is always valid in this VM */
|
||||
#define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6)
|
||||
/* Flag that BO sharing will be explicitly synchronized */
|
||||
#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7)
|
||||
/* Flag that indicates allocating MQD gart on GFX9, where the mtype
|
||||
* for the second page onward should be set to NC.
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8)
|
||||
|
||||
struct drm_amdgpu_gem_create_in {
|
||||
/** the requested memory size */
|
||||
__u64 bo_size;
|
||||
/** physical start_addr alignment in bytes for some HW requirements */
|
||||
__u64 alignment;
|
||||
/** the requested memory domains */
|
||||
__u64 domains;
|
||||
/** allocation flags */
|
||||
__u64 domain_flags;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_gem_create_out {
|
||||
/** returned GEM object handle */
|
||||
__u32 handle;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
union drm_amdgpu_gem_create {
|
||||
struct drm_amdgpu_gem_create_in in;
|
||||
struct drm_amdgpu_gem_create_out out;
|
||||
};
|
||||
|
||||
/** Opcode to create new residency list. */
|
||||
#define AMDGPU_BO_LIST_OP_CREATE 0
|
||||
/** Opcode to destroy previously created residency list */
|
||||
#define AMDGPU_BO_LIST_OP_DESTROY 1
|
||||
/** Opcode to update resource information in the list */
|
||||
#define AMDGPU_BO_LIST_OP_UPDATE 2
|
||||
|
||||
struct drm_amdgpu_bo_list_in {
|
||||
/** Type of operation */
|
||||
__u32 operation;
|
||||
/** Handle of list or 0 if we want to create one */
|
||||
__u32 list_handle;
|
||||
/** Number of BOs in list */
|
||||
__u32 bo_number;
|
||||
/** Size of each element describing BO */
|
||||
__u32 bo_info_size;
|
||||
/** Pointer to array describing BOs */
|
||||
__u64 bo_info_ptr;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_bo_list_entry {
|
||||
/** Handle of BO */
|
||||
__u32 bo_handle;
|
||||
/** New (if specified) BO priority to be used during migration */
|
||||
__u32 bo_priority;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_bo_list_out {
|
||||
/** Handle of resource list */
|
||||
__u32 list_handle;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
union drm_amdgpu_bo_list {
|
||||
struct drm_amdgpu_bo_list_in in;
|
||||
struct drm_amdgpu_bo_list_out out;
|
||||
};
|
||||
|
||||
/* context related */
|
||||
#define AMDGPU_CTX_OP_ALLOC_CTX 1
|
||||
#define AMDGPU_CTX_OP_FREE_CTX 2
|
||||
#define AMDGPU_CTX_OP_QUERY_STATE 3
|
||||
#define AMDGPU_CTX_OP_QUERY_STATE2 4
|
||||
|
||||
/* GPU reset status */
|
||||
#define AMDGPU_CTX_NO_RESET 0
|
||||
/* this the context caused it */
|
||||
#define AMDGPU_CTX_GUILTY_RESET 1
|
||||
/* some other context caused it */
|
||||
#define AMDGPU_CTX_INNOCENT_RESET 2
|
||||
/* unknown cause */
|
||||
#define AMDGPU_CTX_UNKNOWN_RESET 3
|
||||
|
||||
/* indicate gpu reset occured after ctx created */
|
||||
#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0)
|
||||
/* indicate vram lost occured after ctx created */
|
||||
#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1)
|
||||
/* indicate some job from this context once cause gpu hang */
|
||||
#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2)
|
||||
|
||||
/* Context priority level */
|
||||
#define AMDGPU_CTX_PRIORITY_UNSET -2048
|
||||
#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023
|
||||
#define AMDGPU_CTX_PRIORITY_LOW -512
|
||||
#define AMDGPU_CTX_PRIORITY_NORMAL 0
|
||||
/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */
|
||||
#define AMDGPU_CTX_PRIORITY_HIGH 512
|
||||
#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
|
||||
|
||||
struct drm_amdgpu_ctx_in {
|
||||
/** AMDGPU_CTX_OP_* */
|
||||
__u32 op;
|
||||
/** For future use, no flags defined so far */
|
||||
__u32 flags;
|
||||
__u32 ctx_id;
|
||||
__s32 priority;
|
||||
};
|
||||
|
||||
union drm_amdgpu_ctx_out {
|
||||
struct {
|
||||
__u32 ctx_id;
|
||||
__u32 _pad;
|
||||
} alloc;
|
||||
|
||||
struct {
|
||||
/** For future use, no flags defined so far */
|
||||
__u64 flags;
|
||||
/** Number of resets caused by this context so far. */
|
||||
__u32 hangs;
|
||||
/** Reset status since the last call of the ioctl. */
|
||||
__u32 reset_status;
|
||||
} state;
|
||||
};
|
||||
|
||||
union drm_amdgpu_ctx {
|
||||
struct drm_amdgpu_ctx_in in;
|
||||
union drm_amdgpu_ctx_out out;
|
||||
};
|
||||
|
||||
/* vm ioctl */
|
||||
#define AMDGPU_VM_OP_RESERVE_VMID 1
|
||||
#define AMDGPU_VM_OP_UNRESERVE_VMID 2
|
||||
|
||||
struct drm_amdgpu_vm_in {
|
||||
/** AMDGPU_VM_OP_* */
|
||||
__u32 op;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_vm_out {
|
||||
/** For future use, no flags defined so far */
|
||||
__u64 flags;
|
||||
};
|
||||
|
||||
union drm_amdgpu_vm {
|
||||
struct drm_amdgpu_vm_in in;
|
||||
struct drm_amdgpu_vm_out out;
|
||||
};
|
||||
|
||||
/* sched ioctl */
|
||||
#define AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE 1
|
||||
|
||||
struct drm_amdgpu_sched_in {
|
||||
/* AMDGPU_SCHED_OP_* */
|
||||
__u32 op;
|
||||
__u32 fd;
|
||||
__s32 priority;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
union drm_amdgpu_sched {
|
||||
struct drm_amdgpu_sched_in in;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is not a reliable API and you should expect it to fail for any
|
||||
* number of reasons and have fallback path that do not use userptr to
|
||||
* perform any operation.
|
||||
*/
|
||||
#define AMDGPU_GEM_USERPTR_READONLY (1 << 0)
|
||||
#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1)
|
||||
#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2)
|
||||
#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3)
|
||||
|
||||
struct drm_amdgpu_gem_userptr {
|
||||
__u64 addr;
|
||||
__u64 size;
|
||||
/* AMDGPU_GEM_USERPTR_* */
|
||||
__u32 flags;
|
||||
/* Resulting GEM handle */
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
/* SI-CI-VI: */
|
||||
/* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */
|
||||
#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0
|
||||
#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf
|
||||
#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4
|
||||
#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f
|
||||
#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9
|
||||
#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7
|
||||
#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12
|
||||
#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7
|
||||
#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15
|
||||
#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3
|
||||
#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17
|
||||
#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3
|
||||
#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19
|
||||
#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3
|
||||
#define AMDGPU_TILING_NUM_BANKS_SHIFT 21
|
||||
#define AMDGPU_TILING_NUM_BANKS_MASK 0x3
|
||||
|
||||
/* GFX9 and later: */
|
||||
#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0
|
||||
#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f
|
||||
|
||||
/* Set/Get helpers for tiling flags. */
|
||||
#define AMDGPU_TILING_SET(field, value) \
|
||||
(((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
|
||||
#define AMDGPU_TILING_GET(value, field) \
|
||||
(((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK)
|
||||
|
||||
#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1
|
||||
#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2
|
||||
|
||||
/** The same structure is shared for input/output */
|
||||
struct drm_amdgpu_gem_metadata {
|
||||
/** GEM Object handle */
|
||||
__u32 handle;
|
||||
/** Do we want get or set metadata */
|
||||
__u32 op;
|
||||
struct {
|
||||
/** For future use, no flags defined so far */
|
||||
__u64 flags;
|
||||
/** family specific tiling info */
|
||||
__u64 tiling_info;
|
||||
__u32 data_size_bytes;
|
||||
__u32 data[64];
|
||||
} data;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_gem_mmap_in {
|
||||
/** the GEM object handle */
|
||||
__u32 handle;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_gem_mmap_out {
|
||||
/** mmap offset from the vma offset manager */
|
||||
__u64 addr_ptr;
|
||||
};
|
||||
|
||||
union drm_amdgpu_gem_mmap {
|
||||
struct drm_amdgpu_gem_mmap_in in;
|
||||
struct drm_amdgpu_gem_mmap_out out;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_gem_wait_idle_in {
|
||||
/** GEM object handle */
|
||||
__u32 handle;
|
||||
/** For future use, no flags defined so far */
|
||||
__u32 flags;
|
||||
/** Absolute timeout to wait */
|
||||
__u64 timeout;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_gem_wait_idle_out {
|
||||
/** BO status: 0 - BO is idle, 1 - BO is busy */
|
||||
__u32 status;
|
||||
/** Returned current memory domain */
|
||||
__u32 domain;
|
||||
};
|
||||
|
||||
union drm_amdgpu_gem_wait_idle {
|
||||
struct drm_amdgpu_gem_wait_idle_in in;
|
||||
struct drm_amdgpu_gem_wait_idle_out out;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_wait_cs_in {
|
||||
/* Command submission handle
|
||||
* handle equals 0 means none to wait for
|
||||
* handle equals ~0ull means wait for the latest sequence number
|
||||
*/
|
||||
__u64 handle;
|
||||
/** Absolute timeout to wait */
|
||||
__u64 timeout;
|
||||
__u32 ip_type;
|
||||
__u32 ip_instance;
|
||||
__u32 ring;
|
||||
__u32 ctx_id;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_wait_cs_out {
|
||||
/** CS status: 0 - CS completed, 1 - CS still busy */
|
||||
__u64 status;
|
||||
};
|
||||
|
||||
union drm_amdgpu_wait_cs {
|
||||
struct drm_amdgpu_wait_cs_in in;
|
||||
struct drm_amdgpu_wait_cs_out out;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_fence {
|
||||
__u32 ctx_id;
|
||||
__u32 ip_type;
|
||||
__u32 ip_instance;
|
||||
__u32 ring;
|
||||
__u64 seq_no;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_wait_fences_in {
|
||||
/** This points to uint64_t * which points to fences */
|
||||
__u64 fences;
|
||||
__u32 fence_count;
|
||||
__u32 wait_all;
|
||||
__u64 timeout_ns;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_wait_fences_out {
|
||||
__u32 status;
|
||||
__u32 first_signaled;
|
||||
};
|
||||
|
||||
union drm_amdgpu_wait_fences {
|
||||
struct drm_amdgpu_wait_fences_in in;
|
||||
struct drm_amdgpu_wait_fences_out out;
|
||||
};
|
||||
|
||||
#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
|
||||
#define AMDGPU_GEM_OP_SET_PLACEMENT 1
|
||||
|
||||
/* Sets or returns a value associated with a buffer. */
|
||||
struct drm_amdgpu_gem_op {
|
||||
/** GEM object handle */
|
||||
__u32 handle;
|
||||
/** AMDGPU_GEM_OP_* */
|
||||
__u32 op;
|
||||
/** Input or return value */
|
||||
__u64 value;
|
||||
};
|
||||
|
||||
#define AMDGPU_VA_OP_MAP 1
|
||||
#define AMDGPU_VA_OP_UNMAP 2
|
||||
#define AMDGPU_VA_OP_CLEAR 3
|
||||
#define AMDGPU_VA_OP_REPLACE 4
|
||||
|
||||
/* Delay the page table update till the next CS */
|
||||
#define AMDGPU_VM_DELAY_UPDATE (1 << 0)
|
||||
|
||||
/* Mapping flags */
|
||||
/* readable mapping */
|
||||
#define AMDGPU_VM_PAGE_READABLE (1 << 1)
|
||||
/* writable mapping */
|
||||
#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
|
||||
/* executable mapping, new for VI */
|
||||
#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
|
||||
/* partially resident texture */
|
||||
#define AMDGPU_VM_PAGE_PRT (1 << 4)
|
||||
/* MTYPE flags use bit 5 to 8 */
|
||||
#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
|
||||
/* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */
|
||||
#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5)
|
||||
/* Use NC MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_NC (1 << 5)
|
||||
/* Use WC MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_WC (2 << 5)
|
||||
/* Use CC MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_CC (3 << 5)
|
||||
/* Use UC MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_UC (4 << 5)
|
||||
|
||||
struct drm_amdgpu_gem_va {
|
||||
/** GEM object handle */
|
||||
__u32 handle;
|
||||
__u32 _pad;
|
||||
/** AMDGPU_VA_OP_* */
|
||||
__u32 operation;
|
||||
/** AMDGPU_VM_PAGE_* */
|
||||
__u32 flags;
|
||||
/** va address to assign . Must be correctly aligned.*/
|
||||
__u64 va_address;
|
||||
/** Specify offset inside of BO to assign. Must be correctly aligned.*/
|
||||
__u64 offset_in_bo;
|
||||
/** Specify mapping size. Must be correctly aligned. */
|
||||
__u64 map_size;
|
||||
};
|
||||
|
||||
#define AMDGPU_HW_IP_GFX 0
|
||||
#define AMDGPU_HW_IP_COMPUTE 1
|
||||
#define AMDGPU_HW_IP_DMA 2
|
||||
#define AMDGPU_HW_IP_UVD 3
|
||||
#define AMDGPU_HW_IP_VCE 4
|
||||
#define AMDGPU_HW_IP_UVD_ENC 5
|
||||
#define AMDGPU_HW_IP_VCN_DEC 6
|
||||
#define AMDGPU_HW_IP_VCN_ENC 7
|
||||
#define AMDGPU_HW_IP_VCN_JPEG 8
|
||||
#define AMDGPU_HW_IP_NUM 9
|
||||
|
||||
#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
|
||||
|
||||
#define AMDGPU_CHUNK_ID_IB 0x01
|
||||
#define AMDGPU_CHUNK_ID_FENCE 0x02
|
||||
#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03
|
||||
#define AMDGPU_CHUNK_ID_SYNCOBJ_IN 0x04
|
||||
#define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05
|
||||
#define AMDGPU_CHUNK_ID_BO_HANDLES 0x06
|
||||
|
||||
struct drm_amdgpu_cs_chunk {
|
||||
__u32 chunk_id;
|
||||
__u32 length_dw;
|
||||
__u64 chunk_data;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_in {
|
||||
/** Rendering context id */
|
||||
__u32 ctx_id;
|
||||
/** Handle of resource list associated with CS */
|
||||
__u32 bo_list_handle;
|
||||
__u32 num_chunks;
|
||||
__u32 _pad;
|
||||
/** this points to __u64 * which point to cs chunks */
|
||||
__u64 chunks;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_out {
|
||||
__u64 handle;
|
||||
};
|
||||
|
||||
union drm_amdgpu_cs {
|
||||
struct drm_amdgpu_cs_in in;
|
||||
struct drm_amdgpu_cs_out out;
|
||||
};
|
||||
|
||||
/* Specify flags to be used for IB */
|
||||
|
||||
/* This IB should be submitted to CE */
|
||||
#define AMDGPU_IB_FLAG_CE (1<<0)
|
||||
|
||||
/* Preamble flag, which means the IB could be dropped if no context switch */
|
||||
#define AMDGPU_IB_FLAG_PREAMBLE (1<<1)
|
||||
|
||||
/* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */
|
||||
#define AMDGPU_IB_FLAG_PREEMPT (1<<2)
|
||||
|
||||
/* The IB fence should do the L2 writeback but not invalidate any shader
|
||||
* caches (L2/vL1/sL1/I$). */
|
||||
#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3)
|
||||
|
||||
struct drm_amdgpu_cs_chunk_ib {
|
||||
__u32 _pad;
|
||||
/** AMDGPU_IB_FLAG_* */
|
||||
__u32 flags;
|
||||
/** Virtual address to begin IB execution */
|
||||
__u64 va_start;
|
||||
/** Size of submission */
|
||||
__u32 ib_bytes;
|
||||
/** HW IP to submit to */
|
||||
__u32 ip_type;
|
||||
/** HW IP index of the same type to submit to */
|
||||
__u32 ip_instance;
|
||||
/** Ring index to submit to */
|
||||
__u32 ring;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_chunk_dep {
|
||||
__u32 ip_type;
|
||||
__u32 ip_instance;
|
||||
__u32 ring;
|
||||
__u32 ctx_id;
|
||||
__u64 handle;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_chunk_fence {
|
||||
__u32 handle;
|
||||
__u32 offset;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_chunk_sem {
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0
|
||||
#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1
|
||||
#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2
|
||||
|
||||
union drm_amdgpu_fence_to_handle {
|
||||
struct {
|
||||
struct drm_amdgpu_fence fence;
|
||||
__u32 what;
|
||||
__u32 pad;
|
||||
} in;
|
||||
struct {
|
||||
__u32 handle;
|
||||
} out;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_cs_chunk_data {
|
||||
union {
|
||||
struct drm_amdgpu_cs_chunk_ib ib_data;
|
||||
struct drm_amdgpu_cs_chunk_fence fence_data;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU
|
||||
*
|
||||
*/
|
||||
#define AMDGPU_IDS_FLAGS_FUSION 0x1
|
||||
#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
|
||||
|
||||
/* indicate if acceleration can be working */
|
||||
#define AMDGPU_INFO_ACCEL_WORKING 0x00
|
||||
/* get the crtc_id from the mode object id? */
|
||||
#define AMDGPU_INFO_CRTC_FROM_ID 0x01
|
||||
/* query hw IP info */
|
||||
#define AMDGPU_INFO_HW_IP_INFO 0x02
|
||||
/* query hw IP instance count for the specified type */
|
||||
#define AMDGPU_INFO_HW_IP_COUNT 0x03
|
||||
/* timestamp for GL_ARB_timer_query */
|
||||
#define AMDGPU_INFO_TIMESTAMP 0x05
|
||||
/* Query the firmware version */
|
||||
#define AMDGPU_INFO_FW_VERSION 0x0e
|
||||
/* Subquery id: Query VCE firmware version */
|
||||
#define AMDGPU_INFO_FW_VCE 0x1
|
||||
/* Subquery id: Query UVD firmware version */
|
||||
#define AMDGPU_INFO_FW_UVD 0x2
|
||||
/* Subquery id: Query GMC firmware version */
|
||||
#define AMDGPU_INFO_FW_GMC 0x03
|
||||
/* Subquery id: Query GFX ME firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_ME 0x04
|
||||
/* Subquery id: Query GFX PFP firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_PFP 0x05
|
||||
/* Subquery id: Query GFX CE firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_CE 0x06
|
||||
/* Subquery id: Query GFX RLC firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_RLC 0x07
|
||||
/* Subquery id: Query GFX MEC firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_MEC 0x08
|
||||
/* Subquery id: Query SMC firmware version */
|
||||
#define AMDGPU_INFO_FW_SMC 0x0a
|
||||
/* Subquery id: Query SDMA firmware version */
|
||||
#define AMDGPU_INFO_FW_SDMA 0x0b
|
||||
/* Subquery id: Query PSP SOS firmware version */
|
||||
#define AMDGPU_INFO_FW_SOS 0x0c
|
||||
/* Subquery id: Query PSP ASD firmware version */
|
||||
#define AMDGPU_INFO_FW_ASD 0x0d
|
||||
/* Subquery id: Query VCN firmware version */
|
||||
#define AMDGPU_INFO_FW_VCN 0x0e
|
||||
/* Subquery id: Query GFX RLC SRLC firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f
|
||||
/* Subquery id: Query GFX RLC SRLG firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10
|
||||
/* Subquery id: Query GFX RLC SRLS firmware version */
|
||||
#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11
|
||||
/* number of bytes moved for TTM migration */
|
||||
#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
|
||||
/* the used VRAM size */
|
||||
#define AMDGPU_INFO_VRAM_USAGE 0x10
|
||||
/* the used GTT size */
|
||||
#define AMDGPU_INFO_GTT_USAGE 0x11
|
||||
/* Information about GDS, etc. resource configuration */
|
||||
#define AMDGPU_INFO_GDS_CONFIG 0x13
|
||||
/* Query information about VRAM and GTT domains */
|
||||
#define AMDGPU_INFO_VRAM_GTT 0x14
|
||||
/* Query information about register in MMR address space*/
|
||||
#define AMDGPU_INFO_READ_MMR_REG 0x15
|
||||
/* Query information about device: rev id, family, etc. */
|
||||
#define AMDGPU_INFO_DEV_INFO 0x16
|
||||
/* visible vram usage */
|
||||
#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17
|
||||
/* number of TTM buffer evictions */
|
||||
#define AMDGPU_INFO_NUM_EVICTIONS 0x18
|
||||
/* Query memory about VRAM and GTT domains */
|
||||
#define AMDGPU_INFO_MEMORY 0x19
|
||||
/* Query vce clock table */
|
||||
#define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A
|
||||
/* Query vbios related information */
|
||||
#define AMDGPU_INFO_VBIOS 0x1B
|
||||
/* Subquery id: Query vbios size */
|
||||
#define AMDGPU_INFO_VBIOS_SIZE 0x1
|
||||
/* Subquery id: Query vbios image */
|
||||
#define AMDGPU_INFO_VBIOS_IMAGE 0x2
|
||||
/* Query UVD handles */
|
||||
#define AMDGPU_INFO_NUM_HANDLES 0x1C
|
||||
/* Query sensor related information */
|
||||
#define AMDGPU_INFO_SENSOR 0x1D
|
||||
/* Subquery id: Query GPU shader clock */
|
||||
#define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1
|
||||
/* Subquery id: Query GPU memory clock */
|
||||
#define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2
|
||||
/* Subquery id: Query GPU temperature */
|
||||
#define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3
|
||||
/* Subquery id: Query GPU load */
|
||||
#define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4
|
||||
/* Subquery id: Query average GPU power */
|
||||
#define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5
|
||||
/* Subquery id: Query northbridge voltage */
|
||||
#define AMDGPU_INFO_SENSOR_VDDNB 0x6
|
||||
/* Subquery id: Query graphics voltage */
|
||||
#define AMDGPU_INFO_SENSOR_VDDGFX 0x7
|
||||
/* Subquery id: Query GPU stable pstate shader clock */
|
||||
#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8
|
||||
/* Subquery id: Query GPU stable pstate memory clock */
|
||||
#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9
|
||||
/* Number of VRAM page faults on CPU access. */
|
||||
#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E
|
||||
#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F
|
||||
|
||||
#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0
|
||||
#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff
|
||||
#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8
|
||||
#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff
|
||||
|
||||
struct drm_amdgpu_query_fw {
|
||||
/** AMDGPU_INFO_FW_* */
|
||||
__u32 fw_type;
|
||||
/**
|
||||
* Index of the IP if there are more IPs of
|
||||
* the same type.
|
||||
*/
|
||||
__u32 ip_instance;
|
||||
/**
|
||||
* Index of the engine. Whether this is used depends
|
||||
* on the firmware type. (e.g. MEC, SDMA)
|
||||
*/
|
||||
__u32 index;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
/* Input structure for the INFO ioctl */
|
||||
struct drm_amdgpu_info {
|
||||
/* Where the return value will be stored */
|
||||
__u64 return_pointer;
|
||||
/* The size of the return value. Just like "size" in "snprintf",
|
||||
* it limits how many bytes the kernel can write. */
|
||||
__u32 return_size;
|
||||
/* The query request id. */
|
||||
__u32 query;
|
||||
|
||||
union {
|
||||
struct {
|
||||
__u32 id;
|
||||
__u32 _pad;
|
||||
} mode_crtc;
|
||||
|
||||
struct {
|
||||
/** AMDGPU_HW_IP_* */
|
||||
__u32 type;
|
||||
/**
|
||||
* Index of the IP if there are more IPs of the same
|
||||
* type. Ignored by AMDGPU_INFO_HW_IP_COUNT.
|
||||
*/
|
||||
__u32 ip_instance;
|
||||
} query_hw_ip;
|
||||
|
||||
struct {
|
||||
__u32 dword_offset;
|
||||
/** number of registers to read */
|
||||
__u32 count;
|
||||
__u32 instance;
|
||||
/** For future use, no flags defined so far */
|
||||
__u32 flags;
|
||||
} read_mmr_reg;
|
||||
|
||||
struct drm_amdgpu_query_fw query_fw;
|
||||
|
||||
struct {
|
||||
__u32 type;
|
||||
__u32 offset;
|
||||
} vbios_info;
|
||||
|
||||
struct {
|
||||
__u32 type;
|
||||
} sensor_info;
|
||||
};
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_gds {
|
||||
/** GDS GFX partition size */
|
||||
__u32 gds_gfx_partition_size;
|
||||
/** GDS compute partition size */
|
||||
__u32 compute_partition_size;
|
||||
/** total GDS memory size */
|
||||
__u32 gds_total_size;
|
||||
/** GWS size per GFX partition */
|
||||
__u32 gws_per_gfx_partition;
|
||||
/** GSW size per compute partition */
|
||||
__u32 gws_per_compute_partition;
|
||||
/** OA size per GFX partition */
|
||||
__u32 oa_per_gfx_partition;
|
||||
/** OA size per compute partition */
|
||||
__u32 oa_per_compute_partition;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_vram_gtt {
|
||||
__u64 vram_size;
|
||||
__u64 vram_cpu_accessible_size;
|
||||
__u64 gtt_size;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_heap_info {
|
||||
/** max. physical memory */
|
||||
__u64 total_heap_size;
|
||||
|
||||
/** Theoretical max. available memory in the given heap */
|
||||
__u64 usable_heap_size;
|
||||
|
||||
/**
|
||||
* Number of bytes allocated in the heap. This includes all processes
|
||||
* and private allocations in the kernel. It changes when new buffers
|
||||
* are allocated, freed, and moved. It cannot be larger than
|
||||
* heap_size.
|
||||
*/
|
||||
__u64 heap_usage;
|
||||
|
||||
/**
|
||||
* Theoretical possible max. size of buffer which
|
||||
* could be allocated in the given heap
|
||||
*/
|
||||
__u64 max_allocation;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_memory_info {
|
||||
struct drm_amdgpu_heap_info vram;
|
||||
struct drm_amdgpu_heap_info cpu_accessible_vram;
|
||||
struct drm_amdgpu_heap_info gtt;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_firmware {
|
||||
__u32 ver;
|
||||
__u32 feature;
|
||||
};
|
||||
|
||||
#define AMDGPU_VRAM_TYPE_UNKNOWN 0
|
||||
#define AMDGPU_VRAM_TYPE_GDDR1 1
|
||||
#define AMDGPU_VRAM_TYPE_DDR2 2
|
||||
#define AMDGPU_VRAM_TYPE_GDDR3 3
|
||||
#define AMDGPU_VRAM_TYPE_GDDR4 4
|
||||
#define AMDGPU_VRAM_TYPE_GDDR5 5
|
||||
#define AMDGPU_VRAM_TYPE_HBM 6
|
||||
#define AMDGPU_VRAM_TYPE_DDR3 7
|
||||
#define AMDGPU_VRAM_TYPE_DDR4 8
|
||||
|
||||
struct drm_amdgpu_info_device {
|
||||
/** PCI Device ID */
|
||||
__u32 device_id;
|
||||
/** Internal chip revision: A0, A1, etc.) */
|
||||
__u32 chip_rev;
|
||||
__u32 external_rev;
|
||||
/** Revision id in PCI Config space */
|
||||
__u32 pci_rev;
|
||||
__u32 family;
|
||||
__u32 num_shader_engines;
|
||||
__u32 num_shader_arrays_per_engine;
|
||||
/* in KHz */
|
||||
__u32 gpu_counter_freq;
|
||||
__u64 max_engine_clock;
|
||||
__u64 max_memory_clock;
|
||||
/* cu information */
|
||||
__u32 cu_active_number;
|
||||
/* NOTE: cu_ao_mask is INVALID, DON'T use it */
|
||||
__u32 cu_ao_mask;
|
||||
__u32 cu_bitmap[4][4];
|
||||
/** Render backend pipe mask. One render backend is CB+DB. */
|
||||
__u32 enabled_rb_pipes_mask;
|
||||
__u32 num_rb_pipes;
|
||||
__u32 num_hw_gfx_contexts;
|
||||
__u32 _pad;
|
||||
__u64 ids_flags;
|
||||
/** Starting virtual address for UMDs. */
|
||||
__u64 virtual_address_offset;
|
||||
/** The maximum virtual address */
|
||||
__u64 virtual_address_max;
|
||||
/** Required alignment of virtual addresses. */
|
||||
__u32 virtual_address_alignment;
|
||||
/** Page table entry - fragment size */
|
||||
__u32 pte_fragment_size;
|
||||
__u32 gart_page_size;
|
||||
/** constant engine ram size*/
|
||||
__u32 ce_ram_size;
|
||||
/** video memory type info*/
|
||||
__u32 vram_type;
|
||||
/** video memory bit width*/
|
||||
__u32 vram_bit_width;
|
||||
/* vce harvesting instance */
|
||||
__u32 vce_harvest_config;
|
||||
/* gfx double offchip LDS buffers */
|
||||
__u32 gc_double_offchip_lds_buf;
|
||||
/* NGG Primitive Buffer */
|
||||
__u64 prim_buf_gpu_addr;
|
||||
/* NGG Position Buffer */
|
||||
__u64 pos_buf_gpu_addr;
|
||||
/* NGG Control Sideband */
|
||||
__u64 cntl_sb_buf_gpu_addr;
|
||||
/* NGG Parameter Cache */
|
||||
__u64 param_buf_gpu_addr;
|
||||
__u32 prim_buf_size;
|
||||
__u32 pos_buf_size;
|
||||
__u32 cntl_sb_buf_size;
|
||||
__u32 param_buf_size;
|
||||
/* wavefront size*/
|
||||
__u32 wave_front_size;
|
||||
/* shader visible vgprs*/
|
||||
__u32 num_shader_visible_vgprs;
|
||||
/* CU per shader array*/
|
||||
__u32 num_cu_per_sh;
|
||||
/* number of tcc blocks*/
|
||||
__u32 num_tcc_blocks;
|
||||
/* gs vgt table depth*/
|
||||
__u32 gs_vgt_table_depth;
|
||||
/* gs primitive buffer depth*/
|
||||
__u32 gs_prim_buffer_depth;
|
||||
/* max gs wavefront per vgt*/
|
||||
__u32 max_gs_waves_per_vgt;
|
||||
__u32 _pad1;
|
||||
/* always on cu bitmap */
|
||||
__u32 cu_ao_bitmap[4][4];
|
||||
/** Starting high virtual address for UMDs. */
|
||||
__u64 high_va_offset;
|
||||
/** The maximum high virtual address */
|
||||
__u64 high_va_max;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_hw_ip {
|
||||
/** Version of h/w IP */
|
||||
__u32 hw_ip_version_major;
|
||||
__u32 hw_ip_version_minor;
|
||||
/** Capabilities */
|
||||
__u64 capabilities_flags;
|
||||
/** command buffer address start alignment*/
|
||||
__u32 ib_start_alignment;
|
||||
/** command buffer size alignment*/
|
||||
__u32 ib_size_alignment;
|
||||
/** Bitmask of available rings. Bit 0 means ring 0, etc. */
|
||||
__u32 available_rings;
|
||||
__u32 _pad;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_num_handles {
|
||||
/** Max handles as supported by firmware for UVD */
|
||||
__u32 uvd_max_handles;
|
||||
/** Handles currently in use for UVD */
|
||||
__u32 uvd_used_handles;
|
||||
};
|
||||
|
||||
#define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6
|
||||
|
||||
struct drm_amdgpu_info_vce_clock_table_entry {
|
||||
/** System clock */
|
||||
__u32 sclk;
|
||||
/** Memory clock */
|
||||
__u32 mclk;
|
||||
/** VCE clock */
|
||||
__u32 eclk;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_amdgpu_info_vce_clock_table {
|
||||
struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES];
|
||||
__u32 num_valid_entries;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/*
|
||||
* Supported GPU families
|
||||
*/
|
||||
#define AMDGPU_FAMILY_UNKNOWN 0
|
||||
#define AMDGPU_FAMILY_SI 110 /* Hainan, Oland, Verde, Pitcairn, Tahiti */
|
||||
#define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */
|
||||
#define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */
|
||||
#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */
|
||||
#define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */
|
||||
#define AMDGPU_FAMILY_AI 141 /* Vega10 */
|
||||
#define AMDGPU_FAMILY_RV 142 /* Raven */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -1,56 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 Russell King
|
||||
* With inspiration from the i915 driver
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef DRM_ARMADA_IOCTL_H
|
||||
#define DRM_ARMADA_IOCTL_H
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_ARMADA_GEM_CREATE 0x00
|
||||
#define DRM_ARMADA_GEM_MMAP 0x02
|
||||
#define DRM_ARMADA_GEM_PWRITE 0x03
|
||||
|
||||
#define ARMADA_IOCTL(dir, name, str) \
|
||||
DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
|
||||
|
||||
struct drm_armada_gem_create {
|
||||
__u32 handle;
|
||||
__u32 size;
|
||||
};
|
||||
#define DRM_IOCTL_ARMADA_GEM_CREATE \
|
||||
ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create)
|
||||
|
||||
struct drm_armada_gem_mmap {
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
__u64 offset;
|
||||
__u64 size;
|
||||
__u64 addr;
|
||||
};
|
||||
#define DRM_IOCTL_ARMADA_GEM_MMAP \
|
||||
ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap)
|
||||
|
||||
struct drm_armada_gem_pwrite {
|
||||
__u64 ptr;
|
||||
__u32 handle;
|
||||
__u32 offset;
|
||||
__u32 size;
|
||||
};
|
||||
#define DRM_IOCTL_ARMADA_GEM_PWRITE \
|
||||
ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,588 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef DRM_FOURCC_H
|
||||
#define DRM_FOURCC_H
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
|
||||
((__u32)(c) << 16) | ((__u32)(d) << 24))
|
||||
|
||||
#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
|
||||
|
||||
/* color index */
|
||||
#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
|
||||
|
||||
/* 8 bpp Red */
|
||||
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
|
||||
|
||||
/* 16 bpp Red */
|
||||
#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
|
||||
|
||||
/* 16 bpp RG */
|
||||
#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
|
||||
#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
|
||||
|
||||
/* 32 bpp RG */
|
||||
#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */
|
||||
#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */
|
||||
|
||||
/* 8 bpp RGB */
|
||||
#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
|
||||
#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
|
||||
|
||||
/* 16 bpp RGB */
|
||||
#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */
|
||||
|
||||
#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */
|
||||
#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */
|
||||
|
||||
#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */
|
||||
#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */
|
||||
#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */
|
||||
#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */
|
||||
|
||||
#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */
|
||||
#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */
|
||||
#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */
|
||||
#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */
|
||||
|
||||
#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */
|
||||
#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */
|
||||
|
||||
/* 24 bpp RGB */
|
||||
#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */
|
||||
#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */
|
||||
|
||||
/* 32 bpp RGB */
|
||||
#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */
|
||||
|
||||
#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */
|
||||
|
||||
#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */
|
||||
#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */
|
||||
#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */
|
||||
#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */
|
||||
|
||||
#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */
|
||||
#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */
|
||||
#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */
|
||||
#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */
|
||||
|
||||
/* packed YCbCr */
|
||||
#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
|
||||
|
||||
#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
|
||||
|
||||
/*
|
||||
* 2 plane RGB + A
|
||||
* index 0 = RGB plane, same format as the corresponding non _A8 format has
|
||||
* index 1 = A plane, [7:0] A
|
||||
*/
|
||||
#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8')
|
||||
#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8')
|
||||
#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8')
|
||||
#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8')
|
||||
#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8')
|
||||
#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8')
|
||||
#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8')
|
||||
#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8')
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr
|
||||
* index 0 = Y plane, [7:0] Y
|
||||
* index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian
|
||||
* or
|
||||
* index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian
|
||||
*/
|
||||
#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */
|
||||
#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
|
||||
#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr
|
||||
* index 0: Y plane, [7:0] Y
|
||||
* index 1: Cb plane, [7:0] Cb
|
||||
* index 2: Cr plane, [7:0] Cr
|
||||
* or
|
||||
* index 1: Cr plane, [7:0] Cr
|
||||
* index 2: Cb plane, [7:0] Cb
|
||||
*/
|
||||
#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */
|
||||
#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */
|
||||
#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */
|
||||
#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */
|
||||
#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
|
||||
|
||||
|
||||
/*
|
||||
* Format Modifiers:
|
||||
*
|
||||
* Format modifiers describe, typically, a re-ordering or modification
|
||||
* of the data in a plane of an FB. This can be used to express tiled/
|
||||
* swizzled formats, or compression, or a combination of the two.
|
||||
*
|
||||
* The upper 8 bits of the format modifier are a vendor-id as assigned
|
||||
* below. The lower 56 bits are assigned as vendor sees fit.
|
||||
*/
|
||||
|
||||
/* Vendor Ids: */
|
||||
#define DRM_FORMAT_MOD_NONE 0
|
||||
#define DRM_FORMAT_MOD_VENDOR_NONE 0
|
||||
#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
|
||||
#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
|
||||
#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03
|
||||
#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04
|
||||
#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05
|
||||
#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06
|
||||
#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
|
||||
#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
|
||||
/* add more to the end as needed */
|
||||
|
||||
#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)
|
||||
|
||||
#define fourcc_mod_code(vendor, val) \
|
||||
((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
|
||||
|
||||
/*
|
||||
* Format Modifier tokens:
|
||||
*
|
||||
* When adding a new token please document the layout with a code comment,
|
||||
* similar to the fourcc codes above. drm_fourcc.h is considered the
|
||||
* authoritative source for all of these.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Invalid Modifier
|
||||
*
|
||||
* This modifier can be used as a sentinel to terminate the format modifiers
|
||||
* list, or to initialize a variable with an invalid modifier. It might also be
|
||||
* used to report an error back to userspace for certain APIs.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)
|
||||
|
||||
/*
|
||||
* Linear Layout
|
||||
*
|
||||
* Just plain linear layout. Note that this is different from no specifying any
|
||||
* modifier (e.g. not setting DRM_MODE_FB_MODIFIERS in the DRM_ADDFB2 ioctl),
|
||||
* which tells the driver to also take driver-internal information into account
|
||||
* and so might actually result in a tiled framebuffer.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)
|
||||
|
||||
/* Intel framebuffer modifiers */
|
||||
|
||||
/*
|
||||
* Intel X-tiling layout
|
||||
*
|
||||
* This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
|
||||
* in row-major layout. Within the tile bytes are laid out row-major, with
|
||||
* a platform-dependent stride. On top of that the memory can apply
|
||||
* platform-depending swizzling of some higher address bits into bit6.
|
||||
*
|
||||
* This format is highly platforms specific and not useful for cross-driver
|
||||
* sharing. It exists since on a given platform it does uniquely identify the
|
||||
* layout in a simple way for i915-specific userspace.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1)
|
||||
|
||||
/*
|
||||
* Intel Y-tiling layout
|
||||
*
|
||||
* This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
|
||||
* in row-major layout. Within the tile bytes are laid out in OWORD (16 bytes)
|
||||
* chunks column-major, with a platform-dependent height. On top of that the
|
||||
* memory can apply platform-depending swizzling of some higher address bits
|
||||
* into bit6.
|
||||
*
|
||||
* This format is highly platforms specific and not useful for cross-driver
|
||||
* sharing. It exists since on a given platform it does uniquely identify the
|
||||
* layout in a simple way for i915-specific userspace.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2)
|
||||
|
||||
/*
|
||||
* Intel Yf-tiling layout
|
||||
*
|
||||
* This is a tiled layout using 4Kb tiles in row-major layout.
|
||||
* Within the tile pixels are laid out in 16 256 byte units / sub-tiles which
|
||||
* are arranged in four groups (two wide, two high) with column-major layout.
|
||||
* Each group therefore consits out of four 256 byte units, which are also laid
|
||||
* out as 2x2 column-major.
|
||||
* 256 byte units are made out of four 64 byte blocks of pixels, producing
|
||||
* either a square block or a 2:1 unit.
|
||||
* 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width
|
||||
* in pixel depends on the pixel depth.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3)
|
||||
|
||||
/*
|
||||
* Intel color control surface (CCS) for render compression
|
||||
*
|
||||
* The framebuffer format must be one of the 8:8:8:8 RGB formats.
|
||||
* The main surface will be plane index 0 and must be Y/Yf-tiled,
|
||||
* the CCS will be plane index 1.
|
||||
*
|
||||
* Each CCS tile matches a 1024x512 pixel area of the main surface.
|
||||
* To match certain aspects of the 3D hardware the CCS is
|
||||
* considered to be made up of normal 128Bx32 Y tiles, Thus
|
||||
* the CCS pitch must be specified in multiples of 128 bytes.
|
||||
*
|
||||
* In reality the CCS tile appears to be a 64Bx64 Y tile, composed
|
||||
* of QWORD (8 bytes) chunks instead of OWORD (16 bytes) chunks.
|
||||
* But that fact is not relevant unless the memory is accessed
|
||||
* directly.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4)
|
||||
#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5)
|
||||
|
||||
/*
|
||||
* Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
|
||||
*
|
||||
* Macroblocks are laid in a Z-shape, and each pixel data is following the
|
||||
* standard NV12 style.
|
||||
* As for NV12, an image is the result of two frame buffers: one for Y,
|
||||
* one for the interleaved Cb/Cr components (1/2 the height of the Y buffer).
|
||||
* Alignment requirements are (for each buffer):
|
||||
* - multiple of 128 pixels for the width
|
||||
* - multiple of 32 pixels for the height
|
||||
*
|
||||
* For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
|
||||
|
||||
/*
|
||||
* Qualcomm Compressed Format
|
||||
*
|
||||
* Refers to a compressed variant of the base format that is compressed.
|
||||
* Implementation may be platform and base-format specific.
|
||||
*
|
||||
* Each macrotile consists of m x n (mostly 4 x 4) tiles.
|
||||
* Pixel data pitch/stride is aligned with macrotile width.
|
||||
* Pixel data height is aligned with macrotile height.
|
||||
* Entire pixel data buffer is aligned with 4k(bytes).
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
|
||||
|
||||
/* Vivante framebuffer modifiers */
|
||||
|
||||
/*
|
||||
* Vivante 4x4 tiling layout
|
||||
*
|
||||
* This is a simple tiled layout using tiles of 4x4 pixels in a row-major
|
||||
* layout.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1)
|
||||
|
||||
/*
|
||||
* Vivante 64x64 super-tiling layout
|
||||
*
|
||||
* This is a tiled layout using 64x64 pixel super-tiles, where each super-tile
|
||||
* contains 8x4 groups of 2x4 tiles of 4x4 pixels (like above) each, all in row-
|
||||
* major layout.
|
||||
*
|
||||
* For more information: see
|
||||
* https://github.com/etnaviv/etna_viv/blob/master/doc/hardware.md#texture-tiling
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2)
|
||||
|
||||
/*
|
||||
* Vivante 4x4 tiling layout for dual-pipe
|
||||
*
|
||||
* Same as the 4x4 tiling layout, except every second 4x4 pixel tile starts at a
|
||||
* different base address. Offsets from the base addresses are therefore halved
|
||||
* compared to the non-split tiled layout.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3)
|
||||
|
||||
/*
|
||||
* Vivante 64x64 super-tiling layout for dual-pipe
|
||||
*
|
||||
* Same as the 64x64 super-tiling layout, except every second 4x4 pixel tile
|
||||
* starts at a different base address. Offsets from the base addresses are
|
||||
* therefore halved compared to the non-split super-tiled layout.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
|
||||
|
||||
/* NVIDIA frame buffer modifiers */
|
||||
|
||||
/*
|
||||
* Tegra Tiled Layout, used by Tegra 2, 3 and 4.
|
||||
*
|
||||
* Pixels are arranged in simple tiles of 16 x 16 bytes.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1)
|
||||
|
||||
/*
|
||||
* 16Bx2 Block Linear layout, used by desktop GPUs, and Tegra K1 and later
|
||||
*
|
||||
* Pixels are arranged in 64x8 Groups Of Bytes (GOBs). GOBs are then stacked
|
||||
* vertically by a power of 2 (1 to 32 GOBs) to form a block.
|
||||
*
|
||||
* Within a GOB, data is ordered as 16B x 2 lines sectors laid in Z-shape.
|
||||
*
|
||||
* Parameter 'v' is the log2 encoding of the number of GOBs stacked vertically.
|
||||
* Valid values are:
|
||||
*
|
||||
* 0 == ONE_GOB
|
||||
* 1 == TWO_GOBS
|
||||
* 2 == FOUR_GOBS
|
||||
* 3 == EIGHT_GOBS
|
||||
* 4 == SIXTEEN_GOBS
|
||||
* 5 == THIRTYTWO_GOBS
|
||||
*
|
||||
* Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format
|
||||
* in full detail.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \
|
||||
fourcc_mod_code(NVIDIA, 0x10 | ((v) & 0xf))
|
||||
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x10)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x11)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x12)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x13)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x14)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x15)
|
||||
|
||||
/*
|
||||
* Some Broadcom modifiers take parameters, for example the number of
|
||||
* vertical lines in the image. Reserve the lower 32 bits for modifier
|
||||
* type, and the next 24 bits for parameters. Top 8 bits are the
|
||||
* vendor code.
|
||||
*/
|
||||
#define __fourcc_mod_broadcom_param_shift 8
|
||||
#define __fourcc_mod_broadcom_param_bits 48
|
||||
#define fourcc_mod_broadcom_code(val, params) \
|
||||
fourcc_mod_code(BROADCOM, ((((__u64)params) << __fourcc_mod_broadcom_param_shift) | val))
|
||||
#define fourcc_mod_broadcom_param(m) \
|
||||
((int)(((m) >> __fourcc_mod_broadcom_param_shift) & \
|
||||
((1ULL << __fourcc_mod_broadcom_param_bits) - 1)))
|
||||
#define fourcc_mod_broadcom_mod(m) \
|
||||
((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << \
|
||||
__fourcc_mod_broadcom_param_shift))
|
||||
|
||||
/*
|
||||
* Broadcom VC4 "T" format
|
||||
*
|
||||
* This is the primary layout that the V3D GPU can texture from (it
|
||||
* can't do linear). The T format has:
|
||||
*
|
||||
* - 64b utiles of pixels in a raster-order grid according to cpp. It's 4x4
|
||||
* pixels at 32 bit depth.
|
||||
*
|
||||
* - 1k subtiles made of a 4x4 raster-order grid of 64b utiles (so usually
|
||||
* 16x16 pixels).
|
||||
*
|
||||
* - 4k tiles made of a 2x2 grid of 1k subtiles (so usually 32x32 pixels). On
|
||||
* even 4k tile rows, they're arranged as (BL, TL, TR, BR), and on odd rows
|
||||
* they're (TR, BR, BL, TL), where bottom left is start of memory.
|
||||
*
|
||||
* - an image made of 4k tiles in rows either left-to-right (even rows of 4k
|
||||
* tiles) or right-to-left (odd rows of 4k tiles).
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1)
|
||||
|
||||
/*
|
||||
* Broadcom SAND format
|
||||
*
|
||||
* This is the native format that the H.264 codec block uses. For VC4
|
||||
* HVS, it is only valid for H.264 (NV12/21) and RGBA modes.
|
||||
*
|
||||
* The image can be considered to be split into columns, and the
|
||||
* columns are placed consecutively into memory. The width of those
|
||||
* columns can be either 32, 64, 128, or 256 pixels, but in practice
|
||||
* only 128 pixel columns are used.
|
||||
*
|
||||
* The pitch between the start of each column is set to optimally
|
||||
* switch between SDRAM banks. This is passed as the number of lines
|
||||
* of column width in the modifier (we can't use the stride value due
|
||||
* to various core checks that look at it , so you should set the
|
||||
* stride to width*cpp).
|
||||
*
|
||||
* Note that the column height for this format modifier is the same
|
||||
* for all of the planes, assuming that each column contains both Y
|
||||
* and UV. Some SAND-using hardware stores UV in a separate tiled
|
||||
* image from Y to reduce the column height, which is not supported
|
||||
* with these modifiers.
|
||||
*/
|
||||
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \
|
||||
fourcc_mod_broadcom_code(2, v)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) \
|
||||
fourcc_mod_broadcom_code(3, v)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) \
|
||||
fourcc_mod_broadcom_code(4, v)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) \
|
||||
fourcc_mod_broadcom_code(5, v)
|
||||
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND32 \
|
||||
DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND64 \
|
||||
DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND128 \
|
||||
DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0)
|
||||
#define DRM_FORMAT_MOD_BROADCOM_SAND256 \
|
||||
DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0)
|
||||
|
||||
/* Broadcom UIF format
|
||||
*
|
||||
* This is the common format for the current Broadcom multimedia
|
||||
* blocks, including V3D 3.x and newer, newer video codecs, and
|
||||
* displays.
|
||||
*
|
||||
* The image consists of utiles (64b blocks), UIF blocks (2x2 utiles),
|
||||
* and macroblocks (4x4 UIF blocks). Those 4x4 UIF block groups are
|
||||
* stored in columns, with padding between the columns to ensure that
|
||||
* moving from one column to the next doesn't hit the same SDRAM page
|
||||
* bank.
|
||||
*
|
||||
* To calculate the padding, it is assumed that each hardware block
|
||||
* and the software driving it knows the platform's SDRAM page size,
|
||||
* number of banks, and XOR address, and that it's identical between
|
||||
* all blocks using the format. This tiling modifier will use XOR as
|
||||
* necessary to reduce the padding. If a hardware block can't do XOR,
|
||||
* the assumption is that a no-XOR tiling modifier will be created.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6)
|
||||
|
||||
/*
|
||||
* Arm Framebuffer Compression (AFBC) modifiers
|
||||
*
|
||||
* AFBC is a proprietary lossless image compression protocol and format.
|
||||
* It provides fine-grained random access and minimizes the amount of data
|
||||
* transferred between IP blocks.
|
||||
*
|
||||
* AFBC has several features which may be supported and/or used, which are
|
||||
* represented using bits in the modifier. Not all combinations are valid,
|
||||
* and different devices or use-cases may support different combinations.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode)
|
||||
|
||||
/*
|
||||
* AFBC superblock size
|
||||
*
|
||||
* Indicates the superblock size(s) used for the AFBC buffer. The buffer
|
||||
* size (in pixels) must be aligned to a multiple of the superblock size.
|
||||
* Four lowest significant bits(LSBs) are reserved for block size.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf
|
||||
#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL)
|
||||
#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL)
|
||||
|
||||
/*
|
||||
* AFBC lossless colorspace transform
|
||||
*
|
||||
* Indicates that the buffer makes use of the AFBC lossless colorspace
|
||||
* transform.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_YTR (1ULL << 4)
|
||||
|
||||
/*
|
||||
* AFBC block-split
|
||||
*
|
||||
* Indicates that the payload of each superblock is split. The second
|
||||
* half of the payload is positioned at a predefined offset from the start
|
||||
* of the superblock payload.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5)
|
||||
|
||||
/*
|
||||
* AFBC sparse layout
|
||||
*
|
||||
* This flag indicates that the payload of each superblock must be stored at a
|
||||
* predefined position relative to the other superblocks in the same AFBC
|
||||
* buffer. This order is the same order used by the header buffer. In this mode
|
||||
* each superblock is given the same amount of space as an uncompressed
|
||||
* superblock of the particular format would require, rounding up to the next
|
||||
* multiple of 128 bytes in size.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6)
|
||||
|
||||
/*
|
||||
* AFBC copy-block restrict
|
||||
*
|
||||
* Buffers with this flag must obey the copy-block restriction. The restriction
|
||||
* is such that there are no copy-blocks referring across the border of 8x8
|
||||
* blocks. For the subsampled data the 8x8 limitation is also subsampled.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_CBR (1ULL << 7)
|
||||
|
||||
/*
|
||||
* AFBC tiled layout
|
||||
*
|
||||
* The tiled layout groups superblocks in 8x8 or 4x4 tiles, where all
|
||||
* superblocks inside a tile are stored together in memory. 8x8 tiles are used
|
||||
* for pixel formats up to and including 32 bpp while 4x4 tiles are used for
|
||||
* larger bpp formats. The order between the tiles is scan line.
|
||||
* When the tiled layout is used, the buffer size (in pixels) must be aligned
|
||||
* to the tile size.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_TILED (1ULL << 8)
|
||||
|
||||
/*
|
||||
* AFBC solid color blocks
|
||||
*
|
||||
* Indicates that the buffer makes use of solid-color blocks, whereby bandwidth
|
||||
* can be reduced if a whole superblock is a single color.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_SC (1ULL << 9)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DRM_FOURCC_H */
|
||||
@ -1,894 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
|
||||
* Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
|
||||
* Copyright (c) 2008 Red Hat Inc.
|
||||
* Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
|
||||
* Copyright (c) 2007-2008 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_MODE_H
|
||||
#define _DRM_MODE_H
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_DISPLAY_INFO_LEN 32
|
||||
#define DRM_CONNECTOR_NAME_LEN 32
|
||||
#define DRM_DISPLAY_MODE_LEN 32
|
||||
#define DRM_PROP_NAME_LEN 32
|
||||
|
||||
#define DRM_MODE_TYPE_BUILTIN (1<<0) /* deprecated */
|
||||
#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
|
||||
#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
|
||||
#define DRM_MODE_TYPE_PREFERRED (1<<3)
|
||||
#define DRM_MODE_TYPE_DEFAULT (1<<4) /* deprecated */
|
||||
#define DRM_MODE_TYPE_USERDEF (1<<5)
|
||||
#define DRM_MODE_TYPE_DRIVER (1<<6)
|
||||
|
||||
#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | \
|
||||
DRM_MODE_TYPE_USERDEF | \
|
||||
DRM_MODE_TYPE_DRIVER)
|
||||
|
||||
/* Video mode flags */
|
||||
/* bit compatible with the xrandr RR_ definitions (bits 0-13)
|
||||
*
|
||||
* ABI warning: Existing userspace really expects
|
||||
* the mode flags to match the xrandr definitions. Any
|
||||
* changes that don't match the xrandr definitions will
|
||||
* likely need a new client cap or some other mechanism
|
||||
* to avoid breaking existing userspace. This includes
|
||||
* allocating new flags in the previously unused bits!
|
||||
*/
|
||||
#define DRM_MODE_FLAG_PHSYNC (1<<0)
|
||||
#define DRM_MODE_FLAG_NHSYNC (1<<1)
|
||||
#define DRM_MODE_FLAG_PVSYNC (1<<2)
|
||||
#define DRM_MODE_FLAG_NVSYNC (1<<3)
|
||||
#define DRM_MODE_FLAG_INTERLACE (1<<4)
|
||||
#define DRM_MODE_FLAG_DBLSCAN (1<<5)
|
||||
#define DRM_MODE_FLAG_CSYNC (1<<6)
|
||||
#define DRM_MODE_FLAG_PCSYNC (1<<7)
|
||||
#define DRM_MODE_FLAG_NCSYNC (1<<8)
|
||||
#define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */
|
||||
#define DRM_MODE_FLAG_BCAST (1<<10) /* deprecated */
|
||||
#define DRM_MODE_FLAG_PIXMUX (1<<11) /* deprecated */
|
||||
#define DRM_MODE_FLAG_DBLCLK (1<<12)
|
||||
#define DRM_MODE_FLAG_CLKDIV2 (1<<13)
|
||||
/*
|
||||
* When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX
|
||||
* (define not exposed to user space).
|
||||
*/
|
||||
#define DRM_MODE_FLAG_3D_MASK (0x1f<<14)
|
||||
#define DRM_MODE_FLAG_3D_NONE (0<<14)
|
||||
#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14)
|
||||
#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14)
|
||||
#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14)
|
||||
#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14)
|
||||
#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14)
|
||||
#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14)
|
||||
#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
|
||||
#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
|
||||
|
||||
/* Picture aspect ratio options */
|
||||
#define DRM_MODE_PICTURE_ASPECT_NONE 0
|
||||
#define DRM_MODE_PICTURE_ASPECT_4_3 1
|
||||
#define DRM_MODE_PICTURE_ASPECT_16_9 2
|
||||
#define DRM_MODE_PICTURE_ASPECT_64_27 3
|
||||
#define DRM_MODE_PICTURE_ASPECT_256_135 4
|
||||
|
||||
/* Content type options */
|
||||
#define DRM_MODE_CONTENT_TYPE_NO_DATA 0
|
||||
#define DRM_MODE_CONTENT_TYPE_GRAPHICS 1
|
||||
#define DRM_MODE_CONTENT_TYPE_PHOTO 2
|
||||
#define DRM_MODE_CONTENT_TYPE_CINEMA 3
|
||||
#define DRM_MODE_CONTENT_TYPE_GAME 4
|
||||
|
||||
/* Aspect ratio flag bitmask (4 bits 22:19) */
|
||||
#define DRM_MODE_FLAG_PIC_AR_MASK (0x0F<<19)
|
||||
#define DRM_MODE_FLAG_PIC_AR_NONE \
|
||||
(DRM_MODE_PICTURE_ASPECT_NONE<<19)
|
||||
#define DRM_MODE_FLAG_PIC_AR_4_3 \
|
||||
(DRM_MODE_PICTURE_ASPECT_4_3<<19)
|
||||
#define DRM_MODE_FLAG_PIC_AR_16_9 \
|
||||
(DRM_MODE_PICTURE_ASPECT_16_9<<19)
|
||||
#define DRM_MODE_FLAG_PIC_AR_64_27 \
|
||||
(DRM_MODE_PICTURE_ASPECT_64_27<<19)
|
||||
#define DRM_MODE_FLAG_PIC_AR_256_135 \
|
||||
(DRM_MODE_PICTURE_ASPECT_256_135<<19)
|
||||
|
||||
#define DRM_MODE_FLAG_ALL (DRM_MODE_FLAG_PHSYNC | \
|
||||
DRM_MODE_FLAG_NHSYNC | \
|
||||
DRM_MODE_FLAG_PVSYNC | \
|
||||
DRM_MODE_FLAG_NVSYNC | \
|
||||
DRM_MODE_FLAG_INTERLACE | \
|
||||
DRM_MODE_FLAG_DBLSCAN | \
|
||||
DRM_MODE_FLAG_CSYNC | \
|
||||
DRM_MODE_FLAG_PCSYNC | \
|
||||
DRM_MODE_FLAG_NCSYNC | \
|
||||
DRM_MODE_FLAG_HSKEW | \
|
||||
DRM_MODE_FLAG_DBLCLK | \
|
||||
DRM_MODE_FLAG_CLKDIV2 | \
|
||||
DRM_MODE_FLAG_3D_MASK)
|
||||
|
||||
/* DPMS flags */
|
||||
/* bit compatible with the xorg definitions. */
|
||||
#define DRM_MODE_DPMS_ON 0
|
||||
#define DRM_MODE_DPMS_STANDBY 1
|
||||
#define DRM_MODE_DPMS_SUSPEND 2
|
||||
#define DRM_MODE_DPMS_OFF 3
|
||||
|
||||
/* Scaling mode options */
|
||||
#define DRM_MODE_SCALE_NONE 0 /* Unmodified timing (display or
|
||||
software can still scale) */
|
||||
#define DRM_MODE_SCALE_FULLSCREEN 1 /* Full screen, ignore aspect */
|
||||
#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
|
||||
#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
|
||||
|
||||
/* Dithering mode options */
|
||||
#define DRM_MODE_DITHERING_OFF 0
|
||||
#define DRM_MODE_DITHERING_ON 1
|
||||
#define DRM_MODE_DITHERING_AUTO 2
|
||||
|
||||
/* Dirty info options */
|
||||
#define DRM_MODE_DIRTY_OFF 0
|
||||
#define DRM_MODE_DIRTY_ON 1
|
||||
#define DRM_MODE_DIRTY_ANNOTATE 2
|
||||
|
||||
/* Link Status options */
|
||||
#define DRM_MODE_LINK_STATUS_GOOD 0
|
||||
#define DRM_MODE_LINK_STATUS_BAD 1
|
||||
|
||||
/*
|
||||
* DRM_MODE_ROTATE_<degrees>
|
||||
*
|
||||
* Signals that a drm plane is been rotated <degrees> degrees in counter
|
||||
* clockwise direction.
|
||||
*
|
||||
* This define is provided as a convenience, looking up the property id
|
||||
* using the name->prop id lookup is the preferred method.
|
||||
*/
|
||||
#define DRM_MODE_ROTATE_0 (1<<0)
|
||||
#define DRM_MODE_ROTATE_90 (1<<1)
|
||||
#define DRM_MODE_ROTATE_180 (1<<2)
|
||||
#define DRM_MODE_ROTATE_270 (1<<3)
|
||||
|
||||
/*
|
||||
* DRM_MODE_ROTATE_MASK
|
||||
*
|
||||
* Bitmask used to look for drm plane rotations.
|
||||
*/
|
||||
#define DRM_MODE_ROTATE_MASK (\
|
||||
DRM_MODE_ROTATE_0 | \
|
||||
DRM_MODE_ROTATE_90 | \
|
||||
DRM_MODE_ROTATE_180 | \
|
||||
DRM_MODE_ROTATE_270)
|
||||
|
||||
/*
|
||||
* DRM_MODE_REFLECT_<axis>
|
||||
*
|
||||
* Signals that the contents of a drm plane is reflected in the <axis> axis,
|
||||
* in the same way as mirroring.
|
||||
*
|
||||
* This define is provided as a convenience, looking up the property id
|
||||
* using the name->prop id lookup is the preferred method.
|
||||
*/
|
||||
#define DRM_MODE_REFLECT_X (1<<4)
|
||||
#define DRM_MODE_REFLECT_Y (1<<5)
|
||||
|
||||
/*
|
||||
* DRM_MODE_REFLECT_MASK
|
||||
*
|
||||
* Bitmask used to look for drm plane reflections.
|
||||
*/
|
||||
#define DRM_MODE_REFLECT_MASK (\
|
||||
DRM_MODE_REFLECT_X | \
|
||||
DRM_MODE_REFLECT_Y)
|
||||
|
||||
/* Content Protection Flags */
|
||||
#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0
|
||||
#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1
|
||||
#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2
|
||||
|
||||
struct drm_mode_modeinfo {
|
||||
__u32 clock;
|
||||
__u16 hdisplay;
|
||||
__u16 hsync_start;
|
||||
__u16 hsync_end;
|
||||
__u16 htotal;
|
||||
__u16 hskew;
|
||||
__u16 vdisplay;
|
||||
__u16 vsync_start;
|
||||
__u16 vsync_end;
|
||||
__u16 vtotal;
|
||||
__u16 vscan;
|
||||
|
||||
__u32 vrefresh;
|
||||
|
||||
__u32 flags;
|
||||
__u32 type;
|
||||
char name[DRM_DISPLAY_MODE_LEN];
|
||||
};
|
||||
|
||||
struct drm_mode_card_res {
|
||||
__u64 fb_id_ptr;
|
||||
__u64 crtc_id_ptr;
|
||||
__u64 connector_id_ptr;
|
||||
__u64 encoder_id_ptr;
|
||||
__u32 count_fbs;
|
||||
__u32 count_crtcs;
|
||||
__u32 count_connectors;
|
||||
__u32 count_encoders;
|
||||
__u32 min_width;
|
||||
__u32 max_width;
|
||||
__u32 min_height;
|
||||
__u32 max_height;
|
||||
};
|
||||
|
||||
struct drm_mode_crtc {
|
||||
__u64 set_connectors_ptr;
|
||||
__u32 count_connectors;
|
||||
|
||||
__u32 crtc_id; /**< Id */
|
||||
__u32 fb_id; /**< Id of framebuffer */
|
||||
|
||||
__u32 x; /**< x Position on the framebuffer */
|
||||
__u32 y; /**< y Position on the framebuffer */
|
||||
|
||||
__u32 gamma_size;
|
||||
__u32 mode_valid;
|
||||
struct drm_mode_modeinfo mode;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PRESENT_TOP_FIELD (1<<0)
|
||||
#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1)
|
||||
|
||||
/* Planes blend with or override other bits on the CRTC */
|
||||
struct drm_mode_set_plane {
|
||||
__u32 plane_id;
|
||||
__u32 crtc_id;
|
||||
__u32 fb_id; /* fb object contains surface format type */
|
||||
__u32 flags; /* see above flags */
|
||||
|
||||
/* Signed dest location allows it to be partially off screen */
|
||||
__s32 crtc_x;
|
||||
__s32 crtc_y;
|
||||
__u32 crtc_w;
|
||||
__u32 crtc_h;
|
||||
|
||||
/* Source values are 16.16 fixed point */
|
||||
__u32 src_x;
|
||||
__u32 src_y;
|
||||
__u32 src_h;
|
||||
__u32 src_w;
|
||||
};
|
||||
|
||||
struct drm_mode_get_plane {
|
||||
__u32 plane_id;
|
||||
|
||||
__u32 crtc_id;
|
||||
__u32 fb_id;
|
||||
|
||||
__u32 possible_crtcs;
|
||||
__u32 gamma_size;
|
||||
|
||||
__u32 count_format_types;
|
||||
__u64 format_type_ptr;
|
||||
};
|
||||
|
||||
struct drm_mode_get_plane_res {
|
||||
__u64 plane_id_ptr;
|
||||
__u32 count_planes;
|
||||
};
|
||||
|
||||
#define DRM_MODE_ENCODER_NONE 0
|
||||
#define DRM_MODE_ENCODER_DAC 1
|
||||
#define DRM_MODE_ENCODER_TMDS 2
|
||||
#define DRM_MODE_ENCODER_LVDS 3
|
||||
#define DRM_MODE_ENCODER_TVDAC 4
|
||||
#define DRM_MODE_ENCODER_VIRTUAL 5
|
||||
#define DRM_MODE_ENCODER_DSI 6
|
||||
#define DRM_MODE_ENCODER_DPMST 7
|
||||
#define DRM_MODE_ENCODER_DPI 8
|
||||
|
||||
struct drm_mode_get_encoder {
|
||||
__u32 encoder_id;
|
||||
__u32 encoder_type;
|
||||
|
||||
__u32 crtc_id; /**< Id of crtc */
|
||||
|
||||
__u32 possible_crtcs;
|
||||
__u32 possible_clones;
|
||||
};
|
||||
|
||||
/* This is for connectors with multiple signal types. */
|
||||
/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
|
||||
enum drm_mode_subconnector {
|
||||
DRM_MODE_SUBCONNECTOR_Automatic = 0,
|
||||
DRM_MODE_SUBCONNECTOR_Unknown = 0,
|
||||
DRM_MODE_SUBCONNECTOR_DVID = 3,
|
||||
DRM_MODE_SUBCONNECTOR_DVIA = 4,
|
||||
DRM_MODE_SUBCONNECTOR_Composite = 5,
|
||||
DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
|
||||
DRM_MODE_SUBCONNECTOR_Component = 8,
|
||||
DRM_MODE_SUBCONNECTOR_SCART = 9,
|
||||
};
|
||||
|
||||
#define DRM_MODE_CONNECTOR_Unknown 0
|
||||
#define DRM_MODE_CONNECTOR_VGA 1
|
||||
#define DRM_MODE_CONNECTOR_DVII 2
|
||||
#define DRM_MODE_CONNECTOR_DVID 3
|
||||
#define DRM_MODE_CONNECTOR_DVIA 4
|
||||
#define DRM_MODE_CONNECTOR_Composite 5
|
||||
#define DRM_MODE_CONNECTOR_SVIDEO 6
|
||||
#define DRM_MODE_CONNECTOR_LVDS 7
|
||||
#define DRM_MODE_CONNECTOR_Component 8
|
||||
#define DRM_MODE_CONNECTOR_9PinDIN 9
|
||||
#define DRM_MODE_CONNECTOR_DisplayPort 10
|
||||
#define DRM_MODE_CONNECTOR_HDMIA 11
|
||||
#define DRM_MODE_CONNECTOR_HDMIB 12
|
||||
#define DRM_MODE_CONNECTOR_TV 13
|
||||
#define DRM_MODE_CONNECTOR_eDP 14
|
||||
#define DRM_MODE_CONNECTOR_VIRTUAL 15
|
||||
#define DRM_MODE_CONNECTOR_DSI 16
|
||||
#define DRM_MODE_CONNECTOR_DPI 17
|
||||
#define DRM_MODE_CONNECTOR_WRITEBACK 18
|
||||
|
||||
struct drm_mode_get_connector {
|
||||
|
||||
__u64 encoders_ptr;
|
||||
__u64 modes_ptr;
|
||||
__u64 props_ptr;
|
||||
__u64 prop_values_ptr;
|
||||
|
||||
__u32 count_modes;
|
||||
__u32 count_props;
|
||||
__u32 count_encoders;
|
||||
|
||||
__u32 encoder_id; /**< Current Encoder */
|
||||
__u32 connector_id; /**< Id */
|
||||
__u32 connector_type;
|
||||
__u32 connector_type_id;
|
||||
|
||||
__u32 connection;
|
||||
__u32 mm_width; /**< width in millimeters */
|
||||
__u32 mm_height; /**< height in millimeters */
|
||||
__u32 subpixel;
|
||||
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PROP_PENDING (1<<0) /* deprecated, do not use */
|
||||
#define DRM_MODE_PROP_RANGE (1<<1)
|
||||
#define DRM_MODE_PROP_IMMUTABLE (1<<2)
|
||||
#define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */
|
||||
#define DRM_MODE_PROP_BLOB (1<<4)
|
||||
#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */
|
||||
|
||||
/* non-extended types: legacy bitmask, one bit per type: */
|
||||
#define DRM_MODE_PROP_LEGACY_TYPE ( \
|
||||
DRM_MODE_PROP_RANGE | \
|
||||
DRM_MODE_PROP_ENUM | \
|
||||
DRM_MODE_PROP_BLOB | \
|
||||
DRM_MODE_PROP_BITMASK)
|
||||
|
||||
/* extended-types: rather than continue to consume a bit per type,
|
||||
* grab a chunk of the bits to use as integer type id.
|
||||
*/
|
||||
#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0
|
||||
#define DRM_MODE_PROP_TYPE(n) ((n) << 6)
|
||||
#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1)
|
||||
#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2)
|
||||
|
||||
/* the PROP_ATOMIC flag is used to hide properties from userspace that
|
||||
* is not aware of atomic properties. This is mostly to work around
|
||||
* older userspace (DDX drivers) that read/write each prop they find,
|
||||
* witout being aware that this could be triggering a lengthy modeset.
|
||||
*/
|
||||
#define DRM_MODE_PROP_ATOMIC 0x80000000
|
||||
|
||||
struct drm_mode_property_enum {
|
||||
__u64 value;
|
||||
char name[DRM_PROP_NAME_LEN];
|
||||
};
|
||||
|
||||
struct drm_mode_get_property {
|
||||
__u64 values_ptr; /* values and blob lengths */
|
||||
__u64 enum_blob_ptr; /* enum and blob id ptrs */
|
||||
|
||||
__u32 prop_id;
|
||||
__u32 flags;
|
||||
char name[DRM_PROP_NAME_LEN];
|
||||
|
||||
__u32 count_values;
|
||||
/* This is only used to count enum values, not blobs. The _blobs is
|
||||
* simply because of a historical reason, i.e. backwards compat. */
|
||||
__u32 count_enum_blobs;
|
||||
};
|
||||
|
||||
struct drm_mode_connector_set_property {
|
||||
__u64 value;
|
||||
__u32 prop_id;
|
||||
__u32 connector_id;
|
||||
};
|
||||
|
||||
#define DRM_MODE_OBJECT_CRTC 0xcccccccc
|
||||
#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0
|
||||
#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0
|
||||
#define DRM_MODE_OBJECT_MODE 0xdededede
|
||||
#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0
|
||||
#define DRM_MODE_OBJECT_FB 0xfbfbfbfb
|
||||
#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
|
||||
#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee
|
||||
#define DRM_MODE_OBJECT_ANY 0
|
||||
|
||||
struct drm_mode_obj_get_properties {
|
||||
__u64 props_ptr;
|
||||
__u64 prop_values_ptr;
|
||||
__u32 count_props;
|
||||
__u32 obj_id;
|
||||
__u32 obj_type;
|
||||
};
|
||||
|
||||
struct drm_mode_obj_set_property {
|
||||
__u64 value;
|
||||
__u32 prop_id;
|
||||
__u32 obj_id;
|
||||
__u32 obj_type;
|
||||
};
|
||||
|
||||
struct drm_mode_get_blob {
|
||||
__u32 blob_id;
|
||||
__u32 length;
|
||||
__u64 data;
|
||||
};
|
||||
|
||||
struct drm_mode_fb_cmd {
|
||||
__u32 fb_id;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__u32 pitch;
|
||||
__u32 bpp;
|
||||
__u32 depth;
|
||||
/* driver specific handle */
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
|
||||
#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
|
||||
|
||||
struct drm_mode_fb_cmd2 {
|
||||
__u32 fb_id;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__u32 pixel_format; /* fourcc code from drm_fourcc.h */
|
||||
__u32 flags; /* see above flags */
|
||||
|
||||
/*
|
||||
* In case of planar formats, this ioctl allows up to 4
|
||||
* buffer objects with offsets and pitches per plane.
|
||||
* The pitch and offset order is dictated by the fourcc,
|
||||
* e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as:
|
||||
*
|
||||
* YUV 4:2:0 image with a plane of 8 bit Y samples
|
||||
* followed by an interleaved U/V plane containing
|
||||
* 8 bit 2x2 subsampled colour difference samples.
|
||||
*
|
||||
* So it would consist of Y as offsets[0] and UV as
|
||||
* offsets[1]. Note that offsets[0] will generally
|
||||
* be 0 (but this is not required).
|
||||
*
|
||||
* To accommodate tiled, compressed, etc formats, a
|
||||
* modifier can be specified. The default value of zero
|
||||
* indicates "native" format as specified by the fourcc.
|
||||
* Vendor specific modifier token. Note that even though
|
||||
* it looks like we have a modifier per-plane, we in fact
|
||||
* do not. The modifier for each plane must be identical.
|
||||
* Thus all combinations of different data layouts for
|
||||
* multi plane formats must be enumerated as separate
|
||||
* modifiers.
|
||||
*/
|
||||
__u32 handles[4];
|
||||
__u32 pitches[4]; /* pitch for each plane */
|
||||
__u32 offsets[4]; /* offset of each plane */
|
||||
__u64 modifier[4]; /* ie, tiling, compress */
|
||||
};
|
||||
|
||||
#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
|
||||
#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
|
||||
#define DRM_MODE_FB_DIRTY_FLAGS 0x03
|
||||
|
||||
#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256
|
||||
|
||||
/*
|
||||
* Mark a region of a framebuffer as dirty.
|
||||
*
|
||||
* Some hardware does not automatically update display contents
|
||||
* as a hardware or software draw to a framebuffer. This ioctl
|
||||
* allows userspace to tell the kernel and the hardware what
|
||||
* regions of the framebuffer have changed.
|
||||
*
|
||||
* The kernel or hardware is free to update more then just the
|
||||
* region specified by the clip rects. The kernel or hardware
|
||||
* may also delay and/or coalesce several calls to dirty into a
|
||||
* single update.
|
||||
*
|
||||
* Userspace may annotate the updates, the annotates are a
|
||||
* promise made by the caller that the change is either a copy
|
||||
* of pixels or a fill of a single color in the region specified.
|
||||
*
|
||||
* If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then
|
||||
* the number of updated regions are half of num_clips given,
|
||||
* where the clip rects are paired in src and dst. The width and
|
||||
* height of each one of the pairs must match.
|
||||
*
|
||||
* If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller
|
||||
* promises that the region specified of the clip rects is filled
|
||||
* completely with a single color as given in the color argument.
|
||||
*/
|
||||
|
||||
struct drm_mode_fb_dirty_cmd {
|
||||
__u32 fb_id;
|
||||
__u32 flags;
|
||||
__u32 color;
|
||||
__u32 num_clips;
|
||||
__u64 clips_ptr;
|
||||
};
|
||||
|
||||
struct drm_mode_mode_cmd {
|
||||
__u32 connector_id;
|
||||
struct drm_mode_modeinfo mode;
|
||||
};
|
||||
|
||||
#define DRM_MODE_CURSOR_BO 0x01
|
||||
#define DRM_MODE_CURSOR_MOVE 0x02
|
||||
#define DRM_MODE_CURSOR_FLAGS 0x03
|
||||
|
||||
/*
|
||||
* depending on the value in flags different members are used.
|
||||
*
|
||||
* CURSOR_BO uses
|
||||
* crtc_id
|
||||
* width
|
||||
* height
|
||||
* handle - if 0 turns the cursor off
|
||||
*
|
||||
* CURSOR_MOVE uses
|
||||
* crtc_id
|
||||
* x
|
||||
* y
|
||||
*/
|
||||
struct drm_mode_cursor {
|
||||
__u32 flags;
|
||||
__u32 crtc_id;
|
||||
__s32 x;
|
||||
__s32 y;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
/* driver specific handle */
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
struct drm_mode_cursor2 {
|
||||
__u32 flags;
|
||||
__u32 crtc_id;
|
||||
__s32 x;
|
||||
__s32 y;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
/* driver specific handle */
|
||||
__u32 handle;
|
||||
__s32 hot_x;
|
||||
__s32 hot_y;
|
||||
};
|
||||
|
||||
struct drm_mode_crtc_lut {
|
||||
__u32 crtc_id;
|
||||
__u32 gamma_size;
|
||||
|
||||
/* pointers to arrays */
|
||||
__u64 red;
|
||||
__u64 green;
|
||||
__u64 blue;
|
||||
};
|
||||
|
||||
struct drm_color_ctm {
|
||||
/*
|
||||
* Conversion matrix in S31.32 sign-magnitude
|
||||
* (not two's complement!) format.
|
||||
*/
|
||||
__u64 matrix[9];
|
||||
};
|
||||
|
||||
struct drm_color_lut {
|
||||
/*
|
||||
* Data is U0.16 fixed point format.
|
||||
*/
|
||||
__u16 red;
|
||||
__u16 green;
|
||||
__u16 blue;
|
||||
__u16 reserved;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
|
||||
#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
|
||||
#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
|
||||
#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
|
||||
#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
|
||||
DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
|
||||
#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \
|
||||
DRM_MODE_PAGE_FLIP_ASYNC | \
|
||||
DRM_MODE_PAGE_FLIP_TARGET)
|
||||
|
||||
/*
|
||||
* Request a page flip on the specified crtc.
|
||||
*
|
||||
* This ioctl will ask KMS to schedule a page flip for the specified
|
||||
* crtc. Once any pending rendering targeting the specified fb (as of
|
||||
* ioctl time) has completed, the crtc will be reprogrammed to display
|
||||
* that fb after the next vertical refresh. The ioctl returns
|
||||
* immediately, but subsequent rendering to the current fb will block
|
||||
* in the execbuffer ioctl until the page flip happens. If a page
|
||||
* flip is already pending as the ioctl is called, EBUSY will be
|
||||
* returned.
|
||||
*
|
||||
* Flag DRM_MODE_PAGE_FLIP_EVENT requests that drm sends back a vblank
|
||||
* event (see drm.h: struct drm_event_vblank) when the page flip is
|
||||
* done. The user_data field passed in with this ioctl will be
|
||||
* returned as the user_data field in the vblank event struct.
|
||||
*
|
||||
* Flag DRM_MODE_PAGE_FLIP_ASYNC requests that the flip happen
|
||||
* 'as soon as possible', meaning that it not delay waiting for vblank.
|
||||
* This may cause tearing on the screen.
|
||||
*
|
||||
* The reserved field must be zero.
|
||||
*/
|
||||
|
||||
struct drm_mode_crtc_page_flip {
|
||||
__u32 crtc_id;
|
||||
__u32 fb_id;
|
||||
__u32 flags;
|
||||
__u32 reserved;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* Request a page flip on the specified crtc.
|
||||
*
|
||||
* Same as struct drm_mode_crtc_page_flip, but supports new flags and
|
||||
* re-purposes the reserved field:
|
||||
*
|
||||
* The sequence field must be zero unless either of the
|
||||
* DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
|
||||
* the ABSOLUTE flag is specified, the sequence field denotes the absolute
|
||||
* vblank sequence when the flip should take effect. When the RELATIVE
|
||||
* flag is specified, the sequence field denotes the relative (to the
|
||||
* current one when the ioctl is called) vblank sequence when the flip
|
||||
* should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
|
||||
* make sure the vblank sequence before the target one has passed before
|
||||
* calling this ioctl. The purpose of the
|
||||
* DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
|
||||
* the target for when code dealing with a page flip runs during a
|
||||
* vertical blank period.
|
||||
*/
|
||||
|
||||
struct drm_mode_crtc_page_flip_target {
|
||||
__u32 crtc_id;
|
||||
__u32 fb_id;
|
||||
__u32 flags;
|
||||
__u32 sequence;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
/* create a dumb scanout buffer */
|
||||
struct drm_mode_create_dumb {
|
||||
__u32 height;
|
||||
__u32 width;
|
||||
__u32 bpp;
|
||||
__u32 flags;
|
||||
/* handle, pitch, size will be returned */
|
||||
__u32 handle;
|
||||
__u32 pitch;
|
||||
__u64 size;
|
||||
};
|
||||
|
||||
/* set up for mmap of a dumb scanout buffer */
|
||||
struct drm_mode_map_dumb {
|
||||
/** Handle for the object being mapped. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/**
|
||||
* Fake offset to use for subsequent mmap call
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_mode_destroy_dumb {
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
/* page-flip flags are valid, plus: */
|
||||
#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100
|
||||
#define DRM_MODE_ATOMIC_NONBLOCK 0x0200
|
||||
#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400
|
||||
|
||||
#define DRM_MODE_ATOMIC_FLAGS (\
|
||||
DRM_MODE_PAGE_FLIP_EVENT |\
|
||||
DRM_MODE_PAGE_FLIP_ASYNC |\
|
||||
DRM_MODE_ATOMIC_TEST_ONLY |\
|
||||
DRM_MODE_ATOMIC_NONBLOCK |\
|
||||
DRM_MODE_ATOMIC_ALLOW_MODESET)
|
||||
|
||||
struct drm_mode_atomic {
|
||||
__u32 flags;
|
||||
__u32 count_objs;
|
||||
__u64 objs_ptr;
|
||||
__u64 count_props_ptr;
|
||||
__u64 props_ptr;
|
||||
__u64 prop_values_ptr;
|
||||
__u64 reserved;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
struct drm_format_modifier_blob {
|
||||
#define FORMAT_BLOB_CURRENT 1
|
||||
/* Version of this blob format */
|
||||
__u32 version;
|
||||
|
||||
/* Flags */
|
||||
__u32 flags;
|
||||
|
||||
/* Number of fourcc formats supported */
|
||||
__u32 count_formats;
|
||||
|
||||
/* Where in this blob the formats exist (in bytes) */
|
||||
__u32 formats_offset;
|
||||
|
||||
/* Number of drm_format_modifiers */
|
||||
__u32 count_modifiers;
|
||||
|
||||
/* Where in this blob the modifiers exist (in bytes) */
|
||||
__u32 modifiers_offset;
|
||||
|
||||
/* __u32 formats[] */
|
||||
/* struct drm_format_modifier modifiers[] */
|
||||
};
|
||||
|
||||
struct drm_format_modifier {
|
||||
/* Bitmask of formats in get_plane format list this info applies to. The
|
||||
* offset allows a sliding window of which 64 formats (bits).
|
||||
*
|
||||
* Some examples:
|
||||
* In today's world with < 65 formats, and formats 0, and 2 are
|
||||
* supported
|
||||
* 0x0000000000000005
|
||||
* ^-offset = 0, formats = 5
|
||||
*
|
||||
* If the number formats grew to 128, and formats 98-102 are
|
||||
* supported with the modifier:
|
||||
*
|
||||
* 0x0000007c00000000 0000000000000000
|
||||
* ^
|
||||
* |__offset = 64, formats = 0x7c00000000
|
||||
*
|
||||
*/
|
||||
__u64 formats;
|
||||
__u32 offset;
|
||||
__u32 pad;
|
||||
|
||||
/* The modifier that applies to the >get_plane format list bitmask. */
|
||||
__u64 modifier;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new 'blob' data property, copying length bytes from data pointer,
|
||||
* and returning new blob ID.
|
||||
*/
|
||||
struct drm_mode_create_blob {
|
||||
/** Pointer to data to copy. */
|
||||
__u64 data;
|
||||
/** Length of data to copy. */
|
||||
__u32 length;
|
||||
/** Return: new property ID. */
|
||||
__u32 blob_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* Destroy a user-created blob property.
|
||||
*/
|
||||
struct drm_mode_destroy_blob {
|
||||
__u32 blob_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* Lease mode resources, creating another drm_master.
|
||||
*/
|
||||
struct drm_mode_create_lease {
|
||||
/** Pointer to array of object ids (__u32) */
|
||||
__u64 object_ids;
|
||||
/** Number of object ids */
|
||||
__u32 object_count;
|
||||
/** flags for new FD (O_CLOEXEC, etc) */
|
||||
__u32 flags;
|
||||
|
||||
/** Return: unique identifier for lessee. */
|
||||
__u32 lessee_id;
|
||||
/** Return: file descriptor to new drm_master file */
|
||||
__u32 fd;
|
||||
};
|
||||
|
||||
/**
|
||||
* List lesses from a drm_master
|
||||
*/
|
||||
struct drm_mode_list_lessees {
|
||||
/** Number of lessees.
|
||||
* On input, provides length of the array.
|
||||
* On output, provides total number. No
|
||||
* more than the input number will be written
|
||||
* back, so two calls can be used to get
|
||||
* the size and then the data.
|
||||
*/
|
||||
__u32 count_lessees;
|
||||
__u32 pad;
|
||||
|
||||
/** Pointer to lessees.
|
||||
* pointer to __u64 array of lessee ids
|
||||
*/
|
||||
__u64 lessees_ptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get leased objects
|
||||
*/
|
||||
struct drm_mode_get_lease {
|
||||
/** Number of leased objects.
|
||||
* On input, provides length of the array.
|
||||
* On output, provides total number. No
|
||||
* more than the input number will be written
|
||||
* back, so two calls can be used to get
|
||||
* the size and then the data.
|
||||
*/
|
||||
__u32 count_objects;
|
||||
__u32 pad;
|
||||
|
||||
/** Pointer to objects.
|
||||
* pointer to __u32 array of object ids
|
||||
*/
|
||||
__u64 objects_ptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Revoke lease
|
||||
*/
|
||||
struct drm_mode_revoke_lease {
|
||||
/** Unique ID of lessee
|
||||
*/
|
||||
__u32 lessee_id;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -1,92 +0,0 @@
|
||||
/**
|
||||
* \file drm_sarea.h
|
||||
* \brief SAREA definitions
|
||||
*
|
||||
* \author Michel Dänzer <michel@daenzer.net>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_SAREA_H_
|
||||
#define _DRM_SAREA_H_
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* SAREA area needs to be at least a page */
|
||||
#if defined(__alpha__)
|
||||
#define SAREA_MAX 0x2000U
|
||||
#elif defined(__mips__)
|
||||
#define SAREA_MAX 0x4000U
|
||||
#elif defined(__ia64__)
|
||||
#define SAREA_MAX 0x10000U /* 64kB */
|
||||
#else
|
||||
/* Intel 830M driver needs at least 8k SAREA */
|
||||
#define SAREA_MAX 0x2000U
|
||||
#endif
|
||||
|
||||
/** Maximum number of drawables in the SAREA */
|
||||
#define SAREA_MAX_DRAWABLES 256
|
||||
|
||||
#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
|
||||
|
||||
/** SAREA drawable */
|
||||
struct drm_sarea_drawable {
|
||||
unsigned int stamp;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
/** SAREA frame */
|
||||
struct drm_sarea_frame {
|
||||
unsigned int x;
|
||||
unsigned int y;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int fullscreen;
|
||||
};
|
||||
|
||||
/** SAREA */
|
||||
struct drm_sarea {
|
||||
/** first thing is always the DRM locking structure */
|
||||
struct drm_hw_lock lock;
|
||||
/** \todo Use readers/writer lock for drm_sarea::drawable_lock */
|
||||
struct drm_hw_lock drawable_lock;
|
||||
struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
|
||||
struct drm_sarea_frame frame; /**< frame */
|
||||
drm_context_t dummy_context;
|
||||
};
|
||||
|
||||
typedef struct drm_sarea_drawable drm_sarea_drawable_t;
|
||||
typedef struct drm_sarea_frame drm_sarea_frame_t;
|
||||
typedef struct drm_sarea drm_sarea_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DRM_SAREA_H_ */
|
||||
@ -1,289 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2015 Etnaviv Project
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ETNAVIV_DRM_H__
|
||||
#define __ETNAVIV_DRM_H__
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints:
|
||||
* 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
|
||||
* user/kernel compatibility
|
||||
* 2) Keep fields aligned to their size
|
||||
* 3) Because of how drm_ioctl() works, we can add new fields at
|
||||
* the end of an ioctl if some care is taken: drm_ioctl() will
|
||||
* zero out the new fields at the tail of the ioctl, so a zero
|
||||
* value should have a backwards compatible meaning. And for
|
||||
* output params, userspace won't see the newly added output
|
||||
* fields.. so that has to be somehow ok.
|
||||
*/
|
||||
|
||||
/* timeouts are specified in clock-monotonic absolute times (to simplify
|
||||
* restarting interrupted ioctls). The following struct is logically the
|
||||
* same as 'struct timespec' but 32/64b ABI safe.
|
||||
*/
|
||||
struct drm_etnaviv_timespec {
|
||||
__s64 tv_sec; /* seconds */
|
||||
__s64 tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
#define ETNAVIV_PARAM_GPU_MODEL 0x01
|
||||
#define ETNAVIV_PARAM_GPU_REVISION 0x02
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e
|
||||
#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f
|
||||
|
||||
#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10
|
||||
#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11
|
||||
#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12
|
||||
#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13
|
||||
#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14
|
||||
#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15
|
||||
#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16
|
||||
#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17
|
||||
#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18
|
||||
#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19
|
||||
#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a
|
||||
|
||||
#define ETNA_MAX_PIPES 4
|
||||
|
||||
struct drm_etnaviv_param {
|
||||
__u32 pipe; /* in */
|
||||
__u32 param; /* in, ETNAVIV_PARAM_x */
|
||||
__u64 value; /* out (get_param) or in (set_param) */
|
||||
};
|
||||
|
||||
/*
|
||||
* GEM buffers:
|
||||
*/
|
||||
|
||||
#define ETNA_BO_CACHE_MASK 0x000f0000
|
||||
/* cache modes */
|
||||
#define ETNA_BO_CACHED 0x00010000
|
||||
#define ETNA_BO_WC 0x00020000
|
||||
#define ETNA_BO_UNCACHED 0x00040000
|
||||
/* map flags */
|
||||
#define ETNA_BO_FORCE_MMU 0x00100000
|
||||
|
||||
struct drm_etnaviv_gem_new {
|
||||
__u64 size; /* in */
|
||||
__u32 flags; /* in, mask of ETNA_BO_x */
|
||||
__u32 handle; /* out */
|
||||
};
|
||||
|
||||
struct drm_etnaviv_gem_info {
|
||||
__u32 handle; /* in */
|
||||
__u32 pad;
|
||||
__u64 offset; /* out, offset to pass to mmap() */
|
||||
};
|
||||
|
||||
#define ETNA_PREP_READ 0x01
|
||||
#define ETNA_PREP_WRITE 0x02
|
||||
#define ETNA_PREP_NOSYNC 0x04
|
||||
|
||||
struct drm_etnaviv_gem_cpu_prep {
|
||||
__u32 handle; /* in */
|
||||
__u32 op; /* in, mask of ETNA_PREP_x */
|
||||
struct drm_etnaviv_timespec timeout; /* in */
|
||||
};
|
||||
|
||||
struct drm_etnaviv_gem_cpu_fini {
|
||||
__u32 handle; /* in */
|
||||
__u32 flags; /* in, placeholder for now, no defined values */
|
||||
};
|
||||
|
||||
/*
|
||||
* Cmdstream Submission:
|
||||
*/
|
||||
|
||||
/* The value written into the cmdstream is logically:
|
||||
* relocbuf->gpuaddr + reloc_offset
|
||||
*
|
||||
* NOTE that reloc's must be sorted by order of increasing submit_offset,
|
||||
* otherwise EINVAL.
|
||||
*/
|
||||
struct drm_etnaviv_gem_submit_reloc {
|
||||
__u32 submit_offset; /* in, offset from submit_bo */
|
||||
__u32 reloc_idx; /* in, index of reloc_bo buffer */
|
||||
__u64 reloc_offset; /* in, offset from start of reloc_bo */
|
||||
__u32 flags; /* in, placeholder for now, no defined values */
|
||||
};
|
||||
|
||||
/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
|
||||
* cmdstream buffer(s) themselves or reloc entries) has one (and only
|
||||
* one) entry in the submit->bos[] table.
|
||||
*
|
||||
* As a optimization, the current buffer (gpu virtual address) can be
|
||||
* passed back through the 'presumed' field. If on a subsequent reloc,
|
||||
* userspace passes back a 'presumed' address that is still valid,
|
||||
* then patching the cmdstream for this entry is skipped. This can
|
||||
* avoid kernel needing to map/access the cmdstream bo in the common
|
||||
* case.
|
||||
*/
|
||||
#define ETNA_SUBMIT_BO_READ 0x0001
|
||||
#define ETNA_SUBMIT_BO_WRITE 0x0002
|
||||
struct drm_etnaviv_gem_submit_bo {
|
||||
__u32 flags; /* in, mask of ETNA_SUBMIT_BO_x */
|
||||
__u32 handle; /* in, GEM handle */
|
||||
__u64 presumed; /* in/out, presumed buffer address */
|
||||
};
|
||||
|
||||
/* performance monitor request (pmr) */
|
||||
#define ETNA_PM_PROCESS_PRE 0x0001
|
||||
#define ETNA_PM_PROCESS_POST 0x0002
|
||||
struct drm_etnaviv_gem_submit_pmr {
|
||||
__u32 flags; /* in, when to process request (ETNA_PM_PROCESS_x) */
|
||||
__u8 domain; /* in, pm domain */
|
||||
__u8 pad;
|
||||
__u16 signal; /* in, pm signal */
|
||||
__u32 sequence; /* in, sequence number */
|
||||
__u32 read_offset; /* in, offset from read_bo */
|
||||
__u32 read_idx; /* in, index of read_bo buffer */
|
||||
};
|
||||
|
||||
/* Each cmdstream submit consists of a table of buffers involved, and
|
||||
* one or more cmdstream buffers. This allows for conditional execution
|
||||
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
|
||||
*/
|
||||
#define ETNA_SUBMIT_NO_IMPLICIT 0x0001
|
||||
#define ETNA_SUBMIT_FENCE_FD_IN 0x0002
|
||||
#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004
|
||||
#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \
|
||||
ETNA_SUBMIT_FENCE_FD_IN | \
|
||||
ETNA_SUBMIT_FENCE_FD_OUT)
|
||||
#define ETNA_PIPE_3D 0x00
|
||||
#define ETNA_PIPE_2D 0x01
|
||||
#define ETNA_PIPE_VG 0x02
|
||||
struct drm_etnaviv_gem_submit {
|
||||
__u32 fence; /* out */
|
||||
__u32 pipe; /* in */
|
||||
__u32 exec_state; /* in, initial execution state (ETNA_PIPE_x) */
|
||||
__u32 nr_bos; /* in, number of submit_bo's */
|
||||
__u32 nr_relocs; /* in, number of submit_reloc's */
|
||||
__u32 stream_size; /* in, cmdstream size */
|
||||
__u64 bos; /* in, ptr to array of submit_bo's */
|
||||
__u64 relocs; /* in, ptr to array of submit_reloc's */
|
||||
__u64 stream; /* in, ptr to cmdstream */
|
||||
__u32 flags; /* in, mask of ETNA_SUBMIT_x */
|
||||
__s32 fence_fd; /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */
|
||||
__u64 pmrs; /* in, ptr to array of submit_pmr's */
|
||||
__u32 nr_pmrs; /* in, number of submit_pmr's */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/* The normal way to synchronize with the GPU is just to CPU_PREP on
|
||||
* a buffer if you need to access it from the CPU (other cmdstream
|
||||
* submission from same or other contexts, PAGE_FLIP ioctl, etc, all
|
||||
* handle the required synchronization under the hood). This ioctl
|
||||
* mainly just exists as a way to implement the gallium pipe_fence
|
||||
* APIs without requiring a dummy bo to synchronize on.
|
||||
*/
|
||||
#define ETNA_WAIT_NONBLOCK 0x01
|
||||
struct drm_etnaviv_wait_fence {
|
||||
__u32 pipe; /* in */
|
||||
__u32 fence; /* in */
|
||||
__u32 flags; /* in, mask of ETNA_WAIT_x */
|
||||
__u32 pad;
|
||||
struct drm_etnaviv_timespec timeout; /* in */
|
||||
};
|
||||
|
||||
#define ETNA_USERPTR_READ 0x01
|
||||
#define ETNA_USERPTR_WRITE 0x02
|
||||
struct drm_etnaviv_gem_userptr {
|
||||
__u64 user_ptr; /* in, page aligned user pointer */
|
||||
__u64 user_size; /* in, page aligned user size */
|
||||
__u32 flags; /* in, flags */
|
||||
__u32 handle; /* out, non-zero handle */
|
||||
};
|
||||
|
||||
struct drm_etnaviv_gem_wait {
|
||||
__u32 pipe; /* in */
|
||||
__u32 handle; /* in, bo to be waited for */
|
||||
__u32 flags; /* in, mask of ETNA_WAIT_x */
|
||||
__u32 pad;
|
||||
struct drm_etnaviv_timespec timeout; /* in */
|
||||
};
|
||||
|
||||
/*
|
||||
* Performance Monitor (PM):
|
||||
*/
|
||||
|
||||
struct drm_etnaviv_pm_domain {
|
||||
__u32 pipe; /* in */
|
||||
__u8 iter; /* in/out, select pm domain at index iter */
|
||||
__u8 id; /* out, id of domain */
|
||||
__u16 nr_signals; /* out, how many signals does this domain provide */
|
||||
char name[64]; /* out, name of domain */
|
||||
};
|
||||
|
||||
struct drm_etnaviv_pm_signal {
|
||||
__u32 pipe; /* in */
|
||||
__u8 domain; /* in, pm domain index */
|
||||
__u8 pad;
|
||||
__u16 iter; /* in/out, select pm source at index iter */
|
||||
__u16 id; /* out, id of signal */
|
||||
char name[64]; /* out, name of domain */
|
||||
};
|
||||
|
||||
#define DRM_ETNAVIV_GET_PARAM 0x00
|
||||
/* placeholder:
|
||||
#define DRM_ETNAVIV_SET_PARAM 0x01
|
||||
*/
|
||||
#define DRM_ETNAVIV_GEM_NEW 0x02
|
||||
#define DRM_ETNAVIV_GEM_INFO 0x03
|
||||
#define DRM_ETNAVIV_GEM_CPU_PREP 0x04
|
||||
#define DRM_ETNAVIV_GEM_CPU_FINI 0x05
|
||||
#define DRM_ETNAVIV_GEM_SUBMIT 0x06
|
||||
#define DRM_ETNAVIV_WAIT_FENCE 0x07
|
||||
#define DRM_ETNAVIV_GEM_USERPTR 0x08
|
||||
#define DRM_ETNAVIV_GEM_WAIT 0x09
|
||||
#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a
|
||||
#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b
|
||||
#define DRM_ETNAVIV_NUM_IOCTLS 0x0c
|
||||
|
||||
#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit)
|
||||
#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr)
|
||||
#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait)
|
||||
#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain)
|
||||
#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ETNAVIV_DRM_H__ */
|
||||
@ -1,424 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/* exynos_drm.h
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* Authors:
|
||||
* Inki Dae <inki.dae@samsung.com>
|
||||
* Joonyoung Shim <jy0922.shim@samsung.com>
|
||||
* Seung-Woo Kim <sw0312.kim@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _EXYNOS_DRM_H_
|
||||
#define _EXYNOS_DRM_H_
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* User-desired buffer creation information structure.
|
||||
*
|
||||
* @size: user-desired memory allocation size.
|
||||
* - this size value would be page-aligned internally.
|
||||
* @flags: user request for setting memory type or cache attributes.
|
||||
* @handle: returned a handle to created gem object.
|
||||
* - this handle will be set by gem module of kernel side.
|
||||
*/
|
||||
struct drm_exynos_gem_create {
|
||||
__u64 size;
|
||||
__u32 flags;
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure for getting a fake-offset that can be used with mmap.
|
||||
*
|
||||
* @handle: handle of gem object.
|
||||
* @reserved: just padding to be 64-bit aligned.
|
||||
* @offset: a fake-offset of gem object.
|
||||
*/
|
||||
struct drm_exynos_gem_map {
|
||||
__u32 handle;
|
||||
__u32 reserved;
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure to gem information.
|
||||
*
|
||||
* @handle: a handle to gem object created.
|
||||
* @flags: flag value including memory type and cache attribute and
|
||||
* this value would be set by driver.
|
||||
* @size: size to memory region allocated by gem and this size would
|
||||
* be set by driver.
|
||||
*/
|
||||
struct drm_exynos_gem_info {
|
||||
__u32 handle;
|
||||
__u32 flags;
|
||||
__u64 size;
|
||||
};
|
||||
|
||||
/**
|
||||
* A structure for user connection request of virtual display.
|
||||
*
|
||||
* @connection: indicate whether doing connetion or not by user.
|
||||
* @extensions: if this value is 1 then the vidi driver would need additional
|
||||
* 128bytes edid data.
|
||||
* @edid: the edid data pointer from user side.
|
||||
*/
|
||||
struct drm_exynos_vidi_connection {
|
||||
__u32 connection;
|
||||
__u32 extensions;
|
||||
__u64 edid;
|
||||
};
|
||||
|
||||
/* memory type definitions. */
|
||||
enum e_drm_exynos_gem_mem_type {
|
||||
/* Physically Continuous memory and used as default. */
|
||||
EXYNOS_BO_CONTIG = 0 << 0,
|
||||
/* Physically Non-Continuous memory. */
|
||||
EXYNOS_BO_NONCONTIG = 1 << 0,
|
||||
/* non-cachable mapping and used as default. */
|
||||
EXYNOS_BO_NONCACHABLE = 0 << 1,
|
||||
/* cachable mapping. */
|
||||
EXYNOS_BO_CACHABLE = 1 << 1,
|
||||
/* write-combine mapping. */
|
||||
EXYNOS_BO_WC = 1 << 2,
|
||||
EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE |
|
||||
EXYNOS_BO_WC
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_get_ver {
|
||||
__u32 major;
|
||||
__u32 minor;
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_cmd {
|
||||
__u32 offset;
|
||||
__u32 data;
|
||||
};
|
||||
|
||||
enum drm_exynos_g2d_buf_type {
|
||||
G2D_BUF_USERPTR = 1 << 31,
|
||||
};
|
||||
|
||||
enum drm_exynos_g2d_event_type {
|
||||
G2D_EVENT_NOT,
|
||||
G2D_EVENT_NONSTOP,
|
||||
G2D_EVENT_STOP, /* not yet */
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_userptr {
|
||||
unsigned long userptr;
|
||||
unsigned long size;
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_set_cmdlist {
|
||||
__u64 cmd;
|
||||
__u64 cmd_buf;
|
||||
__u32 cmd_nr;
|
||||
__u32 cmd_buf_nr;
|
||||
|
||||
/* for g2d event */
|
||||
__u64 event_type;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
struct drm_exynos_g2d_exec {
|
||||
__u64 async;
|
||||
};
|
||||
|
||||
/* Exynos DRM IPP v2 API */
|
||||
|
||||
/**
|
||||
* Enumerate available IPP hardware modules.
|
||||
*
|
||||
* @count_ipps: size of ipp_id array / number of ipp modules (set by driver)
|
||||
* @reserved: padding
|
||||
* @ipp_id_ptr: pointer to ipp_id array or NULL
|
||||
*/
|
||||
struct drm_exynos_ioctl_ipp_get_res {
|
||||
__u32 count_ipps;
|
||||
__u32 reserved;
|
||||
__u64 ipp_id_ptr;
|
||||
};
|
||||
|
||||
enum drm_exynos_ipp_format_type {
|
||||
DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01,
|
||||
DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02,
|
||||
};
|
||||
|
||||
struct drm_exynos_ipp_format {
|
||||
__u32 fourcc;
|
||||
__u32 type;
|
||||
__u64 modifier;
|
||||
};
|
||||
|
||||
enum drm_exynos_ipp_capability {
|
||||
DRM_EXYNOS_IPP_CAP_CROP = 0x01,
|
||||
DRM_EXYNOS_IPP_CAP_ROTATE = 0x02,
|
||||
DRM_EXYNOS_IPP_CAP_SCALE = 0x04,
|
||||
DRM_EXYNOS_IPP_CAP_CONVERT = 0x08,
|
||||
};
|
||||
|
||||
/**
|
||||
* Get IPP hardware capabilities and supported image formats.
|
||||
*
|
||||
* @ipp_id: id of IPP module to query
|
||||
* @capabilities: bitmask of drm_exynos_ipp_capability (set by driver)
|
||||
* @reserved: padding
|
||||
* @formats_count: size of formats array (in entries) / number of filled
|
||||
* formats (set by driver)
|
||||
* @formats_ptr: pointer to formats array or NULL
|
||||
*/
|
||||
struct drm_exynos_ioctl_ipp_get_caps {
|
||||
__u32 ipp_id;
|
||||
__u32 capabilities;
|
||||
__u32 reserved;
|
||||
__u32 formats_count;
|
||||
__u64 formats_ptr;
|
||||
};
|
||||
|
||||
enum drm_exynos_ipp_limit_type {
|
||||
/* size (horizontal/vertial) limits, in pixels (min, max, alignment) */
|
||||
DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001,
|
||||
/* scale ratio (horizonta/vertial), 16.16 fixed point (min, max) */
|
||||
DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002,
|
||||
|
||||
/* image buffer area */
|
||||
DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16,
|
||||
/* src/dst rectangle area */
|
||||
DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16,
|
||||
/* src/dst rectangle area when rotation enabled */
|
||||
DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16,
|
||||
|
||||
DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f,
|
||||
DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16,
|
||||
};
|
||||
|
||||
struct drm_exynos_ipp_limit_val {
|
||||
__u32 min;
|
||||
__u32 max;
|
||||
__u32 align;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/**
|
||||
* IPP module limitation.
|
||||
*
|
||||
* @type: limit type (see drm_exynos_ipp_limit_type enum)
|
||||
* @reserved: padding
|
||||
* @h: horizontal limits
|
||||
* @v: vertical limits
|
||||
*/
|
||||
struct drm_exynos_ipp_limit {
|
||||
__u32 type;
|
||||
__u32 reserved;
|
||||
struct drm_exynos_ipp_limit_val h;
|
||||
struct drm_exynos_ipp_limit_val v;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get IPP limits for given image format.
|
||||
*
|
||||
* @ipp_id: id of IPP module to query
|
||||
* @fourcc: image format code (see DRM_FORMAT_* in drm_fourcc.h)
|
||||
* @modifier: image format modifier (see DRM_FORMAT_MOD_* in drm_fourcc.h)
|
||||
* @type: source/destination identifier (drm_exynos_ipp_format_flag enum)
|
||||
* @limits_count: size of limits array (in entries) / number of filled entries
|
||||
* (set by driver)
|
||||
* @limits_ptr: pointer to limits array or NULL
|
||||
*/
|
||||
struct drm_exynos_ioctl_ipp_get_limits {
|
||||
__u32 ipp_id;
|
||||
__u32 fourcc;
|
||||
__u64 modifier;
|
||||
__u32 type;
|
||||
__u32 limits_count;
|
||||
__u64 limits_ptr;
|
||||
};
|
||||
|
||||
enum drm_exynos_ipp_task_id {
|
||||
/* buffer described by struct drm_exynos_ipp_task_buffer */
|
||||
DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001,
|
||||
/* rectangle described by struct drm_exynos_ipp_task_rect */
|
||||
DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002,
|
||||
/* transformation described by struct drm_exynos_ipp_task_transform */
|
||||
DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003,
|
||||
/* alpha configuration described by struct drm_exynos_ipp_task_alpha */
|
||||
DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004,
|
||||
|
||||
/* source image data (for buffer and rectangle chunks) */
|
||||
DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16,
|
||||
/* destination image data (for buffer and rectangle chunks) */
|
||||
DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16,
|
||||
};
|
||||
|
||||
/**
|
||||
* Memory buffer with image data.
|
||||
*
|
||||
* @id: must be DRM_EXYNOS_IPP_TASK_BUFFER
|
||||
* other parameters are same as for AddFB2 generic DRM ioctl
|
||||
*/
|
||||
struct drm_exynos_ipp_task_buffer {
|
||||
__u32 id;
|
||||
__u32 fourcc;
|
||||
__u32 width, height;
|
||||
__u32 gem_id[4];
|
||||
__u32 offset[4];
|
||||
__u32 pitch[4];
|
||||
__u64 modifier;
|
||||
};
|
||||
|
||||
/**
|
||||
* Rectangle for processing.
|
||||
*
|
||||
* @id: must be DRM_EXYNOS_IPP_TASK_RECTANGLE
|
||||
* @reserved: padding
|
||||
* @x,@y: left corner in pixels
|
||||
* @w,@h: width/height in pixels
|
||||
*/
|
||||
struct drm_exynos_ipp_task_rect {
|
||||
__u32 id;
|
||||
__u32 reserved;
|
||||
__u32 x;
|
||||
__u32 y;
|
||||
__u32 w;
|
||||
__u32 h;
|
||||
};
|
||||
|
||||
/**
|
||||
* Image tranformation description.
|
||||
*
|
||||
* @id: must be DRM_EXYNOS_IPP_TASK_TRANSFORM
|
||||
* @rotation: DRM_MODE_ROTATE_* and DRM_MODE_REFLECT_* values
|
||||
*/
|
||||
struct drm_exynos_ipp_task_transform {
|
||||
__u32 id;
|
||||
__u32 rotation;
|
||||
};
|
||||
|
||||
/**
|
||||
* Image global alpha configuration for formats without alpha values.
|
||||
*
|
||||
* @id: must be DRM_EXYNOS_IPP_TASK_ALPHA
|
||||
* @value: global alpha value (0-255)
|
||||
*/
|
||||
struct drm_exynos_ipp_task_alpha {
|
||||
__u32 id;
|
||||
__u32 value;
|
||||
};
|
||||
|
||||
enum drm_exynos_ipp_flag {
|
||||
/* generate DRM event after processing */
|
||||
DRM_EXYNOS_IPP_FLAG_EVENT = 0x01,
|
||||
/* dry run, only check task parameters */
|
||||
DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02,
|
||||
/* non-blocking processing */
|
||||
DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04,
|
||||
};
|
||||
|
||||
#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT |\
|
||||
DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK)
|
||||
|
||||
/**
|
||||
* Perform image processing described by array of drm_exynos_ipp_task_*
|
||||
* structures (parameters array).
|
||||
*
|
||||
* @ipp_id: id of IPP module to run the task
|
||||
* @flags: bitmask of drm_exynos_ipp_flag values
|
||||
* @reserved: padding
|
||||
* @params_size: size of parameters array (in bytes)
|
||||
* @params_ptr: pointer to parameters array or NULL
|
||||
* @user_data: (optional) data for drm event
|
||||
*/
|
||||
struct drm_exynos_ioctl_ipp_commit {
|
||||
__u32 ipp_id;
|
||||
__u32 flags;
|
||||
__u32 reserved;
|
||||
__u32 params_size;
|
||||
__u64 params_ptr;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
#define DRM_EXYNOS_GEM_CREATE 0x00
|
||||
#define DRM_EXYNOS_GEM_MAP 0x01
|
||||
/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
|
||||
#define DRM_EXYNOS_GEM_GET 0x04
|
||||
#define DRM_EXYNOS_VIDI_CONNECTION 0x07
|
||||
|
||||
/* G2D */
|
||||
#define DRM_EXYNOS_G2D_GET_VER 0x20
|
||||
#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
|
||||
#define DRM_EXYNOS_G2D_EXEC 0x22
|
||||
|
||||
/* Reserved 0x30 ~ 0x33 for obsolete Exynos IPP ioctls */
|
||||
/* IPP - Image Post Processing */
|
||||
#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40
|
||||
#define DRM_EXYNOS_IPP_GET_CAPS 0x41
|
||||
#define DRM_EXYNOS_IPP_GET_LIMITS 0x42
|
||||
#define DRM_EXYNOS_IPP_COMMIT 0x43
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
|
||||
#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
|
||||
#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
|
||||
#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
|
||||
#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
|
||||
|
||||
#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_IPP_GET_RESOURCES, \
|
||||
struct drm_exynos_ioctl_ipp_get_res)
|
||||
#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps)
|
||||
#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_IPP_GET_LIMITS, \
|
||||
struct drm_exynos_ioctl_ipp_get_limits)
|
||||
#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit)
|
||||
|
||||
/* EXYNOS specific events */
|
||||
#define DRM_EXYNOS_G2D_EVENT 0x80000000
|
||||
#define DRM_EXYNOS_IPP_EVENT 0x80000002
|
||||
|
||||
struct drm_exynos_g2d_event {
|
||||
struct drm_event base;
|
||||
__u64 user_data;
|
||||
__u32 tv_sec;
|
||||
__u32 tv_usec;
|
||||
__u32 cmdlist_no;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
struct drm_exynos_ipp_event {
|
||||
struct drm_event base;
|
||||
__u64 user_data;
|
||||
__u32 tv_sec;
|
||||
__u32 tv_usec;
|
||||
__u32 ipp_id;
|
||||
__u32 sequence;
|
||||
__u64 reserved;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EXYNOS_DRM_H_ */
|
||||
@ -1,292 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _I810_DRM_H_
|
||||
#define _I810_DRM_H_
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* WARNING: These defines must be the same as what the Xserver uses.
|
||||
* if you change them, you must change the defines in the Xserver.
|
||||
*/
|
||||
|
||||
#ifndef _I810_DEFINES_
|
||||
#define _I810_DEFINES_
|
||||
|
||||
#define I810_DMA_BUF_ORDER 12
|
||||
#define I810_DMA_BUF_SZ (1<<I810_DMA_BUF_ORDER)
|
||||
#define I810_DMA_BUF_NR 256
|
||||
#define I810_NR_SAREA_CLIPRECTS 8
|
||||
|
||||
/* Each region is a minimum of 64k, and there are at most 64 of them.
|
||||
*/
|
||||
#define I810_NR_TEX_REGIONS 64
|
||||
#define I810_LOG_MIN_TEX_REGION_SIZE 16
|
||||
#endif
|
||||
|
||||
#define I810_UPLOAD_TEX0IMAGE 0x1 /* handled clientside */
|
||||
#define I810_UPLOAD_TEX1IMAGE 0x2 /* handled clientside */
|
||||
#define I810_UPLOAD_CTX 0x4
|
||||
#define I810_UPLOAD_BUFFERS 0x8
|
||||
#define I810_UPLOAD_TEX0 0x10
|
||||
#define I810_UPLOAD_TEX1 0x20
|
||||
#define I810_UPLOAD_CLIPRECTS 0x40
|
||||
|
||||
/* Indices into buf.Setup where various bits of state are mirrored per
|
||||
* context and per buffer. These can be fired at the card as a unit,
|
||||
* or in a piecewise fashion as required.
|
||||
*/
|
||||
|
||||
/* Destbuffer state
|
||||
* - backbuffer linear offset and pitch -- invarient in the current dri
|
||||
* - zbuffer linear offset and pitch -- also invarient
|
||||
* - drawing origin in back and depth buffers.
|
||||
*
|
||||
* Keep the depth/back buffer state here to accommodate private buffers
|
||||
* in the future.
|
||||
*/
|
||||
#define I810_DESTREG_DI0 0 /* CMD_OP_DESTBUFFER_INFO (2 dwords) */
|
||||
#define I810_DESTREG_DI1 1
|
||||
#define I810_DESTREG_DV0 2 /* GFX_OP_DESTBUFFER_VARS (2 dwords) */
|
||||
#define I810_DESTREG_DV1 3
|
||||
#define I810_DESTREG_DR0 4 /* GFX_OP_DRAWRECT_INFO (4 dwords) */
|
||||
#define I810_DESTREG_DR1 5
|
||||
#define I810_DESTREG_DR2 6
|
||||
#define I810_DESTREG_DR3 7
|
||||
#define I810_DESTREG_DR4 8
|
||||
#define I810_DEST_SETUP_SIZE 10
|
||||
|
||||
/* Context state
|
||||
*/
|
||||
#define I810_CTXREG_CF0 0 /* GFX_OP_COLOR_FACTOR */
|
||||
#define I810_CTXREG_CF1 1
|
||||
#define I810_CTXREG_ST0 2 /* GFX_OP_STIPPLE */
|
||||
#define I810_CTXREG_ST1 3
|
||||
#define I810_CTXREG_VF 4 /* GFX_OP_VERTEX_FMT */
|
||||
#define I810_CTXREG_MT 5 /* GFX_OP_MAP_TEXELS */
|
||||
#define I810_CTXREG_MC0 6 /* GFX_OP_MAP_COLOR_STAGES - stage 0 */
|
||||
#define I810_CTXREG_MC1 7 /* GFX_OP_MAP_COLOR_STAGES - stage 1 */
|
||||
#define I810_CTXREG_MC2 8 /* GFX_OP_MAP_COLOR_STAGES - stage 2 */
|
||||
#define I810_CTXREG_MA0 9 /* GFX_OP_MAP_ALPHA_STAGES - stage 0 */
|
||||
#define I810_CTXREG_MA1 10 /* GFX_OP_MAP_ALPHA_STAGES - stage 1 */
|
||||
#define I810_CTXREG_MA2 11 /* GFX_OP_MAP_ALPHA_STAGES - stage 2 */
|
||||
#define I810_CTXREG_SDM 12 /* GFX_OP_SRC_DEST_MONO */
|
||||
#define I810_CTXREG_FOG 13 /* GFX_OP_FOG_COLOR */
|
||||
#define I810_CTXREG_B1 14 /* GFX_OP_BOOL_1 */
|
||||
#define I810_CTXREG_B2 15 /* GFX_OP_BOOL_2 */
|
||||
#define I810_CTXREG_LCS 16 /* GFX_OP_LINEWIDTH_CULL_SHADE_MODE */
|
||||
#define I810_CTXREG_PV 17 /* GFX_OP_PV_RULE -- Invarient! */
|
||||
#define I810_CTXREG_ZA 18 /* GFX_OP_ZBIAS_ALPHAFUNC */
|
||||
#define I810_CTXREG_AA 19 /* GFX_OP_ANTIALIAS */
|
||||
#define I810_CTX_SETUP_SIZE 20
|
||||
|
||||
/* Texture state (per tex unit)
|
||||
*/
|
||||
#define I810_TEXREG_MI0 0 /* GFX_OP_MAP_INFO (4 dwords) */
|
||||
#define I810_TEXREG_MI1 1
|
||||
#define I810_TEXREG_MI2 2
|
||||
#define I810_TEXREG_MI3 3
|
||||
#define I810_TEXREG_MF 4 /* GFX_OP_MAP_FILTER */
|
||||
#define I810_TEXREG_MLC 5 /* GFX_OP_MAP_LOD_CTL */
|
||||
#define I810_TEXREG_MLL 6 /* GFX_OP_MAP_LOD_LIMITS */
|
||||
#define I810_TEXREG_MCS 7 /* GFX_OP_MAP_COORD_SETS ??? */
|
||||
#define I810_TEX_SETUP_SIZE 8
|
||||
|
||||
/* Flags for clear ioctl
|
||||
*/
|
||||
#define I810_FRONT 0x1
|
||||
#define I810_BACK 0x2
|
||||
#define I810_DEPTH 0x4
|
||||
|
||||
typedef enum _drm_i810_init_func {
|
||||
I810_INIT_DMA = 0x01,
|
||||
I810_CLEANUP_DMA = 0x02,
|
||||
I810_INIT_DMA_1_4 = 0x03
|
||||
} drm_i810_init_func_t;
|
||||
|
||||
/* This is the init structure after v1.2 */
|
||||
typedef struct _drm_i810_init {
|
||||
drm_i810_init_func_t func;
|
||||
unsigned int mmio_offset;
|
||||
unsigned int buffers_offset;
|
||||
int sarea_priv_offset;
|
||||
unsigned int ring_start;
|
||||
unsigned int ring_end;
|
||||
unsigned int ring_size;
|
||||
unsigned int front_offset;
|
||||
unsigned int back_offset;
|
||||
unsigned int depth_offset;
|
||||
unsigned int overlay_offset;
|
||||
unsigned int overlay_physical;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
unsigned int pitch;
|
||||
unsigned int pitch_bits;
|
||||
} drm_i810_init_t;
|
||||
|
||||
/* This is the init structure prior to v1.2 */
|
||||
typedef struct _drm_i810_pre12_init {
|
||||
drm_i810_init_func_t func;
|
||||
unsigned int mmio_offset;
|
||||
unsigned int buffers_offset;
|
||||
int sarea_priv_offset;
|
||||
unsigned int ring_start;
|
||||
unsigned int ring_end;
|
||||
unsigned int ring_size;
|
||||
unsigned int front_offset;
|
||||
unsigned int back_offset;
|
||||
unsigned int depth_offset;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
unsigned int pitch;
|
||||
unsigned int pitch_bits;
|
||||
} drm_i810_pre12_init_t;
|
||||
|
||||
/* Warning: If you change the SAREA structure you must change the Xserver
|
||||
* structure as well */
|
||||
|
||||
typedef struct _drm_i810_tex_region {
|
||||
unsigned char next, prev; /* indices to form a circular LRU */
|
||||
unsigned char in_use; /* owned by a client, or free? */
|
||||
int age; /* tracked by clients to update local LRU's */
|
||||
} drm_i810_tex_region_t;
|
||||
|
||||
typedef struct _drm_i810_sarea {
|
||||
unsigned int ContextState[I810_CTX_SETUP_SIZE];
|
||||
unsigned int BufferState[I810_DEST_SETUP_SIZE];
|
||||
unsigned int TexState[2][I810_TEX_SETUP_SIZE];
|
||||
unsigned int dirty;
|
||||
|
||||
unsigned int nbox;
|
||||
struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];
|
||||
|
||||
/* Maintain an LRU of contiguous regions of texture space. If
|
||||
* you think you own a region of texture memory, and it has an
|
||||
* age different to the one you set, then you are mistaken and
|
||||
* it has been stolen by another client. If global texAge
|
||||
* hasn't changed, there is no need to walk the list.
|
||||
*
|
||||
* These regions can be used as a proxy for the fine-grained
|
||||
* texture information of other clients - by maintaining them
|
||||
* in the same lru which is used to age their own textures,
|
||||
* clients have an approximate lru for the whole of global
|
||||
* texture space, and can make informed decisions as to which
|
||||
* areas to kick out. There is no need to choose whether to
|
||||
* kick out your own texture or someone else's - simply eject
|
||||
* them all in LRU order.
|
||||
*/
|
||||
|
||||
drm_i810_tex_region_t texList[I810_NR_TEX_REGIONS + 1];
|
||||
/* Last elt is sentinal */
|
||||
int texAge; /* last time texture was uploaded */
|
||||
int last_enqueue; /* last time a buffer was enqueued */
|
||||
int last_dispatch; /* age of the most recently dispatched buffer */
|
||||
int last_quiescent; /* */
|
||||
int ctxOwner; /* last context to upload state */
|
||||
|
||||
int vertex_prim;
|
||||
|
||||
int pf_enabled; /* is pageflipping allowed? */
|
||||
int pf_active;
|
||||
int pf_current_page; /* which buffer is being displayed? */
|
||||
} drm_i810_sarea_t;
|
||||
|
||||
/* WARNING: If you change any of these defines, make sure to change the
|
||||
* defines in the Xserver file (xf86drmMga.h)
|
||||
*/
|
||||
|
||||
/* i810 specific ioctls
|
||||
* The device specific ioctl range is 0x40 to 0x79.
|
||||
*/
|
||||
#define DRM_I810_INIT 0x00
|
||||
#define DRM_I810_VERTEX 0x01
|
||||
#define DRM_I810_CLEAR 0x02
|
||||
#define DRM_I810_FLUSH 0x03
|
||||
#define DRM_I810_GETAGE 0x04
|
||||
#define DRM_I810_GETBUF 0x05
|
||||
#define DRM_I810_SWAP 0x06
|
||||
#define DRM_I810_COPY 0x07
|
||||
#define DRM_I810_DOCOPY 0x08
|
||||
#define DRM_I810_OV0INFO 0x09
|
||||
#define DRM_I810_FSTATUS 0x0a
|
||||
#define DRM_I810_OV0FLIP 0x0b
|
||||
#define DRM_I810_MC 0x0c
|
||||
#define DRM_I810_RSTATUS 0x0d
|
||||
#define DRM_I810_FLIP 0x0e
|
||||
|
||||
#define DRM_IOCTL_I810_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t)
|
||||
#define DRM_IOCTL_I810_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t)
|
||||
#define DRM_IOCTL_I810_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t)
|
||||
#define DRM_IOCTL_I810_FLUSH DRM_IO( DRM_COMMAND_BASE + DRM_I810_FLUSH)
|
||||
#define DRM_IOCTL_I810_GETAGE DRM_IO( DRM_COMMAND_BASE + DRM_I810_GETAGE)
|
||||
#define DRM_IOCTL_I810_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t)
|
||||
#define DRM_IOCTL_I810_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_I810_SWAP)
|
||||
#define DRM_IOCTL_I810_COPY DRM_IOW( DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t)
|
||||
#define DRM_IOCTL_I810_DOCOPY DRM_IO( DRM_COMMAND_BASE + DRM_I810_DOCOPY)
|
||||
#define DRM_IOCTL_I810_OV0INFO DRM_IOR( DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t)
|
||||
#define DRM_IOCTL_I810_FSTATUS DRM_IO ( DRM_COMMAND_BASE + DRM_I810_FSTATUS)
|
||||
#define DRM_IOCTL_I810_OV0FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I810_OV0FLIP)
|
||||
#define DRM_IOCTL_I810_MC DRM_IOW( DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t)
|
||||
#define DRM_IOCTL_I810_RSTATUS DRM_IO ( DRM_COMMAND_BASE + DRM_I810_RSTATUS)
|
||||
#define DRM_IOCTL_I810_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I810_FLIP)
|
||||
|
||||
typedef struct _drm_i810_clear {
|
||||
int clear_color;
|
||||
int clear_depth;
|
||||
int flags;
|
||||
} drm_i810_clear_t;
|
||||
|
||||
/* These may be placeholders if we have more cliprects than
|
||||
* I810_NR_SAREA_CLIPRECTS. In that case, the client sets discard to
|
||||
* false, indicating that the buffer will be dispatched again with a
|
||||
* new set of cliprects.
|
||||
*/
|
||||
typedef struct _drm_i810_vertex {
|
||||
int idx; /* buffer index */
|
||||
int used; /* nr bytes in use */
|
||||
int discard; /* client is finished with the buffer? */
|
||||
} drm_i810_vertex_t;
|
||||
|
||||
typedef struct _drm_i810_copy_t {
|
||||
int idx; /* buffer index */
|
||||
int used; /* nr bytes in use */
|
||||
void *address; /* Address to copy from */
|
||||
} drm_i810_copy_t;
|
||||
|
||||
#define PR_TRIANGLES (0x0<<18)
|
||||
#define PR_TRISTRIP_0 (0x1<<18)
|
||||
#define PR_TRISTRIP_1 (0x2<<18)
|
||||
#define PR_TRIFAN (0x3<<18)
|
||||
#define PR_POLYGON (0x4<<18)
|
||||
#define PR_LINES (0x5<<18)
|
||||
#define PR_LINESTRIP (0x6<<18)
|
||||
#define PR_RECTS (0x7<<18)
|
||||
#define PR_MASK (0x7<<18)
|
||||
|
||||
typedef struct drm_i810_dma {
|
||||
void *virtual;
|
||||
int request_idx;
|
||||
int request_size;
|
||||
int granted;
|
||||
} drm_i810_dma_t;
|
||||
|
||||
typedef struct _drm_i810_overlay_t {
|
||||
unsigned int offset; /* Address of the Overlay Regs */
|
||||
unsigned int physical;
|
||||
} drm_i810_overlay_t;
|
||||
|
||||
typedef struct _drm_i810_mc {
|
||||
int idx; /* buffer index */
|
||||
int used; /* nr bytes in use */
|
||||
int num_blocks; /* number of GFXBlocks */
|
||||
int *length; /* List of lengths for GFXBlocks (FUTURE) */
|
||||
unsigned int last_render; /* Last Render Request */
|
||||
} drm_i810_mc_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _I810_DRM_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,427 +0,0 @@
|
||||
/* mga_drm.h -- Public header for the Matrox g200/g400 driver -*- linux-c -*-
|
||||
* Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com
|
||||
*
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Jeff Hartmann <jhartmann@valinux.com>
|
||||
* Keith Whitwell <keith@tungstengraphics.com>
|
||||
*
|
||||
* Rewritten by:
|
||||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
#ifndef __MGA_DRM_H__
|
||||
#define __MGA_DRM_H__
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* WARNING: If you change any of these defines, make sure to change the
|
||||
* defines in the Xserver file (mga_sarea.h)
|
||||
*/
|
||||
|
||||
#ifndef __MGA_SAREA_DEFINES__
|
||||
#define __MGA_SAREA_DEFINES__
|
||||
|
||||
/* WARP pipe flags
|
||||
*/
|
||||
#define MGA_F 0x1 /* fog */
|
||||
#define MGA_A 0x2 /* alpha */
|
||||
#define MGA_S 0x4 /* specular */
|
||||
#define MGA_T2 0x8 /* multitexture */
|
||||
|
||||
#define MGA_WARP_TGZ 0
|
||||
#define MGA_WARP_TGZF (MGA_F)
|
||||
#define MGA_WARP_TGZA (MGA_A)
|
||||
#define MGA_WARP_TGZAF (MGA_F|MGA_A)
|
||||
#define MGA_WARP_TGZS (MGA_S)
|
||||
#define MGA_WARP_TGZSF (MGA_S|MGA_F)
|
||||
#define MGA_WARP_TGZSA (MGA_S|MGA_A)
|
||||
#define MGA_WARP_TGZSAF (MGA_S|MGA_F|MGA_A)
|
||||
#define MGA_WARP_T2GZ (MGA_T2)
|
||||
#define MGA_WARP_T2GZF (MGA_T2|MGA_F)
|
||||
#define MGA_WARP_T2GZA (MGA_T2|MGA_A)
|
||||
#define MGA_WARP_T2GZAF (MGA_T2|MGA_A|MGA_F)
|
||||
#define MGA_WARP_T2GZS (MGA_T2|MGA_S)
|
||||
#define MGA_WARP_T2GZSF (MGA_T2|MGA_S|MGA_F)
|
||||
#define MGA_WARP_T2GZSA (MGA_T2|MGA_S|MGA_A)
|
||||
#define MGA_WARP_T2GZSAF (MGA_T2|MGA_S|MGA_F|MGA_A)
|
||||
|
||||
#define MGA_MAX_G200_PIPES 8 /* no multitex */
|
||||
#define MGA_MAX_G400_PIPES 16
|
||||
#define MGA_MAX_WARP_PIPES MGA_MAX_G400_PIPES
|
||||
#define MGA_WARP_UCODE_SIZE 32768 /* in bytes */
|
||||
|
||||
#define MGA_CARD_TYPE_G200 1
|
||||
#define MGA_CARD_TYPE_G400 2
|
||||
#define MGA_CARD_TYPE_G450 3 /* not currently used */
|
||||
#define MGA_CARD_TYPE_G550 4
|
||||
|
||||
#define MGA_FRONT 0x1
|
||||
#define MGA_BACK 0x2
|
||||
#define MGA_DEPTH 0x4
|
||||
|
||||
/* What needs to be changed for the current vertex dma buffer?
|
||||
*/
|
||||
#define MGA_UPLOAD_CONTEXT 0x1
|
||||
#define MGA_UPLOAD_TEX0 0x2
|
||||
#define MGA_UPLOAD_TEX1 0x4
|
||||
#define MGA_UPLOAD_PIPE 0x8
|
||||
#define MGA_UPLOAD_TEX0IMAGE 0x10 /* handled client-side */
|
||||
#define MGA_UPLOAD_TEX1IMAGE 0x20 /* handled client-side */
|
||||
#define MGA_UPLOAD_2D 0x40
|
||||
#define MGA_WAIT_AGE 0x80 /* handled client-side */
|
||||
#define MGA_UPLOAD_CLIPRECTS 0x100 /* handled client-side */
|
||||
#if 0
|
||||
#define MGA_DMA_FLUSH 0x200 /* set when someone gets the lock
|
||||
quiescent */
|
||||
#endif
|
||||
|
||||
/* 32 buffers of 64k each, total 2 meg.
|
||||
*/
|
||||
#define MGA_BUFFER_SIZE (1 << 16)
|
||||
#define MGA_NUM_BUFFERS 128
|
||||
|
||||
/* Keep these small for testing.
|
||||
*/
|
||||
#define MGA_NR_SAREA_CLIPRECTS 8
|
||||
|
||||
/* 2 heaps (1 for card, 1 for agp), each divided into up to 128
|
||||
* regions, subject to a minimum region size of (1<<16) == 64k.
|
||||
*
|
||||
* Clients may subdivide regions internally, but when sharing between
|
||||
* clients, the region size is the minimum granularity.
|
||||
*/
|
||||
|
||||
#define MGA_CARD_HEAP 0
|
||||
#define MGA_AGP_HEAP 1
|
||||
#define MGA_NR_TEX_HEAPS 2
|
||||
#define MGA_NR_TEX_REGIONS 16
|
||||
#define MGA_LOG_MIN_TEX_REGION_SIZE 16
|
||||
|
||||
#define DRM_MGA_IDLE_RETRY 2048
|
||||
|
||||
#endif /* __MGA_SAREA_DEFINES__ */
|
||||
|
||||
/* Setup registers for 3D context
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned int dstorg;
|
||||
unsigned int maccess;
|
||||
unsigned int plnwt;
|
||||
unsigned int dwgctl;
|
||||
unsigned int alphactrl;
|
||||
unsigned int fogcolor;
|
||||
unsigned int wflag;
|
||||
unsigned int tdualstage0;
|
||||
unsigned int tdualstage1;
|
||||
unsigned int fcol;
|
||||
unsigned int stencil;
|
||||
unsigned int stencilctl;
|
||||
} drm_mga_context_regs_t;
|
||||
|
||||
/* Setup registers for 2D, X server
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned int pitch;
|
||||
} drm_mga_server_regs_t;
|
||||
|
||||
/* Setup registers for each texture unit
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned int texctl;
|
||||
unsigned int texctl2;
|
||||
unsigned int texfilter;
|
||||
unsigned int texbordercol;
|
||||
unsigned int texorg;
|
||||
unsigned int texwidth;
|
||||
unsigned int texheight;
|
||||
unsigned int texorg1;
|
||||
unsigned int texorg2;
|
||||
unsigned int texorg3;
|
||||
unsigned int texorg4;
|
||||
} drm_mga_texture_regs_t;
|
||||
|
||||
/* General aging mechanism
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned int head; /* Position of head pointer */
|
||||
unsigned int wrap; /* Primary DMA wrap count */
|
||||
} drm_mga_age_t;
|
||||
|
||||
typedef struct _drm_mga_sarea {
|
||||
/* The channel for communication of state information to the kernel
|
||||
* on firing a vertex dma buffer.
|
||||
*/
|
||||
drm_mga_context_regs_t context_state;
|
||||
drm_mga_server_regs_t server_state;
|
||||
drm_mga_texture_regs_t tex_state[2];
|
||||
unsigned int warp_pipe;
|
||||
unsigned int dirty;
|
||||
unsigned int vertsize;
|
||||
|
||||
/* The current cliprects, or a subset thereof.
|
||||
*/
|
||||
struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS];
|
||||
unsigned int nbox;
|
||||
|
||||
/* Information about the most recently used 3d drawable. The
|
||||
* client fills in the req_* fields, the server fills in the
|
||||
* exported_ fields and puts the cliprects into boxes, above.
|
||||
*
|
||||
* The client clears the exported_drawable field before
|
||||
* clobbering the boxes data.
|
||||
*/
|
||||
unsigned int req_drawable; /* the X drawable id */
|
||||
unsigned int req_draw_buffer; /* MGA_FRONT or MGA_BACK */
|
||||
|
||||
unsigned int exported_drawable;
|
||||
unsigned int exported_index;
|
||||
unsigned int exported_stamp;
|
||||
unsigned int exported_buffers;
|
||||
unsigned int exported_nfront;
|
||||
unsigned int exported_nback;
|
||||
int exported_back_x, exported_front_x, exported_w;
|
||||
int exported_back_y, exported_front_y, exported_h;
|
||||
struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS];
|
||||
|
||||
/* Counters for aging textures and for client-side throttling.
|
||||
*/
|
||||
unsigned int status[4];
|
||||
unsigned int last_wrap;
|
||||
|
||||
drm_mga_age_t last_frame;
|
||||
unsigned int last_enqueue; /* last time a buffer was enqueued */
|
||||
unsigned int last_dispatch; /* age of the most recently dispatched buffer */
|
||||
unsigned int last_quiescent; /* */
|
||||
|
||||
/* LRU lists for texture memory in agp space and on the card.
|
||||
*/
|
||||
struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1];
|
||||
unsigned int texAge[MGA_NR_TEX_HEAPS];
|
||||
|
||||
/* Mechanism to validate card state.
|
||||
*/
|
||||
int ctxOwner;
|
||||
} drm_mga_sarea_t;
|
||||
|
||||
/* MGA specific ioctls
|
||||
* The device specific ioctl range is 0x40 to 0x79.
|
||||
*/
|
||||
#define DRM_MGA_INIT 0x00
|
||||
#define DRM_MGA_FLUSH 0x01
|
||||
#define DRM_MGA_RESET 0x02
|
||||
#define DRM_MGA_SWAP 0x03
|
||||
#define DRM_MGA_CLEAR 0x04
|
||||
#define DRM_MGA_VERTEX 0x05
|
||||
#define DRM_MGA_INDICES 0x06
|
||||
#define DRM_MGA_ILOAD 0x07
|
||||
#define DRM_MGA_BLIT 0x08
|
||||
#define DRM_MGA_GETPARAM 0x09
|
||||
|
||||
/* 3.2:
|
||||
* ioctls for operating on fences.
|
||||
*/
|
||||
#define DRM_MGA_SET_FENCE 0x0a
|
||||
#define DRM_MGA_WAIT_FENCE 0x0b
|
||||
#define DRM_MGA_DMA_BOOTSTRAP 0x0c
|
||||
|
||||
#define DRM_IOCTL_MGA_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t)
|
||||
#define DRM_IOCTL_MGA_FLUSH DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock)
|
||||
#define DRM_IOCTL_MGA_RESET DRM_IO( DRM_COMMAND_BASE + DRM_MGA_RESET)
|
||||
#define DRM_IOCTL_MGA_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_MGA_SWAP)
|
||||
#define DRM_IOCTL_MGA_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t)
|
||||
#define DRM_IOCTL_MGA_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_VERTEX, drm_mga_vertex_t)
|
||||
#define DRM_IOCTL_MGA_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INDICES, drm_mga_indices_t)
|
||||
#define DRM_IOCTL_MGA_ILOAD DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t)
|
||||
#define DRM_IOCTL_MGA_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t)
|
||||
#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t)
|
||||
#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32)
|
||||
#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32)
|
||||
#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t)
|
||||
|
||||
typedef struct _drm_mga_warp_index {
|
||||
int installed;
|
||||
unsigned long phys_addr;
|
||||
int size;
|
||||
} drm_mga_warp_index_t;
|
||||
|
||||
typedef struct drm_mga_init {
|
||||
enum {
|
||||
MGA_INIT_DMA = 0x01,
|
||||
MGA_CLEANUP_DMA = 0x02
|
||||
} func;
|
||||
|
||||
unsigned long sarea_priv_offset;
|
||||
|
||||
int chipset;
|
||||
int sgram;
|
||||
|
||||
unsigned int maccess;
|
||||
|
||||
unsigned int fb_cpp;
|
||||
unsigned int front_offset, front_pitch;
|
||||
unsigned int back_offset, back_pitch;
|
||||
|
||||
unsigned int depth_cpp;
|
||||
unsigned int depth_offset, depth_pitch;
|
||||
|
||||
unsigned int texture_offset[MGA_NR_TEX_HEAPS];
|
||||
unsigned int texture_size[MGA_NR_TEX_HEAPS];
|
||||
|
||||
unsigned long fb_offset;
|
||||
unsigned long mmio_offset;
|
||||
unsigned long status_offset;
|
||||
unsigned long warp_offset;
|
||||
unsigned long primary_offset;
|
||||
unsigned long buffers_offset;
|
||||
} drm_mga_init_t;
|
||||
|
||||
typedef struct drm_mga_dma_bootstrap {
|
||||
/**
|
||||
* \name AGP texture region
|
||||
*
|
||||
* On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, these fields will
|
||||
* be filled in with the actual AGP texture settings.
|
||||
*
|
||||
* \warning
|
||||
* If these fields are non-zero, but dma_mga_dma_bootstrap::agp_mode
|
||||
* is zero, it means that PCI memory (most likely through the use of
|
||||
* an IOMMU) is being used for "AGP" textures.
|
||||
*/
|
||||
/*@{ */
|
||||
unsigned long texture_handle; /**< Handle used to map AGP textures. */
|
||||
__u32 texture_size; /**< Size of the AGP texture region. */
|
||||
/*@} */
|
||||
|
||||
/**
|
||||
* Requested size of the primary DMA region.
|
||||
*
|
||||
* On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
|
||||
* filled in with the actual AGP mode. If AGP was not available
|
||||
*/
|
||||
__u32 primary_size;
|
||||
|
||||
/**
|
||||
* Requested number of secondary DMA buffers.
|
||||
*
|
||||
* On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
|
||||
* filled in with the actual number of secondary DMA buffers
|
||||
* allocated. Particularly when PCI DMA is used, this may be
|
||||
* (subtantially) less than the number requested.
|
||||
*/
|
||||
__u32 secondary_bin_count;
|
||||
|
||||
/**
|
||||
* Requested size of each secondary DMA buffer.
|
||||
*
|
||||
* While the kernel \b is free to reduce
|
||||
* dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed
|
||||
* to reduce dma_mga_dma_bootstrap::secondary_bin_size.
|
||||
*/
|
||||
__u32 secondary_bin_size;
|
||||
|
||||
/**
|
||||
* Bit-wise mask of AGPSTAT2_* values. Currently only \c AGPSTAT2_1X,
|
||||
* \c AGPSTAT2_2X, and \c AGPSTAT2_4X are supported. If this value is
|
||||
* zero, it means that PCI DMA should be used, even if AGP is
|
||||
* possible.
|
||||
*
|
||||
* On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
|
||||
* filled in with the actual AGP mode. If AGP was not available
|
||||
* (i.e., PCI DMA was used), this value will be zero.
|
||||
*/
|
||||
__u32 agp_mode;
|
||||
|
||||
/**
|
||||
* Desired AGP GART size, measured in megabytes.
|
||||
*/
|
||||
__u8 agp_size;
|
||||
} drm_mga_dma_bootstrap_t;
|
||||
|
||||
typedef struct drm_mga_clear {
|
||||
unsigned int flags;
|
||||
unsigned int clear_color;
|
||||
unsigned int clear_depth;
|
||||
unsigned int color_mask;
|
||||
unsigned int depth_mask;
|
||||
} drm_mga_clear_t;
|
||||
|
||||
typedef struct drm_mga_vertex {
|
||||
int idx; /* buffer to queue */
|
||||
int used; /* bytes in use */
|
||||
int discard; /* client finished with buffer? */
|
||||
} drm_mga_vertex_t;
|
||||
|
||||
typedef struct drm_mga_indices {
|
||||
int idx; /* buffer to queue */
|
||||
unsigned int start;
|
||||
unsigned int end;
|
||||
int discard; /* client finished with buffer? */
|
||||
} drm_mga_indices_t;
|
||||
|
||||
typedef struct drm_mga_iload {
|
||||
int idx;
|
||||
unsigned int dstorg;
|
||||
unsigned int length;
|
||||
} drm_mga_iload_t;
|
||||
|
||||
typedef struct _drm_mga_blit {
|
||||
unsigned int planemask;
|
||||
unsigned int srcorg;
|
||||
unsigned int dstorg;
|
||||
int src_pitch, dst_pitch;
|
||||
int delta_sx, delta_sy;
|
||||
int delta_dx, delta_dy;
|
||||
int height, ydir; /* flip image vertically */
|
||||
int source_pitch, dest_pitch;
|
||||
} drm_mga_blit_t;
|
||||
|
||||
/* 3.1: An ioctl to get parameters that aren't available to the 3d
|
||||
* client any other way.
|
||||
*/
|
||||
#define MGA_PARAM_IRQ_NR 1
|
||||
|
||||
/* 3.2: Query the actual card type. The DDX only distinguishes between
|
||||
* G200 chips and non-G200 chips, which it calls G400. It turns out that
|
||||
* there are some very sublte differences between the G4x0 chips and the G550
|
||||
* chips. Using this parameter query, a client-side driver can detect the
|
||||
* difference between a G4x0 and a G550.
|
||||
*/
|
||||
#define MGA_PARAM_CARD_TYPE 2
|
||||
|
||||
typedef struct drm_mga_getparam {
|
||||
int param;
|
||||
void *value;
|
||||
} drm_mga_getparam_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -1,308 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __MSM_DRM_H__
|
||||
#define __MSM_DRM_H__
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints:
|
||||
* 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
|
||||
* user/kernel compatibility
|
||||
* 2) Keep fields aligned to their size
|
||||
* 3) Because of how drm_ioctl() works, we can add new fields at
|
||||
* the end of an ioctl if some care is taken: drm_ioctl() will
|
||||
* zero out the new fields at the tail of the ioctl, so a zero
|
||||
* value should have a backwards compatible meaning. And for
|
||||
* output params, userspace won't see the newly added output
|
||||
* fields.. so that has to be somehow ok.
|
||||
*/
|
||||
|
||||
#define MSM_PIPE_NONE 0x00
|
||||
#define MSM_PIPE_2D0 0x01
|
||||
#define MSM_PIPE_2D1 0x02
|
||||
#define MSM_PIPE_3D0 0x10
|
||||
|
||||
/* The pipe-id just uses the lower bits, so can be OR'd with flags in
|
||||
* the upper 16 bits (which could be extended further, if needed, maybe
|
||||
* we extend/overload the pipe-id some day to deal with multiple rings,
|
||||
* but even then I don't think we need the full lower 16 bits).
|
||||
*/
|
||||
#define MSM_PIPE_ID_MASK 0xffff
|
||||
#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK)
|
||||
#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK)
|
||||
|
||||
/* timeouts are specified in clock-monotonic absolute times (to simplify
|
||||
* restarting interrupted ioctls). The following struct is logically the
|
||||
* same as 'struct timespec' but 32/64b ABI safe.
|
||||
*/
|
||||
struct drm_msm_timespec {
|
||||
__s64 tv_sec; /* seconds */
|
||||
__s64 tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
#define MSM_PARAM_GPU_ID 0x01
|
||||
#define MSM_PARAM_GMEM_SIZE 0x02
|
||||
#define MSM_PARAM_CHIP_ID 0x03
|
||||
#define MSM_PARAM_MAX_FREQ 0x04
|
||||
#define MSM_PARAM_TIMESTAMP 0x05
|
||||
#define MSM_PARAM_GMEM_BASE 0x06
|
||||
#define MSM_PARAM_NR_RINGS 0x07
|
||||
|
||||
struct drm_msm_param {
|
||||
__u32 pipe; /* in, MSM_PIPE_x */
|
||||
__u32 param; /* in, MSM_PARAM_x */
|
||||
__u64 value; /* out (get_param) or in (set_param) */
|
||||
};
|
||||
|
||||
/*
|
||||
* GEM buffers:
|
||||
*/
|
||||
|
||||
#define MSM_BO_SCANOUT 0x00000001 /* scanout capable */
|
||||
#define MSM_BO_GPU_READONLY 0x00000002
|
||||
#define MSM_BO_CACHE_MASK 0x000f0000
|
||||
/* cache modes */
|
||||
#define MSM_BO_CACHED 0x00010000
|
||||
#define MSM_BO_WC 0x00020000
|
||||
#define MSM_BO_UNCACHED 0x00040000
|
||||
|
||||
#define MSM_BO_FLAGS (MSM_BO_SCANOUT | \
|
||||
MSM_BO_GPU_READONLY | \
|
||||
MSM_BO_CACHED | \
|
||||
MSM_BO_WC | \
|
||||
MSM_BO_UNCACHED)
|
||||
|
||||
struct drm_msm_gem_new {
|
||||
__u64 size; /* in */
|
||||
__u32 flags; /* in, mask of MSM_BO_x */
|
||||
__u32 handle; /* out */
|
||||
};
|
||||
|
||||
#define MSM_INFO_IOVA 0x01
|
||||
|
||||
#define MSM_INFO_FLAGS (MSM_INFO_IOVA)
|
||||
|
||||
struct drm_msm_gem_info {
|
||||
__u32 handle; /* in */
|
||||
__u32 flags; /* in - combination of MSM_INFO_* flags */
|
||||
__u64 offset; /* out, mmap() offset or iova */
|
||||
};
|
||||
|
||||
#define MSM_PREP_READ 0x01
|
||||
#define MSM_PREP_WRITE 0x02
|
||||
#define MSM_PREP_NOSYNC 0x04
|
||||
|
||||
#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC)
|
||||
|
||||
struct drm_msm_gem_cpu_prep {
|
||||
__u32 handle; /* in */
|
||||
__u32 op; /* in, mask of MSM_PREP_x */
|
||||
struct drm_msm_timespec timeout; /* in */
|
||||
};
|
||||
|
||||
struct drm_msm_gem_cpu_fini {
|
||||
__u32 handle; /* in */
|
||||
};
|
||||
|
||||
/*
|
||||
* Cmdstream Submission:
|
||||
*/
|
||||
|
||||
/* The value written into the cmdstream is logically:
|
||||
*
|
||||
* ((relocbuf->gpuaddr + reloc_offset) << shift) | or
|
||||
*
|
||||
* When we have GPU's w/ >32bit ptrs, it should be possible to deal
|
||||
* with this by emit'ing two reloc entries with appropriate shift
|
||||
* values. Or a new MSM_SUBMIT_CMD_x type would also be an option.
|
||||
*
|
||||
* NOTE that reloc's must be sorted by order of increasing submit_offset,
|
||||
* otherwise EINVAL.
|
||||
*/
|
||||
struct drm_msm_gem_submit_reloc {
|
||||
__u32 submit_offset; /* in, offset from submit_bo */
|
||||
__u32 or; /* in, value OR'd with result */
|
||||
__s32 shift; /* in, amount of left shift (can be negative) */
|
||||
__u32 reloc_idx; /* in, index of reloc_bo buffer */
|
||||
__u64 reloc_offset; /* in, offset from start of reloc_bo */
|
||||
};
|
||||
|
||||
/* submit-types:
|
||||
* BUF - this cmd buffer is executed normally.
|
||||
* IB_TARGET_BUF - this cmd buffer is an IB target. Reloc's are
|
||||
* processed normally, but the kernel does not setup an IB to
|
||||
* this buffer in the first-level ringbuffer
|
||||
* CTX_RESTORE_BUF - only executed if there has been a GPU context
|
||||
* switch since the last SUBMIT ioctl
|
||||
*/
|
||||
#define MSM_SUBMIT_CMD_BUF 0x0001
|
||||
#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002
|
||||
#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003
|
||||
struct drm_msm_gem_submit_cmd {
|
||||
__u32 type; /* in, one of MSM_SUBMIT_CMD_x */
|
||||
__u32 submit_idx; /* in, index of submit_bo cmdstream buffer */
|
||||
__u32 submit_offset; /* in, offset into submit_bo */
|
||||
__u32 size; /* in, cmdstream size */
|
||||
__u32 pad;
|
||||
__u32 nr_relocs; /* in, number of submit_reloc's */
|
||||
__u64 relocs; /* in, ptr to array of submit_reloc's */
|
||||
};
|
||||
|
||||
/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
|
||||
* cmdstream buffer(s) themselves or reloc entries) has one (and only
|
||||
* one) entry in the submit->bos[] table.
|
||||
*
|
||||
* As a optimization, the current buffer (gpu virtual address) can be
|
||||
* passed back through the 'presumed' field. If on a subsequent reloc,
|
||||
* userspace passes back a 'presumed' address that is still valid,
|
||||
* then patching the cmdstream for this entry is skipped. This can
|
||||
* avoid kernel needing to map/access the cmdstream bo in the common
|
||||
* case.
|
||||
*/
|
||||
#define MSM_SUBMIT_BO_READ 0x0001
|
||||
#define MSM_SUBMIT_BO_WRITE 0x0002
|
||||
|
||||
#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE)
|
||||
|
||||
struct drm_msm_gem_submit_bo {
|
||||
__u32 flags; /* in, mask of MSM_SUBMIT_BO_x */
|
||||
__u32 handle; /* in, GEM handle */
|
||||
__u64 presumed; /* in/out, presumed buffer address */
|
||||
};
|
||||
|
||||
/* Valid submit ioctl flags: */
|
||||
#define MSM_SUBMIT_NO_IMPLICIT 0x80000000 /* disable implicit sync */
|
||||
#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 /* enable input fence_fd */
|
||||
#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 /* enable output fence_fd */
|
||||
#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */
|
||||
#define MSM_SUBMIT_FLAGS ( \
|
||||
MSM_SUBMIT_NO_IMPLICIT | \
|
||||
MSM_SUBMIT_FENCE_FD_IN | \
|
||||
MSM_SUBMIT_FENCE_FD_OUT | \
|
||||
MSM_SUBMIT_SUDO | \
|
||||
0)
|
||||
|
||||
/* Each cmdstream submit consists of a table of buffers involved, and
|
||||
* one or more cmdstream buffers. This allows for conditional execution
|
||||
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
|
||||
*/
|
||||
struct drm_msm_gem_submit {
|
||||
__u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
|
||||
__u32 fence; /* out */
|
||||
__u32 nr_bos; /* in, number of submit_bo's */
|
||||
__u32 nr_cmds; /* in, number of submit_cmd's */
|
||||
__u64 bos; /* in, ptr to array of submit_bo's */
|
||||
__u64 cmds; /* in, ptr to array of submit_cmd's */
|
||||
__s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
|
||||
__u32 queueid; /* in, submitqueue id */
|
||||
};
|
||||
|
||||
/* The normal way to synchronize with the GPU is just to CPU_PREP on
|
||||
* a buffer if you need to access it from the CPU (other cmdstream
|
||||
* submission from same or other contexts, PAGE_FLIP ioctl, etc, all
|
||||
* handle the required synchronization under the hood). This ioctl
|
||||
* mainly just exists as a way to implement the gallium pipe_fence
|
||||
* APIs without requiring a dummy bo to synchronize on.
|
||||
*/
|
||||
struct drm_msm_wait_fence {
|
||||
__u32 fence; /* in */
|
||||
__u32 pad;
|
||||
struct drm_msm_timespec timeout; /* in */
|
||||
__u32 queueid; /* in, submitqueue id */
|
||||
};
|
||||
|
||||
/* madvise provides a way to tell the kernel in case a buffers contents
|
||||
* can be discarded under memory pressure, which is useful for userspace
|
||||
* bo cache where we want to optimistically hold on to buffer allocate
|
||||
* and potential mmap, but allow the pages to be discarded under memory
|
||||
* pressure.
|
||||
*
|
||||
* Typical usage would involve madvise(DONTNEED) when buffer enters BO
|
||||
* cache, and madvise(WILLNEED) if trying to recycle buffer from BO cache.
|
||||
* In the WILLNEED case, 'retained' indicates to userspace whether the
|
||||
* backing pages still exist.
|
||||
*/
|
||||
#define MSM_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */
|
||||
#define MSM_MADV_DONTNEED 1 /* backing pages not needed */
|
||||
#define __MSM_MADV_PURGED 2 /* internal state */
|
||||
|
||||
struct drm_msm_gem_madvise {
|
||||
__u32 handle; /* in, GEM handle */
|
||||
__u32 madv; /* in, MSM_MADV_x */
|
||||
__u32 retained; /* out, whether backing store still exists */
|
||||
};
|
||||
|
||||
/*
|
||||
* Draw queues allow the user to set specific submission parameter. Command
|
||||
* submissions specify a specific submitqueue to use. ID 0 is reserved for
|
||||
* backwards compatibility as a "default" submitqueue
|
||||
*/
|
||||
|
||||
#define MSM_SUBMITQUEUE_FLAGS (0)
|
||||
|
||||
struct drm_msm_submitqueue {
|
||||
__u32 flags; /* in, MSM_SUBMITQUEUE_x */
|
||||
__u32 prio; /* in, Priority level */
|
||||
__u32 id; /* out, identifier */
|
||||
};
|
||||
|
||||
#define DRM_MSM_GET_PARAM 0x00
|
||||
/* placeholder:
|
||||
#define DRM_MSM_SET_PARAM 0x01
|
||||
*/
|
||||
#define DRM_MSM_GEM_NEW 0x02
|
||||
#define DRM_MSM_GEM_INFO 0x03
|
||||
#define DRM_MSM_GEM_CPU_PREP 0x04
|
||||
#define DRM_MSM_GEM_CPU_FINI 0x05
|
||||
#define DRM_MSM_GEM_SUBMIT 0x06
|
||||
#define DRM_MSM_WAIT_FENCE 0x07
|
||||
#define DRM_MSM_GEM_MADVISE 0x08
|
||||
/* placeholder:
|
||||
#define DRM_MSM_GEM_SVM_NEW 0x09
|
||||
*/
|
||||
#define DRM_MSM_SUBMITQUEUE_NEW 0x0A
|
||||
#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
|
||||
|
||||
#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
|
||||
#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
|
||||
#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
|
||||
#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
|
||||
#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
|
||||
#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
|
||||
#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
|
||||
#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise)
|
||||
#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue)
|
||||
#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MSM_DRM_H__ */
|
||||
@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Copyright 2005 Stephane Marchesin.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __NOUVEAU_DRM_H__
|
||||
#define __NOUVEAU_DRM_H__
|
||||
|
||||
#define DRM_NOUVEAU_EVENT_NVIF 0x80000000
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
|
||||
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
|
||||
#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
|
||||
#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
|
||||
#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4)
|
||||
|
||||
#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */
|
||||
#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00
|
||||
#define NOUVEAU_GEM_TILE_16BPP 0x00000001
|
||||
#define NOUVEAU_GEM_TILE_32BPP 0x00000002
|
||||
#define NOUVEAU_GEM_TILE_ZETA 0x00000004
|
||||
#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008
|
||||
|
||||
struct drm_nouveau_gem_info {
|
||||
__u32 handle;
|
||||
__u32 domain;
|
||||
__u64 size;
|
||||
__u64 offset;
|
||||
__u64 map_handle;
|
||||
__u32 tile_mode;
|
||||
__u32 tile_flags;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_new {
|
||||
struct drm_nouveau_gem_info info;
|
||||
__u32 channel_hint;
|
||||
__u32 align;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_MAX_BUFFERS 1024
|
||||
struct drm_nouveau_gem_pushbuf_bo_presumed {
|
||||
__u32 valid;
|
||||
__u32 domain;
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_pushbuf_bo {
|
||||
__u64 user_priv;
|
||||
__u32 handle;
|
||||
__u32 read_domains;
|
||||
__u32 write_domains;
|
||||
__u32 valid_domains;
|
||||
struct drm_nouveau_gem_pushbuf_bo_presumed presumed;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_RELOC_LOW (1 << 0)
|
||||
#define NOUVEAU_GEM_RELOC_HIGH (1 << 1)
|
||||
#define NOUVEAU_GEM_RELOC_OR (1 << 2)
|
||||
#define NOUVEAU_GEM_MAX_RELOCS 1024
|
||||
struct drm_nouveau_gem_pushbuf_reloc {
|
||||
__u32 reloc_bo_index;
|
||||
__u32 reloc_bo_offset;
|
||||
__u32 bo_index;
|
||||
__u32 flags;
|
||||
__u32 data;
|
||||
__u32 vor;
|
||||
__u32 tor;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_MAX_PUSH 512
|
||||
struct drm_nouveau_gem_pushbuf_push {
|
||||
__u32 bo_index;
|
||||
__u32 pad;
|
||||
__u64 offset;
|
||||
__u64 length;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_pushbuf {
|
||||
__u32 channel;
|
||||
__u32 nr_buffers;
|
||||
__u64 buffers;
|
||||
__u32 nr_relocs;
|
||||
__u32 nr_push;
|
||||
__u64 relocs;
|
||||
__u64 push;
|
||||
__u32 suffix0;
|
||||
__u32 suffix1;
|
||||
__u64 vram_available;
|
||||
__u64 gart_available;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001
|
||||
#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004
|
||||
struct drm_nouveau_gem_cpu_prep {
|
||||
__u32 handle;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_cpu_fini {
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define DRM_NOUVEAU_GETPARAM 0x00 /* deprecated */
|
||||
#define DRM_NOUVEAU_SETPARAM 0x01 /* deprecated */
|
||||
#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 /* deprecated */
|
||||
#define DRM_NOUVEAU_CHANNEL_FREE 0x03 /* deprecated */
|
||||
#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */
|
||||
#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */
|
||||
#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */
|
||||
#define DRM_NOUVEAU_NVIF 0x07
|
||||
#define DRM_NOUVEAU_GEM_NEW 0x40
|
||||
#define DRM_NOUVEAU_GEM_PUSHBUF 0x41
|
||||
#define DRM_NOUVEAU_GEM_CPU_PREP 0x42
|
||||
#define DRM_NOUVEAU_GEM_CPU_FINI 0x43
|
||||
#define DRM_NOUVEAU_GEM_INFO 0x44
|
||||
|
||||
#define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new)
|
||||
#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf)
|
||||
#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep)
|
||||
#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini)
|
||||
#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NOUVEAU_DRM_H__ */
|
||||
@ -1,126 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* include/uapi/drm/omap_drm.h
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments
|
||||
* Author: Rob Clark <rob@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_DRM_H__
|
||||
#define __OMAP_DRM_H__
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints.
|
||||
*/
|
||||
|
||||
#define OMAP_PARAM_CHIPSET_ID 1 /* ie. 0x3430, 0x4430, etc */
|
||||
|
||||
struct drm_omap_param {
|
||||
__u64 param; /* in */
|
||||
__u64 value; /* in (set_param), out (get_param) */
|
||||
};
|
||||
|
||||
#define OMAP_BO_SCANOUT 0x00000001 /* scanout capable (phys contiguous) */
|
||||
#define OMAP_BO_CACHE_MASK 0x00000006 /* cache type mask, see cache modes */
|
||||
#define OMAP_BO_TILED_MASK 0x00000f00 /* tiled mapping mask, see tiled modes */
|
||||
|
||||
/* cache modes */
|
||||
#define OMAP_BO_CACHED 0x00000000 /* default */
|
||||
#define OMAP_BO_WC 0x00000002 /* write-combine */
|
||||
#define OMAP_BO_UNCACHED 0x00000004 /* strongly-ordered (uncached) */
|
||||
|
||||
/* tiled modes */
|
||||
#define OMAP_BO_TILED_8 0x00000100
|
||||
#define OMAP_BO_TILED_16 0x00000200
|
||||
#define OMAP_BO_TILED_32 0x00000300
|
||||
#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
|
||||
|
||||
union omap_gem_size {
|
||||
__u32 bytes; /* (for non-tiled formats) */
|
||||
struct {
|
||||
__u16 width;
|
||||
__u16 height;
|
||||
} tiled; /* (for tiled formats) */
|
||||
};
|
||||
|
||||
struct drm_omap_gem_new {
|
||||
union omap_gem_size size; /* in */
|
||||
__u32 flags; /* in */
|
||||
__u32 handle; /* out */
|
||||
__u32 __pad;
|
||||
};
|
||||
|
||||
/* mask of operations: */
|
||||
enum omap_gem_op {
|
||||
OMAP_GEM_READ = 0x01,
|
||||
OMAP_GEM_WRITE = 0x02,
|
||||
};
|
||||
|
||||
struct drm_omap_gem_cpu_prep {
|
||||
__u32 handle; /* buffer handle (in) */
|
||||
__u32 op; /* mask of omap_gem_op (in) */
|
||||
};
|
||||
|
||||
struct drm_omap_gem_cpu_fini {
|
||||
__u32 handle; /* buffer handle (in) */
|
||||
__u32 op; /* mask of omap_gem_op (in) */
|
||||
/* TODO maybe here we pass down info about what regions are touched
|
||||
* by sw so we can be clever about cache ops? For now a placeholder,
|
||||
* set to zero and we just do full buffer flush..
|
||||
*/
|
||||
__u32 nregions;
|
||||
__u32 __pad;
|
||||
};
|
||||
|
||||
struct drm_omap_gem_info {
|
||||
__u32 handle; /* buffer handle (in) */
|
||||
__u32 pad;
|
||||
__u64 offset; /* mmap offset (out) */
|
||||
/* note: in case of tiled buffers, the user virtual size can be
|
||||
* different from the physical size (ie. how many pages are needed
|
||||
* to back the object) which is returned in DRM_IOCTL_GEM_OPEN..
|
||||
* This size here is the one that should be used if you want to
|
||||
* mmap() the buffer:
|
||||
*/
|
||||
__u32 size; /* virtual size for mmap'ing (out) */
|
||||
__u32 __pad;
|
||||
};
|
||||
|
||||
#define DRM_OMAP_GET_PARAM 0x00
|
||||
#define DRM_OMAP_SET_PARAM 0x01
|
||||
#define DRM_OMAP_GEM_NEW 0x03
|
||||
#define DRM_OMAP_GEM_CPU_PREP 0x04 /* Deprecated, to be removed */
|
||||
#define DRM_OMAP_GEM_CPU_FINI 0x05 /* Deprecated, to be removed */
|
||||
#define DRM_OMAP_GEM_INFO 0x06
|
||||
#define DRM_OMAP_NUM_IOCTLS 0x07
|
||||
|
||||
#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
|
||||
#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
|
||||
#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
|
||||
#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
|
||||
#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
|
||||
#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OMAP_DRM_H__ */
|
||||
@ -1,158 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 Red Hat
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef QXL_DRM_H
|
||||
#define QXL_DRM_H
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints.
|
||||
*
|
||||
* Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
|
||||
* compatibility Keep fields aligned to their size
|
||||
*/
|
||||
|
||||
#define QXL_GEM_DOMAIN_CPU 0
|
||||
#define QXL_GEM_DOMAIN_VRAM 1
|
||||
#define QXL_GEM_DOMAIN_SURFACE 2
|
||||
|
||||
#define DRM_QXL_ALLOC 0x00
|
||||
#define DRM_QXL_MAP 0x01
|
||||
#define DRM_QXL_EXECBUFFER 0x02
|
||||
#define DRM_QXL_UPDATE_AREA 0x03
|
||||
#define DRM_QXL_GETPARAM 0x04
|
||||
#define DRM_QXL_CLIENTCAP 0x05
|
||||
|
||||
#define DRM_QXL_ALLOC_SURF 0x06
|
||||
|
||||
struct drm_qxl_alloc {
|
||||
__u32 size;
|
||||
__u32 handle; /* 0 is an invalid handle */
|
||||
};
|
||||
|
||||
struct drm_qxl_map {
|
||||
__u64 offset; /* use for mmap system call */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/*
|
||||
* dest is the bo we are writing the relocation into
|
||||
* src is bo we are relocating.
|
||||
* *(dest_handle.base_addr + dest_offset) = physical_address(src_handle.addr +
|
||||
* src_offset)
|
||||
*/
|
||||
#define QXL_RELOC_TYPE_BO 1
|
||||
#define QXL_RELOC_TYPE_SURF 2
|
||||
|
||||
struct drm_qxl_reloc {
|
||||
__u64 src_offset; /* offset into src_handle or src buffer */
|
||||
__u64 dst_offset; /* offset in dest handle */
|
||||
__u32 src_handle; /* dest handle to compute address from */
|
||||
__u32 dst_handle; /* 0 if to command buffer */
|
||||
__u32 reloc_type;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_qxl_command {
|
||||
__u64 command; /* void* */
|
||||
__u64 relocs; /* struct drm_qxl_reloc* */
|
||||
__u32 type;
|
||||
__u32 command_size;
|
||||
__u32 relocs_num;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_qxl_execbuffer {
|
||||
__u32 flags; /* for future use */
|
||||
__u32 commands_num;
|
||||
__u64 commands; /* struct drm_qxl_command* */
|
||||
};
|
||||
|
||||
struct drm_qxl_update_area {
|
||||
__u32 handle;
|
||||
__u32 top;
|
||||
__u32 left;
|
||||
__u32 bottom;
|
||||
__u32 right;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define QXL_PARAM_NUM_SURFACES 1 /* rom->n_surfaces */
|
||||
#define QXL_PARAM_MAX_RELOCS 2
|
||||
struct drm_qxl_getparam {
|
||||
__u64 param;
|
||||
__u64 value;
|
||||
};
|
||||
|
||||
/* these are one bit values */
|
||||
struct drm_qxl_clientcap {
|
||||
__u32 index;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_qxl_alloc_surf {
|
||||
__u32 format;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__s32 stride;
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_IOCTL_QXL_ALLOC \
|
||||
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc)
|
||||
|
||||
#define DRM_IOCTL_QXL_MAP \
|
||||
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map)
|
||||
|
||||
#define DRM_IOCTL_QXL_EXECBUFFER \
|
||||
DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER,\
|
||||
struct drm_qxl_execbuffer)
|
||||
|
||||
#define DRM_IOCTL_QXL_UPDATE_AREA \
|
||||
DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA,\
|
||||
struct drm_qxl_update_area)
|
||||
|
||||
#define DRM_IOCTL_QXL_GETPARAM \
|
||||
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM,\
|
||||
struct drm_qxl_getparam)
|
||||
|
||||
#define DRM_IOCTL_QXL_CLIENTCAP \
|
||||
DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP,\
|
||||
struct drm_qxl_clientcap)
|
||||
|
||||
#define DRM_IOCTL_QXL_ALLOC_SURF \
|
||||
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\
|
||||
struct drm_qxl_alloc_surf)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user