| author | |
| committer | |
| log | 71a27ebd847bbd09d246eaf6657359ecfa0f8483 |
| tree | 0ca38e8313369e7efc91daa540b0f350c583cffc |
| parent | 291fb43f275b368f425380a3028068c7facafabb |
| parent | 10949a691403988137d3bc7dd629c4e95c243ab3 |
| signature |
Linux 6.10 headers/syscalls310 files changed, 17575 insertions(+), 3299 deletions(-)
lib/libc/include/aarch64-linux-any/asm/hwcap.h+20| ... | @@ -102,5 +102,25 @@ | ... | @@ -102,5 +102,25 @@ |
| 102 | #define HWCAP2_SME_BI32I32	(1UL << 40) | 102 | #define HWCAP2_SME_BI32I32	(1UL << 40) |
| 103 | #define HWCAP2_SME_B16B16	(1UL << 41) | 103 | #define HWCAP2_SME_B16B16	(1UL << 41) |
| 104 | #define HWCAP2_SME_F16F16	(1UL << 42) | 104 | #define HWCAP2_SME_F16F16	(1UL << 42) |
| 105 | #define HWCAP2_MOPS		(1UL << 43) | ||
| 106 | #define HWCAP2_HBC		(1UL << 44) | ||
| 107 | #define HWCAP2_SVE_B16B16	(1UL << 45) | ||
| 108 | #define HWCAP2_LRCPC3		(1UL << 46) | ||
| 109 | #define HWCAP2_LSE128		(1UL << 47) | ||
| 110 | #define HWCAP2_FPMR		(1UL << 48) | ||
| 111 | #define HWCAP2_LUT		(1UL << 49) | ||
| 112 | #define HWCAP2_FAMINMAX		(1UL << 50) | ||
| 113 | #define HWCAP2_F8CVT		(1UL << 51) | ||
| 114 | #define HWCAP2_F8FMA		(1UL << 52) | ||
| 115 | #define HWCAP2_F8DP4		(1UL << 53) | ||
| 116 | #define HWCAP2_F8DP2		(1UL << 54) | ||
| 117 | #define HWCAP2_F8E4M3		(1UL << 55) | ||
| 118 | #define HWCAP2_F8E5M2		(1UL << 56) | ||
| 119 | #define HWCAP2_SME_LUTV2	(1UL << 57) | ||
| 120 | #define HWCAP2_SME_F8F16	(1UL << 58) | ||
| 121 | #define HWCAP2_SME_F8F32	(1UL << 59) | ||
| 122 | #define HWCAP2_SME_SF8FMA	(1UL << 60) | ||
| 123 | #define HWCAP2_SME_SF8DP4	(1UL << 61) | ||
| 124 | #define HWCAP2_SME_SF8DP2	(1UL << 62) | ||
| 105 | 125 | ||
| 106 | #endif /* __ASM_HWCAP_H */ | 126 | #endif /* __ASM_HWCAP_H */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-linux-any/asm/kvm.h+74-6| ... | @@ -37,9 +37,7 @@ | ... | @@ -37,9 +37,7 @@ |
| 37 | #include <asm/ptrace.h> | 37 | #include <asm/ptrace.h> |
| 38 | #include <asm/sve_context.h> | 38 | #include <asm/sve_context.h> |
| 39 | 39 | ||
| 40 | #define __KVM_HAVE_GUEST_DEBUG | ||
| 41 | #define __KVM_HAVE_IRQ_LINE | 40 | #define __KVM_HAVE_IRQ_LINE |
| 42 | #define __KVM_HAVE_READONLY_MEM | ||
| 43 | #define __KVM_HAVE_VCPU_EVENTS | 41 | #define __KVM_HAVE_VCPU_EVENTS |
| 44 | 42 | ||
| 45 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 43 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| ... | @@ -76,11 +74,11 @@ struct kvm_regs { | ... | @@ -76,11 +74,11 @@ struct kvm_regs { |
| 76 | 74 | ||
| 77 | /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ | 75 | /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ |
| 78 | #define KVM_ARM_DEVICE_TYPE_SHIFT	0 | 76 | #define KVM_ARM_DEVICE_TYPE_SHIFT	0 |
| 79 | #define KVM_ARM_DEVICE_TYPE_MASK	GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, \ | 77 | #define KVM_ARM_DEVICE_TYPE_MASK	__GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, \ |
| 80 | 						KVM_ARM_DEVICE_TYPE_SHIFT) | 78 | 						 KVM_ARM_DEVICE_TYPE_SHIFT) |
| 81 | #define KVM_ARM_DEVICE_ID_SHIFT		16 | 79 | #define KVM_ARM_DEVICE_ID_SHIFT		16 |
| 82 | #define KVM_ARM_DEVICE_ID_MASK		GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, \ | 80 | #define KVM_ARM_DEVICE_ID_MASK		__GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, \ |
| 83 | 						KVM_ARM_DEVICE_ID_SHIFT) | 81 | 						 KVM_ARM_DEVICE_ID_SHIFT) |
| 84 | 82 | ||
| 85 | /* Supported device IDs */ | 83 | /* Supported device IDs */ |
| 86 | #define KVM_ARM_DEVICE_VGIC_V2		0 | 84 | #define KVM_ARM_DEVICE_VGIC_V2		0 |
| ... | @@ -162,6 +160,11 @@ struct kvm_sync_regs { | ... | @@ -162,6 +160,11 @@ struct kvm_sync_regs { |
| 162 | 	__u64 device_irq_level; | 160 | 	__u64 device_irq_level; |
| 163 | }; | 161 | }; |
| 164 | 162 | ||
| 163 | /* Bits for run->s.regs.device_irq_level */ | ||
| 164 | #define KVM_ARM_DEV_EL1_VTIMER		(1 << 0) | ||
| 165 | #define KVM_ARM_DEV_EL1_PTIMER		(1 << 1) | ||
| 166 | #define KVM_ARM_DEV_PMU			(1 << 2) | ||
| 167 | |||
| 165 | /* | 168 | /* |
| 166 | * PMU filter structure. Describe a range of events with a particular | 169 | * PMU filter structure. Describe a range of events with a particular |
| 167 | * action. To be used with KVM_ARM_VCPU_PMU_V3_FILTER. | 170 | * action. To be used with KVM_ARM_VCPU_PMU_V3_FILTER. |
| ... | @@ -198,6 +201,15 @@ struct kvm_arm_copy_mte_tags { | ... | @@ -198,6 +201,15 @@ struct kvm_arm_copy_mte_tags { |
| 198 | 	__u64 reserved[2]; | 201 | 	__u64 reserved[2]; |
| 199 | }; | 202 | }; |
| 200 | 203 | ||
| 204 | /* | ||
| 205 | * Counter/Timer offset structure. Describe the virtual/physical offset. | ||
| 206 | * To be used with KVM_ARM_SET_COUNTER_OFFSET. | ||
| 207 | */ | ||
| 208 | struct kvm_arm_counter_offset { | ||
| 209 | 	__u64 counter_offset; | ||
| 210 | 	__u64 reserved; | ||
| 211 | }; | ||
| 212 | |||
| 201 | #define KVM_ARM_TAGS_TO_GUEST		0 | 213 | #define KVM_ARM_TAGS_TO_GUEST		0 |
| 202 | #define KVM_ARM_TAGS_FROM_GUEST		1 | 214 | #define KVM_ARM_TAGS_FROM_GUEST		1 |
| 203 | 215 | ||
| ... | @@ -363,6 +375,10 @@ enum { | ... | @@ -363,6 +375,10 @@ enum { |
| 363 | 	KVM_REG_ARM_VENDOR_HYP_BIT_PTP		= 1, | 375 | 	KVM_REG_ARM_VENDOR_HYP_BIT_PTP		= 1, |
| 364 | }; | 376 | }; |
| 365 | 377 | ||
| 378 | /* Device Control API on vm fd */ | ||
| 379 | #define KVM_ARM_VM_SMCCC_CTRL		0 | ||
| 380 | #define KVM_ARM_VM_SMCCC_FILTER	0 | ||
| 381 | |||
| 366 | /* Device Control API: ARM VGIC */ | 382 | /* Device Control API: ARM VGIC */ |
| 367 | #define KVM_DEV_ARM_VGIC_GRP_ADDR	0 | 383 | #define KVM_DEV_ARM_VGIC_GRP_ADDR	0 |
| 368 | #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS	1 | 384 | #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS	1 |
| ... | @@ -402,6 +418,8 @@ enum { | ... | @@ -402,6 +418,8 @@ enum { |
| 402 | #define KVM_ARM_VCPU_TIMER_CTRL		1 | 418 | #define KVM_ARM_VCPU_TIMER_CTRL		1 |
| 403 | #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER		0 | 419 | #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER		0 |
| 404 | #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER		1 | 420 | #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER		1 |
| 421 | #define KVM_ARM_VCPU_TIMER_IRQ_HVTIMER	2 | ||
| 422 | #define KVM_ARM_VCPU_TIMER_IRQ_HPTIMER	3 | ||
| 405 | #define KVM_ARM_VCPU_PVTIME_CTRL	2 | 423 | #define KVM_ARM_VCPU_PVTIME_CTRL	2 |
| 406 | #define KVM_ARM_VCPU_PVTIME_IPA	0 | 424 | #define KVM_ARM_VCPU_PVTIME_IPA	0 |
| 407 | 425 | ||
| ... | @@ -458,6 +476,56 @@ enum { | ... | @@ -458,6 +476,56 @@ enum { |
| 458 | /* run->fail_entry.hardware_entry_failure_reason codes. */ | 476 | /* run->fail_entry.hardware_entry_failure_reason codes. */ |
| 459 | #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED	(1ULL << 0) | 477 | #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED	(1ULL << 0) |
| 460 | 478 | ||
| 479 | enum kvm_smccc_filter_action { | ||
| 480 | 	KVM_SMCCC_FILTER_HANDLE = 0, | ||
| 481 | 	KVM_SMCCC_FILTER_DENY, | ||
| 482 | 	KVM_SMCCC_FILTER_FWD_TO_USER, | ||
| 483 | |||
| 484 | }; | ||
| 485 | |||
| 486 | struct kvm_smccc_filter { | ||
| 487 | 	__u32 base; | ||
| 488 | 	__u32 nr_functions; | ||
| 489 | 	__u8 action; | ||
| 490 | 	__u8 pad[15]; | ||
| 491 | }; | ||
| 492 | |||
| 493 | /* arm64-specific KVM_EXIT_HYPERCALL flags */ | ||
| 494 | #define KVM_HYPERCALL_EXIT_SMC		(1U << 0) | ||
| 495 | #define KVM_HYPERCALL_EXIT_16BIT	(1U << 1) | ||
| 496 | |||
| 497 | /* | ||
| 498 | * Get feature ID registers userspace writable mask. | ||
| 499 | * | ||
| 500 | * From DDI0487J.a, D19.2.66 ("ID_AA64MMFR2_EL1, AArch64 Memory Model | ||
| 501 | * Feature Register 2"): | ||
| 502 | * | ||
| 503 | * "The Feature ID space is defined as the System register space in | ||
| 504 | * AArch64 with op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, | ||
| 505 | * op2=={0-7}." | ||
| 506 | * | ||
| 507 | * This covers all currently known R/O registers that indicate | ||
| 508 | * anything useful feature wise, including the ID registers. | ||
| 509 | * | ||
| 510 | * If we ever need to introduce a new range, it will be described as | ||
| 511 | * such in the range field. | ||
| 512 | */ | ||
| 513 | #define KVM_ARM_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)		\ | ||
| 514 | 	({								\ | ||
| 515 | 		__u64 __op1 = (op1) & 3;				\ | ||
| 516 | 		__op1 -= (__op1 == 3);					\ | ||
| 517 | 		(__op1 << 6 | ((crm) & 7) << 3 | (op2));		\ | ||
| 518 | 	}) | ||
| 519 | |||
| 520 | #define KVM_ARM_FEATURE_ID_RANGE	0 | ||
| 521 | #define KVM_ARM_FEATURE_ID_RANGE_SIZE	(3 * 8 * 8) | ||
| 522 | |||
| 523 | struct reg_mask_range { | ||
| 524 | 	__u64 addr;		/* Pointer to mask array */ | ||
| 525 | 	__u32 range;		/* Requested range */ | ||
| 526 | 	__u32 reserved[13]; | ||
| 527 | }; | ||
| 528 | |||
| 461 | #endif | 529 | #endif |
| 462 | 530 | ||
| 463 | #endif /* __ARM_KVM_H__ */ | 531 | #endif /* __ARM_KVM_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-linux-any/asm/sigcontext.h+9-1| ... | @@ -152,6 +152,14 @@ struct tpidr2_context { | ... | @@ -152,6 +152,14 @@ struct tpidr2_context { |
| 152 | 	__u64 tpidr2; | 152 | 	__u64 tpidr2; |
| 153 | }; | 153 | }; |
| 154 | 154 | ||
| 155 | /* FPMR context */ | ||
| 156 | #define FPMR_MAGIC	0x46504d52 | ||
| 157 | |||
| 158 | struct fpmr_context { | ||
| 159 | 	struct _aarch64_ctx head; | ||
| 160 | 	__u64 fpmr; | ||
| 161 | }; | ||
| 162 | |||
| 155 | #define ZA_MAGIC	0x54366345 | 163 | #define ZA_MAGIC	0x54366345 |
| 156 | 164 | ||
| 157 | struct za_context { | 165 | struct za_context { |
| ... | @@ -177,7 +185,7 @@ struct zt_context { | ... | @@ -177,7 +185,7 @@ struct zt_context { |
| 177 | * vector length beyond its initial architectural limit of 2048 bits | 185 | * vector length beyond its initial architectural limit of 2048 bits |
| 178 | * (16 quadwords). | 186 | * (16 quadwords). |
| 179 | * | 187 | * |
| 180 | * See linux/Documentation/arm64/sve.rst for a description of the VL/VQ | 188 | * See linux/Documentation/arch/arm64/sve.rst for a description of the VL/VQ |
| 181 | * terminology. | 189 | * terminology. |
| 182 | */ | 190 | */ |
| 183 | #define SVE_VQ_BYTES		__SVE_VQ_BYTES	/* bytes per quadword */ | 191 | #define SVE_VQ_BYTES		__SVE_VQ_BYTES	/* bytes per quadword */ |
lib/libc/include/aarch64-linux-any/asm/sve_context.h+11| ... | @@ -13,6 +13,17 @@ | ... | @@ -13,6 +13,17 @@ |
| 13 | 13 | ||
| 14 | #define __SVE_VQ_BYTES		16	/* number of bytes per quadword */ | 14 | #define __SVE_VQ_BYTES		16	/* number of bytes per quadword */ |
| 15 | 15 | ||
| 16 | /* | ||
| 17 | * Yes, __SVE_VQ_MAX is 512 QUADWORDS. | ||
| 18 | * | ||
| 19 | * To help ensure forward portability, this is much larger than the | ||
| 20 | * current maximum value defined by the SVE architecture. While arrays | ||
| 21 | * or static allocations can be sized based on this value, watch out! | ||
| 22 | * It will waste a surprisingly large amount of memory. | ||
| 23 | * | ||
| 24 | * Dynamic sizing based on the actual runtime vector length is likely to | ||
| 25 | * be preferable for most purposes. | ||
| 26 | */ | ||
| 16 | #define __SVE_VQ_MIN		1 | 27 | #define __SVE_VQ_MIN		1 |
| 17 | #define __SVE_VQ_MAX		512 | 28 | #define __SVE_VQ_MAX		512 |
| 18 | 29 |
lib/libc/include/any-linux-any/asm-generic/bitsperlong.h+16-1| ... | @@ -2,6 +2,17 @@ | ... | @@ -2,6 +2,17 @@ |
| 2 | #ifndef __ASM_GENERIC_BITS_PER_LONG | 2 | #ifndef __ASM_GENERIC_BITS_PER_LONG |
| 3 | #define __ASM_GENERIC_BITS_PER_LONG | 3 | #define __ASM_GENERIC_BITS_PER_LONG |
| 4 | 4 | ||
| 5 | #ifndef __BITS_PER_LONG | ||
| 6 | /* | ||
| 7 | * In order to keep safe and avoid regression, only unify uapi | ||
| 8 | * bitsperlong.h for some archs which are using newer toolchains | ||
| 9 | * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__. | ||
| 10 | * See the following link for more info: | ||
| 11 | * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/ | ||
| 12 | */ | ||
| 13 | #if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) | ||
| 14 | #define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) | ||
| 15 | #else | ||
| 5 | /* | 16 | /* |
| 6 | * There seems to be no way of detecting this automatically from user | 17 | * There seems to be no way of detecting this automatically from user |
| 7 | * space, so 64 bit architectures should override this in their | 18 | * space, so 64 bit architectures should override this in their |
| ... | @@ -9,8 +20,12 @@ | ... | @@ -9,8 +20,12 @@ |
| 9 | * both 32 and 64 bit user space must not rely on CONFIG_64BIT | 20 | * both 32 and 64 bit user space must not rely on CONFIG_64BIT |
| 10 | * to decide it, but rather check a compiler provided macro. | 21 | * to decide it, but rather check a compiler provided macro. |
| 11 | */ | 22 | */ |
| 12 | #ifndef __BITS_PER_LONG | ||
| 13 | #define __BITS_PER_LONG 32 | 23 | #define __BITS_PER_LONG 32 |
| 14 | #endif | 24 | #endif |
| 25 | #endif | ||
| 26 | |||
| 27 | #ifndef __BITS_PER_LONG_LONG | ||
| 28 | #define __BITS_PER_LONG_LONG 64 | ||
| 29 | #endif | ||
| 15 | 30 | ||
| 16 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ | 31 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/asm-generic/siginfo.h+2-6| ... | @@ -68,11 +68,6 @@ union __sifields { | ... | @@ -68,11 +68,6 @@ union __sifields { |
| 68 | 	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ | 68 | 	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ |
| 69 | 	struct { | 69 | 	struct { |
| 70 | 		void *_addr; /* faulting insn/memory ref. */ | 70 | 		void *_addr; /* faulting insn/memory ref. */ |
| 71 | #ifdef __ia64__ | ||
| 72 | 		int _imm;		/* immediate value for "break" */ | ||
| 73 | 		unsigned int _flags;	/* see ia64 si_flags */ | ||
| 74 | 		unsigned long _isr;	/* isr */ | ||
| 75 | #endif | ||
| 76 | 71 | ||
| 77 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ | 72 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ |
| 78 | 			 sizeof(short) : __alignof__(void *)) | 73 | 			 sizeof(short) : __alignof__(void *)) |
| ... | @@ -242,7 +237,8 @@ typedef struct siginfo { | ... | @@ -242,7 +237,8 @@ typedef struct siginfo { |
| 242 | #define SEGV_ADIPERR	7	/* Precise MCD exception */ | 237 | #define SEGV_ADIPERR	7	/* Precise MCD exception */ |
| 243 | #define SEGV_MTEAERR	8	/* Asynchronous ARM MTE error */ | 238 | #define SEGV_MTEAERR	8	/* Asynchronous ARM MTE error */ |
| 244 | #define SEGV_MTESERR	9	/* Synchronous ARM MTE exception */ | 239 | #define SEGV_MTESERR	9	/* Synchronous ARM MTE exception */ |
| 245 | #define NSIGSEGV	9 | 240 | #define SEGV_CPERR	10	/* Control protection fault */ |
| 241 | #define NSIGSEGV	10 | ||
| 246 | 242 | ||
| 247 | /* | 243 | /* |
| 248 | * SIGBUS si_codes | 244 | * SIGBUS si_codes |
lib/libc/include/any-linux-any/asm-generic/socket.h+3| ... | @@ -132,6 +132,9 @@ | ... | @@ -132,6 +132,9 @@ |
| 132 | 132 | ||
| 133 | #define SO_RCVMARK		75 | 133 | #define SO_RCVMARK		75 |
| 134 | 134 | ||
| 135 | #define SO_PASSPIDFD		76 | ||
| 136 | #define SO_PEERPIDFD		77 | ||
| 137 | |||
| 135 | 138 | ||
| 136 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | 139 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) |
| 137 | /* on 64-bit and x32, avoid the ?: operator */ | 140 | /* on 64-bit and x32, avoid the ?: operator */ |
lib/libc/include/any-linux-any/asm-generic/unistd.h+61-102| ... | @@ -38,12 +38,12 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) | ... | @@ -38,12 +38,12 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) |
| 38 | __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) | 38 | __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) |
| 39 | #define __NR_io_cancel 3 | 39 | #define __NR_io_cancel 3 |
| 40 | __SYSCALL(__NR_io_cancel, sys_io_cancel) | 40 | __SYSCALL(__NR_io_cancel, sys_io_cancel) |
| 41 | |||
| 41 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 42 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 42 | #define __NR_io_getevents 4 | 43 | #define __NR_io_getevents 4 |
| 43 | __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) | 44 | __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) |
| 44 | #endif | 45 | #endif |
| 45 | 46 | ||
| 46 | /* fs/xattr.c */ | ||
| 47 | #define __NR_setxattr 5 | 47 | #define __NR_setxattr 5 |
| 48 | __SYSCALL(__NR_setxattr, sys_setxattr) | 48 | __SYSCALL(__NR_setxattr, sys_setxattr) |
| 49 | #define __NR_lsetxattr 6 | 49 | #define __NR_lsetxattr 6 |
| ... | @@ -68,58 +68,38 @@ __SYSCALL(__NR_removexattr, sys_removexattr) | ... | @@ -68,58 +68,38 @@ __SYSCALL(__NR_removexattr, sys_removexattr) |
| 68 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) | 68 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) |
| 69 | #define __NR_fremovexattr 16 | 69 | #define __NR_fremovexattr 16 |
| 70 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) | 70 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) |
| 71 | |||
| 72 | /* fs/dcache.c */ | ||
| 73 | #define __NR_getcwd 17 | 71 | #define __NR_getcwd 17 |
| 74 | __SYSCALL(__NR_getcwd, sys_getcwd) | 72 | __SYSCALL(__NR_getcwd, sys_getcwd) |
| 75 | |||
| 76 | /* fs/cookies.c */ | ||
| 77 | #define __NR_lookup_dcookie 18 | 73 | #define __NR_lookup_dcookie 18 |
| 78 | __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) | 74 | __SYSCALL(__NR_lookup_dcookie, sys_ni_syscall) |
| 79 | |||
| 80 | /* fs/eventfd.c */ | ||
| 81 | #define __NR_eventfd2 19 | 75 | #define __NR_eventfd2 19 |
| 82 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | 76 | __SYSCALL(__NR_eventfd2, sys_eventfd2) |
| 83 | |||
| 84 | /* fs/eventpoll.c */ | ||
| 85 | #define __NR_epoll_create1 20 | 77 | #define __NR_epoll_create1 20 |
| 86 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | 78 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) |
| 87 | #define __NR_epoll_ctl 21 | 79 | #define __NR_epoll_ctl 21 |
| 88 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) | 80 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) |
| 89 | #define __NR_epoll_pwait 22 | 81 | #define __NR_epoll_pwait 22 |
| 90 | __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) | 82 | __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) |
| 91 | |||
| 92 | /* fs/fcntl.c */ | ||
| 93 | #define __NR_dup 23 | 83 | #define __NR_dup 23 |
| 94 | __SYSCALL(__NR_dup, sys_dup) | 84 | __SYSCALL(__NR_dup, sys_dup) |
| 95 | #define __NR_dup3 24 | 85 | #define __NR_dup3 24 |
| 96 | __SYSCALL(__NR_dup3, sys_dup3) | 86 | __SYSCALL(__NR_dup3, sys_dup3) |
| 97 | #define __NR3264_fcntl 25 | 87 | #define __NR3264_fcntl 25 |
| 98 | __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) | 88 | __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) |
| 99 | |||
| 100 | /* fs/inotify_user.c */ | ||
| 101 | #define __NR_inotify_init1 26 | 89 | #define __NR_inotify_init1 26 |
| 102 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | 90 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) |
| 103 | #define __NR_inotify_add_watch 27 | 91 | #define __NR_inotify_add_watch 27 |
| 104 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | 92 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) |
| 105 | #define __NR_inotify_rm_watch 28 | 93 | #define __NR_inotify_rm_watch 28 |
| 106 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) | 94 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) |
| 107 | |||
| 108 | /* fs/ioctl.c */ | ||
| 109 | #define __NR_ioctl 29 | 95 | #define __NR_ioctl 29 |
| 110 | __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) | 96 | __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) |
| 111 | |||
| 112 | /* fs/ioprio.c */ | ||
| 113 | #define __NR_ioprio_set 30 | 97 | #define __NR_ioprio_set 30 |
| 114 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | 98 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) |
| 115 | #define __NR_ioprio_get 31 | 99 | #define __NR_ioprio_get 31 |
| 116 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | 100 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) |
| 117 | |||
| 118 | /* fs/locks.c */ | ||
| 119 | #define __NR_flock 32 | 101 | #define __NR_flock 32 |
| 120 | __SYSCALL(__NR_flock, sys_flock) | 102 | __SYSCALL(__NR_flock, sys_flock) |
| 121 | |||
| 122 | /* fs/namei.c */ | ||
| 123 | #define __NR_mknodat 33 | 103 | #define __NR_mknodat 33 |
| 124 | __SYSCALL(__NR_mknodat, sys_mknodat) | 104 | __SYSCALL(__NR_mknodat, sys_mknodat) |
| 125 | #define __NR_mkdirat 34 | 105 | #define __NR_mkdirat 34 |
| ... | @@ -130,25 +110,21 @@ __SYSCALL(__NR_unlinkat, sys_unlinkat) | ... | @@ -130,25 +110,21 @@ __SYSCALL(__NR_unlinkat, sys_unlinkat) |
| 130 | __SYSCALL(__NR_symlinkat, sys_symlinkat) | 110 | __SYSCALL(__NR_symlinkat, sys_symlinkat) |
| 131 | #define __NR_linkat 37 | 111 | #define __NR_linkat 37 |
| 132 | __SYSCALL(__NR_linkat, sys_linkat) | 112 | __SYSCALL(__NR_linkat, sys_linkat) |
| 113 | |||
| 133 | #ifdef __ARCH_WANT_RENAMEAT | 114 | #ifdef __ARCH_WANT_RENAMEAT |
| 134 | /* renameat is superseded with flags by renameat2 */ | 115 | /* renameat is superseded with flags by renameat2 */ |
| 135 | #define __NR_renameat 38 | 116 | #define __NR_renameat 38 |
| 136 | __SYSCALL(__NR_renameat, sys_renameat) | 117 | __SYSCALL(__NR_renameat, sys_renameat) |
| 137 | #endif /* __ARCH_WANT_RENAMEAT */ | 118 | #endif /* __ARCH_WANT_RENAMEAT */ |
| 138 | 119 | ||
| 139 | /* fs/namespace.c */ | ||
| 140 | #define __NR_umount2 39 | 120 | #define __NR_umount2 39 |
| 141 | __SYSCALL(__NR_umount2, sys_umount) | 121 | __SYSCALL(__NR_umount2, sys_umount) |
| 142 | #define __NR_mount 40 | 122 | #define __NR_mount 40 |
| 143 | __SYSCALL(__NR_mount, sys_mount) | 123 | __SYSCALL(__NR_mount, sys_mount) |
| 144 | #define __NR_pivot_root 41 | 124 | #define __NR_pivot_root 41 |
| 145 | __SYSCALL(__NR_pivot_root, sys_pivot_root) | 125 | __SYSCALL(__NR_pivot_root, sys_pivot_root) |
| 146 | |||
| 147 | /* fs/nfsctl.c */ | ||
| 148 | #define __NR_nfsservctl 42 | 126 | #define __NR_nfsservctl 42 |
| 149 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) | 127 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) |
| 150 | |||
| 151 | /* fs/open.c */ | ||
| 152 | #define __NR3264_statfs 43 | 128 | #define __NR3264_statfs 43 |
| 153 | __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ | 129 | __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ |
| 154 | 	 compat_sys_statfs64) | 130 | 	 compat_sys_statfs64) |
| ... | @@ -161,7 +137,6 @@ __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ | ... | @@ -161,7 +137,6 @@ __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ |
| 161 | #define __NR3264_ftruncate 46 | 137 | #define __NR3264_ftruncate 46 |
| 162 | __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ | 138 | __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ |
| 163 | 	 compat_sys_ftruncate64) | 139 | 	 compat_sys_ftruncate64) |
| 164 | |||
| 165 | #define __NR_fallocate 47 | 140 | #define __NR_fallocate 47 |
| 166 | __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) | 141 | __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) |
| 167 | #define __NR_faccessat 48 | 142 | #define __NR_faccessat 48 |
| ... | @@ -186,20 +161,12 @@ __SYSCALL(__NR_openat, sys_openat) | ... | @@ -186,20 +161,12 @@ __SYSCALL(__NR_openat, sys_openat) |
| 186 | __SYSCALL(__NR_close, sys_close) | 161 | __SYSCALL(__NR_close, sys_close) |
| 187 | #define __NR_vhangup 58 | 162 | #define __NR_vhangup 58 |
| 188 | __SYSCALL(__NR_vhangup, sys_vhangup) | 163 | __SYSCALL(__NR_vhangup, sys_vhangup) |
| 189 | |||
| 190 | /* fs/pipe.c */ | ||
| 191 | #define __NR_pipe2 59 | 164 | #define __NR_pipe2 59 |
| 192 | __SYSCALL(__NR_pipe2, sys_pipe2) | 165 | __SYSCALL(__NR_pipe2, sys_pipe2) |
| 193 | |||
| 194 | /* fs/quota.c */ | ||
| 195 | #define __NR_quotactl 60 | 166 | #define __NR_quotactl 60 |
| 196 | __SYSCALL(__NR_quotactl, sys_quotactl) | 167 | __SYSCALL(__NR_quotactl, sys_quotactl) |
| 197 | |||
| 198 | /* fs/readdir.c */ | ||
| 199 | #define __NR_getdents64 61 | 168 | #define __NR_getdents64 61 |
| 200 | __SYSCALL(__NR_getdents64, sys_getdents64) | 169 | __SYSCALL(__NR_getdents64, sys_getdents64) |
| 201 | |||
| 202 | /* fs/read_write.c */ | ||
| 203 | #define __NR3264_lseek 62 | 170 | #define __NR3264_lseek 62 |
| 204 | __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) | 171 | __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) |
| 205 | #define __NR_read 63 | 172 | #define __NR_read 63 |
| ... | @@ -218,12 +185,9 @@ __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) | ... | @@ -218,12 +185,9 @@ __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) |
| 218 | __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) | 185 | __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) |
| 219 | #define __NR_pwritev 70 | 186 | #define __NR_pwritev 70 |
| 220 | __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) | 187 | __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) |
| 221 | |||
| 222 | /* fs/sendfile.c */ | ||
| 223 | #define __NR3264_sendfile 71 | 188 | #define __NR3264_sendfile 71 |
| 224 | __SYSCALL(__NR3264_sendfile, sys_sendfile64) | 189 | __SYSCALL(__NR3264_sendfile, sys_sendfile64) |
| 225 | 190 | ||
| 226 | /* fs/select.c */ | ||
| 227 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 191 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 228 | #define __NR_pselect6 72 | 192 | #define __NR_pselect6 72 |
| 229 | __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) | 193 | __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) |
| ... | @@ -231,21 +195,17 @@ __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_psel | ... | @@ -231,21 +195,17 @@ __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_psel |
| 231 | __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) | 195 | __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) |
| 232 | #endif | 196 | #endif |
| 233 | 197 | ||
| 234 | /* fs/signalfd.c */ | ||
| 235 | #define __NR_signalfd4 74 | 198 | #define __NR_signalfd4 74 |
| 236 | __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) | 199 | __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) |
| 237 | |||
| 238 | /* fs/splice.c */ | ||
| 239 | #define __NR_vmsplice 75 | 200 | #define __NR_vmsplice 75 |
| 240 | __SYSCALL(__NR_vmsplice, sys_vmsplice) | 201 | __SYSCALL(__NR_vmsplice, sys_vmsplice) |
| 241 | #define __NR_splice 76 | 202 | #define __NR_splice 76 |
| 242 | __SYSCALL(__NR_splice, sys_splice) | 203 | __SYSCALL(__NR_splice, sys_splice) |
| 243 | #define __NR_tee 77 | 204 | #define __NR_tee 77 |
| 244 | __SYSCALL(__NR_tee, sys_tee) | 205 | __SYSCALL(__NR_tee, sys_tee) |
| 245 | |||
| 246 | /* fs/stat.c */ | ||
| 247 | #define __NR_readlinkat 78 | 206 | #define __NR_readlinkat 78 |
| 248 | __SYSCALL(__NR_readlinkat, sys_readlinkat) | 207 | __SYSCALL(__NR_readlinkat, sys_readlinkat) |
| 208 | |||
| 249 | #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) | 209 | #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) |
| 250 | #define __NR3264_fstatat 79 | 210 | #define __NR3264_fstatat 79 |
| 251 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) | 211 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) |
| ... | @@ -253,13 +213,13 @@ __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) | ... | @@ -253,13 +213,13 @@ __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) |
| 253 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) | 213 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) |
| 254 | #endif | 214 | #endif |
| 255 | 215 | ||
| 256 | /* fs/sync.c */ | ||
| 257 | #define __NR_sync 81 | 216 | #define __NR_sync 81 |
| 258 | __SYSCALL(__NR_sync, sys_sync) | 217 | __SYSCALL(__NR_sync, sys_sync) |
| 259 | #define __NR_fsync 82 | 218 | #define __NR_fsync 82 |
| 260 | __SYSCALL(__NR_fsync, sys_fsync) | 219 | __SYSCALL(__NR_fsync, sys_fsync) |
| 261 | #define __NR_fdatasync 83 | 220 | #define __NR_fdatasync 83 |
| 262 | __SYSCALL(__NR_fdatasync, sys_fdatasync) | 221 | __SYSCALL(__NR_fdatasync, sys_fdatasync) |
| 222 | |||
| 263 | #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 | 223 | #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 |
| 264 | #define __NR_sync_file_range2 84 | 224 | #define __NR_sync_file_range2 84 |
| 265 | __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ | 225 | __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ |
| ... | @@ -270,9 +230,9 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ | ... | @@ -270,9 +230,9 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ |
| 270 | 	 compat_sys_sync_file_range) | 230 | 	 compat_sys_sync_file_range) |
| 271 | #endif | 231 | #endif |
| 272 | 232 | ||
| 273 | /* fs/timerfd.c */ | ||
| 274 | #define __NR_timerfd_create 85 | 233 | #define __NR_timerfd_create 85 |
| 275 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) | 234 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) |
| 235 | |||
| 276 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 236 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 277 | #define __NR_timerfd_settime 86 | 237 | #define __NR_timerfd_settime 86 |
| 278 | __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ | 238 | __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ |
| ... | @@ -282,45 +242,35 @@ __SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ | ... | @@ -282,45 +242,35 @@ __SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ |
| 282 | 	 sys_timerfd_gettime) | 242 | 	 sys_timerfd_gettime) |
| 283 | #endif | 243 | #endif |
| 284 | 244 | ||
| 285 | /* fs/utimes.c */ | ||
| 286 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 245 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 287 | #define __NR_utimensat 88 | 246 | #define __NR_utimensat 88 |
| 288 | __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) | 247 | __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) |
| 289 | #endif | 248 | #endif |
| 290 | 249 | ||
| 291 | /* kernel/acct.c */ | ||
| 292 | #define __NR_acct 89 | 250 | #define __NR_acct 89 |
| 293 | __SYSCALL(__NR_acct, sys_acct) | 251 | __SYSCALL(__NR_acct, sys_acct) |
| 294 | |||
| 295 | /* kernel/capability.c */ | ||
| 296 | #define __NR_capget 90 | 252 | #define __NR_capget 90 |
| 297 | __SYSCALL(__NR_capget, sys_capget) | 253 | __SYSCALL(__NR_capget, sys_capget) |
| 298 | #define __NR_capset 91 | 254 | #define __NR_capset 91 |
| 299 | __SYSCALL(__NR_capset, sys_capset) | 255 | __SYSCALL(__NR_capset, sys_capset) |
| 300 | |||
| 301 | /* kernel/exec_domain.c */ | ||
| 302 | #define __NR_personality 92 | 256 | #define __NR_personality 92 |
| 303 | __SYSCALL(__NR_personality, sys_personality) | 257 | __SYSCALL(__NR_personality, sys_personality) |
| 304 | |||
| 305 | /* kernel/exit.c */ | ||
| 306 | #define __NR_exit 93 | 258 | #define __NR_exit 93 |
| 307 | __SYSCALL(__NR_exit, sys_exit) | 259 | __SYSCALL(__NR_exit, sys_exit) |
| 308 | #define __NR_exit_group 94 | 260 | #define __NR_exit_group 94 |
| 309 | __SYSCALL(__NR_exit_group, sys_exit_group) | 261 | __SYSCALL(__NR_exit_group, sys_exit_group) |
| 310 | #define __NR_waitid 95 | 262 | #define __NR_waitid 95 |
| 311 | __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) | 263 | __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) |
| 312 | |||
| 313 | /* kernel/fork.c */ | ||
| 314 | #define __NR_set_tid_address 96 | 264 | #define __NR_set_tid_address 96 |
| 315 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) | 265 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) |
| 316 | #define __NR_unshare 97 | 266 | #define __NR_unshare 97 |
| 317 | __SYSCALL(__NR_unshare, sys_unshare) | 267 | __SYSCALL(__NR_unshare, sys_unshare) |
| 318 | 268 | ||
| 319 | /* kernel/futex.c */ | ||
| 320 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 269 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 321 | #define __NR_futex 98 | 270 | #define __NR_futex 98 |
| 322 | __SC_3264(__NR_futex, sys_futex_time32, sys_futex) | 271 | __SC_3264(__NR_futex, sys_futex_time32, sys_futex) |
| 323 | #endif | 272 | #endif |
| 273 | |||
| 324 | #define __NR_set_robust_list 99 | 274 | #define __NR_set_robust_list 99 |
| 325 | __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ | 275 | __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ |
| 326 | 	 compat_sys_set_robust_list) | 276 | 	 compat_sys_set_robust_list) |
| ... | @@ -328,43 +278,40 @@ __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ | ... | @@ -328,43 +278,40 @@ __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ |
| 328 | __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ | 278 | __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ |
| 329 | 	 compat_sys_get_robust_list) | 279 | 	 compat_sys_get_robust_list) |
| 330 | 280 | ||
| 331 | /* kernel/hrtimer.c */ | ||
| 332 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 281 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 333 | #define __NR_nanosleep 101 | 282 | #define __NR_nanosleep 101 |
| 334 | __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) | 283 | __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) |
| 335 | #endif | 284 | #endif |
| 336 | 285 | ||
| 337 | /* kernel/itimer.c */ | ||
| 338 | #define __NR_getitimer 102 | 286 | #define __NR_getitimer 102 |
| 339 | __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) | 287 | __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) |
| 340 | #define __NR_setitimer 103 | 288 | #define __NR_setitimer 103 |
| 341 | __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) | 289 | __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) |
| 342 | |||
| 343 | /* kernel/kexec.c */ | ||
| 344 | #define __NR_kexec_load 104 | 290 | #define __NR_kexec_load 104 |
| 345 | __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) | 291 | __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) |
| 346 | |||
| 347 | /* kernel/module.c */ | ||
| 348 | #define __NR_init_module 105 | 292 | #define __NR_init_module 105 |
| 349 | __SYSCALL(__NR_init_module, sys_init_module) | 293 | __SYSCALL(__NR_init_module, sys_init_module) |
| 350 | #define __NR_delete_module 106 | 294 | #define __NR_delete_module 106 |
| 351 | __SYSCALL(__NR_delete_module, sys_delete_module) | 295 | __SYSCALL(__NR_delete_module, sys_delete_module) |
| 352 | |||
| 353 | /* kernel/posix-timers.c */ | ||
| 354 | #define __NR_timer_create 107 | 296 | #define __NR_timer_create 107 |
| 355 | __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) | 297 | __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) |
| 298 | |||
| 356 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 299 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 357 | #define __NR_timer_gettime 108 | 300 | #define __NR_timer_gettime 108 |
| 358 | __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) | 301 | __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) |
| 359 | #endif | 302 | #endif |
| 303 | |||
| 360 | #define __NR_timer_getoverrun 109 | 304 | #define __NR_timer_getoverrun 109 |
| 361 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) | 305 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) |
| 306 | |||
| 362 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 307 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 363 | #define __NR_timer_settime 110 | 308 | #define __NR_timer_settime 110 |
| 364 | __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) | 309 | __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) |
| 365 | #endif | 310 | #endif |
| 311 | |||
| 366 | #define __NR_timer_delete 111 | 312 | #define __NR_timer_delete 111 |
| 367 | __SYSCALL(__NR_timer_delete, sys_timer_delete) | 313 | __SYSCALL(__NR_timer_delete, sys_timer_delete) |
| 314 | |||
| 368 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 315 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 369 | #define __NR_clock_settime 112 | 316 | #define __NR_clock_settime 112 |
| 370 | __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) | 317 | __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) |
| ... | @@ -377,15 +324,10 @@ __SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ | ... | @@ -377,15 +324,10 @@ __SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ |
| 377 | 	 sys_clock_nanosleep) | 324 | 	 sys_clock_nanosleep) |
| 378 | #endif | 325 | #endif |
| 379 | 326 | ||
| 380 | /* kernel/printk.c */ | ||
| 381 | #define __NR_syslog 116 | 327 | #define __NR_syslog 116 |
| 382 | __SYSCALL(__NR_syslog, sys_syslog) | 328 | __SYSCALL(__NR_syslog, sys_syslog) |
| 383 | |||
| 384 | /* kernel/ptrace.c */ | ||
| 385 | #define __NR_ptrace 117 | 329 | #define __NR_ptrace 117 |
| 386 | __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) | 330 | __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) |
| 387 | |||
| 388 | /* kernel/sched/core.c */ | ||
| 389 | #define __NR_sched_setparam 118 | 331 | #define __NR_sched_setparam 118 |
| 390 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) | 332 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) |
| 391 | #define __NR_sched_setscheduler 119 | 333 | #define __NR_sched_setscheduler 119 |
| ... | @@ -406,13 +348,13 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) | ... | @@ -406,13 +348,13 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) |
| 406 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) | 348 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) |
| 407 | #define __NR_sched_get_priority_min 126 | 349 | #define __NR_sched_get_priority_min 126 |
| 408 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) | 350 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) |
| 351 | |||
| 409 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 352 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 410 | #define __NR_sched_rr_get_interval 127 | 353 | #define __NR_sched_rr_get_interval 127 |
| 411 | __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ | 354 | __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ |
| 412 | 	 sys_sched_rr_get_interval) | 355 | 	 sys_sched_rr_get_interval) |
| 413 | #endif | 356 | #endif |
| 414 | 357 | ||
| 415 | /* kernel/signal.c */ | ||
| 416 | #define __NR_restart_syscall 128 | 358 | #define __NR_restart_syscall 128 |
| 417 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) | 359 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) |
| 418 | #define __NR_kill 129 | 360 | #define __NR_kill 129 |
| ... | @@ -431,18 +373,18 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) | ... | @@ -431,18 +373,18 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) |
| 431 | __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) | 373 | __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) |
| 432 | #define __NR_rt_sigpending 136 | 374 | #define __NR_rt_sigpending 136 |
| 433 | __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) | 375 | __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) |
| 376 | |||
| 434 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 377 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 435 | #define __NR_rt_sigtimedwait 137 | 378 | #define __NR_rt_sigtimedwait 137 |
| 436 | __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ | 379 | __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ |
| 437 | 	 sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) | 380 | 	 sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) |
| 438 | #endif | 381 | #endif |
| 382 | |||
| 439 | #define __NR_rt_sigqueueinfo 138 | 383 | #define __NR_rt_sigqueueinfo 138 |
| 440 | __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ | 384 | __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ |
| 441 | 	 compat_sys_rt_sigqueueinfo) | 385 | 	 compat_sys_rt_sigqueueinfo) |
| 442 | #define __NR_rt_sigreturn 139 | 386 | #define __NR_rt_sigreturn 139 |
| 443 | __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) | 387 | __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) |
| 444 | |||
| 445 | /* kernel/sys.c */ | ||
| 446 | #define __NR_setpriority 140 | 388 | #define __NR_setpriority 140 |
| 447 | __SYSCALL(__NR_setpriority, sys_setpriority) | 389 | __SYSCALL(__NR_setpriority, sys_setpriority) |
| 448 | #define __NR_getpriority 141 | 390 | #define __NR_getpriority 141 |
| ... | @@ -507,7 +449,6 @@ __SYSCALL(__NR_prctl, sys_prctl) | ... | @@ -507,7 +449,6 @@ __SYSCALL(__NR_prctl, sys_prctl) |
| 507 | #define __NR_getcpu 168 | 449 | #define __NR_getcpu 168 |
| 508 | __SYSCALL(__NR_getcpu, sys_getcpu) | 450 | __SYSCALL(__NR_getcpu, sys_getcpu) |
| 509 | 451 | ||
| 510 | /* kernel/time.c */ | ||
| 511 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 452 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 512 | #define __NR_gettimeofday 169 | 453 | #define __NR_gettimeofday 169 |
| 513 | __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) | 454 | __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) |
| ... | @@ -517,7 +458,6 @@ __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) | ... | @@ -517,7 +458,6 @@ __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) |
| 517 | __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) | 458 | __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) |
| 518 | #endif | 459 | #endif |
| 519 | 460 | ||
| 520 | /* kernel/sys.c */ | ||
| 521 | #define __NR_getpid 172 | 461 | #define __NR_getpid 172 |
| 522 | __SYSCALL(__NR_getpid, sys_getpid) | 462 | __SYSCALL(__NR_getpid, sys_getpid) |
| 523 | #define __NR_getppid 173 | 463 | #define __NR_getppid 173 |
| ... | @@ -534,12 +474,11 @@ __SYSCALL(__NR_getegid, sys_getegid) | ... | @@ -534,12 +474,11 @@ __SYSCALL(__NR_getegid, sys_getegid) |
| 534 | __SYSCALL(__NR_gettid, sys_gettid) | 474 | __SYSCALL(__NR_gettid, sys_gettid) |
| 535 | #define __NR_sysinfo 179 | 475 | #define __NR_sysinfo 179 |
| 536 | __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) | 476 | __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) |
| 537 | |||
| 538 | /* ipc/mqueue.c */ | ||
| 539 | #define __NR_mq_open 180 | 477 | #define __NR_mq_open 180 |
| 540 | __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) | 478 | __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) |
| 541 | #define __NR_mq_unlink 181 | 479 | #define __NR_mq_unlink 181 |
| 542 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) | 480 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) |
| 481 | |||
| 543 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 482 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 544 | #define __NR_mq_timedsend 182 | 483 | #define __NR_mq_timedsend 182 |
| 545 | __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) | 484 | __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) |
| ... | @@ -547,12 +486,11 @@ __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) | ... | @@ -547,12 +486,11 @@ __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) |
| 547 | __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ | 486 | __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ |
| 548 | 	 sys_mq_timedreceive) | 487 | 	 sys_mq_timedreceive) |
| 549 | #endif | 488 | #endif |
| 489 | |||
| 550 | #define __NR_mq_notify 184 | 490 | #define __NR_mq_notify 184 |
| 551 | __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) | 491 | __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) |
| 552 | #define __NR_mq_getsetattr 185 | 492 | #define __NR_mq_getsetattr 185 |
| 553 | __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) | 493 | __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) |
| 554 | |||
| 555 | /* ipc/msg.c */ | ||
| 556 | #define __NR_msgget 186 | 494 | #define __NR_msgget 186 |
| 557 | __SYSCALL(__NR_msgget, sys_msgget) | 495 | __SYSCALL(__NR_msgget, sys_msgget) |
| 558 | #define __NR_msgctl 187 | 496 | #define __NR_msgctl 187 |
| ... | @@ -561,20 +499,18 @@ __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) | ... | @@ -561,20 +499,18 @@ __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) |
| 561 | __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) | 499 | __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) |
| 562 | #define __NR_msgsnd 189 | 500 | #define __NR_msgsnd 189 |
| 563 | __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) | 501 | __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) |
| 564 | |||
| 565 | /* ipc/sem.c */ | ||
| 566 | #define __NR_semget 190 | 502 | #define __NR_semget 190 |
| 567 | __SYSCALL(__NR_semget, sys_semget) | 503 | __SYSCALL(__NR_semget, sys_semget) |
| 568 | #define __NR_semctl 191 | 504 | #define __NR_semctl 191 |
| 569 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) | 505 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) |
| 506 | |||
| 570 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 507 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 571 | #define __NR_semtimedop 192 | 508 | #define __NR_semtimedop 192 |
| 572 | __SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) | 509 | __SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) |
| 573 | #endif | 510 | #endif |
| 511 | |||
| 574 | #define __NR_semop 193 | 512 | #define __NR_semop 193 |
| 575 | __SYSCALL(__NR_semop, sys_semop) | 513 | __SYSCALL(__NR_semop, sys_semop) |
| 576 | |||
| 577 | /* ipc/shm.c */ | ||
| 578 | #define __NR_shmget 194 | 514 | #define __NR_shmget 194 |
| 579 | __SYSCALL(__NR_shmget, sys_shmget) | 515 | __SYSCALL(__NR_shmget, sys_shmget) |
| 580 | #define __NR_shmctl 195 | 516 | #define __NR_shmctl 195 |
| ... | @@ -583,8 +519,6 @@ __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) | ... | @@ -583,8 +519,6 @@ __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) |
| 583 | __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) | 519 | __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) |
| 584 | #define __NR_shmdt 197 | 520 | #define __NR_shmdt 197 |
| 585 | __SYSCALL(__NR_shmdt, sys_shmdt) | 521 | __SYSCALL(__NR_shmdt, sys_shmdt) |
| 586 | |||
| 587 | /* net/socket.c */ | ||
| 588 | #define __NR_socket 198 | 522 | #define __NR_socket 198 |
| 589 | __SYSCALL(__NR_socket, sys_socket) | 523 | __SYSCALL(__NR_socket, sys_socket) |
| 590 | #define __NR_socketpair 199 | 524 | #define __NR_socketpair 199 |
| ... | @@ -615,40 +549,30 @@ __SYSCALL(__NR_shutdown, sys_shutdown) | ... | @@ -615,40 +549,30 @@ __SYSCALL(__NR_shutdown, sys_shutdown) |
| 615 | __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) | 549 | __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) |
| 616 | #define __NR_recvmsg 212 | 550 | #define __NR_recvmsg 212 |
| 617 | __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) | 551 | __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) |
| 618 | |||
| 619 | /* mm/filemap.c */ | ||
| 620 | #define __NR_readahead 213 | 552 | #define __NR_readahead 213 |
| 621 | __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) | 553 | __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) |
| 622 | |||
| 623 | /* mm/nommu.c, also with MMU */ | ||
| 624 | #define __NR_brk 214 | 554 | #define __NR_brk 214 |
| 625 | __SYSCALL(__NR_brk, sys_brk) | 555 | __SYSCALL(__NR_brk, sys_brk) |
| 626 | #define __NR_munmap 215 | 556 | #define __NR_munmap 215 |
| 627 | __SYSCALL(__NR_munmap, sys_munmap) | 557 | __SYSCALL(__NR_munmap, sys_munmap) |
| 628 | #define __NR_mremap 216 | 558 | #define __NR_mremap 216 |
| 629 | __SYSCALL(__NR_mremap, sys_mremap) | 559 | __SYSCALL(__NR_mremap, sys_mremap) |
| 630 | |||
| 631 | /* security/keys/keyctl.c */ | ||
| 632 | #define __NR_add_key 217 | 560 | #define __NR_add_key 217 |
| 633 | __SYSCALL(__NR_add_key, sys_add_key) | 561 | __SYSCALL(__NR_add_key, sys_add_key) |
| 634 | #define __NR_request_key 218 | 562 | #define __NR_request_key 218 |
| 635 | __SYSCALL(__NR_request_key, sys_request_key) | 563 | __SYSCALL(__NR_request_key, sys_request_key) |
| 636 | #define __NR_keyctl 219 | 564 | #define __NR_keyctl 219 |
| 637 | __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) | 565 | __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) |
| 638 | |||
| 639 | /* arch/example/kernel/sys_example.c */ | ||
| 640 | #define __NR_clone 220 | 566 | #define __NR_clone 220 |
| 641 | __SYSCALL(__NR_clone, sys_clone) | 567 | __SYSCALL(__NR_clone, sys_clone) |
| 642 | #define __NR_execve 221 | 568 | #define __NR_execve 221 |
| 643 | __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) | 569 | __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) |
| 644 | |||
| 645 | #define __NR3264_mmap 222 | 570 | #define __NR3264_mmap 222 |
| 646 | __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) | 571 | __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) |
| 647 | /* mm/fadvise.c */ | ||
| 648 | #define __NR3264_fadvise64 223 | 572 | #define __NR3264_fadvise64 223 |
| 649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) | 573 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) |
| 650 | 574 | ||
| 651 | /* mm/, CONFIG_MMU only */ | 575 | /* CONFIG_MMU only */ |
| 652 | #ifndef __ARCH_NOMMU | 576 | #ifndef __ARCH_NOMMU |
| 653 | #define __NR_swapon 224 | 577 | #define __NR_swapon 224 |
| 654 | __SYSCALL(__NR_swapon, sys_swapon) | 578 | __SYSCALL(__NR_swapon, sys_swapon) |
| ... | @@ -691,6 +615,7 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ | ... | @@ -691,6 +615,7 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ |
| 691 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) | 615 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) |
| 692 | #define __NR_accept4 242 | 616 | #define __NR_accept4 242 |
| 693 | __SYSCALL(__NR_accept4, sys_accept4) | 617 | __SYSCALL(__NR_accept4, sys_accept4) |
| 618 | |||
| 694 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 619 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 695 | #define __NR_recvmmsg 243 | 620 | #define __NR_recvmmsg 243 |
| 696 | __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) | 621 | __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) |
| ... | @@ -706,6 +631,7 @@ __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recv | ... | @@ -706,6 +631,7 @@ __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recv |
| 706 | #define __NR_wait4 260 | 631 | #define __NR_wait4 260 |
| 707 | __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) | 632 | __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) |
| 708 | #endif | 633 | #endif |
| 634 | |||
| 709 | #define __NR_prlimit64 261 | 635 | #define __NR_prlimit64 261 |
| 710 | __SYSCALL(__NR_prlimit64, sys_prlimit64) | 636 | __SYSCALL(__NR_prlimit64, sys_prlimit64) |
| 711 | #define __NR_fanotify_init 262 | 637 | #define __NR_fanotify_init 262 |
| ... | @@ -716,10 +642,12 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | ... | @@ -716,10 +642,12 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) |
| 716 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | 642 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) |
| 717 | #define __NR_open_by_handle_at 265 | 643 | #define __NR_open_by_handle_at 265 |
| 718 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | 644 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) |
| 645 | |||
| 719 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 646 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 720 | #define __NR_clock_adjtime 266 | 647 | #define __NR_clock_adjtime 266 |
| 721 | __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) | 648 | __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) |
| 722 | #endif | 649 | #endif |
| 650 | |||
| 723 | #define __NR_syncfs 267 | 651 | #define __NR_syncfs 267 |
| 724 | __SYSCALL(__NR_syncfs, sys_syncfs) | 652 | __SYSCALL(__NR_syncfs, sys_syncfs) |
| 725 | #define __NR_setns 268 | 653 | #define __NR_setns 268 |
| ... | @@ -770,15 +698,19 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) | ... | @@ -770,15 +698,19 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) |
| 770 | __SYSCALL(__NR_pkey_free, sys_pkey_free) | 698 | __SYSCALL(__NR_pkey_free, sys_pkey_free) |
| 771 | #define __NR_statx 291 | 699 | #define __NR_statx 291 |
| 772 | __SYSCALL(__NR_statx, sys_statx) | 700 | __SYSCALL(__NR_statx, sys_statx) |
| 701 | |||
| 773 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 | 702 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 774 | #define __NR_io_pgetevents 292 | 703 | #define __NR_io_pgetevents 292 |
| 775 | __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) | 704 | __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) |
| 776 | #endif | 705 | #endif |
| 706 | |||
| 777 | #define __NR_rseq 293 | 707 | #define __NR_rseq 293 |
| 778 | __SYSCALL(__NR_rseq, sys_rseq) | 708 | __SYSCALL(__NR_rseq, sys_rseq) |
| 779 | #define __NR_kexec_file_load 294 | 709 | #define __NR_kexec_file_load 294 |
| 780 | __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) | 710 | __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) |
| 711 | |||
| 781 | /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ | 712 | /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ |
| 713 | |||
| 782 | #if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 | 714 | #if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 |
| 783 | #define __NR_clock_gettime64 403 | 715 | #define __NR_clock_gettime64 403 |
| 784 | __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) | 716 | __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) |
| ... | @@ -805,7 +737,7 @@ __SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) | ... | @@ -805,7 +737,7 @@ __SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) |
| 805 | #define __NR_ppoll_time64 414 | 737 | #define __NR_ppoll_time64 414 |
| 806 | __SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64) | 738 | __SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64) |
| 807 | #define __NR_io_pgetevents_time64 416 | 739 | #define __NR_io_pgetevents_time64 416 |
| 808 | __SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) | 740 | __SC_COMP(__NR_io_pgetevents_time64, sys_io_pgetevents, compat_sys_io_pgetevents_time64) |
| 809 | #define __NR_recvmmsg_time64 417 | 741 | #define __NR_recvmmsg_time64 417 |
| 810 | __SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64) | 742 | __SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64) |
| 811 | #define __NR_mq_timedsend_time64 418 | 743 | #define __NR_mq_timedsend_time64 418 |
| ... | @@ -844,13 +776,14 @@ __SYSCALL(__NR_fsmount, sys_fsmount) | ... | @@ -844,13 +776,14 @@ __SYSCALL(__NR_fsmount, sys_fsmount) |
| 844 | __SYSCALL(__NR_fspick, sys_fspick) | 776 | __SYSCALL(__NR_fspick, sys_fspick) |
| 845 | #define __NR_pidfd_open 434 | 777 | #define __NR_pidfd_open 434 |
| 846 | __SYSCALL(__NR_pidfd_open, sys_pidfd_open) | 778 | __SYSCALL(__NR_pidfd_open, sys_pidfd_open) |
| 779 | |||
| 847 | #ifdef __ARCH_WANT_SYS_CLONE3 | 780 | #ifdef __ARCH_WANT_SYS_CLONE3 |
| 848 | #define __NR_clone3 435 | 781 | #define __NR_clone3 435 |
| 849 | __SYSCALL(__NR_clone3, sys_clone3) | 782 | __SYSCALL(__NR_clone3, sys_clone3) |
| 850 | #endif | 783 | #endif |
| 784 | |||
| 851 | #define __NR_close_range 436 | 785 | #define __NR_close_range 436 |
| 852 | __SYSCALL(__NR_close_range, sys_close_range) | 786 | __SYSCALL(__NR_close_range, sys_close_range) |
| 853 | |||
| 854 | #define __NR_openat2 437 | 787 | #define __NR_openat2 437 |
| 855 | __SYSCALL(__NR_openat2, sys_openat2) | 788 | __SYSCALL(__NR_openat2, sys_openat2) |
| 856 | #define __NR_pidfd_getfd 438 | 789 | #define __NR_pidfd_getfd 438 |
| ... | @@ -865,7 +798,6 @@ __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) | ... | @@ -865,7 +798,6 @@ __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) |
| 865 | __SYSCALL(__NR_mount_setattr, sys_mount_setattr) | 798 | __SYSCALL(__NR_mount_setattr, sys_mount_setattr) |
| 866 | #define __NR_quotactl_fd 443 | 799 | #define __NR_quotactl_fd 443 |
| 867 | __SYSCALL(__NR_quotactl_fd, sys_quotactl_fd) | 800 | __SYSCALL(__NR_quotactl_fd, sys_quotactl_fd) |
| 868 | |||
| 869 | #define __NR_landlock_create_ruleset 444 | 801 | #define __NR_landlock_create_ruleset 444 |
| 870 | __SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset) | 802 | __SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset) |
| 871 | #define __NR_landlock_add_rule 445 | 803 | #define __NR_landlock_add_rule 445 |
| ... | @@ -877,17 +809,44 @@ __SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self) | ... | @@ -877,17 +809,44 @@ __SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self) |
| 877 | #define __NR_memfd_secret 447 | 809 | #define __NR_memfd_secret 447 |
| 878 | __SYSCALL(__NR_memfd_secret, sys_memfd_secret) | 810 | __SYSCALL(__NR_memfd_secret, sys_memfd_secret) |
| 879 | #endif | 811 | #endif |
| 812 | |||
| 880 | #define __NR_process_mrelease 448 | 813 | #define __NR_process_mrelease 448 |
| 881 | __SYSCALL(__NR_process_mrelease, sys_process_mrelease) | 814 | __SYSCALL(__NR_process_mrelease, sys_process_mrelease) |
| 882 | |||
| 883 | #define __NR_futex_waitv 449 | 815 | #define __NR_futex_waitv 449 |
| 884 | __SYSCALL(__NR_futex_waitv, sys_futex_waitv) | 816 | __SYSCALL(__NR_futex_waitv, sys_futex_waitv) |
| 885 | |||
| 886 | #define __NR_set_mempolicy_home_node 450 | 817 | #define __NR_set_mempolicy_home_node 450 |
| 887 | __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) | 818 | __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) |
| 819 | #define __NR_cachestat 451 | ||
| 820 | __SYSCALL(__NR_cachestat, sys_cachestat) | ||
| 821 | #define __NR_fchmodat2 452 | ||
| 822 | __SYSCALL(__NR_fchmodat2, sys_fchmodat2) | ||
| 823 | #define __NR_map_shadow_stack 453 | ||
| 824 | __SYSCALL(__NR_map_shadow_stack, sys_map_shadow_stack) | ||
| 825 | #define __NR_futex_wake 454 | ||
| 826 | __SYSCALL(__NR_futex_wake, sys_futex_wake) | ||
| 827 | #define __NR_futex_wait 455 | ||
| 828 | __SYSCALL(__NR_futex_wait, sys_futex_wait) | ||
| 829 | #define __NR_futex_requeue 456 | ||
| 830 | __SYSCALL(__NR_futex_requeue, sys_futex_requeue) | ||
| 831 | |||
| 832 | #define __NR_statmount 457 | ||
| 833 | __SYSCALL(__NR_statmount, sys_statmount) | ||
| 834 | |||
| 835 | #define __NR_listmount 458 | ||
| 836 | __SYSCALL(__NR_listmount, sys_listmount) | ||
| 837 | |||
| 838 | #define __NR_lsm_get_self_attr 459 | ||
| 839 | __SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr) | ||
| 840 | #define __NR_lsm_set_self_attr 460 | ||
| 841 | __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr) | ||
| 842 | #define __NR_lsm_list_modules 461 | ||
| 843 | __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules) | ||
| 844 | |||
| 845 | #define __NR_mseal 462 | ||
| 846 | __SYSCALL(__NR_mseal, sys_mseal) | ||
| 888 | 847 | ||
| 889 | #undef __NR_syscalls | 848 | #undef __NR_syscalls |
| 890 | #define __NR_syscalls 451 | 849 | #define __NR_syscalls 463 |
| 891 | 850 | ||
| 892 | /* | 851 | /* |
| 893 | * 32 bit systems traditionally used different | 852 | * 32 bit systems traditionally used different |
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+62-5| ... | @@ -94,6 +94,9 @@ extern "C" { | ... | @@ -94,6 +94,9 @@ extern "C" { |
| 94 | * | 94 | * |
| 95 | * %AMDGPU_GEM_DOMAIN_OA	Ordered append, used by 3D or Compute engines | 95 | * %AMDGPU_GEM_DOMAIN_OA	Ordered append, used by 3D or Compute engines |
| 96 | * for appending data. | 96 | * for appending data. |
| 97 | * | ||
| 98 | * %AMDGPU_GEM_DOMAIN_DOORBELL	Doorbell. It is an MMIO region for | ||
| 99 | * signalling user mode queues. | ||
| 97 | */ | 100 | */ |
| 98 | #define AMDGPU_GEM_DOMAIN_CPU		0x1 | 101 | #define AMDGPU_GEM_DOMAIN_CPU		0x1 |
| 99 | #define AMDGPU_GEM_DOMAIN_GTT		0x2 | 102 | #define AMDGPU_GEM_DOMAIN_GTT		0x2 |
| ... | @@ -101,12 +104,14 @@ extern "C" { | ... | @@ -101,12 +104,14 @@ extern "C" { |
| 101 | #define AMDGPU_GEM_DOMAIN_GDS		0x8 | 104 | #define AMDGPU_GEM_DOMAIN_GDS		0x8 |
| 102 | #define AMDGPU_GEM_DOMAIN_GWS		0x10 | 105 | #define AMDGPU_GEM_DOMAIN_GWS		0x10 |
| 103 | #define AMDGPU_GEM_DOMAIN_OA		0x20 | 106 | #define AMDGPU_GEM_DOMAIN_OA		0x20 |
| 107 | #define AMDGPU_GEM_DOMAIN_DOORBELL	0x40 | ||
| 104 | #define AMDGPU_GEM_DOMAIN_MASK		(AMDGPU_GEM_DOMAIN_CPU | \ | 108 | #define AMDGPU_GEM_DOMAIN_MASK		(AMDGPU_GEM_DOMAIN_CPU | \ |
| 105 | 					 AMDGPU_GEM_DOMAIN_GTT | \ | 109 | 					 AMDGPU_GEM_DOMAIN_GTT | \ |
| 106 | 					 AMDGPU_GEM_DOMAIN_VRAM | \ | 110 | 					 AMDGPU_GEM_DOMAIN_VRAM | \ |
| 107 | 					 AMDGPU_GEM_DOMAIN_GDS | \ | 111 | 					 AMDGPU_GEM_DOMAIN_GDS | \ |
| 108 | 					 AMDGPU_GEM_DOMAIN_GWS | \ | 112 | 					 AMDGPU_GEM_DOMAIN_GWS | \ |
| 109 | 					 AMDGPU_GEM_DOMAIN_OA) | 113 | 					 AMDGPU_GEM_DOMAIN_OA | \ |
| 114 | 					 AMDGPU_GEM_DOMAIN_DOORBELL) | ||
| 110 | 115 | ||
| 111 | /* Flag that CPU access will be required for the case of VRAM domain */ | 116 | /* Flag that CPU access will be required for the case of VRAM domain */ |
| 112 | #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED	(1 << 0) | 117 | #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED	(1 << 0) |
| ... | @@ -145,7 +150,7 @@ extern "C" { | ... | @@ -145,7 +150,7 @@ extern "C" { |
| 145 | */ | 150 | */ |
| 146 | #define AMDGPU_GEM_CREATE_DISCARDABLE		(1 << 12) | 151 | #define AMDGPU_GEM_CREATE_DISCARDABLE		(1 << 12) |
| 147 | /* Flag that BO is shared coherently between multiple devices or CPU threads. | 152 | /* Flag that BO is shared coherently between multiple devices or CPU threads. |
| 148 | * May depend on GPU instructions to flush caches explicitly | 153 | * May depend on GPU instructions to flush caches to system scope explicitly. |
| 149 | * | 154 | * |
| 150 | * This influences the choice of MTYPE in the PTEs on GFXv9 and later GPUs and | 155 | * This influences the choice of MTYPE in the PTEs on GFXv9 and later GPUs and |
| 151 | * may override the MTYPE selected in AMDGPU_VA_OP_MAP. | 156 | * may override the MTYPE selected in AMDGPU_VA_OP_MAP. |
| ... | @@ -158,6 +163,14 @@ extern "C" { | ... | @@ -158,6 +163,14 @@ extern "C" { |
| 158 | * may override the MTYPE selected in AMDGPU_VA_OP_MAP. | 163 | * may override the MTYPE selected in AMDGPU_VA_OP_MAP. |
| 159 | */ | 164 | */ |
| 160 | #define AMDGPU_GEM_CREATE_UNCACHED		(1 << 14) | 165 | #define AMDGPU_GEM_CREATE_UNCACHED		(1 << 14) |
| 166 | /* Flag that BO should be coherent across devices when using device-level | ||
| 167 | * atomics. May depend on GPU instructions to flush caches to device scope | ||
| 168 | * explicitly, promoting them to system scope automatically. | ||
| 169 | * | ||
| 170 | * This influences the choice of MTYPE in the PTEs on GFXv9 and later GPUs and | ||
| 171 | * may override the MTYPE selected in AMDGPU_VA_OP_MAP. | ||
| 172 | */ | ||
| 173 | #define AMDGPU_GEM_CREATE_EXT_COHERENT		(1 << 15) | ||
| 161 | 174 | ||
| 162 | struct drm_amdgpu_gem_create_in { | 175 | struct drm_amdgpu_gem_create_in { |
| 163 | 	/** the requested memory size */ | 176 | 	/** the requested memory size */ |
| ... | @@ -236,15 +249,17 @@ union drm_amdgpu_bo_list { | ... | @@ -236,15 +249,17 @@ union drm_amdgpu_bo_list { |
| 236 | /* unknown cause */ | 249 | /* unknown cause */ |
| 237 | #define AMDGPU_CTX_UNKNOWN_RESET	3 | 250 | #define AMDGPU_CTX_UNKNOWN_RESET	3 |
| 238 | 251 | ||
| 239 | /* indicate gpu reset occured after ctx created */ | 252 | /* indicate gpu reset occurred after ctx created */ |
| 240 | #define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0) | 253 | #define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0) |
| 241 | /* indicate vram lost occured after ctx created */ | 254 | /* indicate vram lost occurred after ctx created */ |
| 242 | #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) | 255 | #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) |
| 243 | /* indicate some job from this context once cause gpu hang */ | 256 | /* indicate some job from this context once cause gpu hang */ |
| 244 | #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) | 257 | #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) |
| 245 | /* indicate some errors are detected by RAS */ | 258 | /* indicate some errors are detected by RAS */ |
| 246 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1<<3) | 259 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1<<3) |
| 247 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1<<4) | 260 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1<<4) |
| 261 | /* indicate that the reset hasn't completed yet */ | ||
| 262 | #define AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5) | ||
| 248 | 263 | ||
| 249 | /* Context priority level */ | 264 | /* Context priority level */ |
| 250 | #define AMDGPU_CTX_PRIORITY_UNSET -2048 | 265 | #define AMDGPU_CTX_PRIORITY_UNSET -2048 |
| ... | @@ -579,7 +594,8 @@ struct drm_amdgpu_gem_va { | ... | @@ -579,7 +594,8 @@ struct drm_amdgpu_gem_va { |
| 579 | */ | 594 | */ |
| 580 | #define AMDGPU_HW_IP_VCN_ENC 7 | 595 | #define AMDGPU_HW_IP_VCN_ENC 7 |
| 581 | #define AMDGPU_HW_IP_VCN_JPEG 8 | 596 | #define AMDGPU_HW_IP_VCN_JPEG 8 |
| 582 | #define AMDGPU_HW_IP_NUM 9 | 597 | #define AMDGPU_HW_IP_VPE 9 |
| 598 | #define AMDGPU_HW_IP_NUM 10 | ||
| 583 | 599 | ||
| 584 | #define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 | 600 | #define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 |
| 585 | 601 | ||
| ... | @@ -592,6 +608,7 @@ struct drm_amdgpu_gem_va { | ... | @@ -592,6 +608,7 @@ struct drm_amdgpu_gem_va { |
| 592 | #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES	0x07 | 608 | #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES	0x07 |
| 593 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT 0x08 | 609 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT 0x08 |
| 594 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL 0x09 | 610 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL 0x09 |
| 611 | #define AMDGPU_CHUNK_ID_CP_GFX_SHADOW 0x0a | ||
| 595 | 612 | ||
| 596 | struct drm_amdgpu_cs_chunk { | 613 | struct drm_amdgpu_cs_chunk { |
| 597 | 	__u32		chunk_id; | 614 | 	__u32		chunk_id; |
| ... | @@ -708,6 +725,15 @@ struct drm_amdgpu_cs_chunk_data { | ... | @@ -708,6 +725,15 @@ struct drm_amdgpu_cs_chunk_data { |
| 708 | 	}; | 725 | 	}; |
| 709 | }; | 726 | }; |
| 710 | 727 | ||
| 728 | #define AMDGPU_CS_CHUNK_CP_GFX_SHADOW_FLAGS_INIT_SHADOW 0x1 | ||
| 729 | |||
| 730 | struct drm_amdgpu_cs_chunk_cp_gfx_shadow { | ||
| 731 | 	__u64 shadow_va; | ||
| 732 | 	__u64 csa_va; | ||
| 733 | 	__u64 gds_va; | ||
| 734 | 	__u64 flags; | ||
| 735 | }; | ||
| 736 | |||
| 711 | /* | 737 | /* |
| 712 | * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU | 738 | * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU |
| 713 | * | 739 | * |
| ... | @@ -780,6 +806,8 @@ struct drm_amdgpu_cs_chunk_data { | ... | @@ -780,6 +806,8 @@ struct drm_amdgpu_cs_chunk_data { |
| 780 | 	#define AMDGPU_INFO_FW_MES		0x1a | 806 | 	#define AMDGPU_INFO_FW_MES		0x1a |
| 781 | 	/* Subquery id: Query IMU firmware version */ | 807 | 	/* Subquery id: Query IMU firmware version */ |
| 782 | 	#define AMDGPU_INFO_FW_IMU		0x1b | 808 | 	#define AMDGPU_INFO_FW_IMU		0x1b |
| 809 | 	/* Subquery id: Query VPE firmware version */ | ||
| 810 | 	#define AMDGPU_INFO_FW_VPE		0x1c | ||
| 783 | 811 | ||
| 784 | /* number of bytes moved for TTM migration */ | 812 | /* number of bytes moved for TTM migration */ |
| 785 | #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f | 813 | #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f |
| ... | @@ -837,6 +865,8 @@ struct drm_amdgpu_cs_chunk_data { | ... | @@ -837,6 +865,8 @@ struct drm_amdgpu_cs_chunk_data { |
| 837 | 	#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_SCLK			0xa | 865 | 	#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_SCLK			0xa |
| 838 | 	/* Subquery id: Query GPU peak pstate memory clock */ | 866 | 	/* Subquery id: Query GPU peak pstate memory clock */ |
| 839 | 	#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_MCLK			0xb | 867 | 	#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_MCLK			0xb |
| 868 | 	/* Subquery id: Query input GPU power	*/ | ||
| 869 | 	#define AMDGPU_INFO_SENSOR_GPU_INPUT_POWER	0xc | ||
| 840 | /* Number of VRAM page faults on CPU access. */ | 870 | /* Number of VRAM page faults on CPU access. */ |
| 841 | #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS	0x1E | 871 | #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS	0x1E |
| 842 | #define AMDGPU_INFO_VRAM_LOST_COUNTER		0x1F | 872 | #define AMDGPU_INFO_VRAM_LOST_COUNTER		0x1F |
| ... | @@ -876,6 +906,10 @@ struct drm_amdgpu_cs_chunk_data { | ... | @@ -876,6 +906,10 @@ struct drm_amdgpu_cs_chunk_data { |
| 876 | 	#define AMDGPU_INFO_VIDEO_CAPS_DECODE		0 | 906 | 	#define AMDGPU_INFO_VIDEO_CAPS_DECODE		0 |
| 877 | 	/* Subquery id: Encode */ | 907 | 	/* Subquery id: Encode */ |
| 878 | 	#define AMDGPU_INFO_VIDEO_CAPS_ENCODE		1 | 908 | 	#define AMDGPU_INFO_VIDEO_CAPS_ENCODE		1 |
| 909 | /* Query the max number of IBs per gang per submission */ | ||
| 910 | #define AMDGPU_INFO_MAX_IBS			0x22 | ||
| 911 | /* query last page fault info */ | ||
| 912 | #define AMDGPU_INFO_GPUVM_FAULT			0x23 | ||
| 879 | 913 | ||
| 880 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT	0 | 914 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT	0 |
| 881 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK	0xff | 915 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK	0xff |
| ... | @@ -1126,6 +1160,14 @@ struct drm_amdgpu_info_device { | ... | @@ -1126,6 +1160,14 @@ struct drm_amdgpu_info_device { |
| 1126 | 	__u64 mall_size; /* AKA infinity cache */ | 1160 | 	__u64 mall_size; /* AKA infinity cache */ |
| 1127 | 	/* high 32 bits of the rb pipes mask */ | 1161 | 	/* high 32 bits of the rb pipes mask */ |
| 1128 | 	__u32 enabled_rb_pipes_mask_hi; | 1162 | 	__u32 enabled_rb_pipes_mask_hi; |
| 1163 | 	/* shadow area size for gfx11 */ | ||
| 1164 | 	__u32 shadow_size; | ||
| 1165 | 	/* shadow area base virtual alignment for gfx11 */ | ||
| 1166 | 	__u32 shadow_alignment; | ||
| 1167 | 	/* context save area size for gfx11 */ | ||
| 1168 | 	__u32 csa_size; | ||
| 1169 | 	/* context save area base virtual alignment for gfx11 */ | ||
| 1170 | 	__u32 csa_alignment; | ||
| 1129 | }; | 1171 | }; |
| 1130 | 1172 | ||
| 1131 | struct drm_amdgpu_info_hw_ip { | 1173 | struct drm_amdgpu_info_hw_ip { |
| ... | @@ -1193,6 +1235,20 @@ struct drm_amdgpu_info_video_caps { | ... | @@ -1193,6 +1235,20 @@ struct drm_amdgpu_info_video_caps { |
| 1193 | 	struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT]; | 1235 | 	struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT]; |
| 1194 | }; | 1236 | }; |
| 1195 | 1237 | ||
| 1238 | #define AMDGPU_VMHUB_TYPE_MASK			0xff | ||
| 1239 | #define AMDGPU_VMHUB_TYPE_SHIFT			0 | ||
| 1240 | #define AMDGPU_VMHUB_TYPE_GFX			0 | ||
| 1241 | #define AMDGPU_VMHUB_TYPE_MM0			1 | ||
| 1242 | #define AMDGPU_VMHUB_TYPE_MM1			2 | ||
| 1243 | #define AMDGPU_VMHUB_IDX_MASK			0xff00 | ||
| 1244 | #define AMDGPU_VMHUB_IDX_SHIFT			8 | ||
| 1245 | |||
| 1246 | struct drm_amdgpu_info_gpuvm_fault { | ||
| 1247 | 	__u64 addr; | ||
| 1248 | 	__u32 status; | ||
| 1249 | 	__u32 vmhub; | ||
| 1250 | }; | ||
| 1251 | |||
| 1196 | /* | 1252 | /* |
| 1197 | * Supported GPU families | 1253 | * Supported GPU families |
| 1198 | */ | 1254 | */ |
| ... | @@ -1211,6 +1267,7 @@ struct drm_amdgpu_info_video_caps { | ... | @@ -1211,6 +1267,7 @@ struct drm_amdgpu_info_video_caps { |
| 1211 | #define AMDGPU_FAMILY_GC_11_0_1			148 /* GC 11.0.1 */ | 1267 | #define AMDGPU_FAMILY_GC_11_0_1			148 /* GC 11.0.1 */ |
| 1212 | #define AMDGPU_FAMILY_GC_10_3_6			149 /* GC 10.3.6 */ | 1268 | #define AMDGPU_FAMILY_GC_10_3_6			149 /* GC 10.3.6 */ |
| 1213 | #define AMDGPU_FAMILY_GC_10_3_7			151 /* GC 10.3.7 */ | 1269 | #define AMDGPU_FAMILY_GC_10_3_7			151 /* GC 10.3.7 */ |
| 1270 | #define AMDGPU_FAMILY_GC_11_5_0			150 /* GC 11.5.0 */ | ||
| 1214 | 1271 | ||
| 1215 | #if defined(__cplusplus) | 1272 | #if defined(__cplusplus) |
| 1216 | } | 1273 | } |
lib/libc/include/any-linux-any/drm/drm.h+215-18| ... | @@ -667,8 +667,11 @@ struct drm_gem_open { | ... | @@ -667,8 +667,11 @@ struct drm_gem_open { |
| 667 | * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT | 667 | * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT |
| 668 | * and &DRM_PRIME_CAP_EXPORT. | 668 | * and &DRM_PRIME_CAP_EXPORT. |
| 669 | * | 669 | * |
| 670 | * PRIME buffers are exposed as dma-buf file descriptors. See | 670 | * Starting from kernel version 6.6, both &DRM_PRIME_CAP_IMPORT and |
| 671 | * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". | 671 | * &DRM_PRIME_CAP_EXPORT are always advertised. |
| 672 | * | ||
| 673 | * PRIME buffers are exposed as dma-buf file descriptors. | ||
| 674 | * See :ref:`prime_buffer_sharing`. | ||
| 672 | */ | 675 | */ |
| 673 | #define DRM_CAP_PRIME			0x5 | 676 | #define DRM_CAP_PRIME			0x5 |
| 674 | /** | 677 | /** |
| ... | @@ -676,6 +679,8 @@ struct drm_gem_open { | ... | @@ -676,6 +679,8 @@ struct drm_gem_open { |
| 676 | * | 679 | * |
| 677 | * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME | 680 | * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME |
| 678 | * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. | 681 | * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. |
| 682 | * | ||
| 683 | * Starting from kernel version 6.6, this bit is always set in &DRM_CAP_PRIME. | ||
| 679 | */ | 684 | */ |
| 680 | #define DRM_PRIME_CAP_IMPORT		0x1 | 685 | #define DRM_PRIME_CAP_IMPORT		0x1 |
| 681 | /** | 686 | /** |
| ... | @@ -683,6 +688,8 @@ struct drm_gem_open { | ... | @@ -683,6 +688,8 @@ struct drm_gem_open { |
| 683 | * | 688 | * |
| 684 | * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME | 689 | * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME |
| 685 | * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. | 690 | * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. |
| 691 | * | ||
| 692 | * Starting from kernel version 6.6, this bit is always set in &DRM_CAP_PRIME. | ||
| 686 | */ | 693 | */ |
| 687 | #define DRM_PRIME_CAP_EXPORT		0x2 | 694 | #define DRM_PRIME_CAP_EXPORT		0x2 |
| 688 | /** | 695 | /** |
| ... | @@ -700,7 +707,8 @@ struct drm_gem_open { | ... | @@ -700,7 +707,8 @@ struct drm_gem_open { |
| 700 | /** | 707 | /** |
| 701 | * DRM_CAP_ASYNC_PAGE_FLIP | 708 | * DRM_CAP_ASYNC_PAGE_FLIP |
| 702 | * | 709 | * |
| 703 | * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. | 710 | * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for legacy |
| 711 | * page-flips. | ||
| 704 | */ | 712 | */ |
| 705 | #define DRM_CAP_ASYNC_PAGE_FLIP		0x7 | 713 | #define DRM_CAP_ASYNC_PAGE_FLIP		0x7 |
| 706 | /** | 714 | /** |
| ... | @@ -750,17 +758,23 @@ struct drm_gem_open { | ... | @@ -750,17 +758,23 @@ struct drm_gem_open { |
| 750 | /** | 758 | /** |
| 751 | * DRM_CAP_SYNCOBJ | 759 | * DRM_CAP_SYNCOBJ |
| 752 | * | 760 | * |
| 753 | * If set to 1, the driver supports sync objects. See | 761 | * If set to 1, the driver supports sync objects. See :ref:`drm_sync_objects`. |
| 754 | * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". | ||
| 755 | */ | 762 | */ |
| 756 | #define DRM_CAP_SYNCOBJ		0x13 | 763 | #define DRM_CAP_SYNCOBJ		0x13 |
| 757 | /** | 764 | /** |
| 758 | * DRM_CAP_SYNCOBJ_TIMELINE | 765 | * DRM_CAP_SYNCOBJ_TIMELINE |
| 759 | * | 766 | * |
| 760 | * If set to 1, the driver supports timeline operations on sync objects. See | 767 | * If set to 1, the driver supports timeline operations on sync objects. See |
| 761 | * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". | 768 | * :ref:`drm_sync_objects`. |
| 762 | */ | 769 | */ |
| 763 | #define DRM_CAP_SYNCOBJ_TIMELINE	0x14 | 770 | #define DRM_CAP_SYNCOBJ_TIMELINE	0x14 |
| 771 | /** | ||
| 772 | * DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP | ||
| 773 | * | ||
| 774 | * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for atomic | ||
| 775 | * commits. | ||
| 776 | */ | ||
| 777 | #define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP	0x15 | ||
| 764 | 778 | ||
| 765 | /* DRM_IOCTL_GET_CAP ioctl argument type */ | 779 | /* DRM_IOCTL_GET_CAP ioctl argument type */ |
| 766 | struct drm_get_cap { | 780 | struct drm_get_cap { |
| ... | @@ -830,6 +844,31 @@ struct drm_get_cap { | ... | @@ -830,6 +844,31 @@ struct drm_get_cap { |
| 830 | */ | 844 | */ |
| 831 | #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS	5 | 845 | #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS	5 |
| 832 | 846 | ||
| 847 | /** | ||
| 848 | * DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT | ||
| 849 | * | ||
| 850 | * Drivers for para-virtualized hardware (e.g. vmwgfx, qxl, virtio and | ||
| 851 | * virtualbox) have additional restrictions for cursor planes (thus | ||
| 852 | * making cursor planes on those drivers not truly universal,) e.g. | ||
| 853 | * they need cursor planes to act like one would expect from a mouse | ||
| 854 | * cursor and have correctly set hotspot properties. | ||
| 855 | * If this client cap is not set the DRM core will hide cursor plane on | ||
| 856 | * those virtualized drivers because not setting it implies that the | ||
| 857 | * client is not capable of dealing with those extra restictions. | ||
| 858 | * Clients which do set cursor hotspot and treat the cursor plane | ||
| 859 | * like a mouse cursor should set this property. | ||
| 860 | * The client must enable &DRM_CLIENT_CAP_ATOMIC first. | ||
| 861 | * | ||
| 862 | * Setting this property on drivers which do not special case | ||
| 863 | * cursor planes (i.e. non-virtualized drivers) will return | ||
| 864 | * EOPNOTSUPP, which can be used by userspace to gauge | ||
| 865 | * requirements of the hardware/drivers they're running on. | ||
| 866 | * | ||
| 867 | * This capability is always supported for atomic-capable virtualized | ||
| 868 | * drivers starting from kernel version 6.6. | ||
| 869 | */ | ||
| 870 | #define DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT	6 | ||
| 871 | |||
| 833 | /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ | 872 | /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ |
| 834 | struct drm_set_client_cap { | 873 | struct drm_set_client_cap { |
| 835 | 	__u64 capability; | 874 | 	__u64 capability; |
| ... | @@ -881,6 +920,7 @@ struct drm_syncobj_transfer { | ... | @@ -881,6 +920,7 @@ struct drm_syncobj_transfer { |
| 881 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) | 920 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) |
| 882 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) | 921 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) |
| 883 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ | 922 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ |
| 923 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE (1 << 3) /* set fence deadline to deadline_nsec */ | ||
| 884 | struct drm_syncobj_wait { | 924 | struct drm_syncobj_wait { |
| 885 | 	__u64 handles; | 925 | 	__u64 handles; |
| 886 | 	/* absolute timeout */ | 926 | 	/* absolute timeout */ |
| ... | @@ -889,6 +929,14 @@ struct drm_syncobj_wait { | ... | @@ -889,6 +929,14 @@ struct drm_syncobj_wait { |
| 889 | 	__u32 flags; | 929 | 	__u32 flags; |
| 890 | 	__u32 first_signaled; /* only valid when not waiting all */ | 930 | 	__u32 first_signaled; /* only valid when not waiting all */ |
| 891 | 	__u32 pad; | 931 | 	__u32 pad; |
| 932 | 	/** | ||
| 933 | 	 * @deadline_nsec - fence deadline hint | ||
| 934 | 	 * | ||
| 935 | 	 * Deadline hint, in absolute CLOCK_MONOTONIC, to set on backing | ||
| 936 | 	 * fence(s) if the DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE flag is | ||
| 937 | 	 * set. | ||
| 938 | 	 */ | ||
| 939 | 	__u64 deadline_nsec; | ||
| 892 | }; | 940 | }; |
| 893 | 941 | ||
| 894 | struct drm_syncobj_timeline_wait { | 942 | struct drm_syncobj_timeline_wait { |
| ... | @@ -901,6 +949,35 @@ struct drm_syncobj_timeline_wait { | ... | @@ -901,6 +949,35 @@ struct drm_syncobj_timeline_wait { |
| 901 | 	__u32 flags; | 949 | 	__u32 flags; |
| 902 | 	__u32 first_signaled; /* only valid when not waiting all */ | 950 | 	__u32 first_signaled; /* only valid when not waiting all */ |
| 903 | 	__u32 pad; | 951 | 	__u32 pad; |
| 952 | 	/** | ||
| 953 | 	 * @deadline_nsec - fence deadline hint | ||
| 954 | 	 * | ||
| 955 | 	 * Deadline hint, in absolute CLOCK_MONOTONIC, to set on backing | ||
| 956 | 	 * fence(s) if the DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE flag is | ||
| 957 | 	 * set. | ||
| 958 | 	 */ | ||
| 959 | 	__u64 deadline_nsec; | ||
| 960 | }; | ||
| 961 | |||
| 962 | /** | ||
| 963 | * struct drm_syncobj_eventfd | ||
| 964 | * @handle: syncobj handle. | ||
| 965 | * @flags: Zero to wait for the point to be signalled, or | ||
| 966 | * &DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE to wait for a fence to be | ||
| 967 | * available for the point. | ||
| 968 | * @point: syncobj timeline point (set to zero for binary syncobjs). | ||
| 969 | * @fd: Existing eventfd to sent events to. | ||
| 970 | * @pad: Must be zero. | ||
| 971 | * | ||
| 972 | * Register an eventfd to be signalled by a syncobj. The eventfd counter will | ||
| 973 | * be incremented by one. | ||
| 974 | */ | ||
| 975 | struct drm_syncobj_eventfd { | ||
| 976 | 	__u32 handle; | ||
| 977 | 	__u32 flags; | ||
| 978 | 	__u64 point; | ||
| 979 | 	__s32 fd; | ||
| 980 | 	__u32 pad; | ||
| 904 | }; | 981 | }; |
| 905 | 982 | ||
| 906 | 983 | ||
| ... | @@ -966,6 +1043,19 @@ extern "C" { | ... | @@ -966,6 +1043,19 @@ extern "C" { |
| 966 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) | 1043 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) |
| 967 | #define DRM_IOCTL_SET_VERSION		DRM_IOWR(0x07, struct drm_set_version) | 1044 | #define DRM_IOCTL_SET_VERSION		DRM_IOWR(0x07, struct drm_set_version) |
| 968 | #define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) | 1045 | #define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) |
| 1046 | /** | ||
| 1047 | * DRM_IOCTL_GEM_CLOSE - Close a GEM handle. | ||
| 1048 | * | ||
| 1049 | * GEM handles are not reference-counted by the kernel. User-space is | ||
| 1050 | * responsible for managing their lifetime. For example, if user-space imports | ||
| 1051 | * the same memory object twice on the same DRM file description, the same GEM | ||
| 1052 | * handle is returned by both imports, and user-space needs to ensure | ||
| 1053 | * &DRM_IOCTL_GEM_CLOSE is performed once only. The same situation can happen | ||
| 1054 | * when a memory object is allocated, then exported and imported again on the | ||
| 1055 | * same DRM file description. The &DRM_IOCTL_MODE_GETFB2 IOCTL is an exception | ||
| 1056 | * and always returns fresh new GEM handles even if an existing GEM handle | ||
| 1057 | * already refers to the same memory object before the IOCTL is performed. | ||
| 1058 | */ | ||
| 969 | #define DRM_IOCTL_GEM_CLOSE		DRM_IOW (0x09, struct drm_gem_close) | 1059 | #define DRM_IOCTL_GEM_CLOSE		DRM_IOW (0x09, struct drm_gem_close) |
| 970 | #define DRM_IOCTL_GEM_FLINK		DRM_IOWR(0x0a, struct drm_gem_flink) | 1060 | #define DRM_IOCTL_GEM_FLINK		DRM_IOWR(0x0a, struct drm_gem_flink) |
| 971 | #define DRM_IOCTL_GEM_OPEN		DRM_IOWR(0x0b, struct drm_gem_open) | 1061 | #define DRM_IOCTL_GEM_OPEN		DRM_IOWR(0x0b, struct drm_gem_open) |
| ... | @@ -1006,7 +1096,37 @@ extern "C" { | ... | @@ -1006,7 +1096,37 @@ extern "C" { |
| 1006 | #define DRM_IOCTL_UNLOCK		DRM_IOW( 0x2b, struct drm_lock) | 1096 | #define DRM_IOCTL_UNLOCK		DRM_IOW( 0x2b, struct drm_lock) |
| 1007 | #define DRM_IOCTL_FINISH		DRM_IOW( 0x2c, struct drm_lock) | 1097 | #define DRM_IOCTL_FINISH		DRM_IOW( 0x2c, struct drm_lock) |
| 1008 | 1098 | ||
| 1099 | /** | ||
| 1100 | * DRM_IOCTL_PRIME_HANDLE_TO_FD - Convert a GEM handle to a DMA-BUF FD. | ||
| 1101 | * | ||
| 1102 | * User-space sets &drm_prime_handle.handle with the GEM handle to export and | ||
| 1103 | * &drm_prime_handle.flags, and gets back a DMA-BUF file descriptor in | ||
| 1104 | * &drm_prime_handle.fd. | ||
| 1105 | * | ||
| 1106 | * The export can fail for any driver-specific reason, e.g. because export is | ||
| 1107 | * not supported for this specific GEM handle (but might be for others). | ||
| 1108 | * | ||
| 1109 | * Support for exporting DMA-BUFs is advertised via &DRM_PRIME_CAP_EXPORT. | ||
| 1110 | */ | ||
| 1009 | #define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) | 1111 | #define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) |
| 1112 | /** | ||
| 1113 | * DRM_IOCTL_PRIME_FD_TO_HANDLE - Convert a DMA-BUF FD to a GEM handle. | ||
| 1114 | * | ||
| 1115 | * User-space sets &drm_prime_handle.fd with a DMA-BUF file descriptor to | ||
| 1116 | * import, and gets back a GEM handle in &drm_prime_handle.handle. | ||
| 1117 | * &drm_prime_handle.flags is unused. | ||
| 1118 | * | ||
| 1119 | * If an existing GEM handle refers to the memory object backing the DMA-BUF, | ||
| 1120 | * that GEM handle is returned. Therefore user-space which needs to handle | ||
| 1121 | * arbitrary DMA-BUFs must have a user-space lookup data structure to manually | ||
| 1122 | * reference-count duplicated GEM handles. For more information see | ||
| 1123 | * &DRM_IOCTL_GEM_CLOSE. | ||
| 1124 | * | ||
| 1125 | * The import can fail for any driver-specific reason, e.g. because import is | ||
| 1126 | * only supported for DMA-BUFs allocated on this DRM device. | ||
| 1127 | * | ||
| 1128 | * Support for importing DMA-BUFs is advertised via &DRM_PRIME_CAP_IMPORT. | ||
| 1129 | */ | ||
| 1010 | #define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) | 1130 | #define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) |
| 1011 | 1131 | ||
| 1012 | #define DRM_IOCTL_AGP_ACQUIRE		DRM_IO( 0x30) | 1132 | #define DRM_IOCTL_AGP_ACQUIRE		DRM_IO( 0x30) |
| ... | @@ -1058,6 +1178,26 @@ extern "C" { | ... | @@ -1058,6 +1178,26 @@ extern "C" { |
| 1058 | #define DRM_IOCTL_MODE_PAGE_FLIP	DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) | 1178 | #define DRM_IOCTL_MODE_PAGE_FLIP	DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) |
| 1059 | #define DRM_IOCTL_MODE_DIRTYFB		DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) | 1179 | #define DRM_IOCTL_MODE_DIRTYFB		DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) |
| 1060 | 1180 | ||
| 1181 | /** | ||
| 1182 | * DRM_IOCTL_MODE_CREATE_DUMB - Create a new dumb buffer object. | ||
| 1183 | * | ||
| 1184 | * KMS dumb buffers provide a very primitive way to allocate a buffer object | ||
| 1185 | * suitable for scanout and map it for software rendering. KMS dumb buffers are | ||
| 1186 | * not suitable for hardware-accelerated rendering nor video decoding. KMS dumb | ||
| 1187 | * buffers are not suitable to be displayed on any other device than the KMS | ||
| 1188 | * device where they were allocated from. Also see | ||
| 1189 | * :ref:`kms_dumb_buffer_objects`. | ||
| 1190 | * | ||
| 1191 | * The IOCTL argument is a struct drm_mode_create_dumb. | ||
| 1192 | * | ||
| 1193 | * User-space is expected to create a KMS dumb buffer via this IOCTL, then add | ||
| 1194 | * it as a KMS framebuffer via &DRM_IOCTL_MODE_ADDFB and map it via | ||
| 1195 | * &DRM_IOCTL_MODE_MAP_DUMB. | ||
| 1196 | * | ||
| 1197 | * &DRM_CAP_DUMB_BUFFER indicates whether this IOCTL is supported. | ||
| 1198 | * &DRM_CAP_DUMB_PREFERRED_DEPTH and &DRM_CAP_DUMB_PREFER_SHADOW indicate | ||
| 1199 | * driver preferences for dumb buffers. | ||
| 1200 | */ | ||
| 1061 | #define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) | 1201 | #define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) |
| 1062 | #define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) | 1202 | #define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) |
| 1063 | #define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) | 1203 | #define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) |
| ... | @@ -1098,8 +1238,13 @@ extern "C" { | ... | @@ -1098,8 +1238,13 @@ extern "C" { |
| 1098 | * struct as the output. | 1238 | * struct as the output. |
| 1099 | * | 1239 | * |
| 1100 | * If the client is DRM master or has &CAP_SYS_ADMIN, &drm_mode_fb_cmd2.handles | 1240 | * If the client is DRM master or has &CAP_SYS_ADMIN, &drm_mode_fb_cmd2.handles |
| 1101 | * will be filled with GEM buffer handles. Planes are valid until one has a | 1241 | * will be filled with GEM buffer handles. Fresh new GEM handles are always |
| 1102 | * zero handle -- this can be used to compute the number of planes. | 1242 | * returned, even if another GEM handle referring to the same memory object |
| 1243 | * already exists on the DRM file description. The caller is responsible for | ||
| 1244 | * removing the new handles, e.g. via the &DRM_IOCTL_GEM_CLOSE IOCTL. The same | ||
| 1245 | * new handle will be returned for multiple planes in case they use the same | ||
| 1246 | * memory object. Planes are valid until one has a zero handle -- this can be | ||
| 1247 | * used to compute the number of planes. | ||
| 1103 | * | 1248 | * |
| 1104 | * Otherwise, &drm_mode_fb_cmd2.handles will be zeroed and planes are valid | 1249 | * Otherwise, &drm_mode_fb_cmd2.handles will be zeroed and planes are valid |
| 1105 | * until one has a zero &drm_mode_fb_cmd2.pitches. | 1250 | * until one has a zero &drm_mode_fb_cmd2.pitches. |
| ... | @@ -1107,9 +1252,36 @@ extern "C" { | ... | @@ -1107,9 +1252,36 @@ extern "C" { |
| 1107 | * If the framebuffer has a format modifier, &DRM_MODE_FB_MODIFIERS will be set | 1252 | * If the framebuffer has a format modifier, &DRM_MODE_FB_MODIFIERS will be set |
| 1108 | * in &drm_mode_fb_cmd2.flags and &drm_mode_fb_cmd2.modifier will contain the | 1253 | * in &drm_mode_fb_cmd2.flags and &drm_mode_fb_cmd2.modifier will contain the |
| 1109 | * modifier. Otherwise, user-space must ignore &drm_mode_fb_cmd2.modifier. | 1254 | * modifier. Otherwise, user-space must ignore &drm_mode_fb_cmd2.modifier. |
| 1255 | * | ||
| 1256 | * To obtain DMA-BUF FDs for each plane without leaking GEM handles, user-space | ||
| 1257 | * can export each handle via &DRM_IOCTL_PRIME_HANDLE_TO_FD, then immediately | ||
| 1258 | * close each unique handle via &DRM_IOCTL_GEM_CLOSE, making sure to not | ||
| 1259 | * double-close handles which are specified multiple times in the array. | ||
| 1110 | */ | 1260 | */ |
| 1111 | #define DRM_IOCTL_MODE_GETFB2		DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) | 1261 | #define DRM_IOCTL_MODE_GETFB2		DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) |
| 1112 | 1262 | ||
| 1263 | #define DRM_IOCTL_SYNCOBJ_EVENTFD	DRM_IOWR(0xCF, struct drm_syncobj_eventfd) | ||
| 1264 | |||
| 1265 | /** | ||
| 1266 | * DRM_IOCTL_MODE_CLOSEFB - Close a framebuffer. | ||
| 1267 | * | ||
| 1268 | * This closes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL | ||
| 1269 | * argument is a framebuffer object ID. | ||
| 1270 | * | ||
| 1271 | * This IOCTL is similar to &DRM_IOCTL_MODE_RMFB, except it doesn't disable | ||
| 1272 | * planes and CRTCs. As long as the framebuffer is used by a plane, it's kept | ||
| 1273 | * alive. When the plane no longer uses the framebuffer (because the | ||
| 1274 | * framebuffer is replaced with another one, or the plane is disabled), the | ||
| 1275 | * framebuffer is cleaned up. | ||
| 1276 | * | ||
| 1277 | * This is useful to implement flicker-free transitions between two processes. | ||
| 1278 | * | ||
| 1279 | * Depending on the threat model, user-space may want to ensure that the | ||
| 1280 | * framebuffer doesn't expose any sensitive user information: closed | ||
| 1281 | * framebuffers attached to a plane can be read back by the next DRM master. | ||
| 1282 | */ | ||
| 1283 | #define DRM_IOCTL_MODE_CLOSEFB		DRM_IOWR(0xD0, struct drm_mode_closefb) | ||
| 1284 | |||
| 1113 | /* | 1285 | /* |
| 1114 | * Device specific ioctls should only be in their respective headers | 1286 | * Device specific ioctls should only be in their respective headers |
| 1115 | * The device specific ioctl range is from 0x40 to 0x9f. | 1287 | * The device specific ioctl range is from 0x40 to 0x9f. |
| ... | @@ -1121,25 +1293,50 @@ extern "C" { | ... | @@ -1121,25 +1293,50 @@ extern "C" { |
| 1121 | #define DRM_COMMAND_BASE 0x40 | 1293 | #define DRM_COMMAND_BASE 0x40 |
| 1122 | #define DRM_COMMAND_END			0xA0 | 1294 | #define DRM_COMMAND_END			0xA0 |
| 1123 | 1295 | ||
| 1124 | /* | 1296 | /** |
| 1125 | * Header for events written back to userspace on the drm fd. The | 1297 | * struct drm_event - Header for DRM events |
| 1126 | * type defines the type of event, the length specifies the total | 1298 | * @type: event type. |
| 1127 | * length of the event (including the header), and user_data is | 1299 | * @length: total number of payload bytes (including header). |
| 1128 | * typically a 64 bit value passed with the ioctl that triggered the | 1300 | * |
| 1129 | * event. A read on the drm fd will always only return complete | 1301 | * This struct is a header for events written back to user-space on the DRM FD. |
| 1130 | * events, that is, if for example the read buffer is 100 bytes, and | 1302 | * A read on the DRM FD will always only return complete events: e.g. if the |
| 1131 | * there are two 64 byte events pending, only one will be returned. | 1303 | * read buffer is 100 bytes large and there are two 64 byte events pending, |
| 1304 | * only one will be returned. | ||
| 1132 | * | 1305 | * |
| 1133 | * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and | 1306 | * Event types 0 - 0x7fffffff are generic DRM events, 0x80000000 and |
| 1134 | * up are chipset specific. | 1307 | * up are chipset specific. Generic DRM events include &DRM_EVENT_VBLANK, |
| 1308 | * &DRM_EVENT_FLIP_COMPLETE and &DRM_EVENT_CRTC_SEQUENCE. | ||
| 1135 | */ | 1309 | */ |
| 1136 | struct drm_event { | 1310 | struct drm_event { |
| 1137 | 	__u32 type; | 1311 | 	__u32 type; |
| 1138 | 	__u32 length; | 1312 | 	__u32 length; |
| 1139 | }; | 1313 | }; |
| 1140 | 1314 | ||
| 1315 | /** | ||
| 1316 | * DRM_EVENT_VBLANK - vertical blanking event | ||
| 1317 | * | ||
| 1318 | * This event is sent in response to &DRM_IOCTL_WAIT_VBLANK with the | ||
| 1319 | * &_DRM_VBLANK_EVENT flag set. | ||
| 1320 | * | ||
| 1321 | * The event payload is a struct drm_event_vblank. | ||
| 1322 | */ | ||
| 1141 | #define DRM_EVENT_VBLANK 0x01 | 1323 | #define DRM_EVENT_VBLANK 0x01 |
| 1324 | /** | ||
| 1325 | * DRM_EVENT_FLIP_COMPLETE - page-flip completion event | ||
| 1326 | * | ||
| 1327 | * This event is sent in response to an atomic commit or legacy page-flip with | ||
| 1328 | * the &DRM_MODE_PAGE_FLIP_EVENT flag set. | ||
| 1329 | * | ||
| 1330 | * The event payload is a struct drm_event_vblank. | ||
| 1331 | */ | ||
| 1142 | #define DRM_EVENT_FLIP_COMPLETE 0x02 | 1332 | #define DRM_EVENT_FLIP_COMPLETE 0x02 |
| 1333 | /** | ||
| 1334 | * DRM_EVENT_CRTC_SEQUENCE - CRTC sequence event | ||
| 1335 | * | ||
| 1336 | * This event is sent in response to &DRM_IOCTL_CRTC_QUEUE_SEQUENCE. | ||
| 1337 | * | ||
| 1338 | * The event payload is a struct drm_event_crtc_sequence. | ||
| 1339 | */ | ||
| 1143 | #define DRM_EVENT_CRTC_SEQUENCE	0x03 | 1340 | #define DRM_EVENT_CRTC_SEQUENCE	0x03 |
| 1144 | 1341 | ||
| 1145 | struct drm_event_vblank { | 1342 | struct drm_event_vblank { |
lib/libc/include/any-linux-any/drm/drm_fourcc.h+50-5| ... | @@ -54,7 +54,7 @@ extern "C" { | ... | @@ -54,7 +54,7 @@ extern "C" { |
| 54 | * Format modifiers may change any property of the buffer, including the number | 54 | * Format modifiers may change any property of the buffer, including the number |
| 55 | * of planes and/or the required allocation size. Format modifiers are | 55 | * of planes and/or the required allocation size. Format modifiers are |
| 56 | * vendor-namespaced, and as such the relationship between a fourcc code and a | 56 | * vendor-namespaced, and as such the relationship between a fourcc code and a |
| 57 | * modifier is specific to the modifer being used. For example, some modifiers | 57 | * modifier is specific to the modifier being used. For example, some modifiers |
| 58 | * may preserve meaning - such as number of planes - from the fourcc code, | 58 | * may preserve meaning - such as number of planes - from the fourcc code, |
| 59 | * whereas others may not. | 59 | * whereas others may not. |
| 60 | * | 60 | * |
| ... | @@ -79,7 +79,7 @@ extern "C" { | ... | @@ -79,7 +79,7 @@ extern "C" { |
| 79 | * format. | 79 | * format. |
| 80 | * - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users | 80 | * - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users |
| 81 | * see modifiers as opaque tokens they can check for equality and intersect. | 81 | * see modifiers as opaque tokens they can check for equality and intersect. |
| 82 | * These users musn't need to know to reason about the modifier value | 82 | * These users mustn't need to know to reason about the modifier value |
| 83 | * (i.e. they are not expected to extract information out of the modifier). | 83 | * (i.e. they are not expected to extract information out of the modifier). |
| 84 | * | 84 | * |
| 85 | * Vendors should document their modifier usage in as much detail as | 85 | * Vendors should document their modifier usage in as much detail as |
| ... | @@ -323,6 +323,8 @@ extern "C" { | ... | @@ -323,6 +323,8 @@ extern "C" { |
| 323 | * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian | 323 | * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian |
| 324 | */ | 324 | */ |
| 325 | #define DRM_FORMAT_NV15		fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */ | 325 | #define DRM_FORMAT_NV15		fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */ |
| 326 | #define DRM_FORMAT_NV20		fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */ | ||
| 327 | #define DRM_FORMAT_NV30		fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */ | ||
| 326 | 328 | ||
| 327 | /* | 329 | /* |
| 328 | * 2 plane YCbCr MSB aligned | 330 | * 2 plane YCbCr MSB aligned |
| ... | @@ -538,7 +540,7 @@ extern "C" { | ... | @@ -538,7 +540,7 @@ extern "C" { |
| 538 | * This is a tiled layout using 4Kb tiles in row-major layout. | 540 | * This is a tiled layout using 4Kb tiles in row-major layout. |
| 539 | * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which | 541 | * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which |
| 540 | * are arranged in four groups (two wide, two high) with column-major layout. | 542 | * are arranged in four groups (two wide, two high) with column-major layout. |
| 541 | * Each group therefore consits out of four 256 byte units, which are also laid | 543 | * Each group therefore consists out of four 256 byte units, which are also laid |
| 542 | * out as 2x2 column-major. | 544 | * out as 2x2 column-major. |
| 543 | * 256 byte units are made out of four 64 byte blocks of pixels, producing | 545 | * 256 byte units are made out of four 64 byte blocks of pixels, producing |
| 544 | * either a square block or a 2:1 unit. | 546 | * either a square block or a 2:1 unit. |
| ... | @@ -657,6 +659,49 @@ extern "C" { | ... | @@ -657,6 +659,49 @@ extern "C" { |
| 657 | */ | 659 | */ |
| 658 | #define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12) | 660 | #define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12) |
| 659 | 661 | ||
| 662 | /* | ||
| 663 | * Intel Color Control Surfaces (CCS) for display ver. 14 render compression. | ||
| 664 | * | ||
| 665 | * The main surface is tile4 and at plane index 0, the CCS is linear and | ||
| 666 | * at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in | ||
| 667 | * main surface. In other words, 4 bits in CCS map to a main surface cache | ||
| 668 | * line pair. The main surface pitch is required to be a multiple of four | ||
| 669 | * tile4 widths. | ||
| 670 | */ | ||
| 671 | #define I915_FORMAT_MOD_4_TILED_MTL_RC_CCS fourcc_mod_code(INTEL, 13) | ||
| 672 | |||
| 673 | /* | ||
| 674 | * Intel Color Control Surfaces (CCS) for display ver. 14 media compression | ||
| 675 | * | ||
| 676 | * The main surface is tile4 and at plane index 0, the CCS is linear and | ||
| 677 | * at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in | ||
| 678 | * main surface. In other words, 4 bits in CCS map to a main surface cache | ||
| 679 | * line pair. The main surface pitch is required to be a multiple of four | ||
| 680 | * tile4 widths. For semi-planar formats like NV12, CCS planes follow the | ||
| 681 | * Y and UV planes i.e., planes 0 and 1 are used for Y and UV surfaces, | ||
| 682 | * planes 2 and 3 for the respective CCS. | ||
| 683 | */ | ||
| 684 | #define I915_FORMAT_MOD_4_TILED_MTL_MC_CCS fourcc_mod_code(INTEL, 14) | ||
| 685 | |||
| 686 | /* | ||
| 687 | * Intel Color Control Surface with Clear Color (CCS) for display ver. 14 render | ||
| 688 | * compression. | ||
| 689 | * | ||
| 690 | * The main surface is tile4 and is at plane index 0 whereas CCS is linear | ||
| 691 | * and at index 1. The clear color is stored at index 2, and the pitch should | ||
| 692 | * be ignored. The clear color structure is 256 bits. The first 128 bits | ||
| 693 | * represents Raw Clear Color Red, Green, Blue and Alpha color each represented | ||
| 694 | * by 32 bits. The raw clear color is consumed by the 3d engine and generates | ||
| 695 | * the converted clear color of size 64 bits. The first 32 bits store the Lower | ||
| 696 | * Converted Clear Color value and the next 32 bits store the Higher Converted | ||
| 697 | * Clear Color value when applicable. The Converted Clear Color values are | ||
| 698 | * consumed by the DE. The last 64 bits are used to store Color Discard Enable | ||
| 699 | * and Depth Clear Value Valid which are ignored by the DE. A CCS cache line | ||
| 700 | * corresponds to an area of 4x1 tiles in the main surface. The main surface | ||
| 701 | * pitch is required to be a multiple of 4 tile widths. | ||
| 702 | */ | ||
| 703 | #define I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC fourcc_mod_code(INTEL, 15) | ||
| 704 | |||
| 660 | /* | 705 | /* |
| 661 | * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks | 706 | * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks |
| 662 | * | 707 | * |
| ... | @@ -1058,7 +1103,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) | ... | @@ -1058,7 +1103,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) |
| 1058 | */ | 1103 | */ |
| 1059 | 1104 | ||
| 1060 | /* | 1105 | /* |
| 1061 | * The top 4 bits (out of the 56 bits alloted for specifying vendor specific | 1106 | * The top 4 bits (out of the 56 bits allotted for specifying vendor specific |
| 1062 | * modifiers) denote the category for modifiers. Currently we have three | 1107 | * modifiers) denote the category for modifiers. Currently we have three |
| 1063 | * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of | 1108 | * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of |
| 1064 | * sixteen different categories. | 1109 | * sixteen different categories. |
| ... | @@ -1374,7 +1419,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) | ... | @@ -1374,7 +1419,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) |
| 1374 | * Amlogic FBC Memory Saving mode | 1419 | * Amlogic FBC Memory Saving mode |
| 1375 | * | 1420 | * |
| 1376 | * Indicates the storage is packed when pixel size is multiple of word | 1421 | * Indicates the storage is packed when pixel size is multiple of word |
| 1377 | * boudaries, i.e. 8bit should be stored in this mode to save allocation | 1422 | * boundaries, i.e. 8bit should be stored in this mode to save allocation |
| 1378 | * memory. | 1423 | * memory. |
| 1379 | * | 1424 | * |
| 1380 | * This mode reduces body layout to 3072 bytes per 64x32 superblock with | 1425 | * This mode reduces body layout to 3072 bytes per 64x32 superblock with |
lib/libc/include/any-linux-any/drm/drm_mode.h+71-13| ... | @@ -36,10 +36,10 @@ extern "C" { | ... | @@ -36,10 +36,10 @@ extern "C" { |
| 36 | /** | 36 | /** |
| 37 | * DOC: overview | 37 | * DOC: overview |
| 38 | * | 38 | * |
| 39 | * DRM exposes many UAPI and structure definition to have a consistent | 39 | * DRM exposes many UAPI and structure definitions to have a consistent |
| 40 | * and standardized interface with user. | 40 | * and standardized interface with users. |
| 41 | * Userspace can refer to these structure definitions and UAPI formats | 41 | * Userspace can refer to these structure definitions and UAPI formats |
| 42 | * to communicate to driver | 42 | * to communicate to drivers. |
| 43 | */ | 43 | */ |
| 44 | 44 | ||
| 45 | #define DRM_CONNECTOR_NAME_LEN	32 | 45 | #define DRM_CONNECTOR_NAME_LEN	32 |
| ... | @@ -488,6 +488,9 @@ struct drm_mode_get_connector { | ... | @@ -488,6 +488,9 @@ struct drm_mode_get_connector { |
| 488 | 	 * This is not an object ID. This is a per-type connector number. Each | 488 | 	 * This is not an object ID. This is a per-type connector number. Each |
| 489 | 	 * (type, type_id) combination is unique across all connectors of a DRM | 489 | 	 * (type, type_id) combination is unique across all connectors of a DRM |
| 490 | 	 * device. | 490 | 	 * device. |
| 491 | 	 * | ||
| 492 | 	 * The (type, type_id) combination is not a stable identifier: the | ||
| 493 | 	 * type_id can change depending on the driver probe order. | ||
| 491 | 	 */ | 494 | 	 */ |
| 492 | 	__u32 connector_type_id; | 495 | 	__u32 connector_type_id; |
| 493 | 496 | ||
| ... | @@ -537,7 +540,7 @@ struct drm_mode_get_connector { | ... | @@ -537,7 +540,7 @@ struct drm_mode_get_connector { |
| 537 | /* the PROP_ATOMIC flag is used to hide properties from userspace that | 540 | /* the PROP_ATOMIC flag is used to hide properties from userspace that |
| 538 | * is not aware of atomic properties. This is mostly to work around | 541 | * is not aware of atomic properties. This is mostly to work around |
| 539 | * older userspace (DDX drivers) that read/write each prop they find, | 542 | * older userspace (DDX drivers) that read/write each prop they find, |
| 540 | * witout being aware that this could be triggering a lengthy modeset. | 543 | * without being aware that this could be triggering a lengthy modeset. |
| 541 | */ | 544 | */ |
| 542 | #define DRM_MODE_PROP_ATOMIC 0x80000000 | 545 | #define DRM_MODE_PROP_ATOMIC 0x80000000 |
| 543 | 546 | ||
| ... | @@ -661,7 +664,7 @@ struct drm_mode_fb_cmd { | ... | @@ -661,7 +664,7 @@ struct drm_mode_fb_cmd { |
| 661 | }; | 664 | }; |
| 662 | 665 | ||
| 663 | #define DRM_MODE_FB_INTERLACED	(1<<0) /* for interlaced framebuffers */ | 666 | #define DRM_MODE_FB_INTERLACED	(1<<0) /* for interlaced framebuffers */ |
| 664 | #define DRM_MODE_FB_MODIFIERS	(1<<1) /* enables ->modifer[] */ | 667 | #define DRM_MODE_FB_MODIFIERS	(1<<1) /* enables ->modifier[] */ |
| 665 | 668 | ||
| 666 | /** | 669 | /** |
| 667 | * struct drm_mode_fb_cmd2 - Frame-buffer metadata. | 670 | * struct drm_mode_fb_cmd2 - Frame-buffer metadata. |
| ... | @@ -834,10 +837,23 @@ struct drm_color_ctm { | ... | @@ -834,10 +837,23 @@ struct drm_color_ctm { |
| 834 | 	/* | 837 | 	/* |
| 835 | 	 * Conversion matrix in S31.32 sign-magnitude | 838 | 	 * Conversion matrix in S31.32 sign-magnitude |
| 836 | 	 * (not two's complement!) format. | 839 | 	 * (not two's complement!) format. |
| 840 | 	 * | ||
| 841 | 	 * out matrix in | ||
| 842 | 	 * |R| |0 1 2| |R| | ||
| 843 | 	 * |G| = |3 4 5| x |G| | ||
| 844 | 	 * |B| |6 7 8| |B| | ||
| 837 | 	 */ | 845 | 	 */ |
| 838 | 	__u64 matrix[9]; | 846 | 	__u64 matrix[9]; |
| 839 | }; | 847 | }; |
| 840 | 848 | ||
| 849 | struct drm_color_ctm_3x4 { | ||
| 850 | 	/* | ||
| 851 | 	 * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude | ||
| 852 | 	 * (not two's complement!) format. | ||
| 853 | 	 */ | ||
| 854 | 	__u64 matrix[12]; | ||
| 855 | }; | ||
| 856 | |||
| 841 | struct drm_color_lut { | 857 | struct drm_color_lut { |
| 842 | 	/* | 858 | 	/* |
| 843 | 	 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and | 859 | 	 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and |
| ... | @@ -849,6 +865,17 @@ struct drm_color_lut { | ... | @@ -849,6 +865,17 @@ struct drm_color_lut { |
| 849 | 	__u16 reserved; | 865 | 	__u16 reserved; |
| 850 | }; | 866 | }; |
| 851 | 867 | ||
| 868 | /** | ||
| 869 | * struct drm_plane_size_hint - Plane size hints | ||
| 870 | * | ||
| 871 | * The plane SIZE_HINTS property blob contains an | ||
| 872 | * array of struct drm_plane_size_hint. | ||
| 873 | */ | ||
| 874 | struct drm_plane_size_hint { | ||
| 875 | 	__u16 width; | ||
| 876 | 	__u16 height; | ||
| 877 | }; | ||
| 878 | |||
| 852 | /** | 879 | /** |
| 853 | * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. | 880 | * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. |
| 854 | * | 881 | * |
| ... | @@ -873,23 +900,23 @@ struct hdr_metadata_infoframe { | ... | @@ -873,23 +900,23 @@ struct hdr_metadata_infoframe { |
| 873 | 	 * These are coded as unsigned 16-bit values in units of | 900 | 	 * These are coded as unsigned 16-bit values in units of |
| 874 | 	 * 0.00002, where 0x0000 represents zero and 0xC350 | 901 | 	 * 0.00002, where 0x0000 represents zero and 0xC350 |
| 875 | 	 * represents 1.0000. | 902 | 	 * represents 1.0000. |
| 876 | 	 * @display_primaries.x: X cordinate of color primary. | 903 | 	 * @display_primaries.x: X coordinate of color primary. |
| 877 | 	 * @display_primaries.y: Y cordinate of color primary. | 904 | 	 * @display_primaries.y: Y coordinate of color primary. |
| 878 | 	 */ | 905 | 	 */ |
| 879 | 	struct { | 906 | 	struct { |
| 880 | 		__u16 x, y; | 907 | 		__u16 x, y; |
| 881 | 		} display_primaries[3]; | 908 | 	} display_primaries[3]; |
| 882 | 	/** | 909 | 	/** |
| 883 | 	 * @white_point: White Point of Colorspace Data. | 910 | 	 * @white_point: White Point of Colorspace Data. |
| 884 | 	 * These are coded as unsigned 16-bit values in units of | 911 | 	 * These are coded as unsigned 16-bit values in units of |
| 885 | 	 * 0.00002, where 0x0000 represents zero and 0xC350 | 912 | 	 * 0.00002, where 0x0000 represents zero and 0xC350 |
| 886 | 	 * represents 1.0000. | 913 | 	 * represents 1.0000. |
| 887 | 	 * @white_point.x: X cordinate of whitepoint of color primary. | 914 | 	 * @white_point.x: X coordinate of whitepoint of color primary. |
| 888 | 	 * @white_point.y: Y cordinate of whitepoint of color primary. | 915 | 	 * @white_point.y: Y coordinate of whitepoint of color primary. |
| 889 | 	 */ | 916 | 	 */ |
| 890 | 	struct { | 917 | 	struct { |
| 891 | 		__u16 x, y; | 918 | 		__u16 x, y; |
| 892 | 		} white_point; | 919 | 	} white_point; |
| 893 | 	/** | 920 | 	/** |
| 894 | 	 * @max_display_mastering_luminance: Max Mastering Display Luminance. | 921 | 	 * @max_display_mastering_luminance: Max Mastering Display Luminance. |
| 895 | 	 * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, | 922 | 	 * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, |
| ... | @@ -949,6 +976,15 @@ struct hdr_output_metadata { | ... | @@ -949,6 +976,15 @@ struct hdr_output_metadata { |
| 949 | * Request that the page-flip is performed as soon as possible, ie. with no | 976 | * Request that the page-flip is performed as soon as possible, ie. with no |
| 950 | * delay due to waiting for vblank. This may cause tearing to be visible on | 977 | * delay due to waiting for vblank. This may cause tearing to be visible on |
| 951 | * the screen. | 978 | * the screen. |
| 979 | * | ||
| 980 | * When used with atomic uAPI, the driver will return an error if the hardware | ||
| 981 | * doesn't support performing an asynchronous page-flip for this update. | ||
| 982 | * User-space should handle this, e.g. by falling back to a regular page-flip. | ||
| 983 | * | ||
| 984 | * Note, some hardware might need to perform one last synchronous page-flip | ||
| 985 | * before being able to switch to asynchronous page-flips. As an exception, | ||
| 986 | * the driver will return success even though that first page-flip is not | ||
| 987 | * asynchronous. | ||
| 952 | */ | 988 | */ |
| 953 | #define DRM_MODE_PAGE_FLIP_ASYNC 0x02 | 989 | #define DRM_MODE_PAGE_FLIP_ASYNC 0x02 |
| 954 | #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 | 990 | #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 |
| ... | @@ -1024,13 +1060,25 @@ struct drm_mode_crtc_page_flip_target { | ... | @@ -1024,13 +1060,25 @@ struct drm_mode_crtc_page_flip_target { |
| 1024 | 	__u64 user_data; | 1060 | 	__u64 user_data; |
| 1025 | }; | 1061 | }; |
| 1026 | 1062 | ||
| 1027 | /* create a dumb scanout buffer */ | 1063 | /** |
| 1064 | * struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout. | ||
| 1065 | * @height: buffer height in pixels | ||
| 1066 | * @width: buffer width in pixels | ||
| 1067 | * @bpp: bits per pixel | ||
| 1068 | * @flags: must be zero | ||
| 1069 | * @handle: buffer object handle | ||
| 1070 | * @pitch: number of bytes between two consecutive lines | ||
| 1071 | * @size: size of the whole buffer in bytes | ||
| 1072 | * | ||
| 1073 | * User-space fills @height, @width, @bpp and @flags. If the IOCTL succeeds, | ||
| 1074 | * the kernel fills @handle, @pitch and @size. | ||
| 1075 | */ | ||
| 1028 | struct drm_mode_create_dumb { | 1076 | struct drm_mode_create_dumb { |
| 1029 | 	__u32 height; | 1077 | 	__u32 height; |
| 1030 | 	__u32 width; | 1078 | 	__u32 width; |
| 1031 | 	__u32 bpp; | 1079 | 	__u32 bpp; |
| 1032 | 	__u32 flags; | 1080 | 	__u32 flags; |
| 1033 | 	/* handle, pitch, size will be returned */ | 1081 | |
| 1034 | 	__u32 handle; | 1082 | 	__u32 handle; |
| 1035 | 	__u32 pitch; | 1083 | 	__u32 pitch; |
| 1036 | 	__u64 size; | 1084 | 	__u64 size; |
| ... | @@ -1303,6 +1351,16 @@ struct drm_mode_rect { | ... | @@ -1303,6 +1351,16 @@ struct drm_mode_rect { |
| 1303 | 	__s32 y2; | 1351 | 	__s32 y2; |
| 1304 | }; | 1352 | }; |
| 1305 | 1353 | ||
| 1354 | /** | ||
| 1355 | * struct drm_mode_closefb | ||
| 1356 | * @fb_id: Framebuffer ID. | ||
| 1357 | * @pad: Must be zero. | ||
| 1358 | */ | ||
| 1359 | struct drm_mode_closefb { | ||
| 1360 | 	__u32 fb_id; | ||
| 1361 | 	__u32 pad; | ||
| 1362 | }; | ||
| 1363 | |||
| 1306 | #if defined(__cplusplus) | 1364 | #if defined(__cplusplus) |
| 1307 | } | 1365 | } |
| 1308 | #endif | 1366 | #endif |
lib/libc/include/any-linux-any/drm/habanalabs_accel.h+173-38| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
| 2 | * | 2 | * |
| 3 | * Copyright 2016-2022 HabanaLabs, Ltd. | 3 | * Copyright 2016-2023 HabanaLabs, Ltd. |
| 4 | * All Rights Reserved. | 4 | * All Rights Reserved. |
| 5 | * | 5 | * |
| 6 | */ | 6 | */ |
| ... | @@ -8,8 +8,7 @@ | ... | @@ -8,8 +8,7 @@ |
| 8 | #ifndef HABANALABS_H_ | 8 | #ifndef HABANALABS_H_ |
| 9 | #define HABANALABS_H_ | 9 | #define HABANALABS_H_ |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | 11 | #include <drm/drm.h> |
| 12 | #include <linux/ioctl.h> | ||
| 13 | 12 | ||
| 14 | /* | 13 | /* |
| 15 | * Defines that are asic-specific but constitutes as ABI between kernel driver | 14 | * Defines that are asic-specific but constitutes as ABI between kernel driver |
| ... | @@ -607,9 +606,9 @@ enum gaudi2_engine_id { | ... | @@ -607,9 +606,9 @@ enum gaudi2_engine_id { |
| 607 | /* | 606 | /* |
| 608 | * ASIC specific PLL index | 607 | * ASIC specific PLL index |
| 609 | * | 608 | * |
| 610 | * Used to retrieve in frequency info of different IPs via | 609 | * Used to retrieve in frequency info of different IPs via HL_INFO_PLL_FREQUENCY under |
| 611 | * HL_INFO_PLL_FREQUENCY under HL_IOCTL_INFO IOCTL. The enums need to be | 610 | * DRM_IOCTL_HL_INFO IOCTL. |
| 612 | * used as an index in struct hl_pll_frequency_info | 611 | * The enums need to be used as an index in struct hl_pll_frequency_info. |
| 613 | */ | 612 | */ |
| 614 | 613 | ||
| 615 | enum hl_goya_pll_index { | 614 | enum hl_goya_pll_index { |
| ... | @@ -708,7 +707,8 @@ enum hl_server_type { | ... | @@ -708,7 +707,8 @@ enum hl_server_type { |
| 708 | 	HL_SERVER_GAUDI_HLS1H = 2, | 707 | 	HL_SERVER_GAUDI_HLS1H = 2, |
| 709 | 	HL_SERVER_GAUDI_TYPE1 = 3, | 708 | 	HL_SERVER_GAUDI_TYPE1 = 3, |
| 710 | 	HL_SERVER_GAUDI_TYPE2 = 4, | 709 | 	HL_SERVER_GAUDI_TYPE2 = 4, |
| 711 | 	HL_SERVER_GAUDI2_HLS2 = 5 | 710 | 	HL_SERVER_GAUDI2_HLS2 = 5, |
| 711 | 	HL_SERVER_GAUDI2_TYPE1 = 7 | ||
| 712 | }; | 712 | }; |
| 713 | 713 | ||
| 714 | /* | 714 | /* |
| ... | @@ -723,6 +723,10 @@ enum hl_server_type { | ... | @@ -723,6 +723,10 @@ enum hl_server_type { |
| 723 | * HL_NOTIFIER_EVENT_GENERAL_HW_ERR - Indicates device HW error | 723 | * HL_NOTIFIER_EVENT_GENERAL_HW_ERR - Indicates device HW error |
| 724 | * HL_NOTIFIER_EVENT_RAZWI - Indicates razwi happened | 724 | * HL_NOTIFIER_EVENT_RAZWI - Indicates razwi happened |
| 725 | * HL_NOTIFIER_EVENT_PAGE_FAULT - Indicates page fault happened | 725 | * HL_NOTIFIER_EVENT_PAGE_FAULT - Indicates page fault happened |
| 726 | * HL_NOTIFIER_EVENT_CRITICAL_HW_ERR - Indicates a HW error that requires SW abort and | ||
| 727 | * HW reset | ||
| 728 | * HL_NOTIFIER_EVENT_CRITICAL_FW_ERR - Indicates a FW error that requires SW abort and | ||
| 729 | * HW reset | ||
| 726 | */ | 730 | */ |
| 727 | #define HL_NOTIFIER_EVENT_TPC_ASSERT		(1ULL << 0) | 731 | #define HL_NOTIFIER_EVENT_TPC_ASSERT		(1ULL << 0) |
| 728 | #define HL_NOTIFIER_EVENT_UNDEFINED_OPCODE	(1ULL << 1) | 732 | #define HL_NOTIFIER_EVENT_UNDEFINED_OPCODE	(1ULL << 1) |
| ... | @@ -733,6 +737,8 @@ enum hl_server_type { | ... | @@ -733,6 +737,8 @@ enum hl_server_type { |
| 733 | #define HL_NOTIFIER_EVENT_GENERAL_HW_ERR	(1ULL << 6) | 737 | #define HL_NOTIFIER_EVENT_GENERAL_HW_ERR	(1ULL << 6) |
| 734 | #define HL_NOTIFIER_EVENT_RAZWI			(1ULL << 7) | 738 | #define HL_NOTIFIER_EVENT_RAZWI			(1ULL << 7) |
| 735 | #define HL_NOTIFIER_EVENT_PAGE_FAULT		(1ULL << 8) | 739 | #define HL_NOTIFIER_EVENT_PAGE_FAULT		(1ULL << 8) |
| 740 | #define HL_NOTIFIER_EVENT_CRITICL_HW_ERR	(1ULL << 9) | ||
| 741 | #define HL_NOTIFIER_EVENT_CRITICL_FW_ERR	(1ULL << 10) | ||
| 736 | 742 | ||
| 737 | /* Opcode for management ioctl | 743 | /* Opcode for management ioctl |
| 738 | * | 744 | * |
| ... | @@ -780,16 +786,29 @@ enum hl_server_type { | ... | @@ -780,16 +786,29 @@ enum hl_server_type { |
| 780 | * The address which accessing it caused the razwi. | 786 | * The address which accessing it caused the razwi. |
| 781 | * Razwi initiator. | 787 | * Razwi initiator. |
| 782 | * Razwi cause, was it a page fault or MMU access error. | 788 | * Razwi cause, was it a page fault or MMU access error. |
| 789 | * May return 0 even though no new data is available, in that case | ||
| 790 | * timestamp will be 0. | ||
| 783 | * HL_INFO_DEV_MEM_ALLOC_PAGE_SIZES - Retrieve valid page sizes for device memory allocation | 791 | * HL_INFO_DEV_MEM_ALLOC_PAGE_SIZES - Retrieve valid page sizes for device memory allocation |
| 784 | * HL_INFO_SECURED_ATTESTATION - Retrieve attestation report of the boot. | 792 | * HL_INFO_SECURED_ATTESTATION - Retrieve attestation report of the boot. |
| 785 | * HL_INFO_REGISTER_EVENTFD - Register eventfd for event notifications. | 793 | * HL_INFO_REGISTER_EVENTFD - Register eventfd for event notifications. |
| 786 | * HL_INFO_UNREGISTER_EVENTFD - Unregister eventfd | 794 | * HL_INFO_UNREGISTER_EVENTFD - Unregister eventfd |
| 787 | * HL_INFO_GET_EVENTS - Retrieve the last occurred events | 795 | * HL_INFO_GET_EVENTS - Retrieve the last occurred events |
| 788 | * HL_INFO_UNDEFINED_OPCODE_EVENT - Retrieve last undefined opcode error information. | 796 | * HL_INFO_UNDEFINED_OPCODE_EVENT - Retrieve last undefined opcode error information. |
| 797 | * May return 0 even though no new data is available, in that case | ||
| 798 | * timestamp will be 0. | ||
| 789 | * HL_INFO_ENGINE_STATUS - Retrieve the status of all the h/w engines in the asic. | 799 | * HL_INFO_ENGINE_STATUS - Retrieve the status of all the h/w engines in the asic. |
| 790 | * HL_INFO_PAGE_FAULT_EVENT - Retrieve parameters of captured page fault. | 800 | * HL_INFO_PAGE_FAULT_EVENT - Retrieve parameters of captured page fault. |
| 801 | * May return 0 even though no new data is available, in that case | ||
| 802 | * timestamp will be 0. | ||
| 791 | * HL_INFO_USER_MAPPINGS - Retrieve user mappings, captured after page fault event. | 803 | * HL_INFO_USER_MAPPINGS - Retrieve user mappings, captured after page fault event. |
| 792 | * HL_INFO_FW_GENERIC_REQ - Send generic request to FW. | 804 | * HL_INFO_FW_GENERIC_REQ - Send generic request to FW. |
| 805 | * HL_INFO_HW_ERR_EVENT - Retrieve information on the reported HW error. | ||
| 806 | * May return 0 even though no new data is available, in that case | ||
| 807 | * timestamp will be 0. | ||
| 808 | * HL_INFO_FW_ERR_EVENT - Retrieve information on the reported FW error. | ||
| 809 | * May return 0 even though no new data is available, in that case | ||
| 810 | * timestamp will be 0. | ||
| 811 | * HL_INFO_USER_ENGINE_ERR_EVENT - Retrieve the last engine id that reported an error. | ||
| 793 | */ | 812 | */ |
| 794 | #define HL_INFO_HW_IP_INFO			0 | 813 | #define HL_INFO_HW_IP_INFO			0 |
| 795 | #define HL_INFO_HW_EVENTS			1 | 814 | #define HL_INFO_HW_EVENTS			1 |
| ... | @@ -824,6 +843,10 @@ enum hl_server_type { | ... | @@ -824,6 +843,10 @@ enum hl_server_type { |
| 824 | #define HL_INFO_PAGE_FAULT_EVENT		33 | 843 | #define HL_INFO_PAGE_FAULT_EVENT		33 |
| 825 | #define HL_INFO_USER_MAPPINGS			34 | 844 | #define HL_INFO_USER_MAPPINGS			34 |
| 826 | #define HL_INFO_FW_GENERIC_REQ			35 | 845 | #define HL_INFO_FW_GENERIC_REQ			35 |
| 846 | #define HL_INFO_HW_ERR_EVENT			36 | ||
| 847 | #define HL_INFO_FW_ERR_EVENT			37 | ||
| 848 | #define HL_INFO_USER_ENGINE_ERR_EVENT		38 | ||
| 849 | #define HL_INFO_DEV_SIGNED			40 | ||
| 827 | 850 | ||
| 828 | #define HL_INFO_VERSION_MAX_LEN			128 | 851 | #define HL_INFO_VERSION_MAX_LEN			128 |
| 829 | #define HL_INFO_CARD_NAME_MAX_LEN		16 | 852 | #define HL_INFO_CARD_NAME_MAX_LEN		16 |
| ... | @@ -863,11 +886,11 @@ enum hl_server_type { | ... | @@ -863,11 +886,11 @@ enum hl_server_type { |
| 863 | * @dram_enabled: Whether the DRAM is enabled. | 886 | * @dram_enabled: Whether the DRAM is enabled. |
| 864 | * @security_enabled: Whether security is enabled on device. | 887 | * @security_enabled: Whether security is enabled on device. |
| 865 | * @mme_master_slave_mode: Indicate whether the MME is working in master/slave | 888 | * @mme_master_slave_mode: Indicate whether the MME is working in master/slave |
| 866 | * configuration. Relevant for Greco and later. | 889 | * configuration. Relevant for Gaudi2 and later. |
| 867 | * @cpucp_version: The CPUCP f/w version. | 890 | * @cpucp_version: The CPUCP f/w version. |
| 868 | * @card_name: The card name as passed by the f/w. | 891 | * @card_name: The card name as passed by the f/w. |
| 869 | * @tpc_enabled_mask_ext: Bit-mask that represents which TPCs are enabled. | 892 | * @tpc_enabled_mask_ext: Bit-mask that represents which TPCs are enabled. |
| 870 | * Relevant for Greco and later. | 893 | * Relevant for Gaudi2 and later. |
| 871 | * @dram_page_size: The DRAM physical page size. | 894 | * @dram_page_size: The DRAM physical page size. |
| 872 | * @edma_enabled_mask: Bit-mask that represents which EDMAs are enabled. | 895 | * @edma_enabled_mask: Bit-mask that represents which EDMAs are enabled. |
| 873 | * Relevant for Gaudi2 and later. | 896 | * Relevant for Gaudi2 and later. |
| ... | @@ -875,6 +898,12 @@ enum hl_server_type { | ... | @@ -875,6 +898,12 @@ enum hl_server_type { |
| 875 | * application to use. Relevant for Gaudi2 and later. | 898 | * application to use. Relevant for Gaudi2 and later. |
| 876 | * @device_mem_alloc_default_page_size: default page size used in device memory allocation. | 899 | * @device_mem_alloc_default_page_size: default page size used in device memory allocation. |
| 877 | * @revision_id: PCI revision ID of the ASIC. | 900 | * @revision_id: PCI revision ID of the ASIC. |
| 901 | * @tpc_interrupt_id: interrupt id for TPC to use in order to raise events towards the host. | ||
| 902 | * @rotator_enabled_mask: Bit-mask that represents which rotators are enabled. | ||
| 903 | * Relevant for Gaudi3 and later. | ||
| 904 | * @engine_core_interrupt_reg_addr: interrupt register address for engine core to use | ||
| 905 | * in order to raise events toward FW. | ||
| 906 | * @reserved_dram_size: DRAM size reserved for driver and firmware. | ||
| 878 | */ | 907 | */ |
| 879 | struct hl_info_hw_ip_info { | 908 | struct hl_info_hw_ip_info { |
| 880 | 	__u64 sram_base_address; | 909 | 	__u64 sram_base_address; |
| ... | @@ -902,15 +931,20 @@ struct hl_info_hw_ip_info { | ... | @@ -902,15 +931,20 @@ struct hl_info_hw_ip_info { |
| 902 | 	__u64 dram_page_size; | 931 | 	__u64 dram_page_size; |
| 903 | 	__u32 edma_enabled_mask; | 932 | 	__u32 edma_enabled_mask; |
| 904 | 	__u16 number_of_user_interrupts; | 933 | 	__u16 number_of_user_interrupts; |
| 905 | 	__u16 pad2; | 934 | 	__u8 reserved1; |
| 906 | 	__u64 reserved4; | 935 | 	__u8 reserved2; |
| 936 | 	__u64 reserved3; | ||
| 907 | 	__u64 device_mem_alloc_default_page_size; | 937 | 	__u64 device_mem_alloc_default_page_size; |
| 938 | 	__u64 reserved4; | ||
| 908 | 	__u64 reserved5; | 939 | 	__u64 reserved5; |
| 909 | 	__u64 reserved6; | 940 | 	__u32 reserved6; |
| 910 | 	__u32 reserved7; | 941 | 	__u8 reserved7; |
| 911 | 	__u8 reserved8; | ||
| 912 | 	__u8 revision_id; | 942 | 	__u8 revision_id; |
| 913 | 	__u8 pad[2]; | 943 | 	__u16 tpc_interrupt_id; |
| 944 | 	__u32 rotator_enabled_mask; | ||
| 945 | 	__u32 reserved9; | ||
| 946 | 	__u64 engine_core_interrupt_reg_addr; | ||
| 947 | 	__u64 reserved_dram_size; | ||
| 914 | }; | 948 | }; |
| 915 | 949 | ||
| 916 | struct hl_info_dram_usage { | 950 | struct hl_info_dram_usage { |
| ... | @@ -958,6 +992,7 @@ struct hl_info_reset_count { | ... | @@ -958,6 +992,7 @@ struct hl_info_reset_count { |
| 958 | struct hl_info_time_sync { | 992 | struct hl_info_time_sync { |
| 959 | 	__u64 device_time; | 993 | 	__u64 device_time; |
| 960 | 	__u64 host_time; | 994 | 	__u64 host_time; |
| 995 | 	__u64 tsc_time; | ||
| 961 | }; | 996 | }; |
| 962 | 997 | ||
| 963 | /** | 998 | /** |
| ... | @@ -1161,6 +1196,53 @@ struct hl_info_undefined_opcode_event { | ... | @@ -1161,6 +1196,53 @@ struct hl_info_undefined_opcode_event { |
| 1161 | 	__u32 stream_id; | 1196 | 	__u32 stream_id; |
| 1162 | }; | 1197 | }; |
| 1163 | 1198 | ||
| 1199 | /** | ||
| 1200 | * struct hl_info_hw_err_event - info about HW error | ||
| 1201 | * @timestamp: timestamp of error occurrence | ||
| 1202 | * @event_id: The async event ID (specific to each device type). | ||
| 1203 | * @pad: size padding for u64 granularity. | ||
| 1204 | */ | ||
| 1205 | struct hl_info_hw_err_event { | ||
| 1206 | 	__s64 timestamp; | ||
| 1207 | 	__u16 event_id; | ||
| 1208 | 	__u16 pad[3]; | ||
| 1209 | }; | ||
| 1210 | |||
| 1211 | /* FW error definition for event_type in struct hl_info_fw_err_event */ | ||
| 1212 | enum hl_info_fw_err_type { | ||
| 1213 | 	HL_INFO_FW_HEARTBEAT_ERR, | ||
| 1214 | 	HL_INFO_FW_REPORTED_ERR, | ||
| 1215 | }; | ||
| 1216 | |||
| 1217 | /** | ||
| 1218 | * struct hl_info_fw_err_event - info about FW error | ||
| 1219 | * @timestamp: time-stamp of error occurrence | ||
| 1220 | * @err_type: The type of event as defined in hl_info_fw_err_type. | ||
| 1221 | * @event_id: The async event ID (specific to each device type, applicable only when event type is | ||
| 1222 | * HL_INFO_FW_REPORTED_ERR). | ||
| 1223 | * @pad: size padding for u64 granularity. | ||
| 1224 | */ | ||
| 1225 | struct hl_info_fw_err_event { | ||
| 1226 | 	__s64 timestamp; | ||
| 1227 | 	__u16 err_type; | ||
| 1228 | 	__u16 event_id; | ||
| 1229 | 	__u32 pad; | ||
| 1230 | }; | ||
| 1231 | |||
| 1232 | /** | ||
| 1233 | * struct hl_info_engine_err_event - engine error info | ||
| 1234 | * @timestamp: time-stamp of error occurrence | ||
| 1235 | * @engine_id: engine id who reported the error. | ||
| 1236 | * @error_count: Amount of errors reported. | ||
| 1237 | * @pad: size padding for u64 granularity. | ||
| 1238 | */ | ||
| 1239 | struct hl_info_engine_err_event { | ||
| 1240 | 	__s64 timestamp; | ||
| 1241 | 	__u16 engine_id; | ||
| 1242 | 	__u16 error_count; | ||
| 1243 | 	__u32 pad; | ||
| 1244 | }; | ||
| 1245 | |||
| 1164 | /** | 1246 | /** |
| 1165 | * struct hl_info_dev_memalloc_page_sizes - valid page sizes in device mem alloc information. | 1247 | * struct hl_info_dev_memalloc_page_sizes - valid page sizes in device mem alloc information. |
| 1166 | * @page_order_bitmask: bitmap in which a set bit represents the order of the supported page size | 1248 | * @page_order_bitmask: bitmap in which a set bit represents the order of the supported page size |
| ... | @@ -1175,6 +1257,7 @@ struct hl_info_dev_memalloc_page_sizes { | ... | @@ -1175,6 +1257,7 @@ struct hl_info_dev_memalloc_page_sizes { |
| 1175 | #define SEC_SIGNATURE_BUF_SZ	255	/* (256 - 1) 1 byte used for size */ | 1257 | #define SEC_SIGNATURE_BUF_SZ	255	/* (256 - 1) 1 byte used for size */ |
| 1176 | #define SEC_PUB_DATA_BUF_SZ	510	/* (512 - 2) 2 bytes used for size */ | 1258 | #define SEC_PUB_DATA_BUF_SZ	510	/* (512 - 2) 2 bytes used for size */ |
| 1177 | #define SEC_CERTIFICATE_BUF_SZ	2046	/* (2048 - 2) 2 bytes used for size */ | 1259 | #define SEC_CERTIFICATE_BUF_SZ	2046	/* (2048 - 2) 2 bytes used for size */ |
| 1260 | #define SEC_DEV_INFO_BUF_SZ	5120 | ||
| 1178 | 1261 | ||
| 1179 | /* | 1262 | /* |
| 1180 | * struct hl_info_sec_attest - attestation report of the boot | 1263 | * struct hl_info_sec_attest - attestation report of the boot |
| ... | @@ -1209,6 +1292,32 @@ struct hl_info_sec_attest { | ... | @@ -1209,6 +1292,32 @@ struct hl_info_sec_attest { |
| 1209 | 	__u8 pad0[2]; | 1292 | 	__u8 pad0[2]; |
| 1210 | }; | 1293 | }; |
| 1211 | 1294 | ||
| 1295 | /* | ||
| 1296 | * struct hl_info_signed - device information signed by a secured device. | ||
| 1297 | * @nonce: number only used once. random number provided by host. this also passed to the quote | ||
| 1298 | * command as a qualifying data. | ||
| 1299 | * @pub_data_len: length of the public data (bytes) | ||
| 1300 | * @certificate_len: length of the certificate (bytes) | ||
| 1301 | * @info_sig_len: length of the attestation signature (bytes) | ||
| 1302 | * @public_data: public key info signed info data (outPublic + name + qualifiedName) | ||
| 1303 | * @certificate: certificate for the signing key | ||
| 1304 | * @info_sig: signature of the info + nonce data. | ||
| 1305 | * @dev_info_len: length of device info (bytes) | ||
| 1306 | * @dev_info: device info as byte array. | ||
| 1307 | */ | ||
| 1308 | struct hl_info_signed { | ||
| 1309 | 	__u32 nonce; | ||
| 1310 | 	__u16 pub_data_len; | ||
| 1311 | 	__u16 certificate_len; | ||
| 1312 | 	__u8 info_sig_len; | ||
| 1313 | 	__u8 public_data[SEC_PUB_DATA_BUF_SZ]; | ||
| 1314 | 	__u8 certificate[SEC_CERTIFICATE_BUF_SZ]; | ||
| 1315 | 	__u8 info_sig[SEC_SIGNATURE_BUF_SZ]; | ||
| 1316 | 	__u16 dev_info_len; | ||
| 1317 | 	__u8 dev_info[SEC_DEV_INFO_BUF_SZ]; | ||
| 1318 | 	__u8 pad[2]; | ||
| 1319 | }; | ||
| 1320 | |||
| 1212 | /** | 1321 | /** |
| 1213 | * struct hl_page_fault_info - page fault information. | 1322 | * struct hl_page_fault_info - page fault information. |
| 1214 | * @timestamp: timestamp of page fault. | 1323 | * @timestamp: timestamp of page fault. |
| ... | @@ -1344,7 +1453,7 @@ union hl_cb_args { | ... | @@ -1344,7 +1453,7 @@ union hl_cb_args { |
| 1344 | * | 1453 | * |
| 1345 | * HL_CS_CHUNK_FLAGS_USER_ALLOC_CB: | 1454 | * HL_CS_CHUNK_FLAGS_USER_ALLOC_CB: |
| 1346 | * Indicates if the CB was allocated and mapped by userspace | 1455 | * Indicates if the CB was allocated and mapped by userspace |
| 1347 | * (relevant to greco and above). User allocated CB is a command buffer, | 1456 | * (relevant to Gaudi2 and later). User allocated CB is a command buffer, |
| 1348 | * allocated by the user, via malloc (or similar). After allocating the | 1457 | * allocated by the user, via malloc (or similar). After allocating the |
| 1349 | * CB, the user invokes - “memory ioctl” to map the user memory into a | 1458 | * CB, the user invokes - “memory ioctl” to map the user memory into a |
| 1350 | * device virtual address. The user provides this address via the | 1459 | * device virtual address. The user provides this address via the |
| ... | @@ -1369,7 +1478,7 @@ struct hl_cs_chunk { | ... | @@ -1369,7 +1478,7 @@ struct hl_cs_chunk { |
| 1369 | 		 * a DRAM address of the internal CB. In Gaudi, this might also | 1478 | 		 * a DRAM address of the internal CB. In Gaudi, this might also |
| 1370 | 		 * represent a mapped host address of the CB. | 1479 | 		 * represent a mapped host address of the CB. |
| 1371 | 		 * | 1480 | 		 * |
| 1372 | 		 * Greco onwards: | 1481 | 		 * Gaudi2 onwards: |
| 1373 | 		 * For H/W queue, this represents either a Handle of CB on the | 1482 | 		 * For H/W queue, this represents either a Handle of CB on the |
| 1374 | 		 * Host, or an SRAM, a DRAM, or a mapped host address of the CB. | 1483 | 		 * Host, or an SRAM, a DRAM, or a mapped host address of the CB. |
| 1375 | 		 * | 1484 | 		 * |
| ... | @@ -1486,17 +1595,31 @@ struct hl_cs_chunk { | ... | @@ -1486,17 +1595,31 @@ struct hl_cs_chunk { |
| 1486 | */ | 1595 | */ |
| 1487 | #define HL_CS_FLAGS_FLUSH_PCI_HBW_WRITES	0x8000 | 1596 | #define HL_CS_FLAGS_FLUSH_PCI_HBW_WRITES	0x8000 |
| 1488 | 1597 | ||
| 1598 | /* | ||
| 1599 | * The engines CS is merged into the existing CS ioctls. | ||
| 1600 | * Use it to control engines modes. | ||
| 1601 | */ | ||
| 1602 | #define HL_CS_FLAGS_ENGINES_COMMAND		0x10000 | ||
| 1603 | |||
| 1489 | #define HL_CS_STATUS_SUCCESS		0 | 1604 | #define HL_CS_STATUS_SUCCESS		0 |
| 1490 | 1605 | ||
| 1491 | #define HL_MAX_JOBS_PER_CS		512 | 1606 | #define HL_MAX_JOBS_PER_CS		512 |
| 1492 | 1607 | ||
| 1493 | /* HL_ENGINE_CORE_ values | 1608 | /* |
| 1609 | * enum hl_engine_command - engine command | ||
| 1494 | * | 1610 | * |
| 1495 | * HL_ENGINE_CORE_HALT: engine core halt | 1611 | * @HL_ENGINE_CORE_HALT: engine core halt |
| 1496 | * HL_ENGINE_CORE_RUN: engine core run | 1612 | * @HL_ENGINE_CORE_RUN: engine core run |
| 1613 | * @HL_ENGINE_STALL: user engine/s stall | ||
| 1614 | * @HL_ENGINE_RESUME: user engine/s resume | ||
| 1497 | */ | 1615 | */ |
| 1498 | #define HL_ENGINE_CORE_HALT	(1 << 0) | 1616 | enum hl_engine_command { |
| 1499 | #define HL_ENGINE_CORE_RUN	(1 << 1) | 1617 | 	HL_ENGINE_CORE_HALT = 1, |
| 1618 | 	HL_ENGINE_CORE_RUN = 2, | ||
| 1619 | 	HL_ENGINE_STALL = 3, | ||
| 1620 | 	HL_ENGINE_RESUME = 4, | ||
| 1621 | 	HL_ENGINE_COMMAND_MAX | ||
| 1622 | }; | ||
| 1500 | 1623 | ||
| 1501 | struct hl_cs_in { | 1624 | struct hl_cs_in { |
| 1502 | 1625 | ||
| ... | @@ -1520,6 +1643,18 @@ struct hl_cs_in { | ... | @@ -1520,6 +1643,18 @@ struct hl_cs_in { |
| 1520 | 			/* the core command to be sent towards engine cores */ | 1643 | 			/* the core command to be sent towards engine cores */ |
| 1521 | 			__u32 core_command; | 1644 | 			__u32 core_command; |
| 1522 | 		}; | 1645 | 		}; |
| 1646 | |||
| 1647 | 		/* Valid only when HL_CS_FLAGS_ENGINES_COMMAND is set */ | ||
| 1648 | 		struct { | ||
| 1649 | 			/* this holds address of array of uint32 for engines */ | ||
| 1650 | 			__u64 engines; | ||
| 1651 | |||
| 1652 | 			/* number of engines in engines array */ | ||
| 1653 | 			__u32 num_engines; | ||
| 1654 | |||
| 1655 | 			/* the engine command to be sent towards engines */ | ||
| 1656 | 			__u32 engine_command; | ||
| 1657 | 		}; | ||
| 1523 | 	}; | 1658 | 	}; |
| 1524 | 1659 | ||
| 1525 | 	union { | 1660 | 	union { |
| ... | @@ -2056,6 +2191,13 @@ struct hl_debug_args { | ... | @@ -2056,6 +2191,13 @@ struct hl_debug_args { |
| 2056 | 	__u32 ctx_id; | 2191 | 	__u32 ctx_id; |
| 2057 | }; | 2192 | }; |
| 2058 | 2193 | ||
| 2194 | #define HL_IOCTL_INFO		0x00 | ||
| 2195 | #define HL_IOCTL_CB		0x01 | ||
| 2196 | #define HL_IOCTL_CS		0x02 | ||
| 2197 | #define HL_IOCTL_WAIT_CS	0x03 | ||
| 2198 | #define HL_IOCTL_MEMORY		0x04 | ||
| 2199 | #define HL_IOCTL_DEBUG		0x05 | ||
| 2200 | |||
| 2059 | /* | 2201 | /* |
| 2060 | * Various information operations such as: | 2202 | * Various information operations such as: |
| 2061 | * - H/W IP information | 2203 | * - H/W IP information |
| ... | @@ -2070,8 +2212,7 @@ struct hl_debug_args { | ... | @@ -2070,8 +2212,7 @@ struct hl_debug_args { |
| 2070 | * definitions of structures in kernel and userspace, e.g. in case of old | 2212 | * definitions of structures in kernel and userspace, e.g. in case of old |
| 2071 | * userspace and new kernel driver | 2213 | * userspace and new kernel driver |
| 2072 | */ | 2214 | */ |
| 2073 | #define HL_IOCTL_INFO	\ | 2215 | #define DRM_IOCTL_HL_INFO	DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_INFO, struct hl_info_args) |
| 2074 | 		_IOWR('H', 0x01, struct hl_info_args) | ||
| 2075 | 2216 | ||
| 2076 | /* | 2217 | /* |
| 2077 | * Command Buffer | 2218 | * Command Buffer |
| ... | @@ -2092,8 +2233,7 @@ struct hl_debug_args { | ... | @@ -2092,8 +2233,7 @@ struct hl_debug_args { |
| 2092 | * and won't be returned to user. | 2233 | * and won't be returned to user. |
| 2093 | * | 2234 | * |
| 2094 | */ | 2235 | */ |
| 2095 | #define HL_IOCTL_CB		\ | 2236 | #define DRM_IOCTL_HL_CB		DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CB, union hl_cb_args) |
| 2096 | 		_IOWR('H', 0x02, union hl_cb_args) | ||
| 2097 | 2237 | ||
| 2098 | /* | 2238 | /* |
| 2099 | * Command Submission | 2239 | * Command Submission |
| ... | @@ -2115,7 +2255,7 @@ struct hl_debug_args { | ... | @@ -2115,7 +2255,7 @@ struct hl_debug_args { |
| 2115 | * internal. The driver will get completion notifications from the device only | 2255 | * internal. The driver will get completion notifications from the device only |
| 2116 | * on JOBS which are enqueued in the external queues. | 2256 | * on JOBS which are enqueued in the external queues. |
| 2117 | * | 2257 | * |
| 2118 | * Greco onwards: | 2258 | * Gaudi2 onwards: |
| 2119 | * There is a single type of queue for all types of engines, either DMA engines | 2259 | * There is a single type of queue for all types of engines, either DMA engines |
| 2120 | * for transfers from/to the host or inside the device, or compute engines. | 2260 | * for transfers from/to the host or inside the device, or compute engines. |
| 2121 | * The driver will get completion notifications from the device for all queues. | 2261 | * The driver will get completion notifications from the device for all queues. |
| ... | @@ -2145,8 +2285,7 @@ struct hl_debug_args { | ... | @@ -2145,8 +2285,7 @@ struct hl_debug_args { |
| 2145 | * and only if CS N and CS N-1 are exactly the same (same CBs for the same | 2285 | * and only if CS N and CS N-1 are exactly the same (same CBs for the same |
| 2146 | * queues). | 2286 | * queues). |
| 2147 | */ | 2287 | */ |
| 2148 | #define HL_IOCTL_CS			\ | 2288 | #define DRM_IOCTL_HL_CS		DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_CS, union hl_cs_args) |
| 2149 | 		_IOWR('H', 0x03, union hl_cs_args) | ||
| 2150 | 2289 | ||
| 2151 | /* | 2290 | /* |
| 2152 | * Wait for Command Submission | 2291 | * Wait for Command Submission |
| ... | @@ -2178,9 +2317,7 @@ struct hl_debug_args { | ... | @@ -2178,9 +2317,7 @@ struct hl_debug_args { |
| 2178 | * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the | 2317 | * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the |
| 2179 | * device was reset (EIO) | 2318 | * device was reset (EIO) |
| 2180 | */ | 2319 | */ |
| 2181 | 2320 | #define DRM_IOCTL_HL_WAIT_CS	DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_WAIT_CS, union hl_wait_cs_args) | |
| 2182 | #define HL_IOCTL_WAIT_CS			\ | ||
| 2183 | 		_IOWR('H', 0x04, union hl_wait_cs_args) | ||
| 2184 | 2321 | ||
| 2185 | /* | 2322 | /* |
| 2186 | * Memory | 2323 | * Memory |
| ... | @@ -2197,8 +2334,7 @@ struct hl_debug_args { | ... | @@ -2197,8 +2334,7 @@ struct hl_debug_args { |
| 2197 | * There is an option for the user to specify the requested virtual address. | 2334 | * There is an option for the user to specify the requested virtual address. |
| 2198 | * | 2335 | * |
| 2199 | */ | 2336 | */ |
| 2200 | #define HL_IOCTL_MEMORY		\ | 2337 | #define DRM_IOCTL_HL_MEMORY	DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_MEMORY, union hl_mem_args) |
| 2201 | 		_IOWR('H', 0x05, union hl_mem_args) | ||
| 2202 | 2338 | ||
| 2203 | /* | 2339 | /* |
| 2204 | * Debug | 2340 | * Debug |
| ... | @@ -2224,10 +2360,9 @@ struct hl_debug_args { | ... | @@ -2224,10 +2360,9 @@ struct hl_debug_args { |
| 2224 | * The driver can decide to "kick out" the user if he abuses this interface. | 2360 | * The driver can decide to "kick out" the user if he abuses this interface. |
| 2225 | * | 2361 | * |
| 2226 | */ | 2362 | */ |
| 2227 | #define HL_IOCTL_DEBUG		\ | 2363 | #define DRM_IOCTL_HL_DEBUG	DRM_IOWR(DRM_COMMAND_BASE + HL_IOCTL_DEBUG, struct hl_debug_args) |
| 2228 | 		_IOWR('H', 0x06, struct hl_debug_args) | ||
| 2229 | 2364 | ||
| 2230 | #define HL_COMMAND_START	0x01 | 2365 | #define HL_COMMAND_START	(DRM_COMMAND_BASE + HL_IOCTL_INFO) |
| 2231 | #define HL_COMMAND_END		0x07 | 2366 | #define HL_COMMAND_END		(DRM_COMMAND_BASE + HL_IOCTL_DEBUG + 1) |
| 2232 | 2367 | ||
| 2233 | #endif /* HABANALABS_H_ */ | 2368 | #endif /* HABANALABS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/i915_drm.h+171-16| ... | @@ -38,13 +38,13 @@ extern "C" { | ... | @@ -38,13 +38,13 @@ extern "C" { |
| 38 | */ | 38 | */ |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * DOC: uevents generated by i915 on it's device node | 41 | * DOC: uevents generated by i915 on its device node |
| 42 | * | 42 | * |
| 43 | * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch | 43 | * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch |
| 44 | *	event from the gpu l3 cache. Additional information supplied is ROW, | 44 | *	event from the GPU L3 cache. Additional information supplied is ROW, |
| 45 | *	BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep | 45 | *	BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep |
| 46 | *	track of these events and if a specific cache-line seems to have a | 46 | *	track of these events, and if a specific cache-line seems to have a |
| 47 | *	persistent error remap it with the l3 remapping tool supplied in | 47 | *	persistent error, remap it with the L3 remapping tool supplied in |
| 48 | *	intel-gpu-tools. The value supplied with the event is always 1. | 48 | *	intel-gpu-tools. The value supplied with the event is always 1. |
| 49 | * | 49 | * |
| 50 | * I915_ERROR_UEVENT - Generated upon error detection, currently only via | 50 | * I915_ERROR_UEVENT - Generated upon error detection, currently only via |
| ... | @@ -280,7 +280,16 @@ enum drm_i915_pmu_engine_sample { | ... | @@ -280,7 +280,16 @@ enum drm_i915_pmu_engine_sample { |
| 280 | #define I915_PMU_ENGINE_SEMA(class, instance) \ | 280 | #define I915_PMU_ENGINE_SEMA(class, instance) \ |
| 281 | 	__I915_PMU_ENGINE(class, instance, I915_SAMPLE_SEMA) | 281 | 	__I915_PMU_ENGINE(class, instance, I915_SAMPLE_SEMA) |
| 282 | 282 | ||
| 283 | #define __I915_PMU_OTHER(x) (__I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) | 283 | /* |
| 284 | * Top 4 bits of every non-engine counter are GT id. | ||
| 285 | */ | ||
| 286 | #define __I915_PMU_GT_SHIFT (60) | ||
| 287 | |||
| 288 | #define ___I915_PMU_OTHER(gt, x) \ | ||
| 289 | 	(((__u64)__I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) | \ | ||
| 290 | 	((__u64)(gt) << __I915_PMU_GT_SHIFT)) | ||
| 291 | |||
| 292 | #define __I915_PMU_OTHER(x) ___I915_PMU_OTHER(0, x) | ||
| 284 | 293 | ||
| 285 | #define I915_PMU_ACTUAL_FREQUENCY	__I915_PMU_OTHER(0) | 294 | #define I915_PMU_ACTUAL_FREQUENCY	__I915_PMU_OTHER(0) |
| 286 | #define I915_PMU_REQUESTED_FREQUENCY	__I915_PMU_OTHER(1) | 295 | #define I915_PMU_REQUESTED_FREQUENCY	__I915_PMU_OTHER(1) |
| ... | @@ -290,6 +299,12 @@ enum drm_i915_pmu_engine_sample { | ... | @@ -290,6 +299,12 @@ enum drm_i915_pmu_engine_sample { |
| 290 | 299 | ||
| 291 | #define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY | 300 | #define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY |
| 292 | 301 | ||
| 302 | #define __I915_PMU_ACTUAL_FREQUENCY(gt)		___I915_PMU_OTHER(gt, 0) | ||
| 303 | #define __I915_PMU_REQUESTED_FREQUENCY(gt)	___I915_PMU_OTHER(gt, 1) | ||
| 304 | #define __I915_PMU_INTERRUPTS(gt)		___I915_PMU_OTHER(gt, 2) | ||
| 305 | #define __I915_PMU_RC6_RESIDENCY(gt)		___I915_PMU_OTHER(gt, 3) | ||
| 306 | #define __I915_PMU_SOFTWARE_GT_AWAKE_TIME(gt)	___I915_PMU_OTHER(gt, 4) | ||
| 307 | |||
| 293 | /* Each region is a minimum of 16k, and there are at most 255 of them. | 308 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
| 294 | */ | 309 | */ |
| 295 | #define I915_NR_TEX_REGIONS 255	/* table size 2k - maximum due to use | 310 | #define I915_NR_TEX_REGIONS 255	/* table size 2k - maximum due to use |
| ... | @@ -659,7 +674,8 @@ typedef struct drm_i915_irq_wait { | ... | @@ -659,7 +674,8 @@ typedef struct drm_i915_irq_wait { |
| 659 | * If the IOCTL is successful, the returned parameter will be set to one of the | 674 | * If the IOCTL is successful, the returned parameter will be set to one of the |
| 660 | * following values: | 675 | * following values: |
| 661 | * * 0 if HuC firmware load is not complete, | 676 | * * 0 if HuC firmware load is not complete, |
| 662 | * * 1 if HuC firmware is authenticated and running. | 677 | * * 1 if HuC firmware is loaded and fully authenticated, |
| 678 | * * 2 if HuC firmware is loaded and authenticated for clear media only | ||
| 663 | */ | 679 | */ |
| 664 | #define I915_PARAM_HUC_STATUS		 42 | 680 | #define I915_PARAM_HUC_STATUS		 42 |
| 665 | 681 | ||
| ... | @@ -677,7 +693,7 @@ typedef struct drm_i915_irq_wait { | ... | @@ -677,7 +693,7 @@ typedef struct drm_i915_irq_wait { |
| 677 | #define I915_PARAM_HAS_EXEC_FENCE	 44 | 693 | #define I915_PARAM_HAS_EXEC_FENCE	 44 |
| 678 | 694 | ||
| 679 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture | 695 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture |
| 680 | * user specified bufffers for post-mortem debugging of GPU hangs. See | 696 | * user-specified buffers for post-mortem debugging of GPU hangs. See |
| 681 | * EXEC_OBJECT_CAPTURE. | 697 | * EXEC_OBJECT_CAPTURE. |
| 682 | */ | 698 | */ |
| 683 | #define I915_PARAM_HAS_EXEC_CAPTURE	 45 | 699 | #define I915_PARAM_HAS_EXEC_CAPTURE	 45 |
| ... | @@ -771,6 +787,31 @@ typedef struct drm_i915_irq_wait { | ... | @@ -771,6 +787,31 @@ typedef struct drm_i915_irq_wait { |
| 771 | */ | 787 | */ |
| 772 | #define I915_PARAM_OA_TIMESTAMP_FREQUENCY 57 | 788 | #define I915_PARAM_OA_TIMESTAMP_FREQUENCY 57 |
| 773 | 789 | ||
| 790 | /* | ||
| 791 | * Query the status of PXP support in i915. | ||
| 792 | * | ||
| 793 | * The query can fail in the following scenarios with the listed error codes: | ||
| 794 | * -ENODEV = PXP support is not available on the GPU device or in the | ||
| 795 | * kernel due to missing component drivers or kernel configs. | ||
| 796 | * | ||
| 797 | * If the IOCTL is successful, the returned parameter will be set to one of | ||
| 798 | * the following values: | ||
| 799 | * 1 = PXP feature is supported and is ready for use. | ||
| 800 | * 2 = PXP feature is supported but should be ready soon (pending | ||
| 801 | * initialization of non-i915 system dependencies). | ||
| 802 | * | ||
| 803 | * NOTE: When param is supported (positive return values), user space should | ||
| 804 | * still refer to the GEM PXP context-creation UAPI header specs to be | ||
| 805 | * aware of possible failure due to system state machine at the time. | ||
| 806 | */ | ||
| 807 | #define I915_PARAM_PXP_STATUS		 58 | ||
| 808 | |||
| 809 | /* | ||
| 810 | * Query if kernel allows marking a context to send a Freq hint to SLPC. This | ||
| 811 | * will enable use of the strategies allowed by the SLPC algorithm. | ||
| 812 | */ | ||
| 813 | #define I915_PARAM_HAS_CONTEXT_FREQ_HINT	59 | ||
| 814 | |||
| 774 | /* Must be kept compact -- no holes and well documented */ | 815 | /* Must be kept compact -- no holes and well documented */ |
| 775 | 816 | ||
| 776 | /** | 817 | /** |
| ... | @@ -1571,7 +1612,7 @@ struct drm_i915_gem_busy { | ... | @@ -1571,7 +1612,7 @@ struct drm_i915_gem_busy { |
| 1571 | 	 * is accurate. | 1612 | 	 * is accurate. |
| 1572 | 	 * | 1613 | 	 * |
| 1573 | 	 * The returned dword is split into two fields to indicate both | 1614 | 	 * The returned dword is split into two fields to indicate both |
| 1574 | 	 * the engine classess on which the object is being read, and the | 1615 | 	 * the engine classes on which the object is being read, and the |
| 1575 | 	 * engine class on which it is currently being written (if any). | 1616 | 	 * engine class on which it is currently being written (if any). |
| 1576 | 	 * | 1617 | 	 * |
| 1577 | 	 * The low word (bits 0:15) indicate if the object is being written | 1618 | 	 * The low word (bits 0:15) indicate if the object is being written |
| ... | @@ -1780,7 +1821,7 @@ struct drm_i915_gem_madvise { | ... | @@ -1780,7 +1821,7 @@ struct drm_i915_gem_madvise { |
| 1780 | 	__u32 handle; | 1821 | 	__u32 handle; |
| 1781 | 1822 | ||
| 1782 | 	/* Advice: either the buffer will be needed again in the near future, | 1823 | 	/* Advice: either the buffer will be needed again in the near future, |
| 1783 | 	 * or wont be and could be discarded under memory pressure. | 1824 | 	 * or won't be and could be discarded under memory pressure. |
| 1784 | 	 */ | 1825 | 	 */ |
| 1785 | 	__u32 madv; | 1826 | 	__u32 madv; |
| 1786 | 1827 | ||
| ... | @@ -2096,8 +2137,32 @@ struct drm_i915_gem_context_param { | ... | @@ -2096,8 +2137,32 @@ struct drm_i915_gem_context_param { |
| 2096 | * | 2137 | * |
| 2097 | * -ENODEV: feature not available | 2138 | * -ENODEV: feature not available |
| 2098 | * -EPERM: trying to mark a recoverable or not bannable context as protected | 2139 | * -EPERM: trying to mark a recoverable or not bannable context as protected |
| 2140 | * -ENXIO: A dependency such as a component driver or firmware is not yet | ||
| 2141 | * loaded so user space may need to attempt again. Depending on the | ||
| 2142 | * device, this error may be reported if protected context creation is | ||
| 2143 | * attempted very early after kernel start because the internal timeout | ||
| 2144 | * waiting for such dependencies is not guaranteed to be larger than | ||
| 2145 | * required (numbers differ depending on system and kernel config): | ||
| 2146 | * - ADL/RPL: dependencies may take up to 3 seconds from kernel start | ||
| 2147 | * while context creation internal timeout is 250 milisecs | ||
| 2148 | * - MTL: dependencies may take up to 8 seconds from kernel start | ||
| 2149 | * while context creation internal timeout is 250 milisecs | ||
| 2150 | * NOTE: such dependencies happen once, so a subsequent call to create a | ||
| 2151 | * protected context after a prior successful call will not experience | ||
| 2152 | * such timeouts and will not return -ENXIO (unless the driver is reloaded, | ||
| 2153 | * or, depending on the device, resumes from a suspended state). | ||
| 2154 | * -EIO: The firmware did not succeed in creating the protected context. | ||
| 2099 | */ | 2155 | */ |
| 2100 | #define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd | 2156 | #define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd |
| 2157 | |||
| 2158 | /* | ||
| 2159 | * I915_CONTEXT_PARAM_LOW_LATENCY: | ||
| 2160 | * | ||
| 2161 | * Mark this context as a low latency workload which requires aggressive GT | ||
| 2162 | * frequency scaling. Use I915_PARAM_HAS_CONTEXT_FREQ_HINT to check if the kernel | ||
| 2163 | * supports this per context flag. | ||
| 2164 | */ | ||
| 2165 | #define I915_CONTEXT_PARAM_LOW_LATENCY		0xe | ||
| 2101 | /* Must be kept compact -- no holes and well documented */ | 2166 | /* Must be kept compact -- no holes and well documented */ |
| 2102 | 2167 | ||
| 2103 | 	/** @value: Context parameter value to be set or queried */ | 2168 | 	/** @value: Context parameter value to be set or queried */ |
| ... | @@ -2491,7 +2556,7 @@ struct i915_context_param_engines { | ... | @@ -2491,7 +2556,7 @@ struct i915_context_param_engines { |
| 2491 | #define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 /* see i915_context_engines_load_balance */ | 2556 | #define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 /* see i915_context_engines_load_balance */ |
| 2492 | #define I915_CONTEXT_ENGINES_EXT_BOND 1 /* see i915_context_engines_bond */ | 2557 | #define I915_CONTEXT_ENGINES_EXT_BOND 1 /* see i915_context_engines_bond */ |
| 2493 | #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 /* see i915_context_engines_parallel_submit */ | 2558 | #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 /* see i915_context_engines_parallel_submit */ |
| 2494 | 	struct i915_engine_class_instance engines[0]; | 2559 | 	struct i915_engine_class_instance engines[]; |
| 2495 | } __attribute__((packed)); | 2560 | } __attribute__((packed)); |
| 2496 | 2561 | ||
| 2497 | #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__, N__) struct { \ | 2562 | #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__, N__) struct { \ |
| ... | @@ -2573,19 +2638,29 @@ struct drm_i915_reg_read { | ... | @@ -2573,19 +2638,29 @@ struct drm_i915_reg_read { |
| 2573 | * | 2638 | * |
| 2574 | */ | 2639 | */ |
| 2575 | 2640 | ||
| 2641 | /* | ||
| 2642 | * struct drm_i915_reset_stats - Return global reset and other context stats | ||
| 2643 | * | ||
| 2644 | * Driver keeps few stats for each contexts and also global reset count. | ||
| 2645 | * This struct can be used to query those stats. | ||
| 2646 | */ | ||
| 2576 | struct drm_i915_reset_stats { | 2647 | struct drm_i915_reset_stats { |
| 2648 | 	/** @ctx_id: ID of the requested context */ | ||
| 2577 | 	__u32 ctx_id; | 2649 | 	__u32 ctx_id; |
| 2650 | |||
| 2651 | 	/** @flags: MBZ */ | ||
| 2578 | 	__u32 flags; | 2652 | 	__u32 flags; |
| 2579 | 2653 | ||
| 2580 | 	/* All resets since boot/module reload, for all contexts */ | 2654 | 	/** @reset_count: All resets since boot/module reload, for all contexts */ |
| 2581 | 	__u32 reset_count; | 2655 | 	__u32 reset_count; |
| 2582 | 2656 | ||
| 2583 | 	/* Number of batches lost when active in GPU, for this context */ | 2657 | 	/** @batch_active: Number of batches lost when active in GPU, for this context */ |
| 2584 | 	__u32 batch_active; | 2658 | 	__u32 batch_active; |
| 2585 | 2659 | ||
| 2586 | 	/* Number of batches lost pending for execution, for this context */ | 2660 | 	/** @batch_pending: Number of batches lost pending for execution, for this context */ |
| 2587 | 	__u32 batch_pending; | 2661 | 	__u32 batch_pending; |
| 2588 | 2662 | ||
| 2663 | 	/** @pad: MBZ */ | ||
| 2589 | 	__u32 pad; | 2664 | 	__u32 pad; |
| 2590 | }; | 2665 | }; |
| 2591 | 2666 | ||
| ... | @@ -2676,6 +2751,10 @@ enum drm_i915_oa_format { | ... | @@ -2676,6 +2751,10 @@ enum drm_i915_oa_format { |
| 2676 | 	I915_OAR_FORMAT_A32u40_A4u32_B8_C8, | 2751 | 	I915_OAR_FORMAT_A32u40_A4u32_B8_C8, |
| 2677 | 	I915_OA_FORMAT_A24u40_A14u32_B8_C8, | 2752 | 	I915_OA_FORMAT_A24u40_A14u32_B8_C8, |
| 2678 | 2753 | ||
| 2754 | 	/* MTL OAM */ | ||
| 2755 | 	I915_OAM_FORMAT_MPEC8u64_B8_C8, | ||
| 2756 | 	I915_OAM_FORMAT_MPEC8u32_B8_C8, | ||
| 2757 | |||
| 2679 | 	I915_OA_FORMAT_MAX	 /* non-ABI */ | 2758 | 	I915_OA_FORMAT_MAX	 /* non-ABI */ |
| 2680 | }; | 2759 | }; |
| 2681 | 2760 | ||
| ... | @@ -2758,6 +2837,25 @@ enum drm_i915_perf_property_id { | ... | @@ -2758,6 +2837,25 @@ enum drm_i915_perf_property_id { |
| 2758 | 	 */ | 2837 | 	 */ |
| 2759 | 	DRM_I915_PERF_PROP_POLL_OA_PERIOD, | 2838 | 	DRM_I915_PERF_PROP_POLL_OA_PERIOD, |
| 2760 | 2839 | ||
| 2840 | 	/** | ||
| 2841 | 	 * Multiple engines may be mapped to the same OA unit. The OA unit is | ||
| 2842 | 	 * identified by class:instance of any engine mapped to it. | ||
| 2843 | 	 * | ||
| 2844 | 	 * This parameter specifies the engine class and must be passed along | ||
| 2845 | 	 * with DRM_I915_PERF_PROP_OA_ENGINE_INSTANCE. | ||
| 2846 | 	 * | ||
| 2847 | 	 * This property is available in perf revision 6. | ||
| 2848 | 	 */ | ||
| 2849 | 	DRM_I915_PERF_PROP_OA_ENGINE_CLASS, | ||
| 2850 | |||
| 2851 | 	/** | ||
| 2852 | 	 * This parameter specifies the engine instance and must be passed along | ||
| 2853 | 	 * with DRM_I915_PERF_PROP_OA_ENGINE_CLASS. | ||
| 2854 | 	 * | ||
| 2855 | 	 * This property is available in perf revision 6. | ||
| 2856 | 	 */ | ||
| 2857 | 	DRM_I915_PERF_PROP_OA_ENGINE_INSTANCE, | ||
| 2858 | |||
| 2761 | 	DRM_I915_PERF_PROP_MAX /* non-ABI */ | 2859 | 	DRM_I915_PERF_PROP_MAX /* non-ABI */ |
| 2762 | }; | 2860 | }; |
| 2763 | 2861 | ||
| ... | @@ -2940,6 +3038,7 @@ struct drm_i915_query_item { | ... | @@ -2940,6 +3038,7 @@ struct drm_i915_query_item { |
| 2940 | 	 * - %DRM_I915_QUERY_MEMORY_REGIONS (see struct drm_i915_query_memory_regions) | 3038 | 	 * - %DRM_I915_QUERY_MEMORY_REGIONS (see struct drm_i915_query_memory_regions) |
| 2941 | 	 * - %DRM_I915_QUERY_HWCONFIG_BLOB (see `GuC HWCONFIG blob uAPI`) | 3039 | 	 * - %DRM_I915_QUERY_HWCONFIG_BLOB (see `GuC HWCONFIG blob uAPI`) |
| 2942 | 	 * - %DRM_I915_QUERY_GEOMETRY_SUBSLICES (see struct drm_i915_query_topology_info) | 3040 | 	 * - %DRM_I915_QUERY_GEOMETRY_SUBSLICES (see struct drm_i915_query_topology_info) |
| 3041 | 	 * - %DRM_I915_QUERY_GUC_SUBMISSION_VERSION (see struct drm_i915_query_guc_submission_version) | ||
| 2943 | 	 */ | 3042 | 	 */ |
| 2944 | 	__u64 query_id; | 3043 | 	__u64 query_id; |
| 2945 | #define DRM_I915_QUERY_TOPOLOGY_INFO		1 | 3044 | #define DRM_I915_QUERY_TOPOLOGY_INFO		1 |
| ... | @@ -2948,6 +3047,7 @@ struct drm_i915_query_item { | ... | @@ -2948,6 +3047,7 @@ struct drm_i915_query_item { |
| 2948 | #define DRM_I915_QUERY_MEMORY_REGIONS		4 | 3047 | #define DRM_I915_QUERY_MEMORY_REGIONS		4 |
| 2949 | #define DRM_I915_QUERY_HWCONFIG_BLOB		5 | 3048 | #define DRM_I915_QUERY_HWCONFIG_BLOB		5 |
| 2950 | #define DRM_I915_QUERY_GEOMETRY_SUBSLICES	6 | 3049 | #define DRM_I915_QUERY_GEOMETRY_SUBSLICES	6 |
| 3050 | #define DRM_I915_QUERY_GUC_SUBMISSION_VERSION	7 | ||
| 2951 | /* Must be kept compact -- no holes and well documented */ | 3051 | /* Must be kept compact -- no holes and well documented */ |
| 2952 | 3052 | ||
| 2953 | 	/** | 3053 | 	/** |
| ... | @@ -3173,7 +3273,7 @@ struct drm_i915_query_topology_info { | ... | @@ -3173,7 +3273,7 @@ struct drm_i915_query_topology_info { |
| 3173 | * 	// enough to hold our array of engines. The kernel will fill out the | 3273 | * 	// enough to hold our array of engines. The kernel will fill out the |
| 3174 | * 	// item.length for us, which is the number of bytes we need. | 3274 | * 	// item.length for us, which is the number of bytes we need. |
| 3175 | * 	// | 3275 | * 	// |
| 3176 | * 	// Alternatively a large buffer can be allocated straight away enabling | 3276 | *	// Alternatively a large buffer can be allocated straightaway enabling |
| 3177 | * 	// querying in one pass, in which case item.length should contain the | 3277 | * 	// querying in one pass, in which case item.length should contain the |
| 3178 | * 	// length of the provided buffer. | 3278 | * 	// length of the provided buffer. |
| 3179 | * 	err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); | 3279 | * 	err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); |
| ... | @@ -3183,7 +3283,7 @@ struct drm_i915_query_topology_info { | ... | @@ -3183,7 +3283,7 @@ struct drm_i915_query_topology_info { |
| 3183 | * 	// Now that we allocated the required number of bytes, we call the ioctl | 3283 | * 	// Now that we allocated the required number of bytes, we call the ioctl |
| 3184 | * 	// again, this time with the data_ptr pointing to our newly allocated | 3284 | * 	// again, this time with the data_ptr pointing to our newly allocated |
| 3185 | * 	// blob, which the kernel can then populate with info on all engines. | 3285 | * 	// blob, which the kernel can then populate with info on all engines. |
| 3186 | * 	item.data_ptr = (uintptr_t)&info, | 3286 | *	item.data_ptr = (uintptr_t)&info; |
| 3187 | * | 3287 | * |
| 3188 | * 	err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); | 3288 | * 	err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); |
| 3189 | * 	if (err) ... | 3289 | * 	if (err) ... |
| ... | @@ -3213,7 +3313,7 @@ struct drm_i915_query_topology_info { | ... | @@ -3213,7 +3313,7 @@ struct drm_i915_query_topology_info { |
| 3213 | /** | 3313 | /** |
| 3214 | * struct drm_i915_engine_info | 3314 | * struct drm_i915_engine_info |
| 3215 | * | 3315 | * |
| 3216 | * Describes one engine and it's capabilities as known to the driver. | 3316 | * Describes one engine and its capabilities as known to the driver. |
| 3217 | */ | 3317 | */ |
| 3218 | struct drm_i915_engine_info { | 3318 | struct drm_i915_engine_info { |
| 3219 | 	/** @engine: Engine class and instance. */ | 3319 | 	/** @engine: Engine class and instance. */ |
| ... | @@ -3493,6 +3593,20 @@ struct drm_i915_query_memory_regions { | ... | @@ -3493,6 +3593,20 @@ struct drm_i915_query_memory_regions { |
| 3493 | 	struct drm_i915_memory_region_info regions[]; | 3593 | 	struct drm_i915_memory_region_info regions[]; |
| 3494 | }; | 3594 | }; |
| 3495 | 3595 | ||
| 3596 | /** | ||
| 3597 | * struct drm_i915_query_guc_submission_version - query GuC submission interface version | ||
| 3598 | */ | ||
| 3599 | struct drm_i915_query_guc_submission_version { | ||
| 3600 | 	/** @branch: Firmware branch version. */ | ||
| 3601 | 	__u32 branch; | ||
| 3602 | 	/** @major: Firmware major version. */ | ||
| 3603 | 	__u32 major; | ||
| 3604 | 	/** @minor: Firmware minor version. */ | ||
| 3605 | 	__u32 minor; | ||
| 3606 | 	/** @patch: Firmware patch version. */ | ||
| 3607 | 	__u32 patch; | ||
| 3608 | }; | ||
| 3609 | |||
| 3496 | /** | 3610 | /** |
| 3497 | * DOC: GuC HWCONFIG blob uAPI | 3611 | * DOC: GuC HWCONFIG blob uAPI |
| 3498 | * | 3612 | * |
| ... | @@ -3607,9 +3721,13 @@ struct drm_i915_gem_create_ext { | ... | @@ -3607,9 +3721,13 @@ struct drm_i915_gem_create_ext { |
| 3607 | 	 * | 3721 | 	 * |
| 3608 | 	 * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see | 3722 | 	 * For I915_GEM_CREATE_EXT_PROTECTED_CONTENT usage see |
| 3609 | 	 * struct drm_i915_gem_create_ext_protected_content. | 3723 | 	 * struct drm_i915_gem_create_ext_protected_content. |
| 3724 | 	 * | ||
| 3725 | 	 * For I915_GEM_CREATE_EXT_SET_PAT usage see | ||
| 3726 | 	 * struct drm_i915_gem_create_ext_set_pat. | ||
| 3610 | 	 */ | 3727 | 	 */ |
| 3611 | #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0 | 3728 | #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0 |
| 3612 | #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1 | 3729 | #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1 |
| 3730 | #define I915_GEM_CREATE_EXT_SET_PAT 2 | ||
| 3613 | 	__u64 extensions; | 3731 | 	__u64 extensions; |
| 3614 | }; | 3732 | }; |
| 3615 | 3733 | ||
| ... | @@ -3724,6 +3842,43 @@ struct drm_i915_gem_create_ext_protected_content { | ... | @@ -3724,6 +3842,43 @@ struct drm_i915_gem_create_ext_protected_content { |
| 3724 | 	__u32 flags; | 3842 | 	__u32 flags; |
| 3725 | }; | 3843 | }; |
| 3726 | 3844 | ||
| 3845 | /** | ||
| 3846 | * struct drm_i915_gem_create_ext_set_pat - The | ||
| 3847 | * I915_GEM_CREATE_EXT_SET_PAT extension. | ||
| 3848 | * | ||
| 3849 | * If this extension is provided, the specified caching policy (PAT index) is | ||
| 3850 | * applied to the buffer object. | ||
| 3851 | * | ||
| 3852 | * Below is an example on how to create an object with specific caching policy: | ||
| 3853 | * | ||
| 3854 | * .. code-block:: C | ||
| 3855 | * | ||
| 3856 | * struct drm_i915_gem_create_ext_set_pat set_pat_ext = { | ||
| 3857 | * .base = { .name = I915_GEM_CREATE_EXT_SET_PAT }, | ||
| 3858 | * .pat_index = 0, | ||
| 3859 | * }; | ||
| 3860 | * struct drm_i915_gem_create_ext create_ext = { | ||
| 3861 | * .size = PAGE_SIZE, | ||
| 3862 | * .extensions = (uintptr_t)&set_pat_ext, | ||
| 3863 | * }; | ||
| 3864 | * | ||
| 3865 | * int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext); | ||
| 3866 | * if (err) ... | ||
| 3867 | */ | ||
| 3868 | struct drm_i915_gem_create_ext_set_pat { | ||
| 3869 | 	/** @base: Extension link. See struct i915_user_extension. */ | ||
| 3870 | 	struct i915_user_extension base; | ||
| 3871 | 	/** | ||
| 3872 | 	 * @pat_index: PAT index to be set | ||
| 3873 | 	 * PAT index is a bit field in Page Table Entry to control caching | ||
| 3874 | 	 * behaviors for GPU accesses. The definition of PAT index is | ||
| 3875 | 	 * platform dependent and can be found in hardware specifications, | ||
| 3876 | 	 */ | ||
| 3877 | 	__u32 pat_index; | ||
| 3878 | 	/** @rsvd: reserved for future use */ | ||
| 3879 | 	__u32 rsvd; | ||
| 3880 | }; | ||
| 3881 | |||
| 3727 | /* ID of the protected content session managed by i915 when PXP is active */ | 3882 | /* ID of the protected content session managed by i915 when PXP is active */ |
| 3728 | #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf | 3883 | #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf |
| 3729 | 3884 |
lib/libc/include/any-linux-any/drm/ivpu_accel.h+44-7| ... | @@ -53,21 +53,44 @@ extern "C" { | ... | @@ -53,21 +53,44 @@ extern "C" { |
| 53 | #define DRM_IVPU_PARAM_CORE_CLOCK_RATE	 3 | 53 | #define DRM_IVPU_PARAM_CORE_CLOCK_RATE	 3 |
| 54 | #define DRM_IVPU_PARAM_NUM_CONTEXTS	 4 | 54 | #define DRM_IVPU_PARAM_NUM_CONTEXTS	 4 |
| 55 | #define DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS 5 | 55 | #define DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS 5 |
| 56 | #define DRM_IVPU_PARAM_CONTEXT_PRIORITY	 6 | 56 | #define DRM_IVPU_PARAM_CONTEXT_PRIORITY	 6 /* Deprecated */ |
| 57 | #define DRM_IVPU_PARAM_CONTEXT_ID	 7 | 57 | #define DRM_IVPU_PARAM_CONTEXT_ID	 7 |
| 58 | #define DRM_IVPU_PARAM_FW_API_VERSION	 8 | 58 | #define DRM_IVPU_PARAM_FW_API_VERSION	 8 |
| 59 | #define DRM_IVPU_PARAM_ENGINE_HEARTBEAT	 9 | 59 | #define DRM_IVPU_PARAM_ENGINE_HEARTBEAT	 9 |
| 60 | #define DRM_IVPU_PARAM_UNIQUE_INFERENCE_ID 10 | 60 | #define DRM_IVPU_PARAM_UNIQUE_INFERENCE_ID 10 |
| 61 | #define DRM_IVPU_PARAM_TILE_CONFIG	 11 | 61 | #define DRM_IVPU_PARAM_TILE_CONFIG	 11 |
| 62 | #define DRM_IVPU_PARAM_SKU		 12 | 62 | #define DRM_IVPU_PARAM_SKU		 12 |
| 63 | #define DRM_IVPU_PARAM_CAPABILITIES	 13 | ||
| 63 | 64 | ||
| 64 | #define DRM_IVPU_PLATFORM_TYPE_SILICON	 0 | 65 | #define DRM_IVPU_PLATFORM_TYPE_SILICON	 0 |
| 65 | 66 | ||
| 67 | /* Deprecated, use DRM_IVPU_JOB_PRIORITY */ | ||
| 66 | #define DRM_IVPU_CONTEXT_PRIORITY_IDLE	 0 | 68 | #define DRM_IVPU_CONTEXT_PRIORITY_IDLE	 0 |
| 67 | #define DRM_IVPU_CONTEXT_PRIORITY_NORMAL 1 | 69 | #define DRM_IVPU_CONTEXT_PRIORITY_NORMAL 1 |
| 68 | #define DRM_IVPU_CONTEXT_PRIORITY_FOCUS	 2 | 70 | #define DRM_IVPU_CONTEXT_PRIORITY_FOCUS	 2 |
| 69 | #define DRM_IVPU_CONTEXT_PRIORITY_REALTIME 3 | 71 | #define DRM_IVPU_CONTEXT_PRIORITY_REALTIME 3 |
| 70 | 72 | ||
| 73 | #define DRM_IVPU_JOB_PRIORITY_DEFAULT 0 | ||
| 74 | #define DRM_IVPU_JOB_PRIORITY_IDLE 1 | ||
| 75 | #define DRM_IVPU_JOB_PRIORITY_NORMAL 2 | ||
| 76 | #define DRM_IVPU_JOB_PRIORITY_FOCUS 3 | ||
| 77 | #define DRM_IVPU_JOB_PRIORITY_REALTIME 4 | ||
| 78 | |||
| 79 | /** | ||
| 80 | * DRM_IVPU_CAP_METRIC_STREAMER | ||
| 81 | * | ||
| 82 | * Metric streamer support. Provides sampling of various hardware performance | ||
| 83 | * metrics like DMA bandwidth and cache miss/hits. Can be used for profiling. | ||
| 84 | */ | ||
| 85 | #define DRM_IVPU_CAP_METRIC_STREAMER	1 | ||
| 86 | /** | ||
| 87 | * DRM_IVPU_CAP_DMA_MEMORY_RANGE | ||
| 88 | * | ||
| 89 | * Driver has capability to allocate separate memory range | ||
| 90 | * accessible by hardware DMA. | ||
| 91 | */ | ||
| 92 | #define DRM_IVPU_CAP_DMA_MEMORY_RANGE	2 | ||
| 93 | |||
| 71 | /** | 94 | /** |
| 72 | * struct drm_ivpu_param - Get/Set VPU parameters | 95 | * struct drm_ivpu_param - Get/Set VPU parameters |
| 73 | */ | 96 | */ |
| ... | @@ -96,10 +119,6 @@ struct drm_ivpu_param { | ... | @@ -96,10 +119,6 @@ struct drm_ivpu_param { |
| 96 | 	 * %DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS: | 119 | 	 * %DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS: |
| 97 | 	 * Lowest VPU virtual address available in the current context (read-only) | 120 | 	 * Lowest VPU virtual address available in the current context (read-only) |
| 98 | 	 * | 121 | 	 * |
| 99 | 	 * %DRM_IVPU_PARAM_CONTEXT_PRIORITY: | ||
| 100 | 	 * Value of current context scheduling priority (read-write). | ||
| 101 | 	 * See DRM_IVPU_CONTEXT_PRIORITY_* for possible values. | ||
| 102 | 	 * | ||
| 103 | 	 * %DRM_IVPU_PARAM_CONTEXT_ID: | 122 | 	 * %DRM_IVPU_PARAM_CONTEXT_ID: |
| 104 | 	 * Current context ID, always greater than 0 (read-only) | 123 | 	 * Current context ID, always greater than 0 (read-only) |
| 105 | 	 * | 124 | 	 * |
| ... | @@ -119,6 +138,8 @@ struct drm_ivpu_param { | ... | @@ -119,6 +138,8 @@ struct drm_ivpu_param { |
| 119 | 	 * %DRM_IVPU_PARAM_SKU: | 138 | 	 * %DRM_IVPU_PARAM_SKU: |
| 120 | 	 * VPU SKU ID (read-only) | 139 | 	 * VPU SKU ID (read-only) |
| 121 | 	 * | 140 | 	 * |
| 141 | 	 * %DRM_IVPU_PARAM_CAPABILITIES: | ||
| 142 | 	 * Supported capabilities (read-only) | ||
| 122 | 	 */ | 143 | 	 */ |
| 123 | 	__u32 param; | 144 | 	__u32 param; |
| 124 | 145 | ||
| ... | @@ -129,8 +150,10 @@ struct drm_ivpu_param { | ... | @@ -129,8 +150,10 @@ struct drm_ivpu_param { |
| 129 | 	__u64 value; | 150 | 	__u64 value; |
| 130 | }; | 151 | }; |
| 131 | 152 | ||
| 132 | #define DRM_IVPU_BO_HIGH_MEM 0x00000001 | 153 | #define DRM_IVPU_BO_SHAVE_MEM 0x00000001 |
| 154 | #define DRM_IVPU_BO_HIGH_MEM DRM_IVPU_BO_SHAVE_MEM | ||
| 133 | #define DRM_IVPU_BO_MAPPABLE 0x00000002 | 155 | #define DRM_IVPU_BO_MAPPABLE 0x00000002 |
| 156 | #define DRM_IVPU_BO_DMA_MEM 0x00000004 | ||
| 134 | 157 | ||
| 135 | #define DRM_IVPU_BO_CACHED 0x00000000 | 158 | #define DRM_IVPU_BO_CACHED 0x00000000 |
| 136 | #define DRM_IVPU_BO_UNCACHED 0x00010000 | 159 | #define DRM_IVPU_BO_UNCACHED 0x00010000 |
| ... | @@ -140,6 +163,7 @@ struct drm_ivpu_param { | ... | @@ -140,6 +163,7 @@ struct drm_ivpu_param { |
| 140 | #define DRM_IVPU_BO_FLAGS \ | 163 | #define DRM_IVPU_BO_FLAGS \ |
| 141 | 	(DRM_IVPU_BO_HIGH_MEM | \ | 164 | 	(DRM_IVPU_BO_HIGH_MEM | \ |
| 142 | 	 DRM_IVPU_BO_MAPPABLE | \ | 165 | 	 DRM_IVPU_BO_MAPPABLE | \ |
| 166 | 	 DRM_IVPU_BO_DMA_MEM | \ | ||
| 143 | 	 DRM_IVPU_BO_CACHE_MASK) | 167 | 	 DRM_IVPU_BO_CACHE_MASK) |
| 144 | 168 | ||
| 145 | /** | 169 | /** |
| ... | @@ -175,7 +199,7 @@ struct drm_ivpu_bo_create { | ... | @@ -175,7 +199,7 @@ struct drm_ivpu_bo_create { |
| 175 | 	 * | 199 | 	 * |
| 176 | 	 * %DRM_IVPU_BO_UNCACHED: | 200 | 	 * %DRM_IVPU_BO_UNCACHED: |
| 177 | 	 * | 201 | 	 * |
| 178 | 	 * Allocated BO will not be cached on host side nor snooped on the VPU side. | 202 | 	 * Not supported. Use DRM_IVPU_BO_WC instead. |
| 179 | 	 * | 203 | 	 * |
| 180 | 	 * %DRM_IVPU_BO_WC: | 204 | 	 * %DRM_IVPU_BO_WC: |
| 181 | 	 * | 205 | 	 * |
| ... | @@ -265,10 +289,23 @@ struct drm_ivpu_submit { | ... | @@ -265,10 +289,23 @@ struct drm_ivpu_submit { |
| 265 | 	 * to be executed. The offset has to be 8-byte aligned. | 289 | 	 * to be executed. The offset has to be 8-byte aligned. |
| 266 | 	 */ | 290 | 	 */ |
| 267 | 	__u32 commands_offset; | 291 | 	__u32 commands_offset; |
| 292 | |||
| 293 | 	/** | ||
| 294 | 	 * @priority: | ||
| 295 | 	 * | ||
| 296 | 	 * Priority to be set for related job command queue, can be one of the following: | ||
| 297 | 	 * %DRM_IVPU_JOB_PRIORITY_DEFAULT | ||
| 298 | 	 * %DRM_IVPU_JOB_PRIORITY_IDLE | ||
| 299 | 	 * %DRM_IVPU_JOB_PRIORITY_NORMAL | ||
| 300 | 	 * %DRM_IVPU_JOB_PRIORITY_FOCUS | ||
| 301 | 	 * %DRM_IVPU_JOB_PRIORITY_REALTIME | ||
| 302 | 	 */ | ||
| 303 | 	__u32 priority; | ||
| 268 | }; | 304 | }; |
| 269 | 305 | ||
| 270 | /* drm_ivpu_bo_wait job status codes */ | 306 | /* drm_ivpu_bo_wait job status codes */ |
| 271 | #define DRM_IVPU_JOB_STATUS_SUCCESS 0 | 307 | #define DRM_IVPU_JOB_STATUS_SUCCESS 0 |
| 308 | #define DRM_IVPU_JOB_STATUS_ABORTED 256 | ||
| 272 | 309 | ||
| 273 | /** | 310 | /** |
| 274 | * struct drm_ivpu_bo_wait - Wait for BO to become inactive | 311 | * struct drm_ivpu_bo_wait - Wait for BO to become inactive |
lib/libc/include/any-linux-any/drm/msm_drm.h+19-2| ... | @@ -86,6 +86,7 @@ struct drm_msm_timespec { | ... | @@ -86,6 +86,7 @@ struct drm_msm_timespec { |
| 86 | #define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */ | 86 | #define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */ |
| 87 | #define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */ | 87 | #define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */ |
| 88 | #define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */ | 88 | #define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */ |
| 89 | #define MSM_PARAM_HIGHEST_BANK_BIT 0x10 /* RO */ | ||
| 89 | 90 | ||
| 90 | /* For backwards compat. The original support for preemption was based on | 91 | /* For backwards compat. The original support for preemption was based on |
| 91 | * a single ring per priority level so # of priority levels equals the # | 92 | * a single ring per priority level so # of priority levels equals the # |
| ... | @@ -139,6 +140,8 @@ struct drm_msm_gem_new { | ... | @@ -139,6 +140,8 @@ struct drm_msm_gem_new { |
| 139 | #define MSM_INFO_GET_NAME	0x03 /* get debug name, returned by pointer */ | 140 | #define MSM_INFO_GET_NAME	0x03 /* get debug name, returned by pointer */ |
| 140 | #define MSM_INFO_SET_IOVA	0x04 /* set the iova, passed by value */ | 141 | #define MSM_INFO_SET_IOVA	0x04 /* set the iova, passed by value */ |
| 141 | #define MSM_INFO_GET_FLAGS	0x05 /* get the MSM_BO_x flags */ | 142 | #define MSM_INFO_GET_FLAGS	0x05 /* get the MSM_BO_x flags */ |
| 143 | #define MSM_INFO_SET_METADATA	0x06 /* set userspace metadata */ | ||
| 144 | #define MSM_INFO_GET_METADATA	0x07 /* get userspace metadata */ | ||
| 142 | 145 | ||
| 143 | struct drm_msm_gem_info { | 146 | struct drm_msm_gem_info { |
| 144 | 	__u32 handle; /* in */ | 147 | 	__u32 handle; /* in */ |
| ... | @@ -151,8 +154,13 @@ struct drm_msm_gem_info { | ... | @@ -151,8 +154,13 @@ struct drm_msm_gem_info { |
| 151 | #define MSM_PREP_READ 0x01 | 154 | #define MSM_PREP_READ 0x01 |
| 152 | #define MSM_PREP_WRITE 0x02 | 155 | #define MSM_PREP_WRITE 0x02 |
| 153 | #define MSM_PREP_NOSYNC 0x04 | 156 | #define MSM_PREP_NOSYNC 0x04 |
| 157 | #define MSM_PREP_BOOST 0x08 | ||
| 154 | 158 | ||
| 155 | #define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC) | 159 | #define MSM_PREP_FLAGS (MSM_PREP_READ | \ |
| 160 | 			 MSM_PREP_WRITE | \ | ||
| 161 | 			 MSM_PREP_NOSYNC | \ | ||
| 162 | 			 MSM_PREP_BOOST | \ | ||
| 163 | 			 0) | ||
| 156 | 164 | ||
| 157 | struct drm_msm_gem_cpu_prep { | 165 | struct drm_msm_gem_cpu_prep { |
| 158 | 	__u32 handle; /* in */ | 166 | 	__u32 handle; /* in */ |
| ... | @@ -181,7 +189,11 @@ struct drm_msm_gem_cpu_fini { | ... | @@ -181,7 +189,11 @@ struct drm_msm_gem_cpu_fini { |
| 181 | */ | 189 | */ |
| 182 | struct drm_msm_gem_submit_reloc { | 190 | struct drm_msm_gem_submit_reloc { |
| 183 | 	__u32 submit_offset; /* in, offset from submit_bo */ | 191 | 	__u32 submit_offset; /* in, offset from submit_bo */ |
| 192 | #ifdef __cplusplus | ||
| 193 | 	__u32 _or; /* in, value OR'd with result */ | ||
| 194 | #else | ||
| 184 | 	__u32 or; /* in, value OR'd with result */ | 195 | 	__u32 or; /* in, value OR'd with result */ |
| 196 | #endif | ||
| 185 | 	__s32 shift; /* in, amount of left shift (can be negative) */ | 197 | 	__s32 shift; /* in, amount of left shift (can be negative) */ |
| 186 | 	__u32 reloc_idx; /* in, index of reloc_bo buffer */ | 198 | 	__u32 reloc_idx; /* in, index of reloc_bo buffer */ |
| 187 | 	__u64 reloc_offset; /* in, offset from start of reloc_bo */ | 199 | 	__u64 reloc_offset; /* in, offset from start of reloc_bo */ |
| ... | @@ -286,6 +298,11 @@ struct drm_msm_gem_submit { | ... | @@ -286,6 +298,11 @@ struct drm_msm_gem_submit { |
| 286 | 298 | ||
| 287 | }; | 299 | }; |
| 288 | 300 | ||
| 301 | #define MSM_WAIT_FENCE_BOOST	0x00000001 | ||
| 302 | #define MSM_WAIT_FENCE_FLAGS	( \ | ||
| 303 | 		MSM_WAIT_FENCE_BOOST | \ | ||
| 304 | 		0) | ||
| 305 | |||
| 289 | /* The normal way to synchronize with the GPU is just to CPU_PREP on | 306 | /* The normal way to synchronize with the GPU is just to CPU_PREP on |
| 290 | * a buffer if you need to access it from the CPU (other cmdstream | 307 | * a buffer if you need to access it from the CPU (other cmdstream |
| 291 | * submission from same or other contexts, PAGE_FLIP ioctl, etc, all | 308 | * submission from same or other contexts, PAGE_FLIP ioctl, etc, all |
| ... | @@ -295,7 +312,7 @@ struct drm_msm_gem_submit { | ... | @@ -295,7 +312,7 @@ struct drm_msm_gem_submit { |
| 295 | */ | 312 | */ |
| 296 | struct drm_msm_wait_fence { | 313 | struct drm_msm_wait_fence { |
| 297 | 	__u32 fence; /* in */ | 314 | 	__u32 fence; /* in */ |
| 298 | 	__u32 pad; | 315 | 	__u32 flags; /* in, bitmask of MSM_WAIT_FENCE_x */ |
| 299 | 	struct drm_msm_timespec timeout; /* in */ | 316 | 	struct drm_msm_timespec timeout; /* in */ |
| 300 | 	__u32 queueid; /* in, submitqueue id */ | 317 | 	__u32 queueid; /* in, submitqueue id */ |
| 301 | }; | 318 | }; |
lib/libc/include/any-linux-any/drm/nouveau_drm.h+319-3| ... | @@ -33,11 +33,104 @@ | ... | @@ -33,11 +33,104 @@ |
| 33 | extern "C" { | 33 | extern "C" { |
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
| 36 | #define NOUVEAU_GETPARAM_PCI_VENDOR 3 | ||
| 37 | #define NOUVEAU_GETPARAM_PCI_DEVICE 4 | ||
| 38 | #define NOUVEAU_GETPARAM_BUS_TYPE 5 | ||
| 39 | #define NOUVEAU_GETPARAM_FB_SIZE 8 | ||
| 40 | #define NOUVEAU_GETPARAM_AGP_SIZE 9 | ||
| 41 | #define NOUVEAU_GETPARAM_CHIPSET_ID 11 | ||
| 42 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 | ||
| 43 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 | ||
| 44 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 | ||
| 45 | #define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 | ||
| 46 | #define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16 | ||
| 47 | |||
| 48 | /* | ||
| 49 | * NOUVEAU_GETPARAM_EXEC_PUSH_MAX - query max pushes through getparam | ||
| 50 | * | ||
| 51 | * Query the maximum amount of IBs that can be pushed through a single | ||
| 52 | * &drm_nouveau_exec structure and hence a single &DRM_IOCTL_NOUVEAU_EXEC | ||
| 53 | * ioctl(). | ||
| 54 | */ | ||
| 55 | #define NOUVEAU_GETPARAM_EXEC_PUSH_MAX 17 | ||
| 56 | |||
| 57 | /* | ||
| 58 | * NOUVEAU_GETPARAM_VRAM_BAR_SIZE - query bar size | ||
| 59 | * | ||
| 60 | * Query the VRAM BAR size. | ||
| 61 | */ | ||
| 62 | #define NOUVEAU_GETPARAM_VRAM_BAR_SIZE 18 | ||
| 63 | |||
| 64 | /* | ||
| 65 | * NOUVEAU_GETPARAM_VRAM_USED | ||
| 66 | * | ||
| 67 | * Get remaining VRAM size. | ||
| 68 | */ | ||
| 69 | #define NOUVEAU_GETPARAM_VRAM_USED 19 | ||
| 70 | |||
| 71 | /* | ||
| 72 | * NOUVEAU_GETPARAM_HAS_VMA_TILEMODE | ||
| 73 | * | ||
| 74 | * Query whether tile mode and PTE kind are accepted with VM allocs or not. | ||
| 75 | */ | ||
| 76 | #define NOUVEAU_GETPARAM_HAS_VMA_TILEMODE 20 | ||
| 77 | |||
| 78 | struct drm_nouveau_getparam { | ||
| 79 | 	__u64 param; | ||
| 80 | 	__u64 value; | ||
| 81 | }; | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Those are used to support selecting the main engine used on Kepler. | ||
| 85 | * This goes into drm_nouveau_channel_alloc::tt_ctxdma_handle | ||
| 86 | */ | ||
| 87 | #define NOUVEAU_FIFO_ENGINE_GR 0x01 | ||
| 88 | #define NOUVEAU_FIFO_ENGINE_VP 0x02 | ||
| 89 | #define NOUVEAU_FIFO_ENGINE_PPP 0x04 | ||
| 90 | #define NOUVEAU_FIFO_ENGINE_BSP 0x08 | ||
| 91 | #define NOUVEAU_FIFO_ENGINE_CE 0x30 | ||
| 92 | |||
| 93 | struct drm_nouveau_channel_alloc { | ||
| 94 | 	__u32 fb_ctxdma_handle; | ||
| 95 | 	__u32 tt_ctxdma_handle; | ||
| 96 | |||
| 97 | 	__s32 channel; | ||
| 98 | 	__u32 pushbuf_domains; | ||
| 99 | |||
| 100 | 	/* Notifier memory */ | ||
| 101 | 	__u32 notifier_handle; | ||
| 102 | |||
| 103 | 	/* DRM-enforced subchannel assignments */ | ||
| 104 | 	struct { | ||
| 105 | 		__u32 handle; | ||
| 106 | 		__u32 grclass; | ||
| 107 | 	} subchan[8]; | ||
| 108 | 	__u32 nr_subchan; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct drm_nouveau_channel_free { | ||
| 112 | 	__s32 channel; | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct drm_nouveau_notifierobj_alloc { | ||
| 116 | 	__u32 channel; | ||
| 117 | 	__u32 handle; | ||
| 118 | 	__u32 size; | ||
| 119 | 	__u32 offset; | ||
| 120 | }; | ||
| 121 | |||
| 122 | struct drm_nouveau_gpuobj_free { | ||
| 123 | 	__s32 channel; | ||
| 124 | 	__u32 handle; | ||
| 125 | }; | ||
| 126 | |||
| 36 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) | 127 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) |
| 37 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) | 128 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) |
| 38 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) | 129 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) |
| 39 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) | 130 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) |
| 40 | #define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) | 131 | #define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) |
| 132 | /* The BO will never be shared via import or export. */ | ||
| 133 | #define NOUVEAU_GEM_DOMAIN_NO_SHARE (1 << 5) | ||
| 41 | 134 | ||
| 42 | #define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ | 135 | #define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ |
| 43 | #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 | 136 | #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 |
| ... | @@ -98,6 +191,7 @@ struct drm_nouveau_gem_pushbuf_push { | ... | @@ -98,6 +191,7 @@ struct drm_nouveau_gem_pushbuf_push { |
| 98 | 	__u32 pad; | 191 | 	__u32 pad; |
| 99 | 	__u64 offset; | 192 | 	__u64 offset; |
| 100 | 	__u64 length; | 193 | 	__u64 length; |
| 194 | #define NOUVEAU_GEM_PUSHBUF_NO_PREFETCH (1 << 23) | ||
| 101 | }; | 195 | }; |
| 102 | 196 | ||
| 103 | struct drm_nouveau_gem_pushbuf { | 197 | struct drm_nouveau_gem_pushbuf { |
| ... | @@ -126,16 +220,231 @@ struct drm_nouveau_gem_cpu_fini { | ... | @@ -126,16 +220,231 @@ struct drm_nouveau_gem_cpu_fini { |
| 126 | 	__u32 handle; | 220 | 	__u32 handle; |
| 127 | }; | 221 | }; |
| 128 | 222 | ||
| 129 | #define DRM_NOUVEAU_GETPARAM 0x00 /* deprecated */ | 223 | /** |
| 224 | * struct drm_nouveau_sync - sync object | ||
| 225 | * | ||
| 226 | * This structure serves as synchronization mechanism for (potentially) | ||
| 227 | * asynchronous operations such as EXEC or VM_BIND. | ||
| 228 | */ | ||
| 229 | struct drm_nouveau_sync { | ||
| 230 | 	/** | ||
| 231 | 	 * @flags: the flags for a sync object | ||
| 232 | 	 * | ||
| 233 | 	 * The first 8 bits are used to determine the type of the sync object. | ||
| 234 | 	 */ | ||
| 235 | 	__u32 flags; | ||
| 236 | #define DRM_NOUVEAU_SYNC_SYNCOBJ 0x0 | ||
| 237 | #define DRM_NOUVEAU_SYNC_TIMELINE_SYNCOBJ 0x1 | ||
| 238 | #define DRM_NOUVEAU_SYNC_TYPE_MASK 0xf | ||
| 239 | 	/** | ||
| 240 | 	 * @handle: the handle of the sync object | ||
| 241 | 	 */ | ||
| 242 | 	__u32 handle; | ||
| 243 | 	/** | ||
| 244 | 	 * @timeline_value: | ||
| 245 | 	 * | ||
| 246 | 	 * The timeline point of the sync object in case the syncobj is of | ||
| 247 | 	 * type DRM_NOUVEAU_SYNC_TIMELINE_SYNCOBJ. | ||
| 248 | 	 */ | ||
| 249 | 	__u64 timeline_value; | ||
| 250 | }; | ||
| 251 | |||
| 252 | /** | ||
| 253 | * struct drm_nouveau_vm_init - GPU VA space init structure | ||
| 254 | * | ||
| 255 | * Used to initialize the GPU's VA space for a user client, telling the kernel | ||
| 256 | * which portion of the VA space is managed by the UMD and kernel respectively. | ||
| 257 | * | ||
| 258 | * For the UMD to use the VM_BIND uAPI, this must be called before any BOs or | ||
| 259 | * channels are created; if called afterwards DRM_IOCTL_NOUVEAU_VM_INIT fails | ||
| 260 | * with -ENOSYS. | ||
| 261 | */ | ||
| 262 | struct drm_nouveau_vm_init { | ||
| 263 | 	/** | ||
| 264 | 	 * @kernel_managed_addr: start address of the kernel managed VA space | ||
| 265 | 	 * region | ||
| 266 | 	 */ | ||
| 267 | 	__u64 kernel_managed_addr; | ||
| 268 | 	/** | ||
| 269 | 	 * @kernel_managed_size: size of the kernel managed VA space region in | ||
| 270 | 	 * bytes | ||
| 271 | 	 */ | ||
| 272 | 	__u64 kernel_managed_size; | ||
| 273 | }; | ||
| 274 | |||
| 275 | /** | ||
| 276 | * struct drm_nouveau_vm_bind_op - VM_BIND operation | ||
| 277 | * | ||
| 278 | * This structure represents a single VM_BIND operation. UMDs should pass | ||
| 279 | * an array of this structure via struct drm_nouveau_vm_bind's &op_ptr field. | ||
| 280 | */ | ||
| 281 | struct drm_nouveau_vm_bind_op { | ||
| 282 | 	/** | ||
| 283 | 	 * @op: the operation type | ||
| 284 | 	 * | ||
| 285 | 	 * Supported values: | ||
| 286 | 	 * | ||
| 287 | 	 * %DRM_NOUVEAU_VM_BIND_OP_MAP - Map a GEM object to the GPU's VA | ||
| 288 | 	 * space. Optionally, the &DRM_NOUVEAU_VM_BIND_SPARSE flag can be | ||
| 289 | 	 * passed to instruct the kernel to create sparse mappings for the | ||
| 290 | 	 * given range. | ||
| 291 | 	 * | ||
| 292 | 	 * %DRM_NOUVEAU_VM_BIND_OP_UNMAP - Unmap an existing mapping in the | ||
| 293 | 	 * GPU's VA space. If the region the mapping is located in is a | ||
| 294 | 	 * sparse region, new sparse mappings are created where the unmapped | ||
| 295 | 	 * (memory backed) mapping was mapped previously. To remove a sparse | ||
| 296 | 	 * region the &DRM_NOUVEAU_VM_BIND_SPARSE must be set. | ||
| 297 | 	 */ | ||
| 298 | 	__u32 op; | ||
| 299 | #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0 | ||
| 300 | #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1 | ||
| 301 | 	/** | ||
| 302 | 	 * @flags: the flags for a &drm_nouveau_vm_bind_op | ||
| 303 | 	 * | ||
| 304 | 	 * Supported values: | ||
| 305 | 	 * | ||
| 306 | 	 * %DRM_NOUVEAU_VM_BIND_SPARSE - Indicates that an allocated VA | ||
| 307 | 	 * space region should be sparse. | ||
| 308 | 	 */ | ||
| 309 | 	__u32 flags; | ||
| 310 | #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8) | ||
| 311 | 	/** | ||
| 312 | 	 * @handle: the handle of the DRM GEM object to map | ||
| 313 | 	 */ | ||
| 314 | 	__u32 handle; | ||
| 315 | 	/** | ||
| 316 | 	 * @pad: 32 bit padding, should be 0 | ||
| 317 | 	 */ | ||
| 318 | 	__u32 pad; | ||
| 319 | 	/** | ||
| 320 | 	 * @addr: | ||
| 321 | 	 * | ||
| 322 | 	 * the address the VA space region or (memory backed) mapping should be mapped to | ||
| 323 | 	 */ | ||
| 324 | 	__u64 addr; | ||
| 325 | 	/** | ||
| 326 | 	 * @bo_offset: the offset within the BO backing the mapping | ||
| 327 | 	 */ | ||
| 328 | 	__u64 bo_offset; | ||
| 329 | 	/** | ||
| 330 | 	 * @range: the size of the requested mapping in bytes | ||
| 331 | 	 */ | ||
| 332 | 	__u64 range; | ||
| 333 | }; | ||
| 334 | |||
| 335 | /** | ||
| 336 | * struct drm_nouveau_vm_bind - structure for DRM_IOCTL_NOUVEAU_VM_BIND | ||
| 337 | */ | ||
| 338 | struct drm_nouveau_vm_bind { | ||
| 339 | 	/** | ||
| 340 | 	 * @op_count: the number of &drm_nouveau_vm_bind_op | ||
| 341 | 	 */ | ||
| 342 | 	__u32 op_count; | ||
| 343 | 	/** | ||
| 344 | 	 * @flags: the flags for a &drm_nouveau_vm_bind ioctl | ||
| 345 | 	 * | ||
| 346 | 	 * Supported values: | ||
| 347 | 	 * | ||
| 348 | 	 * %DRM_NOUVEAU_VM_BIND_RUN_ASYNC - Indicates that the given VM_BIND | ||
| 349 | 	 * operation should be executed asynchronously by the kernel. | ||
| 350 | 	 * | ||
| 351 | 	 * If this flag is not supplied the kernel executes the associated | ||
| 352 | 	 * operations synchronously and doesn't accept any &drm_nouveau_sync | ||
| 353 | 	 * objects. | ||
| 354 | 	 */ | ||
| 355 | 	__u32 flags; | ||
| 356 | #define DRM_NOUVEAU_VM_BIND_RUN_ASYNC 0x1 | ||
| 357 | 	/** | ||
| 358 | 	 * @wait_count: the number of wait &drm_nouveau_syncs | ||
| 359 | 	 */ | ||
| 360 | 	__u32 wait_count; | ||
| 361 | 	/** | ||
| 362 | 	 * @sig_count: the number of &drm_nouveau_syncs to signal when finished | ||
| 363 | 	 */ | ||
| 364 | 	__u32 sig_count; | ||
| 365 | 	/** | ||
| 366 | 	 * @wait_ptr: pointer to &drm_nouveau_syncs to wait for | ||
| 367 | 	 */ | ||
| 368 | 	__u64 wait_ptr; | ||
| 369 | 	/** | ||
| 370 | 	 * @sig_ptr: pointer to &drm_nouveau_syncs to signal when finished | ||
| 371 | 	 */ | ||
| 372 | 	__u64 sig_ptr; | ||
| 373 | 	/** | ||
| 374 | 	 * @op_ptr: pointer to the &drm_nouveau_vm_bind_ops to execute | ||
| 375 | 	 */ | ||
| 376 | 	__u64 op_ptr; | ||
| 377 | }; | ||
| 378 | |||
| 379 | /** | ||
| 380 | * struct drm_nouveau_exec_push - EXEC push operation | ||
| 381 | * | ||
| 382 | * This structure represents a single EXEC push operation. UMDs should pass an | ||
| 383 | * array of this structure via struct drm_nouveau_exec's &push_ptr field. | ||
| 384 | */ | ||
| 385 | struct drm_nouveau_exec_push { | ||
| 386 | 	/** | ||
| 387 | 	 * @va: the virtual address of the push buffer mapping | ||
| 388 | 	 */ | ||
| 389 | 	__u64 va; | ||
| 390 | 	/** | ||
| 391 | 	 * @va_len: the length of the push buffer mapping | ||
| 392 | 	 */ | ||
| 393 | 	__u32 va_len; | ||
| 394 | 	/** | ||
| 395 | 	 * @flags: the flags for this push buffer mapping | ||
| 396 | 	 */ | ||
| 397 | 	__u32 flags; | ||
| 398 | #define DRM_NOUVEAU_EXEC_PUSH_NO_PREFETCH 0x1 | ||
| 399 | }; | ||
| 400 | |||
| 401 | /** | ||
| 402 | * struct drm_nouveau_exec - structure for DRM_IOCTL_NOUVEAU_EXEC | ||
| 403 | */ | ||
| 404 | struct drm_nouveau_exec { | ||
| 405 | 	/** | ||
| 406 | 	 * @channel: the channel to execute the push buffer in | ||
| 407 | 	 */ | ||
| 408 | 	__u32 channel; | ||
| 409 | 	/** | ||
| 410 | 	 * @push_count: the number of &drm_nouveau_exec_push ops | ||
| 411 | 	 */ | ||
| 412 | 	__u32 push_count; | ||
| 413 | 	/** | ||
| 414 | 	 * @wait_count: the number of wait &drm_nouveau_syncs | ||
| 415 | 	 */ | ||
| 416 | 	__u32 wait_count; | ||
| 417 | 	/** | ||
| 418 | 	 * @sig_count: the number of &drm_nouveau_syncs to signal when finished | ||
| 419 | 	 */ | ||
| 420 | 	__u32 sig_count; | ||
| 421 | 	/** | ||
| 422 | 	 * @wait_ptr: pointer to &drm_nouveau_syncs to wait for | ||
| 423 | 	 */ | ||
| 424 | 	__u64 wait_ptr; | ||
| 425 | 	/** | ||
| 426 | 	 * @sig_ptr: pointer to &drm_nouveau_syncs to signal when finished | ||
| 427 | 	 */ | ||
| 428 | 	__u64 sig_ptr; | ||
| 429 | 	/** | ||
| 430 | 	 * @push_ptr: pointer to &drm_nouveau_exec_push ops | ||
| 431 | 	 */ | ||
| 432 | 	__u64 push_ptr; | ||
| 433 | }; | ||
| 434 | |||
| 435 | #define DRM_NOUVEAU_GETPARAM 0x00 | ||
| 130 | #define DRM_NOUVEAU_SETPARAM 0x01 /* deprecated */ | 436 | #define DRM_NOUVEAU_SETPARAM 0x01 /* deprecated */ |
| 131 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 /* deprecated */ | 437 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 |
| 132 | #define DRM_NOUVEAU_CHANNEL_FREE 0x03 /* deprecated */ | 438 | #define DRM_NOUVEAU_CHANNEL_FREE 0x03 |
| 133 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ | 439 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ |
| 134 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ | 440 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ |
| 135 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ | 441 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ |
| 136 | #define DRM_NOUVEAU_NVIF 0x07 | 442 | #define DRM_NOUVEAU_NVIF 0x07 |
| 137 | #define DRM_NOUVEAU_SVM_INIT 0x08 | 443 | #define DRM_NOUVEAU_SVM_INIT 0x08 |
| 138 | #define DRM_NOUVEAU_SVM_BIND 0x09 | 444 | #define DRM_NOUVEAU_SVM_BIND 0x09 |
| 445 | #define DRM_NOUVEAU_VM_INIT 0x10 | ||
| 446 | #define DRM_NOUVEAU_VM_BIND 0x11 | ||
| 447 | #define DRM_NOUVEAU_EXEC 0x12 | ||
| 139 | #define DRM_NOUVEAU_GEM_NEW 0x40 | 448 | #define DRM_NOUVEAU_GEM_NEW 0x40 |
| 140 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 | 449 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 |
| 141 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 | 450 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 |
| ... | @@ -188,6 +497,10 @@ struct drm_nouveau_svm_bind { | ... | @@ -188,6 +497,10 @@ struct drm_nouveau_svm_bind { |
| 188 | #define NOUVEAU_SVM_BIND_TARGET__GPU_VRAM (1UL << 31) | 497 | #define NOUVEAU_SVM_BIND_TARGET__GPU_VRAM (1UL << 31) |
| 189 | 498 | ||
| 190 | 499 | ||
| 500 | #define DRM_IOCTL_NOUVEAU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, struct drm_nouveau_getparam) | ||
| 501 | #define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, struct drm_nouveau_channel_alloc) | ||
| 502 | #define DRM_IOCTL_NOUVEAU_CHANNEL_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, struct drm_nouveau_channel_free) | ||
| 503 | |||
| 191 | #define DRM_IOCTL_NOUVEAU_SVM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_INIT, struct drm_nouveau_svm_init) | 504 | #define DRM_IOCTL_NOUVEAU_SVM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_INIT, struct drm_nouveau_svm_init) |
| 192 | #define DRM_IOCTL_NOUVEAU_SVM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_BIND, struct drm_nouveau_svm_bind) | 505 | #define DRM_IOCTL_NOUVEAU_SVM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_BIND, struct drm_nouveau_svm_bind) |
| 193 | 506 | ||
| ... | @@ -197,6 +510,9 @@ struct drm_nouveau_svm_bind { | ... | @@ -197,6 +510,9 @@ struct drm_nouveau_svm_bind { |
| 197 | #define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) | 510 | #define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) |
| 198 | #define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) | 511 | #define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) |
| 199 | 512 | ||
| 513 | #define DRM_IOCTL_NOUVEAU_VM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_INIT, struct drm_nouveau_vm_init) | ||
| 514 | #define DRM_IOCTL_NOUVEAU_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_VM_BIND, struct drm_nouveau_vm_bind) | ||
| 515 | #define DRM_IOCTL_NOUVEAU_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_EXEC, struct drm_nouveau_exec) | ||
| 200 | #if defined(__cplusplus) | 516 | #if defined(__cplusplus) |
| 201 | } | 517 | } |
| 202 | #endif | 518 | #endif |
lib/libc/include/any-linux-any/drm/panthor_drm.h created+962| ... | @@ -0,0 +1,962 @@ | ||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | /* Copyright (C) 2023 Collabora ltd. */ | ||
| 3 | #ifndef _PANTHOR_DRM_H_ | ||
| 4 | #define _PANTHOR_DRM_H_ | ||
| 5 | |||
| 6 | #include "drm.h" | ||
| 7 | |||
| 8 | #if defined(__cplusplus) | ||
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 12 | /** | ||
| 13 | * DOC: Introduction | ||
| 14 | * | ||
| 15 | * This documentation describes the Panthor IOCTLs. | ||
| 16 | * | ||
| 17 | * Just a few generic rules about the data passed to the Panthor IOCTLs: | ||
| 18 | * | ||
| 19 | * - Structures must be aligned on 64-bit/8-byte. If the object is not | ||
| 20 | * naturally aligned, a padding field must be added. | ||
| 21 | * - Fields must be explicitly aligned to their natural type alignment with | ||
| 22 | * pad[0..N] fields. | ||
| 23 | * - All padding fields will be checked by the driver to make sure they are | ||
| 24 | * zeroed. | ||
| 25 | * - Flags can be added, but not removed/replaced. | ||
| 26 | * - New fields can be added to the main structures (the structures | ||
| 27 | * directly passed to the ioctl). Those fields can be added at the end of | ||
| 28 | * the structure, or replace existing padding fields. Any new field being | ||
| 29 | * added must preserve the behavior that existed before those fields were | ||
| 30 | * added when a value of zero is passed. | ||
| 31 | * - New fields can be added to indirect objects (objects pointed by the | ||
| 32 | * main structure), iff those objects are passed a size to reflect the | ||
| 33 | * size known by the userspace driver (see drm_panthor_obj_array::stride | ||
| 34 | * or drm_panthor_dev_query::size). | ||
| 35 | * - If the kernel driver is too old to know some fields, those will be | ||
| 36 | * ignored if zero, and otherwise rejected (and so will be zero on output). | ||
| 37 | * - If userspace is too old to know some fields, those will be zeroed | ||
| 38 | * (input) before the structure is parsed by the kernel driver. | ||
| 39 | * - Each new flag/field addition must come with a driver version update so | ||
| 40 | * the userspace driver doesn't have to trial and error to know which | ||
| 41 | * flags are supported. | ||
| 42 | * - Structures should not contain unions, as this would defeat the | ||
| 43 | * extensibility of such structures. | ||
| 44 | * - IOCTLs can't be removed or replaced. New IOCTL IDs should be placed | ||
| 45 | * at the end of the drm_panthor_ioctl_id enum. | ||
| 46 | */ | ||
| 47 | |||
| 48 | /** | ||
| 49 | * DOC: MMIO regions exposed to userspace. | ||
| 50 | * | ||
| 51 | * .. c:macro:: DRM_PANTHOR_USER_MMIO_OFFSET | ||
| 52 | * | ||
| 53 | * File offset for all MMIO regions being exposed to userspace. Don't use | ||
| 54 | * this value directly, use DRM_PANTHOR_USER_<name>_OFFSET values instead. | ||
| 55 | * pgoffset passed to mmap2() is an unsigned long, which forces us to use a | ||
| 56 | * different offset on 32-bit and 64-bit systems. | ||
| 57 | * | ||
| 58 | * .. c:macro:: DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET | ||
| 59 | * | ||
| 60 | * File offset for the LATEST_FLUSH_ID register. The Userspace driver controls | ||
| 61 | * GPU cache flushing through CS instructions, but the flush reduction | ||
| 62 | * mechanism requires a flush_id. This flush_id could be queried with an | ||
| 63 | * ioctl, but Arm provides a well-isolated register page containing only this | ||
| 64 | * read-only register, so let's expose this page through a static mmap offset | ||
| 65 | * and allow direct mapping of this MMIO region so we can avoid the | ||
| 66 | * user <-> kernel round-trip. | ||
| 67 | */ | ||
| 68 | #define DRM_PANTHOR_USER_MMIO_OFFSET_32BIT	(1ull << 43) | ||
| 69 | #define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT	(1ull << 56) | ||
| 70 | #define DRM_PANTHOR_USER_MMIO_OFFSET		(sizeof(unsigned long) < 8 ? \ | ||
| 71 | 						 DRM_PANTHOR_USER_MMIO_OFFSET_32BIT : \ | ||
| 72 | 						 DRM_PANTHOR_USER_MMIO_OFFSET_64BIT) | ||
| 73 | #define DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET	(DRM_PANTHOR_USER_MMIO_OFFSET | 0) | ||
| 74 | |||
| 75 | /** | ||
| 76 | * DOC: IOCTL IDs | ||
| 77 | * | ||
| 78 | * enum drm_panthor_ioctl_id - IOCTL IDs | ||
| 79 | * | ||
| 80 | * Place new ioctls at the end, don't re-order, don't replace or remove entries. | ||
| 81 | * | ||
| 82 | * These IDs are not meant to be used directly. Use the DRM_IOCTL_PANTHOR_xxx | ||
| 83 | * definitions instead. | ||
| 84 | */ | ||
| 85 | enum drm_panthor_ioctl_id { | ||
| 86 | 	/** @DRM_PANTHOR_DEV_QUERY: Query device information. */ | ||
| 87 | 	DRM_PANTHOR_DEV_QUERY = 0, | ||
| 88 | |||
| 89 | 	/** @DRM_PANTHOR_VM_CREATE: Create a VM. */ | ||
| 90 | 	DRM_PANTHOR_VM_CREATE, | ||
| 91 | |||
| 92 | 	/** @DRM_PANTHOR_VM_DESTROY: Destroy a VM. */ | ||
| 93 | 	DRM_PANTHOR_VM_DESTROY, | ||
| 94 | |||
| 95 | 	/** @DRM_PANTHOR_VM_BIND: Bind/unbind memory to a VM. */ | ||
| 96 | 	DRM_PANTHOR_VM_BIND, | ||
| 97 | |||
| 98 | 	/** @DRM_PANTHOR_VM_GET_STATE: Get VM state. */ | ||
| 99 | 	DRM_PANTHOR_VM_GET_STATE, | ||
| 100 | |||
| 101 | 	/** @DRM_PANTHOR_BO_CREATE: Create a buffer object. */ | ||
| 102 | 	DRM_PANTHOR_BO_CREATE, | ||
| 103 | |||
| 104 | 	/** | ||
| 105 | 	 * @DRM_PANTHOR_BO_MMAP_OFFSET: Get the file offset to pass to | ||
| 106 | 	 * mmap to map a GEM object. | ||
| 107 | 	 */ | ||
| 108 | 	DRM_PANTHOR_BO_MMAP_OFFSET, | ||
| 109 | |||
| 110 | 	/** @DRM_PANTHOR_GROUP_CREATE: Create a scheduling group. */ | ||
| 111 | 	DRM_PANTHOR_GROUP_CREATE, | ||
| 112 | |||
| 113 | 	/** @DRM_PANTHOR_GROUP_DESTROY: Destroy a scheduling group. */ | ||
| 114 | 	DRM_PANTHOR_GROUP_DESTROY, | ||
| 115 | |||
| 116 | 	/** | ||
| 117 | 	 * @DRM_PANTHOR_GROUP_SUBMIT: Submit jobs to queues belonging | ||
| 118 | 	 * to a specific scheduling group. | ||
| 119 | 	 */ | ||
| 120 | 	DRM_PANTHOR_GROUP_SUBMIT, | ||
| 121 | |||
| 122 | 	/** @DRM_PANTHOR_GROUP_GET_STATE: Get the state of a scheduling group. */ | ||
| 123 | 	DRM_PANTHOR_GROUP_GET_STATE, | ||
| 124 | |||
| 125 | 	/** @DRM_PANTHOR_TILER_HEAP_CREATE: Create a tiler heap. */ | ||
| 126 | 	DRM_PANTHOR_TILER_HEAP_CREATE, | ||
| 127 | |||
| 128 | 	/** @DRM_PANTHOR_TILER_HEAP_DESTROY: Destroy a tiler heap. */ | ||
| 129 | 	DRM_PANTHOR_TILER_HEAP_DESTROY, | ||
| 130 | }; | ||
| 131 | |||
| 132 | /** | ||
| 133 | * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number | ||
| 134 | * @__access: Access type. Must be R, W or RW. | ||
| 135 | * @__id: One of the DRM_PANTHOR_xxx id. | ||
| 136 | * @__type: Suffix of the type being passed to the IOCTL. | ||
| 137 | * | ||
| 138 | * Don't use this macro directly, use the DRM_IOCTL_PANTHOR_xxx | ||
| 139 | * values instead. | ||
| 140 | * | ||
| 141 | * Return: An IOCTL number to be passed to ioctl() from userspace. | ||
| 142 | */ | ||
| 143 | #define DRM_IOCTL_PANTHOR(__access, __id, __type) \ | ||
| 144 | 	DRM_IO ## __access(DRM_COMMAND_BASE + DRM_PANTHOR_ ## __id, \ | ||
| 145 | 			 struct drm_panthor_ ## __type) | ||
| 146 | |||
| 147 | #define DRM_IOCTL_PANTHOR_DEV_QUERY \ | ||
| 148 | 	DRM_IOCTL_PANTHOR(WR, DEV_QUERY, dev_query) | ||
| 149 | #define DRM_IOCTL_PANTHOR_VM_CREATE \ | ||
| 150 | 	DRM_IOCTL_PANTHOR(WR, VM_CREATE, vm_create) | ||
| 151 | #define DRM_IOCTL_PANTHOR_VM_DESTROY \ | ||
| 152 | 	DRM_IOCTL_PANTHOR(WR, VM_DESTROY, vm_destroy) | ||
| 153 | #define DRM_IOCTL_PANTHOR_VM_BIND \ | ||
| 154 | 	DRM_IOCTL_PANTHOR(WR, VM_BIND, vm_bind) | ||
| 155 | #define DRM_IOCTL_PANTHOR_VM_GET_STATE \ | ||
| 156 | 	DRM_IOCTL_PANTHOR(WR, VM_GET_STATE, vm_get_state) | ||
| 157 | #define DRM_IOCTL_PANTHOR_BO_CREATE \ | ||
| 158 | 	DRM_IOCTL_PANTHOR(WR, BO_CREATE, bo_create) | ||
| 159 | #define DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET \ | ||
| 160 | 	DRM_IOCTL_PANTHOR(WR, BO_MMAP_OFFSET, bo_mmap_offset) | ||
| 161 | #define DRM_IOCTL_PANTHOR_GROUP_CREATE \ | ||
| 162 | 	DRM_IOCTL_PANTHOR(WR, GROUP_CREATE, group_create) | ||
| 163 | #define DRM_IOCTL_PANTHOR_GROUP_DESTROY \ | ||
| 164 | 	DRM_IOCTL_PANTHOR(WR, GROUP_DESTROY, group_destroy) | ||
| 165 | #define DRM_IOCTL_PANTHOR_GROUP_SUBMIT \ | ||
| 166 | 	DRM_IOCTL_PANTHOR(WR, GROUP_SUBMIT, group_submit) | ||
| 167 | #define DRM_IOCTL_PANTHOR_GROUP_GET_STATE \ | ||
| 168 | 	DRM_IOCTL_PANTHOR(WR, GROUP_GET_STATE, group_get_state) | ||
| 169 | #define DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE \ | ||
| 170 | 	DRM_IOCTL_PANTHOR(WR, TILER_HEAP_CREATE, tiler_heap_create) | ||
| 171 | #define DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY \ | ||
| 172 | 	DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy) | ||
| 173 | |||
| 174 | /** | ||
| 175 | * DOC: IOCTL arguments | ||
| 176 | */ | ||
| 177 | |||
| 178 | /** | ||
| 179 | * struct drm_panthor_obj_array - Object array. | ||
| 180 | * | ||
| 181 | * This object is used to pass an array of objects whose size is subject to changes in | ||
| 182 | * future versions of the driver. In order to support this mutability, we pass a stride | ||
| 183 | * describing the size of the object as known by userspace. | ||
| 184 | * | ||
| 185 | * You shouldn't fill drm_panthor_obj_array fields directly. You should instead use | ||
| 186 | * the DRM_PANTHOR_OBJ_ARRAY() macro that takes care of initializing the stride to | ||
| 187 | * the object size. | ||
| 188 | */ | ||
| 189 | struct drm_panthor_obj_array { | ||
| 190 | 	/** @stride: Stride of object struct. Used for versioning. */ | ||
| 191 | 	__u32 stride; | ||
| 192 | |||
| 193 | 	/** @count: Number of objects in the array. */ | ||
| 194 | 	__u32 count; | ||
| 195 | |||
| 196 | 	/** @array: User pointer to an array of objects. */ | ||
| 197 | 	__u64 array; | ||
| 198 | }; | ||
| 199 | |||
| 200 | /** | ||
| 201 | * DRM_PANTHOR_OBJ_ARRAY() - Initialize a drm_panthor_obj_array field. | ||
| 202 | * @cnt: Number of elements in the array. | ||
| 203 | * @ptr: Pointer to the array to pass to the kernel. | ||
| 204 | * | ||
| 205 | * Macro initializing a drm_panthor_obj_array based on the object size as known | ||
| 206 | * by userspace. | ||
| 207 | */ | ||
| 208 | #define DRM_PANTHOR_OBJ_ARRAY(cnt, ptr) \ | ||
| 209 | 	{ .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) } | ||
| 210 | |||
| 211 | /** | ||
| 212 | * enum drm_panthor_sync_op_flags - Synchronization operation flags. | ||
| 213 | */ | ||
| 214 | enum drm_panthor_sync_op_flags { | ||
| 215 | 	/** @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK: Synchronization handle type mask. */ | ||
| 216 | 	DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK = 0xff, | ||
| 217 | |||
| 218 | 	/** @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ: Synchronization object type. */ | ||
| 219 | 	DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ = 0, | ||
| 220 | |||
| 221 | 	/** | ||
| 222 | 	 * @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ: Timeline synchronization | ||
| 223 | 	 * object type. | ||
| 224 | 	 */ | ||
| 225 | 	DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ = 1, | ||
| 226 | |||
| 227 | 	/** @DRM_PANTHOR_SYNC_OP_WAIT: Wait operation. */ | ||
| 228 | 	DRM_PANTHOR_SYNC_OP_WAIT = 0 << 31, | ||
| 229 | |||
| 230 | 	/** @DRM_PANTHOR_SYNC_OP_SIGNAL: Signal operation. */ | ||
| 231 | 	DRM_PANTHOR_SYNC_OP_SIGNAL = (int)(1u << 31), | ||
| 232 | }; | ||
| 233 | |||
| 234 | /** | ||
| 235 | * struct drm_panthor_sync_op - Synchronization operation. | ||
| 236 | */ | ||
| 237 | struct drm_panthor_sync_op { | ||
| 238 | 	/** @flags: Synchronization operation flags. Combination of DRM_PANTHOR_SYNC_OP values. */ | ||
| 239 | 	__u32 flags; | ||
| 240 | |||
| 241 | 	/** @handle: Sync handle. */ | ||
| 242 | 	__u32 handle; | ||
| 243 | |||
| 244 | 	/** | ||
| 245 | 	 * @timeline_value: MBZ if | ||
| 246 | 	 * (flags & DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK) != | ||
| 247 | 	 * DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ. | ||
| 248 | 	 */ | ||
| 249 | 	__u64 timeline_value; | ||
| 250 | }; | ||
| 251 | |||
| 252 | /** | ||
| 253 | * enum drm_panthor_dev_query_type - Query type | ||
| 254 | * | ||
| 255 | * Place new types at the end, don't re-order, don't remove or replace. | ||
| 256 | */ | ||
| 257 | enum drm_panthor_dev_query_type { | ||
| 258 | 	/** @DRM_PANTHOR_DEV_QUERY_GPU_INFO: Query GPU information. */ | ||
| 259 | 	DRM_PANTHOR_DEV_QUERY_GPU_INFO = 0, | ||
| 260 | |||
| 261 | 	/** @DRM_PANTHOR_DEV_QUERY_CSIF_INFO: Query command-stream interface information. */ | ||
| 262 | 	DRM_PANTHOR_DEV_QUERY_CSIF_INFO, | ||
| 263 | }; | ||
| 264 | |||
| 265 | /** | ||
| 266 | * struct drm_panthor_gpu_info - GPU information | ||
| 267 | * | ||
| 268 | * Structure grouping all queryable information relating to the GPU. | ||
| 269 | */ | ||
| 270 | struct drm_panthor_gpu_info { | ||
| 271 | 	/** @gpu_id : GPU ID. */ | ||
| 272 | 	__u32 gpu_id; | ||
| 273 | #define DRM_PANTHOR_ARCH_MAJOR(x)		((x) >> 28) | ||
| 274 | #define DRM_PANTHOR_ARCH_MINOR(x)		(((x) >> 24) & 0xf) | ||
| 275 | #define DRM_PANTHOR_ARCH_REV(x)			(((x) >> 20) & 0xf) | ||
| 276 | #define DRM_PANTHOR_PRODUCT_MAJOR(x)		(((x) >> 16) & 0xf) | ||
| 277 | #define DRM_PANTHOR_VERSION_MAJOR(x)		(((x) >> 12) & 0xf) | ||
| 278 | #define DRM_PANTHOR_VERSION_MINOR(x)		(((x) >> 4) & 0xff) | ||
| 279 | #define DRM_PANTHOR_VERSION_STATUS(x)		((x) & 0xf) | ||
| 280 | |||
| 281 | 	/** @gpu_rev: GPU revision. */ | ||
| 282 | 	__u32 gpu_rev; | ||
| 283 | |||
| 284 | 	/** @csf_id: Command stream frontend ID. */ | ||
| 285 | 	__u32 csf_id; | ||
| 286 | #define DRM_PANTHOR_CSHW_MAJOR(x)		(((x) >> 26) & 0x3f) | ||
| 287 | #define DRM_PANTHOR_CSHW_MINOR(x)		(((x) >> 20) & 0x3f) | ||
| 288 | #define DRM_PANTHOR_CSHW_REV(x)			(((x) >> 16) & 0xf) | ||
| 289 | #define DRM_PANTHOR_MCU_MAJOR(x)		(((x) >> 10) & 0x3f) | ||
| 290 | #define DRM_PANTHOR_MCU_MINOR(x)		(((x) >> 4) & 0x3f) | ||
| 291 | #define DRM_PANTHOR_MCU_REV(x)			((x) & 0xf) | ||
| 292 | |||
| 293 | 	/** @l2_features: L2-cache features. */ | ||
| 294 | 	__u32 l2_features; | ||
| 295 | |||
| 296 | 	/** @tiler_features: Tiler features. */ | ||
| 297 | 	__u32 tiler_features; | ||
| 298 | |||
| 299 | 	/** @mem_features: Memory features. */ | ||
| 300 | 	__u32 mem_features; | ||
| 301 | |||
| 302 | 	/** @mmu_features: MMU features. */ | ||
| 303 | 	__u32 mmu_features; | ||
| 304 | #define DRM_PANTHOR_MMU_VA_BITS(x)		((x) & 0xff) | ||
| 305 | |||
| 306 | 	/** @thread_features: Thread features. */ | ||
| 307 | 	__u32 thread_features; | ||
| 308 | |||
| 309 | 	/** @max_threads: Maximum number of threads. */ | ||
| 310 | 	__u32 max_threads; | ||
| 311 | |||
| 312 | 	/** @thread_max_workgroup_size: Maximum workgroup size. */ | ||
| 313 | 	__u32 thread_max_workgroup_size; | ||
| 314 | |||
| 315 | 	/** | ||
| 316 | 	 * @thread_max_barrier_size: Maximum number of threads that can wait | ||
| 317 | 	 * simultaneously on a barrier. | ||
| 318 | 	 */ | ||
| 319 | 	__u32 thread_max_barrier_size; | ||
| 320 | |||
| 321 | 	/** @coherency_features: Coherency features. */ | ||
| 322 | 	__u32 coherency_features; | ||
| 323 | |||
| 324 | 	/** @texture_features: Texture features. */ | ||
| 325 | 	__u32 texture_features[4]; | ||
| 326 | |||
| 327 | 	/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */ | ||
| 328 | 	__u32 as_present; | ||
| 329 | |||
| 330 | 	/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */ | ||
| 331 | 	__u64 shader_present; | ||
| 332 | |||
| 333 | 	/** @l2_present: Bitmask encoding the L2 caches exposed by the GPU. */ | ||
| 334 | 	__u64 l2_present; | ||
| 335 | |||
| 336 | 	/** @tiler_present: Bitmask encoding the tiler units exposed by the GPU. */ | ||
| 337 | 	__u64 tiler_present; | ||
| 338 | |||
| 339 | 	/** @core_features: Used to discriminate core variants when they exist. */ | ||
| 340 | 	__u32 core_features; | ||
| 341 | |||
| 342 | 	/** @pad: MBZ. */ | ||
| 343 | 	__u32 pad; | ||
| 344 | }; | ||
| 345 | |||
| 346 | /** | ||
| 347 | * struct drm_panthor_csif_info - Command stream interface information | ||
| 348 | * | ||
| 349 | * Structure grouping all queryable information relating to the command stream interface. | ||
| 350 | */ | ||
| 351 | struct drm_panthor_csif_info { | ||
| 352 | 	/** @csg_slot_count: Number of command stream group slots exposed by the firmware. */ | ||
| 353 | 	__u32 csg_slot_count; | ||
| 354 | |||
| 355 | 	/** @cs_slot_count: Number of command stream slots per group. */ | ||
| 356 | 	__u32 cs_slot_count; | ||
| 357 | |||
| 358 | 	/** @cs_reg_count: Number of command stream registers. */ | ||
| 359 | 	__u32 cs_reg_count; | ||
| 360 | |||
| 361 | 	/** @scoreboard_slot_count: Number of scoreboard slots. */ | ||
| 362 | 	__u32 scoreboard_slot_count; | ||
| 363 | |||
| 364 | 	/** | ||
| 365 | 	 * @unpreserved_cs_reg_count: Number of command stream registers reserved by | ||
| 366 | 	 * the kernel driver to call a userspace command stream. | ||
| 367 | 	 * | ||
| 368 | 	 * All registers can be used by a userspace command stream, but the | ||
| 369 | 	 * [cs_slot_count - unpreserved_cs_reg_count .. cs_slot_count] registers are | ||
| 370 | 	 * used by the kernel when DRM_PANTHOR_IOCTL_GROUP_SUBMIT is called. | ||
| 371 | 	 */ | ||
| 372 | 	__u32 unpreserved_cs_reg_count; | ||
| 373 | |||
| 374 | 	/** | ||
| 375 | 	 * @pad: Padding field, set to zero. | ||
| 376 | 	 */ | ||
| 377 | 	__u32 pad; | ||
| 378 | }; | ||
| 379 | |||
| 380 | /** | ||
| 381 | * struct drm_panthor_dev_query - Arguments passed to DRM_PANTHOR_IOCTL_DEV_QUERY | ||
| 382 | */ | ||
| 383 | struct drm_panthor_dev_query { | ||
| 384 | 	/** @type: the query type (see drm_panthor_dev_query_type). */ | ||
| 385 | 	__u32 type; | ||
| 386 | |||
| 387 | 	/** | ||
| 388 | 	 * @size: size of the type being queried. | ||
| 389 | 	 * | ||
| 390 | 	 * If pointer is NULL, size is updated by the driver to provide the | ||
| 391 | 	 * output structure size. If pointer is not NULL, the driver will | ||
| 392 | 	 * only copy min(size, actual_structure_size) bytes to the pointer, | ||
| 393 | 	 * and update the size accordingly. This allows us to extend query | ||
| 394 | 	 * types without breaking userspace. | ||
| 395 | 	 */ | ||
| 396 | 	__u32 size; | ||
| 397 | |||
| 398 | 	/** | ||
| 399 | 	 * @pointer: user pointer to a query type struct. | ||
| 400 | 	 * | ||
| 401 | 	 * Pointer can be NULL, in which case, nothing is copied, but the | ||
| 402 | 	 * actual structure size is returned. If not NULL, it must point to | ||
| 403 | 	 * a location that's large enough to hold size bytes. | ||
| 404 | 	 */ | ||
| 405 | 	__u64 pointer; | ||
| 406 | }; | ||
| 407 | |||
| 408 | /** | ||
| 409 | * struct drm_panthor_vm_create - Arguments passed to DRM_PANTHOR_IOCTL_VM_CREATE | ||
| 410 | */ | ||
| 411 | struct drm_panthor_vm_create { | ||
| 412 | 	/** @flags: VM flags, MBZ. */ | ||
| 413 | 	__u32 flags; | ||
| 414 | |||
| 415 | 	/** @id: Returned VM ID. */ | ||
| 416 | 	__u32 id; | ||
| 417 | |||
| 418 | 	/** | ||
| 419 | 	 * @user_va_range: Size of the VA space reserved for user objects. | ||
| 420 | 	 * | ||
| 421 | 	 * The kernel will pick the remaining space to map kernel-only objects to the | ||
| 422 | 	 * VM (heap chunks, heap context, ring buffers, kernel synchronization objects, | ||
| 423 | 	 * ...). If the space left for kernel objects is too small, kernel object | ||
| 424 | 	 * allocation will fail further down the road. One can use | ||
| 425 | 	 * drm_panthor_gpu_info::mmu_features to extract the total virtual address | ||
| 426 | 	 * range, and chose a user_va_range that leaves some space to the kernel. | ||
| 427 | 	 * | ||
| 428 | 	 * If user_va_range is zero, the kernel will pick a sensible value based on | ||
| 429 | 	 * TASK_SIZE and the virtual range supported by the GPU MMU (the kernel/user | ||
| 430 | 	 * split should leave enough VA space for userspace processes to support SVM, | ||
| 431 | 	 * while still allowing the kernel to map some amount of kernel objects in | ||
| 432 | 	 * the kernel VA range). The value chosen by the driver will be returned in | ||
| 433 | 	 * @user_va_range. | ||
| 434 | 	 * | ||
| 435 | 	 * User VA space always starts at 0x0, kernel VA space is always placed after | ||
| 436 | 	 * the user VA range. | ||
| 437 | 	 */ | ||
| 438 | 	__u64 user_va_range; | ||
| 439 | }; | ||
| 440 | |||
| 441 | /** | ||
| 442 | * struct drm_panthor_vm_destroy - Arguments passed to DRM_PANTHOR_IOCTL_VM_DESTROY | ||
| 443 | */ | ||
| 444 | struct drm_panthor_vm_destroy { | ||
| 445 | 	/** @id: ID of the VM to destroy. */ | ||
| 446 | 	__u32 id; | ||
| 447 | |||
| 448 | 	/** @pad: MBZ. */ | ||
| 449 | 	__u32 pad; | ||
| 450 | }; | ||
| 451 | |||
| 452 | /** | ||
| 453 | * enum drm_panthor_vm_bind_op_flags - VM bind operation flags | ||
| 454 | */ | ||
| 455 | enum drm_panthor_vm_bind_op_flags { | ||
| 456 | 	/** | ||
| 457 | 	 * @DRM_PANTHOR_VM_BIND_OP_MAP_READONLY: Map the memory read-only. | ||
| 458 | 	 * | ||
| 459 | 	 * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP. | ||
| 460 | 	 */ | ||
| 461 | 	DRM_PANTHOR_VM_BIND_OP_MAP_READONLY = 1 << 0, | ||
| 462 | |||
| 463 | 	/** | ||
| 464 | 	 * @DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC: Map the memory not-executable. | ||
| 465 | 	 * | ||
| 466 | 	 * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP. | ||
| 467 | 	 */ | ||
| 468 | 	DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC = 1 << 1, | ||
| 469 | |||
| 470 | 	/** | ||
| 471 | 	 * @DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED: Map the memory uncached. | ||
| 472 | 	 * | ||
| 473 | 	 * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP. | ||
| 474 | 	 */ | ||
| 475 | 	DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2, | ||
| 476 | |||
| 477 | 	/** | ||
| 478 | 	 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation. | ||
| 479 | 	 */ | ||
| 480 | 	DRM_PANTHOR_VM_BIND_OP_TYPE_MASK = (int)(0xfu << 28), | ||
| 481 | |||
| 482 | 	/** @DRM_PANTHOR_VM_BIND_OP_TYPE_MAP: Map operation. */ | ||
| 483 | 	DRM_PANTHOR_VM_BIND_OP_TYPE_MAP = 0 << 28, | ||
| 484 | |||
| 485 | 	/** @DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP: Unmap operation. */ | ||
| 486 | 	DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP = 1 << 28, | ||
| 487 | |||
| 488 | 	/** | ||
| 489 | 	 * @DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY: No VM operation. | ||
| 490 | 	 * | ||
| 491 | 	 * Just serves as a synchronization point on a VM queue. | ||
| 492 | 	 * | ||
| 493 | 	 * Only valid if %DRM_PANTHOR_VM_BIND_ASYNC is set in drm_panthor_vm_bind::flags, | ||
| 494 | 	 * and drm_panthor_vm_bind_op::syncs contains at least one element. | ||
| 495 | 	 */ | ||
| 496 | 	DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY = 2 << 28, | ||
| 497 | }; | ||
| 498 | |||
| 499 | /** | ||
| 500 | * struct drm_panthor_vm_bind_op - VM bind operation | ||
| 501 | */ | ||
| 502 | struct drm_panthor_vm_bind_op { | ||
| 503 | 	/** @flags: Combination of drm_panthor_vm_bind_op_flags flags. */ | ||
| 504 | 	__u32 flags; | ||
| 505 | |||
| 506 | 	/** | ||
| 507 | 	 * @bo_handle: Handle of the buffer object to map. | ||
| 508 | 	 * MBZ for unmap or sync-only operations. | ||
| 509 | 	 */ | ||
| 510 | 	__u32 bo_handle; | ||
| 511 | |||
| 512 | 	/** | ||
| 513 | 	 * @bo_offset: Buffer object offset. | ||
| 514 | 	 * MBZ for unmap or sync-only operations. | ||
| 515 | 	 */ | ||
| 516 | 	__u64 bo_offset; | ||
| 517 | |||
| 518 | 	/** | ||
| 519 | 	 * @va: Virtual address to map/unmap. | ||
| 520 | 	 * MBZ for sync-only operations. | ||
| 521 | 	 */ | ||
| 522 | 	__u64 va; | ||
| 523 | |||
| 524 | 	/** | ||
| 525 | 	 * @size: Size to map/unmap. | ||
| 526 | 	 * MBZ for sync-only operations. | ||
| 527 | 	 */ | ||
| 528 | 	__u64 size; | ||
| 529 | |||
| 530 | 	/** | ||
| 531 | 	 * @syncs: Array of struct drm_panthor_sync_op synchronization | ||
| 532 | 	 * operations. | ||
| 533 | 	 * | ||
| 534 | 	 * This array must be empty if %DRM_PANTHOR_VM_BIND_ASYNC is not set on | ||
| 535 | 	 * the drm_panthor_vm_bind object containing this VM bind operation. | ||
| 536 | 	 * | ||
| 537 | 	 * This array shall not be empty for sync-only operations. | ||
| 538 | 	 */ | ||
| 539 | 	struct drm_panthor_obj_array syncs; | ||
| 540 | |||
| 541 | }; | ||
| 542 | |||
| 543 | /** | ||
| 544 | * enum drm_panthor_vm_bind_flags - VM bind flags | ||
| 545 | */ | ||
| 546 | enum drm_panthor_vm_bind_flags { | ||
| 547 | 	/** | ||
| 548 | 	 * @DRM_PANTHOR_VM_BIND_ASYNC: VM bind operations are queued to the VM | ||
| 549 | 	 * queue instead of being executed synchronously. | ||
| 550 | 	 */ | ||
| 551 | 	DRM_PANTHOR_VM_BIND_ASYNC = 1 << 0, | ||
| 552 | }; | ||
| 553 | |||
| 554 | /** | ||
| 555 | * struct drm_panthor_vm_bind - Arguments passed to DRM_IOCTL_PANTHOR_VM_BIND | ||
| 556 | */ | ||
| 557 | struct drm_panthor_vm_bind { | ||
| 558 | 	/** @vm_id: VM targeted by the bind request. */ | ||
| 559 | 	__u32 vm_id; | ||
| 560 | |||
| 561 | 	/** @flags: Combination of drm_panthor_vm_bind_flags flags. */ | ||
| 562 | 	__u32 flags; | ||
| 563 | |||
| 564 | 	/** @ops: Array of struct drm_panthor_vm_bind_op bind operations. */ | ||
| 565 | 	struct drm_panthor_obj_array ops; | ||
| 566 | }; | ||
| 567 | |||
| 568 | /** | ||
| 569 | * enum drm_panthor_vm_state - VM states. | ||
| 570 | */ | ||
| 571 | enum drm_panthor_vm_state { | ||
| 572 | 	/** | ||
| 573 | 	 * @DRM_PANTHOR_VM_STATE_USABLE: VM is usable. | ||
| 574 | 	 * | ||
| 575 | 	 * New VM operations will be accepted on this VM. | ||
| 576 | 	 */ | ||
| 577 | 	DRM_PANTHOR_VM_STATE_USABLE, | ||
| 578 | |||
| 579 | 	/** | ||
| 580 | 	 * @DRM_PANTHOR_VM_STATE_UNUSABLE: VM is unusable. | ||
| 581 | 	 * | ||
| 582 | 	 * Something put the VM in an unusable state (like an asynchronous | ||
| 583 | 	 * VM_BIND request failing for any reason). | ||
| 584 | 	 * | ||
| 585 | 	 * Once the VM is in this state, all new MAP operations will be | ||
| 586 | 	 * rejected, and any GPU job targeting this VM will fail. | ||
| 587 | 	 * UNMAP operations are still accepted. | ||
| 588 | 	 * | ||
| 589 | 	 * The only way to recover from an unusable VM is to create a new | ||
| 590 | 	 * VM, and destroy the old one. | ||
| 591 | 	 */ | ||
| 592 | 	DRM_PANTHOR_VM_STATE_UNUSABLE, | ||
| 593 | }; | ||
| 594 | |||
| 595 | /** | ||
| 596 | * struct drm_panthor_vm_get_state - Get VM state. | ||
| 597 | */ | ||
| 598 | struct drm_panthor_vm_get_state { | ||
| 599 | 	/** @vm_id: VM targeted by the get_state request. */ | ||
| 600 | 	__u32 vm_id; | ||
| 601 | |||
| 602 | 	/** | ||
| 603 | 	 * @state: state returned by the driver. | ||
| 604 | 	 * | ||
| 605 | 	 * Must be one of the enum drm_panthor_vm_state values. | ||
| 606 | 	 */ | ||
| 607 | 	__u32 state; | ||
| 608 | }; | ||
| 609 | |||
| 610 | /** | ||
| 611 | * enum drm_panthor_bo_flags - Buffer object flags, passed at creation time. | ||
| 612 | */ | ||
| 613 | enum drm_panthor_bo_flags { | ||
| 614 | 	/** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */ | ||
| 615 | 	DRM_PANTHOR_BO_NO_MMAP = (1 << 0), | ||
| 616 | }; | ||
| 617 | |||
| 618 | /** | ||
| 619 | * struct drm_panthor_bo_create - Arguments passed to DRM_IOCTL_PANTHOR_BO_CREATE. | ||
| 620 | */ | ||
| 621 | struct drm_panthor_bo_create { | ||
| 622 | 	/** | ||
| 623 | 	 * @size: Requested size for the object | ||
| 624 | 	 * | ||
| 625 | 	 * The (page-aligned) allocated size for the object will be returned. | ||
| 626 | 	 */ | ||
| 627 | 	__u64 size; | ||
| 628 | |||
| 629 | 	/** | ||
| 630 | 	 * @flags: Flags. Must be a combination of drm_panthor_bo_flags flags. | ||
| 631 | 	 */ | ||
| 632 | 	__u32 flags; | ||
| 633 | |||
| 634 | 	/** | ||
| 635 | 	 * @exclusive_vm_id: Exclusive VM this buffer object will be mapped to. | ||
| 636 | 	 * | ||
| 637 | 	 * If not zero, the field must refer to a valid VM ID, and implies that: | ||
| 638 | 	 * - the buffer object will only ever be bound to that VM | ||
| 639 | 	 * - cannot be exported as a PRIME fd | ||
| 640 | 	 */ | ||
| 641 | 	__u32 exclusive_vm_id; | ||
| 642 | |||
| 643 | 	/** | ||
| 644 | 	 * @handle: Returned handle for the object. | ||
| 645 | 	 * | ||
| 646 | 	 * Object handles are nonzero. | ||
| 647 | 	 */ | ||
| 648 | 	__u32 handle; | ||
| 649 | |||
| 650 | 	/** @pad: MBZ. */ | ||
| 651 | 	__u32 pad; | ||
| 652 | }; | ||
| 653 | |||
| 654 | /** | ||
| 655 | * struct drm_panthor_bo_mmap_offset - Arguments passed to DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET. | ||
| 656 | */ | ||
| 657 | struct drm_panthor_bo_mmap_offset { | ||
| 658 | 	/** @handle: Handle of the object we want an mmap offset for. */ | ||
| 659 | 	__u32 handle; | ||
| 660 | |||
| 661 | 	/** @pad: MBZ. */ | ||
| 662 | 	__u32 pad; | ||
| 663 | |||
| 664 | 	/** @offset: The fake offset to use for subsequent mmap calls. */ | ||
| 665 | 	__u64 offset; | ||
| 666 | }; | ||
| 667 | |||
| 668 | /** | ||
| 669 | * struct drm_panthor_queue_create - Queue creation arguments. | ||
| 670 | */ | ||
| 671 | struct drm_panthor_queue_create { | ||
| 672 | 	/** | ||
| 673 | 	 * @priority: Defines the priority of queues inside a group. Goes from 0 to 15, | ||
| 674 | 	 * 15 being the highest priority. | ||
| 675 | 	 */ | ||
| 676 | 	__u8 priority; | ||
| 677 | |||
| 678 | 	/** @pad: Padding fields, MBZ. */ | ||
| 679 | 	__u8 pad[3]; | ||
| 680 | |||
| 681 | 	/** @ringbuf_size: Size of the ring buffer to allocate to this queue. */ | ||
| 682 | 	__u32 ringbuf_size; | ||
| 683 | }; | ||
| 684 | |||
| 685 | /** | ||
| 686 | * enum drm_panthor_group_priority - Scheduling group priority | ||
| 687 | */ | ||
| 688 | enum drm_panthor_group_priority { | ||
| 689 | 	/** @PANTHOR_GROUP_PRIORITY_LOW: Low priority group. */ | ||
| 690 | 	PANTHOR_GROUP_PRIORITY_LOW = 0, | ||
| 691 | |||
| 692 | 	/** @PANTHOR_GROUP_PRIORITY_MEDIUM: Medium priority group. */ | ||
| 693 | 	PANTHOR_GROUP_PRIORITY_MEDIUM, | ||
| 694 | |||
| 695 | 	/** @PANTHOR_GROUP_PRIORITY_HIGH: High priority group. */ | ||
| 696 | 	PANTHOR_GROUP_PRIORITY_HIGH, | ||
| 697 | }; | ||
| 698 | |||
| 699 | /** | ||
| 700 | * struct drm_panthor_group_create - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_CREATE | ||
| 701 | */ | ||
| 702 | struct drm_panthor_group_create { | ||
| 703 | 	/** @queues: Array of drm_panthor_queue_create elements. */ | ||
| 704 | 	struct drm_panthor_obj_array queues; | ||
| 705 | |||
| 706 | 	/** | ||
| 707 | 	 * @max_compute_cores: Maximum number of cores that can be used by compute | ||
| 708 | 	 * jobs across CS queues bound to this group. | ||
| 709 | 	 * | ||
| 710 | 	 * Must be less or equal to the number of bits set in @compute_core_mask. | ||
| 711 | 	 */ | ||
| 712 | 	__u8 max_compute_cores; | ||
| 713 | |||
| 714 | 	/** | ||
| 715 | 	 * @max_fragment_cores: Maximum number of cores that can be used by fragment | ||
| 716 | 	 * jobs across CS queues bound to this group. | ||
| 717 | 	 * | ||
| 718 | 	 * Must be less or equal to the number of bits set in @fragment_core_mask. | ||
| 719 | 	 */ | ||
| 720 | 	__u8 max_fragment_cores; | ||
| 721 | |||
| 722 | 	/** | ||
| 723 | 	 * @max_tiler_cores: Maximum number of tilers that can be used by tiler jobs | ||
| 724 | 	 * across CS queues bound to this group. | ||
| 725 | 	 * | ||
| 726 | 	 * Must be less or equal to the number of bits set in @tiler_core_mask. | ||
| 727 | 	 */ | ||
| 728 | 	__u8 max_tiler_cores; | ||
| 729 | |||
| 730 | 	/** @priority: Group priority (see enum drm_panthor_group_priority). */ | ||
| 731 | 	__u8 priority; | ||
| 732 | |||
| 733 | 	/** @pad: Padding field, MBZ. */ | ||
| 734 | 	__u32 pad; | ||
| 735 | |||
| 736 | 	/** | ||
| 737 | 	 * @compute_core_mask: Mask encoding cores that can be used for compute jobs. | ||
| 738 | 	 * | ||
| 739 | 	 * This field must have at least @max_compute_cores bits set. | ||
| 740 | 	 * | ||
| 741 | 	 * The bits set here should also be set in drm_panthor_gpu_info::shader_present. | ||
| 742 | 	 */ | ||
| 743 | 	__u64 compute_core_mask; | ||
| 744 | |||
| 745 | 	/** | ||
| 746 | 	 * @fragment_core_mask: Mask encoding cores that can be used for fragment jobs. | ||
| 747 | 	 * | ||
| 748 | 	 * This field must have at least @max_fragment_cores bits set. | ||
| 749 | 	 * | ||
| 750 | 	 * The bits set here should also be set in drm_panthor_gpu_info::shader_present. | ||
| 751 | 	 */ | ||
| 752 | 	__u64 fragment_core_mask; | ||
| 753 | |||
| 754 | 	/** | ||
| 755 | 	 * @tiler_core_mask: Mask encoding cores that can be used for tiler jobs. | ||
| 756 | 	 * | ||
| 757 | 	 * This field must have at least @max_tiler_cores bits set. | ||
| 758 | 	 * | ||
| 759 | 	 * The bits set here should also be set in drm_panthor_gpu_info::tiler_present. | ||
| 760 | 	 */ | ||
| 761 | 	__u64 tiler_core_mask; | ||
| 762 | |||
| 763 | 	/** | ||
| 764 | 	 * @vm_id: VM ID to bind this group to. | ||
| 765 | 	 * | ||
| 766 | 	 * All submission to queues bound to this group will use this VM. | ||
| 767 | 	 */ | ||
| 768 | 	__u32 vm_id; | ||
| 769 | |||
| 770 | 	/** | ||
| 771 | 	 * @group_handle: Returned group handle. Passed back when submitting jobs or | ||
| 772 | 	 * destroying a group. | ||
| 773 | 	 */ | ||
| 774 | 	__u32 group_handle; | ||
| 775 | }; | ||
| 776 | |||
| 777 | /** | ||
| 778 | * struct drm_panthor_group_destroy - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_DESTROY | ||
| 779 | */ | ||
| 780 | struct drm_panthor_group_destroy { | ||
| 781 | 	/** @group_handle: Group to destroy */ | ||
| 782 | 	__u32 group_handle; | ||
| 783 | |||
| 784 | 	/** @pad: Padding field, MBZ. */ | ||
| 785 | 	__u32 pad; | ||
| 786 | }; | ||
| 787 | |||
| 788 | /** | ||
| 789 | * struct drm_panthor_queue_submit - Job submission arguments. | ||
| 790 | * | ||
| 791 | * This is describing the userspace command stream to call from the kernel | ||
| 792 | * command stream ring-buffer. Queue submission is always part of a group | ||
| 793 | * submission, taking one or more jobs to submit to the underlying queues. | ||
| 794 | */ | ||
| 795 | struct drm_panthor_queue_submit { | ||
| 796 | 	/** @queue_index: Index of the queue inside a group. */ | ||
| 797 | 	__u32 queue_index; | ||
| 798 | |||
| 799 | 	/** | ||
| 800 | 	 * @stream_size: Size of the command stream to execute. | ||
| 801 | 	 * | ||
| 802 | 	 * Must be 64-bit/8-byte aligned (the size of a CS instruction) | ||
| 803 | 	 * | ||
| 804 | 	 * Can be zero if stream_addr is zero too. | ||
| 805 | 	 * | ||
| 806 | 	 * When the stream size is zero, the queue submit serves as a | ||
| 807 | 	 * synchronization point. | ||
| 808 | 	 */ | ||
| 809 | 	__u32 stream_size; | ||
| 810 | |||
| 811 | 	/** | ||
| 812 | 	 * @stream_addr: GPU address of the command stream to execute. | ||
| 813 | 	 * | ||
| 814 | 	 * Must be aligned on 64-byte. | ||
| 815 | 	 * | ||
| 816 | 	 * Can be zero is stream_size is zero too. | ||
| 817 | 	 */ | ||
| 818 | 	__u64 stream_addr; | ||
| 819 | |||
| 820 | 	/** | ||
| 821 | 	 * @latest_flush: FLUSH_ID read at the time the stream was built. | ||
| 822 | 	 * | ||
| 823 | 	 * This allows cache flush elimination for the automatic | ||
| 824 | 	 * flush+invalidate(all) done at submission time, which is needed to | ||
| 825 | 	 * ensure the GPU doesn't get garbage when reading the indirect command | ||
| 826 | 	 * stream buffers. If you want the cache flush to happen | ||
| 827 | 	 * unconditionally, pass a zero here. | ||
| 828 | 	 * | ||
| 829 | 	 * Ignored when stream_size is zero. | ||
| 830 | 	 */ | ||
| 831 | 	__u32 latest_flush; | ||
| 832 | |||
| 833 | 	/** @pad: MBZ. */ | ||
| 834 | 	__u32 pad; | ||
| 835 | |||
| 836 | 	/** @syncs: Array of struct drm_panthor_sync_op sync operations. */ | ||
| 837 | 	struct drm_panthor_obj_array syncs; | ||
| 838 | }; | ||
| 839 | |||
| 840 | /** | ||
| 841 | * struct drm_panthor_group_submit - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_SUBMIT | ||
| 842 | */ | ||
| 843 | struct drm_panthor_group_submit { | ||
| 844 | 	/** @group_handle: Handle of the group to queue jobs to. */ | ||
| 845 | 	__u32 group_handle; | ||
| 846 | |||
| 847 | 	/** @pad: MBZ. */ | ||
| 848 | 	__u32 pad; | ||
| 849 | |||
| 850 | 	/** @queue_submits: Array of drm_panthor_queue_submit objects. */ | ||
| 851 | 	struct drm_panthor_obj_array queue_submits; | ||
| 852 | }; | ||
| 853 | |||
| 854 | /** | ||
| 855 | * enum drm_panthor_group_state_flags - Group state flags | ||
| 856 | */ | ||
| 857 | enum drm_panthor_group_state_flags { | ||
| 858 | 	/** | ||
| 859 | 	 * @DRM_PANTHOR_GROUP_STATE_TIMEDOUT: Group had unfinished jobs. | ||
| 860 | 	 * | ||
| 861 | 	 * When a group ends up with this flag set, no jobs can be submitted to its queues. | ||
| 862 | 	 */ | ||
| 863 | 	DRM_PANTHOR_GROUP_STATE_TIMEDOUT = 1 << 0, | ||
| 864 | |||
| 865 | 	/** | ||
| 866 | 	 * @DRM_PANTHOR_GROUP_STATE_FATAL_FAULT: Group had fatal faults. | ||
| 867 | 	 * | ||
| 868 | 	 * When a group ends up with this flag set, no jobs can be submitted to its queues. | ||
| 869 | 	 */ | ||
| 870 | 	DRM_PANTHOR_GROUP_STATE_FATAL_FAULT = 1 << 1, | ||
| 871 | }; | ||
| 872 | |||
| 873 | /** | ||
| 874 | * struct drm_panthor_group_get_state - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_GET_STATE | ||
| 875 | * | ||
| 876 | * Used to query the state of a group and decide whether a new group should be created to | ||
| 877 | * replace it. | ||
| 878 | */ | ||
| 879 | struct drm_panthor_group_get_state { | ||
| 880 | 	/** @group_handle: Handle of the group to query state on */ | ||
| 881 | 	__u32 group_handle; | ||
| 882 | |||
| 883 | 	/** | ||
| 884 | 	 * @state: Combination of DRM_PANTHOR_GROUP_STATE_* flags encoding the | ||
| 885 | 	 * group state. | ||
| 886 | 	 */ | ||
| 887 | 	__u32 state; | ||
| 888 | |||
| 889 | 	/** @fatal_queues: Bitmask of queues that faced fatal faults. */ | ||
| 890 | 	__u32 fatal_queues; | ||
| 891 | |||
| 892 | 	/** @pad: MBZ */ | ||
| 893 | 	__u32 pad; | ||
| 894 | }; | ||
| 895 | |||
| 896 | /** | ||
| 897 | * struct drm_panthor_tiler_heap_create - Arguments passed to DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE | ||
| 898 | */ | ||
| 899 | struct drm_panthor_tiler_heap_create { | ||
| 900 | 	/** @vm_id: VM ID the tiler heap should be mapped to */ | ||
| 901 | 	__u32 vm_id; | ||
| 902 | |||
| 903 | 	/** @initial_chunk_count: Initial number of chunks to allocate. Must be at least one. */ | ||
| 904 | 	__u32 initial_chunk_count; | ||
| 905 | |||
| 906 | 	/** | ||
| 907 | 	 * @chunk_size: Chunk size. | ||
| 908 | 	 * | ||
| 909 | 	 * Must be page-aligned and lie in the [128k:8M] range. | ||
| 910 | 	 */ | ||
| 911 | 	__u32 chunk_size; | ||
| 912 | |||
| 913 | 	/** | ||
| 914 | 	 * @max_chunks: Maximum number of chunks that can be allocated. | ||
| 915 | 	 * | ||
| 916 | 	 * Must be at least @initial_chunk_count. | ||
| 917 | 	 */ | ||
| 918 | 	__u32 max_chunks; | ||
| 919 | |||
| 920 | 	/** | ||
| 921 | 	 * @target_in_flight: Maximum number of in-flight render passes. | ||
| 922 | 	 * | ||
| 923 | 	 * If the heap has more than tiler jobs in-flight, the FW will wait for render | ||
| 924 | 	 * passes to finish before queuing new tiler jobs. | ||
| 925 | 	 */ | ||
| 926 | 	__u32 target_in_flight; | ||
| 927 | |||
| 928 | 	/** @handle: Returned heap handle. Passed back to DESTROY_TILER_HEAP. */ | ||
| 929 | 	__u32 handle; | ||
| 930 | |||
| 931 | 	/** @tiler_heap_ctx_gpu_va: Returned heap GPU virtual address returned */ | ||
| 932 | 	__u64 tiler_heap_ctx_gpu_va; | ||
| 933 | |||
| 934 | 	/** | ||
| 935 | 	 * @first_heap_chunk_gpu_va: First heap chunk. | ||
| 936 | 	 * | ||
| 937 | 	 * The tiler heap is formed of heap chunks forming a single-link list. This | ||
| 938 | 	 * is the first element in the list. | ||
| 939 | 	 */ | ||
| 940 | 	__u64 first_heap_chunk_gpu_va; | ||
| 941 | }; | ||
| 942 | |||
| 943 | /** | ||
| 944 | * struct drm_panthor_tiler_heap_destroy - Arguments passed to DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY | ||
| 945 | */ | ||
| 946 | struct drm_panthor_tiler_heap_destroy { | ||
| 947 | 	/** | ||
| 948 | 	 * @handle: Handle of the tiler heap to destroy. | ||
| 949 | 	 * | ||
| 950 | 	 * Must be a valid heap handle returned by DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE. | ||
| 951 | 	 */ | ||
| 952 | 	__u32 handle; | ||
| 953 | |||
| 954 | 	/** @pad: Padding field, MBZ. */ | ||
| 955 | 	__u32 pad; | ||
| 956 | }; | ||
| 957 | |||
| 958 | #if defined(__cplusplus) | ||
| 959 | } | ||
| 960 | #endif | ||
| 961 | |||
| 962 | #endif /* _PANTHOR_DRM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/pvr_drm.h created+1295| ... | @@ -0,0 +1,1295 @@ | ||
| 1 | /* SPDX-License-Identifier: (GPL-2.0-only WITH Linux-syscall-note) OR MIT */ | ||
| 2 | /* Copyright (c) 2023 Imagination Technologies Ltd. */ | ||
| 3 | |||
| 4 | #ifndef PVR_DRM_UAPI_H | ||
| 5 | #define PVR_DRM_UAPI_H | ||
| 6 | |||
| 7 | #include "drm.h" | ||
| 8 | |||
| 9 | #include <linux/const.h> | ||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | #if defined(__cplusplus) | ||
| 13 | extern "C" { | ||
| 14 | #endif | ||
| 15 | |||
| 16 | /** | ||
| 17 | * DOC: PowerVR UAPI | ||
| 18 | * | ||
| 19 | * The PowerVR IOCTL argument structs have a few limitations in place, in | ||
| 20 | * addition to the standard kernel restrictions: | ||
| 21 | * | ||
| 22 | * - All members must be type-aligned. | ||
| 23 | * - The overall struct must be padded to 64-bit alignment. | ||
| 24 | * - Explicit padding is almost always required. This takes the form of | ||
| 25 | * ``_padding_[x]`` members of sufficient size to pad to the next power-of-two | ||
| 26 | * alignment, where [x] is the offset into the struct in hexadecimal. Arrays | ||
| 27 | * are never used for alignment. Padding fields must be zeroed; this is | ||
| 28 | * always checked. | ||
| 29 | * - Unions may only appear as the last member of a struct. | ||
| 30 | * - Individual union members may grow in the future. The space between the | ||
| 31 | * end of a union member and the end of its containing union is considered | ||
| 32 | * "implicit padding" and must be zeroed. This is always checked. | ||
| 33 | * | ||
| 34 | * In addition to the IOCTL argument structs, the PowerVR UAPI makes use of | ||
| 35 | * DEV_QUERY argument structs. These are used to fetch information about the | ||
| 36 | * device and runtime. These structs are subject to the same rules set out | ||
| 37 | * above. | ||
| 38 | */ | ||
| 39 | |||
| 40 | /** | ||
| 41 | * struct drm_pvr_obj_array - Container used to pass arrays of objects | ||
| 42 | * | ||
| 43 | * It is not unusual to have to extend objects to pass new parameters, and the DRM | ||
| 44 | * ioctl infrastructure is supporting that by padding ioctl arguments with zeros | ||
| 45 | * when the data passed by userspace is smaller than the struct defined in the | ||
| 46 | * drm_ioctl_desc, thus keeping things backward compatible. This type is just | ||
| 47 | * applying the same concepts to indirect objects passed through arrays referenced | ||
| 48 | * from the main ioctl arguments structure: the stride basically defines the size | ||
| 49 | * of the object passed by userspace, which allows the kernel driver to pad with | ||
| 50 | * zeros when it's smaller than the size of the object it expects. | ||
| 51 | * | ||
| 52 | * Use ``DRM_PVR_OBJ_ARRAY()`` to fill object array fields, unless you | ||
| 53 | * have a very good reason not to. | ||
| 54 | */ | ||
| 55 | struct drm_pvr_obj_array { | ||
| 56 | 	/** @stride: Stride of object struct. Used for versioning. */ | ||
| 57 | 	__u32 stride; | ||
| 58 | |||
| 59 | 	/** @count: Number of objects in the array. */ | ||
| 60 | 	__u32 count; | ||
| 61 | |||
| 62 | 	/** @array: User pointer to an array of objects. */ | ||
| 63 | 	__u64 array; | ||
| 64 | }; | ||
| 65 | |||
| 66 | /** | ||
| 67 | * DRM_PVR_OBJ_ARRAY() - Helper macro for filling &struct drm_pvr_obj_array. | ||
| 68 | * @cnt: Number of elements pointed to py @ptr. | ||
| 69 | * @ptr: Pointer to start of a C array. | ||
| 70 | * | ||
| 71 | * Return: Literal of type &struct drm_pvr_obj_array. | ||
| 72 | */ | ||
| 73 | #define DRM_PVR_OBJ_ARRAY(cnt, ptr) \ | ||
| 74 | 	{ .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) } | ||
| 75 | |||
| 76 | /** | ||
| 77 | * DOC: PowerVR IOCTL interface | ||
| 78 | */ | ||
| 79 | |||
| 80 | /** | ||
| 81 | * PVR_IOCTL() - Build a PowerVR IOCTL number | ||
| 82 | * @_ioctl: An incrementing id for this IOCTL. Added to %DRM_COMMAND_BASE. | ||
| 83 | * @_mode: Must be one of %DRM_IOR, %DRM_IOW or %DRM_IOWR. | ||
| 84 | * @_data: The type of the args struct passed by this IOCTL. | ||
| 85 | * | ||
| 86 | * The struct referred to by @_data must have a ``drm_pvr_ioctl_`` prefix and an | ||
| 87 | * ``_args suffix``. They are therefore omitted from @_data. | ||
| 88 | * | ||
| 89 | * This should only be used to build the constants described below; it should | ||
| 90 | * never be used to call an IOCTL directly. | ||
| 91 | * | ||
| 92 | * Return: An IOCTL number to be passed to ioctl() from userspace. | ||
| 93 | */ | ||
| 94 | #define PVR_IOCTL(_ioctl, _mode, _data) \ | ||
| 95 | 	_mode(DRM_COMMAND_BASE + (_ioctl), struct drm_pvr_ioctl_##_data##_args) | ||
| 96 | |||
| 97 | #define DRM_IOCTL_PVR_DEV_QUERY PVR_IOCTL(0x00, DRM_IOWR, dev_query) | ||
| 98 | #define DRM_IOCTL_PVR_CREATE_BO PVR_IOCTL(0x01, DRM_IOWR, create_bo) | ||
| 99 | #define DRM_IOCTL_PVR_GET_BO_MMAP_OFFSET PVR_IOCTL(0x02, DRM_IOWR, get_bo_mmap_offset) | ||
| 100 | #define DRM_IOCTL_PVR_CREATE_VM_CONTEXT PVR_IOCTL(0x03, DRM_IOWR, create_vm_context) | ||
| 101 | #define DRM_IOCTL_PVR_DESTROY_VM_CONTEXT PVR_IOCTL(0x04, DRM_IOW, destroy_vm_context) | ||
| 102 | #define DRM_IOCTL_PVR_VM_MAP PVR_IOCTL(0x05, DRM_IOW, vm_map) | ||
| 103 | #define DRM_IOCTL_PVR_VM_UNMAP PVR_IOCTL(0x06, DRM_IOW, vm_unmap) | ||
| 104 | #define DRM_IOCTL_PVR_CREATE_CONTEXT PVR_IOCTL(0x07, DRM_IOWR, create_context) | ||
| 105 | #define DRM_IOCTL_PVR_DESTROY_CONTEXT PVR_IOCTL(0x08, DRM_IOW, destroy_context) | ||
| 106 | #define DRM_IOCTL_PVR_CREATE_FREE_LIST PVR_IOCTL(0x09, DRM_IOWR, create_free_list) | ||
| 107 | #define DRM_IOCTL_PVR_DESTROY_FREE_LIST PVR_IOCTL(0x0a, DRM_IOW, destroy_free_list) | ||
| 108 | #define DRM_IOCTL_PVR_CREATE_HWRT_DATASET PVR_IOCTL(0x0b, DRM_IOWR, create_hwrt_dataset) | ||
| 109 | #define DRM_IOCTL_PVR_DESTROY_HWRT_DATASET PVR_IOCTL(0x0c, DRM_IOW, destroy_hwrt_dataset) | ||
| 110 | #define DRM_IOCTL_PVR_SUBMIT_JOBS PVR_IOCTL(0x0d, DRM_IOW, submit_jobs) | ||
| 111 | |||
| 112 | /** | ||
| 113 | * DOC: PowerVR IOCTL DEV_QUERY interface | ||
| 114 | */ | ||
| 115 | |||
| 116 | /** | ||
| 117 | * struct drm_pvr_dev_query_gpu_info - Container used to fetch information about | ||
| 118 | * the graphics processor. | ||
| 119 | * | ||
| 120 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 121 | * to %DRM_PVR_DEV_QUERY_GPU_INFO_GET. | ||
| 122 | */ | ||
| 123 | struct drm_pvr_dev_query_gpu_info { | ||
| 124 | 	/** | ||
| 125 | 	 * @gpu_id: GPU identifier. | ||
| 126 | 	 * | ||
| 127 | 	 * For all currently supported GPUs this is the BVNC encoded as a 64-bit | ||
| 128 | 	 * value as follows: | ||
| 129 | 	 * | ||
| 130 | 	 * +--------+--------+--------+-------+ | ||
| 131 | 	 * | 63..48 | 47..32 | 31..16 | 15..0 | | ||
| 132 | 	 * +========+========+========+=======+ | ||
| 133 | 	 * | B | V | N | C | | ||
| 134 | 	 * +--------+--------+--------+-------+ | ||
| 135 | 	 */ | ||
| 136 | 	__u64 gpu_id; | ||
| 137 | |||
| 138 | 	/** | ||
| 139 | 	 * @num_phantoms: Number of Phantoms present. | ||
| 140 | 	 */ | ||
| 141 | 	__u32 num_phantoms; | ||
| 142 | |||
| 143 | 	/** @_padding_c: Reserved. This field must be zeroed. */ | ||
| 144 | 	__u32 _padding_c; | ||
| 145 | }; | ||
| 146 | |||
| 147 | /** | ||
| 148 | * struct drm_pvr_dev_query_runtime_info - Container used to fetch information | ||
| 149 | * about the graphics runtime. | ||
| 150 | * | ||
| 151 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 152 | * to %DRM_PVR_DEV_QUERY_RUNTIME_INFO_GET. | ||
| 153 | */ | ||
| 154 | struct drm_pvr_dev_query_runtime_info { | ||
| 155 | 	/** | ||
| 156 | 	 * @free_list_min_pages: Minimum allowed free list size, | ||
| 157 | 	 * in PM physical pages. | ||
| 158 | 	 */ | ||
| 159 | 	__u64 free_list_min_pages; | ||
| 160 | |||
| 161 | 	/** | ||
| 162 | 	 * @free_list_max_pages: Maximum allowed free list size, | ||
| 163 | 	 * in PM physical pages. | ||
| 164 | 	 */ | ||
| 165 | 	__u64 free_list_max_pages; | ||
| 166 | |||
| 167 | 	/** | ||
| 168 | 	 * @common_store_alloc_region_size: Size of the Allocation | ||
| 169 | 	 * Region within the Common Store used for coefficient and shared | ||
| 170 | 	 * registers, in dwords. | ||
| 171 | 	 */ | ||
| 172 | 	__u32 common_store_alloc_region_size; | ||
| 173 | |||
| 174 | 	/** | ||
| 175 | 	 * @common_store_partition_space_size: Size of the | ||
| 176 | 	 * Partition Space within the Common Store for output buffers, in | ||
| 177 | 	 * dwords. | ||
| 178 | 	 */ | ||
| 179 | 	__u32 common_store_partition_space_size; | ||
| 180 | |||
| 181 | 	/** | ||
| 182 | 	 * @max_coeffs: Maximum coefficients, in dwords. | ||
| 183 | 	 */ | ||
| 184 | 	__u32 max_coeffs; | ||
| 185 | |||
| 186 | 	/** | ||
| 187 | 	 * @cdm_max_local_mem_size_regs: Maximum amount of local | ||
| 188 | 	 * memory available to a compute kernel, in dwords. | ||
| 189 | 	 */ | ||
| 190 | 	__u32 cdm_max_local_mem_size_regs; | ||
| 191 | }; | ||
| 192 | |||
| 193 | /** | ||
| 194 | * struct drm_pvr_dev_query_quirks - Container used to fetch information about | ||
| 195 | * hardware fixes for which the device may require support in the user mode | ||
| 196 | * driver. | ||
| 197 | * | ||
| 198 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 199 | * to %DRM_PVR_DEV_QUERY_QUIRKS_GET. | ||
| 200 | */ | ||
| 201 | struct drm_pvr_dev_query_quirks { | ||
| 202 | 	/** | ||
| 203 | 	 * @quirks: A userspace address for the hardware quirks __u32 array. | ||
| 204 | 	 * | ||
| 205 | 	 * The first @musthave_count items in the list are quirks that the | ||
| 206 | 	 * client must support for this device. If userspace does not support | ||
| 207 | 	 * all these quirks then functionality is not guaranteed and client | ||
| 208 | 	 * initialisation must fail. | ||
| 209 | 	 * The remaining quirks in the list affect userspace and the kernel or | ||
| 210 | 	 * firmware. They are disabled by default and require userspace to | ||
| 211 | 	 * opt-in. The opt-in mechanism depends on the quirk. | ||
| 212 | 	 */ | ||
| 213 | 	__u64 quirks; | ||
| 214 | |||
| 215 | 	/** @count: Length of @quirks (number of __u32). */ | ||
| 216 | 	__u16 count; | ||
| 217 | |||
| 218 | 	/** | ||
| 219 | 	 * @musthave_count: The number of entries in @quirks that are | ||
| 220 | 	 * mandatory, starting at index 0. | ||
| 221 | 	 */ | ||
| 222 | 	__u16 musthave_count; | ||
| 223 | |||
| 224 | 	/** @_padding_c: Reserved. This field must be zeroed. */ | ||
| 225 | 	__u32 _padding_c; | ||
| 226 | }; | ||
| 227 | |||
| 228 | /** | ||
| 229 | * struct drm_pvr_dev_query_enhancements - Container used to fetch information | ||
| 230 | * about optional enhancements supported by the device that require support in | ||
| 231 | * the user mode driver. | ||
| 232 | * | ||
| 233 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 234 | * to %DRM_PVR_DEV_ENHANCEMENTS_GET. | ||
| 235 | */ | ||
| 236 | struct drm_pvr_dev_query_enhancements { | ||
| 237 | 	/** | ||
| 238 | 	 * @enhancements: A userspace address for the hardware enhancements | ||
| 239 | 	 * __u32 array. | ||
| 240 | 	 * | ||
| 241 | 	 * These enhancements affect userspace and the kernel or firmware. They | ||
| 242 | 	 * are disabled by default and require userspace to opt-in. The opt-in | ||
| 243 | 	 * mechanism depends on the enhancement. | ||
| 244 | 	 */ | ||
| 245 | 	__u64 enhancements; | ||
| 246 | |||
| 247 | 	/** @count: Length of @enhancements (number of __u32). */ | ||
| 248 | 	__u16 count; | ||
| 249 | |||
| 250 | 	/** @_padding_a: Reserved. This field must be zeroed. */ | ||
| 251 | 	__u16 _padding_a; | ||
| 252 | |||
| 253 | 	/** @_padding_c: Reserved. This field must be zeroed. */ | ||
| 254 | 	__u32 _padding_c; | ||
| 255 | }; | ||
| 256 | |||
| 257 | /** | ||
| 258 | * enum drm_pvr_heap_id - Array index for heap info data returned by | ||
| 259 | * %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 260 | * | ||
| 261 | * For compatibility reasons all indices will be present in the returned array, | ||
| 262 | * however some heaps may not be present. These are indicated where | ||
| 263 | * &struct drm_pvr_heap.size is set to zero. | ||
| 264 | */ | ||
| 265 | enum drm_pvr_heap_id { | ||
| 266 | 	/** @DRM_PVR_HEAP_GENERAL: General purpose heap. */ | ||
| 267 | 	DRM_PVR_HEAP_GENERAL = 0, | ||
| 268 | 	/** @DRM_PVR_HEAP_PDS_CODE_DATA: PDS code and data heap. */ | ||
| 269 | 	DRM_PVR_HEAP_PDS_CODE_DATA, | ||
| 270 | 	/** @DRM_PVR_HEAP_USC_CODE: USC code heap. */ | ||
| 271 | 	DRM_PVR_HEAP_USC_CODE, | ||
| 272 | 	/** @DRM_PVR_HEAP_RGNHDR: Region header heap. Only used if GPU has BRN63142. */ | ||
| 273 | 	DRM_PVR_HEAP_RGNHDR, | ||
| 274 | 	/** @DRM_PVR_HEAP_VIS_TEST: Visibility test heap. */ | ||
| 275 | 	DRM_PVR_HEAP_VIS_TEST, | ||
| 276 | 	/** @DRM_PVR_HEAP_TRANSFER_FRAG: Transfer fragment heap. */ | ||
| 277 | 	DRM_PVR_HEAP_TRANSFER_FRAG, | ||
| 278 | |||
| 279 | 	/** | ||
| 280 | 	 * @DRM_PVR_HEAP_COUNT: The number of heaps returned by | ||
| 281 | 	 * %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 282 | 	 * | ||
| 283 | 	 * More heaps may be added, so this also serves as the copy limit when | ||
| 284 | 	 * sent by the caller. | ||
| 285 | 	 */ | ||
| 286 | 	DRM_PVR_HEAP_COUNT | ||
| 287 | 	/* Please only add additional heaps above DRM_PVR_HEAP_COUNT! */ | ||
| 288 | }; | ||
| 289 | |||
| 290 | /** | ||
| 291 | * struct drm_pvr_heap - Container holding information about a single heap. | ||
| 292 | * | ||
| 293 | * This will always be fetched as an array. | ||
| 294 | */ | ||
| 295 | struct drm_pvr_heap { | ||
| 296 | 	/** @base: Base address of heap. */ | ||
| 297 | 	__u64 base; | ||
| 298 | |||
| 299 | 	/** @size: Size of heap, in bytes. Will be 0 if the heap is not present. */ | ||
| 300 | 	__u64 size; | ||
| 301 | |||
| 302 | 	/** @flags: Flags for this heap. Currently always 0. */ | ||
| 303 | 	__u32 flags; | ||
| 304 | |||
| 305 | 	/** @page_size_log2: Log2 of page size. */ | ||
| 306 | 	__u32 page_size_log2; | ||
| 307 | }; | ||
| 308 | |||
| 309 | /** | ||
| 310 | * struct drm_pvr_dev_query_heap_info - Container used to fetch information | ||
| 311 | * about heaps supported by the device driver. | ||
| 312 | * | ||
| 313 | * Please note all driver-supported heaps will be returned up to &heaps.count. | ||
| 314 | * Some heaps will not be present in all devices, which will be indicated by | ||
| 315 | * &struct drm_pvr_heap.size being set to zero. | ||
| 316 | * | ||
| 317 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 318 | * to %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 319 | */ | ||
| 320 | struct drm_pvr_dev_query_heap_info { | ||
| 321 | 	/** | ||
| 322 | 	 * @heaps: Array of &struct drm_pvr_heap. If pointer is NULL, the count | ||
| 323 | 	 * and stride will be updated with those known to the driver version, to | ||
| 324 | 	 * facilitate allocation by the caller. | ||
| 325 | 	 */ | ||
| 326 | 	struct drm_pvr_obj_array heaps; | ||
| 327 | }; | ||
| 328 | |||
| 329 | /** | ||
| 330 | * enum drm_pvr_static_data_area_usage - Array index for static data area info | ||
| 331 | * returned by %DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET. | ||
| 332 | * | ||
| 333 | * For compatibility reasons all indices will be present in the returned array, | ||
| 334 | * however some areas may not be present. These are indicated where | ||
| 335 | * &struct drm_pvr_static_data_area.size is set to zero. | ||
| 336 | */ | ||
| 337 | enum drm_pvr_static_data_area_usage { | ||
| 338 | 	/** | ||
| 339 | 	 * @DRM_PVR_STATIC_DATA_AREA_EOT: End of Tile PDS program code segment. | ||
| 340 | 	 * | ||
| 341 | 	 * The End of Tile PDS task runs at completion of a tile during a fragment job, and is | ||
| 342 | 	 * responsible for emitting the tile to the Pixel Back End. | ||
| 343 | 	 */ | ||
| 344 | 	DRM_PVR_STATIC_DATA_AREA_EOT = 0, | ||
| 345 | |||
| 346 | 	/** | ||
| 347 | 	 * @DRM_PVR_STATIC_DATA_AREA_FENCE: MCU fence area, used during cache flush and | ||
| 348 | 	 * invalidation. | ||
| 349 | 	 * | ||
| 350 | 	 * This must point to valid physical memory but the contents otherwise are not used. | ||
| 351 | 	 */ | ||
| 352 | 	DRM_PVR_STATIC_DATA_AREA_FENCE, | ||
| 353 | |||
| 354 | 	/** | ||
| 355 | 	 * @DRM_PVR_STATIC_DATA_AREA_VDM_SYNC: VDM sync program. | ||
| 356 | 	 * | ||
| 357 | 	 * The VDM sync program is used to synchronise multiple areas of the GPU hardware. | ||
| 358 | 	 */ | ||
| 359 | 	DRM_PVR_STATIC_DATA_AREA_VDM_SYNC, | ||
| 360 | |||
| 361 | 	/** | ||
| 362 | 	 * @DRM_PVR_STATIC_DATA_AREA_YUV_CSC: YUV coefficients. | ||
| 363 | 	 * | ||
| 364 | 	 * Area contains up to 16 slots with stride of 64 bytes. Each is a 3x4 matrix of u16 fixed | ||
| 365 | 	 * point numbers, with 1 sign bit, 2 integer bits and 13 fractional bits. | ||
| 366 | 	 * | ||
| 367 | 	 * The slots are : | ||
| 368 | 	 * 0 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR | ||
| 369 | 	 * 1 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR (full range) | ||
| 370 | 	 * 2 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR (conformant range) | ||
| 371 | 	 * 3 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR (full range) | ||
| 372 | 	 * 4 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR (conformant range) | ||
| 373 | 	 * 5 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR (full range) | ||
| 374 | 	 * 6 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR (conformant range) | ||
| 375 | 	 * 7 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR (full range) | ||
| 376 | 	 * 8 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR (conformant range) | ||
| 377 | 	 * 9 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR (conformant range, 10 bit) | ||
| 378 | 	 * 10 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR (conformant range, 10 bit) | ||
| 379 | 	 * 11 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR (conformant range, 10 bit) | ||
| 380 | 	 * 14 = Identity (biased) | ||
| 381 | 	 * 15 = Identity | ||
| 382 | 	 */ | ||
| 383 | 	DRM_PVR_STATIC_DATA_AREA_YUV_CSC, | ||
| 384 | }; | ||
| 385 | |||
| 386 | /** | ||
| 387 | * struct drm_pvr_static_data_area - Container holding information about a | ||
| 388 | * single static data area. | ||
| 389 | * | ||
| 390 | * This will always be fetched as an array. | ||
| 391 | */ | ||
| 392 | struct drm_pvr_static_data_area { | ||
| 393 | 	/** | ||
| 394 | 	 * @area_usage: Usage of static data area. | ||
| 395 | 	 * See &enum drm_pvr_static_data_area_usage. | ||
| 396 | 	 */ | ||
| 397 | 	__u16 area_usage; | ||
| 398 | |||
| 399 | 	/** | ||
| 400 | 	 * @location_heap_id: Array index of heap where this of static data | ||
| 401 | 	 * area is located. This array is fetched using | ||
| 402 | 	 * %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 403 | 	 */ | ||
| 404 | 	__u16 location_heap_id; | ||
| 405 | |||
| 406 | 	/** @size: Size of static data area. Not present if set to zero. */ | ||
| 407 | 	__u32 size; | ||
| 408 | |||
| 409 | 	/** @offset: Offset of static data area from start of heap. */ | ||
| 410 | 	__u64 offset; | ||
| 411 | }; | ||
| 412 | |||
| 413 | /** | ||
| 414 | * struct drm_pvr_dev_query_static_data_areas - Container used to fetch | ||
| 415 | * information about the static data areas in heaps supported by the device | ||
| 416 | * driver. | ||
| 417 | * | ||
| 418 | * Please note all driver-supported static data areas will be returned up to | ||
| 419 | * &static_data_areas.count. Some will not be present for all devices which, | ||
| 420 | * will be indicated by &struct drm_pvr_static_data_area.size being set to zero. | ||
| 421 | * | ||
| 422 | * Further, some heaps will not be present either. See &struct | ||
| 423 | * drm_pvr_dev_query_heap_info. | ||
| 424 | * | ||
| 425 | * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must be set | ||
| 426 | * to %DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET. | ||
| 427 | */ | ||
| 428 | struct drm_pvr_dev_query_static_data_areas { | ||
| 429 | 	/** | ||
| 430 | 	 * @static_data_areas: Array of &struct drm_pvr_static_data_area. If | ||
| 431 | 	 * pointer is NULL, the count and stride will be updated with those | ||
| 432 | 	 * known to the driver version, to facilitate allocation by the caller. | ||
| 433 | 	 */ | ||
| 434 | 	struct drm_pvr_obj_array static_data_areas; | ||
| 435 | }; | ||
| 436 | |||
| 437 | /** | ||
| 438 | * enum drm_pvr_dev_query - For use with &drm_pvr_ioctl_dev_query_args.type to | ||
| 439 | * indicate the type of the receiving container. | ||
| 440 | * | ||
| 441 | * Append only. Do not reorder. | ||
| 442 | */ | ||
| 443 | enum drm_pvr_dev_query { | ||
| 444 | 	/** | ||
| 445 | 	 * @DRM_PVR_DEV_QUERY_GPU_INFO_GET: The dev query args contain a pointer | ||
| 446 | 	 * to &struct drm_pvr_dev_query_gpu_info. | ||
| 447 | 	 */ | ||
| 448 | 	DRM_PVR_DEV_QUERY_GPU_INFO_GET = 0, | ||
| 449 | |||
| 450 | 	/** | ||
| 451 | 	 * @DRM_PVR_DEV_QUERY_RUNTIME_INFO_GET: The dev query args contain a | ||
| 452 | 	 * pointer to &struct drm_pvr_dev_query_runtime_info. | ||
| 453 | 	 */ | ||
| 454 | 	DRM_PVR_DEV_QUERY_RUNTIME_INFO_GET, | ||
| 455 | |||
| 456 | 	/** | ||
| 457 | 	 * @DRM_PVR_DEV_QUERY_QUIRKS_GET: The dev query args contain a pointer | ||
| 458 | 	 * to &struct drm_pvr_dev_query_quirks. | ||
| 459 | 	 */ | ||
| 460 | 	DRM_PVR_DEV_QUERY_QUIRKS_GET, | ||
| 461 | |||
| 462 | 	/** | ||
| 463 | 	 * @DRM_PVR_DEV_QUERY_ENHANCEMENTS_GET: The dev query args contain a | ||
| 464 | 	 * pointer to &struct drm_pvr_dev_query_enhancements. | ||
| 465 | 	 */ | ||
| 466 | 	DRM_PVR_DEV_QUERY_ENHANCEMENTS_GET, | ||
| 467 | |||
| 468 | 	/** | ||
| 469 | 	 * @DRM_PVR_DEV_QUERY_HEAP_INFO_GET: The dev query args contain a | ||
| 470 | 	 * pointer to &struct drm_pvr_dev_query_heap_info. | ||
| 471 | 	 */ | ||
| 472 | 	DRM_PVR_DEV_QUERY_HEAP_INFO_GET, | ||
| 473 | |||
| 474 | 	/** | ||
| 475 | 	 * @DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET: The dev query args contain | ||
| 476 | 	 * a pointer to &struct drm_pvr_dev_query_static_data_areas. | ||
| 477 | 	 */ | ||
| 478 | 	DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET, | ||
| 479 | }; | ||
| 480 | |||
| 481 | /** | ||
| 482 | * struct drm_pvr_ioctl_dev_query_args - Arguments for %DRM_IOCTL_PVR_DEV_QUERY. | ||
| 483 | */ | ||
| 484 | struct drm_pvr_ioctl_dev_query_args { | ||
| 485 | 	/** | ||
| 486 | 	 * @type: Type of query and output struct. See &enum drm_pvr_dev_query. | ||
| 487 | 	 */ | ||
| 488 | 	__u32 type; | ||
| 489 | |||
| 490 | 	/** | ||
| 491 | 	 * @size: Size of the receiving struct, see @type. | ||
| 492 | 	 * | ||
| 493 | 	 * After a successful call this will be updated to the written byte | ||
| 494 | 	 * length. | ||
| 495 | 	 * Can also be used to get the minimum byte length (see @pointer). | ||
| 496 | 	 * This allows additional fields to be appended to the structs in | ||
| 497 | 	 * future. | ||
| 498 | 	 */ | ||
| 499 | 	__u32 size; | ||
| 500 | |||
| 501 | 	/** | ||
| 502 | 	 * @pointer: Pointer to struct @type. | ||
| 503 | 	 * | ||
| 504 | 	 * Must be large enough to contain @size bytes. | ||
| 505 | 	 * If pointer is NULL, the expected size will be returned in the @size | ||
| 506 | 	 * field, but no other data will be written. | ||
| 507 | 	 */ | ||
| 508 | 	__u64 pointer; | ||
| 509 | }; | ||
| 510 | |||
| 511 | /** | ||
| 512 | * DOC: PowerVR IOCTL CREATE_BO interface | ||
| 513 | */ | ||
| 514 | |||
| 515 | /** | ||
| 516 | * DOC: Flags for CREATE_BO | ||
| 517 | * | ||
| 518 | * We use "device" to refer to the GPU here because of the ambiguity between CPU and GPU in some | ||
| 519 | * fonts. | ||
| 520 | * | ||
| 521 | * Device mapping options | ||
| 522 | * :DRM_PVR_BO_BYPASS_DEVICE_CACHE: Specify that device accesses to this memory will bypass the | ||
| 523 | * cache. This is used for buffers that will either be regularly updated by the CPU (eg free | ||
| 524 | * lists) or will be accessed only once and therefore isn't worth caching (eg partial render | ||
| 525 | * buffers). | ||
| 526 | * By default, the device flushes its memory caches after every job, so this is not normally | ||
| 527 | * required for coherency. | ||
| 528 | * :DRM_PVR_BO_PM_FW_PROTECT: Specify that only the Parameter Manager (PM) and/or firmware | ||
| 529 | * processor should be allowed to access this memory when mapped to the device. It is not | ||
| 530 | * valid to specify this flag with DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS. | ||
| 531 | * | ||
| 532 | * CPU mapping options | ||
| 533 | * :DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS: Allow userspace to map and access the contents of this | ||
| 534 | * memory. It is not valid to specify this flag with DRM_PVR_BO_PM_FW_PROTECT. | ||
| 535 | */ | ||
| 536 | #define DRM_PVR_BO_BYPASS_DEVICE_CACHE _BITULL(0) | ||
| 537 | #define DRM_PVR_BO_PM_FW_PROTECT _BITULL(1) | ||
| 538 | #define DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS _BITULL(2) | ||
| 539 | /* Bits 3..63 are reserved. */ | ||
| 540 | |||
| 541 | #define DRM_PVR_BO_FLAGS_MASK (DRM_PVR_BO_BYPASS_DEVICE_CACHE | DRM_PVR_BO_PM_FW_PROTECT | \ | ||
| 542 | 			 DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS) | ||
| 543 | |||
| 544 | /** | ||
| 545 | * struct drm_pvr_ioctl_create_bo_args - Arguments for %DRM_IOCTL_PVR_CREATE_BO | ||
| 546 | */ | ||
| 547 | struct drm_pvr_ioctl_create_bo_args { | ||
| 548 | 	/** | ||
| 549 | 	 * @size: [IN] Size of buffer object to create. This must be page size | ||
| 550 | 	 * aligned. | ||
| 551 | 	 */ | ||
| 552 | 	__u64 size; | ||
| 553 | |||
| 554 | 	/** | ||
| 555 | 	 * @handle: [OUT] GEM handle of the new buffer object for use in | ||
| 556 | 	 * userspace. | ||
| 557 | 	 */ | ||
| 558 | 	__u32 handle; | ||
| 559 | |||
| 560 | 	/** @_padding_c: Reserved. This field must be zeroed. */ | ||
| 561 | 	__u32 _padding_c; | ||
| 562 | |||
| 563 | 	/** | ||
| 564 | 	 * @flags: [IN] Options which will affect the behaviour of this | ||
| 565 | 	 * creation operation and future mapping operations on the created | ||
| 566 | 	 * object. This field must be a valid combination of ``DRM_PVR_BO_*`` | ||
| 567 | 	 * values, with all bits marked as reserved set to zero. | ||
| 568 | 	 */ | ||
| 569 | 	__u64 flags; | ||
| 570 | }; | ||
| 571 | |||
| 572 | /** | ||
| 573 | * DOC: PowerVR IOCTL GET_BO_MMAP_OFFSET interface | ||
| 574 | */ | ||
| 575 | |||
| 576 | /** | ||
| 577 | * struct drm_pvr_ioctl_get_bo_mmap_offset_args - Arguments for | ||
| 578 | * %DRM_IOCTL_PVR_GET_BO_MMAP_OFFSET | ||
| 579 | * | ||
| 580 | * Like other DRM drivers, the "mmap" IOCTL doesn't actually map any memory. | ||
| 581 | * Instead, it allocates a fake offset which refers to the specified buffer | ||
| 582 | * object. This offset can be used with a real mmap call on the DRM device | ||
| 583 | * itself. | ||
| 584 | */ | ||
| 585 | struct drm_pvr_ioctl_get_bo_mmap_offset_args { | ||
| 586 | 	/** @handle: [IN] GEM handle of the buffer object to be mapped. */ | ||
| 587 | 	__u32 handle; | ||
| 588 | |||
| 589 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 590 | 	__u32 _padding_4; | ||
| 591 | |||
| 592 | 	/** @offset: [OUT] Fake offset to use in the real mmap call. */ | ||
| 593 | 	__u64 offset; | ||
| 594 | }; | ||
| 595 | |||
| 596 | /** | ||
| 597 | * DOC: PowerVR IOCTL CREATE_VM_CONTEXT and DESTROY_VM_CONTEXT interfaces | ||
| 598 | */ | ||
| 599 | |||
| 600 | /** | ||
| 601 | * struct drm_pvr_ioctl_create_vm_context_args - Arguments for | ||
| 602 | * %DRM_IOCTL_PVR_CREATE_VM_CONTEXT | ||
| 603 | */ | ||
| 604 | struct drm_pvr_ioctl_create_vm_context_args { | ||
| 605 | 	/** @handle: [OUT] Handle for new VM context. */ | ||
| 606 | 	__u32 handle; | ||
| 607 | |||
| 608 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 609 | 	__u32 _padding_4; | ||
| 610 | }; | ||
| 611 | |||
| 612 | /** | ||
| 613 | * struct drm_pvr_ioctl_destroy_vm_context_args - Arguments for | ||
| 614 | * %DRM_IOCTL_PVR_DESTROY_VM_CONTEXT | ||
| 615 | */ | ||
| 616 | struct drm_pvr_ioctl_destroy_vm_context_args { | ||
| 617 | 	/** | ||
| 618 | 	 * @handle: [IN] Handle for VM context to be destroyed. | ||
| 619 | 	 */ | ||
| 620 | 	__u32 handle; | ||
| 621 | |||
| 622 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 623 | 	__u32 _padding_4; | ||
| 624 | }; | ||
| 625 | |||
| 626 | /** | ||
| 627 | * DOC: PowerVR IOCTL VM_MAP and VM_UNMAP interfaces | ||
| 628 | * | ||
| 629 | * The VM UAPI allows userspace to create buffer object mappings in GPU virtual address space. | ||
| 630 | * | ||
| 631 | * The client is responsible for managing GPU address space. It should allocate mappings within | ||
| 632 | * the heaps returned by %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 633 | * | ||
| 634 | * %DRM_IOCTL_PVR_VM_MAP creates a new mapping. The client provides the target virtual address for | ||
| 635 | * the mapping. Size and offset within the mapped buffer object can be specified, so the client can | ||
| 636 | * partially map a buffer. | ||
| 637 | * | ||
| 638 | * %DRM_IOCTL_PVR_VM_UNMAP removes a mapping. The entire mapping will be removed from GPU address | ||
| 639 | * space only if the size of the mapping matches that known to the driver. | ||
| 640 | */ | ||
| 641 | |||
| 642 | /** | ||
| 643 | * struct drm_pvr_ioctl_vm_map_args - Arguments for %DRM_IOCTL_PVR_VM_MAP. | ||
| 644 | */ | ||
| 645 | struct drm_pvr_ioctl_vm_map_args { | ||
| 646 | 	/** | ||
| 647 | 	 * @vm_context_handle: [IN] Handle for VM context for this mapping to | ||
| 648 | 	 * exist in. | ||
| 649 | 	 */ | ||
| 650 | 	__u32 vm_context_handle; | ||
| 651 | |||
| 652 | 	/** @flags: [IN] Flags which affect this mapping. Currently always 0. */ | ||
| 653 | 	__u32 flags; | ||
| 654 | |||
| 655 | 	/** | ||
| 656 | 	 * @device_addr: [IN] Requested device-virtual address for the mapping. | ||
| 657 | 	 * This must be non-zero and aligned to the device page size for the | ||
| 658 | 	 * heap containing the requested address. It is an error to specify an | ||
| 659 | 	 * address which is not contained within one of the heaps returned by | ||
| 660 | 	 * %DRM_PVR_DEV_QUERY_HEAP_INFO_GET. | ||
| 661 | 	 */ | ||
| 662 | 	__u64 device_addr; | ||
| 663 | |||
| 664 | 	/** | ||
| 665 | 	 * @handle: [IN] Handle of the target buffer object. This must be a | ||
| 666 | 	 * valid handle returned by %DRM_IOCTL_PVR_CREATE_BO. | ||
| 667 | 	 */ | ||
| 668 | 	__u32 handle; | ||
| 669 | |||
| 670 | 	/** @_padding_14: Reserved. This field must be zeroed. */ | ||
| 671 | 	__u32 _padding_14; | ||
| 672 | |||
| 673 | 	/** | ||
| 674 | 	 * @offset: [IN] Offset into the target bo from which to begin the | ||
| 675 | 	 * mapping. | ||
| 676 | 	 */ | ||
| 677 | 	__u64 offset; | ||
| 678 | |||
| 679 | 	/** | ||
| 680 | 	 * @size: [IN] Size of the requested mapping. Must be aligned to | ||
| 681 | 	 * the device page size for the heap containing the requested address, | ||
| 682 | 	 * as well as the host page size. When added to @device_addr, the | ||
| 683 | 	 * result must not overflow the heap which contains @device_addr (i.e. | ||
| 684 | 	 * the range specified by @device_addr and @size must be completely | ||
| 685 | 	 * contained within a single heap specified by | ||
| 686 | 	 * %DRM_PVR_DEV_QUERY_HEAP_INFO_GET). | ||
| 687 | 	 */ | ||
| 688 | 	__u64 size; | ||
| 689 | }; | ||
| 690 | |||
| 691 | /** | ||
| 692 | * struct drm_pvr_ioctl_vm_unmap_args - Arguments for %DRM_IOCTL_PVR_VM_UNMAP. | ||
| 693 | */ | ||
| 694 | struct drm_pvr_ioctl_vm_unmap_args { | ||
| 695 | 	/** | ||
| 696 | 	 * @vm_context_handle: [IN] Handle for VM context that this mapping | ||
| 697 | 	 * exists in. | ||
| 698 | 	 */ | ||
| 699 | 	__u32 vm_context_handle; | ||
| 700 | |||
| 701 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 702 | 	__u32 _padding_4; | ||
| 703 | |||
| 704 | 	/** | ||
| 705 | 	 * @device_addr: [IN] Device-virtual address at the start of the target | ||
| 706 | 	 * mapping. This must be non-zero. | ||
| 707 | 	 */ | ||
| 708 | 	__u64 device_addr; | ||
| 709 | |||
| 710 | 	/** | ||
| 711 | 	 * @size: Size in bytes of the target mapping. This must be non-zero. | ||
| 712 | 	 */ | ||
| 713 | 	__u64 size; | ||
| 714 | }; | ||
| 715 | |||
| 716 | /** | ||
| 717 | * DOC: PowerVR IOCTL CREATE_CONTEXT and DESTROY_CONTEXT interfaces | ||
| 718 | */ | ||
| 719 | |||
| 720 | /** | ||
| 721 | * enum drm_pvr_ctx_priority - Arguments for | ||
| 722 | * &drm_pvr_ioctl_create_context_args.priority | ||
| 723 | */ | ||
| 724 | enum drm_pvr_ctx_priority { | ||
| 725 | 	/** @DRM_PVR_CTX_PRIORITY_LOW: Priority below normal. */ | ||
| 726 | 	DRM_PVR_CTX_PRIORITY_LOW = -512, | ||
| 727 | |||
| 728 | 	/** @DRM_PVR_CTX_PRIORITY_NORMAL: Normal priority. */ | ||
| 729 | 	DRM_PVR_CTX_PRIORITY_NORMAL = 0, | ||
| 730 | |||
| 731 | 	/** | ||
| 732 | 	 * @DRM_PVR_CTX_PRIORITY_HIGH: Priority above normal. | ||
| 733 | 	 * Note this requires ``CAP_SYS_NICE`` or ``DRM_MASTER``. | ||
| 734 | 	 */ | ||
| 735 | 	DRM_PVR_CTX_PRIORITY_HIGH = 512, | ||
| 736 | }; | ||
| 737 | |||
| 738 | /** | ||
| 739 | * enum drm_pvr_ctx_type - Arguments for | ||
| 740 | * &struct drm_pvr_ioctl_create_context_args.type | ||
| 741 | */ | ||
| 742 | enum drm_pvr_ctx_type { | ||
| 743 | 	/** | ||
| 744 | 	 * @DRM_PVR_CTX_TYPE_RENDER: Render context. | ||
| 745 | 	 */ | ||
| 746 | 	DRM_PVR_CTX_TYPE_RENDER = 0, | ||
| 747 | |||
| 748 | 	/** | ||
| 749 | 	 * @DRM_PVR_CTX_TYPE_COMPUTE: Compute context. | ||
| 750 | 	 */ | ||
| 751 | 	DRM_PVR_CTX_TYPE_COMPUTE, | ||
| 752 | |||
| 753 | 	/** | ||
| 754 | 	 * @DRM_PVR_CTX_TYPE_TRANSFER_FRAG: Transfer context for fragment data | ||
| 755 | 	 * master. | ||
| 756 | 	 */ | ||
| 757 | 	DRM_PVR_CTX_TYPE_TRANSFER_FRAG, | ||
| 758 | }; | ||
| 759 | |||
| 760 | /** | ||
| 761 | * struct drm_pvr_ioctl_create_context_args - Arguments for | ||
| 762 | * %DRM_IOCTL_PVR_CREATE_CONTEXT | ||
| 763 | */ | ||
| 764 | struct drm_pvr_ioctl_create_context_args { | ||
| 765 | 	/** | ||
| 766 | 	 * @type: [IN] Type of context to create. | ||
| 767 | 	 * | ||
| 768 | 	 * This must be one of the values defined by &enum drm_pvr_ctx_type. | ||
| 769 | 	 */ | ||
| 770 | 	__u32 type; | ||
| 771 | |||
| 772 | 	/** @flags: [IN] Flags for context. */ | ||
| 773 | 	__u32 flags; | ||
| 774 | |||
| 775 | 	/** | ||
| 776 | 	 * @priority: [IN] Priority of new context. | ||
| 777 | 	 * | ||
| 778 | 	 * This must be one of the values defined by &enum drm_pvr_ctx_priority. | ||
| 779 | 	 */ | ||
| 780 | 	__s32 priority; | ||
| 781 | |||
| 782 | 	/** @handle: [OUT] Handle for new context. */ | ||
| 783 | 	__u32 handle; | ||
| 784 | |||
| 785 | 	/** | ||
| 786 | 	 * @static_context_state: [IN] Pointer to static context state stream. | ||
| 787 | 	 */ | ||
| 788 | 	__u64 static_context_state; | ||
| 789 | |||
| 790 | 	/** | ||
| 791 | 	 * @static_context_state_len: [IN] Length of static context state, in bytes. | ||
| 792 | 	 */ | ||
| 793 | 	__u32 static_context_state_len; | ||
| 794 | |||
| 795 | 	/** | ||
| 796 | 	 * @vm_context_handle: [IN] Handle for VM context that this context is | ||
| 797 | 	 * associated with. | ||
| 798 | 	 */ | ||
| 799 | 	__u32 vm_context_handle; | ||
| 800 | |||
| 801 | 	/** | ||
| 802 | 	 * @callstack_addr: [IN] Address for initial call stack pointer. Only valid | ||
| 803 | 	 * if @type is %DRM_PVR_CTX_TYPE_RENDER, otherwise must be 0. | ||
| 804 | 	 */ | ||
| 805 | 	__u64 callstack_addr; | ||
| 806 | }; | ||
| 807 | |||
| 808 | /** | ||
| 809 | * struct drm_pvr_ioctl_destroy_context_args - Arguments for | ||
| 810 | * %DRM_IOCTL_PVR_DESTROY_CONTEXT | ||
| 811 | */ | ||
| 812 | struct drm_pvr_ioctl_destroy_context_args { | ||
| 813 | 	/** | ||
| 814 | 	 * @handle: [IN] Handle for context to be destroyed. | ||
| 815 | 	 */ | ||
| 816 | 	__u32 handle; | ||
| 817 | |||
| 818 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 819 | 	__u32 _padding_4; | ||
| 820 | }; | ||
| 821 | |||
| 822 | /** | ||
| 823 | * DOC: PowerVR IOCTL CREATE_FREE_LIST and DESTROY_FREE_LIST interfaces | ||
| 824 | */ | ||
| 825 | |||
| 826 | /** | ||
| 827 | * struct drm_pvr_ioctl_create_free_list_args - Arguments for | ||
| 828 | * %DRM_IOCTL_PVR_CREATE_FREE_LIST | ||
| 829 | * | ||
| 830 | * Free list arguments have the following constraints : | ||
| 831 | * | ||
| 832 | * - @max_num_pages must be greater than zero. | ||
| 833 | * - @grow_threshold must be between 0 and 100. | ||
| 834 | * - @grow_num_pages must be less than or equal to &max_num_pages. | ||
| 835 | * - @initial_num_pages, @max_num_pages and @grow_num_pages must be multiples | ||
| 836 | * of 4. | ||
| 837 | * - When &grow_num_pages is 0, @initial_num_pages must be equal to | ||
| 838 | * @max_num_pages. | ||
| 839 | * - When &grow_num_pages is non-zero, @initial_num_pages must be less than | ||
| 840 | * @max_num_pages. | ||
| 841 | */ | ||
| 842 | struct drm_pvr_ioctl_create_free_list_args { | ||
| 843 | 	/** | ||
| 844 | 	 * @free_list_gpu_addr: [IN] Address of GPU mapping of buffer object | ||
| 845 | 	 * containing memory to be used by free list. | ||
| 846 | 	 * | ||
| 847 | 	 * The mapped region of the buffer object must be at least | ||
| 848 | 	 * @max_num_pages * ``sizeof(__u32)``. | ||
| 849 | 	 * | ||
| 850 | 	 * The buffer object must have been created with | ||
| 851 | 	 * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT set and | ||
| 852 | 	 * %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS not set. | ||
| 853 | 	 */ | ||
| 854 | 	__u64 free_list_gpu_addr; | ||
| 855 | |||
| 856 | 	/** @initial_num_pages: [IN] Pages initially allocated to free list. */ | ||
| 857 | 	__u32 initial_num_pages; | ||
| 858 | |||
| 859 | 	/** @max_num_pages: [IN] Maximum number of pages in free list. */ | ||
| 860 | 	__u32 max_num_pages; | ||
| 861 | |||
| 862 | 	/** @grow_num_pages: [IN] Pages to grow free list by per request. */ | ||
| 863 | 	__u32 grow_num_pages; | ||
| 864 | |||
| 865 | 	/** | ||
| 866 | 	 * @grow_threshold: [IN] Percentage of FL memory used that should | ||
| 867 | 	 * trigger a new grow request. | ||
| 868 | 	 */ | ||
| 869 | 	__u32 grow_threshold; | ||
| 870 | |||
| 871 | 	/** | ||
| 872 | 	 * @vm_context_handle: [IN] Handle for VM context that the free list buffer | ||
| 873 | 	 * object is mapped in. | ||
| 874 | 	 */ | ||
| 875 | 	__u32 vm_context_handle; | ||
| 876 | |||
| 877 | 	/** | ||
| 878 | 	 * @handle: [OUT] Handle for created free list. | ||
| 879 | 	 */ | ||
| 880 | 	__u32 handle; | ||
| 881 | }; | ||
| 882 | |||
| 883 | /** | ||
| 884 | * struct drm_pvr_ioctl_destroy_free_list_args - Arguments for | ||
| 885 | * %DRM_IOCTL_PVR_DESTROY_FREE_LIST | ||
| 886 | */ | ||
| 887 | struct drm_pvr_ioctl_destroy_free_list_args { | ||
| 888 | 	/** | ||
| 889 | 	 * @handle: [IN] Handle for free list to be destroyed. | ||
| 890 | 	 */ | ||
| 891 | 	__u32 handle; | ||
| 892 | |||
| 893 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 894 | 	__u32 _padding_4; | ||
| 895 | }; | ||
| 896 | |||
| 897 | /** | ||
| 898 | * DOC: PowerVR IOCTL CREATE_HWRT_DATASET and DESTROY_HWRT_DATASET interfaces | ||
| 899 | */ | ||
| 900 | |||
| 901 | /** | ||
| 902 | * struct drm_pvr_create_hwrt_geom_data_args - Geometry data arguments used for | ||
| 903 | * &struct drm_pvr_ioctl_create_hwrt_dataset_args.geom_data_args. | ||
| 904 | */ | ||
| 905 | struct drm_pvr_create_hwrt_geom_data_args { | ||
| 906 | 	/** @tpc_dev_addr: [IN] Tail pointer cache GPU virtual address. */ | ||
| 907 | 	__u64 tpc_dev_addr; | ||
| 908 | |||
| 909 | 	/** @tpc_size: [IN] Size of TPC, in bytes. */ | ||
| 910 | 	__u32 tpc_size; | ||
| 911 | |||
| 912 | 	/** @tpc_stride: [IN] Stride between layers in TPC, in pages */ | ||
| 913 | 	__u32 tpc_stride; | ||
| 914 | |||
| 915 | 	/** @vheap_table_dev_addr: [IN] VHEAP table GPU virtual address. */ | ||
| 916 | 	__u64 vheap_table_dev_addr; | ||
| 917 | |||
| 918 | 	/** @rtc_dev_addr: [IN] Render Target Cache virtual address. */ | ||
| 919 | 	__u64 rtc_dev_addr; | ||
| 920 | }; | ||
| 921 | |||
| 922 | /** | ||
| 923 | * struct drm_pvr_create_hwrt_rt_data_args - Render target arguments used for | ||
| 924 | * &struct drm_pvr_ioctl_create_hwrt_dataset_args.rt_data_args. | ||
| 925 | */ | ||
| 926 | struct drm_pvr_create_hwrt_rt_data_args { | ||
| 927 | 	/** @pm_mlist_dev_addr: [IN] PM MLIST GPU virtual address. */ | ||
| 928 | 	__u64 pm_mlist_dev_addr; | ||
| 929 | |||
| 930 | 	/** @macrotile_array_dev_addr: [IN] Macrotile array GPU virtual address. */ | ||
| 931 | 	__u64 macrotile_array_dev_addr; | ||
| 932 | |||
| 933 | 	/** @region_header_dev_addr: [IN] Region header array GPU virtual address. */ | ||
| 934 | 	__u64 region_header_dev_addr; | ||
| 935 | }; | ||
| 936 | |||
| 937 | #define PVR_DRM_HWRT_FREE_LIST_LOCAL 0 | ||
| 938 | #define PVR_DRM_HWRT_FREE_LIST_GLOBAL 1U | ||
| 939 | |||
| 940 | /** | ||
| 941 | * struct drm_pvr_ioctl_create_hwrt_dataset_args - Arguments for | ||
| 942 | * %DRM_IOCTL_PVR_CREATE_HWRT_DATASET | ||
| 943 | */ | ||
| 944 | struct drm_pvr_ioctl_create_hwrt_dataset_args { | ||
| 945 | 	/** @geom_data_args: [IN] Geometry data arguments. */ | ||
| 946 | 	struct drm_pvr_create_hwrt_geom_data_args geom_data_args; | ||
| 947 | |||
| 948 | 	/** | ||
| 949 | 	 * @rt_data_args: [IN] Array of render target arguments. | ||
| 950 | 	 * | ||
| 951 | 	 * Each entry in this array represents a render target in a double buffered | ||
| 952 | 	 * setup. | ||
| 953 | 	 */ | ||
| 954 | 	struct drm_pvr_create_hwrt_rt_data_args rt_data_args[2]; | ||
| 955 | |||
| 956 | 	/** | ||
| 957 | 	 * @free_list_handles: [IN] Array of free list handles. | ||
| 958 | 	 * | ||
| 959 | 	 * free_list_handles[PVR_DRM_HWRT_FREE_LIST_LOCAL] must have initial | ||
| 960 | 	 * size of at least that reported by | ||
| 961 | 	 * &drm_pvr_dev_query_runtime_info.free_list_min_pages. | ||
| 962 | 	 */ | ||
| 963 | 	__u32 free_list_handles[2]; | ||
| 964 | |||
| 965 | 	/** @width: [IN] Width in pixels. */ | ||
| 966 | 	__u32 width; | ||
| 967 | |||
| 968 | 	/** @height: [IN] Height in pixels. */ | ||
| 969 | 	__u32 height; | ||
| 970 | |||
| 971 | 	/** @samples: [IN] Number of samples. */ | ||
| 972 | 	__u32 samples; | ||
| 973 | |||
| 974 | 	/** @layers: [IN] Number of layers. */ | ||
| 975 | 	__u32 layers; | ||
| 976 | |||
| 977 | 	/** @isp_merge_lower_x: [IN] Lower X coefficient for triangle merging. */ | ||
| 978 | 	__u32 isp_merge_lower_x; | ||
| 979 | |||
| 980 | 	/** @isp_merge_lower_y: [IN] Lower Y coefficient for triangle merging. */ | ||
| 981 | 	__u32 isp_merge_lower_y; | ||
| 982 | |||
| 983 | 	/** @isp_merge_scale_x: [IN] Scale X coefficient for triangle merging. */ | ||
| 984 | 	__u32 isp_merge_scale_x; | ||
| 985 | |||
| 986 | 	/** @isp_merge_scale_y: [IN] Scale Y coefficient for triangle merging. */ | ||
| 987 | 	__u32 isp_merge_scale_y; | ||
| 988 | |||
| 989 | 	/** @isp_merge_upper_x: [IN] Upper X coefficient for triangle merging. */ | ||
| 990 | 	__u32 isp_merge_upper_x; | ||
| 991 | |||
| 992 | 	/** @isp_merge_upper_y: [IN] Upper Y coefficient for triangle merging. */ | ||
| 993 | 	__u32 isp_merge_upper_y; | ||
| 994 | |||
| 995 | 	/** | ||
| 996 | 	 * @region_header_size: [IN] Size of region header array. This common field is used by | ||
| 997 | 	 * both render targets in this data set. | ||
| 998 | 	 * | ||
| 999 | 	 * The units for this field differ depending on what version of the simple internal | ||
| 1000 | 	 * parameter format the device uses. If format 2 is in use then this is interpreted as the | ||
| 1001 | 	 * number of region headers. For other formats it is interpreted as the size in dwords. | ||
| 1002 | 	 */ | ||
| 1003 | 	__u32 region_header_size; | ||
| 1004 | |||
| 1005 | 	/** | ||
| 1006 | 	 * @handle: [OUT] Handle for created HWRT dataset. | ||
| 1007 | 	 */ | ||
| 1008 | 	__u32 handle; | ||
| 1009 | }; | ||
| 1010 | |||
| 1011 | /** | ||
| 1012 | * struct drm_pvr_ioctl_destroy_hwrt_dataset_args - Arguments for | ||
| 1013 | * %DRM_IOCTL_PVR_DESTROY_HWRT_DATASET | ||
| 1014 | */ | ||
| 1015 | struct drm_pvr_ioctl_destroy_hwrt_dataset_args { | ||
| 1016 | 	/** | ||
| 1017 | 	 * @handle: [IN] Handle for HWRT dataset to be destroyed. | ||
| 1018 | 	 */ | ||
| 1019 | 	__u32 handle; | ||
| 1020 | |||
| 1021 | 	/** @_padding_4: Reserved. This field must be zeroed. */ | ||
| 1022 | 	__u32 _padding_4; | ||
| 1023 | }; | ||
| 1024 | |||
| 1025 | /** | ||
| 1026 | * DOC: PowerVR IOCTL SUBMIT_JOBS interface | ||
| 1027 | */ | ||
| 1028 | |||
| 1029 | /** | ||
| 1030 | * DOC: Flags for the drm_pvr_sync_op object. | ||
| 1031 | * | ||
| 1032 | * .. c:macro:: DRM_PVR_SYNC_OP_HANDLE_TYPE_MASK | ||
| 1033 | * | ||
| 1034 | * Handle type mask for the drm_pvr_sync_op::flags field. | ||
| 1035 | * | ||
| 1036 | * .. c:macro:: DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_SYNCOBJ | ||
| 1037 | * | ||
| 1038 | * Indicates the handle passed in drm_pvr_sync_op::handle is a syncobj handle. | ||
| 1039 | * This is the default type. | ||
| 1040 | * | ||
| 1041 | * .. c:macro:: DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_TIMELINE_SYNCOBJ | ||
| 1042 | * | ||
| 1043 | * Indicates the handle passed in drm_pvr_sync_op::handle is a timeline syncobj handle. | ||
| 1044 | * | ||
| 1045 | * .. c:macro:: DRM_PVR_SYNC_OP_FLAG_SIGNAL | ||
| 1046 | * | ||
| 1047 | * Signal operation requested. The out-fence bound to the job will be attached to | ||
| 1048 | * the syncobj whose handle is passed in drm_pvr_sync_op::handle. | ||
| 1049 | * | ||
| 1050 | * .. c:macro:: DRM_PVR_SYNC_OP_FLAG_WAIT | ||
| 1051 | * | ||
| 1052 | * Wait operation requested. The job will wait for this particular syncobj or syncobj | ||
| 1053 | * point to be signaled before being started. | ||
| 1054 | * This is the default operation. | ||
| 1055 | */ | ||
| 1056 | #define DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_MASK 0xf | ||
| 1057 | #define DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_SYNCOBJ 0 | ||
| 1058 | #define DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_TIMELINE_SYNCOBJ 1 | ||
| 1059 | #define DRM_PVR_SYNC_OP_FLAG_SIGNAL _BITULL(31) | ||
| 1060 | #define DRM_PVR_SYNC_OP_FLAG_WAIT 0 | ||
| 1061 | |||
| 1062 | #define DRM_PVR_SYNC_OP_FLAGS_MASK (DRM_PVR_SYNC_OP_FLAG_HANDLE_TYPE_MASK | \ | ||
| 1063 | 				 DRM_PVR_SYNC_OP_FLAG_SIGNAL) | ||
| 1064 | |||
| 1065 | /** | ||
| 1066 | * struct drm_pvr_sync_op - Object describing a sync operation | ||
| 1067 | */ | ||
| 1068 | struct drm_pvr_sync_op { | ||
| 1069 | 	/** @handle: Handle of sync object. */ | ||
| 1070 | 	__u32 handle; | ||
| 1071 | |||
| 1072 | 	/** @flags: Combination of ``DRM_PVR_SYNC_OP_FLAG_`` flags. */ | ||
| 1073 | 	__u32 flags; | ||
| 1074 | |||
| 1075 | 	/** @value: Timeline value for this drm_syncobj. MBZ for a binary syncobj. */ | ||
| 1076 | 	__u64 value; | ||
| 1077 | }; | ||
| 1078 | |||
| 1079 | /** | ||
| 1080 | * DOC: Flags for SUBMIT_JOB ioctl geometry command. | ||
| 1081 | * | ||
| 1082 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_GEOM_CMD_FIRST | ||
| 1083 | * | ||
| 1084 | * Indicates if this the first command to be issued for a render. | ||
| 1085 | * | ||
| 1086 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST | ||
| 1087 | * | ||
| 1088 | * Indicates if this the last command to be issued for a render. | ||
| 1089 | * | ||
| 1090 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE | ||
| 1091 | * | ||
| 1092 | * Forces to use single core in a multi core device. | ||
| 1093 | * | ||
| 1094 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_GEOM_CMD_FLAGS_MASK | ||
| 1095 | * | ||
| 1096 | * Logical OR of all the geometry cmd flags. | ||
| 1097 | */ | ||
| 1098 | #define DRM_PVR_SUBMIT_JOB_GEOM_CMD_FIRST _BITULL(0) | ||
| 1099 | #define DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST _BITULL(1) | ||
| 1100 | #define DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE _BITULL(2) | ||
| 1101 | #define DRM_PVR_SUBMIT_JOB_GEOM_CMD_FLAGS_MASK \ | ||
| 1102 | 	(DRM_PVR_SUBMIT_JOB_GEOM_CMD_FIRST | \ | ||
| 1103 | 	 DRM_PVR_SUBMIT_JOB_GEOM_CMD_LAST | \ | ||
| 1104 | 	 DRM_PVR_SUBMIT_JOB_GEOM_CMD_SINGLE_CORE) | ||
| 1105 | |||
| 1106 | /** | ||
| 1107 | * DOC: Flags for SUBMIT_JOB ioctl fragment command. | ||
| 1108 | * | ||
| 1109 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_SINGLE_CORE | ||
| 1110 | * | ||
| 1111 | * Use single core in a multi core setup. | ||
| 1112 | * | ||
| 1113 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_DEPTHBUFFER | ||
| 1114 | * | ||
| 1115 | * Indicates whether a depth buffer is present. | ||
| 1116 | * | ||
| 1117 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_STENCILBUFFER | ||
| 1118 | * | ||
| 1119 | * Indicates whether a stencil buffer is present. | ||
| 1120 | * | ||
| 1121 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_PREVENT_CDM_OVERLAP | ||
| 1122 | * | ||
| 1123 | * Disallow compute overlapped with this render. | ||
| 1124 | * | ||
| 1125 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS | ||
| 1126 | * | ||
| 1127 | * Indicates whether this render produces visibility results. | ||
| 1128 | * | ||
| 1129 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_SCRATCHBUFFER | ||
| 1130 | * | ||
| 1131 | * Indicates whether partial renders write to a scratch buffer instead of | ||
| 1132 | * the final surface. It also forces the full screen copy expected to be | ||
| 1133 | * present on the last render after all partial renders have completed. | ||
| 1134 | * | ||
| 1135 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE | ||
| 1136 | * | ||
| 1137 | * Disable pixel merging for this render. | ||
| 1138 | * | ||
| 1139 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_FRAG_CMD_FLAGS_MASK | ||
| 1140 | * | ||
| 1141 | * Logical OR of all the fragment cmd flags. | ||
| 1142 | */ | ||
| 1143 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_SINGLE_CORE _BITULL(0) | ||
| 1144 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_DEPTHBUFFER _BITULL(1) | ||
| 1145 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_STENCILBUFFER _BITULL(2) | ||
| 1146 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_PREVENT_CDM_OVERLAP _BITULL(3) | ||
| 1147 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_SCRATCHBUFFER _BITULL(4) | ||
| 1148 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS _BITULL(5) | ||
| 1149 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_PARTIAL_RENDER _BITULL(6) | ||
| 1150 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE _BITULL(7) | ||
| 1151 | #define DRM_PVR_SUBMIT_JOB_FRAG_CMD_FLAGS_MASK \ | ||
| 1152 | 	(DRM_PVR_SUBMIT_JOB_FRAG_CMD_SINGLE_CORE | \ | ||
| 1153 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_DEPTHBUFFER | \ | ||
| 1154 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_STENCILBUFFER | \ | ||
| 1155 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_PREVENT_CDM_OVERLAP | \ | ||
| 1156 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_SCRATCHBUFFER | \ | ||
| 1157 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_GET_VIS_RESULTS | \ | ||
| 1158 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_PARTIAL_RENDER | \ | ||
| 1159 | 	 DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE) | ||
| 1160 | |||
| 1161 | /** | ||
| 1162 | * DOC: Flags for SUBMIT_JOB ioctl compute command. | ||
| 1163 | * | ||
| 1164 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP | ||
| 1165 | * | ||
| 1166 | * Disallow other jobs overlapped with this compute. | ||
| 1167 | * | ||
| 1168 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE | ||
| 1169 | * | ||
| 1170 | * Forces to use single core in a multi core device. | ||
| 1171 | * | ||
| 1172 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_FLAGS_MASK | ||
| 1173 | * | ||
| 1174 | * Logical OR of all the compute cmd flags. | ||
| 1175 | */ | ||
| 1176 | #define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP _BITULL(0) | ||
| 1177 | #define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE _BITULL(1) | ||
| 1178 | #define DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_FLAGS_MASK \ | ||
| 1179 | 	(DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_PREVENT_ALL_OVERLAP | \ | ||
| 1180 | 	 DRM_PVR_SUBMIT_JOB_COMPUTE_CMD_SINGLE_CORE) | ||
| 1181 | |||
| 1182 | /** | ||
| 1183 | * DOC: Flags for SUBMIT_JOB ioctl transfer command. | ||
| 1184 | * | ||
| 1185 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE | ||
| 1186 | * | ||
| 1187 | * Forces job to use a single core in a multi core device. | ||
| 1188 | * | ||
| 1189 | * .. c:macro:: DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_FLAGS_MASK | ||
| 1190 | * | ||
| 1191 | * Logical OR of all the transfer cmd flags. | ||
| 1192 | */ | ||
| 1193 | #define DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE _BITULL(0) | ||
| 1194 | |||
| 1195 | #define DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_FLAGS_MASK \ | ||
| 1196 | 	DRM_PVR_SUBMIT_JOB_TRANSFER_CMD_SINGLE_CORE | ||
| 1197 | |||
| 1198 | /** | ||
| 1199 | * enum drm_pvr_job_type - Arguments for &struct drm_pvr_job.job_type | ||
| 1200 | */ | ||
| 1201 | enum drm_pvr_job_type { | ||
| 1202 | 	/** @DRM_PVR_JOB_TYPE_GEOMETRY: Job type is geometry. */ | ||
| 1203 | 	DRM_PVR_JOB_TYPE_GEOMETRY = 0, | ||
| 1204 | |||
| 1205 | 	/** @DRM_PVR_JOB_TYPE_FRAGMENT: Job type is fragment. */ | ||
| 1206 | 	DRM_PVR_JOB_TYPE_FRAGMENT, | ||
| 1207 | |||
| 1208 | 	/** @DRM_PVR_JOB_TYPE_COMPUTE: Job type is compute. */ | ||
| 1209 | 	DRM_PVR_JOB_TYPE_COMPUTE, | ||
| 1210 | |||
| 1211 | 	/** @DRM_PVR_JOB_TYPE_TRANSFER_FRAG: Job type is a fragment transfer. */ | ||
| 1212 | 	DRM_PVR_JOB_TYPE_TRANSFER_FRAG, | ||
| 1213 | }; | ||
| 1214 | |||
| 1215 | /** | ||
| 1216 | * struct drm_pvr_hwrt_data_ref - Reference HWRT data | ||
| 1217 | */ | ||
| 1218 | struct drm_pvr_hwrt_data_ref { | ||
| 1219 | 	/** @set_handle: HWRT data set handle. */ | ||
| 1220 | 	__u32 set_handle; | ||
| 1221 | |||
| 1222 | 	/** @data_index: Index of the HWRT data inside the data set. */ | ||
| 1223 | 	__u32 data_index; | ||
| 1224 | }; | ||
| 1225 | |||
| 1226 | /** | ||
| 1227 | * struct drm_pvr_job - Job arguments passed to the %DRM_IOCTL_PVR_SUBMIT_JOBS ioctl | ||
| 1228 | */ | ||
| 1229 | struct drm_pvr_job { | ||
| 1230 | 	/** | ||
| 1231 | 	 * @type: [IN] Type of job being submitted | ||
| 1232 | 	 * | ||
| 1233 | 	 * This must be one of the values defined by &enum drm_pvr_job_type. | ||
| 1234 | 	 */ | ||
| 1235 | 	__u32 type; | ||
| 1236 | |||
| 1237 | 	/** | ||
| 1238 | 	 * @context_handle: [IN] Context handle. | ||
| 1239 | 	 * | ||
| 1240 | 	 * When @job_type is %DRM_PVR_JOB_TYPE_RENDER, %DRM_PVR_JOB_TYPE_COMPUTE or | ||
| 1241 | 	 * %DRM_PVR_JOB_TYPE_TRANSFER_FRAG, this must be a valid handle returned by | ||
| 1242 | 	 * %DRM_IOCTL_PVR_CREATE_CONTEXT. The type of context must be compatible | ||
| 1243 | 	 * with the type of job being submitted. | ||
| 1244 | 	 * | ||
| 1245 | 	 * When @job_type is %DRM_PVR_JOB_TYPE_NULL, this must be zero. | ||
| 1246 | 	 */ | ||
| 1247 | 	__u32 context_handle; | ||
| 1248 | |||
| 1249 | 	/** | ||
| 1250 | 	 * @flags: [IN] Flags for command. | ||
| 1251 | 	 * | ||
| 1252 | 	 * Those are job-dependent. See all ``DRM_PVR_SUBMIT_JOB_*``. | ||
| 1253 | 	 */ | ||
| 1254 | 	__u32 flags; | ||
| 1255 | |||
| 1256 | 	/** | ||
| 1257 | 	 * @cmd_stream_len: [IN] Length of command stream, in bytes. | ||
| 1258 | 	 */ | ||
| 1259 | 	__u32 cmd_stream_len; | ||
| 1260 | |||
| 1261 | 	/** | ||
| 1262 | 	 * @cmd_stream: [IN] Pointer to command stream for command. | ||
| 1263 | 	 * | ||
| 1264 | 	 * The command stream must be u64-aligned. | ||
| 1265 | 	 */ | ||
| 1266 | 	__u64 cmd_stream; | ||
| 1267 | |||
| 1268 | 	/** @sync_ops: [IN] Fragment sync operations. */ | ||
| 1269 | 	struct drm_pvr_obj_array sync_ops; | ||
| 1270 | |||
| 1271 | 	/** | ||
| 1272 | 	 * @hwrt: [IN] HWRT data used by render jobs (geometry or fragment). | ||
| 1273 | 	 * | ||
| 1274 | 	 * Must be zero for non-render jobs. | ||
| 1275 | 	 */ | ||
| 1276 | 	struct drm_pvr_hwrt_data_ref hwrt; | ||
| 1277 | }; | ||
| 1278 | |||
| 1279 | /** | ||
| 1280 | * struct drm_pvr_ioctl_submit_jobs_args - Arguments for %DRM_IOCTL_PVR_SUBMIT_JOB | ||
| 1281 | * | ||
| 1282 | * If the syscall returns an error it is important to check the value of | ||
| 1283 | * @jobs.count. This indicates the index into @jobs.array where the | ||
| 1284 | * error occurred. | ||
| 1285 | */ | ||
| 1286 | struct drm_pvr_ioctl_submit_jobs_args { | ||
| 1287 | 	/** @jobs: [IN] Array of jobs to submit. */ | ||
| 1288 | 	struct drm_pvr_obj_array jobs; | ||
| 1289 | }; | ||
| 1290 | |||
| 1291 | #if defined(__cplusplus) | ||
| 1292 | } | ||
| 1293 | #endif | ||
| 1294 | |||
| 1295 | #endif /* PVR_DRM_UAPI_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/qaic_accel.h created+399| ... | @@ -0,0 +1,399 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note | ||
| 2 | * | ||
| 3 | * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. | ||
| 4 | * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef QAIC_ACCEL_H_ | ||
| 8 | #define QAIC_ACCEL_H_ | ||
| 9 | |||
| 10 | #include "drm.h" | ||
| 11 | |||
| 12 | #if defined(__cplusplus) | ||
| 13 | extern "C" { | ||
| 14 | #endif | ||
| 15 | |||
| 16 | /* The length(4K) includes len and count fields of qaic_manage_msg */ | ||
| 17 | #define QAIC_MANAGE_MAX_MSG_LENGTH SZ_4K | ||
| 18 | |||
| 19 | /* semaphore flags */ | ||
| 20 | #define QAIC_SEM_INSYNCFENCE	2 | ||
| 21 | #define QAIC_SEM_OUTSYNCFENCE	1 | ||
| 22 | |||
| 23 | /* Semaphore commands */ | ||
| 24 | #define QAIC_SEM_NOP		0 | ||
| 25 | #define QAIC_SEM_INIT		1 | ||
| 26 | #define QAIC_SEM_INC		2 | ||
| 27 | #define QAIC_SEM_DEC		3 | ||
| 28 | #define QAIC_SEM_WAIT_EQUAL	4 | ||
| 29 | #define QAIC_SEM_WAIT_GT_EQ	5 /* Greater than or equal */ | ||
| 30 | #define QAIC_SEM_WAIT_GT_0	6 /* Greater than 0 */ | ||
| 31 | |||
| 32 | #define QAIC_TRANS_UNDEFINED			0 | ||
| 33 | #define QAIC_TRANS_PASSTHROUGH_FROM_USR		1 | ||
| 34 | #define QAIC_TRANS_PASSTHROUGH_TO_USR		2 | ||
| 35 | #define QAIC_TRANS_PASSTHROUGH_FROM_DEV		3 | ||
| 36 | #define QAIC_TRANS_PASSTHROUGH_TO_DEV		4 | ||
| 37 | #define QAIC_TRANS_DMA_XFER_FROM_USR		5 | ||
| 38 | #define QAIC_TRANS_DMA_XFER_TO_DEV		6 | ||
| 39 | #define QAIC_TRANS_ACTIVATE_FROM_USR		7 | ||
| 40 | #define QAIC_TRANS_ACTIVATE_FROM_DEV		8 | ||
| 41 | #define QAIC_TRANS_ACTIVATE_TO_DEV		9 | ||
| 42 | #define QAIC_TRANS_DEACTIVATE_FROM_USR		10 | ||
| 43 | #define QAIC_TRANS_DEACTIVATE_FROM_DEV		11 | ||
| 44 | #define QAIC_TRANS_STATUS_FROM_USR		12 | ||
| 45 | #define QAIC_TRANS_STATUS_TO_USR		13 | ||
| 46 | #define QAIC_TRANS_STATUS_FROM_DEV		14 | ||
| 47 | #define QAIC_TRANS_STATUS_TO_DEV		15 | ||
| 48 | #define QAIC_TRANS_TERMINATE_FROM_DEV		16 | ||
| 49 | #define QAIC_TRANS_TERMINATE_TO_DEV		17 | ||
| 50 | #define QAIC_TRANS_DMA_XFER_CONT		18 | ||
| 51 | #define QAIC_TRANS_VALIDATE_PARTITION_FROM_DEV	19 | ||
| 52 | #define QAIC_TRANS_VALIDATE_PARTITION_TO_DEV	20 | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct qaic_manage_trans_hdr - Header for a transaction in a manage message. | ||
| 56 | * @type: In. Identifies this transaction. See QAIC_TRANS_* defines. | ||
| 57 | * @len: In. Length of this transaction, including this header. | ||
| 58 | */ | ||
| 59 | struct qaic_manage_trans_hdr { | ||
| 60 | 	__u32 type; | ||
| 61 | 	__u32 len; | ||
| 62 | }; | ||
| 63 | |||
| 64 | /** | ||
| 65 | * struct qaic_manage_trans_passthrough - Defines a passthrough transaction. | ||
| 66 | * @hdr: In. Header to identify this transaction. | ||
| 67 | * @data: In. Payload of this ransaction. Opaque to the driver. Userspace must | ||
| 68 | *	 encode in little endian and align/pad to 64-bit. | ||
| 69 | */ | ||
| 70 | struct qaic_manage_trans_passthrough { | ||
| 71 | 	struct qaic_manage_trans_hdr hdr; | ||
| 72 | 	__u8 data[]; | ||
| 73 | }; | ||
| 74 | |||
| 75 | /** | ||
| 76 | * struct qaic_manage_trans_dma_xfer - Defines a DMA transfer transaction. | ||
| 77 | * @hdr: In. Header to identify this transaction. | ||
| 78 | * @tag: In. Identified this transfer in other transactions. Opaque to the | ||
| 79 | *	 driver. | ||
| 80 | * @pad: Structure padding. | ||
| 81 | * @addr: In. Address of the data to DMA to the device. | ||
| 82 | * @size: In. Length of the data to DMA to the device. | ||
| 83 | */ | ||
| 84 | struct qaic_manage_trans_dma_xfer { | ||
| 85 | 	struct qaic_manage_trans_hdr hdr; | ||
| 86 | 	__u32 tag; | ||
| 87 | 	__u32 pad; | ||
| 88 | 	__u64 addr; | ||
| 89 | 	__u64 size; | ||
| 90 | }; | ||
| 91 | |||
| 92 | /** | ||
| 93 | * struct qaic_manage_trans_activate_to_dev - Defines an activate request. | ||
| 94 | * @hdr: In. Header to identify this transaction. | ||
| 95 | * @queue_size: In. Number of elements for DBC request and response queues. | ||
| 96 | * @eventfd: Unused. | ||
| 97 | * @options: In. Device specific options for this activate. | ||
| 98 | * @pad: Structure padding. Must be 0. | ||
| 99 | */ | ||
| 100 | struct qaic_manage_trans_activate_to_dev { | ||
| 101 | 	struct qaic_manage_trans_hdr hdr; | ||
| 102 | 	__u32 queue_size; | ||
| 103 | 	__u32 eventfd; | ||
| 104 | 	__u32 options; | ||
| 105 | 	__u32 pad; | ||
| 106 | }; | ||
| 107 | |||
| 108 | /** | ||
| 109 | * struct qaic_manage_trans_activate_from_dev - Defines an activate response. | ||
| 110 | * @hdr: Out. Header to identify this transaction. | ||
| 111 | * @status: Out. Return code of the request from the device. | ||
| 112 | * @dbc_id: Out. Id of the assigned DBC for successful request. | ||
| 113 | * @options: Out. Device specific options for this activate. | ||
| 114 | */ | ||
| 115 | struct qaic_manage_trans_activate_from_dev { | ||
| 116 | 	struct qaic_manage_trans_hdr hdr; | ||
| 117 | 	__u32 status; | ||
| 118 | 	__u32 dbc_id; | ||
| 119 | 	__u64 options; | ||
| 120 | }; | ||
| 121 | |||
| 122 | /** | ||
| 123 | * struct qaic_manage_trans_deactivate - Defines a deactivate request. | ||
| 124 | * @hdr: In. Header to identify this transaction. | ||
| 125 | * @dbc_id: In. Id of assigned DBC. | ||
| 126 | * @pad: Structure padding. Must be 0. | ||
| 127 | */ | ||
| 128 | struct qaic_manage_trans_deactivate { | ||
| 129 | 	struct qaic_manage_trans_hdr hdr; | ||
| 130 | 	__u32 dbc_id; | ||
| 131 | 	__u32 pad; | ||
| 132 | }; | ||
| 133 | |||
| 134 | /** | ||
| 135 | * struct qaic_manage_trans_status_to_dev - Defines a status request. | ||
| 136 | * @hdr: In. Header to identify this transaction. | ||
| 137 | */ | ||
| 138 | struct qaic_manage_trans_status_to_dev { | ||
| 139 | 	struct qaic_manage_trans_hdr hdr; | ||
| 140 | }; | ||
| 141 | |||
| 142 | /** | ||
| 143 | * struct qaic_manage_trans_status_from_dev - Defines a status response. | ||
| 144 | * @hdr: Out. Header to identify this transaction. | ||
| 145 | * @major: Out. NNC protocol version major number. | ||
| 146 | * @minor: Out. NNC protocol version minor number. | ||
| 147 | * @status: Out. Return code from device. | ||
| 148 | * @status_flags: Out. Flags from device. Bit 0 indicates if CRCs are required. | ||
| 149 | */ | ||
| 150 | struct qaic_manage_trans_status_from_dev { | ||
| 151 | 	struct qaic_manage_trans_hdr hdr; | ||
| 152 | 	__u16 major; | ||
| 153 | 	__u16 minor; | ||
| 154 | 	__u32 status; | ||
| 155 | 	__u64 status_flags; | ||
| 156 | }; | ||
| 157 | |||
| 158 | /** | ||
| 159 | * struct qaic_manage_msg - Defines a message to the device. | ||
| 160 | * @len: In. Length of all the transactions contained within this message. | ||
| 161 | * @count: In. Number of transactions in this message. | ||
| 162 | * @data: In. Address to an array where the transactions can be found. | ||
| 163 | */ | ||
| 164 | struct qaic_manage_msg { | ||
| 165 | 	__u32 len; | ||
| 166 | 	__u32 count; | ||
| 167 | 	__u64 data; | ||
| 168 | }; | ||
| 169 | |||
| 170 | /** | ||
| 171 | * struct qaic_create_bo - Defines a request to create a buffer object. | ||
| 172 | * @size: In. Size of the buffer in bytes. | ||
| 173 | * @handle: Out. GEM handle for the BO. | ||
| 174 | * @pad: Structure padding. Must be 0. | ||
| 175 | */ | ||
| 176 | struct qaic_create_bo { | ||
| 177 | 	__u64 size; | ||
| 178 | 	__u32 handle; | ||
| 179 | 	__u32 pad; | ||
| 180 | }; | ||
| 181 | |||
| 182 | /** | ||
| 183 | * struct qaic_mmap_bo - Defines a request to prepare a BO for mmap(). | ||
| 184 | * @handle: In. Handle of the GEM BO to prepare for mmap(). | ||
| 185 | * @pad: Structure padding. Must be 0. | ||
| 186 | * @offset: Out. Offset value to provide to mmap(). | ||
| 187 | */ | ||
| 188 | struct qaic_mmap_bo { | ||
| 189 | 	__u32 handle; | ||
| 190 | 	__u32 pad; | ||
| 191 | 	__u64 offset; | ||
| 192 | }; | ||
| 193 | |||
| 194 | /** | ||
| 195 | * struct qaic_sem - Defines a semaphore command for a BO slice. | ||
| 196 | * @val: In. Only lower 12 bits are valid. | ||
| 197 | * @index: In. Only lower 5 bits are valid. | ||
| 198 | * @presync: In. 1 if presync operation, 0 if postsync. | ||
| 199 | * @cmd: In. One of QAIC_SEM_*. | ||
| 200 | * @flags: In. Bitfield. See QAIC_SEM_INSYNCFENCE and QAIC_SEM_OUTSYNCFENCE | ||
| 201 | * @pad: Structure padding. Must be 0. | ||
| 202 | */ | ||
| 203 | struct qaic_sem { | ||
| 204 | 	__u16 val; | ||
| 205 | 	__u8 index; | ||
| 206 | 	__u8 presync; | ||
| 207 | 	__u8 cmd; | ||
| 208 | 	__u8 flags; | ||
| 209 | 	__u16 pad; | ||
| 210 | }; | ||
| 211 | |||
| 212 | /** | ||
| 213 | * struct qaic_attach_slice_entry - Defines a single BO slice. | ||
| 214 | * @size: In. Size of this slice in bytes. | ||
| 215 | * @sem0: In. Semaphore command 0. Must be 0 is not valid. | ||
| 216 | * @sem1: In. Semaphore command 1. Must be 0 is not valid. | ||
| 217 | * @sem2: In. Semaphore command 2. Must be 0 is not valid. | ||
| 218 | * @sem3: In. Semaphore command 3. Must be 0 is not valid. | ||
| 219 | * @dev_addr: In. Device address this slice pushes to or pulls from. | ||
| 220 | * @db_addr: In. Address of the doorbell to ring. | ||
| 221 | * @db_data: In. Data to write to the doorbell. | ||
| 222 | * @db_len: In. Size of the doorbell data in bits - 32, 16, or 8. 0 is for | ||
| 223 | *	 inactive doorbells. | ||
| 224 | * @offset: In. Start of this slice as an offset from the start of the BO. | ||
| 225 | */ | ||
| 226 | struct qaic_attach_slice_entry { | ||
| 227 | 	__u64 size; | ||
| 228 | 	struct qaic_sem	sem0; | ||
| 229 | 	struct qaic_sem	sem1; | ||
| 230 | 	struct qaic_sem	sem2; | ||
| 231 | 	struct qaic_sem	sem3; | ||
| 232 | 	__u64 dev_addr; | ||
| 233 | 	__u64 db_addr; | ||
| 234 | 	__u32 db_data; | ||
| 235 | 	__u32 db_len; | ||
| 236 | 	__u64 offset; | ||
| 237 | }; | ||
| 238 | |||
| 239 | /** | ||
| 240 | * struct qaic_attach_slice_hdr - Defines metadata for a set of BO slices. | ||
| 241 | * @count: In. Number of slices for this BO. | ||
| 242 | * @dbc_id: In. Associate the sliced BO with this DBC. | ||
| 243 | * @handle: In. GEM handle of the BO to slice. | ||
| 244 | * @dir: In. Direction of data flow. 1 = DMA_TO_DEVICE, 2 = DMA_FROM_DEVICE | ||
| 245 | * @size: Deprecated. This value is ignored and size of @handle is used instead. | ||
| 246 | */ | ||
| 247 | struct qaic_attach_slice_hdr { | ||
| 248 | 	__u32 count; | ||
| 249 | 	__u32 dbc_id; | ||
| 250 | 	__u32 handle; | ||
| 251 | 	__u32 dir; | ||
| 252 | 	__u64 size; | ||
| 253 | }; | ||
| 254 | |||
| 255 | /** | ||
| 256 | * struct qaic_attach_slice - Defines a set of BO slices. | ||
| 257 | * @hdr: In. Metadata of the set of slices. | ||
| 258 | * @data: In. Pointer to an array containing the slice definitions. | ||
| 259 | */ | ||
| 260 | struct qaic_attach_slice { | ||
| 261 | 	struct qaic_attach_slice_hdr hdr; | ||
| 262 | 	__u64 data; | ||
| 263 | }; | ||
| 264 | |||
| 265 | /** | ||
| 266 | * struct qaic_execute_entry - Defines a BO to submit to the device. | ||
| 267 | * @handle: In. GEM handle of the BO to commit to the device. | ||
| 268 | * @dir: In. Direction of data. 1 = to device, 2 = from device. | ||
| 269 | */ | ||
| 270 | struct qaic_execute_entry { | ||
| 271 | 	__u32 handle; | ||
| 272 | 	__u32 dir; | ||
| 273 | }; | ||
| 274 | |||
| 275 | /** | ||
| 276 | * struct qaic_partial_execute_entry - Defines a BO to resize and submit. | ||
| 277 | * @handle: In. GEM handle of the BO to commit to the device. | ||
| 278 | * @dir: In. Direction of data. 1 = to device, 2 = from device. | ||
| 279 | * @resize: In. New size of the BO. Must be <= the original BO size. | ||
| 280 | *	 @resize as 0 would be interpreted as no DMA transfer is | ||
| 281 | *	 involved. | ||
| 282 | */ | ||
| 283 | struct qaic_partial_execute_entry { | ||
| 284 | 	__u32 handle; | ||
| 285 | 	__u32 dir; | ||
| 286 | 	__u64 resize; | ||
| 287 | }; | ||
| 288 | |||
| 289 | /** | ||
| 290 | * struct qaic_execute_hdr - Defines metadata for BO submission. | ||
| 291 | * @count: In. Number of BOs to submit. | ||
| 292 | * @dbc_id: In. DBC to submit the BOs on. | ||
| 293 | */ | ||
| 294 | struct qaic_execute_hdr { | ||
| 295 | 	__u32 count; | ||
| 296 | 	__u32 dbc_id; | ||
| 297 | }; | ||
| 298 | |||
| 299 | /** | ||
| 300 | * struct qaic_execute - Defines a list of BOs to submit to the device. | ||
| 301 | * @hdr: In. BO list metadata. | ||
| 302 | * @data: In. Pointer to an array of BOs to submit. | ||
| 303 | */ | ||
| 304 | struct qaic_execute { | ||
| 305 | 	struct qaic_execute_hdr hdr; | ||
| 306 | 	__u64 data; | ||
| 307 | }; | ||
| 308 | |||
| 309 | /** | ||
| 310 | * struct qaic_wait - Defines a blocking wait for BO execution. | ||
| 311 | * @handle: In. GEM handle of the BO to wait on. | ||
| 312 | * @timeout: In. Maximum time in ms to wait for the BO. | ||
| 313 | * @dbc_id: In. DBC the BO is submitted to. | ||
| 314 | * @pad: Structure padding. Must be 0. | ||
| 315 | */ | ||
| 316 | struct qaic_wait { | ||
| 317 | 	__u32 handle; | ||
| 318 | 	__u32 timeout; | ||
| 319 | 	__u32 dbc_id; | ||
| 320 | 	__u32 pad; | ||
| 321 | }; | ||
| 322 | |||
| 323 | /** | ||
| 324 | * struct qaic_perf_stats_hdr - Defines metadata for getting BO perf info. | ||
| 325 | * @count: In. Number of BOs requested. | ||
| 326 | * @pad: Structure padding. Must be 0. | ||
| 327 | * @dbc_id: In. DBC the BO are associated with. | ||
| 328 | */ | ||
| 329 | struct qaic_perf_stats_hdr { | ||
| 330 | 	__u16 count; | ||
| 331 | 	__u16 pad; | ||
| 332 | 	__u32 dbc_id; | ||
| 333 | }; | ||
| 334 | |||
| 335 | /** | ||
| 336 | * struct qaic_perf_stats - Defines a request for getting BO perf info. | ||
| 337 | * @hdr: In. Request metadata | ||
| 338 | * @data: In. Pointer to array of stats structures that will receive the data. | ||
| 339 | */ | ||
| 340 | struct qaic_perf_stats { | ||
| 341 | 	struct qaic_perf_stats_hdr hdr; | ||
| 342 | 	__u64 data; | ||
| 343 | }; | ||
| 344 | |||
| 345 | /** | ||
| 346 | * struct qaic_perf_stats_entry - Defines a BO perf info. | ||
| 347 | * @handle: In. GEM handle of the BO to get perf stats for. | ||
| 348 | * @queue_level_before: Out. Number of elements in the queue before this BO | ||
| 349 | *			was submitted. | ||
| 350 | * @num_queue_element: Out. Number of elements added to the queue to submit | ||
| 351 | *		 this BO. | ||
| 352 | * @submit_latency_us: Out. Time taken by the driver to submit this BO. | ||
| 353 | * @device_latency_us: Out. Time taken by the device to execute this BO. | ||
| 354 | * @pad: Structure padding. Must be 0. | ||
| 355 | */ | ||
| 356 | struct qaic_perf_stats_entry { | ||
| 357 | 	__u32 handle; | ||
| 358 | 	__u32 queue_level_before; | ||
| 359 | 	__u32 num_queue_element; | ||
| 360 | 	__u32 submit_latency_us; | ||
| 361 | 	__u32 device_latency_us; | ||
| 362 | 	__u32 pad; | ||
| 363 | }; | ||
| 364 | |||
| 365 | /** | ||
| 366 | * struct qaic_detach_slice - Detaches slicing configuration from BO. | ||
| 367 | * @handle: In. GEM handle of the BO to detach slicing configuration. | ||
| 368 | * @pad: Structure padding. Must be 0. | ||
| 369 | */ | ||
| 370 | struct qaic_detach_slice { | ||
| 371 | 	__u32 handle; | ||
| 372 | 	__u32 pad; | ||
| 373 | }; | ||
| 374 | |||
| 375 | #define DRM_QAIC_MANAGE				0x00 | ||
| 376 | #define DRM_QAIC_CREATE_BO			0x01 | ||
| 377 | #define DRM_QAIC_MMAP_BO			0x02 | ||
| 378 | #define DRM_QAIC_ATTACH_SLICE_BO		0x03 | ||
| 379 | #define DRM_QAIC_EXECUTE_BO			0x04 | ||
| 380 | #define DRM_QAIC_PARTIAL_EXECUTE_BO		0x05 | ||
| 381 | #define DRM_QAIC_WAIT_BO			0x06 | ||
| 382 | #define DRM_QAIC_PERF_STATS_BO			0x07 | ||
| 383 | #define DRM_QAIC_DETACH_SLICE_BO		0x08 | ||
| 384 | |||
| 385 | #define DRM_IOCTL_QAIC_MANAGE			DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MANAGE, struct qaic_manage_msg) | ||
| 386 | #define DRM_IOCTL_QAIC_CREATE_BO		DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_CREATE_BO,	struct qaic_create_bo) | ||
| 387 | #define DRM_IOCTL_QAIC_MMAP_BO			DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MMAP_BO, struct qaic_mmap_bo) | ||
| 388 | #define DRM_IOCTL_QAIC_ATTACH_SLICE_BO		DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_ATTACH_SLICE_BO, struct qaic_attach_slice) | ||
| 389 | #define DRM_IOCTL_QAIC_EXECUTE_BO		DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_EXECUTE_BO,	struct qaic_execute) | ||
| 390 | #define DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO	DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_PARTIAL_EXECUTE_BO,	struct qaic_execute) | ||
| 391 | #define DRM_IOCTL_QAIC_WAIT_BO			DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_WAIT_BO, struct qaic_wait) | ||
| 392 | #define DRM_IOCTL_QAIC_PERF_STATS_BO		DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_PERF_STATS_BO, struct qaic_perf_stats) | ||
| 393 | #define DRM_IOCTL_QAIC_DETACH_SLICE_BO		DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_DETACH_SLICE_BO, struct qaic_detach_slice) | ||
| 394 | |||
| 395 | #if defined(__cplusplus) | ||
| 396 | } | ||
| 397 | #endif | ||
| 398 | |||
| 399 | #endif /* QAIC_ACCEL_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/v3d_drm.h+244-1| ... | @@ -41,6 +41,7 @@ extern "C" { | ... | @@ -41,6 +41,7 @@ extern "C" { |
| 41 | #define DRM_V3D_PERFMON_CREATE 0x08 | 41 | #define DRM_V3D_PERFMON_CREATE 0x08 |
| 42 | #define DRM_V3D_PERFMON_DESTROY 0x09 | 42 | #define DRM_V3D_PERFMON_DESTROY 0x09 |
| 43 | #define DRM_V3D_PERFMON_GET_VALUES 0x0a | 43 | #define DRM_V3D_PERFMON_GET_VALUES 0x0a |
| 44 | #define DRM_V3D_SUBMIT_CPU 0x0b | ||
| 44 | 45 | ||
| 45 | #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) | 46 | #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) |
| 46 | #define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) | 47 | #define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) |
| ... | @@ -56,6 +57,7 @@ extern "C" { | ... | @@ -56,6 +57,7 @@ extern "C" { |
| 56 | 						 struct drm_v3d_perfmon_destroy) | 57 | 						 struct drm_v3d_perfmon_destroy) |
| 57 | #define DRM_IOCTL_V3D_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_VALUES, \ | 58 | #define DRM_IOCTL_V3D_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_VALUES, \ |
| 58 | 						 struct drm_v3d_perfmon_get_values) | 59 | 						 struct drm_v3d_perfmon_get_values) |
| 60 | #define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu) | ||
| 59 | 61 | ||
| 60 | #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 | 62 | #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 |
| 61 | #define DRM_V3D_SUBMIT_EXTENSION		 0x02 | 63 | #define DRM_V3D_SUBMIT_EXTENSION		 0x02 |
| ... | @@ -69,7 +71,13 @@ extern "C" { | ... | @@ -69,7 +71,13 @@ extern "C" { |
| 69 | struct drm_v3d_extension { | 71 | struct drm_v3d_extension { |
| 70 | 	__u64 next; | 72 | 	__u64 next; |
| 71 | 	__u32 id; | 73 | 	__u32 id; |
| 72 | #define DRM_V3D_EXT_ID_MULTI_SYNC		0x01 | 74 | #define DRM_V3D_EXT_ID_MULTI_SYNC			0x01 |
| 75 | #define DRM_V3D_EXT_ID_CPU_INDIRECT_CSD		0x02 | ||
| 76 | #define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY		0x03 | ||
| 77 | #define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY	0x04 | ||
| 78 | #define DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY	0x05 | ||
| 79 | #define DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY	0x06 | ||
| 80 | #define DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY	0x07 | ||
| 73 | 	__u32 flags; /* mbz */ | 81 | 	__u32 flags; /* mbz */ |
| 74 | }; | 82 | }; |
| 75 | 83 | ||
| ... | @@ -93,6 +101,7 @@ enum v3d_queue { | ... | @@ -93,6 +101,7 @@ enum v3d_queue { |
| 93 | 	V3D_TFU, | 101 | 	V3D_TFU, |
| 94 | 	V3D_CSD, | 102 | 	V3D_CSD, |
| 95 | 	V3D_CACHE_CLEAN, | 103 | 	V3D_CACHE_CLEAN, |
| 104 | 	V3D_CPU, | ||
| 96 | }; | 105 | }; |
| 97 | 106 | ||
| 98 | /** | 107 | /** |
| ... | @@ -276,6 +285,7 @@ enum drm_v3d_param { | ... | @@ -276,6 +285,7 @@ enum drm_v3d_param { |
| 276 | 	DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH, | 285 | 	DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH, |
| 277 | 	DRM_V3D_PARAM_SUPPORTS_PERFMON, | 286 | 	DRM_V3D_PARAM_SUPPORTS_PERFMON, |
| 278 | 	DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT, | 287 | 	DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT, |
| 288 | 	DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE, | ||
| 279 | }; | 289 | }; |
| 280 | 290 | ||
| 281 | struct drm_v3d_get_param { | 291 | struct drm_v3d_get_param { |
| ... | @@ -319,6 +329,11 @@ struct drm_v3d_submit_tfu { | ... | @@ -319,6 +329,11 @@ struct drm_v3d_submit_tfu { |
| 319 | 329 | ||
| 320 | 	/* Pointer to an array of ioctl extensions*/ | 330 | 	/* Pointer to an array of ioctl extensions*/ |
| 321 | 	__u64 extensions; | 331 | 	__u64 extensions; |
| 332 | |||
| 333 | 	struct { | ||
| 334 | 		__u32 ioc; | ||
| 335 | 		__u32 pad; | ||
| 336 | 	} v71; | ||
| 322 | }; | 337 | }; |
| 323 | 338 | ||
| 324 | /* Submits a compute shader for dispatch. This job will block on any | 339 | /* Submits a compute shader for dispatch. This job will block on any |
| ... | @@ -356,6 +371,234 @@ struct drm_v3d_submit_csd { | ... | @@ -356,6 +371,234 @@ struct drm_v3d_submit_csd { |
| 356 | 	__u32 pad; | 371 | 	__u32 pad; |
| 357 | }; | 372 | }; |
| 358 | 373 | ||
| 374 | /** | ||
| 375 | * struct drm_v3d_indirect_csd - ioctl extension for the CPU job to create an | ||
| 376 | * indirect CSD | ||
| 377 | * | ||
| 378 | * When an extension of DRM_V3D_EXT_ID_CPU_INDIRECT_CSD id is defined, it | ||
| 379 | * points to this extension to define a indirect CSD submission. It creates a | ||
| 380 | * CPU job linked to a CSD job. The CPU job waits for the indirect CSD | ||
| 381 | * dependencies and, once they are signaled, it updates the CSD job config | ||
| 382 | * before allowing the CSD job execution. | ||
| 383 | */ | ||
| 384 | struct drm_v3d_indirect_csd { | ||
| 385 | 	struct drm_v3d_extension base; | ||
| 386 | |||
| 387 | 	/* Indirect CSD */ | ||
| 388 | 	struct drm_v3d_submit_csd submit; | ||
| 389 | |||
| 390 | 	/* Handle of the indirect BO, that should be also attached to the | ||
| 391 | 	 * indirect CSD. | ||
| 392 | 	 */ | ||
| 393 | 	__u32 indirect; | ||
| 394 | |||
| 395 | 	/* Offset within the BO where the workgroup counts are stored */ | ||
| 396 | 	__u32 offset; | ||
| 397 | |||
| 398 | 	/* Workgroups size */ | ||
| 399 | 	__u32 wg_size; | ||
| 400 | |||
| 401 | 	/* Indices of the uniforms with the workgroup dispatch counts | ||
| 402 | 	 * in the uniform stream. If the uniform rewrite is not needed, | ||
| 403 | 	 * the offset must be 0xffffffff. | ||
| 404 | 	 */ | ||
| 405 | 	__u32 wg_uniform_offsets[3]; | ||
| 406 | }; | ||
| 407 | |||
| 408 | /** | ||
| 409 | * struct drm_v3d_timestamp_query - ioctl extension for the CPU job to calculate | ||
| 410 | * a timestamp query | ||
| 411 | * | ||
| 412 | * When an extension DRM_V3D_EXT_ID_TIMESTAMP_QUERY is defined, it points to | ||
| 413 | * this extension to define a timestamp query submission. This CPU job will | ||
| 414 | * calculate the timestamp query and update the query value within the | ||
| 415 | * timestamp BO. Moreover, it will signal the timestamp syncobj to indicate | ||
| 416 | * query availability. | ||
| 417 | */ | ||
| 418 | struct drm_v3d_timestamp_query { | ||
| 419 | 	struct drm_v3d_extension base; | ||
| 420 | |||
| 421 | 	/* Array of queries' offsets within the timestamp BO for their value */ | ||
| 422 | 	__u64 offsets; | ||
| 423 | |||
| 424 | 	/* Array of timestamp's syncobjs to indicate its availability */ | ||
| 425 | 	__u64 syncs; | ||
| 426 | |||
| 427 | 	/* Number of queries */ | ||
| 428 | 	__u32 count; | ||
| 429 | |||
| 430 | 	/* mbz */ | ||
| 431 | 	__u32 pad; | ||
| 432 | }; | ||
| 433 | |||
| 434 | /** | ||
| 435 | * struct drm_v3d_reset_timestamp_query - ioctl extension for the CPU job to | ||
| 436 | * reset timestamp queries | ||
| 437 | * | ||
| 438 | * When an extension DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY is defined, it | ||
| 439 | * points to this extension to define a reset timestamp submission. This CPU | ||
| 440 | * job will reset the timestamp queries based on value offset of the first | ||
| 441 | * query. Moreover, it will reset the timestamp syncobj to reset query | ||
| 442 | * availability. | ||
| 443 | */ | ||
| 444 | struct drm_v3d_reset_timestamp_query { | ||
| 445 | 	struct drm_v3d_extension base; | ||
| 446 | |||
| 447 | 	/* Array of timestamp's syncobjs to indicate its availability */ | ||
| 448 | 	__u64 syncs; | ||
| 449 | |||
| 450 | 	/* Offset of the first query within the timestamp BO for its value */ | ||
| 451 | 	__u32 offset; | ||
| 452 | |||
| 453 | 	/* Number of queries */ | ||
| 454 | 	__u32 count; | ||
| 455 | }; | ||
| 456 | |||
| 457 | /** | ||
| 458 | * struct drm_v3d_copy_timestamp_query - ioctl extension for the CPU job to copy | ||
| 459 | * query results to a buffer | ||
| 460 | * | ||
| 461 | * When an extension DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY is defined, it | ||
| 462 | * points to this extension to define a copy timestamp query submission. This | ||
| 463 | * CPU job will copy the timestamp queries results to a BO with the offset | ||
| 464 | * and stride defined in the extension. | ||
| 465 | */ | ||
| 466 | struct drm_v3d_copy_timestamp_query { | ||
| 467 | 	struct drm_v3d_extension base; | ||
| 468 | |||
| 469 | 	/* Define if should write to buffer using 64 or 32 bits */ | ||
| 470 | 	__u8 do_64bit; | ||
| 471 | |||
| 472 | 	/* Define if it can write to buffer even if the query is not available */ | ||
| 473 | 	__u8 do_partial; | ||
| 474 | |||
| 475 | 	/* Define if it should write availability bit to buffer */ | ||
| 476 | 	__u8 availability_bit; | ||
| 477 | |||
| 478 | 	/* mbz */ | ||
| 479 | 	__u8 pad; | ||
| 480 | |||
| 481 | 	/* Offset of the buffer in the BO */ | ||
| 482 | 	__u32 offset; | ||
| 483 | |||
| 484 | 	/* Stride of the buffer in the BO */ | ||
| 485 | 	__u32 stride; | ||
| 486 | |||
| 487 | 	/* Number of queries */ | ||
| 488 | 	__u32 count; | ||
| 489 | |||
| 490 | 	/* Array of queries' offsets within the timestamp BO for their value */ | ||
| 491 | 	__u64 offsets; | ||
| 492 | |||
| 493 | 	/* Array of timestamp's syncobjs to indicate its availability */ | ||
| 494 | 	__u64 syncs; | ||
| 495 | }; | ||
| 496 | |||
| 497 | /** | ||
| 498 | * struct drm_v3d_reset_performance_query - ioctl extension for the CPU job to | ||
| 499 | * reset performance queries | ||
| 500 | * | ||
| 501 | * When an extension DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY is defined, it | ||
| 502 | * points to this extension to define a reset performance submission. This CPU | ||
| 503 | * job will reset the performance queries by resetting the values of the | ||
| 504 | * performance monitors. Moreover, it will reset the syncobj to reset query | ||
| 505 | * availability. | ||
| 506 | */ | ||
| 507 | struct drm_v3d_reset_performance_query { | ||
| 508 | 	struct drm_v3d_extension base; | ||
| 509 | |||
| 510 | 	/* Array of performance queries's syncobjs to indicate its availability */ | ||
| 511 | 	__u64 syncs; | ||
| 512 | |||
| 513 | 	/* Number of queries */ | ||
| 514 | 	__u32 count; | ||
| 515 | |||
| 516 | 	/* Number of performance monitors */ | ||
| 517 | 	__u32 nperfmons; | ||
| 518 | |||
| 519 | 	/* Array of u64 user-pointers that point to an array of kperfmon_ids */ | ||
| 520 | 	__u64 kperfmon_ids; | ||
| 521 | }; | ||
| 522 | |||
| 523 | /** | ||
| 524 | * struct drm_v3d_copy_performance_query - ioctl extension for the CPU job to copy | ||
| 525 | * performance query results to a buffer | ||
| 526 | * | ||
| 527 | * When an extension DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY is defined, it | ||
| 528 | * points to this extension to define a copy performance query submission. This | ||
| 529 | * CPU job will copy the performance queries results to a BO with the offset | ||
| 530 | * and stride defined in the extension. | ||
| 531 | */ | ||
| 532 | struct drm_v3d_copy_performance_query { | ||
| 533 | 	struct drm_v3d_extension base; | ||
| 534 | |||
| 535 | 	/* Define if should write to buffer using 64 or 32 bits */ | ||
| 536 | 	__u8 do_64bit; | ||
| 537 | |||
| 538 | 	/* Define if it can write to buffer even if the query is not available */ | ||
| 539 | 	__u8 do_partial; | ||
| 540 | |||
| 541 | 	/* Define if it should write availability bit to buffer */ | ||
| 542 | 	__u8 availability_bit; | ||
| 543 | |||
| 544 | 	/* mbz */ | ||
| 545 | 	__u8 pad; | ||
| 546 | |||
| 547 | 	/* Offset of the buffer in the BO */ | ||
| 548 | 	__u32 offset; | ||
| 549 | |||
| 550 | 	/* Stride of the buffer in the BO */ | ||
| 551 | 	__u32 stride; | ||
| 552 | |||
| 553 | 	/* Number of performance monitors */ | ||
| 554 | 	__u32 nperfmons; | ||
| 555 | |||
| 556 | 	/* Number of performance counters related to this query pool */ | ||
| 557 | 	__u32 ncounters; | ||
| 558 | |||
| 559 | 	/* Number of queries */ | ||
| 560 | 	__u32 count; | ||
| 561 | |||
| 562 | 	/* Array of performance queries's syncobjs to indicate its availability */ | ||
| 563 | 	__u64 syncs; | ||
| 564 | |||
| 565 | 	/* Array of u64 user-pointers that point to an array of kperfmon_ids */ | ||
| 566 | 	__u64 kperfmon_ids; | ||
| 567 | }; | ||
| 568 | |||
| 569 | struct drm_v3d_submit_cpu { | ||
| 570 | 	/* Pointer to a u32 array of the BOs that are referenced by the job. | ||
| 571 | 	 * | ||
| 572 | 	 * For DRM_V3D_EXT_ID_CPU_INDIRECT_CSD, it must contain only one BO, | ||
| 573 | 	 * that contains the workgroup counts. | ||
| 574 | 	 * | ||
| 575 | 	 * For DRM_V3D_EXT_ID_TIMESTAMP_QUERY, it must contain only one BO, | ||
| 576 | 	 * that will contain the timestamp. | ||
| 577 | 	 * | ||
| 578 | 	 * For DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY, it must contain only | ||
| 579 | 	 * one BO, that contains the timestamp. | ||
| 580 | 	 * | ||
| 581 | 	 * For DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY, it must contain two | ||
| 582 | 	 * BOs. The first is the BO where the timestamp queries will be written | ||
| 583 | 	 * to. The second is the BO that contains the timestamp. | ||
| 584 | 	 * | ||
| 585 | 	 * For DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY, it must contain no | ||
| 586 | 	 * BOs. | ||
| 587 | 	 * | ||
| 588 | 	 * For DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY, it must contain one | ||
| 589 | 	 * BO, where the performance queries will be written. | ||
| 590 | 	 */ | ||
| 591 | 	__u64 bo_handles; | ||
| 592 | |||
| 593 | 	/* Number of BO handles passed in (size is that times 4). */ | ||
| 594 | 	__u32 bo_handle_count; | ||
| 595 | |||
| 596 | 	__u32 flags; | ||
| 597 | |||
| 598 | 	/* Pointer to an array of ioctl extensions*/ | ||
| 599 | 	__u64 extensions; | ||
| 600 | }; | ||
| 601 | |||
| 359 | enum { | 602 | enum { |
| 360 | 	V3D_PERFCNT_FEP_VALID_PRIMTS_NO_PIXELS, | 603 | 	V3D_PERFCNT_FEP_VALID_PRIMTS_NO_PIXELS, |
| 361 | 	V3D_PERFCNT_FEP_VALID_PRIMS, | 604 | 	V3D_PERFCNT_FEP_VALID_PRIMS, |
lib/libc/include/any-linux-any/drm/virtgpu_drm.h+17-1| ... | @@ -64,6 +64,16 @@ struct drm_virtgpu_map { | ... | @@ -64,6 +64,16 @@ struct drm_virtgpu_map { |
| 64 | 	__u32 pad; | 64 | 	__u32 pad; |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | #define VIRTGPU_EXECBUF_SYNCOBJ_RESET		0x01 | ||
| 68 | #define VIRTGPU_EXECBUF_SYNCOBJ_FLAGS ( \ | ||
| 69 | 		VIRTGPU_EXECBUF_SYNCOBJ_RESET | \ | ||
| 70 | 		0) | ||
| 71 | struct drm_virtgpu_execbuffer_syncobj { | ||
| 72 | 	__u32 handle; | ||
| 73 | 	__u32 flags; | ||
| 74 | 	__u64 point; | ||
| 75 | }; | ||
| 76 | |||
| 67 | /* fence_fd is modified on success if VIRTGPU_EXECBUF_FENCE_FD_OUT flag is set. */ | 77 | /* fence_fd is modified on success if VIRTGPU_EXECBUF_FENCE_FD_OUT flag is set. */ |
| 68 | struct drm_virtgpu_execbuffer { | 78 | struct drm_virtgpu_execbuffer { |
| 69 | 	__u32 flags; | 79 | 	__u32 flags; |
| ... | @@ -73,7 +83,11 @@ struct drm_virtgpu_execbuffer { | ... | @@ -73,7 +83,11 @@ struct drm_virtgpu_execbuffer { |
| 73 | 	__u32 num_bo_handles; | 83 | 	__u32 num_bo_handles; |
| 74 | 	__s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */ | 84 | 	__s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */ |
| 75 | 	__u32 ring_idx; /* command ring index (see VIRTGPU_EXECBUF_RING_IDX) */ | 85 | 	__u32 ring_idx; /* command ring index (see VIRTGPU_EXECBUF_RING_IDX) */ |
| 76 | 	__u32 pad; | 86 | 	__u32 syncobj_stride; /* size of @drm_virtgpu_execbuffer_syncobj */ |
| 87 | 	__u32 num_in_syncobjs; | ||
| 88 | 	__u32 num_out_syncobjs; | ||
| 89 | 	__u64 in_syncobjs; | ||
| 90 | 	__u64 out_syncobjs; | ||
| 77 | }; | 91 | }; |
| 78 | 92 | ||
| 79 | #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ | 93 | #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ |
| ... | @@ -83,6 +97,7 @@ struct drm_virtgpu_execbuffer { | ... | @@ -83,6 +97,7 @@ struct drm_virtgpu_execbuffer { |
| 83 | #define VIRTGPU_PARAM_CROSS_DEVICE 5 /* Cross virtio-device resource sharing */ | 97 | #define VIRTGPU_PARAM_CROSS_DEVICE 5 /* Cross virtio-device resource sharing */ |
| 84 | #define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */ | 98 | #define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */ |
| 85 | #define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */ | 99 | #define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */ |
| 100 | #define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME 8 /* Ability to set debug name from userspace */ | ||
| 86 | 101 | ||
| 87 | struct drm_virtgpu_getparam { | 102 | struct drm_virtgpu_getparam { |
| 88 | 	__u64 param; | 103 | 	__u64 param; |
| ... | @@ -184,6 +199,7 @@ struct drm_virtgpu_resource_create_blob { | ... | @@ -184,6 +199,7 @@ struct drm_virtgpu_resource_create_blob { |
| 184 | #define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001 | 199 | #define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001 |
| 185 | #define VIRTGPU_CONTEXT_PARAM_NUM_RINGS 0x0002 | 200 | #define VIRTGPU_CONTEXT_PARAM_NUM_RINGS 0x0002 |
| 186 | #define VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK 0x0003 | 201 | #define VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK 0x0003 |
| 202 | #define VIRTGPU_CONTEXT_PARAM_DEBUG_NAME 0x0004 | ||
| 187 | struct drm_virtgpu_context_set_param { | 203 | struct drm_virtgpu_context_set_param { |
| 188 | 	__u64 param; | 204 | 	__u64 param; |
| 189 | 	__u64 value; | 205 | 	__u64 value; |
lib/libc/include/any-linux-any/drm/vmwgfx_drm.h+4-2| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */ | ||
| 1 | /************************************************************************** | 2 | /************************************************************************** |
| 2 | * | 3 | * |
| 3 | * Copyright © 2009-2022 VMware, Inc., Palo Alto, CA., USA | 4 | * Copyright © 2009-2023 VMware, Inc., Palo Alto, CA., USA |
| 4 | * All Rights Reserved. | 5 | * All Rights Reserved. |
| 5 | * | 6 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 7 | * Permission is hereby granted, free of charge, to any person obtaining a |
| ... | @@ -902,7 +903,8 @@ struct drm_vmw_shader_arg { | ... | @@ -902,7 +903,8 @@ struct drm_vmw_shader_arg { |
| 902 | /** | 903 | /** |
| 903 | * enum drm_vmw_surface_flags | 904 | * enum drm_vmw_surface_flags |
| 904 | * | 905 | * |
| 905 | * @drm_vmw_surface_flag_shareable: Whether the surface is shareable | 906 | * @drm_vmw_surface_flag_shareable: Deprecated - all userspace surfaces are |
| 907 | * shareable. | ||
| 906 | * @drm_vmw_surface_flag_scanout: Whether the surface is a scanout | 908 | * @drm_vmw_surface_flag_scanout: Whether the surface is a scanout |
| 907 | * surface. | 909 | * surface. |
| 908 | * @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is | 910 | * @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is |
lib/libc/include/any-linux-any/drm/xe_drm.h created+1375| ... | @@ -0,0 +1,1375 @@ | ||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | /* | ||
| 3 | * Copyright © 2023 Intel Corporation | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _XE_DRM_H_ | ||
| 7 | #define _XE_DRM_H_ | ||
| 8 | |||
| 9 | #include "drm.h" | ||
| 10 | |||
| 11 | #if defined(__cplusplus) | ||
| 12 | extern "C" { | ||
| 13 | #endif | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Please note that modifications to all structs defined here are | ||
| 17 | * subject to backwards-compatibility constraints. | ||
| 18 | * Sections in this file are organized as follows: | ||
| 19 | * 1. IOCTL definition | ||
| 20 | * 2. Extension definition and helper structs | ||
| 21 | * 3. IOCTL's Query structs in the order of the Query's entries. | ||
| 22 | * 4. The rest of IOCTL structs in the order of IOCTL declaration. | ||
| 23 | */ | ||
| 24 | |||
| 25 | /** | ||
| 26 | * DOC: Xe Device Block Diagram | ||
| 27 | * | ||
| 28 | * The diagram below represents a high-level simplification of a discrete | ||
| 29 | * GPU supported by the Xe driver. It shows some device components which | ||
| 30 | * are necessary to understand this API, as well as how their relations | ||
| 31 | * to each other. This diagram does not represent real hardware:: | ||
| 32 | * | ||
| 33 | * ┌──────────────────────────────────────────────────────────────────┐ | ||
| 34 | * │ ┌──────────────────────────────────────────────────┐ ┌─────────┐ │ | ||
| 35 | * │ │ ┌───────────────────────┐ ┌─────┐ │ │ ┌─────┐ │ │ | ||
| 36 | * │ │ │ VRAM0 ├───┤ ... │ │ │ │VRAM1│ │ │ | ||
| 37 | * │ │ └───────────┬───────────┘ └─GT1─┘ │ │ └──┬──┘ │ │ | ||
| 38 | * │ │ ┌──────────────────┴───────────────────────────┐ │ │ ┌──┴──┐ │ │ | ||
| 39 | * │ │ │ ┌─────────────────────┐ ┌─────────────────┐ │ │ │ │ │ │ │ | ||
| 40 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 41 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │RCS0 │ │BCS0 │ │ │ │ │ │ │ │ │ | ||
| 42 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 43 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 44 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │VCS0 │ │VCS1 │ │ │ │ │ │ │ │ │ | ||
| 45 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 46 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 47 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │VECS0│ │VECS1│ │ │ │ │ │ ... │ │ │ | ||
| 48 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 49 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 50 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │CCS0 │ │CCS1 │ │ │ │ │ │ │ │ │ | ||
| 51 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 52 | * │ │ │ └─────────DSS─────────┘ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 53 | * │ │ │ │ │CCS2 │ │CCS3 │ │ │ │ │ │ │ │ │ | ||
| 54 | * │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 55 | * │ │ │ │ ... │ │ ... │ │ ... │ │ │ │ │ │ │ │ │ │ | ||
| 56 | * │ │ │ └─DSS─┘ └─DSS─┘ └─DSS─┘ └─────Engines─────┘ │ │ │ │ │ │ │ | ||
| 57 | * │ │ └───────────────────────────GT0────────────────┘ │ │ └─GT2─┘ │ │ | ||
| 58 | * │ └────────────────────────────Tile0─────────────────┘ └─ Tile1──┘ │ | ||
| 59 | * └─────────────────────────────Device0───────┬──────────────────────┘ | ||
| 60 | * │ | ||
| 61 | * ───────────────────────┴────────── PCI bus | ||
| 62 | */ | ||
| 63 | |||
| 64 | /** | ||
| 65 | * DOC: Xe uAPI Overview | ||
| 66 | * | ||
| 67 | * This section aims to describe the Xe's IOCTL entries, its structs, and other | ||
| 68 | * Xe related uAPI such as uevents and PMU (Platform Monitoring Unit) related | ||
| 69 | * entries and usage. | ||
| 70 | * | ||
| 71 | * List of supported IOCTLs: | ||
| 72 | * - &DRM_IOCTL_XE_DEVICE_QUERY | ||
| 73 | * - &DRM_IOCTL_XE_GEM_CREATE | ||
| 74 | * - &DRM_IOCTL_XE_GEM_MMAP_OFFSET | ||
| 75 | * - &DRM_IOCTL_XE_VM_CREATE | ||
| 76 | * - &DRM_IOCTL_XE_VM_DESTROY | ||
| 77 | * - &DRM_IOCTL_XE_VM_BIND | ||
| 78 | * - &DRM_IOCTL_XE_EXEC_QUEUE_CREATE | ||
| 79 | * - &DRM_IOCTL_XE_EXEC_QUEUE_DESTROY | ||
| 80 | * - &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY | ||
| 81 | * - &DRM_IOCTL_XE_EXEC | ||
| 82 | * - &DRM_IOCTL_XE_WAIT_USER_FENCE | ||
| 83 | */ | ||
| 84 | |||
| 85 | /* | ||
| 86 | * xe specific ioctls. | ||
| 87 | * | ||
| 88 | * The device specific ioctl range is [DRM_COMMAND_BASE, DRM_COMMAND_END) ie | ||
| 89 | * [0x40, 0xa0) (a0 is excluded). The numbers below are defined as offset | ||
| 90 | * against DRM_COMMAND_BASE and should be between [0x0, 0x60). | ||
| 91 | */ | ||
| 92 | #define DRM_XE_DEVICE_QUERY		0x00 | ||
| 93 | #define DRM_XE_GEM_CREATE		0x01 | ||
| 94 | #define DRM_XE_GEM_MMAP_OFFSET		0x02 | ||
| 95 | #define DRM_XE_VM_CREATE		0x03 | ||
| 96 | #define DRM_XE_VM_DESTROY		0x04 | ||
| 97 | #define DRM_XE_VM_BIND			0x05 | ||
| 98 | #define DRM_XE_EXEC_QUEUE_CREATE	0x06 | ||
| 99 | #define DRM_XE_EXEC_QUEUE_DESTROY	0x07 | ||
| 100 | #define DRM_XE_EXEC_QUEUE_GET_PROPERTY	0x08 | ||
| 101 | #define DRM_XE_EXEC			0x09 | ||
| 102 | #define DRM_XE_WAIT_USER_FENCE		0x0a | ||
| 103 | /* Must be kept compact -- no holes */ | ||
| 104 | |||
| 105 | #define DRM_IOCTL_XE_DEVICE_QUERY		DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_DEVICE_QUERY, struct drm_xe_device_query) | ||
| 106 | #define DRM_IOCTL_XE_GEM_CREATE			DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_CREATE, struct drm_xe_gem_create) | ||
| 107 | #define DRM_IOCTL_XE_GEM_MMAP_OFFSET		DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_MMAP_OFFSET, struct drm_xe_gem_mmap_offset) | ||
| 108 | #define DRM_IOCTL_XE_VM_CREATE			DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_CREATE, struct drm_xe_vm_create) | ||
| 109 | #define DRM_IOCTL_XE_VM_DESTROY			DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_DESTROY, struct drm_xe_vm_destroy) | ||
| 110 | #define DRM_IOCTL_XE_VM_BIND			DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_BIND, struct drm_xe_vm_bind) | ||
| 111 | #define DRM_IOCTL_XE_EXEC_QUEUE_CREATE		DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_CREATE, struct drm_xe_exec_queue_create) | ||
| 112 | #define DRM_IOCTL_XE_EXEC_QUEUE_DESTROY		DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_DESTROY, struct drm_xe_exec_queue_destroy) | ||
| 113 | #define DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY	DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_GET_PROPERTY, struct drm_xe_exec_queue_get_property) | ||
| 114 | #define DRM_IOCTL_XE_EXEC			DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec) | ||
| 115 | #define DRM_IOCTL_XE_WAIT_USER_FENCE		DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence) | ||
| 116 | |||
| 117 | /** | ||
| 118 | * DOC: Xe IOCTL Extensions | ||
| 119 | * | ||
| 120 | * Before detailing the IOCTLs and its structs, it is important to highlight | ||
| 121 | * that every IOCTL in Xe is extensible. | ||
| 122 | * | ||
| 123 | * Many interfaces need to grow over time. In most cases we can simply | ||
| 124 | * extend the struct and have userspace pass in more data. Another option, | ||
| 125 | * as demonstrated by Vulkan's approach to providing extensions for forward | ||
| 126 | * and backward compatibility, is to use a list of optional structs to | ||
| 127 | * provide those extra details. | ||
| 128 | * | ||
| 129 | * The key advantage to using an extension chain is that it allows us to | ||
| 130 | * redefine the interface more easily than an ever growing struct of | ||
| 131 | * increasing complexity, and for large parts of that interface to be | ||
| 132 | * entirely optional. The downside is more pointer chasing; chasing across | ||
| 133 | * the boundary with pointers encapsulated inside u64. | ||
| 134 | * | ||
| 135 | * Example chaining: | ||
| 136 | * | ||
| 137 | * .. code-block:: C | ||
| 138 | * | ||
| 139 | *	struct drm_xe_user_extension ext3 { | ||
| 140 | *		.next_extension = 0, // end | ||
| 141 | *		.name = ..., | ||
| 142 | *	}; | ||
| 143 | *	struct drm_xe_user_extension ext2 { | ||
| 144 | *		.next_extension = (uintptr_t)&ext3, | ||
| 145 | *		.name = ..., | ||
| 146 | *	}; | ||
| 147 | *	struct drm_xe_user_extension ext1 { | ||
| 148 | *		.next_extension = (uintptr_t)&ext2, | ||
| 149 | *		.name = ..., | ||
| 150 | *	}; | ||
| 151 | * | ||
| 152 | * Typically the struct drm_xe_user_extension would be embedded in some uAPI | ||
| 153 | * struct, and in this case we would feed it the head of the chain(i.e ext1), | ||
| 154 | * which would then apply all of the above extensions. | ||
| 155 | */ | ||
| 156 | |||
| 157 | /** | ||
| 158 | * struct drm_xe_user_extension - Base class for defining a chain of extensions | ||
| 159 | */ | ||
| 160 | struct drm_xe_user_extension { | ||
| 161 | 	/** | ||
| 162 | 	 * @next_extension: | ||
| 163 | 	 * | ||
| 164 | 	 * Pointer to the next struct drm_xe_user_extension, or zero if the end. | ||
| 165 | 	 */ | ||
| 166 | 	__u64 next_extension; | ||
| 167 | |||
| 168 | 	/** | ||
| 169 | 	 * @name: Name of the extension. | ||
| 170 | 	 * | ||
| 171 | 	 * Note that the name here is just some integer. | ||
| 172 | 	 * | ||
| 173 | 	 * Also note that the name space for this is not global for the whole | ||
| 174 | 	 * driver, but rather its scope/meaning is limited to the specific piece | ||
| 175 | 	 * of uAPI which has embedded the struct drm_xe_user_extension. | ||
| 176 | 	 */ | ||
| 177 | 	__u32 name; | ||
| 178 | |||
| 179 | 	/** | ||
| 180 | 	 * @pad: MBZ | ||
| 181 | 	 * | ||
| 182 | 	 * All undefined bits must be zero. | ||
| 183 | 	 */ | ||
| 184 | 	__u32 pad; | ||
| 185 | }; | ||
| 186 | |||
| 187 | /** | ||
| 188 | * struct drm_xe_ext_set_property - Generic set property extension | ||
| 189 | * | ||
| 190 | * A generic struct that allows any of the Xe's IOCTL to be extended | ||
| 191 | * with a set_property operation. | ||
| 192 | */ | ||
| 193 | struct drm_xe_ext_set_property { | ||
| 194 | 	/** @base: base user extension */ | ||
| 195 | 	struct drm_xe_user_extension base; | ||
| 196 | |||
| 197 | 	/** @property: property to set */ | ||
| 198 | 	__u32 property; | ||
| 199 | |||
| 200 | 	/** @pad: MBZ */ | ||
| 201 | 	__u32 pad; | ||
| 202 | |||
| 203 | 	/** @value: property value */ | ||
| 204 | 	__u64 value; | ||
| 205 | |||
| 206 | 	/** @reserved: Reserved */ | ||
| 207 | 	__u64 reserved[2]; | ||
| 208 | }; | ||
| 209 | |||
| 210 | /** | ||
| 211 | * struct drm_xe_engine_class_instance - instance of an engine class | ||
| 212 | * | ||
| 213 | * It is returned as part of the @drm_xe_engine, but it also is used as | ||
| 214 | * the input of engine selection for both @drm_xe_exec_queue_create and | ||
| 215 | * @drm_xe_query_engine_cycles | ||
| 216 | * | ||
| 217 | * The @engine_class can be: | ||
| 218 | * - %DRM_XE_ENGINE_CLASS_RENDER | ||
| 219 | * - %DRM_XE_ENGINE_CLASS_COPY | ||
| 220 | * - %DRM_XE_ENGINE_CLASS_VIDEO_DECODE | ||
| 221 | * - %DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE | ||
| 222 | * - %DRM_XE_ENGINE_CLASS_COMPUTE | ||
| 223 | * - %DRM_XE_ENGINE_CLASS_VM_BIND - Kernel only classes (not actual | ||
| 224 | * hardware engine class). Used for creating ordered queues of VM | ||
| 225 | * bind operations. | ||
| 226 | */ | ||
| 227 | struct drm_xe_engine_class_instance { | ||
| 228 | #define DRM_XE_ENGINE_CLASS_RENDER		0 | ||
| 229 | #define DRM_XE_ENGINE_CLASS_COPY		1 | ||
| 230 | #define DRM_XE_ENGINE_CLASS_VIDEO_DECODE	2 | ||
| 231 | #define DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE	3 | ||
| 232 | #define DRM_XE_ENGINE_CLASS_COMPUTE		4 | ||
| 233 | #define DRM_XE_ENGINE_CLASS_VM_BIND		5 | ||
| 234 | 	/** @engine_class: engine class id */ | ||
| 235 | 	__u16 engine_class; | ||
| 236 | 	/** @engine_instance: engine instance id */ | ||
| 237 | 	__u16 engine_instance; | ||
| 238 | 	/** @gt_id: Unique ID of this GT within the PCI Device */ | ||
| 239 | 	__u16 gt_id; | ||
| 240 | 	/** @pad: MBZ */ | ||
| 241 | 	__u16 pad; | ||
| 242 | }; | ||
| 243 | |||
| 244 | /** | ||
| 245 | * struct drm_xe_engine - describe hardware engine | ||
| 246 | */ | ||
| 247 | struct drm_xe_engine { | ||
| 248 | 	/** @instance: The @drm_xe_engine_class_instance */ | ||
| 249 | 	struct drm_xe_engine_class_instance instance; | ||
| 250 | |||
| 251 | 	/** @reserved: Reserved */ | ||
| 252 | 	__u64 reserved[3]; | ||
| 253 | }; | ||
| 254 | |||
| 255 | /** | ||
| 256 | * struct drm_xe_query_engines - describe engines | ||
| 257 | * | ||
| 258 | * If a query is made with a struct @drm_xe_device_query where .query | ||
| 259 | * is equal to %DRM_XE_DEVICE_QUERY_ENGINES, then the reply uses an array of | ||
| 260 | * struct @drm_xe_query_engines in .data. | ||
| 261 | */ | ||
| 262 | struct drm_xe_query_engines { | ||
| 263 | 	/** @num_engines: number of engines returned in @engines */ | ||
| 264 | 	__u32 num_engines; | ||
| 265 | 	/** @pad: MBZ */ | ||
| 266 | 	__u32 pad; | ||
| 267 | 	/** @engines: The returned engines for this device */ | ||
| 268 | 	struct drm_xe_engine engines[]; | ||
| 269 | }; | ||
| 270 | |||
| 271 | /** | ||
| 272 | * enum drm_xe_memory_class - Supported memory classes. | ||
| 273 | */ | ||
| 274 | enum drm_xe_memory_class { | ||
| 275 | 	/** @DRM_XE_MEM_REGION_CLASS_SYSMEM: Represents system memory. */ | ||
| 276 | 	DRM_XE_MEM_REGION_CLASS_SYSMEM = 0, | ||
| 277 | 	/** | ||
| 278 | 	 * @DRM_XE_MEM_REGION_CLASS_VRAM: On discrete platforms, this | ||
| 279 | 	 * represents the memory that is local to the device, which we | ||
| 280 | 	 * call VRAM. Not valid on integrated platforms. | ||
| 281 | 	 */ | ||
| 282 | 	DRM_XE_MEM_REGION_CLASS_VRAM | ||
| 283 | }; | ||
| 284 | |||
| 285 | /** | ||
| 286 | * struct drm_xe_mem_region - Describes some region as known to | ||
| 287 | * the driver. | ||
| 288 | */ | ||
| 289 | struct drm_xe_mem_region { | ||
| 290 | 	/** | ||
| 291 | 	 * @mem_class: The memory class describing this region. | ||
| 292 | 	 * | ||
| 293 | 	 * See enum drm_xe_memory_class for supported values. | ||
| 294 | 	 */ | ||
| 295 | 	__u16 mem_class; | ||
| 296 | 	/** | ||
| 297 | 	 * @instance: The unique ID for this region, which serves as the | ||
| 298 | 	 * index in the placement bitmask used as argument for | ||
| 299 | 	 * &DRM_IOCTL_XE_GEM_CREATE | ||
| 300 | 	 */ | ||
| 301 | 	__u16 instance; | ||
| 302 | 	/** | ||
| 303 | 	 * @min_page_size: Min page-size in bytes for this region. | ||
| 304 | 	 * | ||
| 305 | 	 * When the kernel allocates memory for this region, the | ||
| 306 | 	 * underlying pages will be at least @min_page_size in size. | ||
| 307 | 	 * Buffer objects with an allowable placement in this region must be | ||
| 308 | 	 * created with a size aligned to this value. | ||
| 309 | 	 * GPU virtual address mappings of (parts of) buffer objects that | ||
| 310 | 	 * may be placed in this region must also have their GPU virtual | ||
| 311 | 	 * address and range aligned to this value. | ||
| 312 | 	 * Affected IOCTLS will return %-EINVAL if alignment restrictions are | ||
| 313 | 	 * not met. | ||
| 314 | 	 */ | ||
| 315 | 	__u32 min_page_size; | ||
| 316 | 	/** | ||
| 317 | 	 * @total_size: The usable size in bytes for this region. | ||
| 318 | 	 */ | ||
| 319 | 	__u64 total_size; | ||
| 320 | 	/** | ||
| 321 | 	 * @used: Estimate of the memory used in bytes for this region. | ||
| 322 | 	 * | ||
| 323 | 	 * Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable | ||
| 324 | 	 * accounting. Without this the value here will always equal | ||
| 325 | 	 * zero. | ||
| 326 | 	 */ | ||
| 327 | 	__u64 used; | ||
| 328 | 	/** | ||
| 329 | 	 * @cpu_visible_size: How much of this region can be CPU | ||
| 330 | 	 * accessed, in bytes. | ||
| 331 | 	 * | ||
| 332 | 	 * This will always be <= @total_size, and the remainder (if | ||
| 333 | 	 * any) will not be CPU accessible. If the CPU accessible part | ||
| 334 | 	 * is smaller than @total_size then this is referred to as a | ||
| 335 | 	 * small BAR system. | ||
| 336 | 	 * | ||
| 337 | 	 * On systems without small BAR (full BAR), the probed_size will | ||
| 338 | 	 * always equal the @total_size, since all of it will be CPU | ||
| 339 | 	 * accessible. | ||
| 340 | 	 * | ||
| 341 | 	 * Note this is only tracked for DRM_XE_MEM_REGION_CLASS_VRAM | ||
| 342 | 	 * regions (for other types the value here will always equal | ||
| 343 | 	 * zero). | ||
| 344 | 	 */ | ||
| 345 | 	__u64 cpu_visible_size; | ||
| 346 | 	/** | ||
| 347 | 	 * @cpu_visible_used: Estimate of CPU visible memory used, in | ||
| 348 | 	 * bytes. | ||
| 349 | 	 * | ||
| 350 | 	 * Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable | ||
| 351 | 	 * accounting. Without this the value here will always equal | ||
| 352 | 	 * zero. Note this is only currently tracked for | ||
| 353 | 	 * DRM_XE_MEM_REGION_CLASS_VRAM regions (for other types the value | ||
| 354 | 	 * here will always be zero). | ||
| 355 | 	 */ | ||
| 356 | 	__u64 cpu_visible_used; | ||
| 357 | 	/** @reserved: Reserved */ | ||
| 358 | 	__u64 reserved[6]; | ||
| 359 | }; | ||
| 360 | |||
| 361 | /** | ||
| 362 | * struct drm_xe_query_mem_regions - describe memory regions | ||
| 363 | * | ||
| 364 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 365 | * is equal to DRM_XE_DEVICE_QUERY_MEM_REGIONS, then the reply uses | ||
| 366 | * struct drm_xe_query_mem_regions in .data. | ||
| 367 | */ | ||
| 368 | struct drm_xe_query_mem_regions { | ||
| 369 | 	/** @num_mem_regions: number of memory regions returned in @mem_regions */ | ||
| 370 | 	__u32 num_mem_regions; | ||
| 371 | 	/** @pad: MBZ */ | ||
| 372 | 	__u32 pad; | ||
| 373 | 	/** @mem_regions: The returned memory regions for this device */ | ||
| 374 | 	struct drm_xe_mem_region mem_regions[]; | ||
| 375 | }; | ||
| 376 | |||
| 377 | /** | ||
| 378 | * struct drm_xe_query_config - describe the device configuration | ||
| 379 | * | ||
| 380 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 381 | * is equal to DRM_XE_DEVICE_QUERY_CONFIG, then the reply uses | ||
| 382 | * struct drm_xe_query_config in .data. | ||
| 383 | * | ||
| 384 | * The index in @info can be: | ||
| 385 | * - %DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID - Device ID (lower 16 bits) | ||
| 386 | * and the device revision (next 8 bits) | ||
| 387 | * - %DRM_XE_QUERY_CONFIG_FLAGS - Flags describing the device | ||
| 388 | * configuration, see list below | ||
| 389 | * | ||
| 390 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM - Flag is set if the device | ||
| 391 | * has usable VRAM | ||
| 392 | * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment | ||
| 393 | * required by this device, typically SZ_4K or SZ_64K | ||
| 394 | * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address | ||
| 395 | * - %DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY - Value of the highest | ||
| 396 | * available exec queue priority | ||
| 397 | */ | ||
| 398 | struct drm_xe_query_config { | ||
| 399 | 	/** @num_params: number of parameters returned in info */ | ||
| 400 | 	__u32 num_params; | ||
| 401 | |||
| 402 | 	/** @pad: MBZ */ | ||
| 403 | 	__u32 pad; | ||
| 404 | |||
| 405 | #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID	0 | ||
| 406 | #define DRM_XE_QUERY_CONFIG_FLAGS			1 | ||
| 407 | 	#define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM	(1 << 0) | ||
| 408 | #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT		2 | ||
| 409 | #define DRM_XE_QUERY_CONFIG_VA_BITS			3 | ||
| 410 | #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY	4 | ||
| 411 | 	/** @info: array of elements containing the config info */ | ||
| 412 | 	__u64 info[]; | ||
| 413 | }; | ||
| 414 | |||
| 415 | /** | ||
| 416 | * struct drm_xe_gt - describe an individual GT. | ||
| 417 | * | ||
| 418 | * To be used with drm_xe_query_gt_list, which will return a list with all the | ||
| 419 | * existing GT individual descriptions. | ||
| 420 | * Graphics Technology (GT) is a subset of a GPU/tile that is responsible for | ||
| 421 | * implementing graphics and/or media operations. | ||
| 422 | * | ||
| 423 | * The index in @type can be: | ||
| 424 | * - %DRM_XE_QUERY_GT_TYPE_MAIN | ||
| 425 | * - %DRM_XE_QUERY_GT_TYPE_MEDIA | ||
| 426 | */ | ||
| 427 | struct drm_xe_gt { | ||
| 428 | #define DRM_XE_QUERY_GT_TYPE_MAIN		0 | ||
| 429 | #define DRM_XE_QUERY_GT_TYPE_MEDIA		1 | ||
| 430 | 	/** @type: GT type: Main or Media */ | ||
| 431 | 	__u16 type; | ||
| 432 | 	/** @tile_id: Tile ID where this GT lives (Information only) */ | ||
| 433 | 	__u16 tile_id; | ||
| 434 | 	/** @gt_id: Unique ID of this GT within the PCI Device */ | ||
| 435 | 	__u16 gt_id; | ||
| 436 | 	/** @pad: MBZ */ | ||
| 437 | 	__u16 pad[3]; | ||
| 438 | 	/** @reference_clock: A clock frequency for timestamp */ | ||
| 439 | 	__u32 reference_clock; | ||
| 440 | 	/** | ||
| 441 | 	 * @near_mem_regions: Bit mask of instances from | ||
| 442 | 	 * drm_xe_query_mem_regions that are nearest to the current engines | ||
| 443 | 	 * of this GT. | ||
| 444 | 	 * Each index in this mask refers directly to the struct | ||
| 445 | 	 * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 446 | 	 * be made about order. The type of each region is described | ||
| 447 | 	 * by struct drm_xe_query_mem_regions' mem_class. | ||
| 448 | 	 */ | ||
| 449 | 	__u64 near_mem_regions; | ||
| 450 | 	/** | ||
| 451 | 	 * @far_mem_regions: Bit mask of instances from | ||
| 452 | 	 * drm_xe_query_mem_regions that are far from the engines of this GT. | ||
| 453 | 	 * In general, they have extra indirections when compared to the | ||
| 454 | 	 * @near_mem_regions. For a discrete device this could mean system | ||
| 455 | 	 * memory and memory living in a different tile. | ||
| 456 | 	 * Each index in this mask refers directly to the struct | ||
| 457 | 	 * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 458 | 	 * be made about order. The type of each region is described | ||
| 459 | 	 * by struct drm_xe_query_mem_regions' mem_class. | ||
| 460 | 	 */ | ||
| 461 | 	__u64 far_mem_regions; | ||
| 462 | 	/** @ip_ver_major: Graphics/media IP major version on GMD_ID platforms */ | ||
| 463 | 	__u16 ip_ver_major; | ||
| 464 | 	/** @ip_ver_minor: Graphics/media IP minor version on GMD_ID platforms */ | ||
| 465 | 	__u16 ip_ver_minor; | ||
| 466 | 	/** @ip_ver_rev: Graphics/media IP revision version on GMD_ID platforms */ | ||
| 467 | 	__u16 ip_ver_rev; | ||
| 468 | 	/** @pad2: MBZ */ | ||
| 469 | 	__u16 pad2; | ||
| 470 | 	/** @reserved: Reserved */ | ||
| 471 | 	__u64 reserved[7]; | ||
| 472 | }; | ||
| 473 | |||
| 474 | /** | ||
| 475 | * struct drm_xe_query_gt_list - A list with GT description items. | ||
| 476 | * | ||
| 477 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 478 | * is equal to DRM_XE_DEVICE_QUERY_GT_LIST, then the reply uses struct | ||
| 479 | * drm_xe_query_gt_list in .data. | ||
| 480 | */ | ||
| 481 | struct drm_xe_query_gt_list { | ||
| 482 | 	/** @num_gt: number of GT items returned in gt_list */ | ||
| 483 | 	__u32 num_gt; | ||
| 484 | 	/** @pad: MBZ */ | ||
| 485 | 	__u32 pad; | ||
| 486 | 	/** @gt_list: The GT list returned for this device */ | ||
| 487 | 	struct drm_xe_gt gt_list[]; | ||
| 488 | }; | ||
| 489 | |||
| 490 | /** | ||
| 491 | * struct drm_xe_query_topology_mask - describe the topology mask of a GT | ||
| 492 | * | ||
| 493 | * This is the hardware topology which reflects the internal physical | ||
| 494 | * structure of the GPU. | ||
| 495 | * | ||
| 496 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 497 | * is equal to DRM_XE_DEVICE_QUERY_GT_TOPOLOGY, then the reply uses | ||
| 498 | * struct drm_xe_query_topology_mask in .data. | ||
| 499 | * | ||
| 500 | * The @type can be: | ||
| 501 | * - %DRM_XE_TOPO_DSS_GEOMETRY - To query the mask of Dual Sub Slices | ||
| 502 | * (DSS) available for geometry operations. For example a query response | ||
| 503 | * containing the following in mask: | ||
| 504 | * ``DSS_GEOMETRY ff ff ff ff 00 00 00 00`` | ||
| 505 | * means 32 DSS are available for geometry. | ||
| 506 | * - %DRM_XE_TOPO_DSS_COMPUTE - To query the mask of Dual Sub Slices | ||
| 507 | * (DSS) available for compute operations. For example a query response | ||
| 508 | * containing the following in mask: | ||
| 509 | * ``DSS_COMPUTE ff ff ff ff 00 00 00 00`` | ||
| 510 | * means 32 DSS are available for compute. | ||
| 511 | * - %DRM_XE_TOPO_EU_PER_DSS - To query the mask of Execution Units (EU) | ||
| 512 | * available per Dual Sub Slices (DSS). For example a query response | ||
| 513 | * containing the following in mask: | ||
| 514 | * ``EU_PER_DSS ff ff 00 00 00 00 00 00`` | ||
| 515 | * means each DSS has 16 EU. | ||
| 516 | */ | ||
| 517 | struct drm_xe_query_topology_mask { | ||
| 518 | 	/** @gt_id: GT ID the mask is associated with */ | ||
| 519 | 	__u16 gt_id; | ||
| 520 | |||
| 521 | #define DRM_XE_TOPO_DSS_GEOMETRY	1 | ||
| 522 | #define DRM_XE_TOPO_DSS_COMPUTE		2 | ||
| 523 | #define DRM_XE_TOPO_EU_PER_DSS		4 | ||
| 524 | 	/** @type: type of mask */ | ||
| 525 | 	__u16 type; | ||
| 526 | |||
| 527 | 	/** @num_bytes: number of bytes in requested mask */ | ||
| 528 | 	__u32 num_bytes; | ||
| 529 | |||
| 530 | 	/** @mask: little-endian mask of @num_bytes */ | ||
| 531 | 	__u8 mask[]; | ||
| 532 | }; | ||
| 533 | |||
| 534 | /** | ||
| 535 | * struct drm_xe_query_engine_cycles - correlate CPU and GPU timestamps | ||
| 536 | * | ||
| 537 | * If a query is made with a struct drm_xe_device_query where .query is equal to | ||
| 538 | * DRM_XE_DEVICE_QUERY_ENGINE_CYCLES, then the reply uses struct drm_xe_query_engine_cycles | ||
| 539 | * in .data. struct drm_xe_query_engine_cycles is allocated by the user and | ||
| 540 | * .data points to this allocated structure. | ||
| 541 | * | ||
| 542 | * The query returns the engine cycles, which along with GT's @reference_clock, | ||
| 543 | * can be used to calculate the engine timestamp. In addition the | ||
| 544 | * query returns a set of cpu timestamps that indicate when the command | ||
| 545 | * streamer cycle count was captured. | ||
| 546 | */ | ||
| 547 | struct drm_xe_query_engine_cycles { | ||
| 548 | 	/** | ||
| 549 | 	 * @eci: This is input by the user and is the engine for which command | ||
| 550 | 	 * streamer cycles is queried. | ||
| 551 | 	 */ | ||
| 552 | 	struct drm_xe_engine_class_instance eci; | ||
| 553 | |||
| 554 | 	/** | ||
| 555 | 	 * @clockid: This is input by the user and is the reference clock id for | ||
| 556 | 	 * CPU timestamp. For definition, see clock_gettime(2) and | ||
| 557 | 	 * perf_event_open(2). Supported clock ids are CLOCK_MONOTONIC, | ||
| 558 | 	 * CLOCK_MONOTONIC_RAW, CLOCK_REALTIME, CLOCK_BOOTTIME, CLOCK_TAI. | ||
| 559 | 	 */ | ||
| 560 | 	__s32 clockid; | ||
| 561 | |||
| 562 | 	/** @width: Width of the engine cycle counter in bits. */ | ||
| 563 | 	__u32 width; | ||
| 564 | |||
| 565 | 	/** | ||
| 566 | 	 * @engine_cycles: Engine cycles as read from its register | ||
| 567 | 	 * at 0x358 offset. | ||
| 568 | 	 */ | ||
| 569 | 	__u64 engine_cycles; | ||
| 570 | |||
| 571 | 	/** | ||
| 572 | 	 * @cpu_timestamp: CPU timestamp in ns. The timestamp is captured before | ||
| 573 | 	 * reading the engine_cycles register using the reference clockid set by the | ||
| 574 | 	 * user. | ||
| 575 | 	 */ | ||
| 576 | 	__u64 cpu_timestamp; | ||
| 577 | |||
| 578 | 	/** | ||
| 579 | 	 * @cpu_delta: Time delta in ns captured around reading the lower dword | ||
| 580 | 	 * of the engine_cycles register. | ||
| 581 | 	 */ | ||
| 582 | 	__u64 cpu_delta; | ||
| 583 | }; | ||
| 584 | |||
| 585 | /** | ||
| 586 | * struct drm_xe_query_uc_fw_version - query a micro-controller firmware version | ||
| 587 | * | ||
| 588 | * Given a uc_type this will return the branch, major, minor and patch version | ||
| 589 | * of the micro-controller firmware. | ||
| 590 | */ | ||
| 591 | struct drm_xe_query_uc_fw_version { | ||
| 592 | 	/** @uc_type: The micro-controller type to query firmware version */ | ||
| 593 | #define XE_QUERY_UC_TYPE_GUC_SUBMISSION 0 | ||
| 594 | #define XE_QUERY_UC_TYPE_HUC 1 | ||
| 595 | 	__u16 uc_type; | ||
| 596 | |||
| 597 | 	/** @pad: MBZ */ | ||
| 598 | 	__u16 pad; | ||
| 599 | |||
| 600 | 	/** @branch_ver: branch uc fw version */ | ||
| 601 | 	__u32 branch_ver; | ||
| 602 | 	/** @major_ver: major uc fw version */ | ||
| 603 | 	__u32 major_ver; | ||
| 604 | 	/** @minor_ver: minor uc fw version */ | ||
| 605 | 	__u32 minor_ver; | ||
| 606 | 	/** @patch_ver: patch uc fw version */ | ||
| 607 | 	__u32 patch_ver; | ||
| 608 | |||
| 609 | 	/** @pad2: MBZ */ | ||
| 610 | 	__u32 pad2; | ||
| 611 | |||
| 612 | 	/** @reserved: Reserved */ | ||
| 613 | 	__u64 reserved; | ||
| 614 | }; | ||
| 615 | |||
| 616 | /** | ||
| 617 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main | ||
| 618 | * structure to query device information | ||
| 619 | * | ||
| 620 | * The user selects the type of data to query among DRM_XE_DEVICE_QUERY_* | ||
| 621 | * and sets the value in the query member. This determines the type of | ||
| 622 | * the structure provided by the driver in data, among struct drm_xe_query_*. | ||
| 623 | * | ||
| 624 | * The @query can be: | ||
| 625 | * - %DRM_XE_DEVICE_QUERY_ENGINES | ||
| 626 | * - %DRM_XE_DEVICE_QUERY_MEM_REGIONS | ||
| 627 | * - %DRM_XE_DEVICE_QUERY_CONFIG | ||
| 628 | * - %DRM_XE_DEVICE_QUERY_GT_LIST | ||
| 629 | * - %DRM_XE_DEVICE_QUERY_HWCONFIG - Query type to retrieve the hardware | ||
| 630 | * configuration of the device such as information on slices, memory, | ||
| 631 | * caches, and so on. It is provided as a table of key / value | ||
| 632 | * attributes. | ||
| 633 | * - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY | ||
| 634 | * - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES | ||
| 635 | * | ||
| 636 | * If size is set to 0, the driver fills it with the required size for | ||
| 637 | * the requested type of data to query. If size is equal to the required | ||
| 638 | * size, the queried information is copied into data. If size is set to | ||
| 639 | * a value different from 0 and different from the required size, the | ||
| 640 | * IOCTL call returns -EINVAL. | ||
| 641 | * | ||
| 642 | * For example the following code snippet allows retrieving and printing | ||
| 643 | * information about the device engines with DRM_XE_DEVICE_QUERY_ENGINES: | ||
| 644 | * | ||
| 645 | * .. code-block:: C | ||
| 646 | * | ||
| 647 | * struct drm_xe_query_engines *engines; | ||
| 648 | * struct drm_xe_device_query query = { | ||
| 649 | * .extensions = 0, | ||
| 650 | * .query = DRM_XE_DEVICE_QUERY_ENGINES, | ||
| 651 | * .size = 0, | ||
| 652 | * .data = 0, | ||
| 653 | * }; | ||
| 654 | * ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query); | ||
| 655 | * engines = malloc(query.size); | ||
| 656 | * query.data = (uintptr_t)engines; | ||
| 657 | * ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query); | ||
| 658 | * for (int i = 0; i < engines->num_engines; i++) { | ||
| 659 | * printf("Engine %d: %s\n", i, | ||
| 660 | * engines->engines[i].instance.engine_class == | ||
| 661 | * DRM_XE_ENGINE_CLASS_RENDER ? "RENDER": | ||
| 662 | * engines->engines[i].instance.engine_class == | ||
| 663 | * DRM_XE_ENGINE_CLASS_COPY ? "COPY": | ||
| 664 | * engines->engines[i].instance.engine_class == | ||
| 665 | * DRM_XE_ENGINE_CLASS_VIDEO_DECODE ? "VIDEO_DECODE": | ||
| 666 | * engines->engines[i].instance.engine_class == | ||
| 667 | * DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE ? "VIDEO_ENHANCE": | ||
| 668 | * engines->engines[i].instance.engine_class == | ||
| 669 | * DRM_XE_ENGINE_CLASS_COMPUTE ? "COMPUTE": | ||
| 670 | * "UNKNOWN"); | ||
| 671 | * } | ||
| 672 | * free(engines); | ||
| 673 | */ | ||
| 674 | struct drm_xe_device_query { | ||
| 675 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 676 | 	__u64 extensions; | ||
| 677 | |||
| 678 | #define DRM_XE_DEVICE_QUERY_ENGINES		0 | ||
| 679 | #define DRM_XE_DEVICE_QUERY_MEM_REGIONS		1 | ||
| 680 | #define DRM_XE_DEVICE_QUERY_CONFIG		2 | ||
| 681 | #define DRM_XE_DEVICE_QUERY_GT_LIST		3 | ||
| 682 | #define DRM_XE_DEVICE_QUERY_HWCONFIG		4 | ||
| 683 | #define DRM_XE_DEVICE_QUERY_GT_TOPOLOGY		5 | ||
| 684 | #define DRM_XE_DEVICE_QUERY_ENGINE_CYCLES	6 | ||
| 685 | #define DRM_XE_DEVICE_QUERY_UC_FW_VERSION	7 | ||
| 686 | 	/** @query: The type of data to query */ | ||
| 687 | 	__u32 query; | ||
| 688 | |||
| 689 | 	/** @size: Size of the queried data */ | ||
| 690 | 	__u32 size; | ||
| 691 | |||
| 692 | 	/** @data: Queried data is placed here */ | ||
| 693 | 	__u64 data; | ||
| 694 | |||
| 695 | 	/** @reserved: Reserved */ | ||
| 696 | 	__u64 reserved[2]; | ||
| 697 | }; | ||
| 698 | |||
| 699 | /** | ||
| 700 | * struct drm_xe_gem_create - Input of &DRM_IOCTL_XE_GEM_CREATE - A structure for | ||
| 701 | * gem creation | ||
| 702 | * | ||
| 703 | * The @flags can be: | ||
| 704 | * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING | ||
| 705 | * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT | ||
| 706 | * - %DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM - When using VRAM as a | ||
| 707 | * possible placement, ensure that the corresponding VRAM allocation | ||
| 708 | * will always use the CPU accessible part of VRAM. This is important | ||
| 709 | * for small-bar systems (on full-bar systems this gets turned into a | ||
| 710 | * noop). | ||
| 711 | * Note1: System memory can be used as an extra placement if the kernel | ||
| 712 | * should spill the allocation to system memory, if space can't be made | ||
| 713 | * available in the CPU accessible part of VRAM (giving the same | ||
| 714 | * behaviour as the i915 interface, see | ||
| 715 | * I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS). | ||
| 716 | * Note2: For clear-color CCS surfaces the kernel needs to read the | ||
| 717 | * clear-color value stored in the buffer, and on discrete platforms we | ||
| 718 | * need to use VRAM for display surfaces, therefore the kernel requires | ||
| 719 | * setting this flag for such objects, otherwise an error is thrown on | ||
| 720 | * small-bar systems. | ||
| 721 | * | ||
| 722 | * @cpu_caching supports the following values: | ||
| 723 | * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back | ||
| 724 | * caching. On iGPU this can't be used for scanout surfaces. Currently | ||
| 725 | * not allowed for objects placed in VRAM. | ||
| 726 | * - %DRM_XE_GEM_CPU_CACHING_WC - Allocate the pages as write-combined. This | ||
| 727 | * is uncached. Scanout surfaces should likely use this. All objects | ||
| 728 | * that can be placed in VRAM must use this. | ||
| 729 | */ | ||
| 730 | struct drm_xe_gem_create { | ||
| 731 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 732 | 	__u64 extensions; | ||
| 733 | |||
| 734 | 	/** | ||
| 735 | 	 * @size: Size of the object to be created, must match region | ||
| 736 | 	 * (system or vram) minimum alignment (&min_page_size). | ||
| 737 | 	 */ | ||
| 738 | 	__u64 size; | ||
| 739 | |||
| 740 | 	/** | ||
| 741 | 	 * @placement: A mask of memory instances of where BO can be placed. | ||
| 742 | 	 * Each index in this mask refers directly to the struct | ||
| 743 | 	 * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 744 | 	 * be made about order. The type of each region is described | ||
| 745 | 	 * by struct drm_xe_query_mem_regions' mem_class. | ||
| 746 | 	 */ | ||
| 747 | 	__u32 placement; | ||
| 748 | |||
| 749 | #define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING		(1 << 0) | ||
| 750 | #define DRM_XE_GEM_CREATE_FLAG_SCANOUT			(1 << 1) | ||
| 751 | #define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM	(1 << 2) | ||
| 752 | 	/** | ||
| 753 | 	 * @flags: Flags, currently a mask of memory instances of where BO can | ||
| 754 | 	 * be placed | ||
| 755 | 	 */ | ||
| 756 | 	__u32 flags; | ||
| 757 | |||
| 758 | 	/** | ||
| 759 | 	 * @vm_id: Attached VM, if any | ||
| 760 | 	 * | ||
| 761 | 	 * If a VM is specified, this BO must: | ||
| 762 | 	 * | ||
| 763 | 	 * 1. Only ever be bound to that VM. | ||
| 764 | 	 * 2. Cannot be exported as a PRIME fd. | ||
| 765 | 	 */ | ||
| 766 | 	__u32 vm_id; | ||
| 767 | |||
| 768 | 	/** | ||
| 769 | 	 * @handle: Returned handle for the object. | ||
| 770 | 	 * | ||
| 771 | 	 * Object handles are nonzero. | ||
| 772 | 	 */ | ||
| 773 | 	__u32 handle; | ||
| 774 | |||
| 775 | #define DRM_XE_GEM_CPU_CACHING_WB 1 | ||
| 776 | #define DRM_XE_GEM_CPU_CACHING_WC 2 | ||
| 777 | 	/** | ||
| 778 | 	 * @cpu_caching: The CPU caching mode to select for this object. If | ||
| 779 | 	 * mmaping the object the mode selected here will also be used. | ||
| 780 | 	 */ | ||
| 781 | 	__u16 cpu_caching; | ||
| 782 | 	/** @pad: MBZ */ | ||
| 783 | 	__u16 pad[3]; | ||
| 784 | |||
| 785 | 	/** @reserved: Reserved */ | ||
| 786 | 	__u64 reserved[2]; | ||
| 787 | }; | ||
| 788 | |||
| 789 | /** | ||
| 790 | * struct drm_xe_gem_mmap_offset - Input of &DRM_IOCTL_XE_GEM_MMAP_OFFSET | ||
| 791 | */ | ||
| 792 | struct drm_xe_gem_mmap_offset { | ||
| 793 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 794 | 	__u64 extensions; | ||
| 795 | |||
| 796 | 	/** @handle: Handle for the object being mapped. */ | ||
| 797 | 	__u32 handle; | ||
| 798 | |||
| 799 | 	/** @flags: Must be zero */ | ||
| 800 | 	__u32 flags; | ||
| 801 | |||
| 802 | 	/** @offset: The fake offset to use for subsequent mmap call */ | ||
| 803 | 	__u64 offset; | ||
| 804 | |||
| 805 | 	/** @reserved: Reserved */ | ||
| 806 | 	__u64 reserved[2]; | ||
| 807 | }; | ||
| 808 | |||
| 809 | /** | ||
| 810 | * struct drm_xe_vm_create - Input of &DRM_IOCTL_XE_VM_CREATE | ||
| 811 | * | ||
| 812 | * The @flags can be: | ||
| 813 | * - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE | ||
| 814 | * - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts | ||
| 815 | * exec submissions to its exec_queues that don't have an upper time | ||
| 816 | * limit on the job execution time. But exec submissions to these | ||
| 817 | * don't allow any of the flags DRM_XE_SYNC_FLAG_SYNCOBJ, | ||
| 818 | * DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ, DRM_XE_SYNC_FLAG_DMA_BUF, | ||
| 819 | * used as out-syncobjs, that is, together with DRM_XE_SYNC_FLAG_SIGNAL. | ||
| 820 | * LR VMs can be created in recoverable page-fault mode using | ||
| 821 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it. | ||
| 822 | * If that flag is omitted, the UMD can not rely on the slightly | ||
| 823 | * different per-VM overcommit semantics that are enabled by | ||
| 824 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE (see below), but KMD may | ||
| 825 | * still enable recoverable pagefaults if supported by the device. | ||
| 826 | * - %DRM_XE_VM_CREATE_FLAG_FAULT_MODE - Requires also | ||
| 827 | * DRM_XE_VM_CREATE_FLAG_LR_MODE. It allows memory to be allocated on | ||
| 828 | * demand when accessed, and also allows per-VM overcommit of memory. | ||
| 829 | * The xe driver internally uses recoverable pagefaults to implement | ||
| 830 | * this. | ||
| 831 | */ | ||
| 832 | struct drm_xe_vm_create { | ||
| 833 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 834 | 	__u64 extensions; | ||
| 835 | |||
| 836 | #define DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE	(1 << 0) | ||
| 837 | #define DRM_XE_VM_CREATE_FLAG_LR_MODE	 (1 << 1) | ||
| 838 | #define DRM_XE_VM_CREATE_FLAG_FAULT_MODE	(1 << 2) | ||
| 839 | 	/** @flags: Flags */ | ||
| 840 | 	__u32 flags; | ||
| 841 | |||
| 842 | 	/** @vm_id: Returned VM ID */ | ||
| 843 | 	__u32 vm_id; | ||
| 844 | |||
| 845 | 	/** @reserved: Reserved */ | ||
| 846 | 	__u64 reserved[2]; | ||
| 847 | }; | ||
| 848 | |||
| 849 | /** | ||
| 850 | * struct drm_xe_vm_destroy - Input of &DRM_IOCTL_XE_VM_DESTROY | ||
| 851 | */ | ||
| 852 | struct drm_xe_vm_destroy { | ||
| 853 | 	/** @vm_id: VM ID */ | ||
| 854 | 	__u32 vm_id; | ||
| 855 | |||
| 856 | 	/** @pad: MBZ */ | ||
| 857 | 	__u32 pad; | ||
| 858 | |||
| 859 | 	/** @reserved: Reserved */ | ||
| 860 | 	__u64 reserved[2]; | ||
| 861 | }; | ||
| 862 | |||
| 863 | /** | ||
| 864 | * struct drm_xe_vm_bind_op - run bind operations | ||
| 865 | * | ||
| 866 | * The @op can be: | ||
| 867 | * - %DRM_XE_VM_BIND_OP_MAP | ||
| 868 | * - %DRM_XE_VM_BIND_OP_UNMAP | ||
| 869 | * - %DRM_XE_VM_BIND_OP_MAP_USERPTR | ||
| 870 | * - %DRM_XE_VM_BIND_OP_UNMAP_ALL | ||
| 871 | * - %DRM_XE_VM_BIND_OP_PREFETCH | ||
| 872 | * | ||
| 873 | * and the @flags can be: | ||
| 874 | * - %DRM_XE_VM_BIND_FLAG_READONLY - Setup the page tables as read-only | ||
| 875 | * to ensure write protection | ||
| 876 | * - %DRM_XE_VM_BIND_FLAG_IMMEDIATE - On a faulting VM, do the | ||
| 877 | * MAP operation immediately rather than deferring the MAP to the page | ||
| 878 | * fault handler. This is implied on a non-faulting VM as there is no | ||
| 879 | * fault handler to defer to. | ||
| 880 | * - %DRM_XE_VM_BIND_FLAG_NULL - When the NULL flag is set, the page | ||
| 881 | * tables are setup with a special bit which indicates writes are | ||
| 882 | * dropped and all reads return zero. In the future, the NULL flags | ||
| 883 | * will only be valid for DRM_XE_VM_BIND_OP_MAP operations, the BO | ||
| 884 | * handle MBZ, and the BO offset MBZ. This flag is intended to | ||
| 885 | * implement VK sparse bindings. | ||
| 886 | */ | ||
| 887 | struct drm_xe_vm_bind_op { | ||
| 888 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 889 | 	__u64 extensions; | ||
| 890 | |||
| 891 | 	/** | ||
| 892 | 	 * @obj: GEM object to operate on, MBZ for MAP_USERPTR, MBZ for UNMAP | ||
| 893 | 	 */ | ||
| 894 | 	__u32 obj; | ||
| 895 | |||
| 896 | 	/** | ||
| 897 | 	 * @pat_index: The platform defined @pat_index to use for this mapping. | ||
| 898 | 	 * The index basically maps to some predefined memory attributes, | ||
| 899 | 	 * including things like caching, coherency, compression etc. The exact | ||
| 900 | 	 * meaning of the pat_index is platform specific and defined in the | ||
| 901 | 	 * Bspec and PRMs. When the KMD sets up the binding the index here is | ||
| 902 | 	 * encoded into the ppGTT PTE. | ||
| 903 | 	 * | ||
| 904 | 	 * For coherency the @pat_index needs to be at least 1way coherent when | ||
| 905 | 	 * drm_xe_gem_create.cpu_caching is DRM_XE_GEM_CPU_CACHING_WB. The KMD | ||
| 906 | 	 * will extract the coherency mode from the @pat_index and reject if | ||
| 907 | 	 * there is a mismatch (see note below for pre-MTL platforms). | ||
| 908 | 	 * | ||
| 909 | 	 * Note: On pre-MTL platforms there is only a caching mode and no | ||
| 910 | 	 * explicit coherency mode, but on such hardware there is always a | ||
| 911 | 	 * shared-LLC (or is dgpu) so all GT memory accesses are coherent with | ||
| 912 | 	 * CPU caches even with the caching mode set as uncached. It's only the | ||
| 913 | 	 * display engine that is incoherent (on dgpu it must be in VRAM which | ||
| 914 | 	 * is always mapped as WC on the CPU). However to keep the uapi somewhat | ||
| 915 | 	 * consistent with newer platforms the KMD groups the different cache | ||
| 916 | 	 * levels into the following coherency buckets on all pre-MTL platforms: | ||
| 917 | 	 * | ||
| 918 | 	 *	ppGTT UC -> COH_NONE | ||
| 919 | 	 *	ppGTT WC -> COH_NONE | ||
| 920 | 	 *	ppGTT WT -> COH_NONE | ||
| 921 | 	 *	ppGTT WB -> COH_AT_LEAST_1WAY | ||
| 922 | 	 * | ||
| 923 | 	 * In practice UC/WC/WT should only ever used for scanout surfaces on | ||
| 924 | 	 * such platforms (or perhaps in general for dma-buf if shared with | ||
| 925 | 	 * another device) since it is only the display engine that is actually | ||
| 926 | 	 * incoherent. Everything else should typically use WB given that we | ||
| 927 | 	 * have a shared-LLC. On MTL+ this completely changes and the HW | ||
| 928 | 	 * defines the coherency mode as part of the @pat_index, where | ||
| 929 | 	 * incoherent GT access is possible. | ||
| 930 | 	 * | ||
| 931 | 	 * Note: For userptr and externally imported dma-buf the kernel expects | ||
| 932 | 	 * either 1WAY or 2WAY for the @pat_index. | ||
| 933 | 	 * | ||
| 934 | 	 * For DRM_XE_VM_BIND_FLAG_NULL bindings there are no KMD restrictions | ||
| 935 | 	 * on the @pat_index. For such mappings there is no actual memory being | ||
| 936 | 	 * mapped (the address in the PTE is invalid), so the various PAT memory | ||
| 937 | 	 * attributes likely do not apply. Simply leaving as zero is one | ||
| 938 | 	 * option (still a valid pat_index). | ||
| 939 | 	 */ | ||
| 940 | 	__u16 pat_index; | ||
| 941 | |||
| 942 | 	/** @pad: MBZ */ | ||
| 943 | 	__u16 pad; | ||
| 944 | |||
| 945 | 	union { | ||
| 946 | 		/** | ||
| 947 | 		 * @obj_offset: Offset into the object, MBZ for CLEAR_RANGE, | ||
| 948 | 		 * ignored for unbind | ||
| 949 | 		 */ | ||
| 950 | 		__u64 obj_offset; | ||
| 951 | |||
| 952 | 		/** @userptr: user pointer to bind on */ | ||
| 953 | 		__u64 userptr; | ||
| 954 | 	}; | ||
| 955 | |||
| 956 | 	/** | ||
| 957 | 	 * @range: Number of bytes from the object to bind to addr, MBZ for UNMAP_ALL | ||
| 958 | 	 */ | ||
| 959 | 	__u64 range; | ||
| 960 | |||
| 961 | 	/** @addr: Address to operate on, MBZ for UNMAP_ALL */ | ||
| 962 | 	__u64 addr; | ||
| 963 | |||
| 964 | #define DRM_XE_VM_BIND_OP_MAP		0x0 | ||
| 965 | #define DRM_XE_VM_BIND_OP_UNMAP		0x1 | ||
| 966 | #define DRM_XE_VM_BIND_OP_MAP_USERPTR	0x2 | ||
| 967 | #define DRM_XE_VM_BIND_OP_UNMAP_ALL	0x3 | ||
| 968 | #define DRM_XE_VM_BIND_OP_PREFETCH	0x4 | ||
| 969 | 	/** @op: Bind operation to perform */ | ||
| 970 | 	__u32 op; | ||
| 971 | |||
| 972 | #define DRM_XE_VM_BIND_FLAG_READONLY	(1 << 0) | ||
| 973 | #define DRM_XE_VM_BIND_FLAG_IMMEDIATE	(1 << 1) | ||
| 974 | #define DRM_XE_VM_BIND_FLAG_NULL	(1 << 2) | ||
| 975 | #define DRM_XE_VM_BIND_FLAG_DUMPABLE	(1 << 3) | ||
| 976 | 	/** @flags: Bind flags */ | ||
| 977 | 	__u32 flags; | ||
| 978 | |||
| 979 | 	/** | ||
| 980 | 	 * @prefetch_mem_region_instance: Memory region to prefetch VMA to. | ||
| 981 | 	 * It is a region instance, not a mask. | ||
| 982 | 	 * To be used only with %DRM_XE_VM_BIND_OP_PREFETCH operation. | ||
| 983 | 	 */ | ||
| 984 | 	__u32 prefetch_mem_region_instance; | ||
| 985 | |||
| 986 | 	/** @pad2: MBZ */ | ||
| 987 | 	__u32 pad2; | ||
| 988 | |||
| 989 | 	/** @reserved: Reserved */ | ||
| 990 | 	__u64 reserved[3]; | ||
| 991 | }; | ||
| 992 | |||
| 993 | /** | ||
| 994 | * struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND | ||
| 995 | * | ||
| 996 | * Below is an example of a minimal use of @drm_xe_vm_bind to | ||
| 997 | * asynchronously bind the buffer `data` at address `BIND_ADDRESS` to | ||
| 998 | * illustrate `userptr`. It can be synchronized by using the example | ||
| 999 | * provided for @drm_xe_sync. | ||
| 1000 | * | ||
| 1001 | * .. code-block:: C | ||
| 1002 | * | ||
| 1003 | * data = aligned_alloc(ALIGNMENT, BO_SIZE); | ||
| 1004 | * struct drm_xe_vm_bind bind = { | ||
| 1005 | * .vm_id = vm, | ||
| 1006 | * .num_binds = 1, | ||
| 1007 | * .bind.obj = 0, | ||
| 1008 | * .bind.obj_offset = to_user_pointer(data), | ||
| 1009 | * .bind.range = BO_SIZE, | ||
| 1010 | * .bind.addr = BIND_ADDRESS, | ||
| 1011 | * .bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR, | ||
| 1012 | * .bind.flags = 0, | ||
| 1013 | * .num_syncs = 1, | ||
| 1014 | * .syncs = &sync, | ||
| 1015 | * .exec_queue_id = 0, | ||
| 1016 | * }; | ||
| 1017 | * ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind); | ||
| 1018 | * | ||
| 1019 | */ | ||
| 1020 | struct drm_xe_vm_bind { | ||
| 1021 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1022 | 	__u64 extensions; | ||
| 1023 | |||
| 1024 | 	/** @vm_id: The ID of the VM to bind to */ | ||
| 1025 | 	__u32 vm_id; | ||
| 1026 | |||
| 1027 | 	/** | ||
| 1028 | 	 * @exec_queue_id: exec_queue_id, must be of class DRM_XE_ENGINE_CLASS_VM_BIND | ||
| 1029 | 	 * and exec queue must have same vm_id. If zero, the default VM bind engine | ||
| 1030 | 	 * is used. | ||
| 1031 | 	 */ | ||
| 1032 | 	__u32 exec_queue_id; | ||
| 1033 | |||
| 1034 | 	/** @pad: MBZ */ | ||
| 1035 | 	__u32 pad; | ||
| 1036 | |||
| 1037 | 	/** @num_binds: number of binds in this IOCTL */ | ||
| 1038 | 	__u32 num_binds; | ||
| 1039 | |||
| 1040 | 	union { | ||
| 1041 | 		/** @bind: used if num_binds == 1 */ | ||
| 1042 | 		struct drm_xe_vm_bind_op bind; | ||
| 1043 | |||
| 1044 | 		/** | ||
| 1045 | 		 * @vector_of_binds: userptr to array of struct | ||
| 1046 | 		 * drm_xe_vm_bind_op if num_binds > 1 | ||
| 1047 | 		 */ | ||
| 1048 | 		__u64 vector_of_binds; | ||
| 1049 | 	}; | ||
| 1050 | |||
| 1051 | 	/** @pad2: MBZ */ | ||
| 1052 | 	__u32 pad2; | ||
| 1053 | |||
| 1054 | 	/** @num_syncs: amount of syncs to wait on */ | ||
| 1055 | 	__u32 num_syncs; | ||
| 1056 | |||
| 1057 | 	/** @syncs: pointer to struct drm_xe_sync array */ | ||
| 1058 | 	__u64 syncs; | ||
| 1059 | |||
| 1060 | 	/** @reserved: Reserved */ | ||
| 1061 | 	__u64 reserved[2]; | ||
| 1062 | }; | ||
| 1063 | |||
| 1064 | /** | ||
| 1065 | * struct drm_xe_exec_queue_create - Input of &DRM_IOCTL_XE_EXEC_QUEUE_CREATE | ||
| 1066 | * | ||
| 1067 | * The example below shows how to use @drm_xe_exec_queue_create to create | ||
| 1068 | * a simple exec_queue (no parallel submission) of class | ||
| 1069 | * &DRM_XE_ENGINE_CLASS_RENDER. | ||
| 1070 | * | ||
| 1071 | * .. code-block:: C | ||
| 1072 | * | ||
| 1073 | * struct drm_xe_engine_class_instance instance = { | ||
| 1074 | * .engine_class = DRM_XE_ENGINE_CLASS_RENDER, | ||
| 1075 | * }; | ||
| 1076 | * struct drm_xe_exec_queue_create exec_queue_create = { | ||
| 1077 | * .extensions = 0, | ||
| 1078 | * .vm_id = vm, | ||
| 1079 | * .num_bb_per_exec = 1, | ||
| 1080 | * .num_eng_per_bb = 1, | ||
| 1081 | * .instances = to_user_pointer(&instance), | ||
| 1082 | * }; | ||
| 1083 | * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create); | ||
| 1084 | * | ||
| 1085 | */ | ||
| 1086 | struct drm_xe_exec_queue_create { | ||
| 1087 | #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY		0 | ||
| 1088 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY		0 | ||
| 1089 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE		1 | ||
| 1090 | |||
| 1091 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1092 | 	__u64 extensions; | ||
| 1093 | |||
| 1094 | 	/** @width: submission width (number BB per exec) for this exec queue */ | ||
| 1095 | 	__u16 width; | ||
| 1096 | |||
| 1097 | 	/** @num_placements: number of valid placements for this exec queue */ | ||
| 1098 | 	__u16 num_placements; | ||
| 1099 | |||
| 1100 | 	/** @vm_id: VM to use for this exec queue */ | ||
| 1101 | 	__u32 vm_id; | ||
| 1102 | |||
| 1103 | 	/** @flags: MBZ */ | ||
| 1104 | 	__u32 flags; | ||
| 1105 | |||
| 1106 | 	/** @exec_queue_id: Returned exec queue ID */ | ||
| 1107 | 	__u32 exec_queue_id; | ||
| 1108 | |||
| 1109 | 	/** | ||
| 1110 | 	 * @instances: user pointer to a 2-d array of struct | ||
| 1111 | 	 * drm_xe_engine_class_instance | ||
| 1112 | 	 * | ||
| 1113 | 	 * length = width (i) * num_placements (j) | ||
| 1114 | 	 * index = j + i * width | ||
| 1115 | 	 */ | ||
| 1116 | 	__u64 instances; | ||
| 1117 | |||
| 1118 | 	/** @reserved: Reserved */ | ||
| 1119 | 	__u64 reserved[2]; | ||
| 1120 | }; | ||
| 1121 | |||
| 1122 | /** | ||
| 1123 | * struct drm_xe_exec_queue_destroy - Input of &DRM_IOCTL_XE_EXEC_QUEUE_DESTROY | ||
| 1124 | */ | ||
| 1125 | struct drm_xe_exec_queue_destroy { | ||
| 1126 | 	/** @exec_queue_id: Exec queue ID */ | ||
| 1127 | 	__u32 exec_queue_id; | ||
| 1128 | |||
| 1129 | 	/** @pad: MBZ */ | ||
| 1130 | 	__u32 pad; | ||
| 1131 | |||
| 1132 | 	/** @reserved: Reserved */ | ||
| 1133 | 	__u64 reserved[2]; | ||
| 1134 | }; | ||
| 1135 | |||
| 1136 | /** | ||
| 1137 | * struct drm_xe_exec_queue_get_property - Input of &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY | ||
| 1138 | * | ||
| 1139 | * The @property can be: | ||
| 1140 | * - %DRM_XE_EXEC_QUEUE_GET_PROPERTY_BAN | ||
| 1141 | */ | ||
| 1142 | struct drm_xe_exec_queue_get_property { | ||
| 1143 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1144 | 	__u64 extensions; | ||
| 1145 | |||
| 1146 | 	/** @exec_queue_id: Exec queue ID */ | ||
| 1147 | 	__u32 exec_queue_id; | ||
| 1148 | |||
| 1149 | #define DRM_XE_EXEC_QUEUE_GET_PROPERTY_BAN	0 | ||
| 1150 | 	/** @property: property to get */ | ||
| 1151 | 	__u32 property; | ||
| 1152 | |||
| 1153 | 	/** @value: property value */ | ||
| 1154 | 	__u64 value; | ||
| 1155 | |||
| 1156 | 	/** @reserved: Reserved */ | ||
| 1157 | 	__u64 reserved[2]; | ||
| 1158 | }; | ||
| 1159 | |||
| 1160 | /** | ||
| 1161 | * struct drm_xe_sync - sync object | ||
| 1162 | * | ||
| 1163 | * The @type can be: | ||
| 1164 | * - %DRM_XE_SYNC_TYPE_SYNCOBJ | ||
| 1165 | * - %DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ | ||
| 1166 | * - %DRM_XE_SYNC_TYPE_USER_FENCE | ||
| 1167 | * | ||
| 1168 | * and the @flags can be: | ||
| 1169 | * - %DRM_XE_SYNC_FLAG_SIGNAL | ||
| 1170 | * | ||
| 1171 | * A minimal use of @drm_xe_sync looks like this: | ||
| 1172 | * | ||
| 1173 | * .. code-block:: C | ||
| 1174 | * | ||
| 1175 | * struct drm_xe_sync sync = { | ||
| 1176 | * .flags = DRM_XE_SYNC_FLAG_SIGNAL, | ||
| 1177 | * .type = DRM_XE_SYNC_TYPE_SYNCOBJ, | ||
| 1178 | * }; | ||
| 1179 | * struct drm_syncobj_create syncobj_create = { 0 }; | ||
| 1180 | * ioctl(fd, DRM_IOCTL_SYNCOBJ_CREATE, &syncobj_create); | ||
| 1181 | * sync.handle = syncobj_create.handle; | ||
| 1182 | * ... | ||
| 1183 | * use of &sync in drm_xe_exec or drm_xe_vm_bind | ||
| 1184 | * ... | ||
| 1185 | * struct drm_syncobj_wait wait = { | ||
| 1186 | * .handles = &sync.handle, | ||
| 1187 | * .timeout_nsec = INT64_MAX, | ||
| 1188 | * .count_handles = 1, | ||
| 1189 | * .flags = 0, | ||
| 1190 | * .first_signaled = 0, | ||
| 1191 | * .pad = 0, | ||
| 1192 | * }; | ||
| 1193 | * ioctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &wait); | ||
| 1194 | */ | ||
| 1195 | struct drm_xe_sync { | ||
| 1196 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1197 | 	__u64 extensions; | ||
| 1198 | |||
| 1199 | #define DRM_XE_SYNC_TYPE_SYNCOBJ		0x0 | ||
| 1200 | #define DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ	0x1 | ||
| 1201 | #define DRM_XE_SYNC_TYPE_USER_FENCE		0x2 | ||
| 1202 | 	/** @type: Type of the this sync object */ | ||
| 1203 | 	__u32 type; | ||
| 1204 | |||
| 1205 | #define DRM_XE_SYNC_FLAG_SIGNAL	(1 << 0) | ||
| 1206 | 	/** @flags: Sync Flags */ | ||
| 1207 | 	__u32 flags; | ||
| 1208 | |||
| 1209 | 	union { | ||
| 1210 | 		/** @handle: Handle for the object */ | ||
| 1211 | 		__u32 handle; | ||
| 1212 | |||
| 1213 | 		/** | ||
| 1214 | 		 * @addr: Address of user fence. When sync is passed in via exec | ||
| 1215 | 		 * IOCTL this is a GPU address in the VM. When sync passed in via | ||
| 1216 | 		 * VM bind IOCTL this is a user pointer. In either case, it is | ||
| 1217 | 		 * the users responsibility that this address is present and | ||
| 1218 | 		 * mapped when the user fence is signalled. Must be qword | ||
| 1219 | 		 * aligned. | ||
| 1220 | 		 */ | ||
| 1221 | 		__u64 addr; | ||
| 1222 | 	}; | ||
| 1223 | |||
| 1224 | 	/** | ||
| 1225 | 	 * @timeline_value: Input for the timeline sync object. Needs to be | ||
| 1226 | 	 * different than 0 when used with %DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ. | ||
| 1227 | 	 */ | ||
| 1228 | 	__u64 timeline_value; | ||
| 1229 | |||
| 1230 | 	/** @reserved: Reserved */ | ||
| 1231 | 	__u64 reserved[2]; | ||
| 1232 | }; | ||
| 1233 | |||
| 1234 | /** | ||
| 1235 | * struct drm_xe_exec - Input of &DRM_IOCTL_XE_EXEC | ||
| 1236 | * | ||
| 1237 | * This is an example to use @drm_xe_exec for execution of the object | ||
| 1238 | * at BIND_ADDRESS (see example in @drm_xe_vm_bind) by an exec_queue | ||
| 1239 | * (see example in @drm_xe_exec_queue_create). It can be synchronized | ||
| 1240 | * by using the example provided for @drm_xe_sync. | ||
| 1241 | * | ||
| 1242 | * .. code-block:: C | ||
| 1243 | * | ||
| 1244 | * struct drm_xe_exec exec = { | ||
| 1245 | * .exec_queue_id = exec_queue, | ||
| 1246 | * .syncs = &sync, | ||
| 1247 | * .num_syncs = 1, | ||
| 1248 | * .address = BIND_ADDRESS, | ||
| 1249 | * .num_batch_buffer = 1, | ||
| 1250 | * }; | ||
| 1251 | * ioctl(fd, DRM_IOCTL_XE_EXEC, &exec); | ||
| 1252 | * | ||
| 1253 | */ | ||
| 1254 | struct drm_xe_exec { | ||
| 1255 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1256 | 	__u64 extensions; | ||
| 1257 | |||
| 1258 | 	/** @exec_queue_id: Exec queue ID for the batch buffer */ | ||
| 1259 | 	__u32 exec_queue_id; | ||
| 1260 | |||
| 1261 | 	/** @num_syncs: Amount of struct drm_xe_sync in array. */ | ||
| 1262 | 	__u32 num_syncs; | ||
| 1263 | |||
| 1264 | 	/** @syncs: Pointer to struct drm_xe_sync array. */ | ||
| 1265 | 	__u64 syncs; | ||
| 1266 | |||
| 1267 | 	/** | ||
| 1268 | 	 * @address: address of batch buffer if num_batch_buffer == 1 or an | ||
| 1269 | 	 * array of batch buffer addresses | ||
| 1270 | 	 */ | ||
| 1271 | 	__u64 address; | ||
| 1272 | |||
| 1273 | 	/** | ||
| 1274 | 	 * @num_batch_buffer: number of batch buffer in this exec, must match | ||
| 1275 | 	 * the width of the engine | ||
| 1276 | 	 */ | ||
| 1277 | 	__u16 num_batch_buffer; | ||
| 1278 | |||
| 1279 | 	/** @pad: MBZ */ | ||
| 1280 | 	__u16 pad[3]; | ||
| 1281 | |||
| 1282 | 	/** @reserved: Reserved */ | ||
| 1283 | 	__u64 reserved[2]; | ||
| 1284 | }; | ||
| 1285 | |||
| 1286 | /** | ||
| 1287 | * struct drm_xe_wait_user_fence - Input of &DRM_IOCTL_XE_WAIT_USER_FENCE | ||
| 1288 | * | ||
| 1289 | * Wait on user fence, XE will wake-up on every HW engine interrupt in the | ||
| 1290 | * instances list and check if user fence is complete:: | ||
| 1291 | * | ||
| 1292 | *	(*addr & MASK) OP (VALUE & MASK) | ||
| 1293 | * | ||
| 1294 | * Returns to user on user fence completion or timeout. | ||
| 1295 | * | ||
| 1296 | * The @op can be: | ||
| 1297 | * - %DRM_XE_UFENCE_WAIT_OP_EQ | ||
| 1298 | * - %DRM_XE_UFENCE_WAIT_OP_NEQ | ||
| 1299 | * - %DRM_XE_UFENCE_WAIT_OP_GT | ||
| 1300 | * - %DRM_XE_UFENCE_WAIT_OP_GTE | ||
| 1301 | * - %DRM_XE_UFENCE_WAIT_OP_LT | ||
| 1302 | * - %DRM_XE_UFENCE_WAIT_OP_LTE | ||
| 1303 | * | ||
| 1304 | * and the @flags can be: | ||
| 1305 | * - %DRM_XE_UFENCE_WAIT_FLAG_ABSTIME | ||
| 1306 | * - %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP | ||
| 1307 | * | ||
| 1308 | * The @mask values can be for example: | ||
| 1309 | * - 0xffu for u8 | ||
| 1310 | * - 0xffffu for u16 | ||
| 1311 | * - 0xffffffffu for u32 | ||
| 1312 | * - 0xffffffffffffffffu for u64 | ||
| 1313 | */ | ||
| 1314 | struct drm_xe_wait_user_fence { | ||
| 1315 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1316 | 	__u64 extensions; | ||
| 1317 | |||
| 1318 | 	/** | ||
| 1319 | 	 * @addr: user pointer address to wait on, must qword aligned | ||
| 1320 | 	 */ | ||
| 1321 | 	__u64 addr; | ||
| 1322 | |||
| 1323 | #define DRM_XE_UFENCE_WAIT_OP_EQ	0x0 | ||
| 1324 | #define DRM_XE_UFENCE_WAIT_OP_NEQ	0x1 | ||
| 1325 | #define DRM_XE_UFENCE_WAIT_OP_GT	0x2 | ||
| 1326 | #define DRM_XE_UFENCE_WAIT_OP_GTE	0x3 | ||
| 1327 | #define DRM_XE_UFENCE_WAIT_OP_LT	0x4 | ||
| 1328 | #define DRM_XE_UFENCE_WAIT_OP_LTE	0x5 | ||
| 1329 | 	/** @op: wait operation (type of comparison) */ | ||
| 1330 | 	__u16 op; | ||
| 1331 | |||
| 1332 | #define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME	(1 << 0) | ||
| 1333 | 	/** @flags: wait flags */ | ||
| 1334 | 	__u16 flags; | ||
| 1335 | |||
| 1336 | 	/** @pad: MBZ */ | ||
| 1337 | 	__u32 pad; | ||
| 1338 | |||
| 1339 | 	/** @value: compare value */ | ||
| 1340 | 	__u64 value; | ||
| 1341 | |||
| 1342 | 	/** @mask: comparison mask */ | ||
| 1343 | 	__u64 mask; | ||
| 1344 | |||
| 1345 | 	/** | ||
| 1346 | 	 * @timeout: how long to wait before bailing, value in nanoseconds. | ||
| 1347 | 	 * Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout) | ||
| 1348 | 	 * it contains timeout expressed in nanoseconds to wait (fence will | ||
| 1349 | 	 * expire at now() + timeout). | ||
| 1350 | 	 * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flat is set (absolute timeout) wait | ||
| 1351 | 	 * will end at timeout (uses system MONOTONIC_CLOCK). | ||
| 1352 | 	 * Passing negative timeout leads to neverending wait. | ||
| 1353 | 	 * | ||
| 1354 | 	 * On relative timeout this value is updated with timeout left | ||
| 1355 | 	 * (for restarting the call in case of signal delivery). | ||
| 1356 | 	 * On absolute timeout this value stays intact (restarted call still | ||
| 1357 | 	 * expire at the same point of time). | ||
| 1358 | 	 */ | ||
| 1359 | 	__s64 timeout; | ||
| 1360 | |||
| 1361 | 	/** @exec_queue_id: exec_queue_id returned from xe_exec_queue_create_ioctl */ | ||
| 1362 | 	__u32 exec_queue_id; | ||
| 1363 | |||
| 1364 | 	/** @pad2: MBZ */ | ||
| 1365 | 	__u32 pad2; | ||
| 1366 | |||
| 1367 | 	/** @reserved: Reserved */ | ||
| 1368 | 	__u64 reserved[2]; | ||
| 1369 | }; | ||
| 1370 | |||
| 1371 | #if defined(__cplusplus) | ||
| 1372 | } | ||
| 1373 | #endif | ||
| 1374 | |||
| 1375 | #endif /* _XE_DRM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/affs_hardblocks.h+34-34| ... | @@ -7,42 +7,42 @@ | ... | @@ -7,42 +7,42 @@ |
| 7 | /* Just the needed definitions for the RDB of an Amiga HD. */ | 7 | /* Just the needed definitions for the RDB of an Amiga HD. */ |
| 8 | 8 | ||
| 9 | struct RigidDiskBlock { | 9 | struct RigidDiskBlock { |
| 10 | 	__u32	rdb_ID; | 10 | 	__be32	rdb_ID; |
| 11 | 	__be32	rdb_SummedLongs; | 11 | 	__be32	rdb_SummedLongs; |
| 12 | 	__s32	rdb_ChkSum; | 12 | 	__be32	rdb_ChkSum; |
| 13 | 	__u32	rdb_HostID; | 13 | 	__be32	rdb_HostID; |
| 14 | 	__be32	rdb_BlockBytes; | 14 | 	__be32	rdb_BlockBytes; |
| 15 | 	__u32	rdb_Flags; | 15 | 	__be32	rdb_Flags; |
| 16 | 	__u32	rdb_BadBlockList; | 16 | 	__be32	rdb_BadBlockList; |
| 17 | 	__be32	rdb_PartitionList; | 17 | 	__be32	rdb_PartitionList; |
| 18 | 	__u32	rdb_FileSysHeaderList; | 18 | 	__be32	rdb_FileSysHeaderList; |
| 19 | 	__u32	rdb_DriveInit; | 19 | 	__be32	rdb_DriveInit; |
| 20 | 	__u32	rdb_Reserved1[6]; | 20 | 	__be32	rdb_Reserved1[6]; |
| 21 | 	__u32	rdb_Cylinders; | 21 | 	__be32	rdb_Cylinders; |
| 22 | 	__u32	rdb_Sectors; | 22 | 	__be32	rdb_Sectors; |
| 23 | 	__u32	rdb_Heads; | 23 | 	__be32	rdb_Heads; |
| 24 | 	__u32	rdb_Interleave; | 24 | 	__be32	rdb_Interleave; |
| 25 | 	__u32	rdb_Park; | 25 | 	__be32	rdb_Park; |
| 26 | 	__u32	rdb_Reserved2[3]; | 26 | 	__be32	rdb_Reserved2[3]; |
| 27 | 	__u32	rdb_WritePreComp; | 27 | 	__be32	rdb_WritePreComp; |
| 28 | 	__u32	rdb_ReducedWrite; | 28 | 	__be32	rdb_ReducedWrite; |
| 29 | 	__u32	rdb_StepRate; | 29 | 	__be32	rdb_StepRate; |
| 30 | 	__u32	rdb_Reserved3[5]; | 30 | 	__be32	rdb_Reserved3[5]; |
| 31 | 	__u32	rdb_RDBBlocksLo; | 31 | 	__be32	rdb_RDBBlocksLo; |
| 32 | 	__u32	rdb_RDBBlocksHi; | 32 | 	__be32	rdb_RDBBlocksHi; |
| 33 | 	__u32	rdb_LoCylinder; | 33 | 	__be32	rdb_LoCylinder; |
| 34 | 	__u32	rdb_HiCylinder; | 34 | 	__be32	rdb_HiCylinder; |
| 35 | 	__u32	rdb_CylBlocks; | 35 | 	__be32	rdb_CylBlocks; |
| 36 | 	__u32	rdb_AutoParkSeconds; | 36 | 	__be32	rdb_AutoParkSeconds; |
| 37 | 	__u32	rdb_HighRDSKBlock; | 37 | 	__be32	rdb_HighRDSKBlock; |
| 38 | 	__u32	rdb_Reserved4; | 38 | 	__be32	rdb_Reserved4; |
| 39 | 	char	rdb_DiskVendor[8]; | 39 | 	char	rdb_DiskVendor[8]; |
| 40 | 	char	rdb_DiskProduct[16]; | 40 | 	char	rdb_DiskProduct[16]; |
| 41 | 	char	rdb_DiskRevision[4]; | 41 | 	char	rdb_DiskRevision[4]; |
| 42 | 	char	rdb_ControllerVendor[8]; | 42 | 	char	rdb_ControllerVendor[8]; |
| 43 | 	char	rdb_ControllerProduct[16]; | 43 | 	char	rdb_ControllerProduct[16]; |
| 44 | 	char	rdb_ControllerRevision[4]; | 44 | 	char	rdb_ControllerRevision[4]; |
| 45 | 	__u32	rdb_Reserved5[10]; | 45 | 	__be32	rdb_Reserved5[10]; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | #define	IDNAME_RIGIDDISK	0x5244534B	/* "RDSK" */ | 48 | #define	IDNAME_RIGIDDISK	0x5244534B	/* "RDSK" */ |
| ... | @@ -50,16 +50,16 @@ struct RigidDiskBlock { | ... | @@ -50,16 +50,16 @@ struct RigidDiskBlock { |
| 50 | struct PartitionBlock { | 50 | struct PartitionBlock { |
| 51 | 	__be32	pb_ID; | 51 | 	__be32	pb_ID; |
| 52 | 	__be32	pb_SummedLongs; | 52 | 	__be32	pb_SummedLongs; |
| 53 | 	__s32	pb_ChkSum; | 53 | 	__be32	pb_ChkSum; |
| 54 | 	__u32	pb_HostID; | 54 | 	__be32	pb_HostID; |
| 55 | 	__be32	pb_Next; | 55 | 	__be32	pb_Next; |
| 56 | 	__u32	pb_Flags; | 56 | 	__be32	pb_Flags; |
| 57 | 	__u32	pb_Reserved1[2]; | 57 | 	__be32	pb_Reserved1[2]; |
| 58 | 	__u32	pb_DevFlags; | 58 | 	__be32	pb_DevFlags; |
| 59 | 	__u8	pb_DriveName[32]; | 59 | 	__u8	pb_DriveName[32]; |
| 60 | 	__u32	pb_Reserved2[15]; | 60 | 	__be32	pb_Reserved2[15]; |
| 61 | 	__be32	pb_Environment[17]; | 61 | 	__be32	pb_Environment[17]; |
| 62 | 	__u32	pb_EReserved[15]; | 62 | 	__be32	pb_EReserved[15]; |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | #define	IDNAME_PARTITION	0x50415254	/* "PART" */ | 65 | #define	IDNAME_PARTITION	0x50415254	/* "PART" */ |
lib/libc/include/any-linux-any/linux/android/binder.h+16-14| ... | @@ -251,20 +251,22 @@ struct binder_extended_error { | ... | @@ -251,20 +251,22 @@ struct binder_extended_error { |
| 251 | 	__s32	param; | 251 | 	__s32	param; |
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| 254 | #define BINDER_WRITE_READ		_IOWR('b', 1, struct binder_write_read) | 254 | enum { |
| 255 | #define BINDER_SET_IDLE_TIMEOUT		_IOW('b', 3, __s64) | 255 | 	BINDER_WRITE_READ		= _IOWR('b', 1, struct binder_write_read), |
| 256 | #define BINDER_SET_MAX_THREADS		_IOW('b', 5, __u32) | 256 | 	BINDER_SET_IDLE_TIMEOUT		= _IOW('b', 3, __s64), |
| 257 | #define BINDER_SET_IDLE_PRIORITY	_IOW('b', 6, __s32) | 257 | 	BINDER_SET_MAX_THREADS		= _IOW('b', 5, __u32), |
| 258 | #define BINDER_SET_CONTEXT_MGR		_IOW('b', 7, __s32) | 258 | 	BINDER_SET_IDLE_PRIORITY	= _IOW('b', 6, __s32), |
| 259 | #define BINDER_THREAD_EXIT		_IOW('b', 8, __s32) | 259 | 	BINDER_SET_CONTEXT_MGR		= _IOW('b', 7, __s32), |
| 260 | #define BINDER_VERSION			_IOWR('b', 9, struct binder_version) | 260 | 	BINDER_THREAD_EXIT		= _IOW('b', 8, __s32), |
| 261 | #define BINDER_GET_NODE_DEBUG_INFO	_IOWR('b', 11, struct binder_node_debug_info) | 261 | 	BINDER_VERSION			= _IOWR('b', 9, struct binder_version), |
| 262 | #define BINDER_GET_NODE_INFO_FOR_REF	_IOWR('b', 12, struct binder_node_info_for_ref) | 262 | 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info), |
| 263 | #define BINDER_SET_CONTEXT_MGR_EXT	_IOW('b', 13, struct flat_binder_object) | 263 | 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref), |
| 264 | #define BINDER_FREEZE			_IOW('b', 14, struct binder_freeze_info) | 264 | 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object), |
| 265 | #define BINDER_GET_FROZEN_INFO		_IOWR('b', 15, struct binder_frozen_status_info) | 265 | 	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info), |
| 266 | #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION	_IOW('b', 16, __u32) | 266 | 	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info), |
| 267 | #define BINDER_GET_EXTENDED_ERROR	_IOWR('b', 17, struct binder_extended_error) | 267 | 	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32), |
| 268 | 	BINDER_GET_EXTENDED_ERROR	= _IOWR('b', 17, struct binder_extended_error), | ||
| 269 | }; | ||
| 268 | 270 | ||
| 269 | /* | 271 | /* |
| 270 | * NOTE: Two special error codes you should check for when calling | 272 | * NOTE: Two special error codes you should check for when calling |
lib/libc/include/any-linux-any/linux/atmdev.h-4| ... | @@ -101,10 +101,6 @@ struct atm_dev_stats { | ... | @@ -101,10 +101,6 @@ struct atm_dev_stats { |
| 101 | 					/* use backend to make new if */ | 101 | 					/* use backend to make new if */ |
| 102 | #define ATM_ADDPARTY 	_IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf) | 102 | #define ATM_ADDPARTY 	_IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf) |
| 103 | 					/* add party to p2mp call */ | 103 | 					/* add party to p2mp call */ |
| 104 | #ifdef CONFIG_COMPAT | ||
| 105 | /* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */ | ||
| 106 | #define COMPAT_ATM_ADDPARTY 	_IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf) | ||
| 107 | #endif | ||
| 108 | #define ATM_DROPPARTY 	_IOW('a', ATMIOC_SPECIAL+5,int) | 104 | #define ATM_DROPPARTY 	_IOW('a', ATMIOC_SPECIAL+5,int) |
| 109 | 					/* drop party from p2mp call */ | 105 | 					/* drop party from p2mp call */ |
| 110 | 106 |
lib/libc/include/any-linux-any/linux/auto_dev-ioctl.h+1-1| ... | @@ -109,7 +109,7 @@ struct autofs_dev_ioctl { | ... | @@ -109,7 +109,7 @@ struct autofs_dev_ioctl { |
| 109 | 		struct args_ismountpoint	ismountpoint; | 109 | 		struct args_ismountpoint	ismountpoint; |
| 110 | 	}; | 110 | 	}; |
| 111 | 111 | ||
| 112 | 	char path[0]; | 112 | 	char path[]; |
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | static __inline__ void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) | 115 | static __inline__ void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) |
lib/libc/include/any-linux-any/linux/auxvec.h+2| ... | @@ -32,6 +32,8 @@ | ... | @@ -32,6 +32,8 @@ |
| 32 | #define AT_HWCAP2 26	/* extension of AT_HWCAP */ | 32 | #define AT_HWCAP2 26	/* extension of AT_HWCAP */ |
| 33 | #define AT_RSEQ_FEATURE_SIZE	27	/* rseq supported feature size */ | 33 | #define AT_RSEQ_FEATURE_SIZE	27	/* rseq supported feature size */ |
| 34 | #define AT_RSEQ_ALIGN		28	/* rseq allocation alignment */ | 34 | #define AT_RSEQ_ALIGN		28	/* rseq allocation alignment */ |
| 35 | #define AT_HWCAP3 29	/* extension of AT_HWCAP */ | ||
| 36 | #define AT_HWCAP4 30	/* extension of AT_HWCAP */ | ||
| 35 | 37 | ||
| 36 | #define AT_EXECFN 31	/* filename of program */ | 38 | #define AT_EXECFN 31	/* filename of program */ |
| 37 | 39 |
lib/libc/include/any-linux-any/linux/batadv_packet.h+39-6| ... | @@ -116,6 +116,9 @@ enum batadv_icmp_packettype { | ... | @@ -116,6 +116,9 @@ enum batadv_icmp_packettype { |
| 116 | * only need routable IPv4 multicast packets we signed up for explicitly | 116 | * only need routable IPv4 multicast packets we signed up for explicitly |
| 117 | * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore | 117 | * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore |
| 118 | * only need routable IPv6 multicast packets we signed up for explicitly | 118 | * only need routable IPv6 multicast packets we signed up for explicitly |
| 119 | * @BATADV_MCAST_HAVE_MC_PTYPE_CAPA: we can parse, receive and forward | ||
| 120 | * batman-adv multicast packets with a multicast tracker TVLV. And all our | ||
| 121 | * hard interfaces have an MTU of at least 1280 bytes. | ||
| 119 | */ | 122 | */ |
| 120 | enum batadv_mcast_flags { | 123 | enum batadv_mcast_flags { |
| 121 | 	BATADV_MCAST_WANT_ALL_UNSNOOPABLES	= 1UL << 0, | 124 | 	BATADV_MCAST_WANT_ALL_UNSNOOPABLES	= 1UL << 0, |
| ... | @@ -123,6 +126,7 @@ enum batadv_mcast_flags { | ... | @@ -123,6 +126,7 @@ enum batadv_mcast_flags { |
| 123 | 	BATADV_MCAST_WANT_ALL_IPV6		= 1UL << 2, | 126 | 	BATADV_MCAST_WANT_ALL_IPV6		= 1UL << 2, |
| 124 | 	BATADV_MCAST_WANT_NO_RTR4		= 1UL << 3, | 127 | 	BATADV_MCAST_WANT_NO_RTR4		= 1UL << 3, |
| 125 | 	BATADV_MCAST_WANT_NO_RTR6		= 1UL << 4, | 128 | 	BATADV_MCAST_WANT_NO_RTR6		= 1UL << 4, |
| 129 | 	BATADV_MCAST_HAVE_MC_PTYPE_CAPA		= 1UL << 5, | ||
| 126 | }; | 130 | }; |
| 127 | 131 | ||
| 128 | /* tt data subtypes */ | 132 | /* tt data subtypes */ |
| ... | @@ -174,14 +178,16 @@ enum batadv_bla_claimframe { | ... | @@ -174,14 +178,16 @@ enum batadv_bla_claimframe { |
| 174 | * @BATADV_TVLV_TT: translation table tvlv | 178 | * @BATADV_TVLV_TT: translation table tvlv |
| 175 | * @BATADV_TVLV_ROAM: roaming advertisement tvlv | 179 | * @BATADV_TVLV_ROAM: roaming advertisement tvlv |
| 176 | * @BATADV_TVLV_MCAST: multicast capability tvlv | 180 | * @BATADV_TVLV_MCAST: multicast capability tvlv |
| 181 | * @BATADV_TVLV_MCAST_TRACKER: multicast tracker tvlv | ||
| 177 | */ | 182 | */ |
| 178 | enum batadv_tvlv_type { | 183 | enum batadv_tvlv_type { |
| 179 | 	BATADV_TVLV_GW		= 0x01, | 184 | 	BATADV_TVLV_GW			= 0x01, |
| 180 | 	BATADV_TVLV_DAT		= 0x02, | 185 | 	BATADV_TVLV_DAT			= 0x02, |
| 181 | 	BATADV_TVLV_NC		= 0x03, | 186 | 	BATADV_TVLV_NC			= 0x03, |
| 182 | 	BATADV_TVLV_TT		= 0x04, | 187 | 	BATADV_TVLV_TT			= 0x04, |
| 183 | 	BATADV_TVLV_ROAM	= 0x05, | 188 | 	BATADV_TVLV_ROAM		= 0x05, |
| 184 | 	BATADV_TVLV_MCAST	= 0x06, | 189 | 	BATADV_TVLV_MCAST		= 0x06, |
| 190 | 	BATADV_TVLV_MCAST_TRACKER	= 0x07, | ||
| 185 | }; | 191 | }; |
| 186 | 192 | ||
| 187 | #pragma pack(2) | 193 | #pragma pack(2) |
| ... | @@ -487,6 +493,25 @@ struct batadv_bcast_packet { | ... | @@ -487,6 +493,25 @@ struct batadv_bcast_packet { |
| 487 | 	 */ | 493 | 	 */ |
| 488 | }; | 494 | }; |
| 489 | 495 | ||
| 496 | /** | ||
| 497 | * struct batadv_mcast_packet - multicast packet for network payload | ||
| 498 | * @packet_type: batman-adv packet type, part of the general header | ||
| 499 | * @version: batman-adv protocol version, part of the general header | ||
| 500 | * @ttl: time to live for this packet, part of the general header | ||
| 501 | * @reserved: reserved byte for alignment | ||
| 502 | * @tvlv_len: length of the appended tvlv buffer (in bytes) | ||
| 503 | */ | ||
| 504 | struct batadv_mcast_packet { | ||
| 505 | 	__u8 packet_type; | ||
| 506 | 	__u8 version; | ||
| 507 | 	__u8 ttl; | ||
| 508 | 	__u8 reserved; | ||
| 509 | 	__be16 tvlv_len; | ||
| 510 | 	/* "4 bytes boundary + 2 bytes" long to make the payload after the | ||
| 511 | 	 * following ethernet header again 4 bytes boundary aligned | ||
| 512 | 	 */ | ||
| 513 | }; | ||
| 514 | |||
| 490 | /** | 515 | /** |
| 491 | * struct batadv_coded_packet - network coded packet | 516 | * struct batadv_coded_packet - network coded packet |
| 492 | * @packet_type: batman-adv packet type, part of the general header | 517 | * @packet_type: batman-adv packet type, part of the general header |
| ... | @@ -628,6 +653,14 @@ struct batadv_tvlv_mcast_data { | ... | @@ -628,6 +653,14 @@ struct batadv_tvlv_mcast_data { |
| 628 | 	__u8 reserved[3]; | 653 | 	__u8 reserved[3]; |
| 629 | }; | 654 | }; |
| 630 | 655 | ||
| 656 | /** | ||
| 657 | * struct batadv_tvlv_mcast_tracker - payload of a multicast tracker tvlv | ||
| 658 | * @num_dests: number of subsequent destination originator MAC addresses | ||
| 659 | */ | ||
| 660 | struct batadv_tvlv_mcast_tracker { | ||
| 661 | 	__be16	num_dests; | ||
| 662 | }; | ||
| 663 | |||
| 631 | #pragma pack() | 664 | #pragma pack() |
| 632 | 665 | ||
| 633 | #endif /* _LINUX_BATADV_PACKET_H_ */ | 666 | #endif /* _LINUX_BATADV_PACKET_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/bits.h created+15| ... | @@ -0,0 +1,15 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* bits.h: Macros for dealing with bitmasks. */ | ||
| 3 | |||
| 4 | #ifndef _LINUX_BITS_H | ||
| 5 | #define _LINUX_BITS_H | ||
| 6 | |||
| 7 | #define __GENMASK(h, l) \ | ||
| 8 | (((~_UL(0)) - (_UL(1) << (l)) + 1) & \ | ||
| 9 | (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) | ||
| 10 | |||
| 11 | #define __GENMASK_ULL(h, l) \ | ||
| 12 | (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \ | ||
| 13 | (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) | ||
| 14 | |||
| 15 | #endif /* _LINUX_BITS_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/blkzoned.h+5-5| ... | @@ -51,13 +51,13 @@ enum blk_zone_type { | ... | @@ -51,13 +51,13 @@ enum blk_zone_type { |
| 51 | * | 51 | * |
| 52 | * The Zone Condition state machine in the ZBC/ZAC standards maps the above | 52 | * The Zone Condition state machine in the ZBC/ZAC standards maps the above |
| 53 | * deinitions as: | 53 | * deinitions as: |
| 54 | * - ZC1: Empty | BLK_ZONE_EMPTY | 54 | * - ZC1: Empty | BLK_ZONE_COND_EMPTY |
| 55 | * - ZC2: Implicit Open | BLK_ZONE_COND_IMP_OPEN | 55 | * - ZC2: Implicit Open | BLK_ZONE_COND_IMP_OPEN |
| 56 | * - ZC3: Explicit Open | BLK_ZONE_COND_EXP_OPEN | 56 | * - ZC3: Explicit Open | BLK_ZONE_COND_EXP_OPEN |
| 57 | * - ZC4: Closed | BLK_ZONE_CLOSED | 57 | * - ZC4: Closed | BLK_ZONE_COND_CLOSED |
| 58 | * - ZC5: Full | BLK_ZONE_FULL | 58 | * - ZC5: Full | BLK_ZONE_COND_FULL |
| 59 | * - ZC6: Read Only | BLK_ZONE_READONLY | 59 | * - ZC6: Read Only | BLK_ZONE_COND_READONLY |
| 60 | * - ZC7: Offline | BLK_ZONE_OFFLINE | 60 | * - ZC7: Offline | BLK_ZONE_COND_OFFLINE |
| 61 | * | 61 | * |
| 62 | * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should | 62 | * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should |
| 63 | * be considered invalid. | 63 | * be considered invalid. |
lib/libc/include/any-linux-any/linux/bpf.h+487-65| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | 19 | ||
| 20 | /* ld/ldx fields */ | 20 | /* ld/ldx fields */ |
| 21 | #define BPF_DW		0x18	/* double word (64-bit) */ | 21 | #define BPF_DW		0x18	/* double word (64-bit) */ |
| 22 | #define BPF_MEMSX	0x80	/* load with sign extension */ | ||
| 22 | #define BPF_ATOMIC	0xc0	/* atomic memory ops - op type in immediate */ | 23 | #define BPF_ATOMIC	0xc0	/* atomic memory ops - op type in immediate */ |
| 23 | #define BPF_XADD	0xc0	/* exclusive add - legacy name */ | 24 | #define BPF_XADD	0xc0	/* exclusive add - legacy name */ |
| 24 | 25 | ||
| ... | @@ -41,6 +42,7 @@ | ... | @@ -41,6 +42,7 @@ |
| 41 | #define BPF_JSGE	0x70	/* SGE is signed '>=', GE in x86 */ | 42 | #define BPF_JSGE	0x70	/* SGE is signed '>=', GE in x86 */ |
| 42 | #define BPF_JSLT	0xc0	/* SLT is signed, '<' */ | 43 | #define BPF_JSLT	0xc0	/* SLT is signed, '<' */ |
| 43 | #define BPF_JSLE	0xd0	/* SLE is signed, '<=' */ | 44 | #define BPF_JSLE	0xd0	/* SLE is signed, '<=' */ |
| 45 | #define BPF_JCOND	0xe0	/* conditional pseudo jumps: may_goto, goto_or_nop */ | ||
| 44 | #define BPF_CALL	0x80	/* function call */ | 46 | #define BPF_CALL	0x80	/* function call */ |
| 45 | #define BPF_EXIT	0x90	/* function return */ | 47 | #define BPF_EXIT	0x90	/* function return */ |
| 46 | 48 | ||
| ... | @@ -49,6 +51,10 @@ | ... | @@ -49,6 +51,10 @@ |
| 49 | #define BPF_XCHG	(0xe0 | BPF_FETCH)	/* atomic exchange */ | 51 | #define BPF_XCHG	(0xe0 | BPF_FETCH)	/* atomic exchange */ |
| 50 | #define BPF_CMPXCHG	(0xf0 | BPF_FETCH)	/* atomic compare-and-write */ | 52 | #define BPF_CMPXCHG	(0xf0 | BPF_FETCH)	/* atomic compare-and-write */ |
| 51 | 53 | ||
| 54 | enum bpf_cond_pseudo_jmp { | ||
| 55 | 	BPF_MAY_GOTO = 0, | ||
| 56 | }; | ||
| 57 | |||
| 52 | /* Register numbers */ | 58 | /* Register numbers */ |
| 53 | enum { | 59 | enum { |
| 54 | 	BPF_REG_0 = 0, | 60 | 	BPF_REG_0 = 0, |
| ... | @@ -76,12 +82,29 @@ struct bpf_insn { | ... | @@ -76,12 +82,29 @@ struct bpf_insn { |
| 76 | 	__s32	imm;		/* signed immediate constant */ | 82 | 	__s32	imm;		/* signed immediate constant */ |
| 77 | }; | 83 | }; |
| 78 | 84 | ||
| 79 | /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */ | 85 | /* Deprecated: use struct bpf_lpm_trie_key_u8 (when the "data" member is needed for |
| 86 | * byte access) or struct bpf_lpm_trie_key_hdr (when using an alternative type for | ||
| 87 | * the trailing flexible array member) instead. | ||
| 88 | */ | ||
| 80 | struct bpf_lpm_trie_key { | 89 | struct bpf_lpm_trie_key { |
| 81 | 	__u32	prefixlen;	/* up to 32 for AF_INET, 128 for AF_INET6 */ | 90 | 	__u32	prefixlen;	/* up to 32 for AF_INET, 128 for AF_INET6 */ |
| 82 | 	__u8	data[0];	/* Arbitrary size */ | 91 | 	__u8	data[0];	/* Arbitrary size */ |
| 83 | }; | 92 | }; |
| 84 | 93 | ||
| 94 | /* Header for bpf_lpm_trie_key structs */ | ||
| 95 | struct bpf_lpm_trie_key_hdr { | ||
| 96 | 	__u32	prefixlen; | ||
| 97 | }; | ||
| 98 | |||
| 99 | /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry, with trailing byte array. */ | ||
| 100 | struct bpf_lpm_trie_key_u8 { | ||
| 101 | 	union { | ||
| 102 | 		struct bpf_lpm_trie_key_hdr	hdr; | ||
| 103 | 		__u32				prefixlen; | ||
| 104 | 	}; | ||
| 105 | 	__u8	data[];		/* Arbitrary size */ | ||
| 106 | }; | ||
| 107 | |||
| 85 | struct bpf_cgroup_storage_key { | 108 | struct bpf_cgroup_storage_key { |
| 86 | 	__u64	cgroup_inode_id;	/* cgroup inode id */ | 109 | 	__u64	cgroup_inode_id;	/* cgroup inode id */ |
| 87 | 	__u32	attach_type;		/* program attach type (enum bpf_attach_type) */ | 110 | 	__u32	attach_type;		/* program attach type (enum bpf_attach_type) */ |
| ... | @@ -616,7 +639,11 @@ union bpf_iter_link_info { | ... | @@ -616,7 +639,11 @@ union bpf_iter_link_info { |
| 616 | *		to NULL to begin the batched operation. After each subsequent | 639 | *		to NULL to begin the batched operation. After each subsequent |
| 617 | *		**BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant | 640 | *		**BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant |
| 618 | *		*out_batch* as the *in_batch* for the next operation to | 641 | *		*out_batch* as the *in_batch* for the next operation to |
| 619 | *		continue iteration from the current point. | 642 | *		continue iteration from the current point. Both *in_batch* and |
| 643 | *		*out_batch* must point to memory large enough to hold a key, | ||
| 644 | *		except for maps of type **BPF_MAP_TYPE_{HASH, PERCPU_HASH, | ||
| 645 | *		LRU_HASH, LRU_PERCPU_HASH}**, for which batch parameters | ||
| 646 | *		must be at least 4 bytes wide regardless of key size. | ||
| 620 | * | 647 | * |
| 621 | *		The *keys* and *values* are output parameters which must point | 648 | *		The *keys* and *values* are output parameters which must point |
| 622 | *		to memory large enough to hold *count* items based on the key | 649 | *		to memory large enough to hold *count* items based on the key |
| ... | @@ -846,6 +873,36 @@ union bpf_iter_link_info { | ... | @@ -846,6 +873,36 @@ union bpf_iter_link_info { |
| 846 | *		Returns zero on success. On error, -1 is returned and *errno* | 873 | *		Returns zero on success. On error, -1 is returned and *errno* |
| 847 | *		is set appropriately. | 874 | *		is set appropriately. |
| 848 | * | 875 | * |
| 876 | * BPF_TOKEN_CREATE | ||
| 877 | *	Description | ||
| 878 | *		Create BPF token with embedded information about what | ||
| 879 | *		BPF-related functionality it allows: | ||
| 880 | *		- a set of allowed bpf() syscall commands; | ||
| 881 | *		- a set of allowed BPF map types to be created with | ||
| 882 | *		BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed; | ||
| 883 | *		- a set of allowed BPF program types and BPF program attach | ||
| 884 | *		types to be loaded with BPF_PROG_LOAD command, if | ||
| 885 | *		BPF_PROG_LOAD itself is allowed. | ||
| 886 | * | ||
| 887 | *		BPF token is created (derived) from an instance of BPF FS, | ||
| 888 | *		assuming it has necessary delegation mount options specified. | ||
| 889 | *		This BPF token can be passed as an extra parameter to various | ||
| 890 | *		bpf() syscall commands to grant BPF subsystem functionality to | ||
| 891 | *		unprivileged processes. | ||
| 892 | * | ||
| 893 | *		When created, BPF token is "associated" with the owning | ||
| 894 | *		user namespace of BPF FS instance (super block) that it was | ||
| 895 | *		derived from, and subsequent BPF operations performed with | ||
| 896 | *		BPF token would be performing capabilities checks (i.e., | ||
| 897 | *		CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within | ||
| 898 | *		that user namespace. Without BPF token, such capabilities | ||
| 899 | *		have to be granted in init user namespace, making bpf() | ||
| 900 | *		syscall incompatible with user namespace, for the most part. | ||
| 901 | * | ||
| 902 | *	Return | ||
| 903 | *		A new file descriptor (a nonnegative integer), or -1 if an | ||
| 904 | *		error occurred (in which case, *errno* is set appropriately). | ||
| 905 | * | ||
| 849 | * NOTES | 906 | * NOTES |
| 850 | *	eBPF objects (maps and programs) can be shared between processes. | 907 | *	eBPF objects (maps and programs) can be shared between processes. |
| 851 | * | 908 | * |
| ... | @@ -900,6 +957,8 @@ enum bpf_cmd { | ... | @@ -900,6 +957,8 @@ enum bpf_cmd { |
| 900 | 	BPF_ITER_CREATE, | 957 | 	BPF_ITER_CREATE, |
| 901 | 	BPF_LINK_DETACH, | 958 | 	BPF_LINK_DETACH, |
| 902 | 	BPF_PROG_BIND_MAP, | 959 | 	BPF_PROG_BIND_MAP, |
| 960 | 	BPF_TOKEN_CREATE, | ||
| 961 | 	__MAX_BPF_CMD, | ||
| 903 | }; | 962 | }; |
| 904 | 963 | ||
| 905 | enum bpf_map_type { | 964 | enum bpf_map_type { |
| ... | @@ -931,7 +990,14 @@ enum bpf_map_type { | ... | @@ -931,7 +990,14 @@ enum bpf_map_type { |
| 931 | 	 */ | 990 | 	 */ |
| 932 | 	BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, | 991 | 	BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, |
| 933 | 	BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, | 992 | 	BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, |
| 934 | 	BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, | 993 | 	BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, |
| 994 | 	/* BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE is available to bpf programs | ||
| 995 | 	 * attaching to a cgroup. The new mechanism (BPF_MAP_TYPE_CGRP_STORAGE + | ||
| 996 | 	 * local percpu kptr) supports all BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE | ||
| 997 | 	 * functionality and more. So mark * BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE | ||
| 998 | 	 * deprecated. | ||
| 999 | 	 */ | ||
| 1000 | 	BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED, | ||
| 935 | 	BPF_MAP_TYPE_QUEUE, | 1001 | 	BPF_MAP_TYPE_QUEUE, |
| 936 | 	BPF_MAP_TYPE_STACK, | 1002 | 	BPF_MAP_TYPE_STACK, |
| 937 | 	BPF_MAP_TYPE_SK_STORAGE, | 1003 | 	BPF_MAP_TYPE_SK_STORAGE, |
| ... | @@ -943,6 +1009,8 @@ enum bpf_map_type { | ... | @@ -943,6 +1009,8 @@ enum bpf_map_type { |
| 943 | 	BPF_MAP_TYPE_BLOOM_FILTER, | 1009 | 	BPF_MAP_TYPE_BLOOM_FILTER, |
| 944 | 	BPF_MAP_TYPE_USER_RINGBUF, | 1010 | 	BPF_MAP_TYPE_USER_RINGBUF, |
| 945 | 	BPF_MAP_TYPE_CGRP_STORAGE, | 1011 | 	BPF_MAP_TYPE_CGRP_STORAGE, |
| 1012 | 	BPF_MAP_TYPE_ARENA, | ||
| 1013 | 	__MAX_BPF_MAP_TYPE | ||
| 946 | }; | 1014 | }; |
| 947 | 1015 | ||
| 948 | /* Note that tracing related programs such as | 1016 | /* Note that tracing related programs such as |
| ... | @@ -986,6 +1054,8 @@ enum bpf_prog_type { | ... | @@ -986,6 +1054,8 @@ enum bpf_prog_type { |
| 986 | 	BPF_PROG_TYPE_LSM, | 1054 | 	BPF_PROG_TYPE_LSM, |
| 987 | 	BPF_PROG_TYPE_SK_LOOKUP, | 1055 | 	BPF_PROG_TYPE_SK_LOOKUP, |
| 988 | 	BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */ | 1056 | 	BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */ |
| 1057 | 	BPF_PROG_TYPE_NETFILTER, | ||
| 1058 | 	__MAX_BPF_PROG_TYPE | ||
| 989 | }; | 1059 | }; |
| 990 | 1060 | ||
| 991 | enum bpf_attach_type { | 1061 | enum bpf_attach_type { |
| ... | @@ -1033,6 +1103,19 @@ enum bpf_attach_type { | ... | @@ -1033,6 +1103,19 @@ enum bpf_attach_type { |
| 1033 | 	BPF_PERF_EVENT, | 1103 | 	BPF_PERF_EVENT, |
| 1034 | 	BPF_TRACE_KPROBE_MULTI, | 1104 | 	BPF_TRACE_KPROBE_MULTI, |
| 1035 | 	BPF_LSM_CGROUP, | 1105 | 	BPF_LSM_CGROUP, |
| 1106 | 	BPF_STRUCT_OPS, | ||
| 1107 | 	BPF_NETFILTER, | ||
| 1108 | 	BPF_TCX_INGRESS, | ||
| 1109 | 	BPF_TCX_EGRESS, | ||
| 1110 | 	BPF_TRACE_UPROBE_MULTI, | ||
| 1111 | 	BPF_CGROUP_UNIX_CONNECT, | ||
| 1112 | 	BPF_CGROUP_UNIX_SENDMSG, | ||
| 1113 | 	BPF_CGROUP_UNIX_RECVMSG, | ||
| 1114 | 	BPF_CGROUP_UNIX_GETPEERNAME, | ||
| 1115 | 	BPF_CGROUP_UNIX_GETSOCKNAME, | ||
| 1116 | 	BPF_NETKIT_PRIMARY, | ||
| 1117 | 	BPF_NETKIT_PEER, | ||
| 1118 | 	BPF_TRACE_KPROBE_SESSION, | ||
| 1036 | 	__MAX_BPF_ATTACH_TYPE | 1119 | 	__MAX_BPF_ATTACH_TYPE |
| 1037 | }; | 1120 | }; |
| 1038 | 1121 | ||
| ... | @@ -1049,8 +1132,24 @@ enum bpf_link_type { | ... | @@ -1049,8 +1132,24 @@ enum bpf_link_type { |
| 1049 | 	BPF_LINK_TYPE_PERF_EVENT = 7, | 1132 | 	BPF_LINK_TYPE_PERF_EVENT = 7, |
| 1050 | 	BPF_LINK_TYPE_KPROBE_MULTI = 8, | 1133 | 	BPF_LINK_TYPE_KPROBE_MULTI = 8, |
| 1051 | 	BPF_LINK_TYPE_STRUCT_OPS = 9, | 1134 | 	BPF_LINK_TYPE_STRUCT_OPS = 9, |
| 1135 | 	BPF_LINK_TYPE_NETFILTER = 10, | ||
| 1136 | 	BPF_LINK_TYPE_TCX = 11, | ||
| 1137 | 	BPF_LINK_TYPE_UPROBE_MULTI = 12, | ||
| 1138 | 	BPF_LINK_TYPE_NETKIT = 13, | ||
| 1139 | 	BPF_LINK_TYPE_SOCKMAP = 14, | ||
| 1140 | 	__MAX_BPF_LINK_TYPE, | ||
| 1141 | }; | ||
| 1142 | |||
| 1143 | #define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE | ||
| 1052 | 1144 | ||
| 1053 | 	MAX_BPF_LINK_TYPE, | 1145 | enum bpf_perf_event_type { |
| 1146 | 	BPF_PERF_EVENT_UNSPEC = 0, | ||
| 1147 | 	BPF_PERF_EVENT_UPROBE = 1, | ||
| 1148 | 	BPF_PERF_EVENT_URETPROBE = 2, | ||
| 1149 | 	BPF_PERF_EVENT_KPROBE = 3, | ||
| 1150 | 	BPF_PERF_EVENT_KRETPROBE = 4, | ||
| 1151 | 	BPF_PERF_EVENT_TRACEPOINT = 5, | ||
| 1152 | 	BPF_PERF_EVENT_EVENT = 6, | ||
| 1054 | }; | 1153 | }; |
| 1055 | 1154 | ||
| 1056 | /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command | 1155 | /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command |
| ... | @@ -1099,7 +1198,12 @@ enum bpf_link_type { | ... | @@ -1099,7 +1198,12 @@ enum bpf_link_type { |
| 1099 | */ | 1198 | */ |
| 1100 | #define BPF_F_ALLOW_OVERRIDE	(1U << 0) | 1199 | #define BPF_F_ALLOW_OVERRIDE	(1U << 0) |
| 1101 | #define BPF_F_ALLOW_MULTI	(1U << 1) | 1200 | #define BPF_F_ALLOW_MULTI	(1U << 1) |
| 1201 | /* Generic attachment flags. */ | ||
| 1102 | #define BPF_F_REPLACE		(1U << 2) | 1202 | #define BPF_F_REPLACE		(1U << 2) |
| 1203 | #define BPF_F_BEFORE		(1U << 3) | ||
| 1204 | #define BPF_F_AFTER		(1U << 4) | ||
| 1205 | #define BPF_F_ID		(1U << 5) | ||
| 1206 | #define BPF_F_LINK		BPF_F_LINK /* 1 << 13 */ | ||
| 1103 | 1207 | ||
| 1104 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the | 1208 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the |
| 1105 | * verifier will perform strict alignment checking as if the kernel | 1209 | * verifier will perform strict alignment checking as if the kernel |
| ... | @@ -1108,7 +1212,7 @@ enum bpf_link_type { | ... | @@ -1108,7 +1212,7 @@ enum bpf_link_type { |
| 1108 | */ | 1212 | */ |
| 1109 | #define BPF_F_STRICT_ALIGNMENT	(1U << 0) | 1213 | #define BPF_F_STRICT_ALIGNMENT	(1U << 0) |
| 1110 | 1214 | ||
| 1111 | /* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the | 1215 | /* If BPF_F_ANY_ALIGNMENT is used in BPF_PROG_LOAD command, the |
| 1112 | * verifier will allow any alignment whatsoever. On platforms | 1216 | * verifier will allow any alignment whatsoever. On platforms |
| 1113 | * with strict alignment requirements for loads ands stores (such | 1217 | * with strict alignment requirements for loads ands stores (such |
| 1114 | * as sparc and mips) the verifier validates that all loads and | 1218 | * as sparc and mips) the verifier validates that all loads and |
| ... | @@ -1161,10 +1265,27 @@ enum bpf_link_type { | ... | @@ -1161,10 +1265,27 @@ enum bpf_link_type { |
| 1161 | */ | 1265 | */ |
| 1162 | #define BPF_F_XDP_DEV_BOUND_ONLY	(1U << 6) | 1266 | #define BPF_F_XDP_DEV_BOUND_ONLY	(1U << 6) |
| 1163 | 1267 | ||
| 1268 | /* The verifier internal test flag. Behavior is undefined */ | ||
| 1269 | #define BPF_F_TEST_REG_INVARIANTS	(1U << 7) | ||
| 1270 | |||
| 1164 | /* link_create.kprobe_multi.flags used in LINK_CREATE command for | 1271 | /* link_create.kprobe_multi.flags used in LINK_CREATE command for |
| 1165 | * BPF_TRACE_KPROBE_MULTI attach type to create return probe. | 1272 | * BPF_TRACE_KPROBE_MULTI attach type to create return probe. |
| 1166 | */ | 1273 | */ |
| 1167 | #define BPF_F_KPROBE_MULTI_RETURN	(1U << 0) | 1274 | enum { |
| 1275 | 	BPF_F_KPROBE_MULTI_RETURN = (1U << 0) | ||
| 1276 | }; | ||
| 1277 | |||
| 1278 | /* link_create.uprobe_multi.flags used in LINK_CREATE command for | ||
| 1279 | * BPF_TRACE_UPROBE_MULTI attach type to create return probe. | ||
| 1280 | */ | ||
| 1281 | enum { | ||
| 1282 | 	BPF_F_UPROBE_MULTI_RETURN = (1U << 0) | ||
| 1283 | }; | ||
| 1284 | |||
| 1285 | /* link_create.netfilter.flags used in LINK_CREATE command for | ||
| 1286 | * BPF_PROG_TYPE_NETFILTER to enable IP packet defragmentation. | ||
| 1287 | */ | ||
| 1288 | #define BPF_F_NETFILTER_IP_DEFRAG (1U << 0) | ||
| 1168 | 1289 | ||
| 1169 | /* When BPF ldimm64's insn[0].src_reg != 0 then this can have | 1290 | /* When BPF ldimm64's insn[0].src_reg != 0 then this can have |
| 1170 | * the following extensions: | 1291 | * the following extensions: |
| ... | @@ -1220,6 +1341,10 @@ enum bpf_link_type { | ... | @@ -1220,6 +1341,10 @@ enum bpf_link_type { |
| 1220 | */ | 1341 | */ |
| 1221 | #define BPF_PSEUDO_KFUNC_CALL	2 | 1342 | #define BPF_PSEUDO_KFUNC_CALL	2 |
| 1222 | 1343 | ||
| 1344 | enum bpf_addr_space_cast { | ||
| 1345 | 	BPF_ADDR_SPACE_CAST = 1, | ||
| 1346 | }; | ||
| 1347 | |||
| 1223 | /* flags for BPF_MAP_UPDATE_ELEM command */ | 1348 | /* flags for BPF_MAP_UPDATE_ELEM command */ |
| 1224 | enum { | 1349 | enum { |
| 1225 | 	BPF_ANY		= 0, /* create new element or update existing */ | 1350 | 	BPF_ANY		= 0, /* create new element or update existing */ |
| ... | @@ -1266,6 +1391,24 @@ enum { | ... | @@ -1266,6 +1391,24 @@ enum { |
| 1266 | 1391 | ||
| 1267 | /* Create a map that is suitable to be an inner map with dynamic max entries */ | 1392 | /* Create a map that is suitable to be an inner map with dynamic max entries */ |
| 1268 | 	BPF_F_INNER_MAP		= (1U << 12), | 1393 | 	BPF_F_INNER_MAP		= (1U << 12), |
| 1394 | |||
| 1395 | /* Create a map that will be registered/unregesitered by the backed bpf_link */ | ||
| 1396 | 	BPF_F_LINK		= (1U << 13), | ||
| 1397 | |||
| 1398 | /* Get path from provided FD in BPF_OBJ_PIN/BPF_OBJ_GET commands */ | ||
| 1399 | 	BPF_F_PATH_FD		= (1U << 14), | ||
| 1400 | |||
| 1401 | /* Flag for value_type_btf_obj_fd, the fd is available */ | ||
| 1402 | 	BPF_F_VTYPE_BTF_OBJ_FD	= (1U << 15), | ||
| 1403 | |||
| 1404 | /* BPF token FD is passed in a corresponding command's token_fd field */ | ||
| 1405 | 	BPF_F_TOKEN_FD = (1U << 16), | ||
| 1406 | |||
| 1407 | /* When user space page faults in bpf_arena send SIGSEGV instead of inserting new page */ | ||
| 1408 | 	BPF_F_SEGV_ON_FAULT	= (1U << 17), | ||
| 1409 | |||
| 1410 | /* Do not translate kernel bpf_arena pointers to user pointers */ | ||
| 1411 | 	BPF_F_NO_USER_CONV	= (1U << 18), | ||
| 1269 | }; | 1412 | }; |
| 1270 | 1413 | ||
| 1271 | /* Flags for BPF_PROG_QUERY. */ | 1414 | /* Flags for BPF_PROG_QUERY. */ |
| ... | @@ -1337,8 +1480,20 @@ union bpf_attr { | ... | @@ -1337,8 +1480,20 @@ union bpf_attr { |
| 1337 | 		 * BPF_MAP_TYPE_BLOOM_FILTER - the lowest 4 bits indicate the | 1480 | 		 * BPF_MAP_TYPE_BLOOM_FILTER - the lowest 4 bits indicate the |
| 1338 | 		 * number of hash functions (if 0, the bloom filter will default | 1481 | 		 * number of hash functions (if 0, the bloom filter will default |
| 1339 | 		 * to using 5 hash functions). | 1482 | 		 * to using 5 hash functions). |
| 1483 | 		 * | ||
| 1484 | 		 * BPF_MAP_TYPE_ARENA - contains the address where user space | ||
| 1485 | 		 * is going to mmap() the arena. It has to be page aligned. | ||
| 1340 | 		 */ | 1486 | 		 */ |
| 1341 | 		__u64	map_extra; | 1487 | 		__u64	map_extra; |
| 1488 | |||
| 1489 | 		__s32 value_type_btf_obj_fd;	/* fd pointing to a BTF | ||
| 1490 | 						 * type data for | ||
| 1491 | 						 * btf_vmlinux_value_type_id. | ||
| 1492 | 						 */ | ||
| 1493 | 		/* BPF token FD to use with BPF_MAP_CREATE operation. | ||
| 1494 | 		 * If provided, map_flags should have BPF_F_TOKEN_FD flag set. | ||
| 1495 | 		 */ | ||
| 1496 | 		__s32	map_token_fd; | ||
| 1342 | 	}; | 1497 | 	}; |
| 1343 | 1498 | ||
| 1344 | 	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 1499 | 	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| ... | @@ -1403,23 +1558,44 @@ union bpf_attr { | ... | @@ -1403,23 +1558,44 @@ union bpf_attr { |
| 1403 | 		__aligned_u64	fd_array;	/* array of FDs */ | 1558 | 		__aligned_u64	fd_array;	/* array of FDs */ |
| 1404 | 		__aligned_u64	core_relos; | 1559 | 		__aligned_u64	core_relos; |
| 1405 | 		__u32		core_relo_rec_size; /* sizeof(struct bpf_core_relo) */ | 1560 | 		__u32		core_relo_rec_size; /* sizeof(struct bpf_core_relo) */ |
| 1561 | 		/* output: actual total log contents size (including termintaing zero). | ||
| 1562 | 		 * It could be both larger than original log_size (if log was | ||
| 1563 | 		 * truncated), or smaller (if log buffer wasn't filled completely). | ||
| 1564 | 		 */ | ||
| 1565 | 		__u32		log_true_size; | ||
| 1566 | 		/* BPF token FD to use with BPF_PROG_LOAD operation. | ||
| 1567 | 		 * If provided, prog_flags should have BPF_F_TOKEN_FD flag set. | ||
| 1568 | 		 */ | ||
| 1569 | 		__s32		prog_token_fd; | ||
| 1406 | 	}; | 1570 | 	}; |
| 1407 | 1571 | ||
| 1408 | 	struct { /* anonymous struct used by BPF_OBJ_* commands */ | 1572 | 	struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| 1409 | 		__aligned_u64	pathname; | 1573 | 		__aligned_u64	pathname; |
| 1410 | 		__u32		bpf_fd; | 1574 | 		__u32		bpf_fd; |
| 1411 | 		__u32		file_flags; | 1575 | 		__u32		file_flags; |
| 1576 | 		/* Same as dirfd in openat() syscall; see openat(2) | ||
| 1577 | 		 * manpage for details of path FD and pathname semantics; | ||
| 1578 | 		 * path_fd should accompanied by BPF_F_PATH_FD flag set in | ||
| 1579 | 		 * file_flags field, otherwise it should be set to zero; | ||
| 1580 | 		 * if BPF_F_PATH_FD flag is not set, AT_FDCWD is assumed. | ||
| 1581 | 		 */ | ||
| 1582 | 		__s32		path_fd; | ||
| 1412 | 	}; | 1583 | 	}; |
| 1413 | 1584 | ||
| 1414 | 	struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ | 1585 | 	struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ |
| 1415 | 		__u32		target_fd;	/* container object to attach to */ | 1586 | 		union { |
| 1416 | 		__u32		attach_bpf_fd;	/* eBPF program to attach */ | 1587 | 			__u32	target_fd;	/* target object to attach to or ... */ |
| 1588 | 			__u32	target_ifindex;	/* target ifindex */ | ||
| 1589 | 		}; | ||
| 1590 | 		__u32		attach_bpf_fd; | ||
| 1417 | 		__u32		attach_type; | 1591 | 		__u32		attach_type; |
| 1418 | 		__u32		attach_flags; | 1592 | 		__u32		attach_flags; |
| 1419 | 		__u32		replace_bpf_fd;	/* previously attached eBPF | 1593 | 		__u32		replace_bpf_fd; |
| 1420 | 						 * program to replace if | 1594 | 		union { |
| 1421 | 						 * BPF_F_REPLACE is used | 1595 | 			__u32	relative_fd; |
| 1422 | 						 */ | 1596 | 			__u32	relative_id; |
| 1597 | 		}; | ||
| 1598 | 		__u64		expected_revision; | ||
| 1423 | 	}; | 1599 | 	}; |
| 1424 | 1600 | ||
| 1425 | 	struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */ | 1601 | 	struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */ |
| ... | @@ -1465,21 +1641,33 @@ union bpf_attr { | ... | @@ -1465,21 +1641,33 @@ union bpf_attr { |
| 1465 | 	} info; | 1641 | 	} info; |
| 1466 | 1642 | ||
| 1467 | 	struct { /* anonymous struct used by BPF_PROG_QUERY command */ | 1643 | 	struct { /* anonymous struct used by BPF_PROG_QUERY command */ |
| 1468 | 		__u32		target_fd;	/* container object to query */ | 1644 | 		union { |
| 1645 | 			__u32	target_fd;	/* target object to query or ... */ | ||
| 1646 | 			__u32	target_ifindex;	/* target ifindex */ | ||
| 1647 | 		}; | ||
| 1469 | 		__u32		attach_type; | 1648 | 		__u32		attach_type; |
| 1470 | 		__u32		query_flags; | 1649 | 		__u32		query_flags; |
| 1471 | 		__u32		attach_flags; | 1650 | 		__u32		attach_flags; |
| 1472 | 		__aligned_u64	prog_ids; | 1651 | 		__aligned_u64	prog_ids; |
| 1473 | 		__u32		prog_cnt; | 1652 | 		union { |
| 1653 | 			__u32	prog_cnt; | ||
| 1654 | 			__u32	count; | ||
| 1655 | 		}; | ||
| 1656 | 		__u32		:32; | ||
| 1474 | 		/* output: per-program attach_flags. | 1657 | 		/* output: per-program attach_flags. |
| 1475 | 		 * not allowed to be set during effective query. | 1658 | 		 * not allowed to be set during effective query. |
| 1476 | 		 */ | 1659 | 		 */ |
| 1477 | 		__aligned_u64	prog_attach_flags; | 1660 | 		__aligned_u64	prog_attach_flags; |
| 1661 | 		__aligned_u64	link_ids; | ||
| 1662 | 		__aligned_u64	link_attach_flags; | ||
| 1663 | 		__u64		revision; | ||
| 1478 | 	} query; | 1664 | 	} query; |
| 1479 | 1665 | ||
| 1480 | 	struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */ | 1666 | 	struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */ |
| 1481 | 		__u64 name; | 1667 | 		__u64		name; |
| 1482 | 		__u32 prog_fd; | 1668 | 		__u32		prog_fd; |
| 1669 | 		__u32		:32; | ||
| 1670 | 		__aligned_u64	cookie; | ||
| 1483 | 	} raw_tracepoint; | 1671 | 	} raw_tracepoint; |
| 1484 | 1672 | ||
| 1485 | 	struct { /* anonymous struct for BPF_BTF_LOAD */ | 1673 | 	struct { /* anonymous struct for BPF_BTF_LOAD */ |
| ... | @@ -1488,6 +1676,16 @@ union bpf_attr { | ... | @@ -1488,6 +1676,16 @@ union bpf_attr { |
| 1488 | 		__u32		btf_size; | 1676 | 		__u32		btf_size; |
| 1489 | 		__u32		btf_log_size; | 1677 | 		__u32		btf_log_size; |
| 1490 | 		__u32		btf_log_level; | 1678 | 		__u32		btf_log_level; |
| 1679 | 		/* output: actual total log contents size (including termintaing zero). | ||
| 1680 | 		 * It could be both larger than original log_size (if log was | ||
| 1681 | 		 * truncated), or smaller (if log buffer wasn't filled completely). | ||
| 1682 | 		 */ | ||
| 1683 | 		__u32		btf_log_true_size; | ||
| 1684 | 		__u32		btf_flags; | ||
| 1685 | 		/* BPF token FD to use with BPF_BTF_LOAD operation. | ||
| 1686 | 		 * If provided, btf_flags should have BPF_F_TOKEN_FD flag set. | ||
| 1687 | 		 */ | ||
| 1688 | 		__s32		btf_token_fd; | ||
| 1491 | 	}; | 1689 | 	}; |
| 1492 | 1690 | ||
| 1493 | 	struct { | 1691 | 	struct { |
| ... | @@ -1507,15 +1705,18 @@ union bpf_attr { | ... | @@ -1507,15 +1705,18 @@ union bpf_attr { |
| 1507 | 	} task_fd_query; | 1705 | 	} task_fd_query; |
| 1508 | 1706 | ||
| 1509 | 	struct { /* struct used by BPF_LINK_CREATE command */ | 1707 | 	struct { /* struct used by BPF_LINK_CREATE command */ |
| 1510 | 		__u32		prog_fd;	/* eBPF program to attach */ | ||
| 1511 | 		union { | 1708 | 		union { |
| 1512 | 			__u32		target_fd;	/* object to attach to */ | 1709 | 			__u32		prog_fd;	/* eBPF program to attach */ |
| 1513 | 			__u32		target_ifindex; /* target ifindex */ | 1710 | 			__u32		map_fd;		/* struct_ops to attach */ |
| 1711 | 		}; | ||
| 1712 | 		union { | ||
| 1713 | 			__u32	target_fd;	/* target object to attach to or ... */ | ||
| 1714 | 			__u32	target_ifindex; /* target ifindex */ | ||
| 1514 | 		}; | 1715 | 		}; |
| 1515 | 		__u32		attach_type;	/* attach type */ | 1716 | 		__u32		attach_type;	/* attach type */ |
| 1516 | 		__u32		flags;		/* extra flags */ | 1717 | 		__u32		flags;		/* extra flags */ |
| 1517 | 		union { | 1718 | 		union { |
| 1518 | 			__u32		target_btf_id;	/* btf_id of target to attach to */ | 1719 | 			__u32	target_btf_id;	/* btf_id of target to attach to */ |
| 1519 | 			struct { | 1720 | 			struct { |
| 1520 | 				__aligned_u64	iter_info;	/* extra bpf_iter_link_info */ | 1721 | 				__aligned_u64	iter_info;	/* extra bpf_iter_link_info */ |
| 1521 | 				__u32		iter_info_len;	/* iter_info length */ | 1722 | 				__u32		iter_info_len;	/* iter_info length */ |
| ... | @@ -1543,17 +1744,57 @@ union bpf_attr { | ... | @@ -1543,17 +1744,57 @@ union bpf_attr { |
| 1543 | 				 */ | 1744 | 				 */ |
| 1544 | 				__u64		cookie; | 1745 | 				__u64		cookie; |
| 1545 | 			} tracing; | 1746 | 			} tracing; |
| 1747 | 			struct { | ||
| 1748 | 				__u32		pf; | ||
| 1749 | 				__u32		hooknum; | ||
| 1750 | 				__s32		priority; | ||
| 1751 | 				__u32		flags; | ||
| 1752 | 			} netfilter; | ||
| 1753 | 			struct { | ||
| 1754 | 				union { | ||
| 1755 | 					__u32	relative_fd; | ||
| 1756 | 					__u32	relative_id; | ||
| 1757 | 				}; | ||
| 1758 | 				__u64		expected_revision; | ||
| 1759 | 			} tcx; | ||
| 1760 | 			struct { | ||
| 1761 | 				__aligned_u64	path; | ||
| 1762 | 				__aligned_u64	offsets; | ||
| 1763 | 				__aligned_u64	ref_ctr_offsets; | ||
| 1764 | 				__aligned_u64	cookies; | ||
| 1765 | 				__u32		cnt; | ||
| 1766 | 				__u32		flags; | ||
| 1767 | 				__u32		pid; | ||
| 1768 | 			} uprobe_multi; | ||
| 1769 | 			struct { | ||
| 1770 | 				union { | ||
| 1771 | 					__u32	relative_fd; | ||
| 1772 | 					__u32	relative_id; | ||
| 1773 | 				}; | ||
| 1774 | 				__u64		expected_revision; | ||
| 1775 | 			} netkit; | ||
| 1546 | 		}; | 1776 | 		}; |
| 1547 | 	} link_create; | 1777 | 	} link_create; |
| 1548 | 1778 | ||
| 1549 | 	struct { /* struct used by BPF_LINK_UPDATE command */ | 1779 | 	struct { /* struct used by BPF_LINK_UPDATE command */ |
| 1550 | 		__u32		link_fd;	/* link fd */ | 1780 | 		__u32		link_fd;	/* link fd */ |
| 1551 | 		/* new program fd to update link with */ | 1781 | 		union { |
| 1552 | 		__u32		new_prog_fd; | 1782 | 			/* new program fd to update link with */ |
| 1783 | 			__u32		new_prog_fd; | ||
| 1784 | 			/* new struct_ops map fd to update link with */ | ||
| 1785 | 			__u32 new_map_fd; | ||
| 1786 | 		}; | ||
| 1553 | 		__u32		flags;		/* extra flags */ | 1787 | 		__u32		flags;		/* extra flags */ |
| 1554 | 		/* expected link's program fd; is specified only if | 1788 | 		union { |
| 1555 | 		 * BPF_F_REPLACE flag is set in flags */ | 1789 | 			/* expected link's program fd; is specified only if |
| 1556 | 		__u32		old_prog_fd; | 1790 | 			 * BPF_F_REPLACE flag is set in flags. |
| 1791 | 			 */ | ||
| 1792 | 			__u32		old_prog_fd; | ||
| 1793 | 			/* expected link's map fd; is specified only | ||
| 1794 | 			 * if BPF_F_REPLACE flag is set. | ||
| 1795 | 			 */ | ||
| 1796 | 			__u32 old_map_fd; | ||
| 1797 | 		}; | ||
| 1557 | 	} link_update; | 1798 | 	} link_update; |
| 1558 | 1799 | ||
| 1559 | 	struct { | 1800 | 	struct { |
| ... | @@ -1575,6 +1816,11 @@ union bpf_attr { | ... | @@ -1575,6 +1816,11 @@ union bpf_attr { |
| 1575 | 		__u32		flags;		/* extra flags */ | 1816 | 		__u32		flags;		/* extra flags */ |
| 1576 | 	} prog_bind_map; | 1817 | 	} prog_bind_map; |
| 1577 | 1818 | ||
| 1819 | 	struct { /* struct used by BPF_TOKEN_CREATE command */ | ||
| 1820 | 		__u32		flags; | ||
| 1821 | 		__u32		bpffs_fd; | ||
| 1822 | 	} token_create; | ||
| 1823 | |||
| 1578 | } __attribute__((aligned(8))); | 1824 | } __attribute__((aligned(8))); |
| 1579 | 1825 | ||
| 1580 | /* The description below is an attempt at providing documentation to eBPF | 1826 | /* The description below is an attempt at providing documentation to eBPF |
| ... | @@ -1647,17 +1893,17 @@ union bpf_attr { | ... | @@ -1647,17 +1893,17 @@ union bpf_attr { |
| 1647 | * 	Description | 1893 | * 	Description |
| 1648 | * 		This helper is a "printk()-like" facility for debugging. It | 1894 | * 		This helper is a "printk()-like" facility for debugging. It |
| 1649 | * 		prints a message defined by format *fmt* (of size *fmt_size*) | 1895 | * 		prints a message defined by format *fmt* (of size *fmt_size*) |
| 1650 | * 		to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if | 1896 | * 		to file *\/sys/kernel/tracing/trace* from TraceFS, if |
| 1651 | * 		available. It can take up to three additional **u64** | 1897 | * 		available. It can take up to three additional **u64** |
| 1652 | * 		arguments (as an eBPF helpers, the total number of arguments is | 1898 | * 		arguments (as an eBPF helpers, the total number of arguments is |
| 1653 | * 		limited to five). | 1899 | * 		limited to five). |
| 1654 | * | 1900 | * |
| 1655 | * 		Each time the helper is called, it appends a line to the trace. | 1901 | * 		Each time the helper is called, it appends a line to the trace. |
| 1656 | * 		Lines are discarded while *\/sys/kernel/debug/tracing/trace* is | 1902 | * 		Lines are discarded while *\/sys/kernel/tracing/trace* is |
| 1657 | * 		open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this. | 1903 | * 		open, use *\/sys/kernel/tracing/trace_pipe* to avoid this. |
| 1658 | * 		The format of the trace is customizable, and the exact output | 1904 | * 		The format of the trace is customizable, and the exact output |
| 1659 | * 		one will get depends on the options set in | 1905 | * 		one will get depends on the options set in |
| 1660 | * 		*\/sys/kernel/debug/tracing/trace_options* (see also the | 1906 | * 		*\/sys/kernel/tracing/trace_options* (see also the |
| 1661 | * 		*README* file under the same directory). However, it usually | 1907 | * 		*README* file under the same directory). However, it usually |
| 1662 | * 		defaults to something like: | 1908 | * 		defaults to something like: |
| 1663 | * | 1909 | * |
| ... | @@ -1850,7 +2096,9 @@ union bpf_attr { | ... | @@ -1850,7 +2096,9 @@ union bpf_attr { |
| 1850 | * 		performed again, if the helper is used in combination with | 2096 | * 		performed again, if the helper is used in combination with |
| 1851 | * 		direct packet access. | 2097 | * 		direct packet access. |
| 1852 | * 	Return | 2098 | * 	Return |
| 1853 | * 		0 on success, or a negative error in case of failure. | 2099 | * 		0 on success, or a negative error in case of failure. Positive |
| 2100 | * 		error indicates a potential drop or congestion in the target | ||
| 2101 | * 		device. The particular positive error codes are not defined. | ||
| 1854 | * | 2102 | * |
| 1855 | * u64 bpf_get_current_pid_tgid(void) | 2103 | * u64 bpf_get_current_pid_tgid(void) |
| 1856 | * 	Description | 2104 | * 	Description |
| ... | @@ -2583,8 +2831,8 @@ union bpf_attr { | ... | @@ -2583,8 +2831,8 @@ union bpf_attr { |
| 2583 | * 		*bpf_socket* should be one of the following: | 2831 | * 		*bpf_socket* should be one of the following: |
| 2584 | * | 2832 | * |
| 2585 | * 		* **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. | 2833 | * 		* **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. |
| 2586 | * 		* **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT** | 2834 | *		* **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**, |
| 2587 | * 		 and **BPF_CGROUP_INET6_CONNECT**. | 2835 | *		 **BPF_CGROUP_INET6_CONNECT** and **BPF_CGROUP_UNIX_CONNECT**. |
| 2588 | * | 2836 | * |
| 2589 | * 		This helper actually implements a subset of **setsockopt()**. | 2837 | * 		This helper actually implements a subset of **setsockopt()**. |
| 2590 | * 		It supports the following *level*\ s: | 2838 | * 		It supports the following *level*\ s: |
| ... | @@ -2822,8 +3070,8 @@ union bpf_attr { | ... | @@ -2822,8 +3070,8 @@ union bpf_attr { |
| 2822 | * 		*bpf_socket* should be one of the following: | 3070 | * 		*bpf_socket* should be one of the following: |
| 2823 | * | 3071 | * |
| 2824 | * 		* **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. | 3072 | * 		* **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. |
| 2825 | * 		* **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT** | 3073 | *		* **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**, |
| 2826 | * 		 and **BPF_CGROUP_INET6_CONNECT**. | 3074 | *		 **BPF_CGROUP_INET6_CONNECT** and **BPF_CGROUP_UNIX_CONNECT**. |
| 2827 | * | 3075 | * |
| 2828 | * 		This helper actually implements a subset of **getsockopt()**. | 3076 | * 		This helper actually implements a subset of **getsockopt()**. |
| 2829 | * 		It supports the same set of *optname*\ s that is supported by | 3077 | * 		It supports the same set of *optname*\ s that is supported by |
| ... | @@ -3131,6 +3379,10 @@ union bpf_attr { | ... | @@ -3131,6 +3379,10 @@ union bpf_attr { |
| 3131 | *		**BPF_FIB_LOOKUP_DIRECT** | 3379 | *		**BPF_FIB_LOOKUP_DIRECT** |
| 3132 | *			Do a direct table lookup vs full lookup using FIB | 3380 | *			Do a direct table lookup vs full lookup using FIB |
| 3133 | *			rules. | 3381 | *			rules. |
| 3382 | *		**BPF_FIB_LOOKUP_TBID** | ||
| 3383 | *			Used with BPF_FIB_LOOKUP_DIRECT. | ||
| 3384 | *			Use the routing table ID present in *params*->tbid | ||
| 3385 | *			for the fib lookup. | ||
| 3134 | *		**BPF_FIB_LOOKUP_OUTPUT** | 3386 | *		**BPF_FIB_LOOKUP_OUTPUT** |
| 3135 | *			Perform lookup from an egress perspective (default is | 3387 | *			Perform lookup from an egress perspective (default is |
| 3136 | *			ingress). | 3388 | *			ingress). |
| ... | @@ -3139,6 +3391,15 @@ union bpf_attr { | ... | @@ -3139,6 +3391,15 @@ union bpf_attr { |
| 3139 | *			and *params*->smac will not be set as output. A common | 3391 | *			and *params*->smac will not be set as output. A common |
| 3140 | *			use case is to call **bpf_redirect_neigh**\ () after | 3392 | *			use case is to call **bpf_redirect_neigh**\ () after |
| 3141 | *			doing **bpf_fib_lookup**\ (). | 3393 | *			doing **bpf_fib_lookup**\ (). |
| 3394 | *		**BPF_FIB_LOOKUP_SRC** | ||
| 3395 | *			Derive and set source IP addr in *params*->ipv{4,6}_src | ||
| 3396 | *			for the nexthop. If the src addr cannot be derived, | ||
| 3397 | *			**BPF_FIB_LKUP_RET_NO_SRC_ADDR** is returned. In this | ||
| 3398 | *			case, *params*->dmac and *params*->smac are not set either. | ||
| 3399 | *		**BPF_FIB_LOOKUP_MARK** | ||
| 3400 | *			Use the mark present in *params*->mark for the fib lookup. | ||
| 3401 | *			This option should not be used with BPF_FIB_LOOKUP_DIRECT, | ||
| 3402 | *			as it only has meaning for full lookups. | ||
| 3142 | * | 3403 | * |
| 3143 | *		*ctx* is either **struct xdp_md** for XDP programs or | 3404 | *		*ctx* is either **struct xdp_md** for XDP programs or |
| 3144 | *		**struct sk_buff** tc cls_act programs. | 3405 | *		**struct sk_buff** tc cls_act programs. |
| ... | @@ -4108,9 +4369,6 @@ union bpf_attr { | ... | @@ -4108,9 +4369,6 @@ union bpf_attr { |
| 4108 | *		**-EOPNOTSUPP** if the operation is not supported, for example | 4369 | *		**-EOPNOTSUPP** if the operation is not supported, for example |
| 4109 | *		a call from outside of TC ingress. | 4370 | *		a call from outside of TC ingress. |
| 4110 | * | 4371 | * |
| 4111 | *		**-ESOCKTNOSUPPORT** if the socket type is not supported | ||
| 4112 | *		(reuseport). | ||
| 4113 | * | ||
| 4114 | * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags) | 4372 | * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags) |
| 4115 | *	Description | 4373 | *	Description |
| 4116 | *		Helper is overloaded depending on BPF program type. This | 4374 | *		Helper is overloaded depending on BPF program type. This |
| ... | @@ -4375,6 +4633,8 @@ union bpf_attr { | ... | @@ -4375,6 +4633,8 @@ union bpf_attr { |
| 4375 | * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) | 4633 | * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) |
| 4376 | *	Description | 4634 | *	Description |
| 4377 | *		Return a user or a kernel stack in bpf program provided buffer. | 4635 | *		Return a user or a kernel stack in bpf program provided buffer. |
| 4636 | *		Note: the user stack will only be populated if the *task* is | ||
| 4637 | *		the current task; all other tasks will return -EOPNOTSUPP. | ||
| 4378 | *		To achieve this, the helper needs *task*, which is a valid | 4638 | *		To achieve this, the helper needs *task*, which is a valid |
| 4379 | *		pointer to **struct task_struct**. To store the stacktrace, the | 4639 | *		pointer to **struct task_struct**. To store the stacktrace, the |
| 4380 | *		bpf program provides *buf* with a nonnegative *size*. | 4640 | *		bpf program provides *buf* with a nonnegative *size*. |
| ... | @@ -4386,6 +4646,7 @@ union bpf_attr { | ... | @@ -4386,6 +4646,7 @@ union bpf_attr { |
| 4386 | * | 4646 | * |
| 4387 | *		**BPF_F_USER_STACK** | 4647 | *		**BPF_F_USER_STACK** |
| 4388 | *			Collect a user space stack instead of a kernel stack. | 4648 | *			Collect a user space stack instead of a kernel stack. |
| 4649 | *			The *task* must be the current task. | ||
| 4389 | *		**BPF_F_USER_BUILD_ID** | 4650 | *		**BPF_F_USER_BUILD_ID** |
| 4390 | *			Collect buildid+offset instead of ips for user stack, | 4651 | *			Collect buildid+offset instead of ips for user stack, |
| 4391 | *			only valid if **BPF_F_USER_STACK** is also specified. | 4652 | *			only valid if **BPF_F_USER_STACK** is also specified. |
| ... | @@ -4689,9 +4950,9 @@ union bpf_attr { | ... | @@ -4689,9 +4950,9 @@ union bpf_attr { |
| 4689 | * 		going through the CPU's backlog queue. | 4950 | * 		going through the CPU's backlog queue. |
| 4690 | * | 4951 | * |
| 4691 | * 		The *flags* argument is reserved and must be 0. The helper is | 4952 | * 		The *flags* argument is reserved and must be 0. The helper is |
| 4692 | * 		currently only supported for tc BPF program types at the ingress | 4953 | * 		currently only supported for tc BPF program types at the |
| 4693 | * 		hook and for veth device types. The peer device must reside in a | 4954 | * 		ingress hook and for veth and netkit target device types. The |
| 4694 | * 		different network namespace. | 4955 | * 		peer device must reside in a different network namespace. |
| 4695 | * 	Return | 4956 | * 	Return |
| 4696 | * 		The helper returns **TC_ACT_REDIRECT** on success or | 4957 | * 		The helper returns **TC_ACT_REDIRECT** on success or |
| 4697 | * 		**TC_ACT_SHOT** on error. | 4958 | * 		**TC_ACT_SHOT** on error. |
| ... | @@ -4767,7 +5028,7 @@ union bpf_attr { | ... | @@ -4767,7 +5028,7 @@ union bpf_attr { |
| 4767 | *		bytes will be copied to *dst* | 5028 | *		bytes will be copied to *dst* |
| 4768 | *	Return | 5029 | *	Return |
| 4769 | *		The **hash_algo** is returned on success, | 5030 | *		The **hash_algo** is returned on success, |
| 4770 | *		**-EOPNOTSUP** if IMA is disabled or **-EINVAL** if | 5031 | *		**-EOPNOTSUPP** if IMA is disabled or **-EINVAL** if |
| 4771 | *		invalid arguments are passed. | 5032 | *		invalid arguments are passed. |
| 4772 | * | 5033 | * |
| 4773 | * struct socket *bpf_sock_from_file(struct file *file) | 5034 | * struct socket *bpf_sock_from_file(struct file *file) |
| ... | @@ -4969,6 +5230,14 @@ union bpf_attr { | ... | @@ -4969,6 +5230,14 @@ union bpf_attr { |
| 4969 | *		different maps if key/value layout matches across maps. | 5230 | *		different maps if key/value layout matches across maps. |
| 4970 | *		Every bpf_timer_set_callback() can have different callback_fn. | 5231 | *		Every bpf_timer_set_callback() can have different callback_fn. |
| 4971 | * | 5232 | * |
| 5233 | *		*flags* can be one of: | ||
| 5234 | * | ||
| 5235 | *		**BPF_F_TIMER_ABS** | ||
| 5236 | *			Start the timer in absolute expire value instead of the | ||
| 5237 | *			default relative one. | ||
| 5238 | *		**BPF_F_TIMER_CPU_PIN** | ||
| 5239 | *			Timer will be pinned to the CPU of the caller. | ||
| 5240 | * | ||
| 4972 | *	Return | 5241 | *	Return |
| 4973 | *		0 on success. | 5242 | *		0 on success. |
| 4974 | *		**-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier | 5243 | *		**-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier |
| ... | @@ -4987,9 +5256,14 @@ union bpf_attr { | ... | @@ -4987,9 +5256,14 @@ union bpf_attr { |
| 4987 | * u64 bpf_get_func_ip(void *ctx) | 5256 | * u64 bpf_get_func_ip(void *ctx) |
| 4988 | * 	Description | 5257 | * 	Description |
| 4989 | * 		Get address of the traced function (for tracing and kprobe programs). | 5258 | * 		Get address of the traced function (for tracing and kprobe programs). |
| 5259 | * | ||
| 5260 | * 		When called for kprobe program attached as uprobe it returns | ||
| 5261 | * 		probe address for both entry and return uprobe. | ||
| 5262 | * | ||
| 4990 | * 	Return | 5263 | * 	Return |
| 4991 | * 		Address of the traced function. | 5264 | * 		Address of the traced function for kprobe. |
| 4992 | * 		0 for kprobes placed within the function (not at the entry). | 5265 | * 		0 for kprobes placed within the function (not at the entry). |
| 5266 | * 		Address of the probe for uprobe and return uprobe. | ||
| 4993 | * | 5267 | * |
| 4994 | * u64 bpf_get_attach_cookie(void *ctx) | 5268 | * u64 bpf_get_attach_cookie(void *ctx) |
| 4995 | * 	Description | 5269 | * 	Description |
| ... | @@ -5240,7 +5514,7 @@ union bpf_attr { | ... | @@ -5240,7 +5514,7 @@ union bpf_attr { |
| 5240 | *		bytes will be copied to *dst* | 5514 | *		bytes will be copied to *dst* |
| 5241 | *	Return | 5515 | *	Return |
| 5242 | *		The **hash_algo** is returned on success, | 5516 | *		The **hash_algo** is returned on success, |
| 5243 | *		**-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if | 5517 | *		**-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if |
| 5244 | *		invalid arguments are passed. | 5518 | *		invalid arguments are passed. |
| 5245 | * | 5519 | * |
| 5246 | * void *bpf_kptr_xchg(void *map_value, void *ptr) | 5520 | * void *bpf_kptr_xchg(void *map_value, void *ptr) |
| ... | @@ -5325,11 +5599,22 @@ union bpf_attr { | ... | @@ -5325,11 +5599,22 @@ union bpf_attr { |
| 5325 | *	Description | 5599 | *	Description |
| 5326 | *		Write *len* bytes from *src* into *dst*, starting from *offset* | 5600 | *		Write *len* bytes from *src* into *dst*, starting from *offset* |
| 5327 | *		into *dst*. | 5601 | *		into *dst*. |
| 5328 | *		*flags* is currently unused. | 5602 | * |
| 5603 | *		*flags* must be 0 except for skb-type dynptrs. | ||
| 5604 | * | ||
| 5605 | *		For skb-type dynptrs: | ||
| 5606 | *		 * All data slices of the dynptr are automatically | ||
| 5607 | *		 invalidated after **bpf_dynptr_write**\ (). This is | ||
| 5608 | *		 because writing may pull the skb and change the | ||
| 5609 | *		 underlying packet buffer. | ||
| 5610 | * | ||
| 5611 | *		 * For *flags*, please see the flags accepted by | ||
| 5612 | *		 **bpf_skb_store_bytes**\ (). | ||
| 5329 | *	Return | 5613 | *	Return |
| 5330 | *		0 on success, -E2BIG if *offset* + *len* exceeds the length | 5614 | *		0 on success, -E2BIG if *offset* + *len* exceeds the length |
| 5331 | *		of *dst*'s data, -EINVAL if *dst* is an invalid dynptr or if *dst* | 5615 | *		of *dst*'s data, -EINVAL if *dst* is an invalid dynptr or if *dst* |
| 5332 | *		is a read-only dynptr or if *flags* is not 0. | 5616 | *		is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs, |
| 5617 | *		other errors correspond to errors returned by **bpf_skb_store_bytes**\ (). | ||
| 5333 | * | 5618 | * |
| 5334 | * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len) | 5619 | * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len) |
| 5335 | *	Description | 5620 | *	Description |
| ... | @@ -5337,6 +5622,9 @@ union bpf_attr { | ... | @@ -5337,6 +5622,9 @@ union bpf_attr { |
| 5337 | * | 5622 | * |
| 5338 | *		*len* must be a statically known value. The returned data slice | 5623 | *		*len* must be a statically known value. The returned data slice |
| 5339 | *		is invalidated whenever the dynptr is invalidated. | 5624 | *		is invalidated whenever the dynptr is invalidated. |
| 5625 | * | ||
| 5626 | *		skb and xdp type dynptrs may not use bpf_dynptr_data. They should | ||
| 5627 | *		instead use bpf_dynptr_slice and bpf_dynptr_slice_rdwr. | ||
| 5340 | *	Return | 5628 | *	Return |
| 5341 | *		Pointer to the underlying dynptr data, NULL if the dynptr is | 5629 | *		Pointer to the underlying dynptr data, NULL if the dynptr is |
| 5342 | *		read-only, if the dynptr is invalid, or if the offset and length | 5630 | *		read-only, if the dynptr is invalid, or if the offset and length |
| ... | @@ -6116,6 +6404,19 @@ struct bpf_sock_tuple { | ... | @@ -6116,6 +6404,19 @@ struct bpf_sock_tuple { |
| 6116 | 	}; | 6404 | 	}; |
| 6117 | }; | 6405 | }; |
| 6118 | 6406 | ||
| 6407 | /* (Simplified) user return codes for tcx prog type. | ||
| 6408 | * A valid tcx program must return one of these defined values. All other | ||
| 6409 | * return codes are reserved for future use. Must remain compatible with | ||
| 6410 | * their TC_ACT_* counter-parts. For compatibility in behavior, unknown | ||
| 6411 | * return codes are mapped to TCX_NEXT. | ||
| 6412 | */ | ||
| 6413 | enum tcx_action_base { | ||
| 6414 | 	TCX_NEXT	= -1, | ||
| 6415 | 	TCX_PASS	= 0, | ||
| 6416 | 	TCX_DROP	= 2, | ||
| 6417 | 	TCX_REDIRECT	= 7, | ||
| 6418 | }; | ||
| 6419 | |||
| 6119 | struct bpf_xdp_sock { | 6420 | struct bpf_xdp_sock { |
| 6120 | 	__u32 queue_id; | 6421 | 	__u32 queue_id; |
| 6121 | }; | 6422 | }; |
| ... | @@ -6297,7 +6598,7 @@ struct bpf_map_info { | ... | @@ -6297,7 +6598,7 @@ struct bpf_map_info { |
| 6297 | 	__u32 btf_id; | 6598 | 	__u32 btf_id; |
| 6298 | 	__u32 btf_key_type_id; | 6599 | 	__u32 btf_key_type_id; |
| 6299 | 	__u32 btf_value_type_id; | 6600 | 	__u32 btf_value_type_id; |
| 6300 | 	__u32 :32;	/* alignment pad */ | 6601 | 	__u32 btf_vmlinux_id; |
| 6301 | 	__u64 map_extra; | 6602 | 	__u64 map_extra; |
| 6302 | } __attribute__((aligned(8))); | 6603 | } __attribute__((aligned(8))); |
| 6303 | 6604 | ||
| ... | @@ -6359,6 +6660,76 @@ struct bpf_link_info { | ... | @@ -6359,6 +6660,76 @@ struct bpf_link_info { |
| 6359 | 		struct { | 6660 | 		struct { |
| 6360 | 			__u32 ifindex; | 6661 | 			__u32 ifindex; |
| 6361 | 		} xdp; | 6662 | 		} xdp; |
| 6663 | 		struct { | ||
| 6664 | 			__u32 map_id; | ||
| 6665 | 		} struct_ops; | ||
| 6666 | 		struct { | ||
| 6667 | 			__u32 pf; | ||
| 6668 | 			__u32 hooknum; | ||
| 6669 | 			__s32 priority; | ||
| 6670 | 			__u32 flags; | ||
| 6671 | 		} netfilter; | ||
| 6672 | 		struct { | ||
| 6673 | 			__aligned_u64 addrs; | ||
| 6674 | 			__u32 count; /* in/out: kprobe_multi function count */ | ||
| 6675 | 			__u32 flags; | ||
| 6676 | 			__u64 missed; | ||
| 6677 | 			__aligned_u64 cookies; | ||
| 6678 | 		} kprobe_multi; | ||
| 6679 | 		struct { | ||
| 6680 | 			__aligned_u64 path; | ||
| 6681 | 			__aligned_u64 offsets; | ||
| 6682 | 			__aligned_u64 ref_ctr_offsets; | ||
| 6683 | 			__aligned_u64 cookies; | ||
| 6684 | 			__u32 path_size; /* in/out: real path size on success, including zero byte */ | ||
| 6685 | 			__u32 count; /* in/out: uprobe_multi offsets/ref_ctr_offsets/cookies count */ | ||
| 6686 | 			__u32 flags; | ||
| 6687 | 			__u32 pid; | ||
| 6688 | 		} uprobe_multi; | ||
| 6689 | 		struct { | ||
| 6690 | 			__u32 type; /* enum bpf_perf_event_type */ | ||
| 6691 | 			__u32 :32; | ||
| 6692 | 			union { | ||
| 6693 | 				struct { | ||
| 6694 | 					__aligned_u64 file_name; /* in/out */ | ||
| 6695 | 					__u32 name_len; | ||
| 6696 | 					__u32 offset; /* offset from file_name */ | ||
| 6697 | 					__u64 cookie; | ||
| 6698 | 				} uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ | ||
| 6699 | 				struct { | ||
| 6700 | 					__aligned_u64 func_name; /* in/out */ | ||
| 6701 | 					__u32 name_len; | ||
| 6702 | 					__u32 offset; /* offset from func_name */ | ||
| 6703 | 					__u64 addr; | ||
| 6704 | 					__u64 missed; | ||
| 6705 | 					__u64 cookie; | ||
| 6706 | 				} kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */ | ||
| 6707 | 				struct { | ||
| 6708 | 					__aligned_u64 tp_name; /* in/out */ | ||
| 6709 | 					__u32 name_len; | ||
| 6710 | 					__u32 :32; | ||
| 6711 | 					__u64 cookie; | ||
| 6712 | 				} tracepoint; /* BPF_PERF_EVENT_TRACEPOINT */ | ||
| 6713 | 				struct { | ||
| 6714 | 					__u64 config; | ||
| 6715 | 					__u32 type; | ||
| 6716 | 					__u32 :32; | ||
| 6717 | 					__u64 cookie; | ||
| 6718 | 				} event; /* BPF_PERF_EVENT_EVENT */ | ||
| 6719 | 			}; | ||
| 6720 | 		} perf_event; | ||
| 6721 | 		struct { | ||
| 6722 | 			__u32 ifindex; | ||
| 6723 | 			__u32 attach_type; | ||
| 6724 | 		} tcx; | ||
| 6725 | 		struct { | ||
| 6726 | 			__u32 ifindex; | ||
| 6727 | 			__u32 attach_type; | ||
| 6728 | 		} netkit; | ||
| 6729 | 		struct { | ||
| 6730 | 			__u32 map_id; | ||
| 6731 | 			__u32 attach_type; | ||
| 6732 | 		} sockmap; | ||
| 6362 | 	}; | 6733 | 	}; |
| 6363 | } __attribute__((aligned(8))); | 6734 | } __attribute__((aligned(8))); |
| 6364 | 6735 | ||
| ... | @@ -6577,6 +6948,8 @@ enum { | ... | @@ -6577,6 +6948,8 @@ enum { |
| 6577 | 					 * socket transition to LISTEN state. | 6948 | 					 * socket transition to LISTEN state. |
| 6578 | 					 */ | 6949 | 					 */ |
| 6579 | 	BPF_SOCK_OPS_RTT_CB,		/* Called on every RTT. | 6950 | 	BPF_SOCK_OPS_RTT_CB,		/* Called on every RTT. |
| 6951 | 					 * Arg1: measured RTT input (mrtt) | ||
| 6952 | 					 * Arg2: updated srtt | ||
| 6580 | 					 */ | 6953 | 					 */ |
| 6581 | 	BPF_SOCK_OPS_PARSE_HDR_OPT_CB,	/* Parse the header option. | 6954 | 	BPF_SOCK_OPS_PARSE_HDR_OPT_CB,	/* Parse the header option. |
| 6582 | 					 * It will be called to handle | 6955 | 					 * It will be called to handle |
| ... | @@ -6655,6 +7028,7 @@ enum { | ... | @@ -6655,6 +7028,7 @@ enum { |
| 6655 | 	BPF_TCP_LISTEN, | 7028 | 	BPF_TCP_LISTEN, |
| 6656 | 	BPF_TCP_CLOSING,	/* Now a valid state */ | 7029 | 	BPF_TCP_CLOSING,	/* Now a valid state */ |
| 6657 | 	BPF_TCP_NEW_SYN_RECV, | 7030 | 	BPF_TCP_NEW_SYN_RECV, |
| 7031 | 	BPF_TCP_BOUND_INACTIVE, | ||
| 6658 | 7032 | ||
| 6659 | 	BPF_TCP_MAX_STATES	/* Leave at the end! */ | 7033 | 	BPF_TCP_MAX_STATES	/* Leave at the end! */ |
| 6660 | }; | 7034 | }; |
| ... | @@ -6756,6 +7130,9 @@ enum { | ... | @@ -6756,6 +7130,9 @@ enum { |
| 6756 | 	BPF_FIB_LOOKUP_DIRECT = (1U << 0), | 7130 | 	BPF_FIB_LOOKUP_DIRECT = (1U << 0), |
| 6757 | 	BPF_FIB_LOOKUP_OUTPUT = (1U << 1), | 7131 | 	BPF_FIB_LOOKUP_OUTPUT = (1U << 1), |
| 6758 | 	BPF_FIB_LOOKUP_SKIP_NEIGH = (1U << 2), | 7132 | 	BPF_FIB_LOOKUP_SKIP_NEIGH = (1U << 2), |
| 7133 | 	BPF_FIB_LOOKUP_TBID = (1U << 3), | ||
| 7134 | 	BPF_FIB_LOOKUP_SRC = (1U << 4), | ||
| 7135 | 	BPF_FIB_LOOKUP_MARK = (1U << 5), | ||
| 6759 | }; | 7136 | }; |
| 6760 | 7137 | ||
| 6761 | enum { | 7138 | enum { |
| ... | @@ -6768,6 +7145,7 @@ enum { | ... | @@ -6768,6 +7145,7 @@ enum { |
| 6768 | 	BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ | 7145 | 	BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ |
| 6769 | 	BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ | 7146 | 	BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ |
| 6770 | 	BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ | 7147 | 	BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ |
| 7148 | 	BPF_FIB_LKUP_RET_NO_SRC_ADDR, /* failed to derive IP src addr */ | ||
| 6771 | }; | 7149 | }; |
| 6772 | 7150 | ||
| 6773 | struct bpf_fib_lookup { | 7151 | struct bpf_fib_lookup { |
| ... | @@ -6787,7 +7165,7 @@ struct bpf_fib_lookup { | ... | @@ -6787,7 +7165,7 @@ struct bpf_fib_lookup { |
| 6787 | 7165 | ||
| 6788 | 		/* output: MTU value */ | 7166 | 		/* output: MTU value */ |
| 6789 | 		__u16	mtu_result; | 7167 | 		__u16	mtu_result; |
| 6790 | 	}; | 7168 | 	} __attribute__((packed, aligned(2))); |
| 6791 | 	/* input: L3 device index for lookup | 7169 | 	/* input: L3 device index for lookup |
| 6792 | 	 * output: device index from FIB lookup | 7170 | 	 * output: device index from FIB lookup |
| 6793 | 	 */ | 7171 | 	 */ |
| ... | @@ -6802,6 +7180,9 @@ struct bpf_fib_lookup { | ... | @@ -6802,6 +7180,9 @@ struct bpf_fib_lookup { |
| 6802 | 		__u32	rt_metric; | 7180 | 		__u32	rt_metric; |
| 6803 | 	}; | 7181 | 	}; |
| 6804 | 7182 | ||
| 7183 | 	/* input: source address to consider for lookup | ||
| 7184 | 	 * output: source address result from lookup | ||
| 7185 | 	 */ | ||
| 6805 | 	union { | 7186 | 	union { |
| 6806 | 		__be32		ipv4_src; | 7187 | 		__be32		ipv4_src; |
| 6807 | 		__u32		ipv6_src[4]; /* in6_addr; network order */ | 7188 | 		__u32		ipv6_src[4]; /* in6_addr; network order */ |
| ... | @@ -6816,11 +7197,32 @@ struct bpf_fib_lookup { | ... | @@ -6816,11 +7197,32 @@ struct bpf_fib_lookup { |
| 6816 | 		__u32		ipv6_dst[4]; /* in6_addr; network order */ | 7197 | 		__u32		ipv6_dst[4]; /* in6_addr; network order */ |
| 6817 | 	}; | 7198 | 	}; |
| 6818 | 7199 | ||
| 6819 | 	/* output */ | 7200 | 	union { |
| 6820 | 	__be16	h_vlan_proto; | 7201 | 		struct { |
| 6821 | 	__be16	h_vlan_TCI; | 7202 | 			/* output */ |
| 6822 | 	__u8	smac[6]; /* ETH_ALEN */ | 7203 | 			__be16	h_vlan_proto; |
| 6823 | 	__u8	dmac[6]; /* ETH_ALEN */ | 7204 | 			__be16	h_vlan_TCI; |
| 7205 | 		}; | ||
| 7206 | 		/* input: when accompanied with the | ||
| 7207 | 		 * 'BPF_FIB_LOOKUP_DIRECT | BPF_FIB_LOOKUP_TBID` flags, a | ||
| 7208 | 		 * specific routing table to use for the fib lookup. | ||
| 7209 | 		 */ | ||
| 7210 | 		__u32	tbid; | ||
| 7211 | 	}; | ||
| 7212 | |||
| 7213 | 	union { | ||
| 7214 | 		/* input */ | ||
| 7215 | 		struct { | ||
| 7216 | 			__u32	mark; /* policy routing */ | ||
| 7217 | 			/* 2 4-byte holes for input */ | ||
| 7218 | 		}; | ||
| 7219 | |||
| 7220 | 		/* output: source and dest mac */ | ||
| 7221 | 		struct { | ||
| 7222 | 			__u8	smac[6];	/* ETH_ALEN */ | ||
| 7223 | 			__u8	dmac[6];	/* ETH_ALEN */ | ||
| 7224 | 		}; | ||
| 7225 | 	}; | ||
| 6824 | }; | 7226 | }; |
| 6825 | 7227 | ||
| 6826 | struct bpf_redir_neigh { | 7228 | struct bpf_redir_neigh { |
| ... | @@ -6904,36 +7306,37 @@ struct bpf_spin_lock { | ... | @@ -6904,36 +7306,37 @@ struct bpf_spin_lock { |
| 6904 | }; | 7306 | }; |
| 6905 | 7307 | ||
| 6906 | struct bpf_timer { | 7308 | struct bpf_timer { |
| 6907 | 	__u64 :64; | 7309 | 	__u64 __opaque[2]; |
| 6908 | 	__u64 :64; | 7310 | } __attribute__((aligned(8))); |
| 7311 | |||
| 7312 | struct bpf_wq { | ||
| 7313 | 	__u64 __opaque[2]; | ||
| 6909 | } __attribute__((aligned(8))); | 7314 | } __attribute__((aligned(8))); |
| 6910 | 7315 | ||
| 6911 | struct bpf_dynptr { | 7316 | struct bpf_dynptr { |
| 6912 | 	__u64 :64; | 7317 | 	__u64 __opaque[2]; |
| 6913 | 	__u64 :64; | ||
| 6914 | } __attribute__((aligned(8))); | 7318 | } __attribute__((aligned(8))); |
| 6915 | 7319 | ||
| 6916 | struct bpf_list_head { | 7320 | struct bpf_list_head { |
| 6917 | 	__u64 :64; | 7321 | 	__u64 __opaque[2]; |
| 6918 | 	__u64 :64; | ||
| 6919 | } __attribute__((aligned(8))); | 7322 | } __attribute__((aligned(8))); |
| 6920 | 7323 | ||
| 6921 | struct bpf_list_node { | 7324 | struct bpf_list_node { |
| 6922 | 	__u64 :64; | 7325 | 	__u64 __opaque[3]; |
| 6923 | 	__u64 :64; | ||
| 6924 | } __attribute__((aligned(8))); | 7326 | } __attribute__((aligned(8))); |
| 6925 | 7327 | ||
| 6926 | struct bpf_rb_root { | 7328 | struct bpf_rb_root { |
| 6927 | 	__u64 :64; | 7329 | 	__u64 __opaque[2]; |
| 6928 | 	__u64 :64; | ||
| 6929 | } __attribute__((aligned(8))); | 7330 | } __attribute__((aligned(8))); |
| 6930 | 7331 | ||
| 6931 | struct bpf_rb_node { | 7332 | struct bpf_rb_node { |
| 6932 | 	__u64 :64; | 7333 | 	__u64 __opaque[4]; |
| 6933 | 	__u64 :64; | ||
| 6934 | 	__u64 :64; | ||
| 6935 | } __attribute__((aligned(8))); | 7334 | } __attribute__((aligned(8))); |
| 6936 | 7335 | ||
| 7336 | struct bpf_refcount { | ||
| 7337 | 	__u32 __opaque[1]; | ||
| 7338 | } __attribute__((aligned(4))); | ||
| 7339 | |||
| 6937 | struct bpf_sysctl { | 7340 | struct bpf_sysctl { |
| 6938 | 	__u32	write;		/* Sysctl is being read (= 0) or written (= 1). | 7341 | 	__u32	write;		/* Sysctl is being read (= 0) or written (= 1). |
| 6939 | 				 * Allows 1,2,4-byte read, but no write. | 7342 | 				 * Allows 1,2,4-byte read, but no write. |
| ... | @@ -7083,4 +7486,23 @@ struct bpf_core_relo { | ... | @@ -7083,4 +7486,23 @@ struct bpf_core_relo { |
| 7083 | 	enum bpf_core_relo_kind kind; | 7486 | 	enum bpf_core_relo_kind kind; |
| 7084 | }; | 7487 | }; |
| 7085 | 7488 | ||
| 7489 | /* | ||
| 7490 | * Flags to control bpf_timer_start() behaviour. | ||
| 7491 | * - BPF_F_TIMER_ABS: Timeout passed is absolute time, by default it is | ||
| 7492 | * relative to current time. | ||
| 7493 | * - BPF_F_TIMER_CPU_PIN: Timer will be pinned to the CPU of the caller. | ||
| 7494 | */ | ||
| 7495 | enum { | ||
| 7496 | 	BPF_F_TIMER_ABS = (1ULL << 0), | ||
| 7497 | 	BPF_F_TIMER_CPU_PIN = (1ULL << 1), | ||
| 7498 | }; | ||
| 7499 | |||
| 7500 | /* BPF numbers iterator state */ | ||
| 7501 | struct bpf_iter_num { | ||
| 7502 | 	/* opaque iterator state; having __u64 here allows to preserve correct | ||
| 7503 | 	 * alignment requirements in vmlinux.h, generated from BTF | ||
| 7504 | 	 */ | ||
| 7505 | 	__u64 __opaque[1]; | ||
| 7506 | } __attribute__((aligned(8))); | ||
| 7507 | |||
| 7086 | #endif /* __LINUX_BPF_H__ */ | 7508 | #endif /* __LINUX_BPF_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/bpfilter.h deleted-21| ... | @@ -1,21 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _LINUX_BPFILTER_H | ||
| 3 | #define _LINUX_BPFILTER_H | ||
| 4 | |||
| 5 | #include <linux/if.h> | ||
| 6 | |||
| 7 | enum { | ||
| 8 | 	BPFILTER_IPT_SO_SET_REPLACE = 64, | ||
| 9 | 	BPFILTER_IPT_SO_SET_ADD_COUNTERS = 65, | ||
| 10 | 	BPFILTER_IPT_SET_MAX, | ||
| 11 | }; | ||
| 12 | |||
| 13 | enum { | ||
| 14 | 	BPFILTER_IPT_SO_GET_INFO = 64, | ||
| 15 | 	BPFILTER_IPT_SO_GET_ENTRIES = 65, | ||
| 16 | 	BPFILTER_IPT_SO_GET_REVISION_MATCH = 66, | ||
| 17 | 	BPFILTER_IPT_SO_GET_REVISION_TARGET = 67, | ||
| 18 | 	BPFILTER_IPT_GET_MAX, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /* _LINUX_BPFILTER_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/btrfs.h+7| ... | @@ -90,6 +90,7 @@ struct btrfs_qgroup_limit { | ... | @@ -90,6 +90,7 @@ struct btrfs_qgroup_limit { |
| 90 | * struct btrfs_qgroup_inherit.flags | 90 | * struct btrfs_qgroup_inherit.flags |
| 91 | */ | 91 | */ |
| 92 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS	(1ULL << 0) | 92 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS	(1ULL << 0) |
| 93 | #define BTRFS_QGROUP_INHERIT_FLAGS_SUPP (BTRFS_QGROUP_INHERIT_SET_LIMITS) | ||
| 93 | 94 | ||
| 94 | struct btrfs_qgroup_inherit { | 95 | struct btrfs_qgroup_inherit { |
| 95 | 	__u64	flags; | 96 | 	__u64	flags; |
| ... | @@ -331,6 +332,8 @@ struct btrfs_ioctl_fs_info_args { | ... | @@ -331,6 +332,8 @@ struct btrfs_ioctl_fs_info_args { |
| 331 | #define BTRFS_FEATURE_INCOMPAT_RAID1C34		(1ULL << 11) | 332 | #define BTRFS_FEATURE_INCOMPAT_RAID1C34		(1ULL << 11) |
| 332 | #define BTRFS_FEATURE_INCOMPAT_ZONED		(1ULL << 12) | 333 | #define BTRFS_FEATURE_INCOMPAT_ZONED		(1ULL << 12) |
| 333 | #define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2	(1ULL << 13) | 334 | #define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2	(1ULL << 13) |
| 335 | #define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE	(1ULL << 14) | ||
| 336 | #define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA	(1ULL << 16) | ||
| 334 | 337 | ||
| 335 | struct btrfs_ioctl_feature_flags { | 338 | struct btrfs_ioctl_feature_flags { |
| 336 | 	__u64 compat_flags; | 339 | 	__u64 compat_flags; |
| ... | @@ -610,6 +613,9 @@ struct btrfs_ioctl_clone_range_args { | ... | @@ -610,6 +613,9 @@ struct btrfs_ioctl_clone_range_args { |
| 610 | */ | 613 | */ |
| 611 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 | 614 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 |
| 612 | #define BTRFS_DEFRAG_RANGE_START_IO 2 | 615 | #define BTRFS_DEFRAG_RANGE_START_IO 2 |
| 616 | #define BTRFS_DEFRAG_RANGE_FLAGS_SUPP	(BTRFS_DEFRAG_RANGE_COMPRESS |		\ | ||
| 617 | 					 BTRFS_DEFRAG_RANGE_START_IO) | ||
| 618 | |||
| 613 | struct btrfs_ioctl_defrag_range_args { | 619 | struct btrfs_ioctl_defrag_range_args { |
| 614 | 	/* start of the defrag operation */ | 620 | 	/* start of the defrag operation */ |
| 615 | 	__u64 start; | 621 | 	__u64 start; |
| ... | @@ -751,6 +757,7 @@ struct btrfs_ioctl_get_dev_stats { | ... | @@ -751,6 +757,7 @@ struct btrfs_ioctl_get_dev_stats { |
| 751 | #define BTRFS_QUOTA_CTL_ENABLE	1 | 757 | #define BTRFS_QUOTA_CTL_ENABLE	1 |
| 752 | #define BTRFS_QUOTA_CTL_DISABLE	2 | 758 | #define BTRFS_QUOTA_CTL_DISABLE	2 |
| 753 | #define BTRFS_QUOTA_CTL_RESCAN__NOTUSED	3 | 759 | #define BTRFS_QUOTA_CTL_RESCAN__NOTUSED	3 |
| 760 | #define BTRFS_QUOTA_CTL_ENABLE_SIMPLE_QUOTA 4 | ||
| 754 | struct btrfs_ioctl_quota_ctl_args { | 761 | struct btrfs_ioctl_quota_ctl_args { |
| 755 | 	__u64 cmd; | 762 | 	__u64 cmd; |
| 756 | 	__u64 status; | 763 | 	__u64 status; |
lib/libc/include/any-linux-any/linux/btrfs_tree.h+72-2| ... | @@ -69,6 +69,9 @@ | ... | @@ -69,6 +69,9 @@ |
| 69 | /* Holds the block group items for extent tree v2. */ | 69 | /* Holds the block group items for extent tree v2. */ |
| 70 | #define BTRFS_BLOCK_GROUP_TREE_OBJECTID 11ULL | 70 | #define BTRFS_BLOCK_GROUP_TREE_OBJECTID 11ULL |
| 71 | 71 | ||
| 72 | /* Tracks RAID stripes in block groups. */ | ||
| 73 | #define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL | ||
| 74 | |||
| 72 | /* device stats in the device tree */ | 75 | /* device stats in the device tree */ |
| 73 | #define BTRFS_DEV_STATS_OBJECTID 0ULL | 76 | #define BTRFS_DEV_STATS_OBJECTID 0ULL |
| 74 | 77 | ||
| ... | @@ -212,11 +215,31 @@ | ... | @@ -212,11 +215,31 @@ |
| 212 | */ | 215 | */ |
| 213 | #define BTRFS_METADATA_ITEM_KEY	169 | 216 | #define BTRFS_METADATA_ITEM_KEY	169 |
| 214 | 217 | ||
| 218 | /* | ||
| 219 | * Special __inline__ ref key which stores the id of the subvolume which originally | ||
| 220 | * created the extent. This subvolume owns the extent permanently from the | ||
| 221 | * perspective of simple quotas. Needed to know which subvolume to free quota | ||
| 222 | * usage from when the extent is deleted. | ||
| 223 | * | ||
| 224 | * Stored as an __inline__ ref rather to avoid wasting space on a separate item on | ||
| 225 | * top of the existing extent item. However, unlike the other __inline__ refs, | ||
| 226 | * there is one one owner ref per extent rather than one per extent. | ||
| 227 | * | ||
| 228 | * Because of this, it goes at the front of the list of __inline__ refs, and thus | ||
| 229 | * must have a lower type value than any other __inline__ ref type (to satisfy the | ||
| 230 | * disk format rule that __inline__ refs have non-decreasing type). | ||
| 231 | */ | ||
| 232 | #define BTRFS_EXTENT_OWNER_REF_KEY	172 | ||
| 233 | |||
| 215 | #define BTRFS_TREE_BLOCK_REF_KEY	176 | 234 | #define BTRFS_TREE_BLOCK_REF_KEY	176 |
| 216 | 235 | ||
| 217 | #define BTRFS_EXTENT_DATA_REF_KEY	178 | 236 | #define BTRFS_EXTENT_DATA_REF_KEY	178 |
| 218 | 237 | ||
| 219 | #define BTRFS_EXTENT_REF_V0_KEY		180 | 238 | /* |
| 239 | * Obsolete key. Defintion removed in 6.6, value may be reused in the future. | ||
| 240 | * | ||
| 241 | * #define BTRFS_EXTENT_REF_V0_KEY	180 | ||
| 242 | */ | ||
| 220 | 243 | ||
| 221 | #define BTRFS_SHARED_BLOCK_REF_KEY	182 | 244 | #define BTRFS_SHARED_BLOCK_REF_KEY	182 |
| 222 | 245 | ||
| ... | @@ -253,6 +276,8 @@ | ... | @@ -253,6 +276,8 @@ |
| 253 | #define BTRFS_DEV_ITEM_KEY	216 | 276 | #define BTRFS_DEV_ITEM_KEY	216 |
| 254 | #define BTRFS_CHUNK_ITEM_KEY	228 | 277 | #define BTRFS_CHUNK_ITEM_KEY	228 |
| 255 | 278 | ||
| 279 | #define BTRFS_RAID_STRIPE_KEY	230 | ||
| 280 | |||
| 256 | /* | 281 | /* |
| 257 | * Records the overall state of the qgroups. | 282 | * Records the overall state of the qgroups. |
| 258 | * There's only one instance of this key present, | 283 | * There's only one instance of this key present, |
| ... | @@ -711,6 +736,30 @@ struct btrfs_free_space_header { | ... | @@ -711,6 +736,30 @@ struct btrfs_free_space_header { |
| 711 | 	__le64 num_bitmaps; | 736 | 	__le64 num_bitmaps; |
| 712 | } __attribute__ ((__packed__)); | 737 | } __attribute__ ((__packed__)); |
| 713 | 738 | ||
| 739 | struct btrfs_raid_stride { | ||
| 740 | 	/* The id of device this raid extent lives on. */ | ||
| 741 | 	__le64 devid; | ||
| 742 | 	/* The physical location on disk. */ | ||
| 743 | 	__le64 physical; | ||
| 744 | } __attribute__ ((__packed__)); | ||
| 745 | |||
| 746 | /* The stripe_extent::encoding, 1:1 mapping of enum btrfs_raid_types. */ | ||
| 747 | #define BTRFS_STRIPE_RAID0	1 | ||
| 748 | #define BTRFS_STRIPE_RAID1	2 | ||
| 749 | #define BTRFS_STRIPE_DUP	3 | ||
| 750 | #define BTRFS_STRIPE_RAID10	4 | ||
| 751 | #define BTRFS_STRIPE_RAID5	5 | ||
| 752 | #define BTRFS_STRIPE_RAID6	6 | ||
| 753 | #define BTRFS_STRIPE_RAID1C3	7 | ||
| 754 | #define BTRFS_STRIPE_RAID1C4	8 | ||
| 755 | |||
| 756 | struct btrfs_stripe_extent { | ||
| 757 | 	__u8 encoding; | ||
| 758 | 	__u8 reserved[7]; | ||
| 759 | 	/* An array of raid strides this stripe is composed of. */ | ||
| 760 | 	struct btrfs_raid_stride strides[]; | ||
| 761 | } __attribute__ ((__packed__)); | ||
| 762 | |||
| 714 | #define BTRFS_HEADER_FLAG_WRITTEN	(1ULL << 0) | 763 | #define BTRFS_HEADER_FLAG_WRITTEN	(1ULL << 0) |
| 715 | #define BTRFS_HEADER_FLAG_RELOC		(1ULL << 1) | 764 | #define BTRFS_HEADER_FLAG_RELOC		(1ULL << 1) |
| 716 | 765 | ||
| ... | @@ -779,6 +828,10 @@ struct btrfs_shared_data_ref { | ... | @@ -779,6 +828,10 @@ struct btrfs_shared_data_ref { |
| 779 | 	__le32 count; | 828 | 	__le32 count; |
| 780 | } __attribute__ ((__packed__)); | 829 | } __attribute__ ((__packed__)); |
| 781 | 830 | ||
| 831 | struct btrfs_extent_owner_ref { | ||
| 832 | 	__le64 root_id; | ||
| 833 | } __attribute__ ((__packed__)); | ||
| 834 | |||
| 782 | struct btrfs_extent_inline_ref { | 835 | struct btrfs_extent_inline_ref { |
| 783 | 	__u8 type; | 836 | 	__u8 type; |
| 784 | 	__le64 offset; | 837 | 	__le64 offset; |
| ... | @@ -1196,9 +1249,17 @@ static __inline__ __u16 btrfs_qgroup_level(__u64 qgroupid) | ... | @@ -1196,9 +1249,17 @@ static __inline__ __u16 btrfs_qgroup_level(__u64 qgroupid) |
| 1196 | */ | 1249 | */ |
| 1197 | #define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT	(1ULL << 2) | 1250 | #define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT	(1ULL << 2) |
| 1198 | 1251 | ||
| 1252 | /* | ||
| 1253 | * Whether or not this filesystem is using simple quotas. Not exactly the | ||
| 1254 | * incompat bit, because we support using simple quotas, disabling it, then | ||
| 1255 | * going back to full qgroup quotas. | ||
| 1256 | */ | ||
| 1257 | #define BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE	(1ULL << 3) | ||
| 1258 | |||
| 1199 | #define BTRFS_QGROUP_STATUS_FLAGS_MASK	(BTRFS_QGROUP_STATUS_FLAG_ON |		\ | 1259 | #define BTRFS_QGROUP_STATUS_FLAGS_MASK	(BTRFS_QGROUP_STATUS_FLAG_ON |		\ |
| 1200 | 					 BTRFS_QGROUP_STATUS_FLAG_RESCAN |	\ | 1260 | 					 BTRFS_QGROUP_STATUS_FLAG_RESCAN |	\ |
| 1201 | 					 BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT) | 1261 | 					 BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT | \ |
| 1262 | 					 BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE) | ||
| 1202 | 1263 | ||
| 1203 | #define BTRFS_QGROUP_STATUS_VERSION 1 | 1264 | #define BTRFS_QGROUP_STATUS_VERSION 1 |
| 1204 | 1265 | ||
| ... | @@ -1220,6 +1281,15 @@ struct btrfs_qgroup_status_item { | ... | @@ -1220,6 +1281,15 @@ struct btrfs_qgroup_status_item { |
| 1220 | 	 * of the scan. It contains a logical address | 1281 | 	 * of the scan. It contains a logical address |
| 1221 | 	 */ | 1282 | 	 */ |
| 1222 | 	__le64 rescan; | 1283 | 	__le64 rescan; |
| 1284 | |||
| 1285 | 	/* | ||
| 1286 | 	 * The generation when quotas were last enabled. Used by simple quotas to | ||
| 1287 | 	 * avoid decrementing when freeing an extent that was written before | ||
| 1288 | 	 * enable. | ||
| 1289 | 	 * | ||
| 1290 | 	 * Set only if flags contain BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE. | ||
| 1291 | 	 */ | ||
| 1292 | 	__le64 enable_gen; | ||
| 1223 | } __attribute__ ((__packed__)); | 1293 | } __attribute__ ((__packed__)); |
| 1224 | 1294 | ||
| 1225 | struct btrfs_qgroup_info_item { | 1295 | struct btrfs_qgroup_info_item { |
lib/libc/include/any-linux-any/linux/can.h+7-3| ... | @@ -193,9 +193,14 @@ struct canfd_frame { | ... | @@ -193,9 +193,14 @@ struct canfd_frame { |
| 193 | #define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */ | 193 | #define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */ |
| 194 | #define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */ | 194 | #define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */ |
| 195 | 195 | ||
| 196 | /* the 8-bit VCID is optionally placed in the canxl_frame.prio element */ | ||
| 197 | #define CANXL_VCID_OFFSET 16 /* bit offset of VCID in prio element */ | ||
| 198 | #define CANXL_VCID_VAL_MASK 0xFFUL /* VCID is an 8-bit value */ | ||
| 199 | #define CANXL_VCID_MASK (CANXL_VCID_VAL_MASK << CANXL_VCID_OFFSET) | ||
| 200 | |||
| 196 | /** | 201 | /** |
| 197 | * struct canxl_frame - CAN with e'X'tended frame 'L'ength frame structure | 202 | * struct canxl_frame - CAN with e'X'tended frame 'L'ength frame structure |
| 198 | * @prio: 11 bit arbitration priority with zero'ed CAN_*_FLAG flags | 203 | * @prio: 11 bit arbitration priority with zero'ed CAN_*_FLAG flags / VCID |
| 199 | * @flags: additional flags for CAN XL | 204 | * @flags: additional flags for CAN XL |
| 200 | * @sdt: SDU (service data unit) type | 205 | * @sdt: SDU (service data unit) type |
| 201 | * @len: frame payload length in byte (CANXL_MIN_DLEN .. CANXL_MAX_DLEN) | 206 | * @len: frame payload length in byte (CANXL_MIN_DLEN .. CANXL_MAX_DLEN) |
| ... | @@ -205,7 +210,7 @@ struct canfd_frame { | ... | @@ -205,7 +210,7 @@ struct canfd_frame { |
| 205 | * @prio shares the same position as @can_id from struct can[fd]_frame. | 210 | * @prio shares the same position as @can_id from struct can[fd]_frame. |
| 206 | */ | 211 | */ |
| 207 | struct canxl_frame { | 212 | struct canxl_frame { |
| 208 | 	canid_t prio; /* 11 bit priority for arbitration (canid_t) */ | 213 | 	canid_t prio; /* 11 bit priority for arbitration / 8 bit VCID */ |
| 209 | 	__u8 flags; /* additional flags for CAN XL */ | 214 | 	__u8 flags; /* additional flags for CAN XL */ |
| 210 | 	__u8 sdt; /* SDU (service data unit) type */ | 215 | 	__u8 sdt; /* SDU (service data unit) type */ |
| 211 | 	__u16 len; /* frame payload length in byte */ | 216 | 	__u16 len; /* frame payload length in byte */ |
| ... | @@ -285,6 +290,5 @@ struct can_filter { | ... | @@ -285,6 +290,5 @@ struct can_filter { |
| 285 | }; | 290 | }; |
| 286 | 291 | ||
| 287 | #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ | 292 | #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ |
| 288 | #define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */ | ||
| 289 | 293 | ||
| 290 | #endif /* !_UAPI_CAN_H */ | 294 | #endif /* !_UAPI_CAN_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/can/isotp.h+1| ... | @@ -137,6 +137,7 @@ struct can_isotp_ll_options { | ... | @@ -137,6 +137,7 @@ struct can_isotp_ll_options { |
| 137 | #define CAN_ISOTP_WAIT_TX_DONE	0x0400	/* wait for tx completion */ | 137 | #define CAN_ISOTP_WAIT_TX_DONE	0x0400	/* wait for tx completion */ |
| 138 | #define CAN_ISOTP_SF_BROADCAST	0x0800	/* 1-to-N functional addressing */ | 138 | #define CAN_ISOTP_SF_BROADCAST	0x0800	/* 1-to-N functional addressing */ |
| 139 | #define CAN_ISOTP_CF_BROADCAST	0x1000	/* 1-to-N transmission w/o FC */ | 139 | #define CAN_ISOTP_CF_BROADCAST	0x1000	/* 1-to-N transmission w/o FC */ |
| 140 | #define CAN_ISOTP_DYN_FC_PARMS	0x2000	/* dynamic FC parameters BS/STmin */ | ||
| 140 | 141 | ||
| 141 | /* protocol machine default values */ | 142 | /* protocol machine default values */ |
| 142 | 143 |
lib/libc/include/any-linux-any/linux/can/raw.h+18| ... | @@ -49,6 +49,8 @@ | ... | @@ -49,6 +49,8 @@ |
| 49 | #include <linux/can.h> | 49 | #include <linux/can.h> |
| 50 | 50 | ||
| 51 | #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) | 51 | #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) |
| 52 | #define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */ | ||
| 53 | |||
| 52 | enum { | 54 | enum { |
| 53 | 	SCM_CAN_RAW_ERRQUEUE = 1, | 55 | 	SCM_CAN_RAW_ERRQUEUE = 1, |
| 54 | }; | 56 | }; |
| ... | @@ -63,6 +65,22 @@ enum { | ... | @@ -63,6 +65,22 @@ enum { |
| 63 | 	CAN_RAW_FD_FRAMES,	/* allow CAN FD frames (default:off) */ | 65 | 	CAN_RAW_FD_FRAMES,	/* allow CAN FD frames (default:off) */ |
| 64 | 	CAN_RAW_JOIN_FILTERS,	/* all filters must match to trigger */ | 66 | 	CAN_RAW_JOIN_FILTERS,	/* all filters must match to trigger */ |
| 65 | 	CAN_RAW_XL_FRAMES,	/* allow CAN XL frames (default:off) */ | 67 | 	CAN_RAW_XL_FRAMES,	/* allow CAN XL frames (default:off) */ |
| 68 | 	CAN_RAW_XL_VCID_OPTS,	/* CAN XL VCID configuration options */ | ||
| 69 | }; | ||
| 70 | |||
| 71 | /* configuration for CAN XL virtual CAN identifier (VCID) handling */ | ||
| 72 | struct can_raw_vcid_options { | ||
| 73 | |||
| 74 | 	__u8 flags;		/* flags for vcid (filter) behaviour */ | ||
| 75 | 	__u8 tx_vcid;		/* VCID value set into canxl_frame.prio */ | ||
| 76 | 	__u8 rx_vcid;		/* VCID value for VCID filter */ | ||
| 77 | 	__u8 rx_vcid_mask;	/* VCID mask for VCID filter */ | ||
| 78 | |||
| 66 | }; | 79 | }; |
| 67 | 80 | ||
| 81 | /* can_raw_vcid_options.flags for CAN XL virtual CAN identifier handling */ | ||
| 82 | #define CAN_RAW_XL_VCID_TX_SET		0x01 | ||
| 83 | #define CAN_RAW_XL_VCID_TX_PASS		0x02 | ||
| 84 | #define CAN_RAW_XL_VCID_RX_FILTER	0x04 | ||
| 85 | |||
| 68 | #endif /* !_UAPI_CAN_RAW_H */ | 86 | #endif /* !_UAPI_CAN_RAW_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/capability.h+3-2| ... | @@ -41,11 +41,12 @@ typedef struct __user_cap_header_struct { | ... | @@ -41,11 +41,12 @@ typedef struct __user_cap_header_struct { |
| 41 | 	int pid; | 41 | 	int pid; |
| 42 | } *cap_user_header_t; | 42 | } *cap_user_header_t; |
| 43 | 43 | ||
| 44 | typedef struct __user_cap_data_struct { | 44 | struct __user_cap_data_struct { |
| 45 | __u32 effective; | 45 | __u32 effective; |
| 46 | __u32 permitted; | 46 | __u32 permitted; |
| 47 | __u32 inheritable; | 47 | __u32 inheritable; |
| 48 | } *cap_user_data_t; | 48 | }; |
| 49 | typedef struct __user_cap_data_struct *cap_user_data_t; | ||
| 49 | 50 | ||
| 50 | 51 | ||
| 51 | #define VFS_CAP_REVISION_MASK	0xFF000000 | 52 | #define VFS_CAP_REVISION_MASK	0xFF000000 |
lib/libc/include/any-linux-any/linux/cgroupstats.h-2| ... | @@ -24,8 +24,6 @@ | ... | @@ -24,8 +24,6 @@ |
| 24 | * basis. This data is shared using taskstats. | 24 | * basis. This data is shared using taskstats. |
| 25 | * | 25 | * |
| 26 | * Most of these states are derived by looking at the task->state value | 26 | * Most of these states are derived by looking at the task->state value |
| 27 | * For the nr_io_wait state, a flag in the delay accounting structure | ||
| 28 | * indicates that the task is waiting on IO | ||
| 29 | * | 27 | * |
| 30 | * Each member is aligned to a 8 byte boundary. | 28 | * Each member is aligned to a 8 byte boundary. |
| 31 | */ | 29 | */ |
lib/libc/include/any-linux-any/linux/cm4000_cs.h deleted-64| ... | @@ -1,64 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _CM4000_H_ | ||
| 3 | #define _CM4000_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <linux/ioctl.h> | ||
| 7 | |||
| 8 | #define	MAX_ATR			33 | ||
| 9 | |||
| 10 | #define	CM4000_MAX_DEV		4 | ||
| 11 | |||
| 12 | /* those two structures are passed via ioctl() from/to userspace. They are | ||
| 13 | * used by existing userspace programs, so I kepth the awkward "bIFSD" naming | ||
| 14 | * not to break compilation of userspace apps. -HW */ | ||
| 15 | |||
| 16 | typedef struct atreq { | ||
| 17 | 	__s32 atr_len; | ||
| 18 | 	unsigned char atr[64]; | ||
| 19 | 	__s32 power_act; | ||
| 20 | 	unsigned char bIFSD; | ||
| 21 | 	unsigned char bIFSC; | ||
| 22 | } atreq_t; | ||
| 23 | |||
| 24 | |||
| 25 | /* what is particularly stupid in the original driver is the arch-dependent | ||
| 26 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | ||
| 27 | * will lay out the structure members differently than the 64bit kernel. | ||
| 28 | * | ||
| 29 | * I've changed "ptsreq.protocol" from "unsigned long" to "__u32". | ||
| 30 | * On 32bit this will make no difference. With 64bit kernels, it will make | ||
| 31 | * 32bit apps work, too. | ||
| 32 | */ | ||
| 33 | |||
| 34 | typedef struct ptsreq { | ||
| 35 | 	__u32 protocol; /*T=0: 2^0, T=1: 2^1*/ | ||
| 36 | 	unsigned char flags; | ||
| 37 | 	unsigned char pts1; | ||
| 38 | 	unsigned char pts2; | ||
| 39 | 	unsigned char pts3; | ||
| 40 | } ptsreq_t; | ||
| 41 | |||
| 42 | #define	CM_IOC_MAGIC		'c' | ||
| 43 | #define	CM_IOC_MAXNR	 255 | ||
| 44 | |||
| 45 | #define	CM_IOCGSTATUS		_IOR (CM_IOC_MAGIC, 0, unsigned char *) | ||
| 46 | #define	CM_IOCGATR		_IOWR(CM_IOC_MAGIC, 1, atreq_t *) | ||
| 47 | #define	CM_IOCSPTS		_IOW (CM_IOC_MAGIC, 2, ptsreq_t *) | ||
| 48 | #define	CM_IOCSRDR		_IO (CM_IOC_MAGIC, 3) | ||
| 49 | #define CM_IOCARDOFF _IO (CM_IOC_MAGIC, 4) | ||
| 50 | |||
| 51 | #define CM_IOSDBGLVL _IOW(CM_IOC_MAGIC, 250, int*) | ||
| 52 | |||
| 53 | /* card and device states */ | ||
| 54 | #define	CM_CARD_INSERTED		0x01 | ||
| 55 | #define	CM_CARD_POWERED			0x02 | ||
| 56 | #define	CM_ATR_PRESENT			0x04 | ||
| 57 | #define	CM_ATR_VALID	 		0x08 | ||
| 58 | #define	CM_STATE_VALID			0x0f | ||
| 59 | /* extra info only from CM4000 */ | ||
| 60 | #define	CM_NO_READER			0x10 | ||
| 61 | #define	CM_BAD_CARD			0x20 | ||
| 62 | |||
| 63 | |||
| 64 | #endif /* _CM4000_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/cn_proc.h+43-18| ... | @@ -30,6 +30,48 @@ enum proc_cn_mcast_op { | ... | @@ -30,6 +30,48 @@ enum proc_cn_mcast_op { |
| 30 | 	PROC_CN_MCAST_IGNORE = 2 | 30 | 	PROC_CN_MCAST_IGNORE = 2 |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | #define PROC_EVENT_ALL (PROC_EVENT_FORK | PROC_EVENT_EXEC | PROC_EVENT_UID | \ | ||
| 34 | 			PROC_EVENT_GID | PROC_EVENT_SID | PROC_EVENT_PTRACE | \ | ||
| 35 | 			PROC_EVENT_COMM | PROC_EVENT_NONZERO_EXIT | \ | ||
| 36 | 			PROC_EVENT_COREDUMP | PROC_EVENT_EXIT) | ||
| 37 | |||
| 38 | /* | ||
| 39 | * If you add an entry in proc_cn_event, make sure you add it in | ||
| 40 | * PROC_EVENT_ALL above as well. | ||
| 41 | */ | ||
| 42 | enum proc_cn_event { | ||
| 43 | 	/* Use successive bits so the enums can be used to record | ||
| 44 | 	 * sets of events as well | ||
| 45 | 	 */ | ||
| 46 | 	PROC_EVENT_NONE = 0x00000000, | ||
| 47 | 	PROC_EVENT_FORK = 0x00000001, | ||
| 48 | 	PROC_EVENT_EXEC = 0x00000002, | ||
| 49 | 	PROC_EVENT_UID = 0x00000004, | ||
| 50 | 	PROC_EVENT_GID = 0x00000040, | ||
| 51 | 	PROC_EVENT_SID = 0x00000080, | ||
| 52 | 	PROC_EVENT_PTRACE = 0x00000100, | ||
| 53 | 	PROC_EVENT_COMM = 0x00000200, | ||
| 54 | 	/* "next" should be 0x00000400 */ | ||
| 55 | 	/* "last" is the last process event: exit, | ||
| 56 | 	 * while "next to last" is coredumping event | ||
| 57 | 	 * before that is report only if process dies | ||
| 58 | 	 * with non-zero exit status | ||
| 59 | 	 */ | ||
| 60 | 	PROC_EVENT_NONZERO_EXIT = 0x20000000, | ||
| 61 | 	PROC_EVENT_COREDUMP = 0x40000000, | ||
| 62 | 	PROC_EVENT_EXIT = 0x80000000 | ||
| 63 | }; | ||
| 64 | |||
| 65 | struct proc_input { | ||
| 66 | 	enum proc_cn_mcast_op mcast_op; | ||
| 67 | 	enum proc_cn_event event_type; | ||
| 68 | }; | ||
| 69 | |||
| 70 | static __inline__ enum proc_cn_event valid_event(enum proc_cn_event ev_type) | ||
| 71 | { | ||
| 72 | 	return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL); | ||
| 73 | } | ||
| 74 | |||
| 33 | /* | 75 | /* |
| 34 | * From the user's point of view, the process | 76 | * From the user's point of view, the process |
| 35 | * ID is the thread group ID and thread ID is the internal | 77 | * ID is the thread group ID and thread ID is the internal |
| ... | @@ -44,24 +86,7 @@ enum proc_cn_mcast_op { | ... | @@ -44,24 +86,7 @@ enum proc_cn_mcast_op { |
| 44 | */ | 86 | */ |
| 45 | 87 | ||
| 46 | struct proc_event { | 88 | struct proc_event { |
| 47 | 	enum what { | 89 | 	enum proc_cn_event what; |
| 48 | 		/* Use successive bits so the enums can be used to record | ||
| 49 | 		 * sets of events as well | ||
| 50 | 		 */ | ||
| 51 | 		PROC_EVENT_NONE = 0x00000000, | ||
| 52 | 		PROC_EVENT_FORK = 0x00000001, | ||
| 53 | 		PROC_EVENT_EXEC = 0x00000002, | ||
| 54 | 		PROC_EVENT_UID = 0x00000004, | ||
| 55 | 		PROC_EVENT_GID = 0x00000040, | ||
| 56 | 		PROC_EVENT_SID = 0x00000080, | ||
| 57 | 		PROC_EVENT_PTRACE = 0x00000100, | ||
| 58 | 		PROC_EVENT_COMM = 0x00000200, | ||
| 59 | 		/* "next" should be 0x00000400 */ | ||
| 60 | 		/* "last" is the last process event: exit, | ||
| 61 | 		 * while "next to last" is coredumping event */ | ||
| 62 | 		PROC_EVENT_COREDUMP = 0x40000000, | ||
| 63 | 		PROC_EVENT_EXIT = 0x80000000 | ||
| 64 | 	} what; | ||
| 65 | 	__u32 cpu; | 90 | 	__u32 cpu; |
| 66 | 	__u64 __attribute__((aligned(8))) timestamp_ns; | 91 | 	__u64 __attribute__((aligned(8))) timestamp_ns; |
| 67 | 		/* Number of nano seconds since system boot */ | 92 | 		/* Number of nano seconds since system boot */ |
lib/libc/include/any-linux-any/linux/counter.h+7-1| ... | @@ -38,7 +38,7 @@ enum counter_scope { | ... | @@ -38,7 +38,7 @@ enum counter_scope { |
| 38 | * | 38 | * |
| 39 | * For example, if the Count 2 ceiling extension of Counter device 4 is desired, | 39 | * For example, if the Count 2 ceiling extension of Counter device 4 is desired, |
| 40 | * set type equal to COUNTER_COMPONENT_EXTENSION, scope equal to | 40 | * set type equal to COUNTER_COMPONENT_EXTENSION, scope equal to |
| 41 | * COUNTER_COUNT_SCOPE, parent equal to 2, and id equal to the value provided by | 41 | * COUNTER_SCOPE_COUNT, parent equal to 2, and id equal to the value provided by |
| 42 | * the respective /sys/bus/counter/devices/counter4/count2/ceiling_component_id | 42 | * the respective /sys/bus/counter/devices/counter4/count2/ceiling_component_id |
| 43 | * sysfs attribute. | 43 | * sysfs attribute. |
| 44 | */ | 44 | */ |
| ... | @@ -127,6 +127,12 @@ enum counter_count_mode { | ... | @@ -127,6 +127,12 @@ enum counter_count_mode { |
| 127 | 	COUNTER_COUNT_MODE_RANGE_LIMIT, | 127 | 	COUNTER_COUNT_MODE_RANGE_LIMIT, |
| 128 | 	COUNTER_COUNT_MODE_NON_RECYCLE, | 128 | 	COUNTER_COUNT_MODE_NON_RECYCLE, |
| 129 | 	COUNTER_COUNT_MODE_MODULO_N, | 129 | 	COUNTER_COUNT_MODE_MODULO_N, |
| 130 | 	COUNTER_COUNT_MODE_INTERRUPT_ON_TERMINAL_COUNT, | ||
| 131 | 	COUNTER_COUNT_MODE_HARDWARE_RETRIGGERABLE_ONESHOT, | ||
| 132 | 	COUNTER_COUNT_MODE_RATE_GENERATOR, | ||
| 133 | 	COUNTER_COUNT_MODE_SQUARE_WAVE_MODE, | ||
| 134 | 	COUNTER_COUNT_MODE_SOFTWARE_TRIGGERED_STROBE, | ||
| 135 | 	COUNTER_COUNT_MODE_HARDWARE_TRIGGERED_STROBE, | ||
| 130 | }; | 136 | }; |
| 131 | 137 | ||
| 132 | /* Count function values */ | 138 | /* Count function values */ |
lib/libc/include/any-linux-any/linux/cryptouser.h+19-11| ... | @@ -32,7 +32,7 @@ enum { | ... | @@ -32,7 +32,7 @@ enum { |
| 32 | 	CRYPTO_MSG_UPDATEALG, | 32 | 	CRYPTO_MSG_UPDATEALG, |
| 33 | 	CRYPTO_MSG_GETALG, | 33 | 	CRYPTO_MSG_GETALG, |
| 34 | 	CRYPTO_MSG_DELRNG, | 34 | 	CRYPTO_MSG_DELRNG, |
| 35 | 	CRYPTO_MSG_GETSTAT, | 35 | 	CRYPTO_MSG_GETSTAT, /* No longer supported, do not use. */ |
| 36 | 	__CRYPTO_MSG_MAX | 36 | 	__CRYPTO_MSG_MAX |
| 37 | }; | 37 | }; |
| 38 | #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1) | 38 | #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1) |
| ... | @@ -54,16 +54,16 @@ enum crypto_attr_type_t { | ... | @@ -54,16 +54,16 @@ enum crypto_attr_type_t { |
| 54 | 	CRYPTOCFGA_REPORT_AKCIPHER,	/* struct crypto_report_akcipher */ | 54 | 	CRYPTOCFGA_REPORT_AKCIPHER,	/* struct crypto_report_akcipher */ |
| 55 | 	CRYPTOCFGA_REPORT_KPP,		/* struct crypto_report_kpp */ | 55 | 	CRYPTOCFGA_REPORT_KPP,		/* struct crypto_report_kpp */ |
| 56 | 	CRYPTOCFGA_REPORT_ACOMP,	/* struct crypto_report_acomp */ | 56 | 	CRYPTOCFGA_REPORT_ACOMP,	/* struct crypto_report_acomp */ |
| 57 | 	CRYPTOCFGA_STAT_LARVAL,		/* struct crypto_stat */ | 57 | 	CRYPTOCFGA_STAT_LARVAL,		/* No longer supported, do not use. */ |
| 58 | 	CRYPTOCFGA_STAT_HASH,		/* struct crypto_stat */ | 58 | 	CRYPTOCFGA_STAT_HASH,		/* No longer supported, do not use. */ |
| 59 | 	CRYPTOCFGA_STAT_BLKCIPHER,	/* struct crypto_stat */ | 59 | 	CRYPTOCFGA_STAT_BLKCIPHER,	/* No longer supported, do not use. */ |
| 60 | 	CRYPTOCFGA_STAT_AEAD,		/* struct crypto_stat */ | 60 | 	CRYPTOCFGA_STAT_AEAD,		/* No longer supported, do not use. */ |
| 61 | 	CRYPTOCFGA_STAT_COMPRESS,	/* struct crypto_stat */ | 61 | 	CRYPTOCFGA_STAT_COMPRESS,	/* No longer supported, do not use. */ |
| 62 | 	CRYPTOCFGA_STAT_RNG,		/* struct crypto_stat */ | 62 | 	CRYPTOCFGA_STAT_RNG,		/* No longer supported, do not use. */ |
| 63 | 	CRYPTOCFGA_STAT_CIPHER,		/* struct crypto_stat */ | 63 | 	CRYPTOCFGA_STAT_CIPHER,		/* No longer supported, do not use. */ |
| 64 | 	CRYPTOCFGA_STAT_AKCIPHER,	/* struct crypto_stat */ | 64 | 	CRYPTOCFGA_STAT_AKCIPHER,	/* No longer supported, do not use. */ |
| 65 | 	CRYPTOCFGA_STAT_KPP,		/* struct crypto_stat */ | 65 | 	CRYPTOCFGA_STAT_KPP,		/* No longer supported, do not use. */ |
| 66 | 	CRYPTOCFGA_STAT_ACOMP,		/* struct crypto_stat */ | 66 | 	CRYPTOCFGA_STAT_ACOMP,		/* No longer supported, do not use. */ |
| 67 | 	__CRYPTOCFGA_MAX | 67 | 	__CRYPTOCFGA_MAX |
| 68 | 68 | ||
| 69 | #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) | 69 | #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) |
| ... | @@ -79,6 +79,7 @@ struct crypto_user_alg { | ... | @@ -79,6 +79,7 @@ struct crypto_user_alg { |
| 79 | 	__u32 cru_flags; | 79 | 	__u32 cru_flags; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | /* No longer supported, do not use. */ | ||
| 82 | struct crypto_stat_aead { | 83 | struct crypto_stat_aead { |
| 83 | 	char type[CRYPTO_MAX_NAME]; | 84 | 	char type[CRYPTO_MAX_NAME]; |
| 84 | 	__u64 stat_encrypt_cnt; | 85 | 	__u64 stat_encrypt_cnt; |
| ... | @@ -88,6 +89,7 @@ struct crypto_stat_aead { | ... | @@ -88,6 +89,7 @@ struct crypto_stat_aead { |
| 88 | 	__u64 stat_err_cnt; | 89 | 	__u64 stat_err_cnt; |
| 89 | }; | 90 | }; |
| 90 | 91 | ||
| 92 | /* No longer supported, do not use. */ | ||
| 91 | struct crypto_stat_akcipher { | 93 | struct crypto_stat_akcipher { |
| 92 | 	char type[CRYPTO_MAX_NAME]; | 94 | 	char type[CRYPTO_MAX_NAME]; |
| 93 | 	__u64 stat_encrypt_cnt; | 95 | 	__u64 stat_encrypt_cnt; |
| ... | @@ -99,6 +101,7 @@ struct crypto_stat_akcipher { | ... | @@ -99,6 +101,7 @@ struct crypto_stat_akcipher { |
| 99 | 	__u64 stat_err_cnt; | 101 | 	__u64 stat_err_cnt; |
| 100 | }; | 102 | }; |
| 101 | 103 | ||
| 104 | /* No longer supported, do not use. */ | ||
| 102 | struct crypto_stat_cipher { | 105 | struct crypto_stat_cipher { |
| 103 | 	char type[CRYPTO_MAX_NAME]; | 106 | 	char type[CRYPTO_MAX_NAME]; |
| 104 | 	__u64 stat_encrypt_cnt; | 107 | 	__u64 stat_encrypt_cnt; |
| ... | @@ -108,6 +111,7 @@ struct crypto_stat_cipher { | ... | @@ -108,6 +111,7 @@ struct crypto_stat_cipher { |
| 108 | 	__u64 stat_err_cnt; | 111 | 	__u64 stat_err_cnt; |
| 109 | }; | 112 | }; |
| 110 | 113 | ||
| 114 | /* No longer supported, do not use. */ | ||
| 111 | struct crypto_stat_compress { | 115 | struct crypto_stat_compress { |
| 112 | 	char type[CRYPTO_MAX_NAME]; | 116 | 	char type[CRYPTO_MAX_NAME]; |
| 113 | 	__u64 stat_compress_cnt; | 117 | 	__u64 stat_compress_cnt; |
| ... | @@ -117,6 +121,7 @@ struct crypto_stat_compress { | ... | @@ -117,6 +121,7 @@ struct crypto_stat_compress { |
| 117 | 	__u64 stat_err_cnt; | 121 | 	__u64 stat_err_cnt; |
| 118 | }; | 122 | }; |
| 119 | 123 | ||
| 124 | /* No longer supported, do not use. */ | ||
| 120 | struct crypto_stat_hash { | 125 | struct crypto_stat_hash { |
| 121 | 	char type[CRYPTO_MAX_NAME]; | 126 | 	char type[CRYPTO_MAX_NAME]; |
| 122 | 	__u64 stat_hash_cnt; | 127 | 	__u64 stat_hash_cnt; |
| ... | @@ -124,6 +129,7 @@ struct crypto_stat_hash { | ... | @@ -124,6 +129,7 @@ struct crypto_stat_hash { |
| 124 | 	__u64 stat_err_cnt; | 129 | 	__u64 stat_err_cnt; |
| 125 | }; | 130 | }; |
| 126 | 131 | ||
| 132 | /* No longer supported, do not use. */ | ||
| 127 | struct crypto_stat_kpp { | 133 | struct crypto_stat_kpp { |
| 128 | 	char type[CRYPTO_MAX_NAME]; | 134 | 	char type[CRYPTO_MAX_NAME]; |
| 129 | 	__u64 stat_setsecret_cnt; | 135 | 	__u64 stat_setsecret_cnt; |
| ... | @@ -132,6 +138,7 @@ struct crypto_stat_kpp { | ... | @@ -132,6 +138,7 @@ struct crypto_stat_kpp { |
| 132 | 	__u64 stat_err_cnt; | 138 | 	__u64 stat_err_cnt; |
| 133 | }; | 139 | }; |
| 134 | 140 | ||
| 141 | /* No longer supported, do not use. */ | ||
| 135 | struct crypto_stat_rng { | 142 | struct crypto_stat_rng { |
| 136 | 	char type[CRYPTO_MAX_NAME]; | 143 | 	char type[CRYPTO_MAX_NAME]; |
| 137 | 	__u64 stat_generate_cnt; | 144 | 	__u64 stat_generate_cnt; |
| ... | @@ -140,6 +147,7 @@ struct crypto_stat_rng { | ... | @@ -140,6 +147,7 @@ struct crypto_stat_rng { |
| 140 | 	__u64 stat_err_cnt; | 147 | 	__u64 stat_err_cnt; |
| 141 | }; | 148 | }; |
| 142 | 149 | ||
| 150 | /* No longer supported, do not use. */ | ||
| 143 | struct crypto_stat_larval { | 151 | struct crypto_stat_larval { |
| 144 | 	char type[CRYPTO_MAX_NAME]; | 152 | 	char type[CRYPTO_MAX_NAME]; |
| 145 | }; | 153 | }; |
lib/libc/include/any-linux-any/linux/cxl_mem.h+34-5| ... | @@ -40,19 +40,26 @@ | ... | @@ -40,19 +40,26 @@ |
| 40 | 	___C(SET_ALERT_CONFIG, "Set Alert Configuration"), \ | 40 | 	___C(SET_ALERT_CONFIG, "Set Alert Configuration"), \ |
| 41 | 	___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), \ | 41 | 	___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), \ |
| 42 | 	___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), \ | 42 | 	___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), \ |
| 43 | 	___C(GET_POISON, "Get Poison List"), \ | 43 | 	___DEPRECATED(GET_POISON, "Get Poison List"), \ |
| 44 | 	___C(INJECT_POISON, "Inject Poison"), \ | 44 | 	___DEPRECATED(INJECT_POISON, "Inject Poison"), \ |
| 45 | 	___C(CLEAR_POISON, "Clear Poison"), \ | 45 | 	___DEPRECATED(CLEAR_POISON, "Clear Poison"), \ |
| 46 | 	___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ | 46 | 	___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ |
| 47 | 	___C(SCAN_MEDIA, "Scan Media"), \ | 47 | 	___DEPRECATED(SCAN_MEDIA, "Scan Media"), \ |
| 48 | 	___C(GET_SCAN_MEDIA, "Get Scan Media Results"), \ | 48 | 	___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ |
| 49 | 	___C(GET_TIMESTAMP, "Get Timestamp"), \ | ||
| 50 | 	___C(GET_LOG_CAPS, "Get Log Capabilities"),			 \ | ||
| 51 | 	___C(CLEAR_LOG, "Clear Log"),					 \ | ||
| 52 | 	___C(GET_SUP_LOG_SUBLIST, "Get Supported Logs Sub-List"),	 \ | ||
| 49 | 	___C(MAX, "invalid / last command") | 53 | 	___C(MAX, "invalid / last command") |
| 50 | 54 | ||
| 51 | #define ___C(a, b) CXL_MEM_COMMAND_ID_##a | 55 | #define ___C(a, b) CXL_MEM_COMMAND_ID_##a |
| 56 | #define ___DEPRECATED(a, b) CXL_MEM_DEPRECATED_ID_##a | ||
| 52 | enum { CXL_CMDS }; | 57 | enum { CXL_CMDS }; |
| 53 | 58 | ||
| 54 | #undef ___C | 59 | #undef ___C |
| 60 | #undef ___DEPRECATED | ||
| 55 | #define ___C(a, b) { b } | 61 | #define ___C(a, b) { b } |
| 62 | #define ___DEPRECATED(a, b) { "Deprecated " b } | ||
| 56 | static const struct { | 63 | static const struct { |
| 57 | 	const char *name; | 64 | 	const char *name; |
| 58 | } cxl_command_names[] __attribute__((__unused__)) = { CXL_CMDS }; | 65 | } cxl_command_names[] __attribute__((__unused__)) = { CXL_CMDS }; |
| ... | @@ -68,6 +75,28 @@ static const struct { | ... | @@ -68,6 +75,28 @@ static const struct { |
| 68 | */ | 75 | */ |
| 69 | 76 | ||
| 70 | #undef ___C | 77 | #undef ___C |
| 78 | #undef ___DEPRECATED | ||
| 79 | #define ___C(a, b) (0) | ||
| 80 | #define ___DEPRECATED(a, b) (1) | ||
| 81 | |||
| 82 | static const __u8 cxl_deprecated_commands[] | ||
| 83 | 	__attribute__((__unused__)) = { CXL_CMDS }; | ||
| 84 | |||
| 85 | /* | ||
| 86 | * Here's how this actually breaks out: | ||
| 87 | * cxl_deprecated_commands[] = { | ||
| 88 | *	[CXL_MEM_COMMAND_ID_INVALID] = 0, | ||
| 89 | *	[CXL_MEM_COMMAND_ID_IDENTIFY] = 0, | ||
| 90 | *	... | ||
| 91 | *	[CXL_MEM_DEPRECATED_ID_GET_POISON] = 1, | ||
| 92 | *	[CXL_MEM_DEPRECATED_ID_INJECT_POISON] = 1, | ||
| 93 | *	[CXL_MEM_DEPRECATED_ID_CLEAR_POISON] = 1, | ||
| 94 | *	... | ||
| 95 | * }; | ||
| 96 | */ | ||
| 97 | |||
| 98 | #undef ___C | ||
| 99 | #undef ___DEPRECATED | ||
| 71 | 100 | ||
| 72 | /** | 101 | /** |
| 73 | * struct cxl_command_info - Command information returned from a query. | 102 | * struct cxl_command_info - Command information returned from a query. |
lib/libc/include/any-linux-any/linux/devlink.h+13-2| ... | @@ -139,6 +139,8 @@ enum devlink_command { | ... | @@ -139,6 +139,8 @@ enum devlink_command { |
| 139 | 	DEVLINK_CMD_SELFTESTS_GET,	/* can dump */ | 139 | 	DEVLINK_CMD_SELFTESTS_GET,	/* can dump */ |
| 140 | 	DEVLINK_CMD_SELFTESTS_RUN, | 140 | 	DEVLINK_CMD_SELFTESTS_RUN, |
| 141 | 141 | ||
| 142 | 	DEVLINK_CMD_NOTIFY_FILTER_SET, | ||
| 143 | |||
| 142 | 	/* add new commands above here */ | 144 | 	/* add new commands above here */ |
| 143 | 	__DEVLINK_CMD_MAX, | 145 | 	__DEVLINK_CMD_MAX, |
| 144 | 	DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | 146 | 	DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| ... | @@ -265,7 +267,7 @@ enum { | ... | @@ -265,7 +267,7 @@ enum { |
| 265 | * Documentation/networking/devlink/devlink-flash.rst | 267 | * Documentation/networking/devlink/devlink-flash.rst |
| 266 | * | 268 | * |
| 267 | */ | 269 | */ |
| 268 | enum { | 270 | enum devlink_flash_overwrite { |
| 269 | 	DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT, | 271 | 	DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT, |
| 270 | 	DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT, | 272 | 	DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT, |
| 271 | 273 | ||
| ... | @@ -612,7 +614,10 @@ enum devlink_attr { | ... | @@ -612,7 +614,10 @@ enum devlink_attr { |
| 612 | 614 | ||
| 613 | 	DEVLINK_ATTR_REGION_DIRECT,		/* flag */ | 615 | 	DEVLINK_ATTR_REGION_DIRECT,		/* flag */ |
| 614 | 616 | ||
| 615 | 	/* add new attributes above here, update the policy in devlink.c */ | 617 | 	/* Add new attributes above here, update the spec in |
| 618 | 	 * Documentation/netlink/specs/devlink.yaml and re-generate | ||
| 619 | 	 * net/devlink/netlink_gen.c. | ||
| 620 | 	 */ | ||
| 616 | 621 | ||
| 617 | 	__DEVLINK_ATTR_MAX, | 622 | 	__DEVLINK_ATTR_MAX, |
| 618 | 	DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 | 623 | 	DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 |
| ... | @@ -661,6 +666,8 @@ enum devlink_resource_unit { | ... | @@ -661,6 +666,8 @@ enum devlink_resource_unit { |
| 661 | enum devlink_port_fn_attr_cap { | 666 | enum devlink_port_fn_attr_cap { |
| 662 | 	DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT, | 667 | 	DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT, |
| 663 | 	DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT, | 668 | 	DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT, |
| 669 | 	DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT, | ||
| 670 | 	DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT, | ||
| 664 | 671 | ||
| 665 | 	/* Add new caps above */ | 672 | 	/* Add new caps above */ |
| 666 | 	__DEVLINK_PORT_FN_ATTR_CAPS_MAX, | 673 | 	__DEVLINK_PORT_FN_ATTR_CAPS_MAX, |
| ... | @@ -669,6 +676,8 @@ enum devlink_port_fn_attr_cap { | ... | @@ -669,6 +676,8 @@ enum devlink_port_fn_attr_cap { |
| 669 | #define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT) | 676 | #define DEVLINK_PORT_FN_CAP_ROCE _BITUL(DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT) |
| 670 | #define DEVLINK_PORT_FN_CAP_MIGRATABLE \ | 677 | #define DEVLINK_PORT_FN_CAP_MIGRATABLE \ |
| 671 | 	_BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT) | 678 | 	_BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT) |
| 679 | #define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT) | ||
| 680 | #define DEVLINK_PORT_FN_CAP_IPSEC_PACKET _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT) | ||
| 672 | 681 | ||
| 673 | enum devlink_port_function_attr { | 682 | enum devlink_port_function_attr { |
| 674 | 	DEVLINK_PORT_FUNCTION_ATTR_UNSPEC, | 683 | 	DEVLINK_PORT_FUNCTION_ATTR_UNSPEC, |
| ... | @@ -676,6 +685,8 @@ enum devlink_port_function_attr { | ... | @@ -676,6 +685,8 @@ enum devlink_port_function_attr { |
| 676 | 	DEVLINK_PORT_FN_ATTR_STATE,	/* u8 */ | 685 | 	DEVLINK_PORT_FN_ATTR_STATE,	/* u8 */ |
| 677 | 	DEVLINK_PORT_FN_ATTR_OPSTATE,	/* u8 */ | 686 | 	DEVLINK_PORT_FN_ATTR_OPSTATE,	/* u8 */ |
| 678 | 	DEVLINK_PORT_FN_ATTR_CAPS,	/* bitfield32 */ | 687 | 	DEVLINK_PORT_FN_ATTR_CAPS,	/* bitfield32 */ |
| 688 | 	DEVLINK_PORT_FN_ATTR_DEVLINK,	/* nested */ | ||
| 689 | 	DEVLINK_PORT_FN_ATTR_MAX_IO_EQS,	/* u32 */ | ||
| 679 | 690 | ||
| 680 | 	__DEVLINK_PORT_FUNCTION_ATTR_MAX, | 691 | 	__DEVLINK_PORT_FUNCTION_ATTR_MAX, |
| 681 | 	DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1 | 692 | 	DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1 |
lib/libc/include/any-linux-any/linux/dlm.h+1| ... | @@ -68,6 +68,7 @@ struct dlm_lksb { | ... | @@ -68,6 +68,7 @@ struct dlm_lksb { |
| 68 | 68 | ||
| 69 | /* dlm_new_lockspace() flags */ | 69 | /* dlm_new_lockspace() flags */ |
| 70 | 70 | ||
| 71 | /* DLM_LSFL_TIMEWARN is deprecated and reserved. DO NOT USE! */ | ||
| 71 | #define DLM_LSFL_TIMEWARN	0x00000002 | 72 | #define DLM_LSFL_TIMEWARN	0x00000002 |
| 72 | #define DLM_LSFL_NEWEXCL 	0x00000008 | 73 | #define DLM_LSFL_NEWEXCL 	0x00000008 |
| 73 | 74 |
lib/libc/include/any-linux-any/linux/dlm_netlink.h deleted-60| ... | @@ -1,60 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2007 Red Hat, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * This copyrighted material is made available to anyone wishing to use, | ||
| 6 | * modify, copy, or redistribute it subject to the terms and conditions | ||
| 7 | * of the GNU General Public License v.2. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _DLM_NETLINK_H | ||
| 11 | #define _DLM_NETLINK_H | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/dlmconstants.h> | ||
| 15 | |||
| 16 | enum { | ||
| 17 | 	DLM_STATUS_WAITING = 1, | ||
| 18 | 	DLM_STATUS_GRANTED = 2, | ||
| 19 | 	DLM_STATUS_CONVERT = 3, | ||
| 20 | }; | ||
| 21 | |||
| 22 | #define DLM_LOCK_DATA_VERSION 1 | ||
| 23 | |||
| 24 | struct dlm_lock_data { | ||
| 25 | 	__u16 version; | ||
| 26 | 	__u32 lockspace_id; | ||
| 27 | 	int nodeid; | ||
| 28 | 	int ownpid; | ||
| 29 | 	__u32 id; | ||
| 30 | 	__u32 remid; | ||
| 31 | 	__u64 xid; | ||
| 32 | 	__s8 status; | ||
| 33 | 	__s8 grmode; | ||
| 34 | 	__s8 rqmode; | ||
| 35 | 	unsigned long timestamp; | ||
| 36 | 	int resource_namelen; | ||
| 37 | 	char resource_name[DLM_RESNAME_MAXLEN]; | ||
| 38 | }; | ||
| 39 | |||
| 40 | enum { | ||
| 41 | 	DLM_CMD_UNSPEC = 0, | ||
| 42 | 	DLM_CMD_HELLO,		/* user->kernel */ | ||
| 43 | 	DLM_CMD_TIMEOUT,	/* kernel->user */ | ||
| 44 | 	__DLM_CMD_MAX, | ||
| 45 | }; | ||
| 46 | |||
| 47 | #define DLM_CMD_MAX (__DLM_CMD_MAX - 1) | ||
| 48 | |||
| 49 | enum { | ||
| 50 | 	DLM_TYPE_UNSPEC = 0, | ||
| 51 | 	DLM_TYPE_LOCK, | ||
| 52 | 	__DLM_TYPE_MAX, | ||
| 53 | }; | ||
| 54 | |||
| 55 | #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1) | ||
| 56 | |||
| 57 | #define DLM_GENL_VERSION 0x1 | ||
| 58 | #define DLM_GENL_NAME "DLM" | ||
| 59 | |||
| 60 | #endif /* _DLM_NETLINK_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/dlm_plock.h+1| ... | @@ -22,6 +22,7 @@ enum { | ... | @@ -22,6 +22,7 @@ enum { |
| 22 | 	DLM_PLOCK_OP_LOCK = 1, | 22 | 	DLM_PLOCK_OP_LOCK = 1, |
| 23 | 	DLM_PLOCK_OP_UNLOCK, | 23 | 	DLM_PLOCK_OP_UNLOCK, |
| 24 | 	DLM_PLOCK_OP_GET, | 24 | 	DLM_PLOCK_OP_GET, |
| 25 | 	DLM_PLOCK_OP_CANCEL, | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | #define DLM_PLOCK_FL_CLOSE 1 | 28 | #define DLM_PLOCK_FL_CLOSE 1 |
lib/libc/include/any-linux-any/linux/dlmconstants.h+4-1| ... | @@ -87,7 +87,6 @@ | ... | @@ -87,7 +87,6 @@ |
| 87 | * DLM_LKF_NODLCKWT | 87 | * DLM_LKF_NODLCKWT |
| 88 | * | 88 | * |
| 89 | * Do not cancel the lock if it gets into conversion deadlock. | 89 | * Do not cancel the lock if it gets into conversion deadlock. |
| 90 | * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN. | ||
| 91 | * | 90 | * |
| 92 | * DLM_LKF_NODLCKBLK | 91 | * DLM_LKF_NODLCKBLK |
| 93 | * | 92 | * |
| ... | @@ -132,6 +131,10 @@ | ... | @@ -132,6 +131,10 @@ |
| 132 | * Unlock the lock even if it is converting or waiting or has sublocks. | 131 | * Unlock the lock even if it is converting or waiting or has sublocks. |
| 133 | * Only really for use by the userland device.c code. | 132 | * Only really for use by the userland device.c code. |
| 134 | * | 133 | * |
| 134 | * DLM_LKF_TIMEOUT | ||
| 135 | * | ||
| 136 | * This value is deprecated and reserved. DO NOT USE! | ||
| 137 | * | ||
| 135 | */ | 138 | */ |
| 136 | 139 | ||
| 137 | #define DLM_LKF_NOQUEUE		0x00000001 | 140 | #define DLM_LKF_NOQUEUE		0x00000001 |
lib/libc/include/any-linux-any/linux/dm-ioctl.h+2-2| ... | @@ -286,9 +286,9 @@ enum { | ... | @@ -286,9 +286,9 @@ enum { |
| 286 | #define DM_DEV_SET_GEOMETRY	_IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 286 | #define DM_DEV_SET_GEOMETRY	_IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 287 | 287 | ||
| 288 | #define DM_VERSION_MAJOR	4 | 288 | #define DM_VERSION_MAJOR	4 |
| 289 | #define DM_VERSION_MINOR	47 | 289 | #define DM_VERSION_MINOR	48 |
| 290 | #define DM_VERSION_PATCHLEVEL	0 | 290 | #define DM_VERSION_PATCHLEVEL	0 |
| 291 | #define DM_VERSION_EXTRA	"-ioctl (2022-07-28)" | 291 | #define DM_VERSION_EXTRA	"-ioctl (2023-03-01)" |
| 292 | 292 | ||
| 293 | /* Status bits */ | 293 | /* Status bits */ |
| 294 | #define DM_READONLY_FLAG	(1 << 0) /* In/Out */ | 294 | #define DM_READONLY_FLAG	(1 << 0) /* In/Out */ |
lib/libc/include/any-linux-any/linux/dpll.h created+238| ... | @@ -0,0 +1,238 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/dpll.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_DPLL_H | ||
| 7 | #define _LINUX_DPLL_H | ||
| 8 | |||
| 9 | #define DPLL_FAMILY_NAME	"dpll" | ||
| 10 | #define DPLL_FAMILY_VERSION	1 | ||
| 11 | |||
| 12 | /** | ||
| 13 | * enum dpll_mode - working modes a dpll can support, differentiates if and how | ||
| 14 | * dpll selects one of its inputs to syntonize with it, valid values for | ||
| 15 | * DPLL_A_MODE attribute | ||
| 16 | * @DPLL_MODE_MANUAL: input can be only selected by sending a request to dpll | ||
| 17 | * @DPLL_MODE_AUTOMATIC: highest prio input pin auto selected by dpll | ||
| 18 | */ | ||
| 19 | enum dpll_mode { | ||
| 20 | 	DPLL_MODE_MANUAL = 1, | ||
| 21 | 	DPLL_MODE_AUTOMATIC, | ||
| 22 | |||
| 23 | 	/* private: */ | ||
| 24 | 	__DPLL_MODE_MAX, | ||
| 25 | 	DPLL_MODE_MAX = (__DPLL_MODE_MAX - 1) | ||
| 26 | }; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * enum dpll_lock_status - provides information of dpll device lock status, | ||
| 30 | * valid values for DPLL_A_LOCK_STATUS attribute | ||
| 31 | * @DPLL_LOCK_STATUS_UNLOCKED: dpll was not yet locked to any valid input (or | ||
| 32 | * forced by setting DPLL_A_MODE to DPLL_MODE_DETACHED) | ||
| 33 | * @DPLL_LOCK_STATUS_LOCKED: dpll is locked to a valid signal, but no holdover | ||
| 34 | * available | ||
| 35 | * @DPLL_LOCK_STATUS_LOCKED_HO_ACQ: dpll is locked and holdover acquired | ||
| 36 | * @DPLL_LOCK_STATUS_HOLDOVER: dpll is in holdover state - lost a valid lock or | ||
| 37 | * was forced by disconnecting all the pins (latter possible only when dpll | ||
| 38 | * lock-state was already DPLL_LOCK_STATUS_LOCKED_HO_ACQ, if dpll lock-state | ||
| 39 | * was not DPLL_LOCK_STATUS_LOCKED_HO_ACQ, the dpll's lock-state shall remain | ||
| 40 | * DPLL_LOCK_STATUS_UNLOCKED) | ||
| 41 | */ | ||
| 42 | enum dpll_lock_status { | ||
| 43 | 	DPLL_LOCK_STATUS_UNLOCKED = 1, | ||
| 44 | 	DPLL_LOCK_STATUS_LOCKED, | ||
| 45 | 	DPLL_LOCK_STATUS_LOCKED_HO_ACQ, | ||
| 46 | 	DPLL_LOCK_STATUS_HOLDOVER, | ||
| 47 | |||
| 48 | 	/* private: */ | ||
| 49 | 	__DPLL_LOCK_STATUS_MAX, | ||
| 50 | 	DPLL_LOCK_STATUS_MAX = (__DPLL_LOCK_STATUS_MAX - 1) | ||
| 51 | }; | ||
| 52 | |||
| 53 | /** | ||
| 54 | * enum dpll_lock_status_error - if previous status change was done due to a | ||
| 55 | * failure, this provides information of dpll device lock status error. Valid | ||
| 56 | * values for DPLL_A_LOCK_STATUS_ERROR attribute | ||
| 57 | * @DPLL_LOCK_STATUS_ERROR_NONE: dpll device lock status was changed without | ||
| 58 | * any error | ||
| 59 | * @DPLL_LOCK_STATUS_ERROR_UNDEFINED: dpll device lock status was changed due | ||
| 60 | * to undefined error. Driver fills this value up in case it is not able to | ||
| 61 | * obtain suitable exact error type. | ||
| 62 | * @DPLL_LOCK_STATUS_ERROR_MEDIA_DOWN: dpll device lock status was changed | ||
| 63 | * because of associated media got down. This may happen for example if dpll | ||
| 64 | * device was previously locked on an input pin of type | ||
| 65 | * PIN_TYPE_SYNCE_ETH_PORT. | ||
| 66 | * @DPLL_LOCK_STATUS_ERROR_FRACTIONAL_FREQUENCY_OFFSET_TOO_HIGH: the FFO | ||
| 67 | * (Fractional Frequency Offset) between the RX and TX symbol rate on the | ||
| 68 | * media got too high. This may happen for example if dpll device was | ||
| 69 | * previously locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT. | ||
| 70 | */ | ||
| 71 | enum dpll_lock_status_error { | ||
| 72 | 	DPLL_LOCK_STATUS_ERROR_NONE = 1, | ||
| 73 | 	DPLL_LOCK_STATUS_ERROR_UNDEFINED, | ||
| 74 | 	DPLL_LOCK_STATUS_ERROR_MEDIA_DOWN, | ||
| 75 | 	DPLL_LOCK_STATUS_ERROR_FRACTIONAL_FREQUENCY_OFFSET_TOO_HIGH, | ||
| 76 | |||
| 77 | 	/* private: */ | ||
| 78 | 	__DPLL_LOCK_STATUS_ERROR_MAX, | ||
| 79 | 	DPLL_LOCK_STATUS_ERROR_MAX = (__DPLL_LOCK_STATUS_ERROR_MAX - 1) | ||
| 80 | }; | ||
| 81 | |||
| 82 | #define DPLL_TEMP_DIVIDER	1000 | ||
| 83 | |||
| 84 | /** | ||
| 85 | * enum dpll_type - type of dpll, valid values for DPLL_A_TYPE attribute | ||
| 86 | * @DPLL_TYPE_PPS: dpll produces Pulse-Per-Second signal | ||
| 87 | * @DPLL_TYPE_EEC: dpll drives the Ethernet Equipment Clock | ||
| 88 | */ | ||
| 89 | enum dpll_type { | ||
| 90 | 	DPLL_TYPE_PPS = 1, | ||
| 91 | 	DPLL_TYPE_EEC, | ||
| 92 | |||
| 93 | 	/* private: */ | ||
| 94 | 	__DPLL_TYPE_MAX, | ||
| 95 | 	DPLL_TYPE_MAX = (__DPLL_TYPE_MAX - 1) | ||
| 96 | }; | ||
| 97 | |||
| 98 | /** | ||
| 99 | * enum dpll_pin_type - defines possible types of a pin, valid values for | ||
| 100 | * DPLL_A_PIN_TYPE attribute | ||
| 101 | * @DPLL_PIN_TYPE_MUX: aggregates another layer of selectable pins | ||
| 102 | * @DPLL_PIN_TYPE_EXT: external input | ||
| 103 | * @DPLL_PIN_TYPE_SYNCE_ETH_PORT: ethernet port PHY's recovered clock | ||
| 104 | * @DPLL_PIN_TYPE_INT_OSCILLATOR: device internal oscillator | ||
| 105 | * @DPLL_PIN_TYPE_GNSS: GNSS recovered clock | ||
| 106 | */ | ||
| 107 | enum dpll_pin_type { | ||
| 108 | 	DPLL_PIN_TYPE_MUX = 1, | ||
| 109 | 	DPLL_PIN_TYPE_EXT, | ||
| 110 | 	DPLL_PIN_TYPE_SYNCE_ETH_PORT, | ||
| 111 | 	DPLL_PIN_TYPE_INT_OSCILLATOR, | ||
| 112 | 	DPLL_PIN_TYPE_GNSS, | ||
| 113 | |||
| 114 | 	/* private: */ | ||
| 115 | 	__DPLL_PIN_TYPE_MAX, | ||
| 116 | 	DPLL_PIN_TYPE_MAX = (__DPLL_PIN_TYPE_MAX - 1) | ||
| 117 | }; | ||
| 118 | |||
| 119 | /** | ||
| 120 | * enum dpll_pin_direction - defines possible direction of a pin, valid values | ||
| 121 | * for DPLL_A_PIN_DIRECTION attribute | ||
| 122 | * @DPLL_PIN_DIRECTION_INPUT: pin used as a input of a signal | ||
| 123 | * @DPLL_PIN_DIRECTION_OUTPUT: pin used to output the signal | ||
| 124 | */ | ||
| 125 | enum dpll_pin_direction { | ||
| 126 | 	DPLL_PIN_DIRECTION_INPUT = 1, | ||
| 127 | 	DPLL_PIN_DIRECTION_OUTPUT, | ||
| 128 | |||
| 129 | 	/* private: */ | ||
| 130 | 	__DPLL_PIN_DIRECTION_MAX, | ||
| 131 | 	DPLL_PIN_DIRECTION_MAX = (__DPLL_PIN_DIRECTION_MAX - 1) | ||
| 132 | }; | ||
| 133 | |||
| 134 | #define DPLL_PIN_FREQUENCY_1_HZ		1 | ||
| 135 | #define DPLL_PIN_FREQUENCY_10_KHZ	10000 | ||
| 136 | #define DPLL_PIN_FREQUENCY_77_5_KHZ	77500 | ||
| 137 | #define DPLL_PIN_FREQUENCY_10_MHZ	10000000 | ||
| 138 | |||
| 139 | /** | ||
| 140 | * enum dpll_pin_state - defines possible states of a pin, valid values for | ||
| 141 | * DPLL_A_PIN_STATE attribute | ||
| 142 | * @DPLL_PIN_STATE_CONNECTED: pin connected, active input of phase locked loop | ||
| 143 | * @DPLL_PIN_STATE_DISCONNECTED: pin disconnected, not considered as a valid | ||
| 144 | * input | ||
| 145 | * @DPLL_PIN_STATE_SELECTABLE: pin enabled for automatic input selection | ||
| 146 | */ | ||
| 147 | enum dpll_pin_state { | ||
| 148 | 	DPLL_PIN_STATE_CONNECTED = 1, | ||
| 149 | 	DPLL_PIN_STATE_DISCONNECTED, | ||
| 150 | 	DPLL_PIN_STATE_SELECTABLE, | ||
| 151 | |||
| 152 | 	/* private: */ | ||
| 153 | 	__DPLL_PIN_STATE_MAX, | ||
| 154 | 	DPLL_PIN_STATE_MAX = (__DPLL_PIN_STATE_MAX - 1) | ||
| 155 | }; | ||
| 156 | |||
| 157 | /** | ||
| 158 | * enum dpll_pin_capabilities - defines possible capabilities of a pin, valid | ||
| 159 | * flags on DPLL_A_PIN_CAPABILITIES attribute | ||
| 160 | * @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed | ||
| 161 | * @DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE: pin priority can be changed | ||
| 162 | * @DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE: pin state can be changed | ||
| 163 | */ | ||
| 164 | enum dpll_pin_capabilities { | ||
| 165 | 	DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE = 1, | ||
| 166 | 	DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE = 2, | ||
| 167 | 	DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE = 4, | ||
| 168 | }; | ||
| 169 | |||
| 170 | #define DPLL_PHASE_OFFSET_DIVIDER	1000 | ||
| 171 | |||
| 172 | enum dpll_a { | ||
| 173 | 	DPLL_A_ID = 1, | ||
| 174 | 	DPLL_A_MODULE_NAME, | ||
| 175 | 	DPLL_A_PAD, | ||
| 176 | 	DPLL_A_CLOCK_ID, | ||
| 177 | 	DPLL_A_MODE, | ||
| 178 | 	DPLL_A_MODE_SUPPORTED, | ||
| 179 | 	DPLL_A_LOCK_STATUS, | ||
| 180 | 	DPLL_A_TEMP, | ||
| 181 | 	DPLL_A_TYPE, | ||
| 182 | 	DPLL_A_LOCK_STATUS_ERROR, | ||
| 183 | |||
| 184 | 	__DPLL_A_MAX, | ||
| 185 | 	DPLL_A_MAX = (__DPLL_A_MAX - 1) | ||
| 186 | }; | ||
| 187 | |||
| 188 | enum dpll_a_pin { | ||
| 189 | 	DPLL_A_PIN_ID = 1, | ||
| 190 | 	DPLL_A_PIN_PARENT_ID, | ||
| 191 | 	DPLL_A_PIN_MODULE_NAME, | ||
| 192 | 	DPLL_A_PIN_PAD, | ||
| 193 | 	DPLL_A_PIN_CLOCK_ID, | ||
| 194 | 	DPLL_A_PIN_BOARD_LABEL, | ||
| 195 | 	DPLL_A_PIN_PANEL_LABEL, | ||
| 196 | 	DPLL_A_PIN_PACKAGE_LABEL, | ||
| 197 | 	DPLL_A_PIN_TYPE, | ||
| 198 | 	DPLL_A_PIN_DIRECTION, | ||
| 199 | 	DPLL_A_PIN_FREQUENCY, | ||
| 200 | 	DPLL_A_PIN_FREQUENCY_SUPPORTED, | ||
| 201 | 	DPLL_A_PIN_FREQUENCY_MIN, | ||
| 202 | 	DPLL_A_PIN_FREQUENCY_MAX, | ||
| 203 | 	DPLL_A_PIN_PRIO, | ||
| 204 | 	DPLL_A_PIN_STATE, | ||
| 205 | 	DPLL_A_PIN_CAPABILITIES, | ||
| 206 | 	DPLL_A_PIN_PARENT_DEVICE, | ||
| 207 | 	DPLL_A_PIN_PARENT_PIN, | ||
| 208 | 	DPLL_A_PIN_PHASE_ADJUST_MIN, | ||
| 209 | 	DPLL_A_PIN_PHASE_ADJUST_MAX, | ||
| 210 | 	DPLL_A_PIN_PHASE_ADJUST, | ||
| 211 | 	DPLL_A_PIN_PHASE_OFFSET, | ||
| 212 | 	DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET, | ||
| 213 | |||
| 214 | 	__DPLL_A_PIN_MAX, | ||
| 215 | 	DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1) | ||
| 216 | }; | ||
| 217 | |||
| 218 | enum dpll_cmd { | ||
| 219 | 	DPLL_CMD_DEVICE_ID_GET = 1, | ||
| 220 | 	DPLL_CMD_DEVICE_GET, | ||
| 221 | 	DPLL_CMD_DEVICE_SET, | ||
| 222 | 	DPLL_CMD_DEVICE_CREATE_NTF, | ||
| 223 | 	DPLL_CMD_DEVICE_DELETE_NTF, | ||
| 224 | 	DPLL_CMD_DEVICE_CHANGE_NTF, | ||
| 225 | 	DPLL_CMD_PIN_ID_GET, | ||
| 226 | 	DPLL_CMD_PIN_GET, | ||
| 227 | 	DPLL_CMD_PIN_SET, | ||
| 228 | 	DPLL_CMD_PIN_CREATE_NTF, | ||
| 229 | 	DPLL_CMD_PIN_DELETE_NTF, | ||
| 230 | 	DPLL_CMD_PIN_CHANGE_NTF, | ||
| 231 | |||
| 232 | 	__DPLL_CMD_MAX, | ||
| 233 | 	DPLL_CMD_MAX = (__DPLL_CMD_MAX - 1) | ||
| 234 | }; | ||
| 235 | |||
| 236 | #define DPLL_MCGRP_MONITOR	"monitor" | ||
| 237 | |||
| 238 | #endif /* _LINUX_DPLL_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/dvb/frontend.h+9-1| ... | @@ -296,6 +296,10 @@ enum fe_spectral_inversion { | ... | @@ -296,6 +296,10 @@ enum fe_spectral_inversion { |
| 296 | * @FEC_28_45: Forward Error Correction Code 28/45 | 296 | * @FEC_28_45: Forward Error Correction Code 28/45 |
| 297 | * @FEC_32_45: Forward Error Correction Code 32/45 | 297 | * @FEC_32_45: Forward Error Correction Code 32/45 |
| 298 | * @FEC_77_90: Forward Error Correction Code 77/90 | 298 | * @FEC_77_90: Forward Error Correction Code 77/90 |
| 299 | * @FEC_11_45: Forward Error Correction Code 11/45 | ||
| 300 | * @FEC_4_15: Forward Error Correction Code 4/15 | ||
| 301 | * @FEC_14_45: Forward Error Correction Code 14/45 | ||
| 302 | * @FEC_7_15: Forward Error Correction Code 7/15 | ||
| 299 | * | 303 | * |
| 300 | * Please note that not all FEC types are supported by a given standard. | 304 | * Please note that not all FEC types are supported by a given standard. |
| 301 | */ | 305 | */ |
| ... | @@ -329,6 +333,10 @@ enum fe_code_rate { | ... | @@ -329,6 +333,10 @@ enum fe_code_rate { |
| 329 | 	FEC_28_45, | 333 | 	FEC_28_45, |
| 330 | 	FEC_32_45, | 334 | 	FEC_32_45, |
| 331 | 	FEC_77_90, | 335 | 	FEC_77_90, |
| 336 | 	FEC_11_45, | ||
| 337 | 	FEC_4_15, | ||
| 338 | 	FEC_14_45, | ||
| 339 | 	FEC_7_15, | ||
| 332 | }; | 340 | }; |
| 333 | 341 | ||
| 334 | /** | 342 | /** |
| ... | @@ -846,7 +854,7 @@ struct dtv_stats { | ... | @@ -846,7 +854,7 @@ struct dtv_stats { |
| 846 | 	union { | 854 | 	union { |
| 847 | 		__u64 uvalue;	/* for counters and relative scales */ | 855 | 		__u64 uvalue;	/* for counters and relative scales */ |
| 848 | 		__s64 svalue;	/* for 0.001 dB measures */ | 856 | 		__s64 svalue;	/* for 0.001 dB measures */ |
| 849 | 	}; | 857 | 	} __attribute__ ((packed)); |
| 850 | } __attribute__ ((packed)); | 858 | } __attribute__ ((packed)); |
| 851 | 859 | ||
| 852 | 860 |
lib/libc/include/any-linux-any/linux/dvb/version.h+1-1| ... | @@ -10,6 +10,6 @@ | ... | @@ -10,6 +10,6 @@ |
| 10 | #define _DVBVERSION_H_ | 10 | #define _DVBVERSION_H_ |
| 11 | 11 | ||
| 12 | #define DVB_API_VERSION 5 | 12 | #define DVB_API_VERSION 5 |
| 13 | #define DVB_API_VERSION_MINOR 11 | 13 | #define DVB_API_VERSION_MINOR 12 |
| 14 | 14 | ||
| 15 | #endif /*_DVBVERSION_H_*/ | 15 | #endif /*_DVBVERSION_H_*/ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/elf-fdpic.h+15| ... | @@ -32,4 +32,19 @@ struct elf32_fdpic_loadmap { | ... | @@ -32,4 +32,19 @@ struct elf32_fdpic_loadmap { |
| 32 | 32 | ||
| 33 | #define ELF32_FDPIC_LOADMAP_VERSION	0x0000 | 33 | #define ELF32_FDPIC_LOADMAP_VERSION	0x0000 |
| 34 | 34 | ||
| 35 | /* segment mappings for ELF FDPIC libraries/executables/interpreters */ | ||
| 36 | struct elf64_fdpic_loadseg { | ||
| 37 | 	Elf64_Addr	addr;		/* core address to which mapped */ | ||
| 38 | 	Elf64_Addr	p_vaddr;	/* VMA recorded in file */ | ||
| 39 | 	Elf64_Word	p_memsz;	/* allocation size recorded in file */ | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct elf64_fdpic_loadmap { | ||
| 43 | 	Elf64_Half	version;	/* version of these structures, just in case... */ | ||
| 44 | 	Elf64_Half	nsegs;		/* number of segments */ | ||
| 45 | 	struct elf64_fdpic_loadseg segs[]; | ||
| 46 | }; | ||
| 47 | |||
| 48 | #define ELF64_FDPIC_LOADMAP_VERSION	0x0000 | ||
| 49 | |||
| 35 | #endif /* _LINUX_ELF_FDPIC_H */ | 50 | #endif /* _LINUX_ELF_FDPIC_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/elf.h+10-2| ... | @@ -140,7 +140,7 @@ typedef __s64	Elf64_Sxword; | ... | @@ -140,7 +140,7 @@ typedef __s64	Elf64_Sxword; |
| 140 | #define ELF64_ST_BIND(x)	ELF_ST_BIND(x) | 140 | #define ELF64_ST_BIND(x)	ELF_ST_BIND(x) |
| 141 | #define ELF64_ST_TYPE(x)	ELF_ST_TYPE(x) | 141 | #define ELF64_ST_TYPE(x)	ELF_ST_TYPE(x) |
| 142 | 142 | ||
| 143 | typedef struct dynamic { | 143 | typedef struct { |
| 144 | Elf32_Sword d_tag; | 144 | Elf32_Sword d_tag; |
| 145 | union { | 145 | union { |
| 146 | Elf32_Sword	d_val; | 146 | Elf32_Sword	d_val; |
| ... | @@ -372,7 +372,8 @@ typedef struct elf64_shdr { | ... | @@ -372,7 +372,8 @@ typedef struct elf64_shdr { |
| 372 | * Notes used in ET_CORE. Architectures export some of the arch register sets | 372 | * Notes used in ET_CORE. Architectures export some of the arch register sets |
| 373 | * using the corresponding note types via the PTRACE_GETREGSET and | 373 | * using the corresponding note types via the PTRACE_GETREGSET and |
| 374 | * PTRACE_SETREGSET requests. | 374 | * PTRACE_SETREGSET requests. |
| 375 | * The note name for all these is "LINUX". | 375 | * The note name for these types is "LINUX", except NT_PRFPREG that is named |
| 376 | * "CORE". | ||
| 376 | */ | 377 | */ |
| 377 | #define NT_PRSTATUS	1 | 378 | #define NT_PRSTATUS	1 |
| 378 | #define NT_PRFPREG	2 | 379 | #define NT_PRFPREG	2 |
| ... | @@ -403,9 +404,13 @@ typedef struct elf64_shdr { | ... | @@ -403,9 +404,13 @@ typedef struct elf64_shdr { |
| 403 | #define NT_PPC_TM_CPPR	0x10e		/* TM checkpointed Program Priority Register */ | 404 | #define NT_PPC_TM_CPPR	0x10e		/* TM checkpointed Program Priority Register */ |
| 404 | #define NT_PPC_TM_CDSCR	0x10f		/* TM checkpointed Data Stream Control Register */ | 405 | #define NT_PPC_TM_CDSCR	0x10f		/* TM checkpointed Data Stream Control Register */ |
| 405 | #define NT_PPC_PKEY	0x110		/* Memory Protection Keys registers */ | 406 | #define NT_PPC_PKEY	0x110		/* Memory Protection Keys registers */ |
| 407 | #define NT_PPC_DEXCR	0x111		/* PowerPC DEXCR registers */ | ||
| 408 | #define NT_PPC_HASHKEYR	0x112		/* PowerPC HASHKEYR register */ | ||
| 406 | #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */ | 409 | #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */ |
| 407 | #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */ | 410 | #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */ |
| 408 | #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */ | 411 | #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */ |
| 412 | /* Old binutils treats 0x203 as a CET state */ | ||
| 413 | #define NT_X86_SHSTK	0x204		/* x86 SHSTK state */ | ||
| 409 | #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */ | 414 | #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */ |
| 410 | #define NT_S390_TIMER	0x301		/* s390 timer register */ | 415 | #define NT_S390_TIMER	0x301		/* s390 timer register */ |
| 411 | #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator register */ | 416 | #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator register */ |
| ... | @@ -435,11 +440,14 @@ typedef struct elf64_shdr { | ... | @@ -435,11 +440,14 @@ typedef struct elf64_shdr { |
| 435 | #define NT_ARM_SSVE	0x40b		/* ARM Streaming SVE registers */ | 440 | #define NT_ARM_SSVE	0x40b		/* ARM Streaming SVE registers */ |
| 436 | #define NT_ARM_ZA	0x40c		/* ARM SME ZA registers */ | 441 | #define NT_ARM_ZA	0x40c		/* ARM SME ZA registers */ |
| 437 | #define NT_ARM_ZT	0x40d		/* ARM SME ZT registers */ | 442 | #define NT_ARM_ZT	0x40d		/* ARM SME ZT registers */ |
| 443 | #define NT_ARM_FPMR	0x40e		/* ARM floating point mode register */ | ||
| 438 | #define NT_ARC_V2	0x600		/* ARCv2 accumulator/extra registers */ | 444 | #define NT_ARC_V2	0x600		/* ARCv2 accumulator/extra registers */ |
| 439 | #define NT_VMCOREDD	0x700		/* Vmcore Device Dump Note */ | 445 | #define NT_VMCOREDD	0x700		/* Vmcore Device Dump Note */ |
| 440 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers */ | 446 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers */ |
| 441 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode */ | 447 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode */ |
| 442 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers */ | 448 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers */ |
| 449 | #define NT_RISCV_CSR	0x900		/* RISC-V Control and Status Registers */ | ||
| 450 | #define NT_RISCV_VECTOR	0x901		/* RISC-V vector registers */ | ||
| 443 | #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers */ | 451 | #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers */ |
| 444 | #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and status registers */ | 452 | #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and status registers */ |
| 445 | #define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD Extension registers */ | 453 | #define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD Extension registers */ |
lib/libc/include/any-linux-any/linux/ethtool.h+131-13| ... | @@ -750,6 +750,61 @@ enum ethtool_module_power_mode { | ... | @@ -750,6 +750,61 @@ enum ethtool_module_power_mode { |
| 750 | 	ETHTOOL_MODULE_POWER_MODE_HIGH, | 750 | 	ETHTOOL_MODULE_POWER_MODE_HIGH, |
| 751 | }; | 751 | }; |
| 752 | 752 | ||
| 753 | /** | ||
| 754 | * enum ethtool_pse_types - Types of PSE controller. | ||
| 755 | * @ETHTOOL_PSE_UNKNOWN: Type of PSE controller is unknown | ||
| 756 | * @ETHTOOL_PSE_PODL: PSE controller which support PoDL | ||
| 757 | * @ETHTOOL_PSE_C33: PSE controller which support Clause 33 (PoE) | ||
| 758 | */ | ||
| 759 | enum ethtool_pse_types { | ||
| 760 | 	ETHTOOL_PSE_UNKNOWN =	1 << 0, | ||
| 761 | 	ETHTOOL_PSE_PODL =	1 << 1, | ||
| 762 | 	ETHTOOL_PSE_C33 =	1 << 2, | ||
| 763 | }; | ||
| 764 | |||
| 765 | /** | ||
| 766 | * enum ethtool_c33_pse_admin_state - operational state of the PoDL PSE | ||
| 767 | *	functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState | ||
| 768 | * @ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN: state of PSE functions is unknown | ||
| 769 | * @ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED: PSE functions are disabled | ||
| 770 | * @ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED: PSE functions are enabled | ||
| 771 | */ | ||
| 772 | enum ethtool_c33_pse_admin_state { | ||
| 773 | 	ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN = 1, | ||
| 774 | 	ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED, | ||
| 775 | 	ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED, | ||
| 776 | }; | ||
| 777 | |||
| 778 | /** | ||
| 779 | * enum ethtool_c33_pse_pw_d_status - power detection status of the PSE. | ||
| 780 | *	IEEE 802.3-2022 30.9.1.1.3 aPoDLPSEPowerDetectionStatus: | ||
| 781 | * @ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN: PSE status is unknown | ||
| 782 | * @ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED: The enumeration "disabled" | ||
| 783 | *	indicates that the PSE State diagram is in the state DISABLED. | ||
| 784 | * @ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING: The enumeration "searching" | ||
| 785 | *	indicates the PSE State diagram is in a state other than those | ||
| 786 | *	listed. | ||
| 787 | * @ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING: The enumeration | ||
| 788 | *	"deliveringPower" indicates that the PSE State diagram is in the | ||
| 789 | *	state POWER_ON. | ||
| 790 | * @ETHTOOL_C33_PSE_PW_D_STATUS_TEST: The enumeration "test" indicates that | ||
| 791 | *	the PSE State diagram is in the state TEST_MODE. | ||
| 792 | * @ETHTOOL_C33_PSE_PW_D_STATUS_FAULT: The enumeration "fault" indicates that | ||
| 793 | *	the PSE State diagram is in the state TEST_ERROR. | ||
| 794 | * @ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT: The enumeration "otherFault" | ||
| 795 | *	indicates that the PSE State diagram is in the state IDLE due to | ||
| 796 | *	the variable error_condition = true. | ||
| 797 | */ | ||
| 798 | enum ethtool_c33_pse_pw_d_status { | ||
| 799 | 	ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN = 1, | ||
| 800 | 	ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED, | ||
| 801 | 	ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING, | ||
| 802 | 	ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING, | ||
| 803 | 	ETHTOOL_C33_PSE_PW_D_STATUS_TEST, | ||
| 804 | 	ETHTOOL_C33_PSE_PW_D_STATUS_FAULT, | ||
| 805 | 	ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT, | ||
| 806 | }; | ||
| 807 | |||
| 753 | /** | 808 | /** |
| 754 | * enum ethtool_podl_pse_admin_state - operational state of the PoDL PSE | 809 | * enum ethtool_podl_pse_admin_state - operational state of the PoDL PSE |
| 755 | *	functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState | 810 | *	functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState |
| ... | @@ -1264,6 +1319,8 @@ struct ethtool_rxfh_indir { | ... | @@ -1264,6 +1319,8 @@ struct ethtool_rxfh_indir { |
| 1264 | *	hardware hash key. | 1319 | *	hardware hash key. |
| 1265 | * @hfunc: Defines the current RSS hash function used by HW (or to be set to). | 1320 | * @hfunc: Defines the current RSS hash function used by HW (or to be set to). |
| 1266 | *	Valid values are one of the %ETH_RSS_HASH_*. | 1321 | *	Valid values are one of the %ETH_RSS_HASH_*. |
| 1322 | * @input_xfrm: Defines how the input data is transformed. Valid values are one | ||
| 1323 | *	of %RXH_XFRM_*. | ||
| 1267 | * @rsvd8: Reserved for future use; see the note on reserved space. | 1324 | * @rsvd8: Reserved for future use; see the note on reserved space. |
| 1268 | * @rsvd32: Reserved for future use; see the note on reserved space. | 1325 | * @rsvd32: Reserved for future use; see the note on reserved space. |
| 1269 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table | 1326 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table |
| ... | @@ -1283,7 +1340,8 @@ struct ethtool_rxfh { | ... | @@ -1283,7 +1340,8 @@ struct ethtool_rxfh { |
| 1283 | 	__u32 indir_size; | 1340 | 	__u32 indir_size; |
| 1284 | 	__u32 key_size; | 1341 | 	__u32 key_size; |
| 1285 | 	__u8	hfunc; | 1342 | 	__u8	hfunc; |
| 1286 | 	__u8	rsvd8[3]; | 1343 | 	__u8	input_xfrm; |
| 1344 | 	__u8	rsvd8[2]; | ||
| 1287 | 	__u32	rsvd32; | 1345 | 	__u32	rsvd32; |
| 1288 | 	__u32 rss_config[]; | 1346 | 	__u32 rss_config[]; |
| 1289 | }; | 1347 | }; |
| ... | @@ -1990,6 +2048,15 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) | ... | @@ -1990,6 +2048,15 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) |
| 1990 | 2048 | ||
| 1991 | #define WOL_MODE_COUNT		8 | 2049 | #define WOL_MODE_COUNT		8 |
| 1992 | 2050 | ||
| 2051 | /* RSS hash function data | ||
| 2052 | * XOR the corresponding source and destination fields of each specified | ||
| 2053 | * protocol. Both copies of the XOR'ed fields are fed into the RSS and RXHASH | ||
| 2054 | * calculation. Note that this XORing reduces the input set entropy and could | ||
| 2055 | * be exploited to reduce the RSS queue spread. | ||
| 2056 | */ | ||
| 2057 | #define	RXH_XFRM_SYM_XOR	(1 << 0) | ||
| 2058 | #define	RXH_XFRM_NO_CHANGE	0xff | ||
| 2059 | |||
| 1993 | /* L2-L4 network traffic flow types */ | 2060 | /* L2-L4 network traffic flow types */ |
| 1994 | #define	TCP_V4_FLOW	0x01	/* hash or spec (tcp_ip4_spec) */ | 2061 | #define	TCP_V4_FLOW	0x01	/* hash or spec (tcp_ip4_spec) */ |
| 1995 | #define	UDP_V4_FLOW	0x02	/* hash or spec (udp_ip4_spec) */ | 2062 | #define	UDP_V4_FLOW	0x02	/* hash or spec (udp_ip4_spec) */ |
| ... | @@ -2009,6 +2076,53 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) | ... | @@ -2009,6 +2076,53 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) |
| 2009 | #define	IPV4_FLOW	0x10	/* hash only */ | 2076 | #define	IPV4_FLOW	0x10	/* hash only */ |
| 2010 | #define	IPV6_FLOW	0x11	/* hash only */ | 2077 | #define	IPV6_FLOW	0x11	/* hash only */ |
| 2011 | #define	ETHER_FLOW	0x12	/* spec only (ether_spec) */ | 2078 | #define	ETHER_FLOW	0x12	/* spec only (ether_spec) */ |
| 2079 | |||
| 2080 | /* Used for GTP-U IPv4 and IPv6. | ||
| 2081 | * The format of GTP packets only includes | ||
| 2082 | * elements such as TEID and GTP version. | ||
| 2083 | * It is primarily intended for data communication of the UE. | ||
| 2084 | */ | ||
| 2085 | #define GTPU_V4_FLOW 0x13	/* hash only */ | ||
| 2086 | #define GTPU_V6_FLOW 0x14	/* hash only */ | ||
| 2087 | |||
| 2088 | /* Use for GTP-C IPv4 and v6. | ||
| 2089 | * The format of these GTP packets does not include TEID. | ||
| 2090 | * Primarily expected to be used for communication | ||
| 2091 | * to create sessions for UE data communication, | ||
| 2092 | * commonly referred to as CSR (Create Session Request). | ||
| 2093 | */ | ||
| 2094 | #define GTPC_V4_FLOW 0x15	/* hash only */ | ||
| 2095 | #define GTPC_V6_FLOW 0x16	/* hash only */ | ||
| 2096 | |||
| 2097 | /* Use for GTP-C IPv4 and v6. | ||
| 2098 | * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. | ||
| 2099 | * After session creation, it becomes this packet. | ||
| 2100 | * This is mainly used for requests to realize UE handover. | ||
| 2101 | */ | ||
| 2102 | #define GTPC_TEID_V4_FLOW 0x17	/* hash only */ | ||
| 2103 | #define GTPC_TEID_V6_FLOW 0x18	/* hash only */ | ||
| 2104 | |||
| 2105 | /* Use for GTP-U and extended headers for the PSC (PDU Session Container). | ||
| 2106 | * The format of these GTP packets includes TEID and QFI. | ||
| 2107 | * In 5G communication using UPF (User Plane Function), | ||
| 2108 | * data communication with this extended header is performed. | ||
| 2109 | */ | ||
| 2110 | #define GTPU_EH_V4_FLOW 0x19	/* hash only */ | ||
| 2111 | #define GTPU_EH_V6_FLOW 0x1a	/* hash only */ | ||
| 2112 | |||
| 2113 | /* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. | ||
| 2114 | * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by | ||
| 2115 | * UL/DL included in the PSC. | ||
| 2116 | * There are differences in the data included based on Downlink/Uplink, | ||
| 2117 | * and can be used to distinguish packets. | ||
| 2118 | * The functions described so far are useful when you want to | ||
| 2119 | * handle communication from the mobile network in UPF, PGW, etc. | ||
| 2120 | */ | ||
| 2121 | #define GTPU_UL_V4_FLOW 0x1b	/* hash only */ | ||
| 2122 | #define GTPU_UL_V6_FLOW 0x1c	/* hash only */ | ||
| 2123 | #define GTPU_DL_V4_FLOW 0x1d	/* hash only */ | ||
| 2124 | #define GTPU_DL_V6_FLOW 0x1e	/* hash only */ | ||
| 2125 | |||
| 2012 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | 2126 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ |
| 2013 | #define	FLOW_EXT	0x80000000 | 2127 | #define	FLOW_EXT	0x80000000 |
| 2014 | #define	FLOW_MAC_EXT	0x40000000 | 2128 | #define	FLOW_MAC_EXT	0x40000000 |
| ... | @@ -2023,6 +2137,7 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) | ... | @@ -2023,6 +2137,7 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) |
| 2023 | #define	RXH_IP_DST	(1 << 5) | 2137 | #define	RXH_IP_DST	(1 << 5) |
| 2024 | #define	RXH_L4_B_0_1	(1 << 6) /* src port in case of TCP/UDP/SCTP */ | 2138 | #define	RXH_L4_B_0_1	(1 << 6) /* src port in case of TCP/UDP/SCTP */ |
| 2025 | #define	RXH_L4_B_2_3	(1 << 7) /* dst port in case of TCP/UDP/SCTP */ | 2139 | #define	RXH_L4_B_2_3	(1 << 7) /* dst port in case of TCP/UDP/SCTP */ |
| 2140 | #define	RXH_GTP_TEID	(1 << 8) /* teid in case of GTP */ | ||
| 2026 | #define	RXH_DISCARD	(1 << 31) | 2141 | #define	RXH_DISCARD	(1 << 31) |
| 2027 | 2142 | ||
| 2028 | #define	RX_CLS_FLOW_DISC	0xffffffffffffffffULL | 2143 | #define	RX_CLS_FLOW_DISC	0xffffffffffffffffULL |
| ... | @@ -2126,18 +2241,6 @@ enum ethtool_reset_flags { | ... | @@ -2126,18 +2241,6 @@ enum ethtool_reset_flags { |
| 2126 | *	refused. For drivers: ignore this field (use kernel's | 2241 | *	refused. For drivers: ignore this field (use kernel's |
| 2127 | *	__ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will | 2242 | *	__ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will |
| 2128 | *	be overwritten by kernel. | 2243 | *	be overwritten by kernel. |
| 2129 | * @supported: Bitmap with each bit meaning given by | ||
| 2130 | *	%ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2131 | *	connectors and other link features for which the interface | ||
| 2132 | *	supports autonegotiation or auto-detection. Read-only. | ||
| 2133 | * @advertising: Bitmap with each bit meaning given by | ||
| 2134 | *	%ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2135 | *	connectors and other link features that are advertised through | ||
| 2136 | *	autonegotiation or enabled for auto-detection. | ||
| 2137 | * @lp_advertising: Bitmap with each bit meaning given by | ||
| 2138 | *	%ethtool_link_mode_bit_indices for the link modes, and other | ||
| 2139 | *	link features that the link partner advertised through | ||
| 2140 | *	autonegotiation; 0 if unknown or not applicable. Read-only. | ||
| 2141 | * @transceiver: Used to distinguish different possible PHY types, | 2244 | * @transceiver: Used to distinguish different possible PHY types, |
| 2142 | *	reported consistently by PHYLIB. Read-only. | 2245 | *	reported consistently by PHYLIB. Read-only. |
| 2143 | * @master_slave_cfg: Master/slave port mode. | 2246 | * @master_slave_cfg: Master/slave port mode. |
| ... | @@ -2179,6 +2282,21 @@ enum ethtool_reset_flags { | ... | @@ -2179,6 +2282,21 @@ enum ethtool_reset_flags { |
| 2179 | * %set_link_ksettings() should validate all fields other than @cmd | 2282 | * %set_link_ksettings() should validate all fields other than @cmd |
| 2180 | * and @link_mode_masks_nwords that are not described as read-only or | 2283 | * and @link_mode_masks_nwords that are not described as read-only or |
| 2181 | * deprecated, and must ignore all fields described as read-only. | 2284 | * deprecated, and must ignore all fields described as read-only. |
| 2285 | * | ||
| 2286 | * @link_mode_masks is divided into three bitfields, each of length | ||
| 2287 | * @link_mode_masks_nwords: | ||
| 2288 | * - supported: Bitmap with each bit meaning given by | ||
| 2289 | *	%ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2290 | *	connectors and other link features for which the interface | ||
| 2291 | *	supports autonegotiation or auto-detection. Read-only. | ||
| 2292 | * - advertising: Bitmap with each bit meaning given by | ||
| 2293 | *	%ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2294 | *	connectors and other link features that are advertised through | ||
| 2295 | *	autonegotiation or enabled for auto-detection. | ||
| 2296 | * - lp_advertising: Bitmap with each bit meaning given by | ||
| 2297 | *	%ethtool_link_mode_bit_indices for the link modes, and other | ||
| 2298 | *	link features that the link partner advertised through | ||
| 2299 | *	autonegotiation; 0 if unknown or not applicable. Read-only. | ||
| 2182 | */ | 2300 | */ |
| 2183 | struct ethtool_link_settings { | 2301 | struct ethtool_link_settings { |
| 2184 | 	__u32	cmd; | 2302 | 	__u32	cmd; |
lib/libc/include/any-linux-any/linux/ethtool_netlink.h+30-7| ... | @@ -117,12 +117,11 @@ enum { | ... | @@ -117,12 +117,11 @@ enum { |
| 117 | 117 | ||
| 118 | /* request header */ | 118 | /* request header */ |
| 119 | 119 | ||
| 120 | /* use compact bitsets in reply */ | 120 | enum ethtool_header_flags { |
| 121 | #define ETHTOOL_FLAG_COMPACT_BITSETS	(1 << 0) | 121 | 	ETHTOOL_FLAG_COMPACT_BITSETS	= 1 << 0,	/* use compact bitsets in reply */ |
| 122 | /* provide optional reply for SET or ACT requests */ | 122 | 	ETHTOOL_FLAG_OMIT_REPLY		= 1 << 1,	/* provide optional reply for SET or ACT requests */ |
| 123 | #define ETHTOOL_FLAG_OMIT_REPLY	(1 << 1) | 123 | 	ETHTOOL_FLAG_STATS		= 1 << 2,	/* request statistics, if supported by the driver */ |
| 124 | /* request statistics, if supported by the driver */ | 124 | }; |
| 125 | #define ETHTOOL_FLAG_STATS		(1 << 2) | ||
| 126 | 125 | ||
| 127 | #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ | 126 | #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ |
| 128 | 			 ETHTOOL_FLAG_OMIT_REPLY | \ | 127 | 			 ETHTOOL_FLAG_OMIT_REPLY | \ |
| ... | @@ -357,6 +356,8 @@ enum { | ... | @@ -357,6 +356,8 @@ enum { |
| 357 | 	ETHTOOL_A_RINGS_CQE_SIZE,			/* u32 */ | 356 | 	ETHTOOL_A_RINGS_CQE_SIZE,			/* u32 */ |
| 358 | 	ETHTOOL_A_RINGS_TX_PUSH,			/* u8 */ | 357 | 	ETHTOOL_A_RINGS_TX_PUSH,			/* u8 */ |
| 359 | 	ETHTOOL_A_RINGS_RX_PUSH,			/* u8 */ | 358 | 	ETHTOOL_A_RINGS_RX_PUSH,			/* u8 */ |
| 359 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN,		/* u32 */ | ||
| 360 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX,		/* u32 */ | ||
| 360 | 361 | ||
| 361 | 	/* add new constants above here */ | 362 | 	/* add new constants above here */ |
| 362 | 	__ETHTOOL_A_RINGS_CNT, | 363 | 	__ETHTOOL_A_RINGS_CNT, |
| ... | @@ -476,12 +477,26 @@ enum { | ... | @@ -476,12 +477,26 @@ enum { |
| 476 | 	ETHTOOL_A_TSINFO_TX_TYPES,			/* bitset */ | 477 | 	ETHTOOL_A_TSINFO_TX_TYPES,			/* bitset */ |
| 477 | 	ETHTOOL_A_TSINFO_RX_FILTERS,			/* bitset */ | 478 | 	ETHTOOL_A_TSINFO_RX_FILTERS,			/* bitset */ |
| 478 | 	ETHTOOL_A_TSINFO_PHC_INDEX,			/* u32 */ | 479 | 	ETHTOOL_A_TSINFO_PHC_INDEX,			/* u32 */ |
| 480 | 	ETHTOOL_A_TSINFO_STATS,				/* nest - _A_TSINFO_STAT */ | ||
| 479 | 481 | ||
| 480 | 	/* add new constants above here */ | 482 | 	/* add new constants above here */ |
| 481 | 	__ETHTOOL_A_TSINFO_CNT, | 483 | 	__ETHTOOL_A_TSINFO_CNT, |
| 482 | 	ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) | 484 | 	ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) |
| 483 | }; | 485 | }; |
| 484 | 486 | ||
| 487 | enum { | ||
| 488 | 	ETHTOOL_A_TS_STAT_UNSPEC, | ||
| 489 | |||
| 490 | 	ETHTOOL_A_TS_STAT_TX_PKTS,			/* uint */ | ||
| 491 | 	ETHTOOL_A_TS_STAT_TX_LOST,			/* uint */ | ||
| 492 | 	ETHTOOL_A_TS_STAT_TX_ERR,			/* uint */ | ||
| 493 | |||
| 494 | 	/* add new constants above here */ | ||
| 495 | 	__ETHTOOL_A_TS_STAT_CNT, | ||
| 496 | 	ETHTOOL_A_TS_STAT_MAX = (__ETHTOOL_A_TS_STAT_CNT - 1) | ||
| 497 | |||
| 498 | }; | ||
| 499 | |||
| 485 | /* PHC VCLOCKS */ | 500 | /* PHC VCLOCKS */ |
| 486 | 501 | ||
| 487 | enum { | 502 | enum { |
| ... | @@ -513,6 +528,10 @@ enum { | ... | @@ -513,6 +528,10 @@ enum { |
| 513 | 	ETHTOOL_A_CABLE_RESULT_CODE_OPEN, | 528 | 	ETHTOOL_A_CABLE_RESULT_CODE_OPEN, |
| 514 | 	ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT, | 529 | 	ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT, |
| 515 | 	ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT, | 530 | 	ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT, |
| 531 | 	/* detected reflection caused by the impedance discontinuity between | ||
| 532 | 	 * a regular 100 Ohm cable and a part with the abnormal impedance value | ||
| 533 | 	 */ | ||
| 534 | 	ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH, | ||
| 516 | }; | 535 | }; |
| 517 | 536 | ||
| 518 | enum { | 537 | enum { |
| ... | @@ -781,7 +800,7 @@ enum { | ... | @@ -781,7 +800,7 @@ enum { |
| 781 | 800 | ||
| 782 | 	/* add new constants above here */ | 801 | 	/* add new constants above here */ |
| 783 | 	__ETHTOOL_A_STATS_GRP_CNT, | 802 | 	__ETHTOOL_A_STATS_GRP_CNT, |
| 784 | 	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1) | 803 | 	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1) |
| 785 | }; | 804 | }; |
| 786 | 805 | ||
| 787 | enum { | 806 | enum { |
| ... | @@ -893,6 +912,9 @@ enum { | ... | @@ -893,6 +912,9 @@ enum { |
| 893 | 	ETHTOOL_A_PODL_PSE_ADMIN_STATE,		/* u32 */ | 912 | 	ETHTOOL_A_PODL_PSE_ADMIN_STATE,		/* u32 */ |
| 894 | 	ETHTOOL_A_PODL_PSE_ADMIN_CONTROL,	/* u32 */ | 913 | 	ETHTOOL_A_PODL_PSE_ADMIN_CONTROL,	/* u32 */ |
| 895 | 	ETHTOOL_A_PODL_PSE_PW_D_STATUS,		/* u32 */ | 914 | 	ETHTOOL_A_PODL_PSE_PW_D_STATUS,		/* u32 */ |
| 915 | 	ETHTOOL_A_C33_PSE_ADMIN_STATE,		/* u32 */ | ||
| 916 | 	ETHTOOL_A_C33_PSE_ADMIN_CONTROL,	/* u32 */ | ||
| 917 | 	ETHTOOL_A_C33_PSE_PW_D_STATUS,		/* u32 */ | ||
| 896 | 918 | ||
| 897 | 	/* add new constants above here */ | 919 | 	/* add new constants above here */ |
| 898 | 	__ETHTOOL_A_PSE_CNT, | 920 | 	__ETHTOOL_A_PSE_CNT, |
| ... | @@ -906,6 +928,7 @@ enum { | ... | @@ -906,6 +928,7 @@ enum { |
| 906 | 	ETHTOOL_A_RSS_HFUNC,		/* u32 */ | 928 | 	ETHTOOL_A_RSS_HFUNC,		/* u32 */ |
| 907 | 	ETHTOOL_A_RSS_INDIR,		/* binary */ | 929 | 	ETHTOOL_A_RSS_INDIR,		/* binary */ |
| 908 | 	ETHTOOL_A_RSS_HKEY,		/* binary */ | 930 | 	ETHTOOL_A_RSS_HKEY,		/* binary */ |
| 931 | 	ETHTOOL_A_RSS_INPUT_XFRM,	/* u32 */ | ||
| 909 | 932 | ||
| 910 | 	__ETHTOOL_A_RSS_CNT, | 933 | 	__ETHTOOL_A_RSS_CNT, |
| 911 | 	ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), | 934 | 	ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), |
lib/libc/include/any-linux-any/linux/eventfd.h created+11| ... | @@ -0,0 +1,11 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _LINUX_EVENTFD_H | ||
| 3 | #define _LINUX_EVENTFD_H | ||
| 4 | |||
| 5 | #include <linux/fcntl.h> | ||
| 6 | |||
| 7 | #define EFD_SEMAPHORE (1 << 0) | ||
| 8 | #define EFD_CLOEXEC O_CLOEXEC | ||
| 9 | #define EFD_NONBLOCK O_NONBLOCK | ||
| 10 | |||
| 11 | #endif /* _LINUX_EVENTFD_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/eventpoll.h+13-12| ... | @@ -85,16 +85,17 @@ struct epoll_event { | ... | @@ -85,16 +85,17 @@ struct epoll_event { |
| 85 | 	__u64 data; | 85 | 	__u64 data; |
| 86 | } EPOLL_PACKED; | 86 | } EPOLL_PACKED; |
| 87 | 87 | ||
| 88 | #ifdef CONFIG_PM_SLEEP | 88 | struct epoll_params { |
| 89 | static __inline__ void ep_take_care_of_epollwakeup(struct epoll_event *epev) | 89 | 	__u32 busy_poll_usecs; |
| 90 | { | 90 | 	__u16 busy_poll_budget; |
| 91 | 	if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) | 91 | 	__u8 prefer_busy_poll; |
| 92 | 		epev->events &= ~EPOLLWAKEUP; | 92 | |
| 93 | } | 93 | 	/* pad the struct to a multiple of 64bits */ |
| 94 | #else | 94 | 	__u8 __pad; |
| 95 | static __inline__ void ep_take_care_of_epollwakeup(struct epoll_event *epev) | 95 | }; |
| 96 | { | 96 | |
| 97 | 	epev->events &= ~EPOLLWAKEUP; | 97 | #define EPOLL_IOC_TYPE 0x8A |
| 98 | } | 98 | #define EPIOCSPARAMS _IOW(EPOLL_IOC_TYPE, 0x01, struct epoll_params) |
| 99 | #endif | 99 | #define EPIOCGPARAMS _IOR(EPOLL_IOC_TYPE, 0x02, struct epoll_params) |
| 100 | |||
| 100 | #endif /* _LINUX_EVENTPOLL_H */ | 101 | #endif /* _LINUX_EVENTPOLL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ext4.h created+117| ... | @@ -0,0 +1,117 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #ifndef _LINUX_EXT4_H | ||
| 4 | #define _LINUX_EXT4_H | ||
| 5 | #include <linux/fiemap.h> | ||
| 6 | #include <linux/fs.h> | ||
| 7 | #include <linux/ioctl.h> | ||
| 8 | #include <linux/types.h> | ||
| 9 | |||
| 10 | /* | ||
| 11 | * ext4-specific ioctl commands | ||
| 12 | */ | ||
| 13 | #define	EXT4_IOC_GETVERSION		_IOR('f', 3, long) | ||
| 14 | #define	EXT4_IOC_SETVERSION		_IOW('f', 4, long) | ||
| 15 | #define	EXT4_IOC_GETVERSION_OLD		FS_IOC_GETVERSION | ||
| 16 | #define	EXT4_IOC_SETVERSION_OLD		FS_IOC_SETVERSION | ||
| 17 | #define EXT4_IOC_GETRSVSZ		_IOR('f', 5, long) | ||
| 18 | #define EXT4_IOC_SETRSVSZ		_IOW('f', 6, long) | ||
| 19 | #define EXT4_IOC_GROUP_EXTEND		_IOW('f', 7, unsigned long) | ||
| 20 | #define EXT4_IOC_GROUP_ADD		_IOW('f', 8, struct ext4_new_group_input) | ||
| 21 | #define EXT4_IOC_MIGRATE		_IO('f', 9) | ||
| 22 | /* note ioctl 10 reserved for an early version of the FIEMAP ioctl */ | ||
| 23 | /* note ioctl 11 reserved for filesystem-independent FIEMAP ioctl */ | ||
| 24 | #define EXT4_IOC_ALLOC_DA_BLKS		_IO('f', 12) | ||
| 25 | #define EXT4_IOC_MOVE_EXT		_IOWR('f', 15, struct move_extent) | ||
| 26 | #define EXT4_IOC_RESIZE_FS		_IOW('f', 16, __u64) | ||
| 27 | #define EXT4_IOC_SWAP_BOOT		_IO('f', 17) | ||
| 28 | #define EXT4_IOC_PRECACHE_EXTENTS	_IO('f', 18) | ||
| 29 | /* ioctl codes 19--39 are reserved for fscrypt */ | ||
| 30 | #define EXT4_IOC_CLEAR_ES_CACHE		_IO('f', 40) | ||
| 31 | #define EXT4_IOC_GETSTATE		_IOW('f', 41, __u32) | ||
| 32 | #define EXT4_IOC_GET_ES_CACHE		_IOWR('f', 42, struct fiemap) | ||
| 33 | #define EXT4_IOC_CHECKPOINT		_IOW('f', 43, __u32) | ||
| 34 | #define EXT4_IOC_GETFSUUID		_IOR('f', 44, struct fsuuid) | ||
| 35 | #define EXT4_IOC_SETFSUUID		_IOW('f', 44, struct fsuuid) | ||
| 36 | |||
| 37 | #define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32) | ||
| 38 | |||
| 39 | /* | ||
| 40 | * ioctl commands in 32 bit emulation | ||
| 41 | */ | ||
| 42 | #define EXT4_IOC32_GETVERSION		_IOR('f', 3, int) | ||
| 43 | #define EXT4_IOC32_SETVERSION		_IOW('f', 4, int) | ||
| 44 | #define EXT4_IOC32_GETRSVSZ		_IOR('f', 5, int) | ||
| 45 | #define EXT4_IOC32_SETRSVSZ		_IOW('f', 6, int) | ||
| 46 | #define EXT4_IOC32_GROUP_EXTEND		_IOW('f', 7, unsigned int) | ||
| 47 | #define EXT4_IOC32_GROUP_ADD		_IOW('f', 8, struct compat_ext4_new_group_input) | ||
| 48 | #define EXT4_IOC32_GETVERSION_OLD	FS_IOC32_GETVERSION | ||
| 49 | #define EXT4_IOC32_SETVERSION_OLD	FS_IOC32_SETVERSION | ||
| 50 | |||
| 51 | /* | ||
| 52 | * Flags returned by EXT4_IOC_GETSTATE | ||
| 53 | * | ||
| 54 | * We only expose to userspace a subset of the state flags in | ||
| 55 | * i_state_flags | ||
| 56 | */ | ||
| 57 | #define EXT4_STATE_FLAG_EXT_PRECACHED	0x00000001 | ||
| 58 | #define EXT4_STATE_FLAG_NEW		0x00000002 | ||
| 59 | #define EXT4_STATE_FLAG_NEWENTRY	0x00000004 | ||
| 60 | #define EXT4_STATE_FLAG_DA_ALLOC_CLOSE	0x00000008 | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Flags for ioctl EXT4_IOC_CHECKPOINT | ||
| 64 | */ | ||
| 65 | #define EXT4_IOC_CHECKPOINT_FLAG_DISCARD	0x1 | ||
| 66 | #define EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT	0x2 | ||
| 67 | #define EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN	0x4 | ||
| 68 | #define EXT4_IOC_CHECKPOINT_FLAG_VALID		(EXT4_IOC_CHECKPOINT_FLAG_DISCARD | \ | ||
| 69 | 						EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT | \ | ||
| 70 | 						EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN) | ||
| 71 | |||
| 72 | /* | ||
| 73 | * Structure for EXT4_IOC_GETFSUUID/EXT4_IOC_SETFSUUID | ||
| 74 | */ | ||
| 75 | struct fsuuid { | ||
| 76 | 	__u32 fsu_len; | ||
| 77 | 	__u32 fsu_flags; | ||
| 78 | 	__u8 fsu_uuid[]; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Structure for EXT4_IOC_MOVE_EXT | ||
| 83 | */ | ||
| 84 | struct move_extent { | ||
| 85 | 	__u32 reserved;		/* should be zero */ | ||
| 86 | 	__u32 donor_fd;		/* donor file descriptor */ | ||
| 87 | 	__u64 orig_start;	/* logical start offset in block for orig */ | ||
| 88 | 	__u64 donor_start;	/* logical start offset in block for donor */ | ||
| 89 | 	__u64 len;		/* block length to be moved */ | ||
| 90 | 	__u64 moved_len;	/* moved block length */ | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Flags used by EXT4_IOC_SHUTDOWN | ||
| 95 | */ | ||
| 96 | #define EXT4_GOING_FLAGS_DEFAULT		0x0	/* going down */ | ||
| 97 | #define EXT4_GOING_FLAGS_LOGFLUSH		0x1	/* flush log but not data */ | ||
| 98 | #define EXT4_GOING_FLAGS_NOLOGFLUSH		0x2	/* don't flush log nor data */ | ||
| 99 | |||
| 100 | /* Used to pass group descriptor data when online resize is done */ | ||
| 101 | struct ext4_new_group_input { | ||
| 102 | 	__u32 group;		/* Group number for this data */ | ||
| 103 | 	__u64 block_bitmap;	/* Absolute block number of block bitmap */ | ||
| 104 | 	__u64 inode_bitmap;	/* Absolute block number of inode bitmap */ | ||
| 105 | 	__u64 inode_table;	/* Absolute block number of inode table start */ | ||
| 106 | 	__u32 blocks_count;	/* Total number of blocks in this group */ | ||
| 107 | 	__u16 reserved_blocks;	/* Number of reserved blocks in this group */ | ||
| 108 | 	__u16 unused; | ||
| 109 | }; | ||
| 110 | |||
| 111 | /* | ||
| 112 | * Returned by EXT4_IOC_GET_ES_CACHE as an additional possible flag. | ||
| 113 | * It indicates that the entry in extent status cache is for a hole. | ||
| 114 | */ | ||
| 115 | #define EXT4_FIEMAP_EXTENT_HOLE		0x08000000 | ||
| 116 | |||
| 117 | #endif /* _LINUX_EXT4_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/fanotify.h+2-2| ... | @@ -8,8 +8,8 @@ | ... | @@ -8,8 +8,8 @@ |
| 8 | #define FAN_ACCESS		0x00000001	/* File was accessed */ | 8 | #define FAN_ACCESS		0x00000001	/* File was accessed */ |
| 9 | #define FAN_MODIFY		0x00000002	/* File was modified */ | 9 | #define FAN_MODIFY		0x00000002	/* File was modified */ |
| 10 | #define FAN_ATTRIB		0x00000004	/* Metadata changed */ | 10 | #define FAN_ATTRIB		0x00000004	/* Metadata changed */ |
| 11 | #define FAN_CLOSE_WRITE		0x00000008	/* Writtable file closed */ | 11 | #define FAN_CLOSE_WRITE		0x00000008	/* Writable file closed */ |
| 12 | #define FAN_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */ | 12 | #define FAN_CLOSE_NOWRITE	0x00000010	/* Unwritable file closed */ |
| 13 | #define FAN_OPEN		0x00000020	/* File was opened */ | 13 | #define FAN_OPEN		0x00000020	/* File was opened */ |
| 14 | #define FAN_MOVED_FROM		0x00000040	/* File was moved from X */ | 14 | #define FAN_MOVED_FROM		0x00000040	/* File was moved from X */ |
| 15 | #define FAN_MOVED_TO		0x00000080	/* File was moved to Y */ | 15 | #define FAN_MOVED_TO		0x00000080	/* File was moved to Y */ |
lib/libc/include/any-linux-any/linux/fb.h+1-7| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | ||
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/i2c.h> | 6 | #include <linux/i2c.h> |
| 7 | #include <linux/vesa.h> | ||
| 7 | 8 | ||
| 8 | /* Definitions of frame buffers						*/ | 9 | /* Definitions of frame buffers						*/ |
| 9 | 10 | ||
| ... | @@ -291,13 +292,6 @@ struct fb_con2fbmap { | ... | @@ -291,13 +292,6 @@ struct fb_con2fbmap { |
| 291 | 	__u32 framebuffer; | 292 | 	__u32 framebuffer; |
| 292 | }; | 293 | }; |
| 293 | 294 | ||
| 294 | /* VESA Blanking Levels */ | ||
| 295 | #define VESA_NO_BLANKING 0 | ||
| 296 | #define VESA_VSYNC_SUSPEND 1 | ||
| 297 | #define VESA_HSYNC_SUSPEND 2 | ||
| 298 | #define VESA_POWERDOWN 3 | ||
| 299 | |||
| 300 | |||
| 301 | enum { | 295 | enum { |
| 302 | 	/* screen: unblanked, hsync: on, vsync: on */ | 296 | 	/* screen: unblanked, hsync: on, vsync: on */ |
| 303 | 	FB_BLANK_UNBLANK = VESA_NO_BLANKING, | 297 | 	FB_BLANK_UNBLANK = VESA_NO_BLANKING, |
lib/libc/include/any-linux-any/linux/fcntl.h+13-6| ... | @@ -8,6 +8,14 @@ | ... | @@ -8,6 +8,14 @@ |
| 8 | #define F_SETLEASE	(F_LINUX_SPECIFIC_BASE + 0) | 8 | #define F_SETLEASE	(F_LINUX_SPECIFIC_BASE + 0) |
| 9 | #define F_GETLEASE	(F_LINUX_SPECIFIC_BASE + 1) | 9 | #define F_GETLEASE	(F_LINUX_SPECIFIC_BASE + 1) |
| 10 | 10 | ||
| 11 | /* | ||
| 12 | * Request nofications on a directory. | ||
| 13 | * See below for events that may be notified. | ||
| 14 | */ | ||
| 15 | #define F_NOTIFY	(F_LINUX_SPECIFIC_BASE + 2) | ||
| 16 | |||
| 17 | #define F_DUPFD_QUERY	(F_LINUX_SPECIFIC_BASE + 3) | ||
| 18 | |||
| 11 | /* | 19 | /* |
| 12 | * Cancel a blocking posix lock; internal use only until we expose an | 20 | * Cancel a blocking posix lock; internal use only until we expose an |
| 13 | * asynchronous lock api to userspace: | 21 | * asynchronous lock api to userspace: |
| ... | @@ -17,12 +25,6 @@ | ... | @@ -17,12 +25,6 @@ |
| 17 | /* Create a file descriptor with FD_CLOEXEC set. */ | 25 | /* Create a file descriptor with FD_CLOEXEC set. */ |
| 18 | #define F_DUPFD_CLOEXEC	(F_LINUX_SPECIFIC_BASE + 6) | 26 | #define F_DUPFD_CLOEXEC	(F_LINUX_SPECIFIC_BASE + 6) |
| 19 | 27 | ||
| 20 | /* | ||
| 21 | * Request nofications on a directory. | ||
| 22 | * See below for events that may be notified. | ||
| 23 | */ | ||
| 24 | #define F_NOTIFY	(F_LINUX_SPECIFIC_BASE+2) | ||
| 25 | |||
| 26 | /* | 28 | /* |
| 27 | * Set and get of pipe page size array | 29 | * Set and get of pipe page size array |
| 28 | */ | 30 | */ |
| ... | @@ -112,4 +114,9 @@ | ... | @@ -112,4 +114,9 @@ |
| 112 | 114 | ||
| 113 | #define AT_RECURSIVE		0x8000	/* Apply to the entire subtree */ | 115 | #define AT_RECURSIVE		0x8000	/* Apply to the entire subtree */ |
| 114 | 116 | ||
| 117 | /* Flags for name_to_handle_at(2). We reuse AT_ flag space to save bits... */ | ||
| 118 | #define AT_HANDLE_FID		AT_REMOVEDIR	/* file handle is needed to | ||
| 119 | 					compare object identity and may not | ||
| 120 | 					be usable to open_by_handle_at(2) */ | ||
| 121 | |||
| 115 | #endif /* _LINUX_FCNTL_H */ | 122 | #endif /* _LINUX_FCNTL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/firewire-cdev.h+156-22| ... | @@ -46,6 +46,12 @@ | ... | @@ -46,6 +46,12 @@ |
| 46 | #define FW_CDEV_EVENT_PHY_PACKET_RECEIVED		0x08 | 46 | #define FW_CDEV_EVENT_PHY_PACKET_RECEIVED		0x08 |
| 47 | #define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL	0x09 | 47 | #define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL	0x09 |
| 48 | 48 | ||
| 49 | /* available since kernel version 6.5 */ | ||
| 50 | #define FW_CDEV_EVENT_REQUEST3				0x0a | ||
| 51 | #define FW_CDEV_EVENT_RESPONSE2				0x0b | ||
| 52 | #define FW_CDEV_EVENT_PHY_PACKET_SENT2			0x0c | ||
| 53 | #define FW_CDEV_EVENT_PHY_PACKET_RECEIVED2		0x0d | ||
| 54 | |||
| 49 | /** | 55 | /** |
| 50 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_* types | 56 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_* types |
| 51 | * @closure:	For arbitrary use by userspace | 57 | * @closure:	For arbitrary use by userspace |
| ... | @@ -103,6 +109,32 @@ struct fw_cdev_event_bus_reset { | ... | @@ -103,6 +109,32 @@ struct fw_cdev_event_bus_reset { |
| 103 | * @length:	Data length, i.e. the response's payload size in bytes | 109 | * @length:	Data length, i.e. the response's payload size in bytes |
| 104 | * @data:	Payload data, if any | 110 | * @data:	Payload data, if any |
| 105 | * | 111 | * |
| 112 | * This event is sent instead of &fw_cdev_event_response if the kernel or the client implements | ||
| 113 | * ABI version <= 5. It has the lack of time stamp field comparing to &fw_cdev_event_response2. | ||
| 114 | */ | ||
| 115 | struct fw_cdev_event_response { | ||
| 116 | 	__u64 closure; | ||
| 117 | 	__u32 type; | ||
| 118 | 	__u32 rcode; | ||
| 119 | 	__u32 length; | ||
| 120 | 	__u32 data[]; | ||
| 121 | }; | ||
| 122 | |||
| 123 | /** | ||
| 124 | * struct fw_cdev_event_response2 - Sent when a response packet was received | ||
| 125 | * @closure:	See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_REQUEST | ||
| 126 | *		or %FW_CDEV_IOC_SEND_BROADCAST_REQUEST | ||
| 127 | *		or %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl | ||
| 128 | * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE | ||
| 129 | * @rcode:	Response code returned by the remote node | ||
| 130 | * @length:	Data length, i.e. the response's payload size in bytes | ||
| 131 | * @request_tstamp:	The time stamp of isochronous cycle at which the request was sent. | ||
| 132 | * @response_tstamp:	The time stamp of isochronous cycle at which the response was sent. | ||
| 133 | * @padding:	Padding to keep the size of structure as multiples of 8 in various architectures | ||
| 134 | *		since 4 byte alignment is used for 8 byte of object type in System V ABI for i386 | ||
| 135 | *		architecture. | ||
| 136 | * @data:	Payload data, if any | ||
| 137 | * | ||
| 106 | * This event is sent when the stack receives a response to an outgoing request | 138 | * This event is sent when the stack receives a response to an outgoing request |
| 107 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses | 139 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses |
| 108 | * carrying data (read and lock responses) follows immediately and can be | 140 | * carrying data (read and lock responses) follows immediately and can be |
| ... | @@ -112,12 +144,21 @@ struct fw_cdev_event_bus_reset { | ... | @@ -112,12 +144,21 @@ struct fw_cdev_event_bus_reset { |
| 112 | * involve response packets. This includes unified write transactions, | 144 | * involve response packets. This includes unified write transactions, |
| 113 | * broadcast write transactions, and transmission of asynchronous stream | 145 | * broadcast write transactions, and transmission of asynchronous stream |
| 114 | * packets. @rcode indicates success or failure of such transmissions. | 146 | * packets. @rcode indicates success or failure of such transmissions. |
| 147 | * | ||
| 148 | * The value of @request_tstamp expresses the isochronous cycle at which the request was sent to | ||
| 149 | * initiate the transaction. The value of @response_tstamp expresses the isochronous cycle at which | ||
| 150 | * the response arrived to complete the transaction. Each value is unsigned 16 bit integer | ||
| 151 | * containing three low order bits of second field and all 13 bits of cycle field in format of | ||
| 152 | * CYCLE_TIMER register. | ||
| 115 | */ | 153 | */ |
| 116 | struct fw_cdev_event_response { | 154 | struct fw_cdev_event_response2 { |
| 117 | 	__u64 closure; | 155 | 	__u64 closure; |
| 118 | 	__u32 type; | 156 | 	__u32 type; |
| 119 | 	__u32 rcode; | 157 | 	__u32 rcode; |
| 120 | 	__u32 length; | 158 | 	__u32 length; |
| 159 | 	__u32 request_tstamp; | ||
| 160 | 	__u32 response_tstamp; | ||
| 161 | 	__u32 padding; | ||
| 121 | 	__u32 data[]; | 162 | 	__u32 data[]; |
| 122 | }; | 163 | }; |
| 123 | 164 | ||
| ... | @@ -159,6 +200,41 @@ struct fw_cdev_event_request { | ... | @@ -159,6 +200,41 @@ struct fw_cdev_event_request { |
| 159 | * @length:	Data length, i.e. the request's payload size in bytes | 200 | * @length:	Data length, i.e. the request's payload size in bytes |
| 160 | * @data:	Incoming data, if any | 201 | * @data:	Incoming data, if any |
| 161 | * | 202 | * |
| 203 | * This event is sent instead of &fw_cdev_event_request3 if the kernel or the client implements | ||
| 204 | * ABI version <= 5. It has the lack of time stamp field comparing to &fw_cdev_event_request3. | ||
| 205 | */ | ||
| 206 | struct fw_cdev_event_request2 { | ||
| 207 | 	__u64 closure; | ||
| 208 | 	__u32 type; | ||
| 209 | 	__u32 tcode; | ||
| 210 | 	__u64 offset; | ||
| 211 | 	__u32 source_node_id; | ||
| 212 | 	__u32 destination_node_id; | ||
| 213 | 	__u32 card; | ||
| 214 | 	__u32 generation; | ||
| 215 | 	__u32 handle; | ||
| 216 | 	__u32 length; | ||
| 217 | 	__u32 data[]; | ||
| 218 | }; | ||
| 219 | |||
| 220 | /** | ||
| 221 | * struct fw_cdev_event_request3 - Sent on incoming request to an address region | ||
| 222 | * @closure:	See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl | ||
| 223 | * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST2 | ||
| 224 | * @tcode:	Transaction code of the incoming request | ||
| 225 | * @offset:	The offset into the 48-bit per-node address space | ||
| 226 | * @source_node_id: Sender node ID | ||
| 227 | * @destination_node_id: Destination node ID | ||
| 228 | * @card:	The index of the card from which the request came | ||
| 229 | * @generation:	Bus generation in which the request is valid | ||
| 230 | * @handle:	Reference to the kernel-side pending request | ||
| 231 | * @length:	Data length, i.e. the request's payload size in bytes | ||
| 232 | * @tstamp:	The time stamp of isochronous cycle at which the request arrived. | ||
| 233 | * @padding:	Padding to keep the size of structure as multiples of 8 in various architectures | ||
| 234 | *		since 4 byte alignment is used for 8 byte of object type in System V ABI for i386 | ||
| 235 | *		architecture. | ||
| 236 | * @data:	Incoming data, if any | ||
| 237 | * | ||
| 162 | * This event is sent when the stack receives an incoming request to an address | 238 | * This event is sent when the stack receives an incoming request to an address |
| 163 | * region registered using the %FW_CDEV_IOC_ALLOCATE ioctl. The request is | 239 | * region registered using the %FW_CDEV_IOC_ALLOCATE ioctl. The request is |
| 164 | * guaranteed to be completely contained in the specified region. Userspace is | 240 | * guaranteed to be completely contained in the specified region. Userspace is |
| ... | @@ -191,10 +267,14 @@ struct fw_cdev_event_request { | ... | @@ -191,10 +267,14 @@ struct fw_cdev_event_request { |
| 191 | * sent. | 267 | * sent. |
| 192 | * | 268 | * |
| 193 | * If the client subsequently needs to initiate requests to the sender node of | 269 | * If the client subsequently needs to initiate requests to the sender node of |
| 194 | * an &fw_cdev_event_request2, it needs to use a device file with matching | 270 | * an &fw_cdev_event_request3, it needs to use a device file with matching |
| 195 | * card index, node ID, and generation for outbound requests. | 271 | * card index, node ID, and generation for outbound requests. |
| 272 | * | ||
| 273 | * @tstamp is isochronous cycle at which the request arrived. It is 16 bit integer value and the | ||
| 274 | * higher 3 bits expresses three low order bits of second field in the format of CYCLE_TIME | ||
| 275 | * register and the rest 13 bits expresses cycle field. | ||
| 196 | */ | 276 | */ |
| 197 | struct fw_cdev_event_request2 { | 277 | struct fw_cdev_event_request3 { |
| 198 | 	__u64 closure; | 278 | 	__u64 closure; |
| 199 | 	__u32 type; | 279 | 	__u32 type; |
| 200 | 	__u32 tcode; | 280 | 	__u32 tcode; |
| ... | @@ -205,6 +285,8 @@ struct fw_cdev_event_request2 { | ... | @@ -205,6 +285,8 @@ struct fw_cdev_event_request2 { |
| 205 | 	__u32 generation; | 285 | 	__u32 generation; |
| 206 | 	__u32 handle; | 286 | 	__u32 handle; |
| 207 | 	__u32 length; | 287 | 	__u32 length; |
| 288 | 	__u32 tstamp; | ||
| 289 | 	__u32 padding; | ||
| 208 | 	__u32 data[]; | 290 | 	__u32 data[]; |
| 209 | }; | 291 | }; |
| 210 | 292 | ||
| ... | @@ -341,20 +423,59 @@ struct fw_cdev_event_iso_resource { | ... | @@ -341,20 +423,59 @@ struct fw_cdev_event_iso_resource { |
| 341 | * @type:	%FW_CDEV_EVENT_PHY_PACKET_SENT or %..._RECEIVED | 423 | * @type:	%FW_CDEV_EVENT_PHY_PACKET_SENT or %..._RECEIVED |
| 342 | * @rcode:	%RCODE_..., indicates success or failure of transmission | 424 | * @rcode:	%RCODE_..., indicates success or failure of transmission |
| 343 | * @length:	Data length in bytes | 425 | * @length:	Data length in bytes |
| 426 | * @data:	Incoming data for %FW_CDEV_IOC_RECEIVE_PHY_PACKETS. For %FW_CDEV_IOC_SEND_PHY_PACKET | ||
| 427 | *		the field has the same data in the request, thus the length of 8 bytes. | ||
| 428 | * | ||
| 429 | * This event is sent instead of &fw_cdev_event_phy_packet2 if the kernel or | ||
| 430 | * the client implements ABI version <= 5. It has the lack of time stamp field comparing to | ||
| 431 | * &fw_cdev_event_phy_packet2. | ||
| 432 | */ | ||
| 433 | struct fw_cdev_event_phy_packet { | ||
| 434 | 	__u64 closure; | ||
| 435 | 	__u32 type; | ||
| 436 | 	__u32 rcode; | ||
| 437 | 	__u32 length; | ||
| 438 | 	__u32 data[]; | ||
| 439 | }; | ||
| 440 | |||
| 441 | /** | ||
| 442 | * struct fw_cdev_event_phy_packet2 - A PHY packet was transmitted or received with time stamp. | ||
| 443 | * @closure:	See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_PHY_PACKET | ||
| 444 | *		or %FW_CDEV_IOC_RECEIVE_PHY_PACKETS ioctl | ||
| 445 | * @type:	%FW_CDEV_EVENT_PHY_PACKET_SENT2 or %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2 | ||
| 446 | * @rcode:	%RCODE_..., indicates success or failure of transmission | ||
| 447 | * @length:	Data length in bytes | ||
| 448 | * @tstamp:	For %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2, the time stamp of isochronous cycle at | ||
| 449 | *		which the packet arrived. For %FW_CDEV_EVENT_PHY_PACKET_SENT2 and non-ping packet, | ||
| 450 | *		the time stamp of isochronous cycle at which the packet was sent. For ping packet, | ||
| 451 | *		the tick count for round-trip time measured by 1394 OHCI controller. | ||
| 452 | * The time stamp of isochronous cycle at which either the response was sent for | ||
| 453 | *		%FW_CDEV_EVENT_PHY_PACKET_SENT2 or the request arrived for | ||
| 454 | *		%FW_CDEV_EVENT_PHY_PACKET_RECEIVED2. | ||
| 344 | * @data:	Incoming data | 455 | * @data:	Incoming data |
| 345 | * | 456 | * |
| 346 | * If @type is %FW_CDEV_EVENT_PHY_PACKET_SENT, @length is 0 and @data empty, | 457 | * If @type is %FW_CDEV_EVENT_PHY_PACKET_SENT2, @length is 8 and @data consists of the two PHY |
| 347 | * except in case of a ping packet: Then, @length is 4, and @data[0] is the | 458 | * packet quadlets to be sent, in host byte order, |
| 348 | * ping time in 49.152MHz clocks if @rcode is %RCODE_COMPLETE. | ||
| 349 | * | 459 | * |
| 350 | * If @type is %FW_CDEV_EVENT_PHY_PACKET_RECEIVED, @length is 8 and @data | 460 | * If @type is %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2, @length is 8 and @data consists of the two PHY |
| 351 | * consists of the two PHY packet quadlets, in host byte order. | 461 | * packet quadlets, in host byte order. |
| 462 | * | ||
| 463 | * For %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2, the @tstamp is the isochronous cycle at which the | ||
| 464 | * packet arrived. It is 16 bit integer value and the higher 3 bits expresses three low order bits | ||
| 465 | * of second field and the rest 13 bits expresses cycle field in the format of CYCLE_TIME register. | ||
| 466 | * | ||
| 467 | * For %FW_CDEV_EVENT_PHY_PACKET_SENT2, the @tstamp has different meanings whether to sent the | ||
| 468 | * packet for ping or not. If it's not for ping, the @tstamp is the isochronous cycle at which the | ||
| 469 | * packet was sent, and use the same format as the case of %FW_CDEV_EVENT_PHY_PACKET_SENT2. If it's | ||
| 470 | * for ping, the @tstamp is for round-trip time measured by 1394 OHCI controller with 42.195 MHz | ||
| 471 | * resolution. | ||
| 352 | */ | 472 | */ |
| 353 | struct fw_cdev_event_phy_packet { | 473 | struct fw_cdev_event_phy_packet2 { |
| 354 | 	__u64 closure; | 474 | 	__u64 closure; |
| 355 | 	__u32 type; | 475 | 	__u32 type; |
| 356 | 	__u32 rcode; | 476 | 	__u32 rcode; |
| 357 | 	__u32 length; | 477 | 	__u32 length; |
| 478 | 	__u32 tstamp; | ||
| 358 | 	__u32 data[]; | 479 | 	__u32 data[]; |
| 359 | }; | 480 | }; |
| 360 | 481 | ||
| ... | @@ -375,6 +496,11 @@ struct fw_cdev_event_phy_packet { | ... | @@ -375,6 +496,11 @@ struct fw_cdev_event_phy_packet { |
| 375 | *				%FW_CDEV_EVENT_PHY_PACKET_SENT or | 496 | *				%FW_CDEV_EVENT_PHY_PACKET_SENT or |
| 376 | *				%FW_CDEV_EVENT_PHY_PACKET_RECEIVED | 497 | *				%FW_CDEV_EVENT_PHY_PACKET_RECEIVED |
| 377 | * | 498 | * |
| 499 | * @request3:		Valid if @common.type == %FW_CDEV_EVENT_REQUEST3 | ||
| 500 | * @response2:		Valid if @common.type == %FW_CDEV_EVENT_RESPONSE2 | ||
| 501 | * @phy_packet2:	Valid if @common.type == %FW_CDEV_EVENT_PHY_PACKET_SENT2 or | ||
| 502 | *				%FW_CDEV_EVENT_PHY_PACKET_RECEIVED2 | ||
| 503 | * | ||
| 378 | * Convenience union for userspace use. Events could be read(2) into an | 504 | * Convenience union for userspace use. Events could be read(2) into an |
| 379 | * appropriately aligned char buffer and then cast to this union for further | 505 | * appropriately aligned char buffer and then cast to this union for further |
| 380 | * processing. Note that for a request, response or iso_interrupt event, | 506 | * processing. Note that for a request, response or iso_interrupt event, |
| ... | @@ -393,6 +519,9 @@ union fw_cdev_event { | ... | @@ -393,6 +519,9 @@ union fw_cdev_event { |
| 393 | 	struct fw_cdev_event_iso_interrupt_mc	iso_interrupt_mc;	/* added in 2.6.36 */ | 519 | 	struct fw_cdev_event_iso_interrupt_mc	iso_interrupt_mc;	/* added in 2.6.36 */ |
| 394 | 	struct fw_cdev_event_iso_resource	iso_resource;		/* added in 2.6.30 */ | 520 | 	struct fw_cdev_event_iso_resource	iso_resource;		/* added in 2.6.30 */ |
| 395 | 	struct fw_cdev_event_phy_packet		phy_packet;		/* added in 2.6.36 */ | 521 | 	struct fw_cdev_event_phy_packet		phy_packet;		/* added in 2.6.36 */ |
| 522 | 	struct fw_cdev_event_request3		request3;		/* added in 6.5 */ | ||
| 523 | 	struct fw_cdev_event_response2		response2;		/* added in 6.5 */ | ||
| 524 | 	struct fw_cdev_event_phy_packet2	phy_packet2;		/* added in 6.5 */ | ||
| 396 | }; | 525 | }; |
| 397 | 526 | ||
| 398 | /* available since kernel version 2.6.22 */ | 527 | /* available since kernel version 2.6.22 */ |
| ... | @@ -457,6 +586,11 @@ union fw_cdev_event { | ... | @@ -457,6 +586,11 @@ union fw_cdev_event { |
| 457 | * 5 (3.4) - send %FW_CDEV_EVENT_ISO_INTERRUPT events when needed to | 586 | * 5 (3.4) - send %FW_CDEV_EVENT_ISO_INTERRUPT events when needed to |
| 458 | * avoid dropping data | 587 | * avoid dropping data |
| 459 | * - added %FW_CDEV_IOC_FLUSH_ISO | 588 | * - added %FW_CDEV_IOC_FLUSH_ISO |
| 589 | * 6 (6.5) - added some event for subactions of asynchronous transaction with time stamp | ||
| 590 | * - %FW_CDEV_EVENT_REQUEST3 | ||
| 591 | * - %FW_CDEV_EVENT_RESPONSE2 | ||
| 592 | * - %FW_CDEV_EVENT_PHY_PACKET_SENT2 | ||
| 593 | * - %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2 | ||
| 460 | */ | 594 | */ |
| 461 | 595 | ||
| 462 | /** | 596 | /** |
| ... | @@ -502,11 +636,11 @@ struct fw_cdev_get_info { | ... | @@ -502,11 +636,11 @@ struct fw_cdev_get_info { |
| 502 | * @data:	Userspace pointer to payload | 636 | * @data:	Userspace pointer to payload |
| 503 | * @generation:	The bus generation where packet is valid | 637 | * @generation:	The bus generation where packet is valid |
| 504 | * | 638 | * |
| 505 | * Send a request to the device. This ioctl implements all outgoing requests. | 639 | * Send a request to the device. This ioctl implements all outgoing requests. Both quadlet and |
| 506 | * Both quadlet and block request specify the payload as a pointer to the data | 640 | * block request specify the payload as a pointer to the data in the @data field. Once the |
| 507 | * in the @data field. Once the transaction completes, the kernel writes an | 641 | * transaction completes, the kernel writes either &fw_cdev_event_response event or |
| 508 | * &fw_cdev_event_response event back. The @closure field is passed back to | 642 | * &fw_cdev_event_response event back. The @closure field is passed back to user space in the |
| 509 | * user space in the response event. | 643 | * response event. |
| 510 | */ | 644 | */ |
| 511 | struct fw_cdev_send_request { | 645 | struct fw_cdev_send_request { |
| 512 | 	__u32 tcode; | 646 | 	__u32 tcode; |
| ... | @@ -989,10 +1123,9 @@ struct fw_cdev_allocate_iso_resource { | ... | @@ -989,10 +1123,9 @@ struct fw_cdev_allocate_iso_resource { |
| 989 | * @generation:	The bus generation where packet is valid | 1123 | * @generation:	The bus generation where packet is valid |
| 990 | * @speed:	Speed to transmit at | 1124 | * @speed:	Speed to transmit at |
| 991 | * | 1125 | * |
| 992 | * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet | 1126 | * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet to every device |
| 993 | * to every device which is listening to the specified channel. The kernel | 1127 | * which is listening to the specified channel. The kernel writes either &fw_cdev_event_response |
| 994 | * writes an &fw_cdev_event_response event which indicates success or failure of | 1128 | * event or &fw_cdev_event_response2 event which indicates success or failure of the transmission. |
| 995 | * the transmission. | ||
| 996 | */ | 1129 | */ |
| 997 | struct fw_cdev_send_stream_packet { | 1130 | struct fw_cdev_send_stream_packet { |
| 998 | 	__u32 length; | 1131 | 	__u32 length; |
| ... | @@ -1011,8 +1144,8 @@ struct fw_cdev_send_stream_packet { | ... | @@ -1011,8 +1144,8 @@ struct fw_cdev_send_stream_packet { |
| 1011 | * @data:	First and second quadlet of the PHY packet | 1144 | * @data:	First and second quadlet of the PHY packet |
| 1012 | * @generation:	The bus generation where packet is valid | 1145 | * @generation:	The bus generation where packet is valid |
| 1013 | * | 1146 | * |
| 1014 | * The %FW_CDEV_IOC_SEND_PHY_PACKET ioctl sends a PHY packet to all nodes | 1147 | * The %FW_CDEV_IOC_SEND_PHY_PACKET ioctl sends a PHY packet to all nodes on the same card as this |
| 1015 | * on the same card as this device. After transmission, an | 1148 | * device. After transmission, either %FW_CDEV_EVENT_PHY_PACKET_SENT event or |
| 1016 | * %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated. | 1149 | * %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated. |
| 1017 | * | 1150 | * |
| 1018 | * The payload @data\[\] shall be specified in host byte order. Usually, | 1151 | * The payload @data\[\] shall be specified in host byte order. Usually, |
| ... | @@ -1031,8 +1164,9 @@ struct fw_cdev_send_phy_packet { | ... | @@ -1031,8 +1164,9 @@ struct fw_cdev_send_phy_packet { |
| 1031 | * struct fw_cdev_receive_phy_packets - start reception of PHY packets | 1164 | * struct fw_cdev_receive_phy_packets - start reception of PHY packets |
| 1032 | * @closure: Passed back to userspace in phy packet events | 1165 | * @closure: Passed back to userspace in phy packet events |
| 1033 | * | 1166 | * |
| 1034 | * This ioctl activates issuing of %FW_CDEV_EVENT_PHY_PACKET_RECEIVED due to | 1167 | * This ioctl activates issuing of either %FW_CDEV_EVENT_PHY_PACKET_RECEIVED or |
| 1035 | * incoming PHY packets from any node on the same bus as the device. | 1168 | * %FW_CDEV_EVENT_PHY_PACKET_RECEIVED2 due to incoming PHY packets from any node on the same bus |
| 1169 | * as the device. | ||
| 1036 | * | 1170 | * |
| 1037 | * The ioctl is only permitted on device files which represent a local node. | 1171 | * The ioctl is only permitted on device files which represent a local node. |
| 1038 | */ | 1172 | */ |
lib/libc/include/any-linux-any/linux/fs.h+89-1| ... | @@ -60,6 +60,24 @@ struct fstrim_range { | ... | @@ -60,6 +60,24 @@ struct fstrim_range { |
| 60 | 	__u64 minlen; | 60 | 	__u64 minlen; |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | /* | ||
| 64 | * We include a length field because some filesystems (vfat) have an identifier | ||
| 65 | * that we do want to expose as a UUID, but doesn't have the standard length. | ||
| 66 | * | ||
| 67 | * We use a fixed size buffer beacuse this interface will, by fiat, never | ||
| 68 | * support "UUIDs" longer than 16 bytes; we don't want to force all downstream | ||
| 69 | * users to have to deal with that. | ||
| 70 | */ | ||
| 71 | struct fsuuid2 { | ||
| 72 | 	__u8	len; | ||
| 73 | 	__u8	uuid[16]; | ||
| 74 | }; | ||
| 75 | |||
| 76 | struct fs_sysfs_path { | ||
| 77 | 	__u8			len; | ||
| 78 | 	__u8			name[128]; | ||
| 79 | }; | ||
| 80 | |||
| 63 | /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ | 81 | /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ |
| 64 | #define FILE_DEDUPE_RANGE_SAME		0 | 82 | #define FILE_DEDUPE_RANGE_SAME		0 |
| 65 | #define FILE_DEDUPE_RANGE_DIFFERS	1 | 83 | #define FILE_DEDUPE_RANGE_DIFFERS	1 |
| ... | @@ -211,6 +229,13 @@ struct fsxattr { | ... | @@ -211,6 +229,13 @@ struct fsxattr { |
| 211 | #define FS_IOC_FSSETXATTR		_IOW('X', 32, struct fsxattr) | 229 | #define FS_IOC_FSSETXATTR		_IOW('X', 32, struct fsxattr) |
| 212 | #define FS_IOC_GETFSLABEL		_IOR(0x94, 49, char[FSLABEL_MAX]) | 230 | #define FS_IOC_GETFSLABEL		_IOR(0x94, 49, char[FSLABEL_MAX]) |
| 213 | #define FS_IOC_SETFSLABEL		_IOW(0x94, 50, char[FSLABEL_MAX]) | 231 | #define FS_IOC_SETFSLABEL		_IOW(0x94, 50, char[FSLABEL_MAX]) |
| 232 | /* Returns the external filesystem UUID, the same one blkid returns */ | ||
| 233 | #define FS_IOC_GETFSUUID		_IOR(0x15, 0, struct fsuuid2) | ||
| 234 | /* | ||
| 235 | * Returns the path component under /sys/fs/ that refers to this filesystem; | ||
| 236 | * also /sys/kernel/debug/ for filesystems with debugfs exports | ||
| 237 | */ | ||
| 238 | #define FS_IOC_GETFSSYSFSPATH		_IOR(0x15, 1, struct fs_sysfs_path) | ||
| 214 | 239 | ||
| 215 | /* | 240 | /* |
| 216 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) | 241 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) |
| ... | @@ -297,8 +322,71 @@ typedef int __bitwise __kernel_rwf_t; | ... | @@ -297,8 +322,71 @@ typedef int __bitwise __kernel_rwf_t; |
| 297 | /* per-IO O_APPEND */ | 322 | /* per-IO O_APPEND */ |
| 298 | #define RWF_APPEND	((__kernel_rwf_t)0x00000010) | 323 | #define RWF_APPEND	((__kernel_rwf_t)0x00000010) |
| 299 | 324 | ||
| 325 | /* per-IO negation of O_APPEND */ | ||
| 326 | #define RWF_NOAPPEND	((__kernel_rwf_t)0x00000020) | ||
| 327 | |||
| 300 | /* mask of flags supported by the kernel */ | 328 | /* mask of flags supported by the kernel */ |
| 301 | #define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ | 329 | #define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ |
| 302 | 			 RWF_APPEND) | 330 | 			 RWF_APPEND | RWF_NOAPPEND) |
| 331 | |||
| 332 | /* Pagemap ioctl */ | ||
| 333 | #define PAGEMAP_SCAN	_IOWR('f', 16, struct pm_scan_arg) | ||
| 334 | |||
| 335 | /* Bitmasks provided in pm_scan_args masks and reported in page_region.categories. */ | ||
| 336 | #define PAGE_IS_WPALLOWED	(1 << 0) | ||
| 337 | #define PAGE_IS_WRITTEN		(1 << 1) | ||
| 338 | #define PAGE_IS_FILE		(1 << 2) | ||
| 339 | #define PAGE_IS_PRESENT		(1 << 3) | ||
| 340 | #define PAGE_IS_SWAPPED		(1 << 4) | ||
| 341 | #define PAGE_IS_PFNZERO		(1 << 5) | ||
| 342 | #define PAGE_IS_HUGE		(1 << 6) | ||
| 343 | #define PAGE_IS_SOFT_DIRTY	(1 << 7) | ||
| 344 | |||
| 345 | /* | ||
| 346 | * struct page_region - Page region with flags | ||
| 347 | * @start:	Start of the region | ||
| 348 | * @end:	End of the region (exclusive) | ||
| 349 | * @categories:	PAGE_IS_* category bitmask for the region | ||
| 350 | */ | ||
| 351 | struct page_region { | ||
| 352 | 	__u64 start; | ||
| 353 | 	__u64 end; | ||
| 354 | 	__u64 categories; | ||
| 355 | }; | ||
| 356 | |||
| 357 | /* Flags for PAGEMAP_SCAN ioctl */ | ||
| 358 | #define PM_SCAN_WP_MATCHING	(1 << 0)	/* Write protect the pages matched. */ | ||
| 359 | #define PM_SCAN_CHECK_WPASYNC	(1 << 1)	/* Abort the scan when a non-WP-enabled page is found. */ | ||
| 360 | |||
| 361 | /* | ||
| 362 | * struct pm_scan_arg - Pagemap ioctl argument | ||
| 363 | * @size:		Size of the structure | ||
| 364 | * @flags:		Flags for the IOCTL | ||
| 365 | * @start:		Starting address of the region | ||
| 366 | * @end:		Ending address of the region | ||
| 367 | * @walk_end		Address where the scan stopped (written by kernel). | ||
| 368 | *			walk_end == end (address tags cleared) informs that the scan completed on entire range. | ||
| 369 | * @vec:		Address of page_region struct array for output | ||
| 370 | * @vec_len:		Length of the page_region struct array | ||
| 371 | * @max_pages:		Optional limit for number of returned pages (0 = disabled) | ||
| 372 | * @category_inverted:	PAGE_IS_* categories which values match if 0 instead of 1 | ||
| 373 | * @category_mask:	Skip pages for which any category doesn't match | ||
| 374 | * @category_anyof_mask: Skip pages for which no category matches | ||
| 375 | * @return_mask:	PAGE_IS_* categories that are to be reported in `page_region`s returned | ||
| 376 | */ | ||
| 377 | struct pm_scan_arg { | ||
| 378 | 	__u64 size; | ||
| 379 | 	__u64 flags; | ||
| 380 | 	__u64 start; | ||
| 381 | 	__u64 end; | ||
| 382 | 	__u64 walk_end; | ||
| 383 | 	__u64 vec; | ||
| 384 | 	__u64 vec_len; | ||
| 385 | 	__u64 max_pages; | ||
| 386 | 	__u64 category_inverted; | ||
| 387 | 	__u64 category_mask; | ||
| 388 | 	__u64 category_anyof_mask; | ||
| 389 | 	__u64 return_mask; | ||
| 390 | }; | ||
| 303 | 391 | ||
| 304 | #endif /* _LINUX_FS_H */ | 392 | #endif /* _LINUX_FS_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/fscrypt.h+2-1| ... | @@ -71,7 +71,8 @@ struct fscrypt_policy_v2 { | ... | @@ -71,7 +71,8 @@ struct fscrypt_policy_v2 { |
| 71 | 	__u8 contents_encryption_mode; | 71 | 	__u8 contents_encryption_mode; |
| 72 | 	__u8 filenames_encryption_mode; | 72 | 	__u8 filenames_encryption_mode; |
| 73 | 	__u8 flags; | 73 | 	__u8 flags; |
| 74 | 	__u8 __reserved[4]; | 74 | 	__u8 log2_data_unit_size; |
| 75 | 	__u8 __reserved[3]; | ||
| 75 | 	__u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; | 76 | 	__u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; |
| 76 | }; | 77 | }; |
| 77 | 78 |
lib/libc/include/any-linux-any/linux/fsi.h+10| ... | @@ -59,6 +59,16 @@ struct scom_access { | ... | @@ -59,6 +59,16 @@ struct scom_access { |
| 59 | * /dev/sbefifo* ioctl interface | 59 | * /dev/sbefifo* ioctl interface |
| 60 | */ | 60 | */ |
| 61 | 61 | ||
| 62 | /** | ||
| 63 | * FSI_SBEFIFO_CMD_TIMEOUT sets the timeout for writing data to the SBEFIFO. | ||
| 64 | * | ||
| 65 | * The command timeout is specified in seconds. The minimum value of command | ||
| 66 | * timeout is 1 seconds (default) and the maximum value of command timeout is | ||
| 67 | * 120 seconds. A command timeout of 0 will reset the value to the default of | ||
| 68 | * 1 seconds. | ||
| 69 | */ | ||
| 70 | #define FSI_SBEFIFO_CMD_TIMEOUT_SECONDS		_IOW('s', 0x01, __u32) | ||
| 71 | |||
| 62 | /** | 72 | /** |
| 63 | * FSI_SBEFIFO_READ_TIMEOUT sets the read timeout for response from SBE. | 73 | * FSI_SBEFIFO_READ_TIMEOUT sets the read timeout for response from SBE. |
| 64 | * | 74 | * |
lib/libc/include/any-linux-any/linux/fuse.h+99-3| ... | @@ -206,6 +206,17 @@ | ... | @@ -206,6 +206,17 @@ |
| 206 | * - add extension header | 206 | * - add extension header |
| 207 | * - add FUSE_EXT_GROUPS | 207 | * - add FUSE_EXT_GROUPS |
| 208 | * - add FUSE_CREATE_SUPP_GROUP | 208 | * - add FUSE_CREATE_SUPP_GROUP |
| 209 | * - add FUSE_HAS_EXPIRE_ONLY | ||
| 210 | * | ||
| 211 | * 7.39 | ||
| 212 | * - add FUSE_DIRECT_IO_ALLOW_MMAP | ||
| 213 | * - add FUSE_STATX and related structures | ||
| 214 | * | ||
| 215 | * 7.40 | ||
| 216 | * - add max_stack_depth to fuse_init_out, add FUSE_PASSTHROUGH init flag | ||
| 217 | * - add backing_id to fuse_open_out, add FOPEN_PASSTHROUGH open flag | ||
| 218 | * - add FUSE_NO_EXPORT_SUPPORT init flag | ||
| 219 | * - add FUSE_NOTIFY_RESEND, add FUSE_HAS_RESEND init flag | ||
| 209 | */ | 220 | */ |
| 210 | 221 | ||
| 211 | #ifndef _LINUX_FUSE_H | 222 | #ifndef _LINUX_FUSE_H |
| ... | @@ -237,7 +248,7 @@ | ... | @@ -237,7 +248,7 @@ |
| 237 | #define FUSE_KERNEL_VERSION 7 | 248 | #define FUSE_KERNEL_VERSION 7 |
| 238 | 249 | ||
| 239 | /** Minor version number of this interface */ | 250 | /** Minor version number of this interface */ |
| 240 | #define FUSE_KERNEL_MINOR_VERSION 38 | 251 | #define FUSE_KERNEL_MINOR_VERSION 40 |
| 241 | 252 | ||
| 242 | /** The node ID of the root inode */ | 253 | /** The node ID of the root inode */ |
| 243 | #define FUSE_ROOT_ID 1 | 254 | #define FUSE_ROOT_ID 1 |
| ... | @@ -264,6 +275,40 @@ struct fuse_attr { | ... | @@ -264,6 +275,40 @@ struct fuse_attr { |
| 264 | 	uint32_t	flags; | 275 | 	uint32_t	flags; |
| 265 | }; | 276 | }; |
| 266 | 277 | ||
| 278 | /* | ||
| 279 | * The following structures are bit-for-bit compatible with the statx(2) ABI in | ||
| 280 | * Linux. | ||
| 281 | */ | ||
| 282 | struct fuse_sx_time { | ||
| 283 | 	int64_t		tv_sec; | ||
| 284 | 	uint32_t	tv_nsec; | ||
| 285 | 	int32_t		__reserved; | ||
| 286 | }; | ||
| 287 | |||
| 288 | struct fuse_statx { | ||
| 289 | 	uint32_t	mask; | ||
| 290 | 	uint32_t	blksize; | ||
| 291 | 	uint64_t	attributes; | ||
| 292 | 	uint32_t	nlink; | ||
| 293 | 	uint32_t	uid; | ||
| 294 | 	uint32_t	gid; | ||
| 295 | 	uint16_t	mode; | ||
| 296 | 	uint16_t	__spare0[1]; | ||
| 297 | 	uint64_t	ino; | ||
| 298 | 	uint64_t	size; | ||
| 299 | 	uint64_t	blocks; | ||
| 300 | 	uint64_t	attributes_mask; | ||
| 301 | 	struct fuse_sx_time	atime; | ||
| 302 | 	struct fuse_sx_time	btime; | ||
| 303 | 	struct fuse_sx_time	ctime; | ||
| 304 | 	struct fuse_sx_time	mtime; | ||
| 305 | 	uint32_t	rdev_major; | ||
| 306 | 	uint32_t	rdev_minor; | ||
| 307 | 	uint32_t	dev_major; | ||
| 308 | 	uint32_t	dev_minor; | ||
| 309 | 	uint64_t	__spare2[14]; | ||
| 310 | }; | ||
| 311 | |||
| 267 | struct fuse_kstatfs { | 312 | struct fuse_kstatfs { |
| 268 | 	uint64_t	blocks; | 313 | 	uint64_t	blocks; |
| 269 | 	uint64_t	bfree; | 314 | 	uint64_t	bfree; |
| ... | @@ -310,6 +355,7 @@ struct fuse_file_lock { | ... | @@ -310,6 +355,7 @@ struct fuse_file_lock { |
| 310 | * FOPEN_STREAM: the file is stream-like (no file position at all) | 355 | * FOPEN_STREAM: the file is stream-like (no file position at all) |
| 311 | * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE) | 356 | * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE) |
| 312 | * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode | 357 | * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode |
| 358 | * FOPEN_PASSTHROUGH: passthrough read/write io for this open file | ||
| 313 | */ | 359 | */ |
| 314 | #define FOPEN_DIRECT_IO		(1 << 0) | 360 | #define FOPEN_DIRECT_IO		(1 << 0) |
| 315 | #define FOPEN_KEEP_CACHE	(1 << 1) | 361 | #define FOPEN_KEEP_CACHE	(1 << 1) |
| ... | @@ -318,6 +364,7 @@ struct fuse_file_lock { | ... | @@ -318,6 +364,7 @@ struct fuse_file_lock { |
| 318 | #define FOPEN_STREAM		(1 << 4) | 364 | #define FOPEN_STREAM		(1 << 4) |
| 319 | #define FOPEN_NOFLUSH		(1 << 5) | 365 | #define FOPEN_NOFLUSH		(1 << 5) |
| 320 | #define FOPEN_PARALLEL_DIRECT_WRITES	(1 << 6) | 366 | #define FOPEN_PARALLEL_DIRECT_WRITES	(1 << 6) |
| 367 | #define FOPEN_PASSTHROUGH	(1 << 7) | ||
| 321 | 368 | ||
| 322 | /** | 369 | /** |
| 323 | * INIT request/reply flags | 370 | * INIT request/reply flags |
| ... | @@ -365,6 +412,11 @@ struct fuse_file_lock { | ... | @@ -365,6 +412,11 @@ struct fuse_file_lock { |
| 365 | * FUSE_HAS_INODE_DAX: use per inode DAX | 412 | * FUSE_HAS_INODE_DAX: use per inode DAX |
| 366 | * FUSE_CREATE_SUPP_GROUP: add supplementary group info to create, mkdir, | 413 | * FUSE_CREATE_SUPP_GROUP: add supplementary group info to create, mkdir, |
| 367 | *			symlink and mknod (single group that matches parent) | 414 | *			symlink and mknod (single group that matches parent) |
| 415 | * FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation | ||
| 416 | * FUSE_DIRECT_IO_ALLOW_MMAP: allow shared mmap in FOPEN_DIRECT_IO mode. | ||
| 417 | * FUSE_NO_EXPORT_SUPPORT: explicitly disable export support | ||
| 418 | * FUSE_HAS_RESEND: kernel supports resending pending requests, and the high bit | ||
| 419 | *		 of the request ID indicates resend requests | ||
| 368 | */ | 420 | */ |
| 369 | #define FUSE_ASYNC_READ		(1 << 0) | 421 | #define FUSE_ASYNC_READ		(1 << 0) |
| 370 | #define FUSE_POSIX_LOCKS	(1 << 1) | 422 | #define FUSE_POSIX_LOCKS	(1 << 1) |
| ... | @@ -402,6 +454,14 @@ struct fuse_file_lock { | ... | @@ -402,6 +454,14 @@ struct fuse_file_lock { |
| 402 | #define FUSE_SECURITY_CTX	(1ULL << 32) | 454 | #define FUSE_SECURITY_CTX	(1ULL << 32) |
| 403 | #define FUSE_HAS_INODE_DAX	(1ULL << 33) | 455 | #define FUSE_HAS_INODE_DAX	(1ULL << 33) |
| 404 | #define FUSE_CREATE_SUPP_GROUP	(1ULL << 34) | 456 | #define FUSE_CREATE_SUPP_GROUP	(1ULL << 34) |
| 457 | #define FUSE_HAS_EXPIRE_ONLY	(1ULL << 35) | ||
| 458 | #define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36) | ||
| 459 | #define FUSE_PASSTHROUGH	(1ULL << 37) | ||
| 460 | #define FUSE_NO_EXPORT_SUPPORT	(1ULL << 38) | ||
| 461 | #define FUSE_HAS_RESEND		(1ULL << 39) | ||
| 462 | |||
| 463 | /* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */ | ||
| 464 | #define FUSE_DIRECT_IO_RELAX	FUSE_DIRECT_IO_ALLOW_MMAP | ||
| 405 | 465 | ||
| 406 | /** | 466 | /** |
| 407 | * CUSE INIT request/reply flags | 467 | * CUSE INIT request/reply flags |
| ... | @@ -568,6 +628,7 @@ enum fuse_opcode { | ... | @@ -568,6 +628,7 @@ enum fuse_opcode { |
| 568 | 	FUSE_REMOVEMAPPING	= 49, | 628 | 	FUSE_REMOVEMAPPING	= 49, |
| 569 | 	FUSE_SYNCFS		= 50, | 629 | 	FUSE_SYNCFS		= 50, |
| 570 | 	FUSE_TMPFILE		= 51, | 630 | 	FUSE_TMPFILE		= 51, |
| 631 | 	FUSE_STATX		= 52, | ||
| 571 | 632 | ||
| 572 | 	/* CUSE specific operations */ | 633 | 	/* CUSE specific operations */ |
| 573 | 	CUSE_INIT		= 4096, | 634 | 	CUSE_INIT		= 4096, |
| ... | @@ -584,6 +645,7 @@ enum fuse_notify_code { | ... | @@ -584,6 +645,7 @@ enum fuse_notify_code { |
| 584 | 	FUSE_NOTIFY_STORE = 4, | 645 | 	FUSE_NOTIFY_STORE = 4, |
| 585 | 	FUSE_NOTIFY_RETRIEVE = 5, | 646 | 	FUSE_NOTIFY_RETRIEVE = 5, |
| 586 | 	FUSE_NOTIFY_DELETE = 6, | 647 | 	FUSE_NOTIFY_DELETE = 6, |
| 648 | 	FUSE_NOTIFY_RESEND = 7, | ||
| 587 | 	FUSE_NOTIFY_CODE_MAX, | 649 | 	FUSE_NOTIFY_CODE_MAX, |
| 588 | }; | 650 | }; |
| 589 | 651 | ||
| ... | @@ -632,6 +694,22 @@ struct fuse_attr_out { | ... | @@ -632,6 +694,22 @@ struct fuse_attr_out { |
| 632 | 	struct fuse_attr attr; | 694 | 	struct fuse_attr attr; |
| 633 | }; | 695 | }; |
| 634 | 696 | ||
| 697 | struct fuse_statx_in { | ||
| 698 | 	uint32_t	getattr_flags; | ||
| 699 | 	uint32_t	reserved; | ||
| 700 | 	uint64_t	fh; | ||
| 701 | 	uint32_t	sx_flags; | ||
| 702 | 	uint32_t	sx_mask; | ||
| 703 | }; | ||
| 704 | |||
| 705 | struct fuse_statx_out { | ||
| 706 | 	uint64_t	attr_valid;	/* Cache timeout for the attributes */ | ||
| 707 | 	uint32_t	attr_valid_nsec; | ||
| 708 | 	uint32_t	flags; | ||
| 709 | 	uint64_t	spare[2]; | ||
| 710 | 	struct fuse_statx stat; | ||
| 711 | }; | ||
| 712 | |||
| 635 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | 713 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 |
| 636 | 714 | ||
| 637 | struct fuse_mknod_in { | 715 | struct fuse_mknod_in { |
| ... | @@ -694,7 +772,7 @@ struct fuse_create_in { | ... | @@ -694,7 +772,7 @@ struct fuse_create_in { |
| 694 | struct fuse_open_out { | 772 | struct fuse_open_out { |
| 695 | 	uint64_t	fh; | 773 | 	uint64_t	fh; |
| 696 | 	uint32_t	open_flags; | 774 | 	uint32_t	open_flags; |
| 697 | 	uint32_t	padding; | 775 | 	int32_t		backing_id; |
| 698 | }; | 776 | }; |
| 699 | 777 | ||
| 700 | struct fuse_release_in { | 778 | struct fuse_release_in { |
| ... | @@ -810,7 +888,8 @@ struct fuse_init_out { | ... | @@ -810,7 +888,8 @@ struct fuse_init_out { |
| 810 | 	uint16_t	max_pages; | 888 | 	uint16_t	max_pages; |
| 811 | 	uint16_t	map_alignment; | 889 | 	uint16_t	map_alignment; |
| 812 | 	uint32_t	flags2; | 890 | 	uint32_t	flags2; |
| 813 | 	uint32_t	unused[7]; | 891 | 	uint32_t	max_stack_depth; |
| 892 | 	uint32_t	unused[6]; | ||
| 814 | }; | 893 | }; |
| 815 | 894 | ||
| 816 | #define CUSE_INIT_INFO_MAX 4096 | 895 | #define CUSE_INIT_INFO_MAX 4096 |
| ... | @@ -893,6 +972,14 @@ struct fuse_fallocate_in { | ... | @@ -893,6 +972,14 @@ struct fuse_fallocate_in { |
| 893 | 	uint32_t	padding; | 972 | 	uint32_t	padding; |
| 894 | }; | 973 | }; |
| 895 | 974 | ||
| 975 | /** | ||
| 976 | * FUSE request unique ID flag | ||
| 977 | * | ||
| 978 | * Indicates whether this is a resend request. The receiver should handle this | ||
| 979 | * request accordingly. | ||
| 980 | */ | ||
| 981 | #define FUSE_UNIQUE_RESEND (1ULL << 63) | ||
| 982 | |||
| 896 | struct fuse_in_header { | 983 | struct fuse_in_header { |
| 897 | 	uint32_t	len; | 984 | 	uint32_t	len; |
| 898 | 	uint32_t	opcode; | 985 | 	uint32_t	opcode; |
| ... | @@ -982,9 +1069,18 @@ struct fuse_notify_retrieve_in { | ... | @@ -982,9 +1069,18 @@ struct fuse_notify_retrieve_in { |
| 982 | 	uint64_t	dummy4; | 1069 | 	uint64_t	dummy4; |
| 983 | }; | 1070 | }; |
| 984 | 1071 | ||
| 1072 | struct fuse_backing_map { | ||
| 1073 | 	int32_t		fd; | ||
| 1074 | 	uint32_t	flags; | ||
| 1075 | 	uint64_t	padding; | ||
| 1076 | }; | ||
| 1077 | |||
| 985 | /* Device ioctls: */ | 1078 | /* Device ioctls: */ |
| 986 | #define FUSE_DEV_IOC_MAGIC		229 | 1079 | #define FUSE_DEV_IOC_MAGIC		229 |
| 987 | #define FUSE_DEV_IOC_CLONE		_IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) | 1080 | #define FUSE_DEV_IOC_CLONE		_IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) |
| 1081 | #define FUSE_DEV_IOC_BACKING_OPEN	_IOW(FUSE_DEV_IOC_MAGIC, 1, \ | ||
| 1082 | 					 struct fuse_backing_map) | ||
| 1083 | #define FUSE_DEV_IOC_BACKING_CLOSE	_IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t) | ||
| 988 | 1084 | ||
| 989 | struct fuse_lseek_in { | 1085 | struct fuse_lseek_in { |
| 990 | 	uint64_t	fh; | 1086 | 	uint64_t	fh; |
lib/libc/include/any-linux-any/linux/futex.h+28-3| ... | @@ -44,10 +44,35 @@ | ... | @@ -44,10 +44,35 @@ |
| 44 | 					 FUTEX_PRIVATE_FLAG) | 44 | 					 FUTEX_PRIVATE_FLAG) |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * Flags to specify the bit length of the futex word for futex2 syscalls. | 47 | * Flags for futex2 syscalls. |
| 48 | * Currently, only 32 is supported. | 48 | * |
| 49 | * NOTE: these are not pure flags, they can also be seen as: | ||
| 50 | * | ||
| 51 | * union { | ||
| 52 | * u32 flags; | ||
| 53 | * struct { | ||
| 54 | * u32 size : 2, | ||
| 55 | * numa : 1, | ||
| 56 | * : 4, | ||
| 57 | * private : 1; | ||
| 58 | * }; | ||
| 59 | * }; | ||
| 49 | */ | 60 | */ |
| 50 | #define FUTEX_32		2 | 61 | #define FUTEX2_SIZE_U8		0x00 |
| 62 | #define FUTEX2_SIZE_U16		0x01 | ||
| 63 | #define FUTEX2_SIZE_U32		0x02 | ||
| 64 | #define FUTEX2_SIZE_U64		0x03 | ||
| 65 | #define FUTEX2_NUMA		0x04 | ||
| 66 | 			/*	0x08 */ | ||
| 67 | 			/*	0x10 */ | ||
| 68 | 			/*	0x20 */ | ||
| 69 | 			/*	0x40 */ | ||
| 70 | #define FUTEX2_PRIVATE		FUTEX_PRIVATE_FLAG | ||
| 71 | |||
| 72 | #define FUTEX2_SIZE_MASK	0x03 | ||
| 73 | |||
| 74 | /* do not use */ | ||
| 75 | #define FUTEX_32		FUTEX2_SIZE_U32 /* historical accident :-( */ | ||
| 51 | 76 | ||
| 52 | /* | 77 | /* |
| 53 | * Max numbers of elements in a futex_waitv array | 78 | * Max numbers of elements in a futex_waitv array |
lib/libc/include/any-linux-any/linux/gpio.h+33-30| ... | @@ -67,7 +67,7 @@ struct gpiochip_info { | ... | @@ -67,7 +67,7 @@ struct gpiochip_info { |
| 67 | * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled | 67 | * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled |
| 68 | * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps | 68 | * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps |
| 69 | * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE: line events contain timestamps from | 69 | * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE: line events contain timestamps from |
| 70 | * hardware timestamp engine | 70 | * the hardware timestamping engine (HTE) subsystem |
| 71 | */ | 71 | */ |
| 72 | enum gpio_v2_line_flag { | 72 | enum gpio_v2_line_flag { |
| 73 | 	GPIO_V2_LINE_FLAG_USED			= _BITULL(0), | 73 | 	GPIO_V2_LINE_FLAG_USED			= _BITULL(0), |
| ... | @@ -88,10 +88,10 @@ enum gpio_v2_line_flag { | ... | @@ -88,10 +88,10 @@ enum gpio_v2_line_flag { |
| 88 | /** | 88 | /** |
| 89 | * struct gpio_v2_line_values - Values of GPIO lines | 89 | * struct gpio_v2_line_values - Values of GPIO lines |
| 90 | * @bits: a bitmap containing the value of the lines, set to 1 for active | 90 | * @bits: a bitmap containing the value of the lines, set to 1 for active |
| 91 | * and 0 for inactive. | 91 | * and 0 for inactive |
| 92 | * @mask: a bitmap identifying the lines to get or set, with each bit | 92 | * @mask: a bitmap identifying the lines to get or set, with each bit |
| 93 | * number corresponding to the index into &struct | 93 | * number corresponding to the index into &struct |
| 94 | * gpio_v2_line_request.offsets. | 94 | * gpio_v2_line_request.offsets |
| 95 | */ | 95 | */ |
| 96 | struct gpio_v2_line_values { | 96 | struct gpio_v2_line_values { |
| 97 | 	__aligned_u64 bits; | 97 | 	__aligned_u64 bits; |
| ... | @@ -123,7 +123,7 @@ enum gpio_v2_line_attr_id { | ... | @@ -123,7 +123,7 @@ enum gpio_v2_line_attr_id { |
| 123 | * @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap | 123 | * @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap |
| 124 | * containing the values to which the lines will be set, with each bit | 124 | * containing the values to which the lines will be set, with each bit |
| 125 | * number corresponding to the index into &struct | 125 | * number corresponding to the index into &struct |
| 126 | * gpio_v2_line_request.offsets. | 126 | * gpio_v2_line_request.offsets |
| 127 | * @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the | 127 | * @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the |
| 128 | * desired debounce period, in microseconds | 128 | * desired debounce period, in microseconds |
| 129 | */ | 129 | */ |
| ... | @@ -143,7 +143,7 @@ struct gpio_v2_line_attribute { | ... | @@ -143,7 +143,7 @@ struct gpio_v2_line_attribute { |
| 143 | * @attr: the configurable attribute | 143 | * @attr: the configurable attribute |
| 144 | * @mask: a bitmap identifying the lines to which the attribute applies, | 144 | * @mask: a bitmap identifying the lines to which the attribute applies, |
| 145 | * with each bit number corresponding to the index into &struct | 145 | * with each bit number corresponding to the index into &struct |
| 146 | * gpio_v2_line_request.offsets. | 146 | * gpio_v2_line_request.offsets |
| 147 | */ | 147 | */ |
| 148 | struct gpio_v2_line_config_attribute { | 148 | struct gpio_v2_line_config_attribute { |
| 149 | 	struct gpio_v2_line_attribute attr; | 149 | 	struct gpio_v2_line_attribute attr; |
| ... | @@ -178,7 +178,7 @@ struct gpio_v2_line_config { | ... | @@ -178,7 +178,7 @@ struct gpio_v2_line_config { |
| 178 | * associated GPIO chip | 178 | * associated GPIO chip |
| 179 | * @consumer: a desired consumer label for the selected GPIO lines such as | 179 | * @consumer: a desired consumer label for the selected GPIO lines such as |
| 180 | * "my-bitbanged-relay" | 180 | * "my-bitbanged-relay" |
| 181 | * @config: requested configuration for the lines. | 181 | * @config: requested configuration for the lines |
| 182 | * @num_lines: number of lines requested in this request, i.e. the number | 182 | * @num_lines: number of lines requested in this request, i.e. the number |
| 183 | * of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to | 183 | * of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to |
| 184 | * request a single line | 184 | * request a single line |
| ... | @@ -189,9 +189,8 @@ struct gpio_v2_line_config { | ... | @@ -189,9 +189,8 @@ struct gpio_v2_line_config { |
| 189 | * buffer. If this field is zero then the buffer size defaults to a minimum | 189 | * buffer. If this field is zero then the buffer size defaults to a minimum |
| 190 | * of @num_lines * 16. | 190 | * of @num_lines * 16. |
| 191 | * @padding: reserved for future use and must be zero filled | 191 | * @padding: reserved for future use and must be zero filled |
| 192 | * @fd: if successful this field will contain a valid anonymous file handle | 192 | * @fd: after a successful %GPIO_V2_GET_LINE_IOCTL operation, contains |
| 193 | * after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means | 193 | * a valid anonymous file descriptor representing the request |
| 194 | * error | ||
| 195 | */ | 194 | */ |
| 196 | struct gpio_v2_line_request { | 195 | struct gpio_v2_line_request { |
| 197 | 	__u32 offsets[GPIO_V2_LINES_MAX]; | 196 | 	__u32 offsets[GPIO_V2_LINES_MAX]; |
| ... | @@ -217,7 +216,7 @@ struct gpio_v2_line_request { | ... | @@ -217,7 +216,7 @@ struct gpio_v2_line_request { |
| 217 | * @num_attrs: the number of attributes in @attrs | 216 | * @num_attrs: the number of attributes in @attrs |
| 218 | * @flags: flags for this GPIO line, with values from &enum | 217 | * @flags: flags for this GPIO line, with values from &enum |
| 219 | * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW, | 218 | * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW, |
| 220 | * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. | 219 | * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together |
| 221 | * @attrs: the configuration attributes associated with the line | 220 | * @attrs: the configuration attributes associated with the line |
| 222 | * @padding: reserved for future use | 221 | * @padding: reserved for future use |
| 223 | */ | 222 | */ |
| ... | @@ -274,7 +273,7 @@ enum gpio_v2_line_event_id { | ... | @@ -274,7 +273,7 @@ enum gpio_v2_line_event_id { |
| 274 | 273 | ||
| 275 | /** | 274 | /** |
| 276 | * struct gpio_v2_line_event - The actual event being pushed to userspace | 275 | * struct gpio_v2_line_event - The actual event being pushed to userspace |
| 277 | * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds. | 276 | * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds |
| 278 | * @id: event identifier with value from &enum gpio_v2_line_event_id | 277 | * @id: event identifier with value from &enum gpio_v2_line_event_id |
| 279 | * @offset: the offset of the line that triggered the event | 278 | * @offset: the offset of the line that triggered the event |
| 280 | * @seqno: the sequence number for this event in the sequence of events for | 279 | * @seqno: the sequence number for this event in the sequence of events for |
| ... | @@ -289,6 +288,10 @@ enum gpio_v2_line_event_id { | ... | @@ -289,6 +288,10 @@ enum gpio_v2_line_event_id { |
| 289 | * | 288 | * |
| 290 | * If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag is set then the | 289 | * If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag is set then the |
| 291 | * @timestamp_ns is read from %CLOCK_REALTIME. | 290 | * @timestamp_ns is read from %CLOCK_REALTIME. |
| 291 | * | ||
| 292 | * If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE flag is set then the | ||
| 293 | * @timestamp_ns is provided by the hardware timestamping engine (HTE) | ||
| 294 | * subsystem. | ||
| 292 | */ | 295 | */ |
| 293 | struct gpio_v2_line_event { | 296 | struct gpio_v2_line_event { |
| 294 | 	__aligned_u64 timestamp_ns; | 297 | 	__aligned_u64 timestamp_ns; |
| ... | @@ -330,7 +333,7 @@ struct gpio_v2_line_event { | ... | @@ -330,7 +333,7 @@ struct gpio_v2_line_event { |
| 330 | * also be empty if the consumer doesn't set this up | 333 | * also be empty if the consumer doesn't set this up |
| 331 | * | 334 | * |
| 332 | * Note: This struct is part of ABI v1 and is deprecated. | 335 | * Note: This struct is part of ABI v1 and is deprecated. |
| 333 | * Use &struct gpio_v2_line_info instead. | 336 | * Use ABI v2 and &struct gpio_v2_line_info instead. |
| 334 | */ | 337 | */ |
| 335 | struct gpioline_info { | 338 | struct gpioline_info { |
| 336 | 	__u32 line_offset; | 339 | 	__u32 line_offset; |
| ... | @@ -365,7 +368,7 @@ enum { | ... | @@ -365,7 +368,7 @@ enum { |
| 365 | * at the end of the structure on 64-bit architectures. | 368 | * at the end of the structure on 64-bit architectures. |
| 366 | * | 369 | * |
| 367 | * Note: This struct is part of ABI v1 and is deprecated. | 370 | * Note: This struct is part of ABI v1 and is deprecated. |
| 368 | * Use &struct gpio_v2_line_info_changed instead. | 371 | * Use ABI v2 and &struct gpio_v2_line_info_changed instead. |
| 369 | */ | 372 | */ |
| 370 | struct gpioline_info_changed { | 373 | struct gpioline_info_changed { |
| 371 | 	struct gpioline_info info; | 374 | 	struct gpioline_info info; |
| ... | @@ -396,18 +399,17 @@ struct gpioline_info_changed { | ... | @@ -396,18 +399,17 @@ struct gpioline_info_changed { |
| 396 | * a batch of input or output lines, but they must all have the same | 399 | * a batch of input or output lines, but they must all have the same |
| 397 | * characteristics, i.e. all inputs or all outputs, all active low etc | 400 | * characteristics, i.e. all inputs or all outputs, all active low etc |
| 398 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested | 401 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested |
| 399 | * line, this specifies the default output value, should be 0 (low) or | 402 | * line, this specifies the default output value, should be 0 (inactive) or |
| 400 | * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) | 403 | * 1 (active). Anything other than 0 or 1 will be interpreted as active. |
| 401 | * @consumer_label: a desired consumer label for the selected GPIO line(s) | 404 | * @consumer_label: a desired consumer label for the selected GPIO line(s) |
| 402 | * such as "my-bitbanged-relay" | 405 | * such as "my-bitbanged-relay" |
| 403 | * @lines: number of lines requested in this request, i.e. the number of | 406 | * @lines: number of lines requested in this request, i.e. the number of |
| 404 | * valid fields in the above arrays, set to 1 to request a single line | 407 | * valid fields in the above arrays, set to 1 to request a single line |
| 405 | * @fd: if successful this field will contain a valid anonymous file handle | 408 | * @fd: after a successful %GPIO_GET_LINEHANDLE_IOCTL operation, contains |
| 406 | * after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value | 409 | * a valid anonymous file descriptor representing the request |
| 407 | * means error | ||
| 408 | * | 410 | * |
| 409 | * Note: This struct is part of ABI v1 and is deprecated. | 411 | * Note: This struct is part of ABI v1 and is deprecated. |
| 410 | * Use &struct gpio_v2_line_request instead. | 412 | * Use ABI v2 and &struct gpio_v2_line_request instead. |
| 411 | */ | 413 | */ |
| 412 | struct gpiohandle_request { | 414 | struct gpiohandle_request { |
| 413 | 	__u32 lineoffsets[GPIOHANDLES_MAX]; | 415 | 	__u32 lineoffsets[GPIOHANDLES_MAX]; |
| ... | @@ -424,12 +426,12 @@ struct gpiohandle_request { | ... | @@ -424,12 +426,12 @@ struct gpiohandle_request { |
| 424 | * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added | 426 | * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added |
| 425 | * together | 427 | * together |
| 426 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags, | 428 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags, |
| 427 | * this specifies the default output value, should be 0 (low) or | 429 | * this specifies the default output value, should be 0 (inactive) or |
| 428 | * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) | 430 | * 1 (active). Anything other than 0 or 1 will be interpreted as active. |
| 429 | * @padding: reserved for future use and should be zero filled | 431 | * @padding: reserved for future use and should be zero filled |
| 430 | * | 432 | * |
| 431 | * Note: This struct is part of ABI v1 and is deprecated. | 433 | * Note: This struct is part of ABI v1 and is deprecated. |
| 432 | * Use &struct gpio_v2_line_config instead. | 434 | * Use ABI v2 and &struct gpio_v2_line_config instead. |
| 433 | */ | 435 | */ |
| 434 | struct gpiohandle_config { | 436 | struct gpiohandle_config { |
| 435 | 	__u32 flags; | 437 | 	__u32 flags; |
| ... | @@ -441,10 +443,11 @@ struct gpiohandle_config { | ... | @@ -441,10 +443,11 @@ struct gpiohandle_config { |
| 441 | * struct gpiohandle_data - Information of values on a GPIO handle | 443 | * struct gpiohandle_data - Information of values on a GPIO handle |
| 442 | * @values: when getting the state of lines this contains the current | 444 | * @values: when getting the state of lines this contains the current |
| 443 | * state of a line, when setting the state of lines these should contain | 445 | * state of a line, when setting the state of lines these should contain |
| 444 | * the desired target state | 446 | * the desired target state. States are 0 (inactive) or 1 (active). |
| 447 | * When setting, anything other than 0 or 1 will be interpreted as active. | ||
| 445 | * | 448 | * |
| 446 | * Note: This struct is part of ABI v1 and is deprecated. | 449 | * Note: This struct is part of ABI v1 and is deprecated. |
| 447 | * Use &struct gpio_v2_line_values instead. | 450 | * Use ABI v2 and &struct gpio_v2_line_values instead. |
| 448 | */ | 451 | */ |
| 449 | struct gpiohandle_data { | 452 | struct gpiohandle_data { |
| 450 | 	__u8 values[GPIOHANDLES_MAX]; | 453 | 	__u8 values[GPIOHANDLES_MAX]; |
| ... | @@ -465,12 +468,11 @@ struct gpiohandle_data { | ... | @@ -465,12 +468,11 @@ struct gpiohandle_data { |
| 465 | * %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE | 468 | * %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE |
| 466 | * @consumer_label: a desired consumer label for the selected GPIO line(s) | 469 | * @consumer_label: a desired consumer label for the selected GPIO line(s) |
| 467 | * such as "my-listener" | 470 | * such as "my-listener" |
| 468 | * @fd: if successful this field will contain a valid anonymous file handle | 471 | * @fd: after a successful %GPIO_GET_LINEEVENT_IOCTL operation, contains a |
| 469 | * after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value | 472 | * valid anonymous file descriptor representing the request |
| 470 | * means error | ||
| 471 | * | 473 | * |
| 472 | * Note: This struct is part of ABI v1 and is deprecated. | 474 | * Note: This struct is part of ABI v1 and is deprecated. |
| 473 | * Use &struct gpio_v2_line_request instead. | 475 | * Use ABI v2 and &struct gpio_v2_line_request instead. |
| 474 | */ | 476 | */ |
| 475 | struct gpioevent_request { | 477 | struct gpioevent_request { |
| 476 | 	__u32 lineoffset; | 478 | 	__u32 lineoffset; |
| ... | @@ -489,10 +491,11 @@ struct gpioevent_request { | ... | @@ -489,10 +491,11 @@ struct gpioevent_request { |
| 489 | /** | 491 | /** |
| 490 | * struct gpioevent_data - The actual event being pushed to userspace | 492 | * struct gpioevent_data - The actual event being pushed to userspace |
| 491 | * @timestamp: best estimate of time of event occurrence, in nanoseconds | 493 | * @timestamp: best estimate of time of event occurrence, in nanoseconds |
| 492 | * @id: event identifier | 494 | * @id: event identifier, one of %GPIOEVENT_EVENT_RISING_EDGE or |
| 495 | * %GPIOEVENT_EVENT_FALLING_EDGE | ||
| 493 | * | 496 | * |
| 494 | * Note: This struct is part of ABI v1 and is deprecated. | 497 | * Note: This struct is part of ABI v1 and is deprecated. |
| 495 | * Use &struct gpio_v2_line_event instead. | 498 | * Use ABI v2 and &struct gpio_v2_line_event instead. |
| 496 | */ | 499 | */ |
| 497 | struct gpioevent_data { | 500 | struct gpioevent_data { |
| 498 | 	__u64 timestamp; | 501 | 	__u64 timestamp; |
lib/libc/include/any-linux-any/linux/gsmmux.h+106-10| ... | @@ -1,11 +1,47 @@ | ... | @@ -1,11 +1,47 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* Copyright (c) 2022/23 Siemens Mobility GmbH */ | ||
| 2 | #ifndef _LINUX_GSMMUX_H | 3 | #ifndef _LINUX_GSMMUX_H |
| 3 | #define _LINUX_GSMMUX_H | 4 | #define _LINUX_GSMMUX_H |
| 4 | 5 | ||
| 6 | #include <linux/const.h> | ||
| 5 | #include <linux/if.h> | 7 | #include <linux/if.h> |
| 6 | #include <linux/ioctl.h> | 8 | #include <linux/ioctl.h> |
| 7 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 8 | 10 | ||
| 11 | /* | ||
| 12 | * flags definition for n_gsm | ||
| 13 | * | ||
| 14 | * Used by: | ||
| 15 | * struct gsm_config_ext.flags | ||
| 16 | * struct gsm_dlci_config.flags | ||
| 17 | */ | ||
| 18 | /* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if | ||
| 19 | * incompatible settings were provided. Always cleared on retrieval. | ||
| 20 | */ | ||
| 21 | #define GSM_FL_RESTART	_BITUL(0) | ||
| 22 | |||
| 23 | /** | ||
| 24 | * struct gsm_config - n_gsm basic configuration parameters | ||
| 25 | * | ||
| 26 | * This structure is used in combination with GSMIOC_GETCONF and GSMIOC_SETCONF | ||
| 27 | * to retrieve and set the basic parameters of an n_gsm ldisc. | ||
| 28 | * struct gsm_config_ext can be used to configure extended ldisc parameters. | ||
| 29 | * | ||
| 30 | * All timers are in units of 1/100th of a second. | ||
| 31 | * | ||
| 32 | * @adaption: Convergence layer type | ||
| 33 | * @encapsulation: Framing (0 = basic option, 1 = advanced option) | ||
| 34 | * @initiator: Initiator or responder | ||
| 35 | * @t1: Acknowledgment timer | ||
| 36 | * @t2: Response timer for multiplexer control channel | ||
| 37 | * @t3: Response timer for wake-up procedure | ||
| 38 | * @n2: Maximum number of retransmissions | ||
| 39 | * @mru: Maximum incoming frame payload size | ||
| 40 | * @mtu: Maximum outgoing frame payload size | ||
| 41 | * @k: Window size | ||
| 42 | * @i: Frame type (1 = UIH, 2 = UI) | ||
| 43 | * @unused: Can not be used | ||
| 44 | */ | ||
| 9 | struct gsm_config | 45 | struct gsm_config |
| 10 | { | 46 | { |
| 11 | 	unsigned int adaption; | 47 | 	unsigned int adaption; |
| ... | @@ -19,18 +55,32 @@ struct gsm_config | ... | @@ -19,18 +55,32 @@ struct gsm_config |
| 19 | 	unsigned int mtu; | 55 | 	unsigned int mtu; |
| 20 | 	unsigned int k; | 56 | 	unsigned int k; |
| 21 | 	unsigned int i; | 57 | 	unsigned int i; |
| 22 | 	unsigned int unused[8];	/* Can not be used */ | 58 | 	unsigned int unused[8]; |
| 23 | }; | 59 | }; |
| 24 | 60 | ||
| 25 | #define GSMIOC_GETCONF		_IOR('G', 0, struct gsm_config) | 61 | #define GSMIOC_GETCONF		_IOR('G', 0, struct gsm_config) |
| 26 | #define GSMIOC_SETCONF		_IOW('G', 1, struct gsm_config) | 62 | #define GSMIOC_SETCONF		_IOW('G', 1, struct gsm_config) |
| 27 | 63 | ||
| 64 | /** | ||
| 65 | * struct gsm_netconfig - n_gsm network configuration parameters | ||
| 66 | * | ||
| 67 | * This structure is used in combination with GSMIOC_ENABLE_NET and | ||
| 68 | * GSMIOC_DISABLE_NET to enable or disable a network data connection | ||
| 69 | * over a mux virtual tty channel. This is for modems that support | ||
| 70 | * data connections with raw IP frames instead of PPP. | ||
| 71 | * | ||
| 72 | * @adaption: Adaption to use in network mode. | ||
| 73 | * @protocol: Protocol to use - only ETH_P_IP supported. | ||
| 74 | * @unused2: Can not be used. | ||
| 75 | * @if_name: Interface name format string. | ||
| 76 | * @unused: Can not be used. | ||
| 77 | */ | ||
| 28 | struct gsm_netconfig { | 78 | struct gsm_netconfig { |
| 29 | 	unsigned int adaption; /* Adaption to use in network mode */ | 79 | 	unsigned int adaption; |
| 30 | 	unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */ | 80 | 	unsigned short protocol; |
| 31 | 	unsigned short unused2;	/* Can not be used */ | 81 | 	unsigned short unused2; |
| 32 | 	char if_name[IFNAMSIZ];	/* interface name format string */ | 82 | 	char if_name[IFNAMSIZ]; |
| 33 | 	__u8 unused[28]; /* Can not be used */ | 83 | 	__u8 unused[28]; |
| 34 | }; | 84 | }; |
| 35 | 85 | ||
| 36 | #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig) | 86 | #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig) |
| ... | @@ -39,14 +89,60 @@ struct gsm_netconfig { | ... | @@ -39,14 +89,60 @@ struct gsm_netconfig { |
| 39 | /* get the base tty number for a configured gsmmux tty */ | 89 | /* get the base tty number for a configured gsmmux tty */ |
| 40 | #define GSMIOC_GETFIRST		_IOR('G', 4, __u32) | 90 | #define GSMIOC_GETFIRST		_IOR('G', 4, __u32) |
| 41 | 91 | ||
| 92 | /** | ||
| 93 | * struct gsm_config_ext - n_gsm extended configuration parameters | ||
| 94 | * | ||
| 95 | * This structure is used in combination with GSMIOC_GETCONF_EXT and | ||
| 96 | * GSMIOC_SETCONF_EXT to retrieve and set the extended parameters of an | ||
| 97 | * n_gsm ldisc. | ||
| 98 | * | ||
| 99 | * All timers are in units of 1/100th of a second. | ||
| 100 | * | ||
| 101 | * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable). | ||
| 102 | * @wait_config: Wait for DLCI config before opening virtual link? | ||
| 103 | * @flags: Mux specific flags. | ||
| 104 | * @reserved: For future use, must be initialized to zero. | ||
| 105 | */ | ||
| 42 | struct gsm_config_ext { | 106 | struct gsm_config_ext { |
| 43 | 	__u32 keep_alive;	/* Control channel keep-alive in 1/100th of a | 107 | 	__u32 keep_alive; |
| 44 | 				 * second (0 to disable) | 108 | 	__u32 wait_config; |
| 45 | 				 */ | 109 | 	__u32 flags; |
| 46 | 	__u32 reserved[7];	/* For future use, must be initialized to zero */ | 110 | 	__u32 reserved[5]; |
| 47 | }; | 111 | }; |
| 48 | 112 | ||
| 49 | #define GSMIOC_GETCONF_EXT	_IOR('G', 5, struct gsm_config_ext) | 113 | #define GSMIOC_GETCONF_EXT	_IOR('G', 5, struct gsm_config_ext) |
| 50 | #define GSMIOC_SETCONF_EXT	_IOW('G', 6, struct gsm_config_ext) | 114 | #define GSMIOC_SETCONF_EXT	_IOW('G', 6, struct gsm_config_ext) |
| 51 | 115 | ||
| 116 | /** | ||
| 117 | * struct gsm_dlci_config - n_gsm channel configuration parameters | ||
| 118 | * | ||
| 119 | * This structure is used in combination with GSMIOC_GETCONF_DLCI and | ||
| 120 | * GSMIOC_SETCONF_DLCI to retrieve and set the channel specific parameters | ||
| 121 | * of an n_gsm ldisc. | ||
| 122 | * | ||
| 123 | * Set the channel accordingly before calling GSMIOC_GETCONF_DLCI. | ||
| 124 | * | ||
| 125 | * @channel: DLCI (0 for the associated DLCI). | ||
| 126 | * @adaption: Convergence layer type. | ||
| 127 | * @mtu: Maximum transfer unit. | ||
| 128 | * @priority: Priority (0 for default value). | ||
| 129 | * @i: Frame type (1 = UIH, 2 = UI). | ||
| 130 | * @k: Window size (0 for default value). | ||
| 131 | * @flags: DLCI specific flags. | ||
| 132 | * @reserved: For future use, must be initialized to zero. | ||
| 133 | */ | ||
| 134 | struct gsm_dlci_config { | ||
| 135 | 	__u32 channel; | ||
| 136 | 	__u32 adaption; | ||
| 137 | 	__u32 mtu; | ||
| 138 | 	__u32 priority; | ||
| 139 | 	__u32 i; | ||
| 140 | 	__u32 k; | ||
| 141 | 	__u32 flags; | ||
| 142 | 	__u32 reserved[7]; | ||
| 143 | }; | ||
| 144 | |||
| 145 | #define GSMIOC_GETCONF_DLCI	_IOWR('G', 7, struct gsm_dlci_config) | ||
| 146 | #define GSMIOC_SETCONF_DLCI	_IOW('G', 8, struct gsm_dlci_config) | ||
| 147 | |||
| 52 | #endif | 148 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/gtp.h+4-1| ... | @@ -31,8 +31,11 @@ enum gtp_attrs { | ... | @@ -31,8 +31,11 @@ enum gtp_attrs { |
| 31 | 	GTPA_I_TEI,	/* for GTPv1 only */ | 31 | 	GTPA_I_TEI,	/* for GTPv1 only */ |
| 32 | 	GTPA_O_TEI,	/* for GTPv1 only */ | 32 | 	GTPA_O_TEI,	/* for GTPv1 only */ |
| 33 | 	GTPA_PAD, | 33 | 	GTPA_PAD, |
| 34 | 	GTPA_PEER_ADDR6, | ||
| 35 | 	GTPA_MS_ADDR6, | ||
| 36 | 	GTPA_FAMILY, | ||
| 34 | 	__GTPA_MAX, | 37 | 	__GTPA_MAX, |
| 35 | }; | 38 | }; |
| 36 | #define GTPA_MAX (__GTPA_MAX + 1) | 39 | #define GTPA_MAX (__GTPA_MAX - 1) |
| 37 | 40 | ||
| 38 | #endif /* _LINUX_GTP_H_ */ | 41 | #endif /* _LINUX_GTP_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/handshake.h created+74| ... | @@ -0,0 +1,74 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/handshake.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_HANDSHAKE_H | ||
| 7 | #define _LINUX_HANDSHAKE_H | ||
| 8 | |||
| 9 | #define HANDSHAKE_FAMILY_NAME		"handshake" | ||
| 10 | #define HANDSHAKE_FAMILY_VERSION	1 | ||
| 11 | |||
| 12 | enum handshake_handler_class { | ||
| 13 | 	HANDSHAKE_HANDLER_CLASS_NONE, | ||
| 14 | 	HANDSHAKE_HANDLER_CLASS_TLSHD, | ||
| 15 | 	HANDSHAKE_HANDLER_CLASS_MAX, | ||
| 16 | }; | ||
| 17 | |||
| 18 | enum handshake_msg_type { | ||
| 19 | 	HANDSHAKE_MSG_TYPE_UNSPEC, | ||
| 20 | 	HANDSHAKE_MSG_TYPE_CLIENTHELLO, | ||
| 21 | 	HANDSHAKE_MSG_TYPE_SERVERHELLO, | ||
| 22 | }; | ||
| 23 | |||
| 24 | enum handshake_auth { | ||
| 25 | 	HANDSHAKE_AUTH_UNSPEC, | ||
| 26 | 	HANDSHAKE_AUTH_UNAUTH, | ||
| 27 | 	HANDSHAKE_AUTH_PSK, | ||
| 28 | 	HANDSHAKE_AUTH_X509, | ||
| 29 | }; | ||
| 30 | |||
| 31 | enum { | ||
| 32 | 	HANDSHAKE_A_X509_CERT = 1, | ||
| 33 | 	HANDSHAKE_A_X509_PRIVKEY, | ||
| 34 | |||
| 35 | 	__HANDSHAKE_A_X509_MAX, | ||
| 36 | 	HANDSHAKE_A_X509_MAX = (__HANDSHAKE_A_X509_MAX - 1) | ||
| 37 | }; | ||
| 38 | |||
| 39 | enum { | ||
| 40 | 	HANDSHAKE_A_ACCEPT_SOCKFD = 1, | ||
| 41 | 	HANDSHAKE_A_ACCEPT_HANDLER_CLASS, | ||
| 42 | 	HANDSHAKE_A_ACCEPT_MESSAGE_TYPE, | ||
| 43 | 	HANDSHAKE_A_ACCEPT_TIMEOUT, | ||
| 44 | 	HANDSHAKE_A_ACCEPT_AUTH_MODE, | ||
| 45 | 	HANDSHAKE_A_ACCEPT_PEER_IDENTITY, | ||
| 46 | 	HANDSHAKE_A_ACCEPT_CERTIFICATE, | ||
| 47 | 	HANDSHAKE_A_ACCEPT_PEERNAME, | ||
| 48 | |||
| 49 | 	__HANDSHAKE_A_ACCEPT_MAX, | ||
| 50 | 	HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1) | ||
| 51 | }; | ||
| 52 | |||
| 53 | enum { | ||
| 54 | 	HANDSHAKE_A_DONE_STATUS = 1, | ||
| 55 | 	HANDSHAKE_A_DONE_SOCKFD, | ||
| 56 | 	HANDSHAKE_A_DONE_REMOTE_AUTH, | ||
| 57 | |||
| 58 | 	__HANDSHAKE_A_DONE_MAX, | ||
| 59 | 	HANDSHAKE_A_DONE_MAX = (__HANDSHAKE_A_DONE_MAX - 1) | ||
| 60 | }; | ||
| 61 | |||
| 62 | enum { | ||
| 63 | 	HANDSHAKE_CMD_READY = 1, | ||
| 64 | 	HANDSHAKE_CMD_ACCEPT, | ||
| 65 | 	HANDSHAKE_CMD_DONE, | ||
| 66 | |||
| 67 | 	__HANDSHAKE_CMD_MAX, | ||
| 68 | 	HANDSHAKE_CMD_MAX = (__HANDSHAKE_CMD_MAX - 1) | ||
| 69 | }; | ||
| 70 | |||
| 71 | #define HANDSHAKE_MCGRP_NONE	"none" | ||
| 72 | #define HANDSHAKE_MCGRP_TLSHD	"tlshd" | ||
| 73 | |||
| 74 | #endif /* _LINUX_HANDSHAKE_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/hash_info.h+3| ... | @@ -35,6 +35,9 @@ enum hash_algo { | ... | @@ -35,6 +35,9 @@ enum hash_algo { |
| 35 | 	HASH_ALGO_SM3_256, | 35 | 	HASH_ALGO_SM3_256, |
| 36 | 	HASH_ALGO_STREEBOG_256, | 36 | 	HASH_ALGO_STREEBOG_256, |
| 37 | 	HASH_ALGO_STREEBOG_512, | 37 | 	HASH_ALGO_STREEBOG_512, |
| 38 | 	HASH_ALGO_SHA3_256, | ||
| 39 | 	HASH_ALGO_SHA3_384, | ||
| 40 | 	HASH_ALGO_SHA3_512, | ||
| 38 | 	HASH_ALGO__LAST | 41 | 	HASH_ALGO__LAST |
| 39 | }; | 42 | }; |
| 40 | 43 |
lib/libc/include/any-linux-any/linux/hw_breakpoint.h-10| ... | @@ -22,14 +22,4 @@ enum { | ... | @@ -22,14 +22,4 @@ enum { |
| 22 | 	HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, | 22 | 	HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | enum bp_type_idx { | ||
| 26 | 	TYPE_INST 	= 0, | ||
| 27 | #ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS | ||
| 28 | 	TYPE_DATA	= 0, | ||
| 29 | #else | ||
| 30 | 	TYPE_DATA	= 1, | ||
| 31 | #endif | ||
| 32 | 	TYPE_MAX | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif /* _LINUX_HW_BREAKPOINT_H */ | 25 | #endif /* _LINUX_HW_BREAKPOINT_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/icmpv6.h+1| ... | @@ -112,6 +112,7 @@ struct icmp6hdr { | ... | @@ -112,6 +112,7 @@ struct icmp6hdr { |
| 112 | #define ICMPV6_MOBILE_PREFIX_ADV	147 | 112 | #define ICMPV6_MOBILE_PREFIX_ADV	147 |
| 113 | 113 | ||
| 114 | #define ICMPV6_MRDISC_ADV		151 | 114 | #define ICMPV6_MRDISC_ADV		151 |
| 115 | #define ICMPV6_MRDISC_SOL		152 | ||
| 115 | 116 | ||
| 116 | #define ICMPV6_MSG_MAX 255 | 117 | #define ICMPV6_MSG_MAX 255 |
| 117 | 118 |
lib/libc/include/any-linux-any/linux/idxd.h+46-3| ... | @@ -26,6 +26,8 @@ enum idxd_scmd_stat { | ... | @@ -26,6 +26,8 @@ enum idxd_scmd_stat { |
| 26 | 	IDXD_SCMD_WQ_NO_PRIV = 0x800f0000, | 26 | 	IDXD_SCMD_WQ_NO_PRIV = 0x800f0000, |
| 27 | 	IDXD_SCMD_WQ_IRQ_ERR = 0x80100000, | 27 | 	IDXD_SCMD_WQ_IRQ_ERR = 0x80100000, |
| 28 | 	IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000, | 28 | 	IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000, |
| 29 | 	IDXD_SCMD_DEV_EVL_ERR = 0x80120000, | ||
| 30 | 	IDXD_SCMD_WQ_NO_DRV_NAME = 0x80200000, | ||
| 29 | }; | 31 | }; |
| 30 | 32 | ||
| 31 | #define IDXD_SCMD_SOFTERR_MASK	0x80000000 | 33 | #define IDXD_SCMD_SOFTERR_MASK	0x80000000 |
| ... | @@ -68,12 +70,14 @@ enum dsa_opcode { | ... | @@ -68,12 +70,14 @@ enum dsa_opcode { |
| 68 | 	DSA_OPCODE_CR_DELTA, | 70 | 	DSA_OPCODE_CR_DELTA, |
| 69 | 	DSA_OPCODE_AP_DELTA, | 71 | 	DSA_OPCODE_AP_DELTA, |
| 70 | 	DSA_OPCODE_DUALCAST, | 72 | 	DSA_OPCODE_DUALCAST, |
| 73 | 	DSA_OPCODE_TRANSL_FETCH, | ||
| 71 | 	DSA_OPCODE_CRCGEN = 0x10, | 74 | 	DSA_OPCODE_CRCGEN = 0x10, |
| 72 | 	DSA_OPCODE_COPY_CRC, | 75 | 	DSA_OPCODE_COPY_CRC, |
| 73 | 	DSA_OPCODE_DIF_CHECK, | 76 | 	DSA_OPCODE_DIF_CHECK, |
| 74 | 	DSA_OPCODE_DIF_INS, | 77 | 	DSA_OPCODE_DIF_INS, |
| 75 | 	DSA_OPCODE_DIF_STRP, | 78 | 	DSA_OPCODE_DIF_STRP, |
| 76 | 	DSA_OPCODE_DIF_UPDT, | 79 | 	DSA_OPCODE_DIF_UPDT, |
| 80 | 	DSA_OPCODE_DIX_GEN = 0x17, | ||
| 77 | 	DSA_OPCODE_CFLUSH = 0x20, | 81 | 	DSA_OPCODE_CFLUSH = 0x20, |
| 78 | }; | 82 | }; |
| 79 | 83 | ||
| ... | @@ -128,6 +132,8 @@ enum dsa_completion_status { | ... | @@ -128,6 +132,8 @@ enum dsa_completion_status { |
| 128 | 	DSA_COMP_HW_ERR1, | 132 | 	DSA_COMP_HW_ERR1, |
| 129 | 	DSA_COMP_HW_ERR_DRB, | 133 | 	DSA_COMP_HW_ERR_DRB, |
| 130 | 	DSA_COMP_TRANSLATION_FAIL, | 134 | 	DSA_COMP_TRANSLATION_FAIL, |
| 135 | 	DSA_COMP_DRAIN_EVL = 0x26, | ||
| 136 | 	DSA_COMP_BATCH_EVL_ERR, | ||
| 131 | }; | 137 | }; |
| 132 | 138 | ||
| 133 | enum iax_completion_status { | 139 | enum iax_completion_status { |
| ... | @@ -163,6 +169,7 @@ enum iax_completion_status { | ... | @@ -163,6 +169,7 @@ enum iax_completion_status { |
| 163 | 169 | ||
| 164 | #define DSA_COMP_STATUS_MASK		0x7f | 170 | #define DSA_COMP_STATUS_MASK		0x7f |
| 165 | #define DSA_COMP_STATUS_WRITE		0x80 | 171 | #define DSA_COMP_STATUS_WRITE		0x80 |
| 172 | #define DSA_COMP_STATUS(status)		((status) & DSA_COMP_STATUS_MASK) | ||
| 166 | 173 | ||
| 167 | struct dsa_hw_desc { | 174 | struct dsa_hw_desc { |
| 168 | 	uint32_t	pasid:20; | 175 | 	uint32_t	pasid:20; |
| ... | @@ -176,6 +183,8 @@ struct dsa_hw_desc { | ... | @@ -176,6 +183,8 @@ struct dsa_hw_desc { |
| 176 | 		uint64_t	rdback_addr; | 183 | 		uint64_t	rdback_addr; |
| 177 | 		uint64_t	pattern; | 184 | 		uint64_t	pattern; |
| 178 | 		uint64_t	desc_list_addr; | 185 | 		uint64_t	desc_list_addr; |
| 186 | 		uint64_t	pattern_lower; | ||
| 187 | 		uint64_t	transl_fetch_addr; | ||
| 179 | 	}; | 188 | 	}; |
| 180 | 	union { | 189 | 	union { |
| 181 | 		uint64_t	dst_addr; | 190 | 		uint64_t	dst_addr; |
| ... | @@ -186,6 +195,7 @@ struct dsa_hw_desc { | ... | @@ -186,6 +195,7 @@ struct dsa_hw_desc { |
| 186 | 	union { | 195 | 	union { |
| 187 | 		uint32_t	xfer_size; | 196 | 		uint32_t	xfer_size; |
| 188 | 		uint32_t	desc_count; | 197 | 		uint32_t	desc_count; |
| 198 | 		uint32_t	region_size; | ||
| 189 | 	}; | 199 | 	}; |
| 190 | 	uint16_t	int_handle; | 200 | 	uint16_t	int_handle; |
| 191 | 	uint16_t	rsvd1; | 201 | 	uint16_t	rsvd1; |
| ... | @@ -240,6 +250,26 @@ struct dsa_hw_desc { | ... | @@ -240,6 +250,26 @@ struct dsa_hw_desc { |
| 240 | 			uint16_t	dest_app_tag_seed; | 250 | 			uint16_t	dest_app_tag_seed; |
| 241 | 		}; | 251 | 		}; |
| 242 | 252 | ||
| 253 | 		/* Fill */ | ||
| 254 | 		uint64_t	pattern_upper; | ||
| 255 | |||
| 256 | 		/* Translation fetch */ | ||
| 257 | 		struct { | ||
| 258 | 			uint64_t	transl_fetch_res; | ||
| 259 | 			uint32_t	region_stride; | ||
| 260 | 		}; | ||
| 261 | |||
| 262 | 		/* DIX generate */ | ||
| 263 | 		struct { | ||
| 264 | 			uint8_t		dix_gen_res; | ||
| 265 | 			uint8_t		dest_dif_flags; | ||
| 266 | 			uint8_t		dif_flags; | ||
| 267 | 			uint8_t		dix_gen_res2[13]; | ||
| 268 | 			uint32_t	ref_tag_seed; | ||
| 269 | 			uint16_t	app_tag_mask; | ||
| 270 | 			uint16_t	app_tag_seed; | ||
| 271 | 		}; | ||
| 272 | |||
| 243 | 		uint8_t		op_specific[24]; | 273 | 		uint8_t		op_specific[24]; |
| 244 | 	}; | 274 | 	}; |
| 245 | } __attribute__((packed)); | 275 | } __attribute__((packed)); |
| ... | @@ -280,8 +310,12 @@ struct dsa_completion_record { | ... | @@ -280,8 +310,12 @@ struct dsa_completion_record { |
| 280 | 		uint8_t		result; | 310 | 		uint8_t		result; |
| 281 | 		uint8_t		dif_status; | 311 | 		uint8_t		dif_status; |
| 282 | 	}; | 312 | 	}; |
| 283 | 	uint16_t		rsvd; | 313 | 	uint8_t			fault_info; |
| 284 | 	uint32_t		bytes_completed; | 314 | 	uint8_t			rsvd; |
| 315 | 	union { | ||
| 316 | 		uint32_t		bytes_completed; | ||
| 317 | 		uint32_t		descs_completed; | ||
| 318 | 	}; | ||
| 285 | 	uint64_t		fault_addr; | 319 | 	uint64_t		fault_addr; |
| 286 | 	union { | 320 | 	union { |
| 287 | 		/* common record */ | 321 | 		/* common record */ |
| ... | @@ -318,6 +352,14 @@ struct dsa_completion_record { | ... | @@ -318,6 +352,14 @@ struct dsa_completion_record { |
| 318 | 			uint16_t	dif_upd_dest_app_tag; | 352 | 			uint16_t	dif_upd_dest_app_tag; |
| 319 | 		}; | 353 | 		}; |
| 320 | 354 | ||
| 355 | 		/* DIX generate */ | ||
| 356 | 		struct { | ||
| 357 | 			uint64_t	dix_gen_res; | ||
| 358 | 			uint32_t	dix_ref_tag; | ||
| 359 | 			uint16_t	dix_app_tag_mask; | ||
| 360 | 			uint16_t	dix_app_tag; | ||
| 361 | 		}; | ||
| 362 | |||
| 321 | 		uint8_t		op_specific[16]; | 363 | 		uint8_t		op_specific[16]; |
| 322 | 	}; | 364 | 	}; |
| 323 | } __attribute__((packed)); | 365 | } __attribute__((packed)); |
| ... | @@ -329,7 +371,8 @@ struct dsa_raw_completion_record { | ... | @@ -329,7 +371,8 @@ struct dsa_raw_completion_record { |
| 329 | struct iax_completion_record { | 371 | struct iax_completion_record { |
| 330 | 	__volatile__ uint8_t status; | 372 | 	__volatile__ uint8_t status; |
| 331 | 	uint8_t error_code; | 373 | 	uint8_t error_code; |
| 332 | 	uint16_t rsvd; | 374 | 	uint8_t			fault_info; |
| 375 | 	uint8_t			rsvd; | ||
| 333 | 	uint32_t bytes_completed; | 376 | 	uint32_t bytes_completed; |
| 334 | 	uint64_t fault_addr; | 377 | 	uint64_t fault_addr; |
| 335 | 	uint32_t invalid_flags; | 378 | 	uint32_t invalid_flags; |
lib/libc/include/any-linux-any/linux/if_bridge.h+30| ... | @@ -525,6 +525,7 @@ enum { | ... | @@ -525,6 +525,7 @@ enum { |
| 525 | 	BRIDGE_VLANDB_ENTRY_MCAST_ROUTER, | 525 | 	BRIDGE_VLANDB_ENTRY_MCAST_ROUTER, |
| 526 | 	BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS, | 526 | 	BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS, |
| 527 | 	BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS, | 527 | 	BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS, |
| 528 | 	BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS, | ||
| 528 | 	__BRIDGE_VLANDB_ENTRY_MAX, | 529 | 	__BRIDGE_VLANDB_ENTRY_MAX, |
| 529 | }; | 530 | }; |
| 530 | #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) | 531 | #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) |
| ... | @@ -633,6 +634,11 @@ enum { | ... | @@ -633,6 +634,11 @@ enum { |
| 633 | 	MDBA_MDB_EATTR_GROUP_MODE, | 634 | 	MDBA_MDB_EATTR_GROUP_MODE, |
| 634 | 	MDBA_MDB_EATTR_SOURCE, | 635 | 	MDBA_MDB_EATTR_SOURCE, |
| 635 | 	MDBA_MDB_EATTR_RTPROT, | 636 | 	MDBA_MDB_EATTR_RTPROT, |
| 637 | 	MDBA_MDB_EATTR_DST, | ||
| 638 | 	MDBA_MDB_EATTR_DST_PORT, | ||
| 639 | 	MDBA_MDB_EATTR_VNI, | ||
| 640 | 	MDBA_MDB_EATTR_IFINDEX, | ||
| 641 | 	MDBA_MDB_EATTR_SRC_VNI, | ||
| 636 | 	__MDBA_MDB_EATTR_MAX | 642 | 	__MDBA_MDB_EATTR_MAX |
| 637 | }; | 643 | }; |
| 638 | #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) | 644 | #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) |
| ... | @@ -717,6 +723,24 @@ enum { | ... | @@ -717,6 +723,24 @@ enum { |
| 717 | }; | 723 | }; |
| 718 | #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) | 724 | #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) |
| 719 | 725 | ||
| 726 | /* [MDBA_GET_ENTRY] = { | ||
| 727 | * struct br_mdb_entry | ||
| 728 | * [MDBA_GET_ENTRY_ATTRS] = { | ||
| 729 | * [MDBE_ATTR_SOURCE] | ||
| 730 | * struct in_addr / struct in6_addr | ||
| 731 | * [MDBE_ATTR_SRC_VNI] | ||
| 732 | * u32 | ||
| 733 | * } | ||
| 734 | * } | ||
| 735 | */ | ||
| 736 | enum { | ||
| 737 | 	MDBA_GET_ENTRY_UNSPEC, | ||
| 738 | 	MDBA_GET_ENTRY, | ||
| 739 | 	MDBA_GET_ENTRY_ATTRS, | ||
| 740 | 	__MDBA_GET_ENTRY_MAX, | ||
| 741 | }; | ||
| 742 | #define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_MAX - 1) | ||
| 743 | |||
| 720 | /* [MDBA_SET_ENTRY_ATTRS] = { | 744 | /* [MDBA_SET_ENTRY_ATTRS] = { |
| 721 | * [MDBE_ATTR_xxx] | 745 | * [MDBE_ATTR_xxx] |
| 722 | * ... | 746 | * ... |
| ... | @@ -728,6 +752,12 @@ enum { | ... | @@ -728,6 +752,12 @@ enum { |
| 728 | 	MDBE_ATTR_SRC_LIST, | 752 | 	MDBE_ATTR_SRC_LIST, |
| 729 | 	MDBE_ATTR_GROUP_MODE, | 753 | 	MDBE_ATTR_GROUP_MODE, |
| 730 | 	MDBE_ATTR_RTPROT, | 754 | 	MDBE_ATTR_RTPROT, |
| 755 | 	MDBE_ATTR_DST, | ||
| 756 | 	MDBE_ATTR_DST_PORT, | ||
| 757 | 	MDBE_ATTR_VNI, | ||
| 758 | 	MDBE_ATTR_IFINDEX, | ||
| 759 | 	MDBE_ATTR_SRC_VNI, | ||
| 760 | 	MDBE_ATTR_STATE_MASK, | ||
| 731 | 	__MDBE_ATTR_MAX, | 761 | 	__MDBE_ATTR_MAX, |
| 732 | }; | 762 | }; |
| 733 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) | 763 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) |
lib/libc/include/any-linux-any/linux/if_link.h+567-2| ... | @@ -376,7 +376,7 @@ enum { | ... | @@ -376,7 +376,7 @@ enum { |
| 376 | 376 | ||
| 377 | 	IFLA_GSO_IPV4_MAX_SIZE, | 377 | 	IFLA_GSO_IPV4_MAX_SIZE, |
| 378 | 	IFLA_GRO_IPV4_MAX_SIZE, | 378 | 	IFLA_GRO_IPV4_MAX_SIZE, |
| 379 | 379 | 	IFLA_DPLL_PIN, | |
| 380 | 	__IFLA_MAX | 380 | 	__IFLA_MAX |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
| ... | @@ -459,6 +459,286 @@ enum in6_addr_gen_mode { | ... | @@ -459,6 +459,286 @@ enum in6_addr_gen_mode { |
| 459 | 459 | ||
| 460 | /* Bridge section */ | 460 | /* Bridge section */ |
| 461 | 461 | ||
| 462 | /** | ||
| 463 | * DOC: Bridge enum definition | ||
| 464 | * | ||
| 465 | * Please *note* that the timer values in the following section are expected | ||
| 466 | * in clock_t format, which is seconds multiplied by USER_HZ (generally | ||
| 467 | * defined as 100). | ||
| 468 | * | ||
| 469 | * @IFLA_BR_FORWARD_DELAY | ||
| 470 | * The bridge forwarding delay is the time spent in LISTENING state | ||
| 471 | * (before moving to LEARNING) and in LEARNING state (before moving | ||
| 472 | * to FORWARDING). Only relevant if STP is enabled. | ||
| 473 | * | ||
| 474 | * The valid values are between (2 * USER_HZ) and (30 * USER_HZ). | ||
| 475 | * The default value is (15 * USER_HZ). | ||
| 476 | * | ||
| 477 | * @IFLA_BR_HELLO_TIME | ||
| 478 | * The time between hello packets sent by the bridge, when it is a root | ||
| 479 | * bridge or a designated bridge. Only relevant if STP is enabled. | ||
| 480 | * | ||
| 481 | * The valid values are between (1 * USER_HZ) and (10 * USER_HZ). | ||
| 482 | * The default value is (2 * USER_HZ). | ||
| 483 | * | ||
| 484 | * @IFLA_BR_MAX_AGE | ||
| 485 | * The hello packet timeout is the time until another bridge in the | ||
| 486 | * spanning tree is assumed to be dead, after reception of its last hello | ||
| 487 | * message. Only relevant if STP is enabled. | ||
| 488 | * | ||
| 489 | * The valid values are between (6 * USER_HZ) and (40 * USER_HZ). | ||
| 490 | * The default value is (20 * USER_HZ). | ||
| 491 | * | ||
| 492 | * @IFLA_BR_AGEING_TIME | ||
| 493 | * Configure the bridge's FDB entries aging time. It is the time a MAC | ||
| 494 | * address will be kept in the FDB after a packet has been received from | ||
| 495 | * that address. After this time has passed, entries are cleaned up. | ||
| 496 | * Allow values outside the 802.1 standard specification for special cases: | ||
| 497 | * | ||
| 498 | * * 0 - entry never ages (all permanent) | ||
| 499 | * * 1 - entry disappears (no persistence) | ||
| 500 | * | ||
| 501 | * The default value is (300 * USER_HZ). | ||
| 502 | * | ||
| 503 | * @IFLA_BR_STP_STATE | ||
| 504 | * Turn spanning tree protocol on (*IFLA_BR_STP_STATE* > 0) or off | ||
| 505 | * (*IFLA_BR_STP_STATE* == 0) for this bridge. | ||
| 506 | * | ||
| 507 | * The default value is 0 (disabled). | ||
| 508 | * | ||
| 509 | * @IFLA_BR_PRIORITY | ||
| 510 | * Set this bridge's spanning tree priority, used during STP root bridge | ||
| 511 | * election. | ||
| 512 | * | ||
| 513 | * The valid values are between 0 and 65535. | ||
| 514 | * | ||
| 515 | * @IFLA_BR_VLAN_FILTERING | ||
| 516 | * Turn VLAN filtering on (*IFLA_BR_VLAN_FILTERING* > 0) or off | ||
| 517 | * (*IFLA_BR_VLAN_FILTERING* == 0). When disabled, the bridge will not | ||
| 518 | * consider the VLAN tag when handling packets. | ||
| 519 | * | ||
| 520 | * The default value is 0 (disabled). | ||
| 521 | * | ||
| 522 | * @IFLA_BR_VLAN_PROTOCOL | ||
| 523 | * Set the protocol used for VLAN filtering. | ||
| 524 | * | ||
| 525 | * The valid values are 0x8100(802.1Q) or 0x88A8(802.1AD). The default value | ||
| 526 | * is 0x8100(802.1Q). | ||
| 527 | * | ||
| 528 | * @IFLA_BR_GROUP_FWD_MASK | ||
| 529 | * The group forwarding mask. This is the bitmask that is applied to | ||
| 530 | * decide whether to forward incoming frames destined to link-local | ||
| 531 | * addresses (of the form 01:80:C2:00:00:0X). | ||
| 532 | * | ||
| 533 | * The default value is 0, which means the bridge does not forward any | ||
| 534 | * link-local frames coming on this port. | ||
| 535 | * | ||
| 536 | * @IFLA_BR_ROOT_ID | ||
| 537 | * The bridge root id, read only. | ||
| 538 | * | ||
| 539 | * @IFLA_BR_BRIDGE_ID | ||
| 540 | * The bridge id, read only. | ||
| 541 | * | ||
| 542 | * @IFLA_BR_ROOT_PORT | ||
| 543 | * The bridge root port, read only. | ||
| 544 | * | ||
| 545 | * @IFLA_BR_ROOT_PATH_COST | ||
| 546 | * The bridge root path cost, read only. | ||
| 547 | * | ||
| 548 | * @IFLA_BR_TOPOLOGY_CHANGE | ||
| 549 | * The bridge topology change, read only. | ||
| 550 | * | ||
| 551 | * @IFLA_BR_TOPOLOGY_CHANGE_DETECTED | ||
| 552 | * The bridge topology change detected, read only. | ||
| 553 | * | ||
| 554 | * @IFLA_BR_HELLO_TIMER | ||
| 555 | * The bridge hello timer, read only. | ||
| 556 | * | ||
| 557 | * @IFLA_BR_TCN_TIMER | ||
| 558 | * The bridge tcn timer, read only. | ||
| 559 | * | ||
| 560 | * @IFLA_BR_TOPOLOGY_CHANGE_TIMER | ||
| 561 | * The bridge topology change timer, read only. | ||
| 562 | * | ||
| 563 | * @IFLA_BR_GC_TIMER | ||
| 564 | * The bridge gc timer, read only. | ||
| 565 | * | ||
| 566 | * @IFLA_BR_GROUP_ADDR | ||
| 567 | * Set the MAC address of the multicast group this bridge uses for STP. | ||
| 568 | * The address must be a link-local address in standard Ethernet MAC address | ||
| 569 | * format. It is an address of the form 01:80:C2:00:00:0X, with X in [0, 4..f]. | ||
| 570 | * | ||
| 571 | * The default value is 0. | ||
| 572 | * | ||
| 573 | * @IFLA_BR_FDB_FLUSH | ||
| 574 | * Flush bridge's fdb dynamic entries. | ||
| 575 | * | ||
| 576 | * @IFLA_BR_MCAST_ROUTER | ||
| 577 | * Set bridge's multicast router if IGMP snooping is enabled. | ||
| 578 | * The valid values are: | ||
| 579 | * | ||
| 580 | * * 0 - disabled. | ||
| 581 | * * 1 - automatic (queried). | ||
| 582 | * * 2 - permanently enabled. | ||
| 583 | * | ||
| 584 | * The default value is 1. | ||
| 585 | * | ||
| 586 | * @IFLA_BR_MCAST_SNOOPING | ||
| 587 | * Turn multicast snooping on (*IFLA_BR_MCAST_SNOOPING* > 0) or off | ||
| 588 | * (*IFLA_BR_MCAST_SNOOPING* == 0). | ||
| 589 | * | ||
| 590 | * The default value is 1. | ||
| 591 | * | ||
| 592 | * @IFLA_BR_MCAST_QUERY_USE_IFADDR | ||
| 593 | * If enabled use the bridge's own IP address as source address for IGMP | ||
| 594 | * queries (*IFLA_BR_MCAST_QUERY_USE_IFADDR* > 0) or the default of 0.0.0.0 | ||
| 595 | * (*IFLA_BR_MCAST_QUERY_USE_IFADDR* == 0). | ||
| 596 | * | ||
| 597 | * The default value is 0 (disabled). | ||
| 598 | * | ||
| 599 | * @IFLA_BR_MCAST_QUERIER | ||
| 600 | * Enable (*IFLA_BR_MULTICAST_QUERIER* > 0) or disable | ||
| 601 | * (*IFLA_BR_MULTICAST_QUERIER* == 0) IGMP querier, ie sending of multicast | ||
| 602 | * queries by the bridge. | ||
| 603 | * | ||
| 604 | * The default value is 0 (disabled). | ||
| 605 | * | ||
| 606 | * @IFLA_BR_MCAST_HASH_ELASTICITY | ||
| 607 | * Set multicast database hash elasticity, It is the maximum chain length in | ||
| 608 | * the multicast hash table. This attribute is *deprecated* and the value | ||
| 609 | * is always 16. | ||
| 610 | * | ||
| 611 | * @IFLA_BR_MCAST_HASH_MAX | ||
| 612 | * Set maximum size of the multicast hash table | ||
| 613 | * | ||
| 614 | * The default value is 4096, the value must be a power of 2. | ||
| 615 | * | ||
| 616 | * @IFLA_BR_MCAST_LAST_MEMBER_CNT | ||
| 617 | * The Last Member Query Count is the number of Group-Specific Queries | ||
| 618 | * sent before the router assumes there are no local members. The Last | ||
| 619 | * Member Query Count is also the number of Group-and-Source-Specific | ||
| 620 | * Queries sent before the router assumes there are no listeners for a | ||
| 621 | * particular source. | ||
| 622 | * | ||
| 623 | * The default value is 2. | ||
| 624 | * | ||
| 625 | * @IFLA_BR_MCAST_STARTUP_QUERY_CNT | ||
| 626 | * The Startup Query Count is the number of Queries sent out on startup, | ||
| 627 | * separated by the Startup Query Interval. | ||
| 628 | * | ||
| 629 | * The default value is 2. | ||
| 630 | * | ||
| 631 | * @IFLA_BR_MCAST_LAST_MEMBER_INTVL | ||
| 632 | * The Last Member Query Interval is the Max Response Time inserted into | ||
| 633 | * Group-Specific Queries sent in response to Leave Group messages, and | ||
| 634 | * is also the amount of time between Group-Specific Query messages. | ||
| 635 | * | ||
| 636 | * The default value is (1 * USER_HZ). | ||
| 637 | * | ||
| 638 | * @IFLA_BR_MCAST_MEMBERSHIP_INTVL | ||
| 639 | * The interval after which the bridge will leave a group, if no membership | ||
| 640 | * reports for this group are received. | ||
| 641 | * | ||
| 642 | * The default value is (260 * USER_HZ). | ||
| 643 | * | ||
| 644 | * @IFLA_BR_MCAST_QUERIER_INTVL | ||
| 645 | * The interval between queries sent by other routers. if no queries are | ||
| 646 | * seen after this delay has passed, the bridge will start to send its own | ||
| 647 | * queries (as if *IFLA_BR_MCAST_QUERIER_INTVL* was enabled). | ||
| 648 | * | ||
| 649 | * The default value is (255 * USER_HZ). | ||
| 650 | * | ||
| 651 | * @IFLA_BR_MCAST_QUERY_INTVL | ||
| 652 | * The Query Interval is the interval between General Queries sent by | ||
| 653 | * the Querier. | ||
| 654 | * | ||
| 655 | * The default value is (125 * USER_HZ). The minimum value is (1 * USER_HZ). | ||
| 656 | * | ||
| 657 | * @IFLA_BR_MCAST_QUERY_RESPONSE_INTVL | ||
| 658 | * The Max Response Time used to calculate the Max Resp Code inserted | ||
| 659 | * into the periodic General Queries. | ||
| 660 | * | ||
| 661 | * The default value is (10 * USER_HZ). | ||
| 662 | * | ||
| 663 | * @IFLA_BR_MCAST_STARTUP_QUERY_INTVL | ||
| 664 | * The interval between queries in the startup phase. | ||
| 665 | * | ||
| 666 | * The default value is (125 * USER_HZ) / 4. The minimum value is (1 * USER_HZ). | ||
| 667 | * | ||
| 668 | * @IFLA_BR_NF_CALL_IPTABLES | ||
| 669 | * Enable (*NF_CALL_IPTABLES* > 0) or disable (*NF_CALL_IPTABLES* == 0) | ||
| 670 | * iptables hooks on the bridge. | ||
| 671 | * | ||
| 672 | * The default value is 0 (disabled). | ||
| 673 | * | ||
| 674 | * @IFLA_BR_NF_CALL_IP6TABLES | ||
| 675 | * Enable (*NF_CALL_IP6TABLES* > 0) or disable (*NF_CALL_IP6TABLES* == 0) | ||
| 676 | * ip6tables hooks on the bridge. | ||
| 677 | * | ||
| 678 | * The default value is 0 (disabled). | ||
| 679 | * | ||
| 680 | * @IFLA_BR_NF_CALL_ARPTABLES | ||
| 681 | * Enable (*NF_CALL_ARPTABLES* > 0) or disable (*NF_CALL_ARPTABLES* == 0) | ||
| 682 | * arptables hooks on the bridge. | ||
| 683 | * | ||
| 684 | * The default value is 0 (disabled). | ||
| 685 | * | ||
| 686 | * @IFLA_BR_VLAN_DEFAULT_PVID | ||
| 687 | * VLAN ID applied to untagged and priority-tagged incoming packets. | ||
| 688 | * | ||
| 689 | * The default value is 1. Setting to the special value 0 makes all ports of | ||
| 690 | * this bridge not have a PVID by default, which means that they will | ||
| 691 | * not accept VLAN-untagged traffic. | ||
| 692 | * | ||
| 693 | * @IFLA_BR_PAD | ||
| 694 | * Bridge attribute padding type for netlink message. | ||
| 695 | * | ||
| 696 | * @IFLA_BR_VLAN_STATS_ENABLED | ||
| 697 | * Enable (*IFLA_BR_VLAN_STATS_ENABLED* == 1) or disable | ||
| 698 | * (*IFLA_BR_VLAN_STATS_ENABLED* == 0) per-VLAN stats accounting. | ||
| 699 | * | ||
| 700 | * The default value is 0 (disabled). | ||
| 701 | * | ||
| 702 | * @IFLA_BR_MCAST_STATS_ENABLED | ||
| 703 | * Enable (*IFLA_BR_MCAST_STATS_ENABLED* > 0) or disable | ||
| 704 | * (*IFLA_BR_MCAST_STATS_ENABLED* == 0) multicast (IGMP/MLD) stats | ||
| 705 | * accounting. | ||
| 706 | * | ||
| 707 | * The default value is 0 (disabled). | ||
| 708 | * | ||
| 709 | * @IFLA_BR_MCAST_IGMP_VERSION | ||
| 710 | * Set the IGMP version. | ||
| 711 | * | ||
| 712 | * The valid values are 2 and 3. The default value is 2. | ||
| 713 | * | ||
| 714 | * @IFLA_BR_MCAST_MLD_VERSION | ||
| 715 | * Set the MLD version. | ||
| 716 | * | ||
| 717 | * The valid values are 1 and 2. The default value is 1. | ||
| 718 | * | ||
| 719 | * @IFLA_BR_VLAN_STATS_PER_PORT | ||
| 720 | * Enable (*IFLA_BR_VLAN_STATS_PER_PORT* == 1) or disable | ||
| 721 | * (*IFLA_BR_VLAN_STATS_PER_PORT* == 0) per-VLAN per-port stats accounting. | ||
| 722 | * Can be changed only when there are no port VLANs configured. | ||
| 723 | * | ||
| 724 | * The default value is 0 (disabled). | ||
| 725 | * | ||
| 726 | * @IFLA_BR_MULTI_BOOLOPT | ||
| 727 | * The multi_boolopt is used to control new boolean options to avoid adding | ||
| 728 | * new netlink attributes. You can look at ``enum br_boolopt_id`` for those | ||
| 729 | * options. | ||
| 730 | * | ||
| 731 | * @IFLA_BR_MCAST_QUERIER_STATE | ||
| 732 | * Bridge mcast querier states, read only. | ||
| 733 | * | ||
| 734 | * @IFLA_BR_FDB_N_LEARNED | ||
| 735 | * The number of dynamically learned FDB entries for the current bridge, | ||
| 736 | * read only. | ||
| 737 | * | ||
| 738 | * @IFLA_BR_FDB_MAX_LEARNED | ||
| 739 | * Set the number of max dynamically learned FDB entries for the current | ||
| 740 | * bridge. | ||
| 741 | */ | ||
| 462 | enum { | 742 | enum { |
| 463 | 	IFLA_BR_UNSPEC, | 743 | 	IFLA_BR_UNSPEC, |
| 464 | 	IFLA_BR_FORWARD_DELAY, | 744 | 	IFLA_BR_FORWARD_DELAY, |
| ... | @@ -508,6 +788,8 @@ enum { | ... | @@ -508,6 +788,8 @@ enum { |
| 508 | 	IFLA_BR_VLAN_STATS_PER_PORT, | 788 | 	IFLA_BR_VLAN_STATS_PER_PORT, |
| 509 | 	IFLA_BR_MULTI_BOOLOPT, | 789 | 	IFLA_BR_MULTI_BOOLOPT, |
| 510 | 	IFLA_BR_MCAST_QUERIER_STATE, | 790 | 	IFLA_BR_MCAST_QUERIER_STATE, |
| 791 | 	IFLA_BR_FDB_N_LEARNED, | ||
| 792 | 	IFLA_BR_FDB_MAX_LEARNED, | ||
| 511 | 	__IFLA_BR_MAX, | 793 | 	__IFLA_BR_MAX, |
| 512 | }; | 794 | }; |
| 513 | 795 | ||
| ... | @@ -518,11 +800,252 @@ struct ifla_bridge_id { | ... | @@ -518,11 +800,252 @@ struct ifla_bridge_id { |
| 518 | 	__u8	addr[6]; /* ETH_ALEN */ | 800 | 	__u8	addr[6]; /* ETH_ALEN */ |
| 519 | }; | 801 | }; |
| 520 | 802 | ||
| 803 | /** | ||
| 804 | * DOC: Bridge mode enum definition | ||
| 805 | * | ||
| 806 | * @BRIDGE_MODE_HAIRPIN | ||
| 807 | * Controls whether traffic may be sent back out of the port on which it | ||
| 808 | * was received. This option is also called reflective relay mode, and is | ||
| 809 | * used to support basic VEPA (Virtual Ethernet Port Aggregator) | ||
| 810 | * capabilities. By default, this flag is turned off and the bridge will | ||
| 811 | * not forward traffic back out of the receiving port. | ||
| 812 | */ | ||
| 521 | enum { | 813 | enum { |
| 522 | 	BRIDGE_MODE_UNSPEC, | 814 | 	BRIDGE_MODE_UNSPEC, |
| 523 | 	BRIDGE_MODE_HAIRPIN, | 815 | 	BRIDGE_MODE_HAIRPIN, |
| 524 | }; | 816 | }; |
| 525 | 817 | ||
| 818 | /** | ||
| 819 | * DOC: Bridge port enum definition | ||
| 820 | * | ||
| 821 | * @IFLA_BRPORT_STATE | ||
| 822 | * The operation state of the port. Here are the valid values. | ||
| 823 | * | ||
| 824 | * * 0 - port is in STP *DISABLED* state. Make this port completely | ||
| 825 | * inactive for STP. This is also called BPDU filter and could be used | ||
| 826 | * to disable STP on an untrusted port, like a leaf virtual device. | ||
| 827 | * The traffic forwarding is also stopped on this port. | ||
| 828 | * * 1 - port is in STP *LISTENING* state. Only valid if STP is enabled | ||
| 829 | * on the bridge. In this state the port listens for STP BPDUs and | ||
| 830 | * drops all other traffic frames. | ||
| 831 | * * 2 - port is in STP *LEARNING* state. Only valid if STP is enabled on | ||
| 832 | * the bridge. In this state the port will accept traffic only for the | ||
| 833 | * purpose of updating MAC address tables. | ||
| 834 | * * 3 - port is in STP *FORWARDING* state. Port is fully active. | ||
| 835 | * * 4 - port is in STP *BLOCKING* state. Only valid if STP is enabled on | ||
| 836 | * the bridge. This state is used during the STP election process. | ||
| 837 | * In this state, port will only process STP BPDUs. | ||
| 838 | * | ||
| 839 | * @IFLA_BRPORT_PRIORITY | ||
| 840 | * The STP port priority. The valid values are between 0 and 255. | ||
| 841 | * | ||
| 842 | * @IFLA_BRPORT_COST | ||
| 843 | * The STP path cost of the port. The valid values are between 1 and 65535. | ||
| 844 | * | ||
| 845 | * @IFLA_BRPORT_MODE | ||
| 846 | * Set the bridge port mode. See *BRIDGE_MODE_HAIRPIN* for more details. | ||
| 847 | * | ||
| 848 | * @IFLA_BRPORT_GUARD | ||
| 849 | * Controls whether STP BPDUs will be processed by the bridge port. By | ||
| 850 | * default, the flag is turned off to allow BPDU processing. Turning this | ||
| 851 | * flag on will disable the bridge port if a STP BPDU packet is received. | ||
| 852 | * | ||
| 853 | * If the bridge has Spanning Tree enabled, hostile devices on the network | ||
| 854 | * may send BPDU on a port and cause network failure. Setting *guard on* | ||
| 855 | * will detect and stop this by disabling the port. The port will be | ||
| 856 | * restarted if the link is brought down, or removed and reattached. | ||
| 857 | * | ||
| 858 | * @IFLA_BRPORT_PROTECT | ||
| 859 | * Controls whether a given port is allowed to become a root port or not. | ||
| 860 | * Only used when STP is enabled on the bridge. By default the flag is off. | ||
| 861 | * | ||
| 862 | * This feature is also called root port guard. If BPDU is received from a | ||
| 863 | * leaf (edge) port, it should not be elected as root port. This could | ||
| 864 | * be used if using STP on a bridge and the downstream bridges are not fully | ||
| 865 | * trusted; this prevents a hostile guest from rerouting traffic. | ||
| 866 | * | ||
| 867 | * @IFLA_BRPORT_FAST_LEAVE | ||
| 868 | * This flag allows the bridge to immediately stop multicast traffic | ||
| 869 | * forwarding on a port that receives an IGMP Leave message. It is only used | ||
| 870 | * when IGMP snooping is enabled on the bridge. By default the flag is off. | ||
| 871 | * | ||
| 872 | * @IFLA_BRPORT_LEARNING | ||
| 873 | * Controls whether a given port will learn *source* MAC addresses from | ||
| 874 | * received traffic or not. Also controls whether dynamic FDB entries | ||
| 875 | * (which can also be added by software) will be refreshed by incoming | ||
| 876 | * traffic. By default this flag is on. | ||
| 877 | * | ||
| 878 | * @IFLA_BRPORT_UNICAST_FLOOD | ||
| 879 | * Controls whether unicast traffic for which there is no FDB entry will | ||
| 880 | * be flooded towards this port. By default this flag is on. | ||
| 881 | * | ||
| 882 | * @IFLA_BRPORT_PROXYARP | ||
| 883 | * Enable proxy ARP on this port. | ||
| 884 | * | ||
| 885 | * @IFLA_BRPORT_LEARNING_SYNC | ||
| 886 | * Controls whether a given port will sync MAC addresses learned on device | ||
| 887 | * port to bridge FDB. | ||
| 888 | * | ||
| 889 | * @IFLA_BRPORT_PROXYARP_WIFI | ||
| 890 | * Enable proxy ARP on this port which meets extended requirements by | ||
| 891 | * IEEE 802.11 and Hotspot 2.0 specifications. | ||
| 892 | * | ||
| 893 | * @IFLA_BRPORT_ROOT_ID | ||
| 894 | * | ||
| 895 | * @IFLA_BRPORT_BRIDGE_ID | ||
| 896 | * | ||
| 897 | * @IFLA_BRPORT_DESIGNATED_PORT | ||
| 898 | * | ||
| 899 | * @IFLA_BRPORT_DESIGNATED_COST | ||
| 900 | * | ||
| 901 | * @IFLA_BRPORT_ID | ||
| 902 | * | ||
| 903 | * @IFLA_BRPORT_NO | ||
| 904 | * | ||
| 905 | * @IFLA_BRPORT_TOPOLOGY_CHANGE_ACK | ||
| 906 | * | ||
| 907 | * @IFLA_BRPORT_CONFIG_PENDING | ||
| 908 | * | ||
| 909 | * @IFLA_BRPORT_MESSAGE_AGE_TIMER | ||
| 910 | * | ||
| 911 | * @IFLA_BRPORT_FORWARD_DELAY_TIMER | ||
| 912 | * | ||
| 913 | * @IFLA_BRPORT_HOLD_TIMER | ||
| 914 | * | ||
| 915 | * @IFLA_BRPORT_FLUSH | ||
| 916 | * Flush bridge ports' fdb dynamic entries. | ||
| 917 | * | ||
| 918 | * @IFLA_BRPORT_MULTICAST_ROUTER | ||
| 919 | * Configure the port's multicast router presence. A port with | ||
| 920 | * a multicast router will receive all multicast traffic. | ||
| 921 | * The valid values are: | ||
| 922 | * | ||
| 923 | * * 0 disable multicast routers on this port | ||
| 924 | * * 1 let the system detect the presence of routers (default) | ||
| 925 | * * 2 permanently enable multicast traffic forwarding on this port | ||
| 926 | * * 3 enable multicast routers temporarily on this port, not depending | ||
| 927 | * on incoming queries. | ||
| 928 | * | ||
| 929 | * @IFLA_BRPORT_PAD | ||
| 930 | * | ||
| 931 | * @IFLA_BRPORT_MCAST_FLOOD | ||
| 932 | * Controls whether a given port will flood multicast traffic for which | ||
| 933 | * there is no MDB entry. By default this flag is on. | ||
| 934 | * | ||
| 935 | * @IFLA_BRPORT_MCAST_TO_UCAST | ||
| 936 | * Controls whether a given port will replicate packets using unicast | ||
| 937 | * instead of multicast. By default this flag is off. | ||
| 938 | * | ||
| 939 | * This is done by copying the packet per host and changing the multicast | ||
| 940 | * destination MAC to a unicast one accordingly. | ||
| 941 | * | ||
| 942 | * *mcast_to_unicast* works on top of the multicast snooping feature of the | ||
| 943 | * bridge. Which means unicast copies are only delivered to hosts which | ||
| 944 | * are interested in unicast and signaled this via IGMP/MLD reports previously. | ||
| 945 | * | ||
| 946 | * This feature is intended for interface types which have a more reliable | ||
| 947 | * and/or efficient way to deliver unicast packets than broadcast ones | ||
| 948 | * (e.g. WiFi). | ||
| 949 | * | ||
| 950 | * However, it should only be enabled on interfaces where no IGMPv2/MLDv1 | ||
| 951 | * report suppression takes place. IGMP/MLD report suppression issue is | ||
| 952 | * usually overcome by the network daemon (supplicant) enabling AP isolation | ||
| 953 | * and by that separating all STAs. | ||
| 954 | * | ||
| 955 | * Delivery of STA-to-STA IP multicast is made possible again by enabling | ||
| 956 | * and utilizing the bridge hairpin mode, which considers the incoming port | ||
| 957 | * as a potential outgoing port, too (see *BRIDGE_MODE_HAIRPIN* option). | ||
| 958 | * Hairpin mode is performed after multicast snooping, therefore leading | ||
| 959 | * to only deliver reports to STAs running a multicast router. | ||
| 960 | * | ||
| 961 | * @IFLA_BRPORT_VLAN_TUNNEL | ||
| 962 | * Controls whether vlan to tunnel mapping is enabled on the port. | ||
| 963 | * By default this flag is off. | ||
| 964 | * | ||
| 965 | * @IFLA_BRPORT_BCAST_FLOOD | ||
| 966 | * Controls flooding of broadcast traffic on the given port. By default | ||
| 967 | * this flag is on. | ||
| 968 | * | ||
| 969 | * @IFLA_BRPORT_GROUP_FWD_MASK | ||
| 970 | * Set the group forward mask. This is a bitmask that is applied to | ||
| 971 | * decide whether to forward incoming frames destined to link-local | ||
| 972 | * addresses. The addresses of the form are 01:80:C2:00:00:0X (defaults | ||
| 973 | * to 0, which means the bridge does not forward any link-local frames | ||
| 974 | * coming on this port). | ||
| 975 | * | ||
| 976 | * @IFLA_BRPORT_NEIGH_SUPPRESS | ||
| 977 | * Controls whether neighbor discovery (arp and nd) proxy and suppression | ||
| 978 | * is enabled on the port. By default this flag is off. | ||
| 979 | * | ||
| 980 | * @IFLA_BRPORT_ISOLATED | ||
| 981 | * Controls whether a given port will be isolated, which means it will be | ||
| 982 | * able to communicate with non-isolated ports only. By default this | ||
| 983 | * flag is off. | ||
| 984 | * | ||
| 985 | * @IFLA_BRPORT_BACKUP_PORT | ||
| 986 | * Set a backup port. If the port loses carrier all traffic will be | ||
| 987 | * redirected to the configured backup port. Set the value to 0 to disable | ||
| 988 | * it. | ||
| 989 | * | ||
| 990 | * @IFLA_BRPORT_MRP_RING_OPEN | ||
| 991 | * | ||
| 992 | * @IFLA_BRPORT_MRP_IN_OPEN | ||
| 993 | * | ||
| 994 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT | ||
| 995 | * The number of per-port EHT hosts limit. The default value is 512. | ||
| 996 | * Setting to 0 is not allowed. | ||
| 997 | * | ||
| 998 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_CNT | ||
| 999 | * The current number of tracked hosts, read only. | ||
| 1000 | * | ||
| 1001 | * @IFLA_BRPORT_LOCKED | ||
| 1002 | * Controls whether a port will be locked, meaning that hosts behind the | ||
| 1003 | * port will not be able to communicate through the port unless an FDB | ||
| 1004 | * entry with the unit's MAC address is in the FDB. The common use case is | ||
| 1005 | * that hosts are allowed access through authentication with the IEEE 802.1X | ||
| 1006 | * protocol or based on whitelists. By default this flag is off. | ||
| 1007 | * | ||
| 1008 | * Please note that secure 802.1X deployments should always use the | ||
| 1009 | * *BR_BOOLOPT_NO_LL_LEARN* flag, to not permit the bridge to populate its | ||
| 1010 | * FDB based on link-local (EAPOL) traffic received on the port. | ||
| 1011 | * | ||
| 1012 | * @IFLA_BRPORT_MAB | ||
| 1013 | * Controls whether a port will use MAC Authentication Bypass (MAB), a | ||
| 1014 | * technique through which select MAC addresses may be allowed on a locked | ||
| 1015 | * port, without using 802.1X authentication. Packets with an unknown source | ||
| 1016 | * MAC address generates a "locked" FDB entry on the incoming bridge port. | ||
| 1017 | * The common use case is for user space to react to these bridge FDB | ||
| 1018 | * notifications and optionally replace the locked FDB entry with a normal | ||
| 1019 | * one, allowing traffic to pass for whitelisted MAC addresses. | ||
| 1020 | * | ||
| 1021 | * Setting this flag also requires *IFLA_BRPORT_LOCKED* and | ||
| 1022 | * *IFLA_BRPORT_LEARNING*. *IFLA_BRPORT_LOCKED* ensures that unauthorized | ||
| 1023 | * data packets are dropped, and *IFLA_BRPORT_LEARNING* allows the dynamic | ||
| 1024 | * FDB entries installed by user space (as replacements for the locked FDB | ||
| 1025 | * entries) to be refreshed and/or aged out. | ||
| 1026 | * | ||
| 1027 | * @IFLA_BRPORT_MCAST_N_GROUPS | ||
| 1028 | * | ||
| 1029 | * @IFLA_BRPORT_MCAST_MAX_GROUPS | ||
| 1030 | * Sets the maximum number of MDB entries that can be registered for a | ||
| 1031 | * given port. Attempts to register more MDB entries at the port than this | ||
| 1032 | * limit allows will be rejected, whether they are done through netlink | ||
| 1033 | * (e.g. the bridge tool), or IGMP or MLD membership reports. Setting a | ||
| 1034 | * limit of 0 disables the limit. The default value is 0. | ||
| 1035 | * | ||
| 1036 | * @IFLA_BRPORT_NEIGH_VLAN_SUPPRESS | ||
| 1037 | * Controls whether neighbor discovery (arp and nd) proxy and suppression is | ||
| 1038 | * enabled for a given port. By default this flag is off. | ||
| 1039 | * | ||
| 1040 | * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS* | ||
| 1041 | * is enabled for a given port. | ||
| 1042 | * | ||
| 1043 | * @IFLA_BRPORT_BACKUP_NHID | ||
| 1044 | * The FDB nexthop object ID to attach to packets being redirected to a | ||
| 1045 | * backup port that has VLAN tunnel mapping enabled (via the | ||
| 1046 | * *IFLA_BRPORT_VLAN_TUNNEL* option). Setting a value of 0 (default) has | ||
| 1047 | * the effect of not attaching any ID. | ||
| 1048 | */ | ||
| 526 | enum { | 1049 | enum { |
| 527 | 	IFLA_BRPORT_UNSPEC, | 1050 | 	IFLA_BRPORT_UNSPEC, |
| 528 | 	IFLA_BRPORT_STATE,	/* Spanning tree state */ | 1051 | 	IFLA_BRPORT_STATE,	/* Spanning tree state */ |
| ... | @@ -567,6 +1090,8 @@ enum { | ... | @@ -567,6 +1090,8 @@ enum { |
| 567 | 	IFLA_BRPORT_MAB, | 1090 | 	IFLA_BRPORT_MAB, |
| 568 | 	IFLA_BRPORT_MCAST_N_GROUPS, | 1091 | 	IFLA_BRPORT_MCAST_N_GROUPS, |
| 569 | 	IFLA_BRPORT_MCAST_MAX_GROUPS, | 1092 | 	IFLA_BRPORT_MCAST_MAX_GROUPS, |
| 1093 | 	IFLA_BRPORT_NEIGH_VLAN_SUPPRESS, | ||
| 1094 | 	IFLA_BRPORT_BACKUP_NHID, | ||
| 570 | 	__IFLA_BRPORT_MAX | 1095 | 	__IFLA_BRPORT_MAX |
| 571 | }; | 1096 | }; |
| 572 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 1097 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
| ... | @@ -633,6 +1158,7 @@ enum { | ... | @@ -633,6 +1158,7 @@ enum { |
| 633 | 	IFLA_MACVLAN_MACADDR_COUNT, | 1158 | 	IFLA_MACVLAN_MACADDR_COUNT, |
| 634 | 	IFLA_MACVLAN_BC_QUEUE_LEN, | 1159 | 	IFLA_MACVLAN_BC_QUEUE_LEN, |
| 635 | 	IFLA_MACVLAN_BC_QUEUE_LEN_USED, | 1160 | 	IFLA_MACVLAN_BC_QUEUE_LEN_USED, |
| 1161 | 	IFLA_MACVLAN_BC_CUTOFF, | ||
| 636 | 	__IFLA_MACVLAN_MAX, | 1162 | 	__IFLA_MACVLAN_MAX, |
| 637 | }; | 1163 | }; |
| 638 | 1164 | ||
| ... | @@ -751,6 +1277,30 @@ struct tunnel_msg { | ... | @@ -751,6 +1277,30 @@ struct tunnel_msg { |
| 751 | 	__u32 ifindex; | 1277 | 	__u32 ifindex; |
| 752 | }; | 1278 | }; |
| 753 | 1279 | ||
| 1280 | /* netkit section */ | ||
| 1281 | enum netkit_action { | ||
| 1282 | 	NETKIT_NEXT	= -1, | ||
| 1283 | 	NETKIT_PASS	= 0, | ||
| 1284 | 	NETKIT_DROP	= 2, | ||
| 1285 | 	NETKIT_REDIRECT	= 7, | ||
| 1286 | }; | ||
| 1287 | |||
| 1288 | enum netkit_mode { | ||
| 1289 | 	NETKIT_L2, | ||
| 1290 | 	NETKIT_L3, | ||
| 1291 | }; | ||
| 1292 | |||
| 1293 | enum { | ||
| 1294 | 	IFLA_NETKIT_UNSPEC, | ||
| 1295 | 	IFLA_NETKIT_PEER_INFO, | ||
| 1296 | 	IFLA_NETKIT_PRIMARY, | ||
| 1297 | 	IFLA_NETKIT_POLICY, | ||
| 1298 | 	IFLA_NETKIT_PEER_POLICY, | ||
| 1299 | 	IFLA_NETKIT_MODE, | ||
| 1300 | 	__IFLA_NETKIT_MAX, | ||
| 1301 | }; | ||
| 1302 | #define IFLA_NETKIT_MAX	(__IFLA_NETKIT_MAX - 1) | ||
| 1303 | |||
| 754 | /* VXLAN section */ | 1304 | /* VXLAN section */ |
| 755 | 1305 | ||
| 756 | /* include statistics in the dump */ | 1306 | /* include statistics in the dump */ |
| ... | @@ -824,6 +1374,8 @@ enum { | ... | @@ -824,6 +1374,8 @@ enum { |
| 824 | 	IFLA_VXLAN_TTL_INHERIT, | 1374 | 	IFLA_VXLAN_TTL_INHERIT, |
| 825 | 	IFLA_VXLAN_DF, | 1375 | 	IFLA_VXLAN_DF, |
| 826 | 	IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ | 1376 | 	IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ |
| 1377 | 	IFLA_VXLAN_LOCALBYPASS, | ||
| 1378 | 	IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ | ||
| 827 | 	__IFLA_VXLAN_MAX | 1379 | 	__IFLA_VXLAN_MAX |
| 828 | }; | 1380 | }; |
| 829 | #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1) | 1381 | #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1) |
| ... | @@ -841,6 +1393,13 @@ enum ifla_vxlan_df { | ... | @@ -841,6 +1393,13 @@ enum ifla_vxlan_df { |
| 841 | 	VXLAN_DF_MAX = __VXLAN_DF_END - 1, | 1393 | 	VXLAN_DF_MAX = __VXLAN_DF_END - 1, |
| 842 | }; | 1394 | }; |
| 843 | 1395 | ||
| 1396 | enum ifla_vxlan_label_policy { | ||
| 1397 | 	VXLAN_LABEL_FIXED = 0, | ||
| 1398 | 	VXLAN_LABEL_INHERIT = 1, | ||
| 1399 | 	__VXLAN_LABEL_END, | ||
| 1400 | 	VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1, | ||
| 1401 | }; | ||
| 1402 | |||
| 844 | /* GENEVE section */ | 1403 | /* GENEVE section */ |
| 845 | enum { | 1404 | enum { |
| 846 | 	IFLA_GENEVE_UNSPEC, | 1405 | 	IFLA_GENEVE_UNSPEC, |
| ... | @@ -905,6 +1464,8 @@ enum { | ... | @@ -905,6 +1464,8 @@ enum { |
| 905 | 	IFLA_GTP_ROLE, | 1464 | 	IFLA_GTP_ROLE, |
| 906 | 	IFLA_GTP_CREATE_SOCKETS, | 1465 | 	IFLA_GTP_CREATE_SOCKETS, |
| 907 | 	IFLA_GTP_RESTART_COUNT, | 1466 | 	IFLA_GTP_RESTART_COUNT, |
| 1467 | 	IFLA_GTP_LOCAL, | ||
| 1468 | 	IFLA_GTP_LOCAL6, | ||
| 908 | 	__IFLA_GTP_MAX, | 1469 | 	__IFLA_GTP_MAX, |
| 909 | }; | 1470 | }; |
| 910 | #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) | 1471 | #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) |
| ... | @@ -944,6 +1505,7 @@ enum { | ... | @@ -944,6 +1505,7 @@ enum { |
| 944 | 	IFLA_BOND_AD_LACP_ACTIVE, | 1505 | 	IFLA_BOND_AD_LACP_ACTIVE, |
| 945 | 	IFLA_BOND_MISSED_MAX, | 1506 | 	IFLA_BOND_MISSED_MAX, |
| 946 | 	IFLA_BOND_NS_IP6_TARGET, | 1507 | 	IFLA_BOND_NS_IP6_TARGET, |
| 1508 | 	IFLA_BOND_COUPLED_CONTROL, | ||
| 947 | 	__IFLA_BOND_MAX, | 1509 | 	__IFLA_BOND_MAX, |
| 948 | }; | 1510 | }; |
| 949 | 1511 | ||
| ... | @@ -1209,6 +1771,7 @@ enum { | ... | @@ -1209,6 +1771,7 @@ enum { |
| 1209 | 	IFLA_HSR_PROTOCOL,		/* Indicate different protocol than | 1771 | 	IFLA_HSR_PROTOCOL,		/* Indicate different protocol than |
| 1210 | 					 * HSR. For example PRP. | 1772 | 					 * HSR. For example PRP. |
| 1211 | 					 */ | 1773 | 					 */ |
| 1774 | 	IFLA_HSR_INTERLINK,		/* HSR interlink network device */ | ||
| 1212 | 	__IFLA_HSR_MAX, | 1775 | 	__IFLA_HSR_MAX, |
| 1213 | }; | 1776 | }; |
| 1214 | 1777 | ||
| ... | @@ -1386,7 +1949,9 @@ enum { | ... | @@ -1386,7 +1949,9 @@ enum { |
| 1386 | 1949 | ||
| 1387 | enum { | 1950 | enum { |
| 1388 | 	IFLA_DSA_UNSPEC, | 1951 | 	IFLA_DSA_UNSPEC, |
| 1389 | 	IFLA_DSA_MASTER, | 1952 | 	IFLA_DSA_CONDUIT, |
| 1953 | 	/* Deprecated, use IFLA_DSA_CONDUIT instead */ | ||
| 1954 | 	IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, | ||
| 1390 | 	__IFLA_DSA_MAX, | 1955 | 	__IFLA_DSA_MAX, |
| 1391 | }; | 1956 | }; |
| 1392 | 1957 |
lib/libc/include/any-linux-any/linux/if_packet.h+1| ... | @@ -59,6 +59,7 @@ struct sockaddr_ll { | ... | @@ -59,6 +59,7 @@ struct sockaddr_ll { |
| 59 | #define PACKET_ROLLOVER_STATS		21 | 59 | #define PACKET_ROLLOVER_STATS		21 |
| 60 | #define PACKET_FANOUT_DATA		22 | 60 | #define PACKET_FANOUT_DATA		22 |
| 61 | #define PACKET_IGNORE_OUTGOING		23 | 61 | #define PACKET_IGNORE_OUTGOING		23 |
| 62 | #define PACKET_VNET_HDR_SZ		24 | ||
| 62 | 63 | ||
| 63 | #define PACKET_FANOUT_HASH		0 | 64 | #define PACKET_FANOUT_HASH		0 |
| 64 | #define PACKET_FANOUT_LB		1 | 65 | #define PACKET_FANOUT_LB		1 |
lib/libc/include/any-linux-any/linux/if_team.h+43-73| ... | @@ -1,108 +1,78 @@ | ... | @@ -1,108 +1,78 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
| 2 | /* | 2 | /* Do not edit directly, auto-generated from: */ |
| 3 | * include/linux/if_team.h - Network team device driver header | 3 | /*	Documentation/netlink/specs/team.yaml */ |
| 4 | * Copyright (c) 2011 Jiri Pirko <jpirko@redhat.com> | 4 | /* YNL-GEN uapi header */ |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | 5 | ||
| 12 | #ifndef _LINUX_IF_TEAM_H_ | 6 | #ifndef _LINUX_IF_TEAM_H |
| 13 | #define _LINUX_IF_TEAM_H_ | 7 | #define _LINUX_IF_TEAM_H |
| 14 | 8 | ||
| 9 | #define TEAM_GENL_NAME		"team" | ||
| 10 | #define TEAM_GENL_VERSION	1 | ||
| 15 | 11 | ||
| 16 | #define TEAM_STRING_MAX_LEN 32 | 12 | #define TEAM_STRING_MAX_LEN			32 |
| 17 | 13 | #define TEAM_GENL_CHANGE_EVENT_MC_GRP_NAME	"change_event" | |
| 18 | /********************************** | ||
| 19 | * NETLINK_GENERIC netlink family. | ||
| 20 | **********************************/ | ||
| 21 | |||
| 22 | enum { | ||
| 23 | 	TEAM_CMD_NOOP, | ||
| 24 | 	TEAM_CMD_OPTIONS_SET, | ||
| 25 | 	TEAM_CMD_OPTIONS_GET, | ||
| 26 | 	TEAM_CMD_PORT_LIST_GET, | ||
| 27 | |||
| 28 | 	__TEAM_CMD_MAX, | ||
| 29 | 	TEAM_CMD_MAX = (__TEAM_CMD_MAX - 1), | ||
| 30 | }; | ||
| 31 | 14 | ||
| 32 | enum { | 15 | enum { |
| 33 | 	TEAM_ATTR_UNSPEC, | 16 | 	TEAM_ATTR_UNSPEC, |
| 34 | 	TEAM_ATTR_TEAM_IFINDEX,		/* u32 */ | 17 | 	TEAM_ATTR_TEAM_IFINDEX, |
| 35 | 	TEAM_ATTR_LIST_OPTION,		/* nest */ | 18 | 	TEAM_ATTR_LIST_OPTION, |
| 36 | 	TEAM_ATTR_LIST_PORT,		/* nest */ | 19 | 	TEAM_ATTR_LIST_PORT, |
| 37 | 20 | ||
| 38 | 	__TEAM_ATTR_MAX, | 21 | 	__TEAM_ATTR_MAX, |
| 39 | 	TEAM_ATTR_MAX = __TEAM_ATTR_MAX - 1, | 22 | 	TEAM_ATTR_MAX = (__TEAM_ATTR_MAX - 1) |
| 40 | }; | 23 | }; |
| 41 | 24 | ||
| 42 | /* Nested layout of get/set msg: | ||
| 43 | * | ||
| 44 | *	[TEAM_ATTR_LIST_OPTION] | ||
| 45 | *		[TEAM_ATTR_ITEM_OPTION] | ||
| 46 | *			[TEAM_ATTR_OPTION_*], ... | ||
| 47 | *		[TEAM_ATTR_ITEM_OPTION] | ||
| 48 | *			[TEAM_ATTR_OPTION_*], ... | ||
| 49 | *		... | ||
| 50 | *	[TEAM_ATTR_LIST_PORT] | ||
| 51 | *		[TEAM_ATTR_ITEM_PORT] | ||
| 52 | *			[TEAM_ATTR_PORT_*], ... | ||
| 53 | *		[TEAM_ATTR_ITEM_PORT] | ||
| 54 | *			[TEAM_ATTR_PORT_*], ... | ||
| 55 | *		... | ||
| 56 | */ | ||
| 57 | |||
| 58 | enum { | 25 | enum { |
| 59 | 	TEAM_ATTR_ITEM_OPTION_UNSPEC, | 26 | 	TEAM_ATTR_ITEM_OPTION_UNSPEC, |
| 60 | 	TEAM_ATTR_ITEM_OPTION,		/* nest */ | 27 | 	TEAM_ATTR_ITEM_OPTION, |
| 61 | 28 | ||
| 62 | 	__TEAM_ATTR_ITEM_OPTION_MAX, | 29 | 	__TEAM_ATTR_ITEM_OPTION_MAX, |
| 63 | 	TEAM_ATTR_ITEM_OPTION_MAX = __TEAM_ATTR_ITEM_OPTION_MAX - 1, | 30 | 	TEAM_ATTR_ITEM_OPTION_MAX = (__TEAM_ATTR_ITEM_OPTION_MAX - 1) |
| 64 | }; | 31 | }; |
| 65 | 32 | ||
| 66 | enum { | 33 | enum { |
| 67 | 	TEAM_ATTR_OPTION_UNSPEC, | 34 | 	TEAM_ATTR_OPTION_UNSPEC, |
| 68 | 	TEAM_ATTR_OPTION_NAME,		/* string */ | 35 | 	TEAM_ATTR_OPTION_NAME, |
| 69 | 	TEAM_ATTR_OPTION_CHANGED,	/* flag */ | 36 | 	TEAM_ATTR_OPTION_CHANGED, |
| 70 | 	TEAM_ATTR_OPTION_TYPE,		/* u8 */ | 37 | 	TEAM_ATTR_OPTION_TYPE, |
| 71 | 	TEAM_ATTR_OPTION_DATA,		/* dynamic */ | 38 | 	TEAM_ATTR_OPTION_DATA, |
| 72 | 	TEAM_ATTR_OPTION_REMOVED,	/* flag */ | 39 | 	TEAM_ATTR_OPTION_REMOVED, |
| 73 | 	TEAM_ATTR_OPTION_PORT_IFINDEX,	/* u32 */ /* for per-port options */ | 40 | 	TEAM_ATTR_OPTION_PORT_IFINDEX, |
| 74 | 	TEAM_ATTR_OPTION_ARRAY_INDEX,	/* u32 */ /* for array options */ | 41 | 	TEAM_ATTR_OPTION_ARRAY_INDEX, |
| 75 | 42 | ||
| 76 | 	__TEAM_ATTR_OPTION_MAX, | 43 | 	__TEAM_ATTR_OPTION_MAX, |
| 77 | 	TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, | 44 | 	TEAM_ATTR_OPTION_MAX = (__TEAM_ATTR_OPTION_MAX - 1) |
| 78 | }; | 45 | }; |
| 79 | 46 | ||
| 80 | enum { | 47 | enum { |
| 81 | 	TEAM_ATTR_ITEM_PORT_UNSPEC, | 48 | 	TEAM_ATTR_ITEM_PORT_UNSPEC, |
| 82 | 	TEAM_ATTR_ITEM_PORT,		/* nest */ | 49 | 	TEAM_ATTR_ITEM_PORT, |
| 83 | 50 | ||
| 84 | 	__TEAM_ATTR_ITEM_PORT_MAX, | 51 | 	__TEAM_ATTR_ITEM_PORT_MAX, |
| 85 | 	TEAM_ATTR_ITEM_PORT_MAX = __TEAM_ATTR_ITEM_PORT_MAX - 1, | 52 | 	TEAM_ATTR_ITEM_PORT_MAX = (__TEAM_ATTR_ITEM_PORT_MAX - 1) |
| 86 | }; | 53 | }; |
| 87 | 54 | ||
| 88 | enum { | 55 | enum { |
| 89 | 	TEAM_ATTR_PORT_UNSPEC, | 56 | 	TEAM_ATTR_PORT_UNSPEC, |
| 90 | 	TEAM_ATTR_PORT_IFINDEX,		/* u32 */ | 57 | 	TEAM_ATTR_PORT_IFINDEX, |
| 91 | 	TEAM_ATTR_PORT_CHANGED,		/* flag */ | 58 | 	TEAM_ATTR_PORT_CHANGED, |
| 92 | 	TEAM_ATTR_PORT_LINKUP,		/* flag */ | 59 | 	TEAM_ATTR_PORT_LINKUP, |
| 93 | 	TEAM_ATTR_PORT_SPEED,		/* u32 */ | 60 | 	TEAM_ATTR_PORT_SPEED, |
| 94 | 	TEAM_ATTR_PORT_DUPLEX,		/* u8 */ | 61 | 	TEAM_ATTR_PORT_DUPLEX, |
| 95 | 	TEAM_ATTR_PORT_REMOVED,		/* flag */ | 62 | 	TEAM_ATTR_PORT_REMOVED, |
| 96 | 63 | ||
| 97 | 	__TEAM_ATTR_PORT_MAX, | 64 | 	__TEAM_ATTR_PORT_MAX, |
| 98 | 	TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1, | 65 | 	TEAM_ATTR_PORT_MAX = (__TEAM_ATTR_PORT_MAX - 1) |
| 99 | }; | 66 | }; |
| 100 | 67 | ||
| 101 | /* | 68 | enum { |
| 102 | * NETLINK_GENERIC related info | 69 | 	TEAM_CMD_NOOP, |
| 103 | */ | 70 | 	TEAM_CMD_OPTIONS_SET, |
| 104 | #define TEAM_GENL_NAME "team" | 71 | 	TEAM_CMD_OPTIONS_GET, |
| 105 | #define TEAM_GENL_VERSION 0x1 | 72 | 	TEAM_CMD_PORT_LIST_GET, |
| 106 | #define TEAM_GENL_CHANGE_EVENT_MC_GRP_NAME "change_event" | 73 | |
| 74 | 	__TEAM_CMD_MAX, | ||
| 75 | 	TEAM_CMD_MAX = (__TEAM_CMD_MAX - 1) | ||
| 76 | }; | ||
| 107 | 77 | ||
| 108 | #endif /* _LINUX_IF_TEAM_H_ */ | ||
| \ No newline at end of file | |||
| 78 | #endif /* _LINUX_IF_TEAM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/if_tunnel.h+34| ... | @@ -161,6 +161,13 @@ enum { | ... | @@ -161,6 +161,13 @@ enum { |
| 161 | 161 | ||
| 162 | #define IFLA_VTI_MAX	(__IFLA_VTI_MAX - 1) | 162 | #define IFLA_VTI_MAX	(__IFLA_VTI_MAX - 1) |
| 163 | 163 | ||
| 164 | /* Historically, tunnel flags have been defined as __be16 and now there are | ||
| 165 | * no free bits left. It is strongly advised to switch the already existing | ||
| 166 | * userspace code to the new *_BIT definitions from down below, as __be16 | ||
| 167 | * can't be simply cast to a wider type on LE systems. All new flags and | ||
| 168 | * code must use *_BIT only. | ||
| 169 | */ | ||
| 170 | |||
| 164 | #define TUNNEL_CSUM		__cpu_to_be16(0x01) | 171 | #define TUNNEL_CSUM		__cpu_to_be16(0x01) |
| 165 | #define TUNNEL_ROUTING		__cpu_to_be16(0x02) | 172 | #define TUNNEL_ROUTING		__cpu_to_be16(0x02) |
| 166 | #define TUNNEL_KEY		__cpu_to_be16(0x04) | 173 | #define TUNNEL_KEY		__cpu_to_be16(0x04) |
| ... | @@ -182,4 +189,31 @@ enum { | ... | @@ -182,4 +189,31 @@ enum { |
| 182 | 		(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \ | 189 | 		(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \ |
| 183 | 		TUNNEL_GTP_OPT) | 190 | 		TUNNEL_GTP_OPT) |
| 184 | 191 | ||
| 192 | enum { | ||
| 193 | 	IP_TUNNEL_CSUM_BIT		= 0U, | ||
| 194 | 	IP_TUNNEL_ROUTING_BIT, | ||
| 195 | 	IP_TUNNEL_KEY_BIT, | ||
| 196 | 	IP_TUNNEL_SEQ_BIT, | ||
| 197 | 	IP_TUNNEL_STRICT_BIT, | ||
| 198 | 	IP_TUNNEL_REC_BIT, | ||
| 199 | 	IP_TUNNEL_VERSION_BIT, | ||
| 200 | 	IP_TUNNEL_NO_KEY_BIT, | ||
| 201 | 	IP_TUNNEL_DONT_FRAGMENT_BIT, | ||
| 202 | 	IP_TUNNEL_OAM_BIT, | ||
| 203 | 	IP_TUNNEL_CRIT_OPT_BIT, | ||
| 204 | 	IP_TUNNEL_GENEVE_OPT_BIT,	/* OPTIONS_PRESENT */ | ||
| 205 | 	IP_TUNNEL_VXLAN_OPT_BIT,	/* OPTIONS_PRESENT */ | ||
| 206 | 	IP_TUNNEL_NOCACHE_BIT, | ||
| 207 | 	IP_TUNNEL_ERSPAN_OPT_BIT,	/* OPTIONS_PRESENT */ | ||
| 208 | 	IP_TUNNEL_GTP_OPT_BIT,		/* OPTIONS_PRESENT */ | ||
| 209 | |||
| 210 | 	IP_TUNNEL_VTI_BIT, | ||
| 211 | 	IP_TUNNEL_SIT_ISATAP_BIT	= IP_TUNNEL_VTI_BIT, | ||
| 212 | |||
| 213 | 	/* Flags starting from here are not available via the old UAPI */ | ||
| 214 | 	IP_TUNNEL_PFCP_OPT_BIT,		/* OPTIONS_PRESENT */ | ||
| 215 | |||
| 216 | 	__IP_TUNNEL_FLAG_NUM, | ||
| 217 | }; | ||
| 218 | |||
| 185 | #endif /* _IF_TUNNEL_H_ */ | 219 | #endif /* _IF_TUNNEL_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/if_xdp.h+59-1| ... | @@ -25,9 +25,21 @@ | ... | @@ -25,9 +25,21 @@ |
| 25 | * application. | 25 | * application. |
| 26 | */ | 26 | */ |
| 27 | #define XDP_USE_NEED_WAKEUP (1 << 3) | 27 | #define XDP_USE_NEED_WAKEUP (1 << 3) |
| 28 | /* By setting this option, userspace application indicates that it can | ||
| 29 | * handle multiple descriptors per packet thus enabling AF_XDP to split | ||
| 30 | * multi-buffer XDP frames into multiple Rx descriptors. Without this set | ||
| 31 | * such frames will be dropped. | ||
| 32 | */ | ||
| 33 | #define XDP_USE_SG	(1 << 4) | ||
| 28 | 34 | ||
| 29 | /* Flags for xsk_umem_config flags */ | 35 | /* Flags for xsk_umem_config flags */ |
| 30 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) | 36 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG	(1 << 0) |
| 37 | |||
| 38 | /* Force checksum calculation in software. Can be used for testing or | ||
| 39 | * working around potential HW issues. This option causes performance | ||
| 40 | * degradation and only works in XDP_COPY mode. | ||
| 41 | */ | ||
| 42 | #define XDP_UMEM_TX_SW_CSUM		(1 << 1) | ||
| 31 | 43 | ||
| 32 | struct sockaddr_xdp { | 44 | struct sockaddr_xdp { |
| 33 | 	__u16 sxdp_family; | 45 | 	__u16 sxdp_family; |
| ... | @@ -70,6 +82,7 @@ struct xdp_umem_reg { | ... | @@ -70,6 +82,7 @@ struct xdp_umem_reg { |
| 70 | 	__u32 chunk_size; | 82 | 	__u32 chunk_size; |
| 71 | 	__u32 headroom; | 83 | 	__u32 headroom; |
| 72 | 	__u32 flags; | 84 | 	__u32 flags; |
| 85 | 	__u32 tx_metadata_len; | ||
| 73 | }; | 86 | }; |
| 74 | 87 | ||
| 75 | struct xdp_statistics { | 88 | struct xdp_statistics { |
| ... | @@ -99,6 +112,41 @@ struct xdp_options { | ... | @@ -99,6 +112,41 @@ struct xdp_options { |
| 99 | #define XSK_UNALIGNED_BUF_ADDR_MASK \ | 112 | #define XSK_UNALIGNED_BUF_ADDR_MASK \ |
| 100 | 	((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) | 113 | 	((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) |
| 101 | 114 | ||
| 115 | /* Request transmit timestamp. Upon completion, put it into tx_timestamp | ||
| 116 | * field of struct xsk_tx_metadata. | ||
| 117 | */ | ||
| 118 | #define XDP_TXMD_FLAGS_TIMESTAMP		(1 << 0) | ||
| 119 | |||
| 120 | /* Request transmit checksum offload. Checksum start position and offset | ||
| 121 | * are communicated via csum_start and csum_offset fields of struct | ||
| 122 | * xsk_tx_metadata. | ||
| 123 | */ | ||
| 124 | #define XDP_TXMD_FLAGS_CHECKSUM			(1 << 1) | ||
| 125 | |||
| 126 | /* AF_XDP offloads request. 'request' union member is consumed by the driver | ||
| 127 | * when the packet is being transmitted. 'completion' union member is | ||
| 128 | * filled by the driver when the transmit completion arrives. | ||
| 129 | */ | ||
| 130 | struct xsk_tx_metadata { | ||
| 131 | 	__u64 flags; | ||
| 132 | |||
| 133 | 	union { | ||
| 134 | 		struct { | ||
| 135 | 			/* XDP_TXMD_FLAGS_CHECKSUM */ | ||
| 136 | |||
| 137 | 			/* Offset from desc->addr where checksumming should start. */ | ||
| 138 | 			__u16 csum_start; | ||
| 139 | 			/* Offset from csum_start where checksum should be stored. */ | ||
| 140 | 			__u16 csum_offset; | ||
| 141 | 		} request; | ||
| 142 | |||
| 143 | 		struct { | ||
| 144 | 			/* XDP_TXMD_FLAGS_TIMESTAMP */ | ||
| 145 | 			__u64 tx_timestamp; | ||
| 146 | 		} completion; | ||
| 147 | 	}; | ||
| 148 | }; | ||
| 149 | |||
| 102 | /* Rx/Tx descriptor */ | 150 | /* Rx/Tx descriptor */ |
| 103 | struct xdp_desc { | 151 | struct xdp_desc { |
| 104 | 	__u64 addr; | 152 | 	__u64 addr; |
| ... | @@ -108,4 +156,14 @@ struct xdp_desc { | ... | @@ -108,4 +156,14 @@ struct xdp_desc { |
| 108 | 156 | ||
| 109 | /* UMEM descriptor is __u64 */ | 157 | /* UMEM descriptor is __u64 */ |
| 110 | 158 | ||
| 159 | /* Flag indicating that the packet continues with the buffer pointed out by the | ||
| 160 | * next frame in the ring. The end of the packet is signalled by setting this | ||
| 161 | * bit to zero. For single buffer packets, every descriptor has 'options' set | ||
| 162 | * to 0 and this maintains backward compatibility. | ||
| 163 | */ | ||
| 164 | #define XDP_PKT_CONTD (1 << 0) | ||
| 165 | |||
| 166 | /* TX packet carries valid metadata. */ | ||
| 167 | #define XDP_TX_METADATA (1 << 1) | ||
| 168 | |||
| 111 | #endif /* _LINUX_IF_XDP_H */ | 169 | #endif /* _LINUX_IF_XDP_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/iio/types.h+6| ... | @@ -47,6 +47,10 @@ enum iio_chan_type { | ... | @@ -47,6 +47,10 @@ enum iio_chan_type { |
| 47 | 	IIO_POSITIONRELATIVE, | 47 | 	IIO_POSITIONRELATIVE, |
| 48 | 	IIO_PHASE, | 48 | 	IIO_PHASE, |
| 49 | 	IIO_MASSCONCENTRATION, | 49 | 	IIO_MASSCONCENTRATION, |
| 50 | 	IIO_DELTA_ANGL, | ||
| 51 | 	IIO_DELTA_VELOCITY, | ||
| 52 | 	IIO_COLORTEMP, | ||
| 53 | 	IIO_CHROMATICITY, | ||
| 50 | }; | 54 | }; |
| 51 | 55 | ||
| 52 | enum iio_modifier { | 56 | enum iio_modifier { |
| ... | @@ -101,6 +105,8 @@ enum iio_modifier { | ... | @@ -101,6 +105,8 @@ enum iio_modifier { |
| 101 | 	IIO_MOD_PITCH, | 105 | 	IIO_MOD_PITCH, |
| 102 | 	IIO_MOD_YAW, | 106 | 	IIO_MOD_YAW, |
| 103 | 	IIO_MOD_ROLL, | 107 | 	IIO_MOD_ROLL, |
| 108 | 	IIO_MOD_LIGHT_UVA, | ||
| 109 | 	IIO_MOD_LIGHT_UVB, | ||
| 104 | }; | 110 | }; |
| 105 | 111 | ||
| 106 | enum iio_event_type { | 112 | enum iio_event_type { |
lib/libc/include/any-linux-any/linux/in6.h+1-1| ... | @@ -145,7 +145,7 @@ struct in6_flowlabel_req { | ... | @@ -145,7 +145,7 @@ struct in6_flowlabel_req { |
| 145 | #define IPV6_TLV_PADN		1 | 145 | #define IPV6_TLV_PADN		1 |
| 146 | #define IPV6_TLV_ROUTERALERT	5 | 146 | #define IPV6_TLV_ROUTERALERT	5 |
| 147 | #define IPV6_TLV_CALIPSO	7	/* RFC 5570 */ | 147 | #define IPV6_TLV_CALIPSO	7	/* RFC 5570 */ |
| 148 | #define IPV6_TLV_IOAM		49	/* TEMPORARY IANA allocation for IOAM */ | 148 | #define IPV6_TLV_IOAM		49	/* RFC 9486 */ |
| 149 | #define IPV6_TLV_JUMBO		194 | 149 | #define IPV6_TLV_JUMBO		194 |
| 150 | #define IPV6_TLV_HAO		201	/* home address option */ | 150 | #define IPV6_TLV_HAO		201	/* home address option */ |
| 151 | 151 |
lib/libc/include/any-linux-any/linux/inotify.h+2-2| ... | @@ -30,8 +30,8 @@ struct inotify_event { | ... | @@ -30,8 +30,8 @@ struct inotify_event { |
| 30 | #define IN_ACCESS		0x00000001	/* File was accessed */ | 30 | #define IN_ACCESS		0x00000001	/* File was accessed */ |
| 31 | #define IN_MODIFY		0x00000002	/* File was modified */ | 31 | #define IN_MODIFY		0x00000002	/* File was modified */ |
| 32 | #define IN_ATTRIB		0x00000004	/* Metadata changed */ | 32 | #define IN_ATTRIB		0x00000004	/* Metadata changed */ |
| 33 | #define IN_CLOSE_WRITE		0x00000008	/* Writtable file was closed */ | 33 | #define IN_CLOSE_WRITE		0x00000008	/* Writable file was closed */ |
| 34 | #define IN_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */ | 34 | #define IN_CLOSE_NOWRITE	0x00000010	/* Unwritable file closed */ |
| 35 | #define IN_OPEN			0x00000020	/* File was opened */ | 35 | #define IN_OPEN			0x00000020	/* File was opened */ |
| 36 | #define IN_MOVED_FROM		0x00000040	/* File was moved from X */ | 36 | #define IN_MOVED_FROM		0x00000040	/* File was moved from X */ |
| 37 | #define IN_MOVED_TO		0x00000080	/* File was moved to Y */ | 37 | #define IN_MOVED_TO		0x00000080	/* File was moved to Y */ |
lib/libc/include/any-linux-any/linux/input-event-codes.h+3| ... | @@ -602,6 +602,7 @@ | ... | @@ -602,6 +602,7 @@ |
| 602 | 602 | ||
| 603 | #define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */ | 603 | #define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */ |
| 604 | #define KEY_ROTATE_LOCK_TOGGLE	0x231	/* Display rotation lock */ | 604 | #define KEY_ROTATE_LOCK_TOGGLE	0x231	/* Display rotation lock */ |
| 605 | #define KEY_REFRESH_RATE_TOGGLE	0x232	/* Display refresh rate toggle */ | ||
| 605 | 606 | ||
| 606 | #define KEY_BUTTONCONFIG		0x240	/* AL Button Configuration */ | 607 | #define KEY_BUTTONCONFIG		0x240	/* AL Button Configuration */ |
| 607 | #define KEY_TASKMANAGER		0x241	/* AL Task/Project Manager */ | 608 | #define KEY_TASKMANAGER		0x241	/* AL Task/Project Manager */ |
| ... | @@ -617,6 +618,8 @@ | ... | @@ -617,6 +618,8 @@ |
| 617 | #define KEY_CAMERA_ACCESS_ENABLE	0x24b	/* Enables programmatic access to camera devices. (HUTRR72) */ | 618 | #define KEY_CAMERA_ACCESS_ENABLE	0x24b	/* Enables programmatic access to camera devices. (HUTRR72) */ |
| 618 | #define KEY_CAMERA_ACCESS_DISABLE	0x24c	/* Disables programmatic access to camera devices. (HUTRR72) */ | 619 | #define KEY_CAMERA_ACCESS_DISABLE	0x24c	/* Disables programmatic access to camera devices. (HUTRR72) */ |
| 619 | #define KEY_CAMERA_ACCESS_TOGGLE	0x24d	/* Toggles the current state of the camera access control. (HUTRR72) */ | 620 | #define KEY_CAMERA_ACCESS_TOGGLE	0x24d	/* Toggles the current state of the camera access control. (HUTRR72) */ |
| 621 | #define KEY_ACCESSIBILITY		0x24e	/* Toggles the system bound accessibility UI/command (HUTRR116) */ | ||
| 622 | #define KEY_DO_NOT_DISTURB		0x24f	/* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/ | ||
| 620 | 623 | ||
| 621 | #define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */ | 624 | #define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */ |
| 622 | #define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */ | 625 | #define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */ |
lib/libc/include/any-linux-any/linux/io_uring.h+128-26| ... | @@ -43,6 +43,10 @@ struct io_uring_sqe { | ... | @@ -43,6 +43,10 @@ struct io_uring_sqe { |
| 43 | 	union { | 43 | 	union { |
| 44 | 		__u64	addr;	/* pointer to buffer or iovecs */ | 44 | 		__u64	addr;	/* pointer to buffer or iovecs */ |
| 45 | 		__u64	splice_off_in; | 45 | 		__u64	splice_off_in; |
| 46 | 		struct { | ||
| 47 | 			__u32	level; | ||
| 48 | 			__u32	optname; | ||
| 49 | 		}; | ||
| 46 | 	}; | 50 | 	}; |
| 47 | 	__u32	len;		/* buffer size or number of iovecs */ | 51 | 	__u32	len;		/* buffer size or number of iovecs */ |
| 48 | 	union { | 52 | 	union { |
| ... | @@ -65,6 +69,10 @@ struct io_uring_sqe { | ... | @@ -65,6 +69,10 @@ struct io_uring_sqe { |
| 65 | 		__u32		xattr_flags; | 69 | 		__u32		xattr_flags; |
| 66 | 		__u32		msg_ring_flags; | 70 | 		__u32		msg_ring_flags; |
| 67 | 		__u32		uring_cmd_flags; | 71 | 		__u32		uring_cmd_flags; |
| 72 | 		__u32		waitid_flags; | ||
| 73 | 		__u32		futex_flags; | ||
| 74 | 		__u32		install_fd_flags; | ||
| 75 | 		__u32		nop_flags; | ||
| 68 | 	}; | 76 | 	}; |
| 69 | 	__u64	user_data;	/* data to be passed back at completion time */ | 77 | 	__u64	user_data;	/* data to be passed back at completion time */ |
| 70 | 	/* pack this to avoid bogus arm OABI complaints */ | 78 | 	/* pack this to avoid bogus arm OABI complaints */ |
| ... | @@ -79,6 +87,7 @@ struct io_uring_sqe { | ... | @@ -79,6 +87,7 @@ struct io_uring_sqe { |
| 79 | 	union { | 87 | 	union { |
| 80 | 		__s32	splice_fd_in; | 88 | 		__s32	splice_fd_in; |
| 81 | 		__u32	file_index; | 89 | 		__u32	file_index; |
| 90 | 		__u32	optlen; | ||
| 82 | 		struct { | 91 | 		struct { |
| 83 | 			__u16	addr_len; | 92 | 			__u16	addr_len; |
| 84 | 			__u16	__pad3[1]; | 93 | 			__u16	__pad3[1]; |
| ... | @@ -89,6 +98,7 @@ struct io_uring_sqe { | ... | @@ -89,6 +98,7 @@ struct io_uring_sqe { |
| 89 | 			__u64	addr3; | 98 | 			__u64	addr3; |
| 90 | 			__u64	__pad2[1]; | 99 | 			__u64	__pad2[1]; |
| 91 | 		}; | 100 | 		}; |
| 101 | 		__u64	optval; | ||
| 92 | 		/* | 102 | 		/* |
| 93 | 		 * If the ring is initialized with IORING_SETUP_SQE128, then | 103 | 		 * If the ring is initialized with IORING_SETUP_SQE128, then |
| 94 | 		 * this field is used for 80 bytes of arbitrary command data | 104 | 		 * this field is used for 80 bytes of arbitrary command data |
| ... | @@ -106,7 +116,7 @@ struct io_uring_sqe { | ... | @@ -106,7 +116,7 @@ struct io_uring_sqe { |
| 106 | */ | 116 | */ |
| 107 | #define IORING_FILE_INDEX_ALLOC		(~0U) | 117 | #define IORING_FILE_INDEX_ALLOC		(~0U) |
| 108 | 118 | ||
| 109 | enum { | 119 | enum io_uring_sqe_flags_bit { |
| 110 | 	IOSQE_FIXED_FILE_BIT, | 120 | 	IOSQE_FIXED_FILE_BIT, |
| 111 | 	IOSQE_IO_DRAIN_BIT, | 121 | 	IOSQE_IO_DRAIN_BIT, |
| 112 | 	IOSQE_IO_LINK_BIT, | 122 | 	IOSQE_IO_LINK_BIT, |
| ... | @@ -173,6 +183,23 @@ enum { | ... | @@ -173,6 +183,23 @@ enum { |
| 173 | */ | 183 | */ |
| 174 | #define IORING_SETUP_DEFER_TASKRUN	(1U << 13) | 184 | #define IORING_SETUP_DEFER_TASKRUN	(1U << 13) |
| 175 | 185 | ||
| 186 | /* | ||
| 187 | * Application provides the memory for the rings | ||
| 188 | */ | ||
| 189 | #define IORING_SETUP_NO_MMAP		(1U << 14) | ||
| 190 | |||
| 191 | /* | ||
| 192 | * Register the ring fd in itself for use with | ||
| 193 | * IORING_REGISTER_USE_REGISTERED_RING; return a registered fd index rather | ||
| 194 | * than an fd. | ||
| 195 | */ | ||
| 196 | #define IORING_SETUP_REGISTERED_FD_ONLY	(1U << 15) | ||
| 197 | |||
| 198 | /* | ||
| 199 | * Removes indirection through the SQ index array. | ||
| 200 | */ | ||
| 201 | #define IORING_SETUP_NO_SQARRAY		(1U << 16) | ||
| 202 | |||
| 176 | enum io_uring_op { | 203 | enum io_uring_op { |
| 177 | 	IORING_OP_NOP, | 204 | 	IORING_OP_NOP, |
| 178 | 	IORING_OP_READV, | 205 | 	IORING_OP_READV, |
| ... | @@ -223,17 +250,25 @@ enum io_uring_op { | ... | @@ -223,17 +250,25 @@ enum io_uring_op { |
| 223 | 	IORING_OP_URING_CMD, | 250 | 	IORING_OP_URING_CMD, |
| 224 | 	IORING_OP_SEND_ZC, | 251 | 	IORING_OP_SEND_ZC, |
| 225 | 	IORING_OP_SENDMSG_ZC, | 252 | 	IORING_OP_SENDMSG_ZC, |
| 253 | 	IORING_OP_READ_MULTISHOT, | ||
| 254 | 	IORING_OP_WAITID, | ||
| 255 | 	IORING_OP_FUTEX_WAIT, | ||
| 256 | 	IORING_OP_FUTEX_WAKE, | ||
| 257 | 	IORING_OP_FUTEX_WAITV, | ||
| 258 | 	IORING_OP_FIXED_FD_INSTALL, | ||
| 259 | 	IORING_OP_FTRUNCATE, | ||
| 226 | 260 | ||
| 227 | 	/* this goes last, obviously */ | 261 | 	/* this goes last, obviously */ |
| 228 | 	IORING_OP_LAST, | 262 | 	IORING_OP_LAST, |
| 229 | }; | 263 | }; |
| 230 | 264 | ||
| 231 | /* | 265 | /* |
| 232 | * sqe->uring_cmd_flags | 266 | * sqe->uring_cmd_flags		top 8bits aren't available for userspace |
| 233 | * IORING_URING_CMD_FIXED	use registered buffer; pass this flag | 267 | * IORING_URING_CMD_FIXED	use registered buffer; pass this flag |
| 234 | *				along with setting sqe->buf_index. | 268 | *				along with setting sqe->buf_index. |
| 235 | */ | 269 | */ |
| 236 | #define IORING_URING_CMD_FIXED	(1U << 0) | 270 | #define IORING_URING_CMD_FIXED	(1U << 0) |
| 271 | #define IORING_URING_CMD_MASK	IORING_URING_CMD_FIXED | ||
| 237 | 272 | ||
| 238 | 273 | ||
| 239 | /* | 274 | /* |
| ... | @@ -250,6 +285,7 @@ enum io_uring_op { | ... | @@ -250,6 +285,7 @@ enum io_uring_op { |
| 250 | #define IORING_TIMEOUT_REALTIME		(1U << 3) | 285 | #define IORING_TIMEOUT_REALTIME		(1U << 3) |
| 251 | #define IORING_LINK_TIMEOUT_UPDATE	(1U << 4) | 286 | #define IORING_LINK_TIMEOUT_UPDATE	(1U << 4) |
| 252 | #define IORING_TIMEOUT_ETIME_SUCCESS	(1U << 5) | 287 | #define IORING_TIMEOUT_ETIME_SUCCESS	(1U << 5) |
| 288 | #define IORING_TIMEOUT_MULTISHOT	(1U << 6) | ||
| 253 | #define IORING_TIMEOUT_CLOCK_MASK	(IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME) | 289 | #define IORING_TIMEOUT_CLOCK_MASK	(IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME) |
| 254 | #define IORING_TIMEOUT_UPDATE_MASK	(IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE) | 290 | #define IORING_TIMEOUT_UPDATE_MASK	(IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE) |
| 255 | /* | 291 | /* |
| ... | @@ -284,11 +320,15 @@ enum io_uring_op { | ... | @@ -284,11 +320,15 @@ enum io_uring_op { |
| 284 | *				request 'user_data' | 320 | *				request 'user_data' |
| 285 | * IORING_ASYNC_CANCEL_ANY	Match any request | 321 | * IORING_ASYNC_CANCEL_ANY	Match any request |
| 286 | * IORING_ASYNC_CANCEL_FD_FIXED	'fd' passed in is a fixed descriptor | 322 | * IORING_ASYNC_CANCEL_FD_FIXED	'fd' passed in is a fixed descriptor |
| 323 | * IORING_ASYNC_CANCEL_USERDATA	Match on user_data, default for no other key | ||
| 324 | * IORING_ASYNC_CANCEL_OP	Match request based on opcode | ||
| 287 | */ | 325 | */ |
| 288 | #define IORING_ASYNC_CANCEL_ALL	(1U << 0) | 326 | #define IORING_ASYNC_CANCEL_ALL	(1U << 0) |
| 289 | #define IORING_ASYNC_CANCEL_FD	(1U << 1) | 327 | #define IORING_ASYNC_CANCEL_FD	(1U << 1) |
| 290 | #define IORING_ASYNC_CANCEL_ANY	(1U << 2) | 328 | #define IORING_ASYNC_CANCEL_ANY	(1U << 2) |
| 291 | #define IORING_ASYNC_CANCEL_FD_FIXED	(1U << 3) | 329 | #define IORING_ASYNC_CANCEL_FD_FIXED	(1U << 3) |
| 330 | #define IORING_ASYNC_CANCEL_USERDATA	(1U << 4) | ||
| 331 | #define IORING_ASYNC_CANCEL_OP	(1U << 5) | ||
| 292 | 332 | ||
| 293 | /* | 333 | /* |
| 294 | * send/sendmsg and recv/recvmsg flags (sqe->ioprio) | 334 | * send/sendmsg and recv/recvmsg flags (sqe->ioprio) |
| ... | @@ -312,11 +352,20 @@ enum io_uring_op { | ... | @@ -312,11 +352,20 @@ enum io_uring_op { |
| 312 | *				0 is reported if zerocopy was actually possible. | 352 | *				0 is reported if zerocopy was actually possible. |
| 313 | *				IORING_NOTIF_USAGE_ZC_COPIED if data was copied | 353 | *				IORING_NOTIF_USAGE_ZC_COPIED if data was copied |
| 314 | *				(at least partially). | 354 | *				(at least partially). |
| 355 | * | ||
| 356 | * IORING_RECVSEND_BUNDLE	Used with IOSQE_BUFFER_SELECT. If set, send or | ||
| 357 | *				recv will grab as many buffers from the buffer | ||
| 358 | *				group ID given and send them all. The completion | ||
| 359 | *				result 	will be the number of buffers send, with | ||
| 360 | *				the starting buffer ID in cqe->flags as per | ||
| 361 | *				usual for provided buffer usage. The buffers | ||
| 362 | *				will be	contigious from the starting buffer ID. | ||
| 315 | */ | 363 | */ |
| 316 | #define IORING_RECVSEND_POLL_FIRST	(1U << 0) | 364 | #define IORING_RECVSEND_POLL_FIRST	(1U << 0) |
| 317 | #define IORING_RECV_MULTISHOT		(1U << 1) | 365 | #define IORING_RECV_MULTISHOT		(1U << 1) |
| 318 | #define IORING_RECVSEND_FIXED_BUF	(1U << 2) | 366 | #define IORING_RECVSEND_FIXED_BUF	(1U << 2) |
| 319 | #define IORING_SEND_ZC_REPORT_USAGE	(1U << 3) | 367 | #define IORING_SEND_ZC_REPORT_USAGE	(1U << 3) |
| 368 | #define IORING_RECVSEND_BUNDLE		(1U << 4) | ||
| 320 | 369 | ||
| 321 | /* | 370 | /* |
| 322 | * cqe.res for IORING_CQE_F_NOTIF if | 371 | * cqe.res for IORING_CQE_F_NOTIF if |
| ... | @@ -331,11 +380,13 @@ enum io_uring_op { | ... | @@ -331,11 +380,13 @@ enum io_uring_op { |
| 331 | * accept flags stored in sqe->ioprio | 380 | * accept flags stored in sqe->ioprio |
| 332 | */ | 381 | */ |
| 333 | #define IORING_ACCEPT_MULTISHOT	(1U << 0) | 382 | #define IORING_ACCEPT_MULTISHOT	(1U << 0) |
| 383 | #define IORING_ACCEPT_DONTWAIT	(1U << 1) | ||
| 384 | #define IORING_ACCEPT_POLL_FIRST	(1U << 2) | ||
| 334 | 385 | ||
| 335 | /* | 386 | /* |
| 336 | * IORING_OP_MSG_RING command types, stored in sqe->addr | 387 | * IORING_OP_MSG_RING command types, stored in sqe->addr |
| 337 | */ | 388 | */ |
| 338 | enum { | 389 | enum io_uring_msg_ring_flags { |
| 339 | 	IORING_MSG_DATA,	/* pass sqe->len as 'res' and off as user_data */ | 390 | 	IORING_MSG_DATA,	/* pass sqe->len as 'res' and off as user_data */ |
| 340 | 	IORING_MSG_SEND_FD,	/* send a registered fd to another ring */ | 391 | 	IORING_MSG_SEND_FD,	/* send a registered fd to another ring */ |
| 341 | }; | 392 | }; |
| ... | @@ -350,6 +401,20 @@ enum { | ... | @@ -350,6 +401,20 @@ enum { |
| 350 | /* Pass through the flags from sqe->file_index to cqe->flags */ | 401 | /* Pass through the flags from sqe->file_index to cqe->flags */ |
| 351 | #define IORING_MSG_RING_FLAGS_PASS	(1U << 1) | 402 | #define IORING_MSG_RING_FLAGS_PASS	(1U << 1) |
| 352 | 403 | ||
| 404 | /* | ||
| 405 | * IORING_OP_FIXED_FD_INSTALL flags (sqe->install_fd_flags) | ||
| 406 | * | ||
| 407 | * IORING_FIXED_FD_NO_CLOEXEC	Don't mark the fd as O_CLOEXEC | ||
| 408 | */ | ||
| 409 | #define IORING_FIXED_FD_NO_CLOEXEC	(1U << 0) | ||
| 410 | |||
| 411 | /* | ||
| 412 | * IORING_OP_NOP flags (sqe->nop_flags) | ||
| 413 | * | ||
| 414 | * IORING_NOP_INJECT_RESULT	Inject result from sqe->result | ||
| 415 | */ | ||
| 416 | #define IORING_NOP_INJECT_RESULT	(1U << 0) | ||
| 417 | |||
| 353 | /* | 418 | /* |
| 354 | * IO completion data structure (Completion Queue Entry) | 419 | * IO completion data structure (Completion Queue Entry) |
| 355 | */ | 420 | */ |
| ... | @@ -379,9 +444,7 @@ struct io_uring_cqe { | ... | @@ -379,9 +444,7 @@ struct io_uring_cqe { |
| 379 | #define IORING_CQE_F_SOCK_NONEMPTY	(1U << 2) | 444 | #define IORING_CQE_F_SOCK_NONEMPTY	(1U << 2) |
| 380 | #define IORING_CQE_F_NOTIF		(1U << 3) | 445 | #define IORING_CQE_F_NOTIF		(1U << 3) |
| 381 | 446 | ||
| 382 | enum { | 447 | #define IORING_CQE_BUFFER_SHIFT		16 |
| 383 | 	IORING_CQE_BUFFER_SHIFT		= 16, | ||
| 384 | }; | ||
| 385 | 448 | ||
| 386 | /* | 449 | /* |
| 387 | * Magic offsets for the application to mmap the data it needs | 450 | * Magic offsets for the application to mmap the data it needs |
| ... | @@ -389,6 +452,9 @@ enum { | ... | @@ -389,6 +452,9 @@ enum { |
| 389 | #define IORING_OFF_SQ_RING		0ULL | 452 | #define IORING_OFF_SQ_RING		0ULL |
| 390 | #define IORING_OFF_CQ_RING		0x8000000ULL | 453 | #define IORING_OFF_CQ_RING		0x8000000ULL |
| 391 | #define IORING_OFF_SQES			0x10000000ULL | 454 | #define IORING_OFF_SQES			0x10000000ULL |
| 455 | #define IORING_OFF_PBUF_RING		0x80000000ULL | ||
| 456 | #define IORING_OFF_PBUF_SHIFT		16 | ||
| 457 | #define IORING_OFF_MMAP_MASK		0xf8000000ULL | ||
| 392 | 458 | ||
| 393 | /* | 459 | /* |
| 394 | * Filled with the offset for mmap(2) | 460 | * Filled with the offset for mmap(2) |
| ... | @@ -402,7 +468,7 @@ struct io_sqring_offsets { | ... | @@ -402,7 +468,7 @@ struct io_sqring_offsets { |
| 402 | 	__u32 dropped; | 468 | 	__u32 dropped; |
| 403 | 	__u32 array; | 469 | 	__u32 array; |
| 404 | 	__u32 resv1; | 470 | 	__u32 resv1; |
| 405 | 	__u64 resv2; | 471 | 	__u64 user_addr; |
| 406 | }; | 472 | }; |
| 407 | 473 | ||
| 408 | /* | 474 | /* |
| ... | @@ -421,7 +487,7 @@ struct io_cqring_offsets { | ... | @@ -421,7 +487,7 @@ struct io_cqring_offsets { |
| 421 | 	__u32 cqes; | 487 | 	__u32 cqes; |
| 422 | 	__u32 flags; | 488 | 	__u32 flags; |
| 423 | 	__u32 resv1; | 489 | 	__u32 resv1; |
| 424 | 	__u64 resv2; | 490 | 	__u64 user_addr; |
| 425 | }; | 491 | }; |
| 426 | 492 | ||
| 427 | /* | 493 | /* |
| ... | @@ -473,11 +539,12 @@ struct io_uring_params { | ... | @@ -473,11 +539,12 @@ struct io_uring_params { |
| 473 | #define IORING_FEAT_CQE_SKIP		(1U << 11) | 539 | #define IORING_FEAT_CQE_SKIP		(1U << 11) |
| 474 | #define IORING_FEAT_LINKED_FILE		(1U << 12) | 540 | #define IORING_FEAT_LINKED_FILE		(1U << 12) |
| 475 | #define IORING_FEAT_REG_REG_RING	(1U << 13) | 541 | #define IORING_FEAT_REG_REG_RING	(1U << 13) |
| 542 | #define IORING_FEAT_RECVSEND_BUNDLE	(1U << 14) | ||
| 476 | 543 | ||
| 477 | /* | 544 | /* |
| 478 | * io_uring_register(2) opcodes and arguments | 545 | * io_uring_register(2) opcodes and arguments |
| 479 | */ | 546 | */ |
| 480 | enum { | 547 | enum io_uring_register_op { |
| 481 | 	IORING_REGISTER_BUFFERS			= 0, | 548 | 	IORING_REGISTER_BUFFERS			= 0, |
| 482 | 	IORING_UNREGISTER_BUFFERS		= 1, | 549 | 	IORING_UNREGISTER_BUFFERS		= 1, |
| 483 | 	IORING_REGISTER_FILES			= 2, | 550 | 	IORING_REGISTER_FILES			= 2, |
| ... | @@ -519,6 +586,13 @@ enum { | ... | @@ -519,6 +586,13 @@ enum { |
| 519 | 	/* register a range of fixed file slots for automatic slot allocation */ | 586 | 	/* register a range of fixed file slots for automatic slot allocation */ |
| 520 | 	IORING_REGISTER_FILE_ALLOC_RANGE	= 25, | 587 | 	IORING_REGISTER_FILE_ALLOC_RANGE	= 25, |
| 521 | 588 | ||
| 589 | 	/* return status information for a buffer group */ | ||
| 590 | 	IORING_REGISTER_PBUF_STATUS		= 26, | ||
| 591 | |||
| 592 | 	/* set/clear busy poll settings */ | ||
| 593 | 	IORING_REGISTER_NAPI			= 27, | ||
| 594 | 	IORING_UNREGISTER_NAPI			= 28, | ||
| 595 | |||
| 522 | 	/* this goes last */ | 596 | 	/* this goes last */ |
| 523 | 	IORING_REGISTER_LAST, | 597 | 	IORING_REGISTER_LAST, |
| 524 | 598 | ||
| ... | @@ -527,7 +601,7 @@ enum { | ... | @@ -527,7 +601,7 @@ enum { |
| 527 | }; | 601 | }; |
| 528 | 602 | ||
| 529 | /* io-wq worker categories */ | 603 | /* io-wq worker categories */ |
| 530 | enum { | 604 | enum io_wq_type { |
| 531 | 	IO_WQ_BOUND, | 605 | 	IO_WQ_BOUND, |
| 532 | 	IO_WQ_UNBOUND, | 606 | 	IO_WQ_UNBOUND, |
| 533 | }; | 607 | }; |
| ... | @@ -568,19 +642,6 @@ struct io_uring_rsrc_update2 { | ... | @@ -568,19 +642,6 @@ struct io_uring_rsrc_update2 { |
| 568 | 	__u32 resv2; | 642 | 	__u32 resv2; |
| 569 | }; | 643 | }; |
| 570 | 644 | ||
| 571 | struct io_uring_notification_slot { | ||
| 572 | 	__u64 tag; | ||
| 573 | 	__u64 resv[3]; | ||
| 574 | }; | ||
| 575 | |||
| 576 | struct io_uring_notification_register { | ||
| 577 | 	__u32 nr_slots; | ||
| 578 | 	__u32 resv; | ||
| 579 | 	__u64 resv2; | ||
| 580 | 	__u64 data; | ||
| 581 | 	__u64 resv3; | ||
| 582 | }; | ||
| 583 | |||
| 584 | /* Skip updating fd indexes set to this value in the fd table */ | 645 | /* Skip updating fd indexes set to this value in the fd table */ |
| 585 | #define IORING_REGISTER_FILES_SKIP	(-2) | 646 | #define IORING_REGISTER_FILES_SKIP	(-2) |
| 586 | 647 | ||
| ... | @@ -635,19 +696,48 @@ struct io_uring_buf_ring { | ... | @@ -635,19 +696,48 @@ struct io_uring_buf_ring { |
| 635 | 	}; | 696 | 	}; |
| 636 | }; | 697 | }; |
| 637 | 698 | ||
| 699 | /* | ||
| 700 | * Flags for IORING_REGISTER_PBUF_RING. | ||
| 701 | * | ||
| 702 | * IOU_PBUF_RING_MMAP:	If set, kernel will allocate the memory for the ring. | ||
| 703 | *			The application must not set a ring_addr in struct | ||
| 704 | *			io_uring_buf_reg, instead it must subsequently call | ||
| 705 | *			mmap(2) with the offset set as: | ||
| 706 | *			IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT) | ||
| 707 | *			to get a virtual mapping for the ring. | ||
| 708 | */ | ||
| 709 | enum io_uring_register_pbuf_ring_flags { | ||
| 710 | 	IOU_PBUF_RING_MMAP	= 1, | ||
| 711 | }; | ||
| 712 | |||
| 638 | /* argument for IORING_(UN)REGISTER_PBUF_RING */ | 713 | /* argument for IORING_(UN)REGISTER_PBUF_RING */ |
| 639 | struct io_uring_buf_reg { | 714 | struct io_uring_buf_reg { |
| 640 | 	__u64	ring_addr; | 715 | 	__u64	ring_addr; |
| 641 | 	__u32	ring_entries; | 716 | 	__u32	ring_entries; |
| 642 | 	__u16	bgid; | 717 | 	__u16	bgid; |
| 643 | 	__u16	pad; | 718 | 	__u16	flags; |
| 644 | 	__u64	resv[3]; | 719 | 	__u64	resv[3]; |
| 645 | }; | 720 | }; |
| 646 | 721 | ||
| 722 | /* argument for IORING_REGISTER_PBUF_STATUS */ | ||
| 723 | struct io_uring_buf_status { | ||
| 724 | 	__u32	buf_group;	/* input */ | ||
| 725 | 	__u32	head;		/* output */ | ||
| 726 | 	__u32	resv[8]; | ||
| 727 | }; | ||
| 728 | |||
| 729 | /* argument for IORING_(UN)REGISTER_NAPI */ | ||
| 730 | struct io_uring_napi { | ||
| 731 | 	__u32	busy_poll_to; | ||
| 732 | 	__u8	prefer_busy_poll; | ||
| 733 | 	__u8	pad[3]; | ||
| 734 | 	__u64	resv; | ||
| 735 | }; | ||
| 736 | |||
| 647 | /* | 737 | /* |
| 648 | * io_uring_restriction->opcode values | 738 | * io_uring_restriction->opcode values |
| 649 | */ | 739 | */ |
| 650 | enum { | 740 | enum io_uring_register_restriction_op { |
| 651 | 	/* Allow an io_uring_register(2) opcode */ | 741 | 	/* Allow an io_uring_register(2) opcode */ |
| 652 | 	IORING_RESTRICTION_REGISTER_OP		= 0, | 742 | 	IORING_RESTRICTION_REGISTER_OP		= 0, |
| 653 | 743 | ||
| ... | @@ -678,7 +768,9 @@ struct io_uring_sync_cancel_reg { | ... | @@ -678,7 +768,9 @@ struct io_uring_sync_cancel_reg { |
| 678 | 	__s32				fd; | 768 | 	__s32				fd; |
| 679 | 	__u32				flags; | 769 | 	__u32				flags; |
| 680 | 	struct __kernel_timespec	timeout; | 770 | 	struct __kernel_timespec	timeout; |
| 681 | 	__u64				pad[4]; | 771 | 	__u8				opcode; |
| 772 | 	__u8				pad[7]; | ||
| 773 | 	__u64				pad2[3]; | ||
| 682 | }; | 774 | }; |
| 683 | 775 | ||
| 684 | /* | 776 | /* |
| ... | @@ -698,6 +790,16 @@ struct io_uring_recvmsg_out { | ... | @@ -698,6 +790,16 @@ struct io_uring_recvmsg_out { |
| 698 | 	__u32 flags; | 790 | 	__u32 flags; |
| 699 | }; | 791 | }; |
| 700 | 792 | ||
| 793 | /* | ||
| 794 | * Argument for IORING_OP_URING_CMD when file is a socket | ||
| 795 | */ | ||
| 796 | enum io_uring_socket_op { | ||
| 797 | 	SOCKET_URING_OP_SIOCINQ		= 0, | ||
| 798 | 	SOCKET_URING_OP_SIOCOUTQ, | ||
| 799 | 	SOCKET_URING_OP_GETSOCKOPT, | ||
| 800 | 	SOCKET_URING_OP_SETSOCKOPT, | ||
| 801 | }; | ||
| 802 | |||
| 701 | #ifdef __cplusplus | 803 | #ifdef __cplusplus |
| 702 | } | 804 | } |
| 703 | #endif | 805 | #endif |
lib/libc/include/any-linux-any/linux/ioam6_genl.h+20| ... | @@ -49,4 +49,24 @@ enum { | ... | @@ -49,4 +49,24 @@ enum { |
| 49 | 49 | ||
| 50 | #define IOAM6_CMD_MAX (__IOAM6_CMD_MAX - 1) | 50 | #define IOAM6_CMD_MAX (__IOAM6_CMD_MAX - 1) |
| 51 | 51 | ||
| 52 | #define IOAM6_GENL_EV_GRP_NAME "ioam6_events" | ||
| 53 | |||
| 54 | enum ioam6_event_type { | ||
| 55 | 	IOAM6_EVENT_UNSPEC, | ||
| 56 | 	IOAM6_EVENT_TRACE, | ||
| 57 | }; | ||
| 58 | |||
| 59 | enum ioam6_event_attr { | ||
| 60 | 	IOAM6_EVENT_ATTR_UNSPEC, | ||
| 61 | |||
| 62 | 	IOAM6_EVENT_ATTR_TRACE_NAMESPACE,	/* u16 */ | ||
| 63 | 	IOAM6_EVENT_ATTR_TRACE_NODELEN,		/* u8 */ | ||
| 64 | 	IOAM6_EVENT_ATTR_TRACE_TYPE,		/* u32 */ | ||
| 65 | 	IOAM6_EVENT_ATTR_TRACE_DATA,		/* Binary */ | ||
| 66 | |||
| 67 | 	__IOAM6_EVENT_ATTR_MAX | ||
| 68 | }; | ||
| 69 | |||
| 70 | #define IOAM6_EVENT_ATTR_MAX (__IOAM6_EVENT_ATTR_MAX - 1) | ||
| 71 | |||
| 52 | #endif /* _LINUX_IOAM6_GENL_H */ | 72 | #endif /* _LINUX_IOAM6_GENL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/iommu.h deleted-161| ... | @@ -1,161 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * IOMMU user API definitions | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _IOMMU_H | ||
| 7 | #define _IOMMU_H | ||
| 8 | |||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | #define IOMMU_FAULT_PERM_READ	(1 << 0) /* read */ | ||
| 12 | #define IOMMU_FAULT_PERM_WRITE	(1 << 1) /* write */ | ||
| 13 | #define IOMMU_FAULT_PERM_EXEC	(1 << 2) /* exec */ | ||
| 14 | #define IOMMU_FAULT_PERM_PRIV	(1 << 3) /* privileged */ | ||
| 15 | |||
| 16 | /* Generic fault types, can be expanded IRQ remapping fault */ | ||
| 17 | enum iommu_fault_type { | ||
| 18 | 	IOMMU_FAULT_DMA_UNRECOV = 1,	/* unrecoverable fault */ | ||
| 19 | 	IOMMU_FAULT_PAGE_REQ,		/* page request fault */ | ||
| 20 | }; | ||
| 21 | |||
| 22 | enum iommu_fault_reason { | ||
| 23 | 	IOMMU_FAULT_REASON_UNKNOWN = 0, | ||
| 24 | |||
| 25 | 	/* Could not access the PASID table (fetch caused external abort) */ | ||
| 26 | 	IOMMU_FAULT_REASON_PASID_FETCH, | ||
| 27 | |||
| 28 | 	/* PASID entry is invalid or has configuration errors */ | ||
| 29 | 	IOMMU_FAULT_REASON_BAD_PASID_ENTRY, | ||
| 30 | |||
| 31 | 	/* | ||
| 32 | 	 * PASID is out of range (e.g. exceeds the maximum PASID | ||
| 33 | 	 * supported by the IOMMU) or disabled. | ||
| 34 | 	 */ | ||
| 35 | 	IOMMU_FAULT_REASON_PASID_INVALID, | ||
| 36 | |||
| 37 | 	/* | ||
| 38 | 	 * An external abort occurred fetching (or updating) a translation | ||
| 39 | 	 * table descriptor | ||
| 40 | 	 */ | ||
| 41 | 	IOMMU_FAULT_REASON_WALK_EABT, | ||
| 42 | |||
| 43 | 	/* | ||
| 44 | 	 * Could not access the page table entry (Bad address), | ||
| 45 | 	 * actual translation fault | ||
| 46 | 	 */ | ||
| 47 | 	IOMMU_FAULT_REASON_PTE_FETCH, | ||
| 48 | |||
| 49 | 	/* Protection flag check failed */ | ||
| 50 | 	IOMMU_FAULT_REASON_PERMISSION, | ||
| 51 | |||
| 52 | 	/* access flag check failed */ | ||
| 53 | 	IOMMU_FAULT_REASON_ACCESS, | ||
| 54 | |||
| 55 | 	/* Output address of a translation stage caused Address Size fault */ | ||
| 56 | 	IOMMU_FAULT_REASON_OOR_ADDRESS, | ||
| 57 | }; | ||
| 58 | |||
| 59 | /** | ||
| 60 | * struct iommu_fault_unrecoverable - Unrecoverable fault data | ||
| 61 | * @reason: reason of the fault, from &enum iommu_fault_reason | ||
| 62 | * @flags: parameters of this fault (IOMMU_FAULT_UNRECOV_* values) | ||
| 63 | * @pasid: Process Address Space ID | ||
| 64 | * @perm: requested permission access using by the incoming transaction | ||
| 65 | * (IOMMU_FAULT_PERM_* values) | ||
| 66 | * @addr: offending page address | ||
| 67 | * @fetch_addr: address that caused a fetch abort, if any | ||
| 68 | */ | ||
| 69 | struct iommu_fault_unrecoverable { | ||
| 70 | 	__u32	reason; | ||
| 71 | #define IOMMU_FAULT_UNRECOV_PASID_VALID		(1 << 0) | ||
| 72 | #define IOMMU_FAULT_UNRECOV_ADDR_VALID		(1 << 1) | ||
| 73 | #define IOMMU_FAULT_UNRECOV_FETCH_ADDR_VALID	(1 << 2) | ||
| 74 | 	__u32	flags; | ||
| 75 | 	__u32	pasid; | ||
| 76 | 	__u32	perm; | ||
| 77 | 	__u64	addr; | ||
| 78 | 	__u64	fetch_addr; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /** | ||
| 82 | * struct iommu_fault_page_request - Page Request data | ||
| 83 | * @flags: encodes whether the corresponding fields are valid and whether this | ||
| 84 | * is the last page in group (IOMMU_FAULT_PAGE_REQUEST_* values). | ||
| 85 | * When IOMMU_FAULT_PAGE_RESPONSE_NEEDS_PASID is set, the page response | ||
| 86 | * must have the same PASID value as the page request. When it is clear, | ||
| 87 | * the page response should not have a PASID. | ||
| 88 | * @pasid: Process Address Space ID | ||
| 89 | * @grpid: Page Request Group Index | ||
| 90 | * @perm: requested page permissions (IOMMU_FAULT_PERM_* values) | ||
| 91 | * @addr: page address | ||
| 92 | * @private_data: device-specific private information | ||
| 93 | */ | ||
| 94 | struct iommu_fault_page_request { | ||
| 95 | #define IOMMU_FAULT_PAGE_REQUEST_PASID_VALID	(1 << 0) | ||
| 96 | #define IOMMU_FAULT_PAGE_REQUEST_LAST_PAGE	(1 << 1) | ||
| 97 | #define IOMMU_FAULT_PAGE_REQUEST_PRIV_DATA	(1 << 2) | ||
| 98 | #define IOMMU_FAULT_PAGE_RESPONSE_NEEDS_PASID	(1 << 3) | ||
| 99 | 	__u32	flags; | ||
| 100 | 	__u32	pasid; | ||
| 101 | 	__u32	grpid; | ||
| 102 | 	__u32	perm; | ||
| 103 | 	__u64	addr; | ||
| 104 | 	__u64	private_data[2]; | ||
| 105 | }; | ||
| 106 | |||
| 107 | /** | ||
| 108 | * struct iommu_fault - Generic fault data | ||
| 109 | * @type: fault type from &enum iommu_fault_type | ||
| 110 | * @padding: reserved for future use (should be zero) | ||
| 111 | * @event: fault event, when @type is %IOMMU_FAULT_DMA_UNRECOV | ||
| 112 | * @prm: Page Request message, when @type is %IOMMU_FAULT_PAGE_REQ | ||
| 113 | * @padding2: sets the fault size to allow for future extensions | ||
| 114 | */ | ||
| 115 | struct iommu_fault { | ||
| 116 | 	__u32	type; | ||
| 117 | 	__u32	padding; | ||
| 118 | 	union { | ||
| 119 | 		struct iommu_fault_unrecoverable event; | ||
| 120 | 		struct iommu_fault_page_request prm; | ||
| 121 | 		__u8 padding2[56]; | ||
| 122 | 	}; | ||
| 123 | }; | ||
| 124 | |||
| 125 | /** | ||
| 126 | * enum iommu_page_response_code - Return status of fault handlers | ||
| 127 | * @IOMMU_PAGE_RESP_SUCCESS: Fault has been handled and the page tables | ||
| 128 | *	populated, retry the access. This is "Success" in PCI PRI. | ||
| 129 | * @IOMMU_PAGE_RESP_FAILURE: General error. Drop all subsequent faults from | ||
| 130 | *	this device if possible. This is "Response Failure" in PCI PRI. | ||
| 131 | * @IOMMU_PAGE_RESP_INVALID: Could not handle this fault, don't retry the | ||
| 132 | *	access. This is "Invalid Request" in PCI PRI. | ||
| 133 | */ | ||
| 134 | enum iommu_page_response_code { | ||
| 135 | 	IOMMU_PAGE_RESP_SUCCESS = 0, | ||
| 136 | 	IOMMU_PAGE_RESP_INVALID, | ||
| 137 | 	IOMMU_PAGE_RESP_FAILURE, | ||
| 138 | }; | ||
| 139 | |||
| 140 | /** | ||
| 141 | * struct iommu_page_response - Generic page response information | ||
| 142 | * @argsz: User filled size of this data | ||
| 143 | * @version: API version of this structure | ||
| 144 | * @flags: encodes whether the corresponding fields are valid | ||
| 145 | * (IOMMU_FAULT_PAGE_RESPONSE_* values) | ||
| 146 | * @pasid: Process Address Space ID | ||
| 147 | * @grpid: Page Request Group Index | ||
| 148 | * @code: response code from &enum iommu_page_response_code | ||
| 149 | */ | ||
| 150 | struct iommu_page_response { | ||
| 151 | 	__u32	argsz; | ||
| 152 | #define IOMMU_PAGE_RESP_VERSION_1	1 | ||
| 153 | 	__u32	version; | ||
| 154 | #define IOMMU_PAGE_RESP_PASID_VALID	(1 << 0) | ||
| 155 | 	__u32	flags; | ||
| 156 | 	__u32	pasid; | ||
| 157 | 	__u32	grpid; | ||
| 158 | 	__u32	code; | ||
| 159 | }; | ||
| 160 | |||
| 161 | #endif /* _IOMMU_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/iommufd.h+348| ... | @@ -45,6 +45,11 @@ enum { | ... | @@ -45,6 +45,11 @@ enum { |
| 45 | 	IOMMUFD_CMD_IOAS_UNMAP, | 45 | 	IOMMUFD_CMD_IOAS_UNMAP, |
| 46 | 	IOMMUFD_CMD_OPTION, | 46 | 	IOMMUFD_CMD_OPTION, |
| 47 | 	IOMMUFD_CMD_VFIO_IOAS, | 47 | 	IOMMUFD_CMD_VFIO_IOAS, |
| 48 | 	IOMMUFD_CMD_HWPT_ALLOC, | ||
| 49 | 	IOMMUFD_CMD_GET_HW_INFO, | ||
| 50 | 	IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING, | ||
| 51 | 	IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP, | ||
| 52 | 	IOMMUFD_CMD_HWPT_INVALIDATE, | ||
| 48 | }; | 53 | }; |
| 49 | 54 | ||
| 50 | /** | 55 | /** |
| ... | @@ -344,4 +349,347 @@ struct iommu_vfio_ioas { | ... | @@ -344,4 +349,347 @@ struct iommu_vfio_ioas { |
| 344 | 	__u16 __reserved; | 349 | 	__u16 __reserved; |
| 345 | }; | 350 | }; |
| 346 | #define IOMMU_VFIO_IOAS _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VFIO_IOAS) | 351 | #define IOMMU_VFIO_IOAS _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VFIO_IOAS) |
| 352 | |||
| 353 | /** | ||
| 354 | * enum iommufd_hwpt_alloc_flags - Flags for HWPT allocation | ||
| 355 | * @IOMMU_HWPT_ALLOC_NEST_PARENT: If set, allocate a HWPT that can serve as | ||
| 356 | * the parent HWPT in a nesting configuration. | ||
| 357 | * @IOMMU_HWPT_ALLOC_DIRTY_TRACKING: Dirty tracking support for device IOMMU is | ||
| 358 | * enforced on device attachment | ||
| 359 | */ | ||
| 360 | enum iommufd_hwpt_alloc_flags { | ||
| 361 | 	IOMMU_HWPT_ALLOC_NEST_PARENT = 1 << 0, | ||
| 362 | 	IOMMU_HWPT_ALLOC_DIRTY_TRACKING = 1 << 1, | ||
| 363 | }; | ||
| 364 | |||
| 365 | /** | ||
| 366 | * enum iommu_hwpt_vtd_s1_flags - Intel VT-d stage-1 page table | ||
| 367 | * entry attributes | ||
| 368 | * @IOMMU_VTD_S1_SRE: Supervisor request | ||
| 369 | * @IOMMU_VTD_S1_EAFE: Extended access enable | ||
| 370 | * @IOMMU_VTD_S1_WPE: Write protect enable | ||
| 371 | */ | ||
| 372 | enum iommu_hwpt_vtd_s1_flags { | ||
| 373 | 	IOMMU_VTD_S1_SRE = 1 << 0, | ||
| 374 | 	IOMMU_VTD_S1_EAFE = 1 << 1, | ||
| 375 | 	IOMMU_VTD_S1_WPE = 1 << 2, | ||
| 376 | }; | ||
| 377 | |||
| 378 | /** | ||
| 379 | * struct iommu_hwpt_vtd_s1 - Intel VT-d stage-1 page table | ||
| 380 | * info (IOMMU_HWPT_DATA_VTD_S1) | ||
| 381 | * @flags: Combination of enum iommu_hwpt_vtd_s1_flags | ||
| 382 | * @pgtbl_addr: The base address of the stage-1 page table. | ||
| 383 | * @addr_width: The address width of the stage-1 page table | ||
| 384 | * @__reserved: Must be 0 | ||
| 385 | */ | ||
| 386 | struct iommu_hwpt_vtd_s1 { | ||
| 387 | 	__aligned_u64 flags; | ||
| 388 | 	__aligned_u64 pgtbl_addr; | ||
| 389 | 	__u32 addr_width; | ||
| 390 | 	__u32 __reserved; | ||
| 391 | }; | ||
| 392 | |||
| 393 | /** | ||
| 394 | * enum iommu_hwpt_data_type - IOMMU HWPT Data Type | ||
| 395 | * @IOMMU_HWPT_DATA_NONE: no data | ||
| 396 | * @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table | ||
| 397 | */ | ||
| 398 | enum iommu_hwpt_data_type { | ||
| 399 | 	IOMMU_HWPT_DATA_NONE, | ||
| 400 | 	IOMMU_HWPT_DATA_VTD_S1, | ||
| 401 | }; | ||
| 402 | |||
| 403 | /** | ||
| 404 | * struct iommu_hwpt_alloc - ioctl(IOMMU_HWPT_ALLOC) | ||
| 405 | * @size: sizeof(struct iommu_hwpt_alloc) | ||
| 406 | * @flags: Combination of enum iommufd_hwpt_alloc_flags | ||
| 407 | * @dev_id: The device to allocate this HWPT for | ||
| 408 | * @pt_id: The IOAS or HWPT to connect this HWPT to | ||
| 409 | * @out_hwpt_id: The ID of the new HWPT | ||
| 410 | * @__reserved: Must be 0 | ||
| 411 | * @data_type: One of enum iommu_hwpt_data_type | ||
| 412 | * @data_len: Length of the type specific data | ||
| 413 | * @data_uptr: User pointer to the type specific data | ||
| 414 | * | ||
| 415 | * Explicitly allocate a hardware page table object. This is the same object | ||
| 416 | * type that is returned by iommufd_device_attach() and represents the | ||
| 417 | * underlying iommu driver's iommu_domain kernel object. | ||
| 418 | * | ||
| 419 | * A kernel-managed HWPT will be created with the mappings from the given | ||
| 420 | * IOAS via the @pt_id. The @data_type for this allocation must be set to | ||
| 421 | * IOMMU_HWPT_DATA_NONE. The HWPT can be allocated as a parent HWPT for a | ||
| 422 | * nesting configuration by passing IOMMU_HWPT_ALLOC_NEST_PARENT via @flags. | ||
| 423 | * | ||
| 424 | * A user-managed nested HWPT will be created from a given parent HWPT via | ||
| 425 | * @pt_id, in which the parent HWPT must be allocated previously via the | ||
| 426 | * same ioctl from a given IOAS (@pt_id). In this case, the @data_type | ||
| 427 | * must be set to a pre-defined type corresponding to an I/O page table | ||
| 428 | * type supported by the underlying IOMMU hardware. | ||
| 429 | * | ||
| 430 | * If the @data_type is set to IOMMU_HWPT_DATA_NONE, @data_len and | ||
| 431 | * @data_uptr should be zero. Otherwise, both @data_len and @data_uptr | ||
| 432 | * must be given. | ||
| 433 | */ | ||
| 434 | struct iommu_hwpt_alloc { | ||
| 435 | 	__u32 size; | ||
| 436 | 	__u32 flags; | ||
| 437 | 	__u32 dev_id; | ||
| 438 | 	__u32 pt_id; | ||
| 439 | 	__u32 out_hwpt_id; | ||
| 440 | 	__u32 __reserved; | ||
| 441 | 	__u32 data_type; | ||
| 442 | 	__u32 data_len; | ||
| 443 | 	__aligned_u64 data_uptr; | ||
| 444 | }; | ||
| 445 | #define IOMMU_HWPT_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_ALLOC) | ||
| 446 | |||
| 447 | /** | ||
| 448 | * enum iommu_hw_info_vtd_flags - Flags for VT-d hw_info | ||
| 449 | * @IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17: If set, disallow read-only mappings | ||
| 450 | * on a nested_parent domain. | ||
| 451 | * https://www.intel.com/content/www/us/en/content-details/772415/content-details.html | ||
| 452 | */ | ||
| 453 | enum iommu_hw_info_vtd_flags { | ||
| 454 | 	IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17 = 1 << 0, | ||
| 455 | }; | ||
| 456 | |||
| 457 | /** | ||
| 458 | * struct iommu_hw_info_vtd - Intel VT-d hardware information | ||
| 459 | * | ||
| 460 | * @flags: Combination of enum iommu_hw_info_vtd_flags | ||
| 461 | * @__reserved: Must be 0 | ||
| 462 | * | ||
| 463 | * @cap_reg: Value of Intel VT-d capability register defined in VT-d spec | ||
| 464 | * section 11.4.2 Capability Register. | ||
| 465 | * @ecap_reg: Value of Intel VT-d capability register defined in VT-d spec | ||
| 466 | * section 11.4.3 Extended Capability Register. | ||
| 467 | * | ||
| 468 | * User needs to understand the Intel VT-d specification to decode the | ||
| 469 | * register value. | ||
| 470 | */ | ||
| 471 | struct iommu_hw_info_vtd { | ||
| 472 | 	__u32 flags; | ||
| 473 | 	__u32 __reserved; | ||
| 474 | 	__aligned_u64 cap_reg; | ||
| 475 | 	__aligned_u64 ecap_reg; | ||
| 476 | }; | ||
| 477 | |||
| 478 | /** | ||
| 479 | * enum iommu_hw_info_type - IOMMU Hardware Info Types | ||
| 480 | * @IOMMU_HW_INFO_TYPE_NONE: Used by the drivers that do not report hardware | ||
| 481 | * info | ||
| 482 | * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type | ||
| 483 | */ | ||
| 484 | enum iommu_hw_info_type { | ||
| 485 | 	IOMMU_HW_INFO_TYPE_NONE, | ||
| 486 | 	IOMMU_HW_INFO_TYPE_INTEL_VTD, | ||
| 487 | }; | ||
| 488 | |||
| 489 | /** | ||
| 490 | * enum iommufd_hw_capabilities | ||
| 491 | * @IOMMU_HW_CAP_DIRTY_TRACKING: IOMMU hardware support for dirty tracking | ||
| 492 | * If available, it means the following APIs | ||
| 493 | * are supported: | ||
| 494 | * | ||
| 495 | * IOMMU_HWPT_GET_DIRTY_BITMAP | ||
| 496 | * IOMMU_HWPT_SET_DIRTY_TRACKING | ||
| 497 | * | ||
| 498 | */ | ||
| 499 | enum iommufd_hw_capabilities { | ||
| 500 | 	IOMMU_HW_CAP_DIRTY_TRACKING = 1 << 0, | ||
| 501 | }; | ||
| 502 | |||
| 503 | /** | ||
| 504 | * struct iommu_hw_info - ioctl(IOMMU_GET_HW_INFO) | ||
| 505 | * @size: sizeof(struct iommu_hw_info) | ||
| 506 | * @flags: Must be 0 | ||
| 507 | * @dev_id: The device bound to the iommufd | ||
| 508 | * @data_len: Input the length of a user buffer in bytes. Output the length of | ||
| 509 | * data that kernel supports | ||
| 510 | * @data_uptr: User pointer to a user-space buffer used by the kernel to fill | ||
| 511 | * the iommu type specific hardware information data | ||
| 512 | * @out_data_type: Output the iommu hardware info type as defined in the enum | ||
| 513 | * iommu_hw_info_type. | ||
| 514 | * @out_capabilities: Output the generic iommu capability info type as defined | ||
| 515 | * in the enum iommu_hw_capabilities. | ||
| 516 | * @__reserved: Must be 0 | ||
| 517 | * | ||
| 518 | * Query an iommu type specific hardware information data from an iommu behind | ||
| 519 | * a given device that has been bound to iommufd. This hardware info data will | ||
| 520 | * be used to sync capabilities between the virtual iommu and the physical | ||
| 521 | * iommu, e.g. a nested translation setup needs to check the hardware info, so | ||
| 522 | * a guest stage-1 page table can be compatible with the physical iommu. | ||
| 523 | * | ||
| 524 | * To capture an iommu type specific hardware information data, @data_uptr and | ||
| 525 | * its length @data_len must be provided. Trailing bytes will be zeroed if the | ||
| 526 | * user buffer is larger than the data that kernel has. Otherwise, kernel only | ||
| 527 | * fills the buffer using the given length in @data_len. If the ioctl succeeds, | ||
| 528 | * @data_len will be updated to the length that kernel actually supports, | ||
| 529 | * @out_data_type will be filled to decode the data filled in the buffer | ||
| 530 | * pointed by @data_uptr. Input @data_len == zero is allowed. | ||
| 531 | */ | ||
| 532 | struct iommu_hw_info { | ||
| 533 | 	__u32 size; | ||
| 534 | 	__u32 flags; | ||
| 535 | 	__u32 dev_id; | ||
| 536 | 	__u32 data_len; | ||
| 537 | 	__aligned_u64 data_uptr; | ||
| 538 | 	__u32 out_data_type; | ||
| 539 | 	__u32 __reserved; | ||
| 540 | 	__aligned_u64 out_capabilities; | ||
| 541 | }; | ||
| 542 | #define IOMMU_GET_HW_INFO _IO(IOMMUFD_TYPE, IOMMUFD_CMD_GET_HW_INFO) | ||
| 543 | |||
| 544 | /* | ||
| 545 | * enum iommufd_hwpt_set_dirty_tracking_flags - Flags for steering dirty | ||
| 546 | * tracking | ||
| 547 | * @IOMMU_HWPT_DIRTY_TRACKING_ENABLE: Enable dirty tracking | ||
| 548 | */ | ||
| 549 | enum iommufd_hwpt_set_dirty_tracking_flags { | ||
| 550 | 	IOMMU_HWPT_DIRTY_TRACKING_ENABLE = 1, | ||
| 551 | }; | ||
| 552 | |||
| 553 | /** | ||
| 554 | * struct iommu_hwpt_set_dirty_tracking - ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING) | ||
| 555 | * @size: sizeof(struct iommu_hwpt_set_dirty_tracking) | ||
| 556 | * @flags: Combination of enum iommufd_hwpt_set_dirty_tracking_flags | ||
| 557 | * @hwpt_id: HW pagetable ID that represents the IOMMU domain | ||
| 558 | * @__reserved: Must be 0 | ||
| 559 | * | ||
| 560 | * Toggle dirty tracking on an HW pagetable. | ||
| 561 | */ | ||
| 562 | struct iommu_hwpt_set_dirty_tracking { | ||
| 563 | 	__u32 size; | ||
| 564 | 	__u32 flags; | ||
| 565 | 	__u32 hwpt_id; | ||
| 566 | 	__u32 __reserved; | ||
| 567 | }; | ||
| 568 | #define IOMMU_HWPT_SET_DIRTY_TRACKING _IO(IOMMUFD_TYPE, \ | ||
| 569 | 					 IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING) | ||
| 570 | |||
| 571 | /** | ||
| 572 | * enum iommufd_hwpt_get_dirty_bitmap_flags - Flags for getting dirty bits | ||
| 573 | * @IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR: Just read the PTEs without clearing | ||
| 574 | * any dirty bits metadata. This flag | ||
| 575 | * can be passed in the expectation | ||
| 576 | * where the next operation is an unmap | ||
| 577 | * of the same IOVA range. | ||
| 578 | * | ||
| 579 | */ | ||
| 580 | enum iommufd_hwpt_get_dirty_bitmap_flags { | ||
| 581 | 	IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR = 1, | ||
| 582 | }; | ||
| 583 | |||
| 584 | /** | ||
| 585 | * struct iommu_hwpt_get_dirty_bitmap - ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP) | ||
| 586 | * @size: sizeof(struct iommu_hwpt_get_dirty_bitmap) | ||
| 587 | * @hwpt_id: HW pagetable ID that represents the IOMMU domain | ||
| 588 | * @flags: Combination of enum iommufd_hwpt_get_dirty_bitmap_flags | ||
| 589 | * @__reserved: Must be 0 | ||
| 590 | * @iova: base IOVA of the bitmap first bit | ||
| 591 | * @length: IOVA range size | ||
| 592 | * @page_size: page size granularity of each bit in the bitmap | ||
| 593 | * @data: bitmap where to set the dirty bits. The bitmap bits each | ||
| 594 | * represent a page_size which you deviate from an arbitrary iova. | ||
| 595 | * | ||
| 596 | * Checking a given IOVA is dirty: | ||
| 597 | * | ||
| 598 | * data[(iova / page_size) / 64] & (1ULL << ((iova / page_size) % 64)) | ||
| 599 | * | ||
| 600 | * Walk the IOMMU pagetables for a given IOVA range to return a bitmap | ||
| 601 | * with the dirty IOVAs. In doing so it will also by default clear any | ||
| 602 | * dirty bit metadata set in the IOPTE. | ||
| 603 | */ | ||
| 604 | struct iommu_hwpt_get_dirty_bitmap { | ||
| 605 | 	__u32 size; | ||
| 606 | 	__u32 hwpt_id; | ||
| 607 | 	__u32 flags; | ||
| 608 | 	__u32 __reserved; | ||
| 609 | 	__aligned_u64 iova; | ||
| 610 | 	__aligned_u64 length; | ||
| 611 | 	__aligned_u64 page_size; | ||
| 612 | 	__aligned_u64 data; | ||
| 613 | }; | ||
| 614 | #define IOMMU_HWPT_GET_DIRTY_BITMAP _IO(IOMMUFD_TYPE, \ | ||
| 615 | 					IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP) | ||
| 616 | |||
| 617 | /** | ||
| 618 | * enum iommu_hwpt_invalidate_data_type - IOMMU HWPT Cache Invalidation | ||
| 619 | * Data Type | ||
| 620 | * @IOMMU_HWPT_INVALIDATE_DATA_VTD_S1: Invalidation data for VTD_S1 | ||
| 621 | */ | ||
| 622 | enum iommu_hwpt_invalidate_data_type { | ||
| 623 | 	IOMMU_HWPT_INVALIDATE_DATA_VTD_S1, | ||
| 624 | }; | ||
| 625 | |||
| 626 | /** | ||
| 627 | * enum iommu_hwpt_vtd_s1_invalidate_flags - Flags for Intel VT-d | ||
| 628 | * stage-1 cache invalidation | ||
| 629 | * @IOMMU_VTD_INV_FLAGS_LEAF: Indicates whether the invalidation applies | ||
| 630 | * to all-levels page structure cache or just | ||
| 631 | * the leaf PTE cache. | ||
| 632 | */ | ||
| 633 | enum iommu_hwpt_vtd_s1_invalidate_flags { | ||
| 634 | 	IOMMU_VTD_INV_FLAGS_LEAF = 1 << 0, | ||
| 635 | }; | ||
| 636 | |||
| 637 | /** | ||
| 638 | * struct iommu_hwpt_vtd_s1_invalidate - Intel VT-d cache invalidation | ||
| 639 | * (IOMMU_HWPT_INVALIDATE_DATA_VTD_S1) | ||
| 640 | * @addr: The start address of the range to be invalidated. It needs to | ||
| 641 | * be 4KB aligned. | ||
| 642 | * @npages: Number of contiguous 4K pages to be invalidated. | ||
| 643 | * @flags: Combination of enum iommu_hwpt_vtd_s1_invalidate_flags | ||
| 644 | * @__reserved: Must be 0 | ||
| 645 | * | ||
| 646 | * The Intel VT-d specific invalidation data for user-managed stage-1 cache | ||
| 647 | * invalidation in nested translation. Userspace uses this structure to | ||
| 648 | * tell the impacted cache scope after modifying the stage-1 page table. | ||
| 649 | * | ||
| 650 | * Invalidating all the caches related to the page table by setting @addr | ||
| 651 | * to be 0 and @npages to be U64_MAX. | ||
| 652 | * | ||
| 653 | * The device TLB will be invalidated automatically if ATS is enabled. | ||
| 654 | */ | ||
| 655 | struct iommu_hwpt_vtd_s1_invalidate { | ||
| 656 | 	__aligned_u64 addr; | ||
| 657 | 	__aligned_u64 npages; | ||
| 658 | 	__u32 flags; | ||
| 659 | 	__u32 __reserved; | ||
| 660 | }; | ||
| 661 | |||
| 662 | /** | ||
| 663 | * struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE) | ||
| 664 | * @size: sizeof(struct iommu_hwpt_invalidate) | ||
| 665 | * @hwpt_id: ID of a nested HWPT for cache invalidation | ||
| 666 | * @data_uptr: User pointer to an array of driver-specific cache invalidation | ||
| 667 | * data. | ||
| 668 | * @data_type: One of enum iommu_hwpt_invalidate_data_type, defining the data | ||
| 669 | * type of all the entries in the invalidation request array. It | ||
| 670 | * should be a type supported by the hwpt pointed by @hwpt_id. | ||
| 671 | * @entry_len: Length (in bytes) of a request entry in the request array | ||
| 672 | * @entry_num: Input the number of cache invalidation requests in the array. | ||
| 673 | * Output the number of requests successfully handled by kernel. | ||
| 674 | * @__reserved: Must be 0. | ||
| 675 | * | ||
| 676 | * Invalidate the iommu cache for user-managed page table. Modifications on a | ||
| 677 | * user-managed page table should be followed by this operation to sync cache. | ||
| 678 | * Each ioctl can support one or more cache invalidation requests in the array | ||
| 679 | * that has a total size of @entry_len * @entry_num. | ||
| 680 | * | ||
| 681 | * An empty invalidation request array by setting @entry_num==0 is allowed, and | ||
| 682 | * @entry_len and @data_uptr would be ignored in this case. This can be used to | ||
| 683 | * check if the given @data_type is supported or not by kernel. | ||
| 684 | */ | ||
| 685 | struct iommu_hwpt_invalidate { | ||
| 686 | 	__u32 size; | ||
| 687 | 	__u32 hwpt_id; | ||
| 688 | 	__aligned_u64 data_uptr; | ||
| 689 | 	__u32 data_type; | ||
| 690 | 	__u32 entry_len; | ||
| 691 | 	__u32 entry_num; | ||
| 692 | 	__u32 __reserved; | ||
| 693 | }; | ||
| 694 | #define IOMMU_HWPT_INVALIDATE _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_INVALIDATE) | ||
| 347 | #endif | 695 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ioprio.h+88-13| ... | @@ -2,22 +2,23 @@ | ... | @@ -2,22 +2,23 @@ |
| 2 | #ifndef _LINUX_IOPRIO_H | 2 | #ifndef _LINUX_IOPRIO_H |
| 3 | #define _LINUX_IOPRIO_H | 3 | #define _LINUX_IOPRIO_H |
| 4 | 4 | ||
| 5 | #include <linux/stddef.h> | ||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 5 | /* | 8 | /* |
| 6 | * Gives us 8 prio classes with 13-bits of data for each class | 9 | * Gives us 8 prio classes with 13-bits of data for each class |
| 7 | */ | 10 | */ |
| 8 | #define IOPRIO_CLASS_SHIFT	13 | 11 | #define IOPRIO_CLASS_SHIFT	13 |
| 9 | #define IOPRIO_CLASS_MASK	0x07 | 12 | #define IOPRIO_NR_CLASSES	8 |
| 13 | #define IOPRIO_CLASS_MASK	(IOPRIO_NR_CLASSES - 1) | ||
| 10 | #define IOPRIO_PRIO_MASK	((1UL << IOPRIO_CLASS_SHIFT) - 1) | 14 | #define IOPRIO_PRIO_MASK	((1UL << IOPRIO_CLASS_SHIFT) - 1) |
| 11 | 15 | ||
| 12 | #define IOPRIO_PRIO_CLASS(ioprio)	\ | 16 | #define IOPRIO_PRIO_CLASS(ioprio)	\ |
| 13 | 	(((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) | 17 | 	(((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) |
| 14 | #define IOPRIO_PRIO_DATA(ioprio)	((ioprio) & IOPRIO_PRIO_MASK) | 18 | #define IOPRIO_PRIO_DATA(ioprio)	((ioprio) & IOPRIO_PRIO_MASK) |
| 15 | #define IOPRIO_PRIO_VALUE(class, data)	\ | ||
| 16 | 	((((class) & IOPRIO_CLASS_MASK) << IOPRIO_CLASS_SHIFT) | \ | ||
| 17 | 	 ((data) & IOPRIO_PRIO_MASK)) | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * These are the io priority groups as implemented by the BFQ and mq-deadline | 21 | * These are the io priority classes as implemented by the BFQ and mq-deadline |
| 21 | * schedulers. RT is the realtime class, it always gets premium service. For | 22 | * schedulers. RT is the realtime class, it always gets premium service. For |
| 22 | * ATA disks supporting NCQ IO priority, RT class IOs will be processed using | 23 | * ATA disks supporting NCQ IO priority, RT class IOs will be processed using |
| 23 | * high priority NCQ commands. BE is the best-effort scheduling class, the | 24 | * high priority NCQ commands. BE is the best-effort scheduling class, the |
| ... | @@ -25,18 +26,30 @@ | ... | @@ -25,18 +26,30 @@ |
| 25 | * served when no one else is using the disk. | 26 | * served when no one else is using the disk. |
| 26 | */ | 27 | */ |
| 27 | enum { | 28 | enum { |
| 28 | 	IOPRIO_CLASS_NONE, | 29 | 	IOPRIO_CLASS_NONE	= 0, |
| 29 | 	IOPRIO_CLASS_RT, | 30 | 	IOPRIO_CLASS_RT		= 1, |
| 30 | 	IOPRIO_CLASS_BE, | 31 | 	IOPRIO_CLASS_BE		= 2, |
| 31 | 	IOPRIO_CLASS_IDLE, | 32 | 	IOPRIO_CLASS_IDLE	= 3, |
| 33 | |||
| 34 | 	/* Special class to indicate an invalid ioprio value */ | ||
| 35 | 	IOPRIO_CLASS_INVALID	= 7, | ||
| 32 | }; | 36 | }; |
| 33 | 37 | ||
| 34 | /* | 38 | /* |
| 35 | * The RT and BE priority classes both support up to 8 priority levels. | 39 | * The RT and BE priority classes both support up to 8 priority levels that |
| 40 | * can be specified using the lower 3-bits of the priority data. | ||
| 36 | */ | 41 | */ |
| 37 | #define IOPRIO_NR_LEVELS	8 | 42 | #define IOPRIO_LEVEL_NR_BITS		3 |
| 38 | #define IOPRIO_BE_NR		IOPRIO_NR_LEVELS | 43 | #define IOPRIO_NR_LEVELS		(1 << IOPRIO_LEVEL_NR_BITS) |
| 44 | #define IOPRIO_LEVEL_MASK		(IOPRIO_NR_LEVELS - 1) | ||
| 45 | #define IOPRIO_PRIO_LEVEL(ioprio)	((ioprio) & IOPRIO_LEVEL_MASK) | ||
| 46 | |||
| 47 | #define IOPRIO_BE_NR			IOPRIO_NR_LEVELS | ||
| 39 | 48 | ||
| 49 | /* | ||
| 50 | * Possible values for the "which" argument of the ioprio_get() and | ||
| 51 | * ioprio_set() system calls (see "man ioprio_set"). | ||
| 52 | */ | ||
| 40 | enum { | 53 | enum { |
| 41 | 	IOPRIO_WHO_PROCESS = 1, | 54 | 	IOPRIO_WHO_PROCESS = 1, |
| 42 | 	IOPRIO_WHO_PGRP, | 55 | 	IOPRIO_WHO_PGRP, |
| ... | @@ -44,9 +57,71 @@ enum { | ... | @@ -44,9 +57,71 @@ enum { |
| 44 | }; | 57 | }; |
| 45 | 58 | ||
| 46 | /* | 59 | /* |
| 47 | * Fallback BE priority level. | 60 | * Fallback BE class priority level. |
| 48 | */ | 61 | */ |
| 49 | #define IOPRIO_NORM	4 | 62 | #define IOPRIO_NORM	4 |
| 50 | #define IOPRIO_BE_NORM	IOPRIO_NORM | 63 | #define IOPRIO_BE_NORM	IOPRIO_NORM |
| 51 | 64 | ||
| 65 | /* | ||
| 66 | * The 10 bits between the priority class and the priority level are used to | ||
| 67 | * optionally define I/O hints for any combination of I/O priority class and | ||
| 68 | * level. Depending on the kernel configuration, I/O scheduler being used and | ||
| 69 | * the target I/O device being used, hints can influence how I/Os are processed | ||
| 70 | * without affecting the I/O scheduling ordering defined by the I/O priority | ||
| 71 | * class and level. | ||
| 72 | */ | ||
| 73 | #define IOPRIO_HINT_SHIFT		IOPRIO_LEVEL_NR_BITS | ||
| 74 | #define IOPRIO_HINT_NR_BITS		10 | ||
| 75 | #define IOPRIO_NR_HINTS			(1 << IOPRIO_HINT_NR_BITS) | ||
| 76 | #define IOPRIO_HINT_MASK		(IOPRIO_NR_HINTS - 1) | ||
| 77 | #define IOPRIO_PRIO_HINT(ioprio)	\ | ||
| 78 | 	(((ioprio) >> IOPRIO_HINT_SHIFT) & IOPRIO_HINT_MASK) | ||
| 79 | |||
| 80 | /* | ||
| 81 | * I/O hints. | ||
| 82 | */ | ||
| 83 | enum { | ||
| 84 | 	/* No hint */ | ||
| 85 | 	IOPRIO_HINT_NONE = 0, | ||
| 86 | |||
| 87 | 	/* | ||
| 88 | 	 * Device command duration limits: indicate to the device a desired | ||
| 89 | 	 * duration limit for the commands that will be used to process an I/O. | ||
| 90 | 	 * These will currently only be effective for SCSI and ATA devices that | ||
| 91 | 	 * support the command duration limits feature. If this feature is | ||
| 92 | 	 * enabled, then the commands issued to the device to process an I/O with | ||
| 93 | 	 * one of these hints set will have the duration limit index (dld field) | ||
| 94 | 	 * set to the value of the hint. | ||
| 95 | 	 */ | ||
| 96 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_1 = 1, | ||
| 97 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_2 = 2, | ||
| 98 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_3 = 3, | ||
| 99 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_4 = 4, | ||
| 100 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_5 = 5, | ||
| 101 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_6 = 6, | ||
| 102 | 	IOPRIO_HINT_DEV_DURATION_LIMIT_7 = 7, | ||
| 103 | }; | ||
| 104 | |||
| 105 | #define IOPRIO_BAD_VALUE(val, max) ((val) < 0 || (val) >= (max)) | ||
| 106 | |||
| 107 | /* | ||
| 108 | * Return an I/O priority value based on a class, a level and a hint. | ||
| 109 | */ | ||
| 110 | static __always_inline __u16 ioprio_value(int prioclass, int priolevel, | ||
| 111 | 					 int priohint) | ||
| 112 | { | ||
| 113 | 	if (IOPRIO_BAD_VALUE(prioclass, IOPRIO_NR_CLASSES) || | ||
| 114 | 	 IOPRIO_BAD_VALUE(priolevel, IOPRIO_NR_LEVELS) || | ||
| 115 | 	 IOPRIO_BAD_VALUE(priohint, IOPRIO_NR_HINTS)) | ||
| 116 | 		return IOPRIO_CLASS_INVALID << IOPRIO_CLASS_SHIFT; | ||
| 117 | |||
| 118 | 	return (prioclass << IOPRIO_CLASS_SHIFT) | | ||
| 119 | 		(priohint << IOPRIO_HINT_SHIFT) | priolevel; | ||
| 120 | } | ||
| 121 | |||
| 122 | #define IOPRIO_PRIO_VALUE(prioclass, priolevel)			\ | ||
| 123 | 	ioprio_value(prioclass, priolevel, IOPRIO_HINT_NONE) | ||
| 124 | #define IOPRIO_PRIO_VALUE_HINT(prioclass, priolevel, priohint)	\ | ||
| 125 | 	ioprio_value(prioclass, priolevel, priohint) | ||
| 126 | |||
| 52 | #endif /* _LINUX_IOPRIO_H */ | 127 | #endif /* _LINUX_IOPRIO_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ipv6.h+2-1| ... | @@ -81,7 +81,7 @@ struct ipv6_opt_hdr { | ... | @@ -81,7 +81,7 @@ struct ipv6_opt_hdr { |
| 81 | struct rt0_hdr { | 81 | struct rt0_hdr { |
| 82 | 	struct ipv6_rt_hdr	rt_hdr; | 82 | 	struct ipv6_rt_hdr	rt_hdr; |
| 83 | 	__u32			reserved; | 83 | 	__u32			reserved; |
| 84 | 	struct in6_addr		addr[0]; | 84 | 	struct in6_addr		addr[]; |
| 85 | 85 | ||
| 86 | #define rt0_type		rt_hdr.type | 86 | #define rt0_type		rt_hdr.type |
| 87 | }; | 87 | }; |
| ... | @@ -198,6 +198,7 @@ enum { | ... | @@ -198,6 +198,7 @@ enum { |
| 198 | 	DEVCONF_IOAM6_ID_WIDE, | 198 | 	DEVCONF_IOAM6_ID_WIDE, |
| 199 | 	DEVCONF_NDISC_EVICT_NOCARRIER, | 199 | 	DEVCONF_NDISC_EVICT_NOCARRIER, |
| 200 | 	DEVCONF_ACCEPT_UNTRACKED_NA, | 200 | 	DEVCONF_ACCEPT_UNTRACKED_NA, |
| 201 | 	DEVCONF_ACCEPT_RA_MIN_LFT, | ||
| 201 | 	DEVCONF_MAX | 202 | 	DEVCONF_MAX |
| 202 | }; | 203 | }; |
| 203 | 204 |
lib/libc/include/any-linux-any/linux/isst_if.h+303| ... | @@ -163,10 +163,313 @@ struct isst_if_msr_cmds { | ... | @@ -163,10 +163,313 @@ struct isst_if_msr_cmds { |
| 163 | 	struct isst_if_msr_cmd msr_cmd[1]; | 163 | 	struct isst_if_msr_cmd msr_cmd[1]; |
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | /** | ||
| 167 | * struct isst_core_power - Structure to get/set core_power feature | ||
| 168 | * @get_set:	0: Get, 1: Set | ||
| 169 | * @socket_id:	Socket/package id | ||
| 170 | * @power_domain: Power Domain id | ||
| 171 | * @enable:	Feature enable status | ||
| 172 | * @priority_type: Priority type for the feature (ordered/proportional) | ||
| 173 | * | ||
| 174 | * Structure to get/set core_power feature state using IOCTL | ||
| 175 | * ISST_IF_CORE_POWER_STATE. | ||
| 176 | */ | ||
| 177 | struct isst_core_power { | ||
| 178 | 	__u8 get_set; | ||
| 179 | 	__u8 socket_id; | ||
| 180 | 	__u8 power_domain_id; | ||
| 181 | 	__u8 enable; | ||
| 182 | 	__u8 supported; | ||
| 183 | 	__u8 priority_type; | ||
| 184 | }; | ||
| 185 | |||
| 186 | /** | ||
| 187 | * struct isst_clos_param - Structure to get/set clos praram | ||
| 188 | * @get_set:	0: Get, 1: Set | ||
| 189 | * @socket_id:	Socket/package id | ||
| 190 | * @power_domain:	Power Domain id | ||
| 191 | * clos:	Clos ID for the parameters | ||
| 192 | * min_freq_mhz: Minimum frequency in MHz | ||
| 193 | * max_freq_mhz: Maximum frequency in MHz | ||
| 194 | * prop_prio:	Proportional priority from 0-15 | ||
| 195 | * | ||
| 196 | * Structure to get/set per clos property using IOCTL | ||
| 197 | * ISST_IF_CLOS_PARAM. | ||
| 198 | */ | ||
| 199 | struct isst_clos_param { | ||
| 200 | 	__u8 get_set; | ||
| 201 | 	__u8 socket_id; | ||
| 202 | 	__u8 power_domain_id; | ||
| 203 | 	__u8 clos; | ||
| 204 | 	__u16 min_freq_mhz; | ||
| 205 | 	__u16 max_freq_mhz; | ||
| 206 | 	__u8 prop_prio; | ||
| 207 | }; | ||
| 208 | |||
| 209 | /** | ||
| 210 | * struct isst_if_clos_assoc - Structure to assign clos to a CPU | ||
| 211 | * @socket_id:	Socket/package id | ||
| 212 | * @power_domain:	Power Domain id | ||
| 213 | * @logical_cpu: CPU number | ||
| 214 | * @clos:	Clos ID to assign to the logical CPU | ||
| 215 | * | ||
| 216 | * Structure to get/set core_power feature. | ||
| 217 | */ | ||
| 218 | struct isst_if_clos_assoc { | ||
| 219 | 	__u8 socket_id; | ||
| 220 | 	__u8 power_domain_id; | ||
| 221 | 	__u16 logical_cpu; | ||
| 222 | 	__u16 clos; | ||
| 223 | }; | ||
| 224 | |||
| 225 | /** | ||
| 226 | * struct isst_if_clos_assoc_cmds - Structure to assign clos to CPUs | ||
| 227 | * @cmd_count:	Number of cmds (cpus) in this request | ||
| 228 | * @get_set:	Request is for get or set | ||
| 229 | * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not | ||
| 230 | *		 Linux CPU number | ||
| 231 | * | ||
| 232 | * Structure used to get/set associate CPUs to clos using IOCTL | ||
| 233 | * ISST_IF_CLOS_ASSOC. | ||
| 234 | */ | ||
| 235 | struct isst_if_clos_assoc_cmds { | ||
| 236 | 	__u16 cmd_count; | ||
| 237 | 	__u16 get_set; | ||
| 238 | 	__u16 punit_cpu_map; | ||
| 239 | 	struct isst_if_clos_assoc assoc_info[1]; | ||
| 240 | }; | ||
| 241 | |||
| 242 | /** | ||
| 243 | * struct isst_tpmi_instance_count - Get number of TPMI instances per socket | ||
| 244 | * @socket_id:	Socket/package id | ||
| 245 | * @count:	Number of instances | ||
| 246 | * @valid_mask: Mask of instances as there can be holes | ||
| 247 | * | ||
| 248 | * Structure used to get TPMI instances information using | ||
| 249 | * IOCTL ISST_IF_COUNT_TPMI_INSTANCES. | ||
| 250 | */ | ||
| 251 | struct isst_tpmi_instance_count { | ||
| 252 | 	__u8 socket_id; | ||
| 253 | 	__u8 count; | ||
| 254 | 	__u16 valid_mask; | ||
| 255 | }; | ||
| 256 | |||
| 257 | /** | ||
| 258 | * struct isst_perf_level_info - Structure to get information on SST-PP levels | ||
| 259 | * @socket_id:	Socket/package id | ||
| 260 | * @power_domain:	Power Domain id | ||
| 261 | * @logical_cpu: CPU number | ||
| 262 | * @clos:	Clos ID to assign to the logical CPU | ||
| 263 | * @max_level: Maximum performance level supported by the platform | ||
| 264 | * @feature_rev: The feature revision for SST-PP supported by the platform | ||
| 265 | * @level_mask: Mask of supported performance levels | ||
| 266 | * @current_level: Current performance level | ||
| 267 | * @feature_state: SST-BF and SST-TF (enabled/disabled) status at current level | ||
| 268 | * @locked: SST-PP performance level change is locked/unlocked | ||
| 269 | * @enabled: SST-PP feature is enabled or not | ||
| 270 | * @sst-tf_support: SST-TF support status at this level | ||
| 271 | * @sst-bf_support: SST-BF support status at this level | ||
| 272 | * | ||
| 273 | * Structure to get SST-PP details using IOCTL ISST_IF_PERF_LEVELS. | ||
| 274 | */ | ||
| 275 | struct isst_perf_level_info { | ||
| 276 | 	__u8 socket_id; | ||
| 277 | 	__u8 power_domain_id; | ||
| 278 | 	__u8 max_level; | ||
| 279 | 	__u8 feature_rev; | ||
| 280 | 	__u8 level_mask; | ||
| 281 | 	__u8 current_level; | ||
| 282 | 	__u8 feature_state; | ||
| 283 | 	__u8 locked; | ||
| 284 | 	__u8 enabled; | ||
| 285 | 	__u8 sst_tf_support; | ||
| 286 | 	__u8 sst_bf_support; | ||
| 287 | }; | ||
| 288 | |||
| 289 | /** | ||
| 290 | * struct isst_perf_level_control - Structure to set SST-PP level | ||
| 291 | * @socket_id:	Socket/package id | ||
| 292 | * @power_domain:	Power Domain id | ||
| 293 | * @level:	level to set | ||
| 294 | * | ||
| 295 | * Structure used change SST-PP level using IOCTL ISST_IF_PERF_SET_LEVEL. | ||
| 296 | */ | ||
| 297 | struct isst_perf_level_control { | ||
| 298 | 	__u8 socket_id; | ||
| 299 | 	__u8 power_domain_id; | ||
| 300 | 	__u8 level; | ||
| 301 | }; | ||
| 302 | |||
| 303 | /** | ||
| 304 | * struct isst_perf_feature_control - Structure to activate SST-BF/SST-TF | ||
| 305 | * @socket_id:	Socket/package id | ||
| 306 | * @power_domain:	Power Domain id | ||
| 307 | * @feature:	bit 0 = SST-BF state, bit 1 = SST-TF state | ||
| 308 | * | ||
| 309 | * Structure used to enable SST-BF/SST-TF using IOCTL ISST_IF_PERF_SET_FEATURE. | ||
| 310 | */ | ||
| 311 | struct isst_perf_feature_control { | ||
| 312 | 	__u8 socket_id; | ||
| 313 | 	__u8 power_domain_id; | ||
| 314 | 	__u8 feature; | ||
| 315 | }; | ||
| 316 | |||
| 317 | #define TRL_MAX_BUCKETS	8 | ||
| 318 | #define TRL_MAX_LEVELS		6 | ||
| 319 | |||
| 320 | /** | ||
| 321 | * struct isst_perf_level_data_info - Structure to get SST-PP level details | ||
| 322 | * @socket_id:	Socket/package id | ||
| 323 | * @power_domain:	Power Domain id | ||
| 324 | * @level:	SST-PP level for which caller wants to get information | ||
| 325 | * @tdp_ratio: TDP Ratio | ||
| 326 | * @base_freq_mhz: Base frequency in MHz | ||
| 327 | * @base_freq_avx2_mhz: AVX2 Base frequency in MHz | ||
| 328 | * @base_freq_avx512_mhz: AVX512 base frequency in MHz | ||
| 329 | * @base_freq_amx_mhz: AMX base frequency in MHz | ||
| 330 | * @thermal_design_power_w: Thermal design (TDP) power | ||
| 331 | * @tjunction_max_c: Max junction temperature | ||
| 332 | * @max_memory_freq_mhz: Max memory frequency in MHz | ||
| 333 | * @cooling_type: Type of cooling is used | ||
| 334 | * @p0_freq_mhz: core maximum frequency | ||
| 335 | * @p1_freq_mhz: Core TDP frequency | ||
| 336 | * @pn_freq_mhz: Core maximum efficiency frequency | ||
| 337 | * @pm_freq_mhz: Core minimum frequency | ||
| 338 | * @p0_fabric_freq_mhz: Fabric (Uncore) maximum frequency | ||
| 339 | * @p1_fabric_freq_mhz: Fabric (Uncore) TDP frequency | ||
| 340 | * @pn_fabric_freq_mhz: Fabric (Uncore) minimum efficiency frequency | ||
| 341 | * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency | ||
| 342 | * @max_buckets: Maximum trl buckets | ||
| 343 | * @max_trl_levels: Maximum trl levels | ||
| 344 | * @bucket_core_counts[TRL_MAX_BUCKETS]: Number of cores per bucket | ||
| 345 | * @trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]: maximum frequency | ||
| 346 | * for a bucket and trl level | ||
| 347 | * | ||
| 348 | * Structure used to get information on frequencies and TDP for a SST-PP | ||
| 349 | * level using ISST_IF_GET_PERF_LEVEL_INFO. | ||
| 350 | */ | ||
| 351 | struct isst_perf_level_data_info { | ||
| 352 | 	__u8 socket_id; | ||
| 353 | 	__u8 power_domain_id; | ||
| 354 | 	__u16 level; | ||
| 355 | 	__u16 tdp_ratio; | ||
| 356 | 	__u16 base_freq_mhz; | ||
| 357 | 	__u16 base_freq_avx2_mhz; | ||
| 358 | 	__u16 base_freq_avx512_mhz; | ||
| 359 | 	__u16 base_freq_amx_mhz; | ||
| 360 | 	__u16 thermal_design_power_w; | ||
| 361 | 	__u16 tjunction_max_c; | ||
| 362 | 	__u16 max_memory_freq_mhz; | ||
| 363 | 	__u16 cooling_type; | ||
| 364 | 	__u16 p0_freq_mhz; | ||
| 365 | 	__u16 p1_freq_mhz; | ||
| 366 | 	__u16 pn_freq_mhz; | ||
| 367 | 	__u16 pm_freq_mhz; | ||
| 368 | 	__u16 p0_fabric_freq_mhz; | ||
| 369 | 	__u16 p1_fabric_freq_mhz; | ||
| 370 | 	__u16 pn_fabric_freq_mhz; | ||
| 371 | 	__u16 pm_fabric_freq_mhz; | ||
| 372 | 	__u16 max_buckets; | ||
| 373 | 	__u16 max_trl_levels; | ||
| 374 | 	__u16 bucket_core_counts[TRL_MAX_BUCKETS]; | ||
| 375 | 	__u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; | ||
| 376 | }; | ||
| 377 | |||
| 378 | /** | ||
| 379 | * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask | ||
| 380 | * @socket_id:	Socket/package id | ||
| 381 | * @power_domain:	Power Domain id | ||
| 382 | * @level:	SST-PP level for which caller wants to get information | ||
| 383 | * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not | ||
| 384 | *		 Linux CPU number. If 0 CPU buffer is copied to user space | ||
| 385 | *		 supplied cpu_buffer of size cpu_buffer_size. Punit | ||
| 386 | *		 cpu mask is copied to "mask" field. | ||
| 387 | * @mask:	cpu mask for this PP level (punit CPU numbering) | ||
| 388 | * @cpu_buffer_size: size of cpu_buffer also used to return the copied CPU | ||
| 389 | *		buffer size. | ||
| 390 | * @cpu_buffer:	Buffer to copy CPU mask when punit_cpu_map is 0 | ||
| 391 | * | ||
| 392 | * Structure used to get cpumask for a SST-PP level using | ||
| 393 | * IOCTL ISST_IF_GET_PERF_LEVEL_CPU_MASK. Also used to get CPU mask for | ||
| 394 | * IOCTL ISST_IF_GET_BASE_FREQ_CPU_MASK for SST-BF. | ||
| 395 | */ | ||
| 396 | struct isst_perf_level_cpu_mask { | ||
| 397 | 	__u8 socket_id; | ||
| 398 | 	__u8 power_domain_id; | ||
| 399 | 	__u8 level; | ||
| 400 | 	__u8 punit_cpu_map; | ||
| 401 | 	__u64 mask; | ||
| 402 | 	__u16 cpu_buffer_size; | ||
| 403 | 	__s8 cpu_buffer[1]; | ||
| 404 | }; | ||
| 405 | |||
| 406 | /** | ||
| 407 | * struct isst_base_freq_info - Structure to get SST-BF frequencies | ||
| 408 | * @socket_id:	Socket/package id | ||
| 409 | * @power_domain:	Power Domain id | ||
| 410 | * @level:	SST-PP level for which caller wants to get information | ||
| 411 | * @high_base_freq_mhz: High priority CPU base frequency | ||
| 412 | * @low_base_freq_mhz: Low priority CPU base frequency | ||
| 413 | * @tjunction_max_c: Max junction temperature | ||
| 414 | * @thermal_design_power_w: Thermal design power in watts | ||
| 415 | * | ||
| 416 | * Structure used to get SST-BF information using | ||
| 417 | * IOCTL ISST_IF_GET_BASE_FREQ_INFO. | ||
| 418 | */ | ||
| 419 | struct isst_base_freq_info { | ||
| 420 | 	__u8 socket_id; | ||
| 421 | 	__u8 power_domain_id; | ||
| 422 | 	__u16 level; | ||
| 423 | 	__u16 high_base_freq_mhz; | ||
| 424 | 	__u16 low_base_freq_mhz; | ||
| 425 | 	__u16 tjunction_max_c; | ||
| 426 | 	__u16 thermal_design_power_w; | ||
| 427 | }; | ||
| 428 | |||
| 429 | /** | ||
| 430 | * struct isst_turbo_freq_info - Structure to get SST-TF frequencies | ||
| 431 | * @socket_id:	Socket/package id | ||
| 432 | * @power_domain:	Power Domain id | ||
| 433 | * @level:	SST-PP level for which caller wants to get information | ||
| 434 | * @max_clip_freqs: Maximum number of low priority core clipping frequencies | ||
| 435 | * @lp_clip_freq_mhz: Clip frequencies per trl level | ||
| 436 | * @bucket_core_counts: Maximum number of cores for a bucket | ||
| 437 | * @trl_freq_mhz: Frequencies per trl level for each bucket | ||
| 438 | * | ||
| 439 | * Structure used to get SST-TF information using | ||
| 440 | * IOCTL ISST_IF_GET_TURBO_FREQ_INFO. | ||
| 441 | */ | ||
| 442 | struct isst_turbo_freq_info { | ||
| 443 | 	__u8 socket_id; | ||
| 444 | 	__u8 power_domain_id; | ||
| 445 | 	__u16 level; | ||
| 446 | 	__u16 max_clip_freqs; | ||
| 447 | 	__u16 max_buckets; | ||
| 448 | 	__u16 max_trl_levels; | ||
| 449 | 	__u16 lp_clip_freq_mhz[TRL_MAX_LEVELS]; | ||
| 450 | 	__u16 bucket_core_counts[TRL_MAX_BUCKETS]; | ||
| 451 | 	__u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; | ||
| 452 | }; | ||
| 453 | |||
| 166 | #define ISST_IF_MAGIC			0xFE | 454 | #define ISST_IF_MAGIC			0xFE |
| 167 | #define ISST_IF_GET_PLATFORM_INFO	_IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *) | 455 | #define ISST_IF_GET_PLATFORM_INFO	_IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *) |
| 168 | #define ISST_IF_GET_PHY_ID		_IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *) | 456 | #define ISST_IF_GET_PHY_ID		_IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *) |
| 169 | #define ISST_IF_IO_CMD		_IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *) | 457 | #define ISST_IF_IO_CMD		_IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *) |
| 170 | #define ISST_IF_MBOX_COMMAND	_IOWR(ISST_IF_MAGIC, 3, struct isst_if_mbox_cmds *) | 458 | #define ISST_IF_MBOX_COMMAND	_IOWR(ISST_IF_MAGIC, 3, struct isst_if_mbox_cmds *) |
| 171 | #define ISST_IF_MSR_COMMAND	_IOWR(ISST_IF_MAGIC, 4, struct isst_if_msr_cmds *) | 459 | #define ISST_IF_MSR_COMMAND	_IOWR(ISST_IF_MAGIC, 4, struct isst_if_msr_cmds *) |
| 460 | |||
| 461 | #define ISST_IF_COUNT_TPMI_INSTANCES	_IOR(ISST_IF_MAGIC, 5, struct isst_tpmi_instance_count *) | ||
| 462 | #define ISST_IF_CORE_POWER_STATE _IOWR(ISST_IF_MAGIC, 6, struct isst_core_power *) | ||
| 463 | #define ISST_IF_CLOS_PARAM	_IOWR(ISST_IF_MAGIC, 7, struct isst_clos_param *) | ||
| 464 | #define ISST_IF_CLOS_ASSOC	_IOWR(ISST_IF_MAGIC, 8, struct isst_if_clos_assoc_cmds *) | ||
| 465 | |||
| 466 | #define ISST_IF_PERF_LEVELS	_IOWR(ISST_IF_MAGIC, 9, struct isst_perf_level_info *) | ||
| 467 | #define ISST_IF_PERF_SET_LEVEL	_IOW(ISST_IF_MAGIC, 10, struct isst_perf_level_control *) | ||
| 468 | #define ISST_IF_PERF_SET_FEATURE _IOW(ISST_IF_MAGIC, 11, struct isst_perf_feature_control *) | ||
| 469 | #define ISST_IF_GET_PERF_LEVEL_INFO	_IOR(ISST_IF_MAGIC, 12, struct isst_perf_level_data_info *) | ||
| 470 | #define ISST_IF_GET_PERF_LEVEL_CPU_MASK	_IOR(ISST_IF_MAGIC, 13, struct isst_perf_level_cpu_mask *) | ||
| 471 | #define ISST_IF_GET_BASE_FREQ_INFO	_IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) | ||
| 472 | #define ISST_IF_GET_BASE_FREQ_CPU_MASK	_IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) | ||
| 473 | #define ISST_IF_GET_TURBO_FREQ_INFO	_IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) | ||
| 474 | |||
| 172 | #endif | 475 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/kexec.h+3| ... | @@ -12,6 +12,8 @@ | ... | @@ -12,6 +12,8 @@ |
| 12 | /* kexec flags for different usage scenarios */ | 12 | /* kexec flags for different usage scenarios */ |
| 13 | #define KEXEC_ON_CRASH		0x00000001 | 13 | #define KEXEC_ON_CRASH		0x00000001 |
| 14 | #define KEXEC_PRESERVE_CONTEXT	0x00000002 | 14 | #define KEXEC_PRESERVE_CONTEXT	0x00000002 |
| 15 | #define KEXEC_UPDATE_ELFCOREHDR	0x00000004 | ||
| 16 | #define KEXEC_CRASH_HOTPLUG_SUPPORT 0x00000008 | ||
| 15 | #define KEXEC_ARCH_MASK		0xffff0000 | 17 | #define KEXEC_ARCH_MASK		0xffff0000 |
| 16 | 18 | ||
| 17 | /* | 19 | /* |
| ... | @@ -24,6 +26,7 @@ | ... | @@ -24,6 +26,7 @@ |
| 24 | #define KEXEC_FILE_UNLOAD	0x00000001 | 26 | #define KEXEC_FILE_UNLOAD	0x00000001 |
| 25 | #define KEXEC_FILE_ON_CRASH	0x00000002 | 27 | #define KEXEC_FILE_ON_CRASH	0x00000002 |
| 26 | #define KEXEC_FILE_NO_INITRAMFS	0x00000004 | 28 | #define KEXEC_FILE_NO_INITRAMFS	0x00000004 |
| 29 | #define KEXEC_FILE_DEBUG	0x00000008 | ||
| 27 | 30 | ||
| 28 | /* These values match the ELF architecture values. | 31 | /* These values match the ELF architecture values. |
| 29 | * Unless there is a good reason that should continue to be the case. | 32 | * Unless there is a good reason that should continue to be the case. |
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+704-3| ... | @@ -37,9 +37,13 @@ | ... | @@ -37,9 +37,13 @@ |
| 37 | * - 1.9 - Add available memory ioctl | 37 | * - 1.9 - Add available memory ioctl |
| 38 | * - 1.10 - Add SMI profiler event log | 38 | * - 1.10 - Add SMI profiler event log |
| 39 | * - 1.11 - Add unified memory for ctx save/restore area | 39 | * - 1.11 - Add unified memory for ctx save/restore area |
| 40 | * - 1.12 - Add DMA buf export ioctl | ||
| 41 | * - 1.13 - Add debugger API | ||
| 42 | * - 1.14 - Update kfd_event_data | ||
| 43 | * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl | ||
| 40 | */ | 44 | */ |
| 41 | #define KFD_IOCTL_MAJOR_VERSION 1 | 45 | #define KFD_IOCTL_MAJOR_VERSION 1 |
| 42 | #define KFD_IOCTL_MINOR_VERSION 11 | 46 | #define KFD_IOCTL_MINOR_VERSION 15 |
| 43 | 47 | ||
| 44 | struct kfd_ioctl_get_version_args { | 48 | struct kfd_ioctl_get_version_args { |
| 45 | 	__u32 major_version;	/* from KFD */ | 49 | 	__u32 major_version;	/* from KFD */ |
| ... | @@ -109,6 +113,32 @@ struct kfd_ioctl_get_available_memory_args { | ... | @@ -109,6 +113,32 @@ struct kfd_ioctl_get_available_memory_args { |
| 109 | 	__u32 pad; | 113 | 	__u32 pad; |
| 110 | }; | 114 | }; |
| 111 | 115 | ||
| 116 | struct kfd_dbg_device_info_entry { | ||
| 117 | 	__u64 exception_status; | ||
| 118 | 	__u64 lds_base; | ||
| 119 | 	__u64 lds_limit; | ||
| 120 | 	__u64 scratch_base; | ||
| 121 | 	__u64 scratch_limit; | ||
| 122 | 	__u64 gpuvm_base; | ||
| 123 | 	__u64 gpuvm_limit; | ||
| 124 | 	__u32 gpu_id; | ||
| 125 | 	__u32 location_id; | ||
| 126 | 	__u32 vendor_id; | ||
| 127 | 	__u32 device_id; | ||
| 128 | 	__u32 revision_id; | ||
| 129 | 	__u32 subsystem_vendor_id; | ||
| 130 | 	__u32 subsystem_device_id; | ||
| 131 | 	__u32 fw_version; | ||
| 132 | 	__u32 gfx_target_version; | ||
| 133 | 	__u32 simd_count; | ||
| 134 | 	__u32 max_waves_per_simd; | ||
| 135 | 	__u32 array_count; | ||
| 136 | 	__u32 simd_arrays_per_engine; | ||
| 137 | 	__u32 num_xcc; | ||
| 138 | 	__u32 capability; | ||
| 139 | 	__u32 debug_prop; | ||
| 140 | }; | ||
| 141 | |||
| 112 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ | 142 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
| 113 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 | 143 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 |
| 114 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | 144 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
| ... | @@ -292,12 +322,20 @@ struct kfd_hsa_hw_exception_data { | ... | @@ -292,12 +322,20 @@ struct kfd_hsa_hw_exception_data { |
| 292 | 	__u32 gpu_id; | 322 | 	__u32 gpu_id; |
| 293 | }; | 323 | }; |
| 294 | 324 | ||
| 325 | /* hsa signal event data */ | ||
| 326 | struct kfd_hsa_signal_event_data { | ||
| 327 | 	__u64 last_event_age;	/* to and from KFD */ | ||
| 328 | }; | ||
| 329 | |||
| 295 | /* Event data */ | 330 | /* Event data */ |
| 296 | struct kfd_event_data { | 331 | struct kfd_event_data { |
| 297 | 	union { | 332 | 	union { |
| 333 | 		/* From KFD */ | ||
| 298 | 		struct kfd_hsa_memory_exception_data memory_exception_data; | 334 | 		struct kfd_hsa_memory_exception_data memory_exception_data; |
| 299 | 		struct kfd_hsa_hw_exception_data hw_exception_data; | 335 | 		struct kfd_hsa_hw_exception_data hw_exception_data; |
| 300 | 	};				/* From KFD */ | 336 | 		/* To and From KFD */ |
| 337 | 		struct kfd_hsa_signal_event_data signal_event_data; | ||
| 338 | 	}; | ||
| 301 | 	__u64 kfd_event_data_ext;	/* pointer to an extension structure | 339 | 	__u64 kfd_event_data_ext;	/* pointer to an extension structure |
| 302 | 					 for future exception types */ | 340 | 					 for future exception types */ |
| 303 | 	__u32 event_id;		/* to KFD */ | 341 | 	__u32 event_id;		/* to KFD */ |
| ... | @@ -368,6 +406,7 @@ struct kfd_ioctl_acquire_vm_args { | ... | @@ -368,6 +406,7 @@ struct kfd_ioctl_acquire_vm_args { |
| 368 | #define KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM	(1 << 27) | 406 | #define KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM	(1 << 27) |
| 369 | #define KFD_IOC_ALLOC_MEM_FLAGS_COHERENT	(1 << 26) | 407 | #define KFD_IOC_ALLOC_MEM_FLAGS_COHERENT	(1 << 26) |
| 370 | #define KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED	(1 << 25) | 408 | #define KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED	(1 << 25) |
| 409 | #define KFD_IOC_ALLOC_MEM_FLAGS_EXT_COHERENT	(1 << 24) | ||
| 371 | 410 | ||
| 372 | /* Allocate memory for later SVM (shared virtual memory) mapping. | 411 | /* Allocate memory for later SVM (shared virtual memory) mapping. |
| 373 | * | 412 | * |
| ... | @@ -463,6 +502,12 @@ struct kfd_ioctl_import_dmabuf_args { | ... | @@ -463,6 +502,12 @@ struct kfd_ioctl_import_dmabuf_args { |
| 463 | 	__u32 dmabuf_fd;	/* to KFD */ | 502 | 	__u32 dmabuf_fd;	/* to KFD */ |
| 464 | }; | 503 | }; |
| 465 | 504 | ||
| 505 | struct kfd_ioctl_export_dmabuf_args { | ||
| 506 | 	__u64 handle;		/* to KFD */ | ||
| 507 | 	__u32 flags;		/* to KFD */ | ||
| 508 | 	__u32 dmabuf_fd;	/* from KFD */ | ||
| 509 | }; | ||
| 510 | |||
| 466 | /* | 511 | /* |
| 467 | * KFD SMI(System Management Interface) events | 512 | * KFD SMI(System Management Interface) events |
| 468 | */ | 513 | */ |
| ... | @@ -616,6 +661,8 @@ enum kfd_mmio_remap { | ... | @@ -616,6 +661,8 @@ enum kfd_mmio_remap { |
| 616 | #define KFD_IOCTL_SVM_FLAG_GPU_READ_MOSTLY 0x00000020 | 661 | #define KFD_IOCTL_SVM_FLAG_GPU_READ_MOSTLY 0x00000020 |
| 617 | /* Keep GPU memory mapping always valid as if XNACK is disable */ | 662 | /* Keep GPU memory mapping always valid as if XNACK is disable */ |
| 618 | #define KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED 0x00000040 | 663 | #define KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED 0x00000040 |
| 664 | /* Fine grained coherency between all devices using device-scope atomics */ | ||
| 665 | #define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080 | ||
| 619 | 666 | ||
| 620 | /** | 667 | /** |
| 621 | * kfd_ioctl_svm_op - SVM ioctl operations | 668 | * kfd_ioctl_svm_op - SVM ioctl operations |
| ... | @@ -766,6 +813,651 @@ struct kfd_ioctl_set_xnack_mode_args { | ... | @@ -766,6 +813,651 @@ struct kfd_ioctl_set_xnack_mode_args { |
| 766 | 	__s32 xnack_enabled; | 813 | 	__s32 xnack_enabled; |
| 767 | }; | 814 | }; |
| 768 | 815 | ||
| 816 | /* Wave launch override modes */ | ||
| 817 | enum kfd_dbg_trap_override_mode { | ||
| 818 | 	KFD_DBG_TRAP_OVERRIDE_OR = 0, | ||
| 819 | 	KFD_DBG_TRAP_OVERRIDE_REPLACE = 1 | ||
| 820 | }; | ||
| 821 | |||
| 822 | /* Wave launch overrides */ | ||
| 823 | enum kfd_dbg_trap_mask { | ||
| 824 | 	KFD_DBG_TRAP_MASK_FP_INVALID = 1, | ||
| 825 | 	KFD_DBG_TRAP_MASK_FP_INPUT_DENORMAL = 2, | ||
| 826 | 	KFD_DBG_TRAP_MASK_FP_DIVIDE_BY_ZERO = 4, | ||
| 827 | 	KFD_DBG_TRAP_MASK_FP_OVERFLOW = 8, | ||
| 828 | 	KFD_DBG_TRAP_MASK_FP_UNDERFLOW = 16, | ||
| 829 | 	KFD_DBG_TRAP_MASK_FP_INEXACT = 32, | ||
| 830 | 	KFD_DBG_TRAP_MASK_INT_DIVIDE_BY_ZERO = 64, | ||
| 831 | 	KFD_DBG_TRAP_MASK_DBG_ADDRESS_WATCH = 128, | ||
| 832 | 	KFD_DBG_TRAP_MASK_DBG_MEMORY_VIOLATION = 256, | ||
| 833 | 	KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_START = (1 << 30), | ||
| 834 | 	KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_END = (1 << 31) | ||
| 835 | }; | ||
| 836 | |||
| 837 | /* Wave launch modes */ | ||
| 838 | enum kfd_dbg_trap_wave_launch_mode { | ||
| 839 | 	KFD_DBG_TRAP_WAVE_LAUNCH_MODE_NORMAL = 0, | ||
| 840 | 	KFD_DBG_TRAP_WAVE_LAUNCH_MODE_HALT = 1, | ||
| 841 | 	KFD_DBG_TRAP_WAVE_LAUNCH_MODE_DEBUG = 3 | ||
| 842 | }; | ||
| 843 | |||
| 844 | /* Address watch modes */ | ||
| 845 | enum kfd_dbg_trap_address_watch_mode { | ||
| 846 | 	KFD_DBG_TRAP_ADDRESS_WATCH_MODE_READ = 0, | ||
| 847 | 	KFD_DBG_TRAP_ADDRESS_WATCH_MODE_NONREAD = 1, | ||
| 848 | 	KFD_DBG_TRAP_ADDRESS_WATCH_MODE_ATOMIC = 2, | ||
| 849 | 	KFD_DBG_TRAP_ADDRESS_WATCH_MODE_ALL = 3 | ||
| 850 | }; | ||
| 851 | |||
| 852 | /* Additional wave settings */ | ||
| 853 | enum kfd_dbg_trap_flags { | ||
| 854 | 	KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1, | ||
| 855 | }; | ||
| 856 | |||
| 857 | /* Trap exceptions */ | ||
| 858 | enum kfd_dbg_trap_exception_code { | ||
| 859 | 	EC_NONE = 0, | ||
| 860 | 	/* per queue */ | ||
| 861 | 	EC_QUEUE_WAVE_ABORT = 1, | ||
| 862 | 	EC_QUEUE_WAVE_TRAP = 2, | ||
| 863 | 	EC_QUEUE_WAVE_MATH_ERROR = 3, | ||
| 864 | 	EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION = 4, | ||
| 865 | 	EC_QUEUE_WAVE_MEMORY_VIOLATION = 5, | ||
| 866 | 	EC_QUEUE_WAVE_APERTURE_VIOLATION = 6, | ||
| 867 | 	EC_QUEUE_PACKET_DISPATCH_DIM_INVALID = 16, | ||
| 868 | 	EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID = 17, | ||
| 869 | 	EC_QUEUE_PACKET_DISPATCH_CODE_INVALID = 18, | ||
| 870 | 	EC_QUEUE_PACKET_RESERVED = 19, | ||
| 871 | 	EC_QUEUE_PACKET_UNSUPPORTED = 20, | ||
| 872 | 	EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID = 21, | ||
| 873 | 	EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID = 22, | ||
| 874 | 	EC_QUEUE_PACKET_VENDOR_UNSUPPORTED = 23, | ||
| 875 | 	EC_QUEUE_PREEMPTION_ERROR = 30, | ||
| 876 | 	EC_QUEUE_NEW = 31, | ||
| 877 | 	/* per device */ | ||
| 878 | 	EC_DEVICE_QUEUE_DELETE = 32, | ||
| 879 | 	EC_DEVICE_MEMORY_VIOLATION = 33, | ||
| 880 | 	EC_DEVICE_RAS_ERROR = 34, | ||
| 881 | 	EC_DEVICE_FATAL_HALT = 35, | ||
| 882 | 	EC_DEVICE_NEW = 36, | ||
| 883 | 	/* per process */ | ||
| 884 | 	EC_PROCESS_RUNTIME = 48, | ||
| 885 | 	EC_PROCESS_DEVICE_REMOVE = 49, | ||
| 886 | 	EC_MAX | ||
| 887 | }; | ||
| 888 | |||
| 889 | /* Mask generated by ecode in kfd_dbg_trap_exception_code */ | ||
| 890 | #define KFD_EC_MASK(ecode)	(1ULL << (ecode - 1)) | ||
| 891 | |||
| 892 | /* Masks for exception code type checks below */ | ||
| 893 | #define KFD_EC_MASK_QUEUE	(KFD_EC_MASK(EC_QUEUE_WAVE_ABORT) |	\ | ||
| 894 | 				 KFD_EC_MASK(EC_QUEUE_WAVE_TRAP) |	\ | ||
| 895 | 				 KFD_EC_MASK(EC_QUEUE_WAVE_MATH_ERROR) |	\ | ||
| 896 | 				 KFD_EC_MASK(EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION) |	\ | ||
| 897 | 				 KFD_EC_MASK(EC_QUEUE_WAVE_MEMORY_VIOLATION) |	\ | ||
| 898 | 				 KFD_EC_MASK(EC_QUEUE_WAVE_APERTURE_VIOLATION) |	\ | ||
| 899 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) |	\ | ||
| 900 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) |	\ | ||
| 901 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) |	\ | ||
| 902 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) |	\ | ||
| 903 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) |	\ | ||
| 904 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) |	\ | ||
| 905 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) |	\ | ||
| 906 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED)	|	\ | ||
| 907 | 				 KFD_EC_MASK(EC_QUEUE_PREEMPTION_ERROR)	|	\ | ||
| 908 | 				 KFD_EC_MASK(EC_QUEUE_NEW)) | ||
| 909 | #define KFD_EC_MASK_DEVICE	(KFD_EC_MASK(EC_DEVICE_QUEUE_DELETE) |		\ | ||
| 910 | 				 KFD_EC_MASK(EC_DEVICE_RAS_ERROR) |		\ | ||
| 911 | 				 KFD_EC_MASK(EC_DEVICE_FATAL_HALT) |		\ | ||
| 912 | 				 KFD_EC_MASK(EC_DEVICE_MEMORY_VIOLATION) |	\ | ||
| 913 | 				 KFD_EC_MASK(EC_DEVICE_NEW)) | ||
| 914 | #define KFD_EC_MASK_PROCESS	(KFD_EC_MASK(EC_PROCESS_RUNTIME) |	\ | ||
| 915 | 				 KFD_EC_MASK(EC_PROCESS_DEVICE_REMOVE)) | ||
| 916 | #define KFD_EC_MASK_PACKET	(KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_DIM_INVALID) |	\ | ||
| 917 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID) |	\ | ||
| 918 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_CODE_INVALID) |	\ | ||
| 919 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_RESERVED) |	\ | ||
| 920 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_UNSUPPORTED) |	\ | ||
| 921 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID) |	\ | ||
| 922 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID) |	\ | ||
| 923 | 				 KFD_EC_MASK(EC_QUEUE_PACKET_VENDOR_UNSUPPORTED)) | ||
| 924 | |||
| 925 | /* Checks for exception code types for KFD search */ | ||
| 926 | #define KFD_DBG_EC_IS_VALID(ecode) (ecode > EC_NONE && ecode < EC_MAX) | ||
| 927 | #define KFD_DBG_EC_TYPE_IS_QUEUE(ecode)					\ | ||
| 928 | 			(KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_QUEUE)) | ||
| 929 | #define KFD_DBG_EC_TYPE_IS_DEVICE(ecode)				\ | ||
| 930 | 			(KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_DEVICE)) | ||
| 931 | #define KFD_DBG_EC_TYPE_IS_PROCESS(ecode)				\ | ||
| 932 | 			(KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PROCESS)) | ||
| 933 | #define KFD_DBG_EC_TYPE_IS_PACKET(ecode)				\ | ||
| 934 | 			(KFD_DBG_EC_IS_VALID(ecode) && !!(KFD_EC_MASK(ecode) & KFD_EC_MASK_PACKET)) | ||
| 935 | |||
| 936 | |||
| 937 | /* Runtime enable states */ | ||
| 938 | enum kfd_dbg_runtime_state { | ||
| 939 | 	DEBUG_RUNTIME_STATE_DISABLED = 0, | ||
| 940 | 	DEBUG_RUNTIME_STATE_ENABLED = 1, | ||
| 941 | 	DEBUG_RUNTIME_STATE_ENABLED_BUSY = 2, | ||
| 942 | 	DEBUG_RUNTIME_STATE_ENABLED_ERROR = 3 | ||
| 943 | }; | ||
| 944 | |||
| 945 | /* Runtime enable status */ | ||
| 946 | struct kfd_runtime_info { | ||
| 947 | 	__u64 r_debug; | ||
| 948 | 	__u32 runtime_state; | ||
| 949 | 	__u32 ttmp_setup; | ||
| 950 | }; | ||
| 951 | |||
| 952 | /* Enable modes for runtime enable */ | ||
| 953 | #define KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK	1 | ||
| 954 | #define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK	2 | ||
| 955 | |||
| 956 | /** | ||
| 957 | * kfd_ioctl_runtime_enable_args - Arguments for runtime enable | ||
| 958 | * | ||
| 959 | * Coordinates debug exception signalling and debug device enablement with runtime. | ||
| 960 | * | ||
| 961 | * @r_debug - pointer to user struct for sharing information between ROCr and the debuggger | ||
| 962 | * @mode_mask - mask to set mode | ||
| 963 | *	KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable | ||
| 964 | *	KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable) | ||
| 965 | * @capabilities_mask - mask to notify runtime on what KFD supports | ||
| 966 | * | ||
| 967 | * Return - 0 on SUCCESS. | ||
| 968 | *	 - EBUSY if runtime enable call already pending. | ||
| 969 | *	 - EEXIST if user queues already active prior to call. | ||
| 970 | *	 If process is debug enabled, runtime enable will enable debug devices and | ||
| 971 | *	 wait for debugger process to send runtime exception EC_PROCESS_RUNTIME | ||
| 972 | *	 to unblock - see kfd_ioctl_dbg_trap_args. | ||
| 973 | * | ||
| 974 | */ | ||
| 975 | struct kfd_ioctl_runtime_enable_args { | ||
| 976 | 	__u64 r_debug; | ||
| 977 | 	__u32 mode_mask; | ||
| 978 | 	__u32 capabilities_mask; | ||
| 979 | }; | ||
| 980 | |||
| 981 | /* Queue information */ | ||
| 982 | struct kfd_queue_snapshot_entry { | ||
| 983 | 	__u64 exception_status; | ||
| 984 | 	__u64 ring_base_address; | ||
| 985 | 	__u64 write_pointer_address; | ||
| 986 | 	__u64 read_pointer_address; | ||
| 987 | 	__u64 ctx_save_restore_address; | ||
| 988 | 	__u32 queue_id; | ||
| 989 | 	__u32 gpu_id; | ||
| 990 | 	__u32 ring_size; | ||
| 991 | 	__u32 queue_type; | ||
| 992 | 	__u32 ctx_save_restore_area_size; | ||
| 993 | 	__u32 reserved; | ||
| 994 | }; | ||
| 995 | |||
| 996 | /* Queue status return for suspend/resume */ | ||
| 997 | #define KFD_DBG_QUEUE_ERROR_BIT		30 | ||
| 998 | #define KFD_DBG_QUEUE_INVALID_BIT	31 | ||
| 999 | #define KFD_DBG_QUEUE_ERROR_MASK	(1 << KFD_DBG_QUEUE_ERROR_BIT) | ||
| 1000 | #define KFD_DBG_QUEUE_INVALID_MASK	(1 << KFD_DBG_QUEUE_INVALID_BIT) | ||
| 1001 | |||
| 1002 | /* Context save area header information */ | ||
| 1003 | struct kfd_context_save_area_header { | ||
| 1004 | 	struct { | ||
| 1005 | 		__u32 control_stack_offset; | ||
| 1006 | 		__u32 control_stack_size; | ||
| 1007 | 		__u32 wave_state_offset; | ||
| 1008 | 		__u32 wave_state_size; | ||
| 1009 | 	} wave_state; | ||
| 1010 | 	__u32 debug_offset; | ||
| 1011 | 	__u32 debug_size; | ||
| 1012 | 	__u64 err_payload_addr; | ||
| 1013 | 	__u32 err_event_id; | ||
| 1014 | 	__u32 reserved1; | ||
| 1015 | }; | ||
| 1016 | |||
| 1017 | /* | ||
| 1018 | * Debug operations | ||
| 1019 | * | ||
| 1020 | * For specifics on usage and return values, see documentation per operation | ||
| 1021 | * below. Otherwise, generic error returns apply: | ||
| 1022 | *	- ESRCH if the process to debug does not exist. | ||
| 1023 | * | ||
| 1024 | *	- EINVAL (with KFD_IOC_DBG_TRAP_ENABLE exempt) if operation | ||
| 1025 | *		 KFD_IOC_DBG_TRAP_ENABLE has not succeeded prior. | ||
| 1026 | *		 Also returns this error if GPU hardware scheduling is not supported. | ||
| 1027 | * | ||
| 1028 | *	- EPERM (with KFD_IOC_DBG_TRAP_DISABLE exempt) if target process is not | ||
| 1029 | *		 PTRACE_ATTACHED. KFD_IOC_DBG_TRAP_DISABLE is exempt to allow | ||
| 1030 | *		 clean up of debug mode as long as process is debug enabled. | ||
| 1031 | * | ||
| 1032 | *	- EACCES if any DBG_HW_OP (debug hardware operation) is requested when | ||
| 1033 | *		 AMDKFD_IOC_RUNTIME_ENABLE has not succeeded prior. | ||
| 1034 | * | ||
| 1035 | *	- ENODEV if any GPU does not support debugging on a DBG_HW_OP call. | ||
| 1036 | * | ||
| 1037 | *	- Other errors may be returned when a DBG_HW_OP occurs while the GPU | ||
| 1038 | *	 is in a fatal state. | ||
| 1039 | * | ||
| 1040 | */ | ||
| 1041 | enum kfd_dbg_trap_operations { | ||
| 1042 | 	KFD_IOC_DBG_TRAP_ENABLE = 0, | ||
| 1043 | 	KFD_IOC_DBG_TRAP_DISABLE = 1, | ||
| 1044 | 	KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT = 2, | ||
| 1045 | 	KFD_IOC_DBG_TRAP_SET_EXCEPTIONS_ENABLED = 3, | ||
| 1046 | 	KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE = 4, /* DBG_HW_OP */ | ||
| 1047 | 	KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE = 5, /* DBG_HW_OP */ | ||
| 1048 | 	KFD_IOC_DBG_TRAP_SUSPEND_QUEUES = 6,		/* DBG_HW_OP */ | ||
| 1049 | 	KFD_IOC_DBG_TRAP_RESUME_QUEUES = 7,		/* DBG_HW_OP */ | ||
| 1050 | 	KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH = 8,	/* DBG_HW_OP */ | ||
| 1051 | 	KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH = 9,	/* DBG_HW_OP */ | ||
| 1052 | 	KFD_IOC_DBG_TRAP_SET_FLAGS = 10, | ||
| 1053 | 	KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT = 11, | ||
| 1054 | 	KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO = 12, | ||
| 1055 | 	KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT = 13, | ||
| 1056 | 	KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT = 14 | ||
| 1057 | }; | ||
| 1058 | |||
| 1059 | /** | ||
| 1060 | * kfd_ioctl_dbg_trap_enable_args | ||
| 1061 | * | ||
| 1062 | * Arguments for KFD_IOC_DBG_TRAP_ENABLE. | ||
| 1063 | * | ||
| 1064 | * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in | ||
| 1065 | * kfd_ioctl_dbg_trap_args to disable debug session. | ||
| 1066 | * | ||
| 1067 | * @exception_mask (IN)	- exceptions to raise to the debugger | ||
| 1068 | * @rinfo_ptr (IN)	- pointer to runtime info buffer (see kfd_runtime_info) | ||
| 1069 | * @rinfo_size (IN/OUT)	- size of runtime info buffer in bytes | ||
| 1070 | * @dbg_fd	 (IN)	- fd the KFD will nofify the debugger with of raised | ||
| 1071 | *				 exceptions set in exception_mask. | ||
| 1072 | * | ||
| 1073 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1074 | * Return - 0 on SUCCESS. | ||
| 1075 | *		Copies KFD saved kfd_runtime_info to @rinfo_ptr on enable. | ||
| 1076 | *		Size of kfd_runtime saved by the KFD returned to @rinfo_size. | ||
| 1077 | * - EBADF if KFD cannot get a reference to dbg_fd. | ||
| 1078 | * - EFAULT if KFD cannot copy runtime info to rinfo_ptr. | ||
| 1079 | * - EINVAL if target process is already debug enabled. | ||
| 1080 | * | ||
| 1081 | */ | ||
| 1082 | struct kfd_ioctl_dbg_trap_enable_args { | ||
| 1083 | 	__u64 exception_mask; | ||
| 1084 | 	__u64 rinfo_ptr; | ||
| 1085 | 	__u32 rinfo_size; | ||
| 1086 | 	__u32 dbg_fd; | ||
| 1087 | }; | ||
| 1088 | |||
| 1089 | /** | ||
| 1090 | * kfd_ioctl_dbg_trap_send_runtime_event_args | ||
| 1091 | * | ||
| 1092 | * | ||
| 1093 | * Arguments for KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT. | ||
| 1094 | * Raises exceptions to runtime. | ||
| 1095 | * | ||
| 1096 | * @exception_mask (IN) - exceptions to raise to runtime | ||
| 1097 | * @gpu_id	 (IN) - target device id | ||
| 1098 | * @queue_id (IN) - target queue id | ||
| 1099 | * | ||
| 1100 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1101 | * Return - 0 on SUCCESS. | ||
| 1102 | *	 - ENODEV if gpu_id not found. | ||
| 1103 | *		If exception_mask contains EC_PROCESS_RUNTIME, unblocks pending | ||
| 1104 | *		AMDKFD_IOC_RUNTIME_ENABLE call - see kfd_ioctl_runtime_enable_args. | ||
| 1105 | *		All other exceptions are raised to runtime through err_payload_addr. | ||
| 1106 | *		See kfd_context_save_area_header. | ||
| 1107 | */ | ||
| 1108 | struct kfd_ioctl_dbg_trap_send_runtime_event_args { | ||
| 1109 | 	__u64 exception_mask; | ||
| 1110 | 	__u32 gpu_id; | ||
| 1111 | 	__u32 queue_id; | ||
| 1112 | }; | ||
| 1113 | |||
| 1114 | /** | ||
| 1115 | * kfd_ioctl_dbg_trap_set_exceptions_enabled_args | ||
| 1116 | * | ||
| 1117 | * Arguments for KFD_IOC_SET_EXCEPTIONS_ENABLED | ||
| 1118 | * Set new exceptions to be raised to the debugger. | ||
| 1119 | * | ||
| 1120 | * @exception_mask (IN) - new exceptions to raise the debugger | ||
| 1121 | * | ||
| 1122 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1123 | * Return - 0 on SUCCESS. | ||
| 1124 | */ | ||
| 1125 | struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args { | ||
| 1126 | 	__u64 exception_mask; | ||
| 1127 | }; | ||
| 1128 | |||
| 1129 | /** | ||
| 1130 | * kfd_ioctl_dbg_trap_set_wave_launch_override_args | ||
| 1131 | * | ||
| 1132 | * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE | ||
| 1133 | * Enable HW exceptions to raise trap. | ||
| 1134 | * | ||
| 1135 | * @override_mode	 (IN) - see kfd_dbg_trap_override_mode | ||
| 1136 | * @enable_mask	 (IN/OUT) - reference kfd_dbg_trap_mask. | ||
| 1137 | *					IN is the override modes requested to be enabled. | ||
| 1138 | *					OUT is referenced in Return below. | ||
| 1139 | * @support_request_mask (IN/OUT) - reference kfd_dbg_trap_mask. | ||
| 1140 | *					IN is the override modes requested for support check. | ||
| 1141 | *					OUT is referenced in Return below. | ||
| 1142 | * | ||
| 1143 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1144 | * Return - 0 on SUCCESS. | ||
| 1145 | *		Previous enablement is returned in @enable_mask. | ||
| 1146 | *		Actual override support is returned in @support_request_mask. | ||
| 1147 | *	 - EINVAL if override mode is not supported. | ||
| 1148 | *	 - EACCES if trap support requested is not actually supported. | ||
| 1149 | *		i.e. enable_mask (IN) is not a subset of support_request_mask (OUT). | ||
| 1150 | *		Otherwise it is considered a generic error (see kfd_dbg_trap_operations). | ||
| 1151 | */ | ||
| 1152 | struct kfd_ioctl_dbg_trap_set_wave_launch_override_args { | ||
| 1153 | 	__u32 override_mode; | ||
| 1154 | 	__u32 enable_mask; | ||
| 1155 | 	__u32 support_request_mask; | ||
| 1156 | 	__u32 pad; | ||
| 1157 | }; | ||
| 1158 | |||
| 1159 | /** | ||
| 1160 | * kfd_ioctl_dbg_trap_set_wave_launch_mode_args | ||
| 1161 | * | ||
| 1162 | * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE | ||
| 1163 | * Set wave launch mode. | ||
| 1164 | * | ||
| 1165 | * @mode (IN) - see kfd_dbg_trap_wave_launch_mode | ||
| 1166 | * | ||
| 1167 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1168 | * Return - 0 on SUCCESS. | ||
| 1169 | */ | ||
| 1170 | struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args { | ||
| 1171 | 	__u32 launch_mode; | ||
| 1172 | 	__u32 pad; | ||
| 1173 | }; | ||
| 1174 | |||
| 1175 | /** | ||
| 1176 | * kfd_ioctl_dbg_trap_suspend_queues_ags | ||
| 1177 | * | ||
| 1178 | * Arguments for KFD_IOC_DBG_TRAP_SUSPEND_QUEUES | ||
| 1179 | * Suspend queues. | ||
| 1180 | * | ||
| 1181 | * @exception_mask	(IN) - raised exceptions to clear | ||
| 1182 | * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id) | ||
| 1183 | *			 to suspend | ||
| 1184 | * @num_queues	(IN) - number of queues to suspend in @queue_array_ptr | ||
| 1185 | * @grace_period	(IN) - wave time allowance before preemption | ||
| 1186 | *			 per 1K GPU clock cycle unit | ||
| 1187 | * | ||
| 1188 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1189 | * Destruction of a suspended queue is blocked until the queue is | ||
| 1190 | * resumed. This allows the debugger to access queue information and | ||
| 1191 | * the its context save area without running into a race condition on | ||
| 1192 | * queue destruction. | ||
| 1193 | * Automatically copies per queue context save area header information | ||
| 1194 | * into the save area base | ||
| 1195 | * (see kfd_queue_snapshot_entry and kfd_context_save_area_header). | ||
| 1196 | * | ||
| 1197 | * Return - Number of queues suspended on SUCCESS. | ||
| 1198 | *	.	KFD_DBG_QUEUE_ERROR_MASK and KFD_DBG_QUEUE_INVALID_MASK masked | ||
| 1199 | *		for each queue id in @queue_array_ptr array reports unsuccessful | ||
| 1200 | *		suspend reason. | ||
| 1201 | *		KFD_DBG_QUEUE_ERROR_MASK = HW failure. | ||
| 1202 | *		KFD_DBG_QUEUE_INVALID_MASK = queue does not exist, is new or | ||
| 1203 | *		is being destroyed. | ||
| 1204 | */ | ||
| 1205 | struct kfd_ioctl_dbg_trap_suspend_queues_args { | ||
| 1206 | 	__u64 exception_mask; | ||
| 1207 | 	__u64 queue_array_ptr; | ||
| 1208 | 	__u32 num_queues; | ||
| 1209 | 	__u32 grace_period; | ||
| 1210 | }; | ||
| 1211 | |||
| 1212 | /** | ||
| 1213 | * kfd_ioctl_dbg_trap_resume_queues_args | ||
| 1214 | * | ||
| 1215 | * Arguments for KFD_IOC_DBG_TRAP_RESUME_QUEUES | ||
| 1216 | * Resume queues. | ||
| 1217 | * | ||
| 1218 | * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id) | ||
| 1219 | *			 to resume | ||
| 1220 | * @num_queues	(IN) - number of queues to resume in @queue_array_ptr | ||
| 1221 | * | ||
| 1222 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1223 | * Return - Number of queues resumed on SUCCESS. | ||
| 1224 | *		KFD_DBG_QUEUE_ERROR_MASK and KFD_DBG_QUEUE_INVALID_MASK mask | ||
| 1225 | *		for each queue id in @queue_array_ptr array reports unsuccessful | ||
| 1226 | *		resume reason. | ||
| 1227 | *		KFD_DBG_QUEUE_ERROR_MASK = HW failure. | ||
| 1228 | *		KFD_DBG_QUEUE_INVALID_MASK = queue does not exist. | ||
| 1229 | */ | ||
| 1230 | struct kfd_ioctl_dbg_trap_resume_queues_args { | ||
| 1231 | 	__u64 queue_array_ptr; | ||
| 1232 | 	__u32 num_queues; | ||
| 1233 | 	__u32 pad; | ||
| 1234 | }; | ||
| 1235 | |||
| 1236 | /** | ||
| 1237 | * kfd_ioctl_dbg_trap_set_node_address_watch_args | ||
| 1238 | * | ||
| 1239 | * Arguments for KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH | ||
| 1240 | * Sets address watch for device. | ||
| 1241 | * | ||
| 1242 | * @address	(IN) - watch address to set | ||
| 1243 | * @mode (IN) - see kfd_dbg_trap_address_watch_mode | ||
| 1244 | * @mask (IN) - watch address mask | ||
| 1245 | * @gpu_id (IN) - target gpu to set watch point | ||
| 1246 | * @id (OUT) - watch id allocated | ||
| 1247 | * | ||
| 1248 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1249 | * Return - 0 on SUCCESS. | ||
| 1250 | *		Allocated watch ID returned to @id. | ||
| 1251 | *	 - ENODEV if gpu_id not found. | ||
| 1252 | *	 - ENOMEM if watch IDs can be allocated | ||
| 1253 | */ | ||
| 1254 | struct kfd_ioctl_dbg_trap_set_node_address_watch_args { | ||
| 1255 | 	__u64 address; | ||
| 1256 | 	__u32 mode; | ||
| 1257 | 	__u32 mask; | ||
| 1258 | 	__u32 gpu_id; | ||
| 1259 | 	__u32 id; | ||
| 1260 | }; | ||
| 1261 | |||
| 1262 | /** | ||
| 1263 | * kfd_ioctl_dbg_trap_clear_node_address_watch_args | ||
| 1264 | * | ||
| 1265 | * Arguments for KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH | ||
| 1266 | * Clear address watch for device. | ||
| 1267 | * | ||
| 1268 | * @gpu_id (IN) - target device to clear watch point | ||
| 1269 | * @id (IN) - allocated watch id to clear | ||
| 1270 | * | ||
| 1271 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1272 | * Return - 0 on SUCCESS. | ||
| 1273 | *	 - ENODEV if gpu_id not found. | ||
| 1274 | *	 - EINVAL if watch ID has not been allocated. | ||
| 1275 | */ | ||
| 1276 | struct kfd_ioctl_dbg_trap_clear_node_address_watch_args { | ||
| 1277 | 	__u32 gpu_id; | ||
| 1278 | 	__u32 id; | ||
| 1279 | }; | ||
| 1280 | |||
| 1281 | /** | ||
| 1282 | * kfd_ioctl_dbg_trap_set_flags_args | ||
| 1283 | * | ||
| 1284 | * Arguments for KFD_IOC_DBG_TRAP_SET_FLAGS | ||
| 1285 | * Sets flags for wave behaviour. | ||
| 1286 | * | ||
| 1287 | * @flags (IN/OUT) - IN = flags to enable, OUT = flags previously enabled | ||
| 1288 | * | ||
| 1289 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1290 | * Return - 0 on SUCCESS. | ||
| 1291 | *	 - EACCESS if any debug device does not allow flag options. | ||
| 1292 | */ | ||
| 1293 | struct kfd_ioctl_dbg_trap_set_flags_args { | ||
| 1294 | 	__u32 flags; | ||
| 1295 | 	__u32 pad; | ||
| 1296 | }; | ||
| 1297 | |||
| 1298 | /** | ||
| 1299 | * kfd_ioctl_dbg_trap_query_debug_event_args | ||
| 1300 | * | ||
| 1301 | * Arguments for KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT | ||
| 1302 | * | ||
| 1303 | * Find one or more raised exceptions. This function can return multiple | ||
| 1304 | * exceptions from a single queue or a single device with one call. To find | ||
| 1305 | * all raised exceptions, this function must be called repeatedly until it | ||
| 1306 | * returns -EAGAIN. Returned exceptions can optionally be cleared by | ||
| 1307 | * setting the corresponding bit in the @exception_mask input parameter. | ||
| 1308 | * However, clearing an exception prevents retrieving further information | ||
| 1309 | * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO. | ||
| 1310 | * | ||
| 1311 | * @exception_mask (IN/OUT) - exception to clear (IN) and raised (OUT) | ||
| 1312 | * @gpu_id	 (OUT) - gpu id of exceptions raised | ||
| 1313 | * @queue_id (OUT) - queue id of exceptions raised | ||
| 1314 | * | ||
| 1315 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1316 | * Return - 0 on raised exception found | ||
| 1317 | * Raised exceptions found are returned in @exception mask | ||
| 1318 | * with reported source id returned in @gpu_id or @queue_id. | ||
| 1319 | * - EAGAIN if no raised exception has been found | ||
| 1320 | */ | ||
| 1321 | struct kfd_ioctl_dbg_trap_query_debug_event_args { | ||
| 1322 | 	__u64 exception_mask; | ||
| 1323 | 	__u32 gpu_id; | ||
| 1324 | 	__u32 queue_id; | ||
| 1325 | }; | ||
| 1326 | |||
| 1327 | /** | ||
| 1328 | * kfd_ioctl_dbg_trap_query_exception_info_args | ||
| 1329 | * | ||
| 1330 | * Arguments KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO | ||
| 1331 | * Get additional info on raised exception. | ||
| 1332 | * | ||
| 1333 | * @info_ptr	(IN)	 - pointer to exception info buffer to copy to | ||
| 1334 | * @info_size	(IN/OUT) - exception info buffer size (bytes) | ||
| 1335 | * @source_id	(IN) - target gpu or queue id | ||
| 1336 | * @exception_code	(IN) - target exception | ||
| 1337 | * @clear_exception	(IN) - clear raised @exception_code exception | ||
| 1338 | *				 (0 = false, 1 = true) | ||
| 1339 | * | ||
| 1340 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1341 | * Return - 0 on SUCCESS. | ||
| 1342 | * If @exception_code is EC_DEVICE_MEMORY_VIOLATION, copy @info_size(OUT) | ||
| 1343 | *		bytes of memory exception data to @info_ptr. | ||
| 1344 | * If @exception_code is EC_PROCESS_RUNTIME, copy saved | ||
| 1345 | * kfd_runtime_info to @info_ptr. | ||
| 1346 | * Actual required @info_ptr size (bytes) is returned in @info_size. | ||
| 1347 | */ | ||
| 1348 | struct kfd_ioctl_dbg_trap_query_exception_info_args { | ||
| 1349 | 	__u64 info_ptr; | ||
| 1350 | 	__u32 info_size; | ||
| 1351 | 	__u32 source_id; | ||
| 1352 | 	__u32 exception_code; | ||
| 1353 | 	__u32 clear_exception; | ||
| 1354 | }; | ||
| 1355 | |||
| 1356 | /** | ||
| 1357 | * kfd_ioctl_dbg_trap_get_queue_snapshot_args | ||
| 1358 | * | ||
| 1359 | * Arguments KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT | ||
| 1360 | * Get queue information. | ||
| 1361 | * | ||
| 1362 | * @exception_mask	 (IN)	 - exceptions raised to clear | ||
| 1363 | * @snapshot_buf_ptr (IN)	 - queue snapshot entry buffer (see kfd_queue_snapshot_entry) | ||
| 1364 | * @num_queues	 (IN/OUT) - number of queue snapshot entries | ||
| 1365 | * The debugger specifies the size of the array allocated in @num_queues. | ||
| 1366 | * KFD returns the number of queues that actually existed. If this is | ||
| 1367 | * larger than the size specified by the debugger, KFD will not overflow | ||
| 1368 | * the array allocated by the debugger. | ||
| 1369 | * | ||
| 1370 | * @entry_size	 (IN/OUT) - size per entry in bytes | ||
| 1371 | * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in | ||
| 1372 | * @entry_size. KFD returns the number of bytes actually populated per | ||
| 1373 | * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine, | ||
| 1374 | * which fields in struct kfd_queue_snapshot_entry are valid. This allows | ||
| 1375 | * growing the ABI in a backwards compatible manner. | ||
| 1376 | * Note that entry_size(IN) should still be used to stride the snapshot buffer in the | ||
| 1377 | * event that it's larger than actual kfd_queue_snapshot_entry. | ||
| 1378 | * | ||
| 1379 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1380 | * Return - 0 on SUCCESS. | ||
| 1381 | * Copies @num_queues(IN) queue snapshot entries of size @entry_size(IN) | ||
| 1382 | * into @snapshot_buf_ptr if @num_queues(IN) > 0. | ||
| 1383 | * Otherwise return @num_queues(OUT) queue snapshot entries that exist. | ||
| 1384 | */ | ||
| 1385 | struct kfd_ioctl_dbg_trap_queue_snapshot_args { | ||
| 1386 | 	__u64 exception_mask; | ||
| 1387 | 	__u64 snapshot_buf_ptr; | ||
| 1388 | 	__u32 num_queues; | ||
| 1389 | 	__u32 entry_size; | ||
| 1390 | }; | ||
| 1391 | |||
| 1392 | /** | ||
| 1393 | * kfd_ioctl_dbg_trap_get_device_snapshot_args | ||
| 1394 | * | ||
| 1395 | * Arguments for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT | ||
| 1396 | * Get device information. | ||
| 1397 | * | ||
| 1398 | * @exception_mask	 (IN)	 - exceptions raised to clear | ||
| 1399 | * @snapshot_buf_ptr (IN)	 - pointer to snapshot buffer (see kfd_dbg_device_info_entry) | ||
| 1400 | * @num_devices	 (IN/OUT) - number of debug devices to snapshot | ||
| 1401 | * The debugger specifies the size of the array allocated in @num_devices. | ||
| 1402 | * KFD returns the number of devices that actually existed. If this is | ||
| 1403 | * larger than the size specified by the debugger, KFD will not overflow | ||
| 1404 | * the array allocated by the debugger. | ||
| 1405 | * | ||
| 1406 | * @entry_size	 (IN/OUT) - size per entry in bytes | ||
| 1407 | * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in | ||
| 1408 | * @entry_size. KFD returns the number of bytes actually populated. The | ||
| 1409 | * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields | ||
| 1410 | * in struct kfd_dbg_device_info_entry are valid. This allows growing the | ||
| 1411 | * ABI in a backwards compatible manner. | ||
| 1412 | * Note that entry_size(IN) should still be used to stride the snapshot buffer in the | ||
| 1413 | * event that it's larger than actual kfd_dbg_device_info_entry. | ||
| 1414 | * | ||
| 1415 | * Generic errors apply (see kfd_dbg_trap_operations). | ||
| 1416 | * Return - 0 on SUCCESS. | ||
| 1417 | * Copies @num_devices(IN) device snapshot entries of size @entry_size(IN) | ||
| 1418 | * into @snapshot_buf_ptr if @num_devices(IN) > 0. | ||
| 1419 | * Otherwise return @num_devices(OUT) queue snapshot entries that exist. | ||
| 1420 | */ | ||
| 1421 | struct kfd_ioctl_dbg_trap_device_snapshot_args { | ||
| 1422 | 	__u64 exception_mask; | ||
| 1423 | 	__u64 snapshot_buf_ptr; | ||
| 1424 | 	__u32 num_devices; | ||
| 1425 | 	__u32 entry_size; | ||
| 1426 | }; | ||
| 1427 | |||
| 1428 | /** | ||
| 1429 | * kfd_ioctl_dbg_trap_args | ||
| 1430 | * | ||
| 1431 | * Arguments to debug target process. | ||
| 1432 | * | ||
| 1433 | * @pid - target process to debug | ||
| 1434 | * @op - debug operation (see kfd_dbg_trap_operations) | ||
| 1435 | * | ||
| 1436 | * @op determines which union struct args to use. | ||
| 1437 | * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct. | ||
| 1438 | */ | ||
| 1439 | struct kfd_ioctl_dbg_trap_args { | ||
| 1440 | 	__u32 pid; | ||
| 1441 | 	__u32 op; | ||
| 1442 | |||
| 1443 | 	union { | ||
| 1444 | 		struct kfd_ioctl_dbg_trap_enable_args enable; | ||
| 1445 | 		struct kfd_ioctl_dbg_trap_send_runtime_event_args send_runtime_event; | ||
| 1446 | 		struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args set_exceptions_enabled; | ||
| 1447 | 		struct kfd_ioctl_dbg_trap_set_wave_launch_override_args launch_override; | ||
| 1448 | 		struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args launch_mode; | ||
| 1449 | 		struct kfd_ioctl_dbg_trap_suspend_queues_args suspend_queues; | ||
| 1450 | 		struct kfd_ioctl_dbg_trap_resume_queues_args resume_queues; | ||
| 1451 | 		struct kfd_ioctl_dbg_trap_set_node_address_watch_args set_node_address_watch; | ||
| 1452 | 		struct kfd_ioctl_dbg_trap_clear_node_address_watch_args clear_node_address_watch; | ||
| 1453 | 		struct kfd_ioctl_dbg_trap_set_flags_args set_flags; | ||
| 1454 | 		struct kfd_ioctl_dbg_trap_query_debug_event_args query_debug_event; | ||
| 1455 | 		struct kfd_ioctl_dbg_trap_query_exception_info_args query_exception_info; | ||
| 1456 | 		struct kfd_ioctl_dbg_trap_queue_snapshot_args queue_snapshot; | ||
| 1457 | 		struct kfd_ioctl_dbg_trap_device_snapshot_args device_snapshot; | ||
| 1458 | 	}; | ||
| 1459 | }; | ||
| 1460 | |||
| 769 | #define AMDKFD_IOCTL_BASE 'K' | 1461 | #define AMDKFD_IOCTL_BASE 'K' |
| 770 | #define AMDKFD_IO(nr)			_IO(AMDKFD_IOCTL_BASE, nr) | 1462 | #define AMDKFD_IO(nr)			_IO(AMDKFD_IOCTL_BASE, nr) |
| 771 | #define AMDKFD_IOR(nr, type)		_IOR(AMDKFD_IOCTL_BASE, nr, type) | 1463 | #define AMDKFD_IOR(nr, type)		_IOR(AMDKFD_IOCTL_BASE, nr, type) |
| ... | @@ -877,7 +1569,16 @@ struct kfd_ioctl_set_xnack_mode_args { | ... | @@ -877,7 +1569,16 @@ struct kfd_ioctl_set_xnack_mode_args { |
| 877 | #define AMDKFD_IOC_AVAILABLE_MEMORY		\ | 1569 | #define AMDKFD_IOC_AVAILABLE_MEMORY		\ |
| 878 | 		AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args) | 1570 | 		AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args) |
| 879 | 1571 | ||
| 1572 | #define AMDKFD_IOC_EXPORT_DMABUF		\ | ||
| 1573 | 		AMDKFD_IOWR(0x24, struct kfd_ioctl_export_dmabuf_args) | ||
| 1574 | |||
| 1575 | #define AMDKFD_IOC_RUNTIME_ENABLE		\ | ||
| 1576 | 		AMDKFD_IOWR(0x25, struct kfd_ioctl_runtime_enable_args) | ||
| 1577 | |||
| 1578 | #define AMDKFD_IOC_DBG_TRAP			\ | ||
| 1579 | 		AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args) | ||
| 1580 | |||
| 880 | #define AMDKFD_COMMAND_START		0x01 | 1581 | #define AMDKFD_COMMAND_START		0x01 |
| 881 | #define AMDKFD_COMMAND_END		0x24 | 1582 | #define AMDKFD_COMMAND_END		0x27 |
| 882 | 1583 | ||
| 883 | #endif | 1584 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/kfd_sysfs.h+15| ... | @@ -43,6 +43,11 @@ | ... | @@ -43,6 +43,11 @@ |
| 43 | #define HSA_CAP_DOORBELL_TYPE_2_0		0x2 | 43 | #define HSA_CAP_DOORBELL_TYPE_2_0		0x2 |
| 44 | #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP		0x00004000 | 44 | #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP		0x00004000 |
| 45 | 45 | ||
| 46 | #define HSA_CAP_TRAP_DEBUG_SUPPORT 0x00008000 | ||
| 47 | #define HSA_CAP_TRAP_DEBUG_WAVE_LAUNCH_TRAP_OVERRIDE_SUPPORTED 0x00010000 | ||
| 48 | #define HSA_CAP_TRAP_DEBUG_WAVE_LAUNCH_MODE_SUPPORTED 0x00020000 | ||
| 49 | #define HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED 0x00040000 | ||
| 50 | |||
| 46 | /* Old buggy user mode depends on this being 0 */ | 51 | /* Old buggy user mode depends on this being 0 */ |
| 47 | #define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED	0x00080000 | 52 | #define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED	0x00080000 |
| 48 | 53 | ||
| ... | @@ -53,8 +58,18 @@ | ... | @@ -53,8 +58,18 @@ |
| 53 | #define HSA_CAP_SRAM_EDCSUPPORTED		0x04000000 | 58 | #define HSA_CAP_SRAM_EDCSUPPORTED		0x04000000 |
| 54 | #define HSA_CAP_SVMAPI_SUPPORTED		0x08000000 | 59 | #define HSA_CAP_SVMAPI_SUPPORTED		0x08000000 |
| 55 | #define HSA_CAP_FLAGS_COHERENTHOSTACCESS	0x10000000 | 60 | #define HSA_CAP_FLAGS_COHERENTHOSTACCESS	0x10000000 |
| 61 | #define HSA_CAP_TRAP_DEBUG_FIRMWARE_SUPPORTED 0x20000000 | ||
| 56 | #define HSA_CAP_RESERVED			0xe00f8000 | 62 | #define HSA_CAP_RESERVED			0xe00f8000 |
| 57 | 63 | ||
| 64 | /* debug_prop bits in node properties */ | ||
| 65 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f | ||
| 66 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_SHIFT 0 | ||
| 67 | #define HSA_DBG_WATCH_ADDR_MASK_HI_BIT_MASK 0x000003f0 | ||
| 68 | #define HSA_DBG_WATCH_ADDR_MASK_HI_BIT_SHIFT 4 | ||
| 69 | #define HSA_DBG_DISPATCH_INFO_ALWAYS_VALID 0x00000400 | ||
| 70 | #define HSA_DBG_WATCHPOINTS_EXCLUSIVE 0x00000800 | ||
| 71 | #define HSA_DBG_RESERVED 0xfffffffffffff000ull | ||
| 72 | |||
| 58 | /* Heap types in memory properties */ | 73 | /* Heap types in memory properties */ |
| 59 | #define HSA_MEM_HEAP_TYPE_SYSTEM	0 | 74 | #define HSA_MEM_HEAP_TYPE_SYSTEM	0 |
| 60 | #define HSA_MEM_HEAP_TYPE_FB_PUBLIC	1 | 75 | #define HSA_MEM_HEAP_TYPE_FB_PUBLIC	1 |
lib/libc/include/any-linux-any/linux/kvm.h+86-777| ... | @@ -16,75 +16,10 @@ | ... | @@ -16,75 +16,10 @@ |
| 16 | 16 | ||
| 17 | #define KVM_API_VERSION 12 | 17 | #define KVM_API_VERSION 12 |
| 18 | 18 | ||
| 19 | /* *** Deprecated interfaces *** */ | 19 | /* |
| 20 | 20 | * Backwards-compatible definitions. | |
| 21 | #define KVM_TRC_SHIFT 16 | 21 | */ |
| 22 | 22 | #define __KVM_HAVE_GUEST_DEBUG | |
| 23 | #define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT) | ||
| 24 | #define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1)) | ||
| 25 | |||
| 26 | #define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01) | ||
| 27 | #define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02) | ||
| 28 | #define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01) | ||
| 29 | |||
| 30 | #define KVM_TRC_HEAD_SIZE 12 | ||
| 31 | #define KVM_TRC_CYCLE_SIZE 8 | ||
| 32 | #define KVM_TRC_EXTRA_MAX 7 | ||
| 33 | |||
| 34 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) | ||
| 35 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) | ||
| 36 | #define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04) | ||
| 37 | #define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05) | ||
| 38 | #define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06) | ||
| 39 | #define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07) | ||
| 40 | #define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08) | ||
| 41 | #define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09) | ||
| 42 | #define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A) | ||
| 43 | #define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B) | ||
| 44 | #define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C) | ||
| 45 | #define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D) | ||
| 46 | #define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E) | ||
| 47 | #define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F) | ||
| 48 | #define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10) | ||
| 49 | #define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11) | ||
| 50 | #define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12) | ||
| 51 | #define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13) | ||
| 52 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) | ||
| 53 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) | ||
| 54 | #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) | ||
| 55 | #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) | ||
| 56 | #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) | ||
| 57 | #define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) | ||
| 58 | |||
| 59 | struct kvm_user_trace_setup { | ||
| 60 | 	__u32 buf_size; | ||
| 61 | 	__u32 buf_nr; | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define __KVM_DEPRECATED_MAIN_W_0x06 \ | ||
| 65 | 	_IOW(KVMIO, 0x06, struct kvm_user_trace_setup) | ||
| 66 | #define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07) | ||
| 67 | #define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08) | ||
| 68 | |||
| 69 | #define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq) | ||
| 70 | |||
| 71 | struct kvm_breakpoint { | ||
| 72 | 	__u32 enabled; | ||
| 73 | 	__u32 padding; | ||
| 74 | 	__u64 address; | ||
| 75 | }; | ||
| 76 | |||
| 77 | struct kvm_debug_guest { | ||
| 78 | 	__u32 enabled; | ||
| 79 | 	__u32 pad; | ||
| 80 | 	struct kvm_breakpoint breakpoints[4]; | ||
| 81 | 	__u32 singlestep; | ||
| 82 | }; | ||
| 83 | |||
| 84 | #define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest) | ||
| 85 | |||
| 86 | /* *** End of deprecated interfaces *** */ | ||
| 87 | |||
| 88 | 23 | ||
| 89 | /* for KVM_SET_USER_MEMORY_REGION */ | 24 | /* for KVM_SET_USER_MEMORY_REGION */ |
| 90 | struct kvm_userspace_memory_region { | 25 | struct kvm_userspace_memory_region { |
| ... | @@ -95,6 +30,19 @@ struct kvm_userspace_memory_region { | ... | @@ -95,6 +30,19 @@ struct kvm_userspace_memory_region { |
| 95 | 	__u64 userspace_addr; /* start of the userspace allocated memory */ | 30 | 	__u64 userspace_addr; /* start of the userspace allocated memory */ |
| 96 | }; | 31 | }; |
| 97 | 32 | ||
| 33 | /* for KVM_SET_USER_MEMORY_REGION2 */ | ||
| 34 | struct kvm_userspace_memory_region2 { | ||
| 35 | 	__u32 slot; | ||
| 36 | 	__u32 flags; | ||
| 37 | 	__u64 guest_phys_addr; | ||
| 38 | 	__u64 memory_size; | ||
| 39 | 	__u64 userspace_addr; | ||
| 40 | 	__u64 guest_memfd_offset; | ||
| 41 | 	__u32 guest_memfd; | ||
| 42 | 	__u32 pad1; | ||
| 43 | 	__u64 pad2[14]; | ||
| 44 | }; | ||
| 45 | |||
| 98 | /* | 46 | /* |
| 99 | * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for | 47 | * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for |
| 100 | * userspace, other bits are reserved for kvm internal use which are defined | 48 | * userspace, other bits are reserved for kvm internal use which are defined |
| ... | @@ -102,6 +50,7 @@ struct kvm_userspace_memory_region { | ... | @@ -102,6 +50,7 @@ struct kvm_userspace_memory_region { |
| 102 | */ | 50 | */ |
| 103 | #define KVM_MEM_LOG_DIRTY_PAGES	(1UL << 0) | 51 | #define KVM_MEM_LOG_DIRTY_PAGES	(1UL << 0) |
| 104 | #define KVM_MEM_READONLY	(1UL << 1) | 52 | #define KVM_MEM_READONLY	(1UL << 1) |
| 53 | #define KVM_MEM_GUEST_MEMFD	(1UL << 2) | ||
| 105 | 54 | ||
| 106 | /* for KVM_IRQ_LINE */ | 55 | /* for KVM_IRQ_LINE */ |
| 107 | struct kvm_irq_level { | 56 | struct kvm_irq_level { |
| ... | @@ -141,43 +90,6 @@ struct kvm_pit_config { | ... | @@ -141,43 +90,6 @@ struct kvm_pit_config { |
| 141 | 90 | ||
| 142 | #define KVM_PIT_SPEAKER_DUMMY 1 | 91 | #define KVM_PIT_SPEAKER_DUMMY 1 |
| 143 | 92 | ||
| 144 | struct kvm_s390_skeys { | ||
| 145 | 	__u64 start_gfn; | ||
| 146 | 	__u64 count; | ||
| 147 | 	__u64 skeydata_addr; | ||
| 148 | 	__u32 flags; | ||
| 149 | 	__u32 reserved[9]; | ||
| 150 | }; | ||
| 151 | |||
| 152 | #define KVM_S390_CMMA_PEEK (1 << 0) | ||
| 153 | |||
| 154 | /** | ||
| 155 | * kvm_s390_cmma_log - Used for CMMA migration. | ||
| 156 | * | ||
| 157 | * Used both for input and output. | ||
| 158 | * | ||
| 159 | * @start_gfn: Guest page number to start from. | ||
| 160 | * @count: Size of the result buffer. | ||
| 161 | * @flags: Control operation mode via KVM_S390_CMMA_* flags | ||
| 162 | * @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty | ||
| 163 | * pages are still remaining. | ||
| 164 | * @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set | ||
| 165 | * in the PGSTE. | ||
| 166 | * @values: Pointer to the values buffer. | ||
| 167 | * | ||
| 168 | * Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls. | ||
| 169 | */ | ||
| 170 | struct kvm_s390_cmma_log { | ||
| 171 | 	__u64 start_gfn; | ||
| 172 | 	__u32 count; | ||
| 173 | 	__u32 flags; | ||
| 174 | 	union { | ||
| 175 | 		__u64 remaining; | ||
| 176 | 		__u64 mask; | ||
| 177 | 	}; | ||
| 178 | 	__u64 values; | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct kvm_hyperv_exit { | 93 | struct kvm_hyperv_exit { |
| 182 | #define KVM_EXIT_HYPERV_SYNIC 1 | 94 | #define KVM_EXIT_HYPERV_SYNIC 1 |
| 183 | #define KVM_EXIT_HYPERV_HCALL 2 | 95 | #define KVM_EXIT_HYPERV_HCALL 2 |
| ... | @@ -264,6 +176,8 @@ struct kvm_xen_exit { | ... | @@ -264,6 +176,8 @@ struct kvm_xen_exit { |
| 264 | #define KVM_EXIT_RISCV_SBI 35 | 176 | #define KVM_EXIT_RISCV_SBI 35 |
| 265 | #define KVM_EXIT_RISCV_CSR 36 | 177 | #define KVM_EXIT_RISCV_CSR 36 |
| 266 | #define KVM_EXIT_NOTIFY 37 | 178 | #define KVM_EXIT_NOTIFY 37 |
| 179 | #define KVM_EXIT_LOONGARCH_IOCSR 38 | ||
| 180 | #define KVM_EXIT_MEMORY_FAULT 39 | ||
| 267 | 181 | ||
| 268 | /* For KVM_EXIT_INTERNAL_ERROR */ | 182 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 269 | /* Emulate instruction failed. */ | 183 | /* Emulate instruction failed. */ |
| ... | @@ -336,13 +250,23 @@ struct kvm_run { | ... | @@ -336,13 +250,23 @@ struct kvm_run { |
| 336 | 			__u32 len; | 250 | 			__u32 len; |
| 337 | 			__u8 is_write; | 251 | 			__u8 is_write; |
| 338 | 		} mmio; | 252 | 		} mmio; |
| 253 | 		/* KVM_EXIT_LOONGARCH_IOCSR */ | ||
| 254 | 		struct { | ||
| 255 | 			__u64 phys_addr; | ||
| 256 | 			__u8 data[8]; | ||
| 257 | 			__u32 len; | ||
| 258 | 			__u8 is_write; | ||
| 259 | 		} iocsr_io; | ||
| 339 | 		/* KVM_EXIT_HYPERCALL */ | 260 | 		/* KVM_EXIT_HYPERCALL */ |
| 340 | 		struct { | 261 | 		struct { |
| 341 | 			__u64 nr; | 262 | 			__u64 nr; |
| 342 | 			__u64 args[6]; | 263 | 			__u64 args[6]; |
| 343 | 			__u64 ret; | 264 | 			__u64 ret; |
| 344 | 			__u32 longmode; | 265 | |
| 345 | 			__u32 pad; | 266 | 			union { |
| 267 | 				__u32 longmode; | ||
| 268 | 				__u64 flags; | ||
| 269 | 			}; | ||
| 346 | 		} hypercall; | 270 | 		} hypercall; |
| 347 | 		/* KVM_EXIT_TPR_ACCESS */ | 271 | 		/* KVM_EXIT_TPR_ACCESS */ |
| 348 | 		struct { | 272 | 		struct { |
| ... | @@ -357,11 +281,6 @@ struct kvm_run { | ... | @@ -357,11 +281,6 @@ struct kvm_run { |
| 357 | 			__u32 ipb; | 281 | 			__u32 ipb; |
| 358 | 		} s390_sieic; | 282 | 		} s390_sieic; |
| 359 | 		/* KVM_EXIT_S390_RESET */ | 283 | 		/* KVM_EXIT_S390_RESET */ |
| 360 | #define KVM_S390_RESET_POR 1 | ||
| 361 | #define KVM_S390_RESET_CLEAR 2 | ||
| 362 | #define KVM_S390_RESET_SUBSYSTEM 4 | ||
| 363 | #define KVM_S390_RESET_CPU_INIT 8 | ||
| 364 | #define KVM_S390_RESET_IPL 16 | ||
| 365 | 		__u64 s390_reset_flags; | 284 | 		__u64 s390_reset_flags; |
| 366 | 		/* KVM_EXIT_S390_UCONTROL */ | 285 | 		/* KVM_EXIT_S390_UCONTROL */ |
| 367 | 		struct { | 286 | 		struct { |
| ... | @@ -503,6 +422,13 @@ struct kvm_run { | ... | @@ -503,6 +422,13 @@ struct kvm_run { |
| 503 | #define KVM_NOTIFY_CONTEXT_INVALID	(1 << 0) | 422 | #define KVM_NOTIFY_CONTEXT_INVALID	(1 << 0) |
| 504 | 			__u32 flags; | 423 | 			__u32 flags; |
| 505 | 		} notify; | 424 | 		} notify; |
| 425 | 		/* KVM_EXIT_MEMORY_FAULT */ | ||
| 426 | 		struct { | ||
| 427 | #define KVM_MEMORY_EXIT_FLAG_PRIVATE	(1ULL << 3) | ||
| 428 | 			__u64 flags; | ||
| 429 | 			__u64 gpa; | ||
| 430 | 			__u64 size; | ||
| 431 | 		} memory_fault; | ||
| 506 | 		/* Fix the size of the union. */ | 432 | 		/* Fix the size of the union. */ |
| 507 | 		char padding[256]; | 433 | 		char padding[256]; |
| 508 | 	}; | 434 | 	}; |
| ... | @@ -569,43 +495,6 @@ struct kvm_translation { | ... | @@ -569,43 +495,6 @@ struct kvm_translation { |
| 569 | 	__u8 pad[5]; | 495 | 	__u8 pad[5]; |
| 570 | }; | 496 | }; |
| 571 | 497 | ||
| 572 | /* for KVM_S390_MEM_OP */ | ||
| 573 | struct kvm_s390_mem_op { | ||
| 574 | 	/* in */ | ||
| 575 | 	__u64 gaddr;		/* the guest address */ | ||
| 576 | 	__u64 flags;		/* flags */ | ||
| 577 | 	__u32 size;		/* amount of bytes */ | ||
| 578 | 	__u32 op;		/* type of operation */ | ||
| 579 | 	__u64 buf;		/* buffer in userspace */ | ||
| 580 | 	union { | ||
| 581 | 		struct { | ||
| 582 | 			__u8 ar;	/* the access register number */ | ||
| 583 | 			__u8 key;	/* access key, ignored if flag unset */ | ||
| 584 | 			__u8 pad1[6];	/* ignored */ | ||
| 585 | 			__u64 old_addr;	/* ignored if cmpxchg flag unset */ | ||
| 586 | 		}; | ||
| 587 | 		__u32 sida_offset; /* offset into the sida */ | ||
| 588 | 		__u8 reserved[32]; /* ignored */ | ||
| 589 | 	}; | ||
| 590 | }; | ||
| 591 | /* types for kvm_s390_mem_op->op */ | ||
| 592 | #define KVM_S390_MEMOP_LOGICAL_READ	0 | ||
| 593 | #define KVM_S390_MEMOP_LOGICAL_WRITE	1 | ||
| 594 | #define KVM_S390_MEMOP_SIDA_READ	2 | ||
| 595 | #define KVM_S390_MEMOP_SIDA_WRITE	3 | ||
| 596 | #define KVM_S390_MEMOP_ABSOLUTE_READ	4 | ||
| 597 | #define KVM_S390_MEMOP_ABSOLUTE_WRITE	5 | ||
| 598 | #define KVM_S390_MEMOP_ABSOLUTE_CMPXCHG	6 | ||
| 599 | |||
| 600 | /* flags for kvm_s390_mem_op->flags */ | ||
| 601 | #define KVM_S390_MEMOP_F_CHECK_ONLY		(1ULL << 0) | ||
| 602 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION	(1ULL << 1) | ||
| 603 | #define KVM_S390_MEMOP_F_SKEY_PROTECTION	(1ULL << 2) | ||
| 604 | |||
| 605 | /* flags specifying extension support via KVM_CAP_S390_MEM_OP_EXTENSION */ | ||
| 606 | #define KVM_S390_MEMOP_EXTENSION_CAP_BASE	(1 << 0) | ||
| 607 | #define KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG	(1 << 1) | ||
| 608 | |||
| 609 | /* for KVM_INTERRUPT */ | 498 | /* for KVM_INTERRUPT */ |
| 610 | struct kvm_interrupt { | 499 | struct kvm_interrupt { |
| 611 | 	/* in */ | 500 | 	/* in */ |
| ... | @@ -670,124 +559,6 @@ struct kvm_mp_state { | ... | @@ -670,124 +559,6 @@ struct kvm_mp_state { |
| 670 | 	__u32 mp_state; | 559 | 	__u32 mp_state; |
| 671 | }; | 560 | }; |
| 672 | 561 | ||
| 673 | struct kvm_s390_psw { | ||
| 674 | 	__u64 mask; | ||
| 675 | 	__u64 addr; | ||
| 676 | }; | ||
| 677 | |||
| 678 | /* valid values for type in kvm_s390_interrupt */ | ||
| 679 | #define KVM_S390_SIGP_STOP		0xfffe0000u | ||
| 680 | #define KVM_S390_PROGRAM_INT		0xfffe0001u | ||
| 681 | #define KVM_S390_SIGP_SET_PREFIX	0xfffe0002u | ||
| 682 | #define KVM_S390_RESTART		0xfffe0003u | ||
| 683 | #define KVM_S390_INT_PFAULT_INIT	0xfffe0004u | ||
| 684 | #define KVM_S390_INT_PFAULT_DONE	0xfffe0005u | ||
| 685 | #define KVM_S390_MCHK			0xfffe1000u | ||
| 686 | #define KVM_S390_INT_CLOCK_COMP		0xffff1004u | ||
| 687 | #define KVM_S390_INT_CPU_TIMER		0xffff1005u | ||
| 688 | #define KVM_S390_INT_VIRTIO		0xffff2603u | ||
| 689 | #define KVM_S390_INT_SERVICE		0xffff2401u | ||
| 690 | #define KVM_S390_INT_EMERGENCY		0xffff1201u | ||
| 691 | #define KVM_S390_INT_EXTERNAL_CALL	0xffff1202u | ||
| 692 | /* Anything below 0xfffe0000u is taken by INT_IO */ | ||
| 693 | #define KVM_S390_INT_IO(ai,cssid,ssid,schid) \ | ||
| 694 | 	(((schid)) |			 \ | ||
| 695 | 	 ((ssid) << 16) |		 \ | ||
| 696 | 	 ((cssid) << 18) |		 \ | ||
| 697 | 	 ((ai) << 26)) | ||
| 698 | #define KVM_S390_INT_IO_MIN		0x00000000u | ||
| 699 | #define KVM_S390_INT_IO_MAX		0xfffdffffu | ||
| 700 | #define KVM_S390_INT_IO_AI_MASK		0x04000000u | ||
| 701 | |||
| 702 | |||
| 703 | struct kvm_s390_interrupt { | ||
| 704 | 	__u32 type; | ||
| 705 | 	__u32 parm; | ||
| 706 | 	__u64 parm64; | ||
| 707 | }; | ||
| 708 | |||
| 709 | struct kvm_s390_io_info { | ||
| 710 | 	__u16 subchannel_id; | ||
| 711 | 	__u16 subchannel_nr; | ||
| 712 | 	__u32 io_int_parm; | ||
| 713 | 	__u32 io_int_word; | ||
| 714 | }; | ||
| 715 | |||
| 716 | struct kvm_s390_ext_info { | ||
| 717 | 	__u32 ext_params; | ||
| 718 | 	__u32 pad; | ||
| 719 | 	__u64 ext_params2; | ||
| 720 | }; | ||
| 721 | |||
| 722 | struct kvm_s390_pgm_info { | ||
| 723 | 	__u64 trans_exc_code; | ||
| 724 | 	__u64 mon_code; | ||
| 725 | 	__u64 per_address; | ||
| 726 | 	__u32 data_exc_code; | ||
| 727 | 	__u16 code; | ||
| 728 | 	__u16 mon_class_nr; | ||
| 729 | 	__u8 per_code; | ||
| 730 | 	__u8 per_atmid; | ||
| 731 | 	__u8 exc_access_id; | ||
| 732 | 	__u8 per_access_id; | ||
| 733 | 	__u8 op_access_id; | ||
| 734 | #define KVM_S390_PGM_FLAGS_ILC_VALID	0x01 | ||
| 735 | #define KVM_S390_PGM_FLAGS_ILC_0	0x02 | ||
| 736 | #define KVM_S390_PGM_FLAGS_ILC_1	0x04 | ||
| 737 | #define KVM_S390_PGM_FLAGS_ILC_MASK	0x06 | ||
| 738 | #define KVM_S390_PGM_FLAGS_NO_REWIND	0x08 | ||
| 739 | 	__u8 flags; | ||
| 740 | 	__u8 pad[2]; | ||
| 741 | }; | ||
| 742 | |||
| 743 | struct kvm_s390_prefix_info { | ||
| 744 | 	__u32 address; | ||
| 745 | }; | ||
| 746 | |||
| 747 | struct kvm_s390_extcall_info { | ||
| 748 | 	__u16 code; | ||
| 749 | }; | ||
| 750 | |||
| 751 | struct kvm_s390_emerg_info { | ||
| 752 | 	__u16 code; | ||
| 753 | }; | ||
| 754 | |||
| 755 | #define KVM_S390_STOP_FLAG_STORE_STATUS	0x01 | ||
| 756 | struct kvm_s390_stop_info { | ||
| 757 | 	__u32 flags; | ||
| 758 | }; | ||
| 759 | |||
| 760 | struct kvm_s390_mchk_info { | ||
| 761 | 	__u64 cr14; | ||
| 762 | 	__u64 mcic; | ||
| 763 | 	__u64 failing_storage_address; | ||
| 764 | 	__u32 ext_damage_code; | ||
| 765 | 	__u32 pad; | ||
| 766 | 	__u8 fixed_logout[16]; | ||
| 767 | }; | ||
| 768 | |||
| 769 | struct kvm_s390_irq { | ||
| 770 | 	__u64 type; | ||
| 771 | 	union { | ||
| 772 | 		struct kvm_s390_io_info io; | ||
| 773 | 		struct kvm_s390_ext_info ext; | ||
| 774 | 		struct kvm_s390_pgm_info pgm; | ||
| 775 | 		struct kvm_s390_emerg_info emerg; | ||
| 776 | 		struct kvm_s390_extcall_info extcall; | ||
| 777 | 		struct kvm_s390_prefix_info prefix; | ||
| 778 | 		struct kvm_s390_stop_info stop; | ||
| 779 | 		struct kvm_s390_mchk_info mchk; | ||
| 780 | 		char reserved[64]; | ||
| 781 | 	} u; | ||
| 782 | }; | ||
| 783 | |||
| 784 | struct kvm_s390_irq_state { | ||
| 785 | 	__u64 buf; | ||
| 786 | 	__u32 flags; /* will stay unused for compatibility reasons */ | ||
| 787 | 	__u32 len; | ||
| 788 | 	__u32 reserved[4]; /* will stay unused for compatibility reasons */ | ||
| 789 | }; | ||
| 790 | |||
| 791 | /* for KVM_SET_GUEST_DEBUG */ | 562 | /* for KVM_SET_GUEST_DEBUG */ |
| 792 | 563 | ||
| 793 | #define KVM_GUESTDBG_ENABLE		0x00000001 | 564 | #define KVM_GUESTDBG_ENABLE		0x00000001 |
| ... | @@ -843,50 +614,6 @@ struct kvm_enable_cap { | ... | @@ -843,50 +614,6 @@ struct kvm_enable_cap { |
| 843 | 	__u8 pad[64]; | 614 | 	__u8 pad[64]; |
| 844 | }; | 615 | }; |
| 845 | 616 | ||
| 846 | /* for KVM_PPC_GET_PVINFO */ | ||
| 847 | |||
| 848 | #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) | ||
| 849 | |||
| 850 | struct kvm_ppc_pvinfo { | ||
| 851 | 	/* out */ | ||
| 852 | 	__u32 flags; | ||
| 853 | 	__u32 hcall[4]; | ||
| 854 | 	__u8 pad[108]; | ||
| 855 | }; | ||
| 856 | |||
| 857 | /* for KVM_PPC_GET_SMMU_INFO */ | ||
| 858 | #define KVM_PPC_PAGE_SIZES_MAX_SZ	8 | ||
| 859 | |||
| 860 | struct kvm_ppc_one_page_size { | ||
| 861 | 	__u32 page_shift;	/* Page shift (or 0) */ | ||
| 862 | 	__u32 pte_enc;		/* Encoding in the HPTE (>>12) */ | ||
| 863 | }; | ||
| 864 | |||
| 865 | struct kvm_ppc_one_seg_page_size { | ||
| 866 | 	__u32 page_shift;	/* Base page shift of segment (or 0) */ | ||
| 867 | 	__u32 slb_enc;		/* SLB encoding for BookS */ | ||
| 868 | 	struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
| 869 | }; | ||
| 870 | |||
| 871 | #define KVM_PPC_PAGE_SIZES_REAL		0x00000001 | ||
| 872 | #define KVM_PPC_1T_SEGMENTS		0x00000002 | ||
| 873 | #define KVM_PPC_NO_HASH			0x00000004 | ||
| 874 | |||
| 875 | struct kvm_ppc_smmu_info { | ||
| 876 | 	__u64 flags; | ||
| 877 | 	__u32 slb_size; | ||
| 878 | 	__u16 data_keys;	/* # storage keys supported for data */ | ||
| 879 | 	__u16 instr_keys;	/* # storage keys supported for instructions */ | ||
| 880 | 	struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
| 881 | }; | ||
| 882 | |||
| 883 | /* for KVM_PPC_RESIZE_HPT_{PREPARE,COMMIT} */ | ||
| 884 | struct kvm_ppc_resize_hpt { | ||
| 885 | 	__u64 flags; | ||
| 886 | 	__u32 shift; | ||
| 887 | 	__u32 pad; | ||
| 888 | }; | ||
| 889 | |||
| 890 | #define KVMIO 0xAE | 617 | #define KVMIO 0xAE |
| 891 | 618 | ||
| 892 | /* machine type bits, to be used as argument to KVM_CREATE_VM */ | 619 | /* machine type bits, to be used as argument to KVM_CREATE_VM */ |
| ... | @@ -930,9 +657,6 @@ struct kvm_ppc_resize_hpt { | ... | @@ -930,9 +657,6 @@ struct kvm_ppc_resize_hpt { |
| 930 | */ | 657 | */ |
| 931 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ | 658 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ |
| 932 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) | 659 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) |
| 933 | #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 | ||
| 934 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 | ||
| 935 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 | ||
| 936 | #define KVM_GET_EMULATED_CPUID	 _IOWR(KVMIO, 0x09, struct kvm_cpuid2) | 660 | #define KVM_GET_EMULATED_CPUID	 _IOWR(KVMIO, 0x09, struct kvm_cpuid2) |
| 937 | #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) | 661 | #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) |
| 938 | 662 | ||
| ... | @@ -959,9 +683,7 @@ struct kvm_ppc_resize_hpt { | ... | @@ -959,9 +683,7 @@ struct kvm_ppc_resize_hpt { |
| 959 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 683 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
| 960 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 | 684 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 |
| 961 | #define KVM_CAP_USER_NMI 22 | 685 | #define KVM_CAP_USER_NMI 22 |
| 962 | #ifdef __KVM_HAVE_GUEST_DEBUG | ||
| 963 | #define KVM_CAP_SET_GUEST_DEBUG 23 | 686 | #define KVM_CAP_SET_GUEST_DEBUG 23 |
| 964 | #endif | ||
| 965 | #ifdef __KVM_HAVE_PIT | 687 | #ifdef __KVM_HAVE_PIT |
| 966 | #define KVM_CAP_REINJECT_CONTROL 24 | 688 | #define KVM_CAP_REINJECT_CONTROL 24 |
| 967 | #endif | 689 | #endif |
| ... | @@ -1182,8 +904,15 @@ struct kvm_ppc_resize_hpt { | ... | @@ -1182,8 +904,15 @@ struct kvm_ppc_resize_hpt { |
| 1182 | #define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224 | 904 | #define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224 |
| 1183 | #define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225 | 905 | #define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225 |
| 1184 | #define KVM_CAP_PMU_EVENT_MASKED_EVENTS 226 | 906 | #define KVM_CAP_PMU_EVENT_MASKED_EVENTS 226 |
| 1185 | 907 | #define KVM_CAP_COUNTER_OFFSET 227 | |
| 1186 | #ifdef KVM_CAP_IRQ_ROUTING | 908 | #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 |
| 909 | #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 | ||
| 910 | #define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230 | ||
| 911 | #define KVM_CAP_USER_MEMORY2 231 | ||
| 912 | #define KVM_CAP_MEMORY_FAULT_INFO 232 | ||
| 913 | #define KVM_CAP_MEMORY_ATTRIBUTES 233 | ||
| 914 | #define KVM_CAP_GUEST_MEMFD 234 | ||
| 915 | #define KVM_CAP_VM_TYPES 235 | ||
| 1187 | 916 | ||
| 1188 | struct kvm_irq_routing_irqchip { | 917 | struct kvm_irq_routing_irqchip { |
| 1189 | 	__u32 irqchip; | 918 | 	__u32 irqchip; |
| ... | @@ -1249,41 +978,6 @@ struct kvm_irq_routing { | ... | @@ -1249,41 +978,6 @@ struct kvm_irq_routing { |
| 1249 | 	struct kvm_irq_routing_entry entries[]; | 978 | 	struct kvm_irq_routing_entry entries[]; |
| 1250 | }; | 979 | }; |
| 1251 | 980 | ||
| 1252 | #endif | ||
| 1253 | |||
| 1254 | #ifdef KVM_CAP_MCE | ||
| 1255 | /* x86 MCE */ | ||
| 1256 | struct kvm_x86_mce { | ||
| 1257 | 	__u64 status; | ||
| 1258 | 	__u64 addr; | ||
| 1259 | 	__u64 misc; | ||
| 1260 | 	__u64 mcg_status; | ||
| 1261 | 	__u8 bank; | ||
| 1262 | 	__u8 pad1[7]; | ||
| 1263 | 	__u64 pad2[3]; | ||
| 1264 | }; | ||
| 1265 | #endif | ||
| 1266 | |||
| 1267 | #ifdef KVM_CAP_XEN_HVM | ||
| 1268 | #define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR	(1 << 0) | ||
| 1269 | #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL	(1 << 1) | ||
| 1270 | #define KVM_XEN_HVM_CONFIG_SHARED_INFO		(1 << 2) | ||
| 1271 | #define KVM_XEN_HVM_CONFIG_RUNSTATE		(1 << 3) | ||
| 1272 | #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL	(1 << 4) | ||
| 1273 | #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND		(1 << 5) | ||
| 1274 | #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG	(1 << 6) | ||
| 1275 | |||
| 1276 | struct kvm_xen_hvm_config { | ||
| 1277 | 	__u32 flags; | ||
| 1278 | 	__u32 msr; | ||
| 1279 | 	__u64 blob_addr_32; | ||
| 1280 | 	__u64 blob_addr_64; | ||
| 1281 | 	__u8 blob_size_32; | ||
| 1282 | 	__u8 blob_size_64; | ||
| 1283 | 	__u8 pad2[30]; | ||
| 1284 | }; | ||
| 1285 | #endif | ||
| 1286 | |||
| 1287 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) | 981 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) |
| 1288 | /* | 982 | /* |
| 1289 | * Available with KVM_CAP_IRQFD_RESAMPLE | 983 | * Available with KVM_CAP_IRQFD_RESAMPLE |
| ... | @@ -1352,6 +1046,7 @@ struct kvm_dirty_tlb { | ... | @@ -1352,6 +1046,7 @@ struct kvm_dirty_tlb { |
| 1352 | #define KVM_REG_ARM64		0x6000000000000000ULL | 1046 | #define KVM_REG_ARM64		0x6000000000000000ULL |
| 1353 | #define KVM_REG_MIPS		0x7000000000000000ULL | 1047 | #define KVM_REG_MIPS		0x7000000000000000ULL |
| 1354 | #define KVM_REG_RISCV		0x8000000000000000ULL | 1048 | #define KVM_REG_RISCV		0x8000000000000000ULL |
| 1049 | #define KVM_REG_LOONGARCH	0x9000000000000000ULL | ||
| 1355 | 1050 | ||
| 1356 | #define KVM_REG_SIZE_SHIFT	52 | 1051 | #define KVM_REG_SIZE_SHIFT	52 |
| 1357 | #define KVM_REG_SIZE_MASK	0x00f0000000000000ULL | 1052 | #define KVM_REG_SIZE_MASK	0x00f0000000000000ULL |
| ... | @@ -1408,9 +1103,16 @@ struct kvm_device_attr { | ... | @@ -1408,9 +1103,16 @@ struct kvm_device_attr { |
| 1408 | 	__u64	addr;		/* userspace address of attr data */ | 1103 | 	__u64	addr;		/* userspace address of attr data */ |
| 1409 | }; | 1104 | }; |
| 1410 | 1105 | ||
| 1411 | #define KVM_DEV_VFIO_GROUP			1 | 1106 | #define KVM_DEV_VFIO_FILE			1 |
| 1412 | #define KVM_DEV_VFIO_GROUP_ADD			1 | 1107 | |
| 1413 | #define KVM_DEV_VFIO_GROUP_DEL			2 | 1108 | #define KVM_DEV_VFIO_FILE_ADD			1 |
| 1109 | #define KVM_DEV_VFIO_FILE_DEL			2 | ||
| 1110 | |||
| 1111 | /* KVM_DEV_VFIO_GROUP aliases are for compile time uapi compatibility */ | ||
| 1112 | #define KVM_DEV_VFIO_GROUP	KVM_DEV_VFIO_FILE | ||
| 1113 | |||
| 1114 | #define KVM_DEV_VFIO_GROUP_ADD	KVM_DEV_VFIO_FILE_ADD | ||
| 1115 | #define KVM_DEV_VFIO_GROUP_DEL	KVM_DEV_VFIO_FILE_DEL | ||
| 1414 | #define KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE		3 | 1116 | #define KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE		3 |
| 1415 | 1117 | ||
| 1416 | enum kvm_device_type { | 1118 | enum kvm_device_type { |
| ... | @@ -1434,6 +1136,8 @@ enum kvm_device_type { | ... | @@ -1434,6 +1136,8 @@ enum kvm_device_type { |
| 1434 | #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE | 1136 | #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE |
| 1435 | 	KVM_DEV_TYPE_ARM_PV_TIME, | 1137 | 	KVM_DEV_TYPE_ARM_PV_TIME, |
| 1436 | #define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME | 1138 | #define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME |
| 1139 | 	KVM_DEV_TYPE_RISCV_AIA, | ||
| 1140 | #define KVM_DEV_TYPE_RISCV_AIA		KVM_DEV_TYPE_RISCV_AIA | ||
| 1437 | 	KVM_DEV_TYPE_MAX, | 1141 | 	KVM_DEV_TYPE_MAX, |
| 1438 | }; | 1142 | }; |
| 1439 | 1143 | ||
| ... | @@ -1449,18 +1153,15 @@ struct kvm_vfio_spapr_tce { | ... | @@ -1449,18 +1153,15 @@ struct kvm_vfio_spapr_tce { |
| 1449 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) | 1153 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) |
| 1450 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) | 1154 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) |
| 1451 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) | 1155 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) |
| 1452 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) | 1156 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) /* deprecated */ |
| 1453 | #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ | 1157 | #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ |
| 1454 | 					struct kvm_userspace_memory_region) | 1158 | 					struct kvm_userspace_memory_region) |
| 1455 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) | 1159 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) |
| 1456 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) | 1160 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) |
| 1161 | #define KVM_SET_USER_MEMORY_REGION2 _IOW(KVMIO, 0x49, \ | ||
| 1162 | 					 struct kvm_userspace_memory_region2) | ||
| 1457 | 1163 | ||
| 1458 | /* enable ucontrol for s390 */ | 1164 | /* enable ucontrol for s390 */ |
| 1459 | struct kvm_s390_ucas_mapping { | ||
| 1460 | 	__u64 user_addr; | ||
| 1461 | 	__u64 vcpu_addr; | ||
| 1462 | 	__u64 length; | ||
| 1463 | }; | ||
| 1464 | #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping) | 1165 | #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping) |
| 1465 | #define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping) | 1166 | #define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping) |
| 1466 | #define KVM_S390_VCPU_FAULT	 _IOW(KVMIO, 0x52, unsigned long) | 1167 | #define KVM_S390_VCPU_FAULT	 _IOW(KVMIO, 0x52, unsigned long) |
| ... | @@ -1478,20 +1179,8 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1478,20 +1179,8 @@ struct kvm_s390_ucas_mapping { |
| 1478 | 			_IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) | 1179 | 			_IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) |
| 1479 | #define KVM_UNREGISTER_COALESCED_MMIO \ | 1180 | #define KVM_UNREGISTER_COALESCED_MMIO \ |
| 1480 | 			_IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) | 1181 | 			_IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) |
| 1481 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ | ||
| 1482 | 				 struct kvm_assigned_pci_dev) | ||
| 1483 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) | 1182 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) |
| 1484 | /* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ | ||
| 1485 | #define KVM_ASSIGN_IRQ __KVM_DEPRECATED_VM_R_0x70 | ||
| 1486 | #define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq) | ||
| 1487 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) | 1183 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) |
| 1488 | #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ | ||
| 1489 | 				 struct kvm_assigned_pci_dev) | ||
| 1490 | #define KVM_ASSIGN_SET_MSIX_NR _IOW(KVMIO, 0x73, \ | ||
| 1491 | 				 struct kvm_assigned_msix_nr) | ||
| 1492 | #define KVM_ASSIGN_SET_MSIX_ENTRY _IOW(KVMIO, 0x74, \ | ||
| 1493 | 				 struct kvm_assigned_msix_entry) | ||
| 1494 | #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) | ||
| 1495 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) | 1184 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) |
| 1496 | #define KVM_CREATE_PIT2		 _IOW(KVMIO, 0x77, struct kvm_pit_config) | 1185 | #define KVM_CREATE_PIT2		 _IOW(KVMIO, 0x77, struct kvm_pit_config) |
| 1497 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) | 1186 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) |
| ... | @@ -1508,9 +1197,6 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1508,9 +1197,6 @@ struct kvm_s390_ucas_mapping { |
| 1508 | * KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */ | 1197 | * KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */ |
| 1509 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) | 1198 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) |
| 1510 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) | 1199 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) |
| 1511 | /* Available with KVM_CAP_PCI_2_3 */ | ||
| 1512 | #define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, \ | ||
| 1513 | 				 struct kvm_assigned_pci_dev) | ||
| 1514 | /* Available with KVM_CAP_SIGNAL_MSI */ | 1200 | /* Available with KVM_CAP_SIGNAL_MSI */ |
| 1515 | #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi) | 1201 | #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi) |
| 1516 | /* Available with KVM_CAP_PPC_GET_SMMU_INFO */ | 1202 | /* Available with KVM_CAP_PPC_GET_SMMU_INFO */ |
| ... | @@ -1531,9 +1217,9 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1531,9 +1217,9 @@ struct kvm_s390_ucas_mapping { |
| 1531 | /* Available with KVM_CAP_SPAPR_RESIZE_HPT */ | 1217 | /* Available with KVM_CAP_SPAPR_RESIZE_HPT */ |
| 1532 | #define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt) | 1218 | #define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt) |
| 1533 | #define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt) | 1219 | #define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt) |
| 1534 | /* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_HASH_MMU_V3 */ | 1220 | /* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */ |
| 1535 | #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) | 1221 | #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) |
| 1536 | /* Available with KVM_CAP_PPC_RADIX_MMU */ | 1222 | /* Available with KVM_CAP_PPC_MMU_RADIX */ |
| 1537 | #define KVM_PPC_GET_RMMU_INFO	 _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) | 1223 | #define KVM_PPC_GET_RMMU_INFO	 _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) |
| 1538 | /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ | 1224 | /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ |
| 1539 | #define KVM_PPC_GET_CPU_CHAR	 _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) | 1225 | #define KVM_PPC_GET_CPU_CHAR	 _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) |
| ... | @@ -1541,6 +1227,9 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1541,6 +1227,9 @@ struct kvm_s390_ucas_mapping { |
| 1541 | #define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter) | 1227 | #define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter) |
| 1542 | #define KVM_PPC_SVM_OFF		 _IO(KVMIO, 0xb3) | 1228 | #define KVM_PPC_SVM_OFF		 _IO(KVMIO, 0xb3) |
| 1543 | #define KVM_ARM_MTE_COPY_TAGS	 _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags) | 1229 | #define KVM_ARM_MTE_COPY_TAGS	 _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags) |
| 1230 | /* Available with KVM_CAP_COUNTER_OFFSET */ | ||
| 1231 | #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset) | ||
| 1232 | #define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range) | ||
| 1544 | 1233 | ||
| 1545 | /* ioctl for vm fd */ | 1234 | /* ioctl for vm fd */ |
| 1546 | #define KVM_CREATE_DEVICE	 _IOWR(KVMIO, 0xe0, struct kvm_create_device) | 1235 | #define KVM_CREATE_DEVICE	 _IOWR(KVMIO, 0xe0, struct kvm_create_device) |
| ... | @@ -1560,8 +1249,6 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1560,8 +1249,6 @@ struct kvm_s390_ucas_mapping { |
| 1560 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) | 1249 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) |
| 1561 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) | 1250 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) |
| 1562 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) | 1251 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) |
| 1563 | /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ | ||
| 1564 | #define KVM_DEBUG_GUEST __KVM_DEPRECATED_VCPU_W_0x87 | ||
| 1565 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) | 1252 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) |
| 1566 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) | 1253 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) |
| 1567 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) | 1254 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) |
| ... | @@ -1603,7 +1290,7 @@ struct kvm_s390_ucas_mapping { | ... | @@ -1603,7 +1290,7 @@ struct kvm_s390_ucas_mapping { |
| 1603 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) | 1290 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) |
| 1604 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) | 1291 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) |
| 1605 | /* | 1292 | /* |
| 1606 | * vcpu version available with KVM_ENABLE_CAP | 1293 | * vcpu version available with KVM_CAP_ENABLE_CAP |
| 1607 | * vm version available with KVM_CAP_ENABLE_CAP_VM | 1294 | * vm version available with KVM_CAP_ENABLE_CAP_VM |
| 1608 | */ | 1295 | */ |
| 1609 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) | 1296 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) |
| ... | @@ -1669,89 +1356,6 @@ struct kvm_enc_region { | ... | @@ -1669,89 +1356,6 @@ struct kvm_enc_region { |
| 1669 | #define KVM_S390_NORMAL_RESET	_IO(KVMIO, 0xc3) | 1356 | #define KVM_S390_NORMAL_RESET	_IO(KVMIO, 0xc3) |
| 1670 | #define KVM_S390_CLEAR_RESET	_IO(KVMIO, 0xc4) | 1357 | #define KVM_S390_CLEAR_RESET	_IO(KVMIO, 0xc4) |
| 1671 | 1358 | ||
| 1672 | struct kvm_s390_pv_sec_parm { | ||
| 1673 | 	__u64 origin; | ||
| 1674 | 	__u64 length; | ||
| 1675 | }; | ||
| 1676 | |||
| 1677 | struct kvm_s390_pv_unp { | ||
| 1678 | 	__u64 addr; | ||
| 1679 | 	__u64 size; | ||
| 1680 | 	__u64 tweak; | ||
| 1681 | }; | ||
| 1682 | |||
| 1683 | enum pv_cmd_dmp_id { | ||
| 1684 | 	KVM_PV_DUMP_INIT, | ||
| 1685 | 	KVM_PV_DUMP_CONFIG_STOR_STATE, | ||
| 1686 | 	KVM_PV_DUMP_COMPLETE, | ||
| 1687 | 	KVM_PV_DUMP_CPU, | ||
| 1688 | }; | ||
| 1689 | |||
| 1690 | struct kvm_s390_pv_dmp { | ||
| 1691 | 	__u64 subcmd; | ||
| 1692 | 	__u64 buff_addr; | ||
| 1693 | 	__u64 buff_len; | ||
| 1694 | 	__u64 gaddr;		/* For dump storage state */ | ||
| 1695 | 	__u64 reserved[4]; | ||
| 1696 | }; | ||
| 1697 | |||
| 1698 | enum pv_cmd_info_id { | ||
| 1699 | 	KVM_PV_INFO_VM, | ||
| 1700 | 	KVM_PV_INFO_DUMP, | ||
| 1701 | }; | ||
| 1702 | |||
| 1703 | struct kvm_s390_pv_info_dump { | ||
| 1704 | 	__u64 dump_cpu_buffer_len; | ||
| 1705 | 	__u64 dump_config_mem_buffer_per_1m; | ||
| 1706 | 	__u64 dump_config_finalize_len; | ||
| 1707 | }; | ||
| 1708 | |||
| 1709 | struct kvm_s390_pv_info_vm { | ||
| 1710 | 	__u64 inst_calls_list[4]; | ||
| 1711 | 	__u64 max_cpus; | ||
| 1712 | 	__u64 max_guests; | ||
| 1713 | 	__u64 max_guest_addr; | ||
| 1714 | 	__u64 feature_indication; | ||
| 1715 | }; | ||
| 1716 | |||
| 1717 | struct kvm_s390_pv_info_header { | ||
| 1718 | 	__u32 id; | ||
| 1719 | 	__u32 len_max; | ||
| 1720 | 	__u32 len_written; | ||
| 1721 | 	__u32 reserved; | ||
| 1722 | }; | ||
| 1723 | |||
| 1724 | struct kvm_s390_pv_info { | ||
| 1725 | 	struct kvm_s390_pv_info_header header; | ||
| 1726 | 	union { | ||
| 1727 | 		struct kvm_s390_pv_info_dump dump; | ||
| 1728 | 		struct kvm_s390_pv_info_vm vm; | ||
| 1729 | 	}; | ||
| 1730 | }; | ||
| 1731 | |||
| 1732 | enum pv_cmd_id { | ||
| 1733 | 	KVM_PV_ENABLE, | ||
| 1734 | 	KVM_PV_DISABLE, | ||
| 1735 | 	KVM_PV_SET_SEC_PARMS, | ||
| 1736 | 	KVM_PV_UNPACK, | ||
| 1737 | 	KVM_PV_VERIFY, | ||
| 1738 | 	KVM_PV_PREP_RESET, | ||
| 1739 | 	KVM_PV_UNSHARE_ALL, | ||
| 1740 | 	KVM_PV_INFO, | ||
| 1741 | 	KVM_PV_DUMP, | ||
| 1742 | 	KVM_PV_ASYNC_CLEANUP_PREPARE, | ||
| 1743 | 	KVM_PV_ASYNC_CLEANUP_PERFORM, | ||
| 1744 | }; | ||
| 1745 | |||
| 1746 | struct kvm_pv_cmd { | ||
| 1747 | 	__u32 cmd;	/* Command to be executed */ | ||
| 1748 | 	__u16 rc;	/* Ultravisor return code */ | ||
| 1749 | 	__u16 rrc;	/* Ultravisor return reason code */ | ||
| 1750 | 	__u64 data;	/* Data or address */ | ||
| 1751 | 	__u32 flags; /* flags for future extensions. Must be 0 for now */ | ||
| 1752 | 	__u32 reserved[3]; | ||
| 1753 | }; | ||
| 1754 | |||
| 1755 | /* Available with KVM_CAP_S390_PROTECTED */ | 1359 | /* Available with KVM_CAP_S390_PROTECTED */ |
| 1756 | #define KVM_S390_PV_COMMAND		_IOWR(KVMIO, 0xc5, struct kvm_pv_cmd) | 1360 | #define KVM_S390_PV_COMMAND		_IOWR(KVMIO, 0xc5, struct kvm_pv_cmd) |
| 1757 | 1361 | ||
| ... | @@ -1765,58 +1369,6 @@ struct kvm_pv_cmd { | ... | @@ -1765,58 +1369,6 @@ struct kvm_pv_cmd { |
| 1765 | #define KVM_XEN_HVM_GET_ATTR	_IOWR(KVMIO, 0xc8, struct kvm_xen_hvm_attr) | 1369 | #define KVM_XEN_HVM_GET_ATTR	_IOWR(KVMIO, 0xc8, struct kvm_xen_hvm_attr) |
| 1766 | #define KVM_XEN_HVM_SET_ATTR	_IOW(KVMIO, 0xc9, struct kvm_xen_hvm_attr) | 1370 | #define KVM_XEN_HVM_SET_ATTR	_IOW(KVMIO, 0xc9, struct kvm_xen_hvm_attr) |
| 1767 | 1371 | ||
| 1768 | struct kvm_xen_hvm_attr { | ||
| 1769 | 	__u16 type; | ||
| 1770 | 	__u16 pad[3]; | ||
| 1771 | 	union { | ||
| 1772 | 		__u8 long_mode; | ||
| 1773 | 		__u8 vector; | ||
| 1774 | 		__u8 runstate_update_flag; | ||
| 1775 | 		struct { | ||
| 1776 | 			__u64 gfn; | ||
| 1777 | #define KVM_XEN_INVALID_GFN ((__u64)-1) | ||
| 1778 | 		} shared_info; | ||
| 1779 | 		struct { | ||
| 1780 | 			__u32 send_port; | ||
| 1781 | 			__u32 type; /* EVTCHNSTAT_ipi / EVTCHNSTAT_interdomain */ | ||
| 1782 | 			__u32 flags; | ||
| 1783 | #define KVM_XEN_EVTCHN_DEASSIGN		(1 << 0) | ||
| 1784 | #define KVM_XEN_EVTCHN_UPDATE		(1 << 1) | ||
| 1785 | #define KVM_XEN_EVTCHN_RESET		(1 << 2) | ||
| 1786 | 			/* | ||
| 1787 | 			 * Events sent by the guest are either looped back to | ||
| 1788 | 			 * the guest itself (potentially on a different port#) | ||
| 1789 | 			 * or signalled via an eventfd. | ||
| 1790 | 			 */ | ||
| 1791 | 			union { | ||
| 1792 | 				struct { | ||
| 1793 | 					__u32 port; | ||
| 1794 | 					__u32 vcpu; | ||
| 1795 | 					__u32 priority; | ||
| 1796 | 				} port; | ||
| 1797 | 				struct { | ||
| 1798 | 					__u32 port; /* Zero for eventfd */ | ||
| 1799 | 					__s32 fd; | ||
| 1800 | 				} eventfd; | ||
| 1801 | 				__u32 padding[4]; | ||
| 1802 | 			} deliver; | ||
| 1803 | 		} evtchn; | ||
| 1804 | 		__u32 xen_version; | ||
| 1805 | 		__u64 pad[8]; | ||
| 1806 | 	} u; | ||
| 1807 | }; | ||
| 1808 | |||
| 1809 | |||
| 1810 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */ | ||
| 1811 | #define KVM_XEN_ATTR_TYPE_LONG_MODE		0x0 | ||
| 1812 | #define KVM_XEN_ATTR_TYPE_SHARED_INFO		0x1 | ||
| 1813 | #define KVM_XEN_ATTR_TYPE_UPCALL_VECTOR		0x2 | ||
| 1814 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ | ||
| 1815 | #define KVM_XEN_ATTR_TYPE_EVTCHN		0x3 | ||
| 1816 | #define KVM_XEN_ATTR_TYPE_XEN_VERSION		0x4 | ||
| 1817 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG */ | ||
| 1818 | #define KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG	0x5 | ||
| 1819 | |||
| 1820 | /* Per-vCPU Xen attributes */ | 1372 | /* Per-vCPU Xen attributes */ |
| 1821 | #define KVM_XEN_VCPU_GET_ATTR	_IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr) | 1373 | #define KVM_XEN_VCPU_GET_ATTR	_IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr) |
| 1822 | #define KVM_XEN_VCPU_SET_ATTR	_IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr) | 1374 | #define KVM_XEN_VCPU_SET_ATTR	_IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr) |
| ... | @@ -1827,242 +1379,6 @@ struct kvm_xen_hvm_attr { | ... | @@ -1827,242 +1379,6 @@ struct kvm_xen_hvm_attr { |
| 1827 | #define KVM_GET_SREGS2 _IOR(KVMIO, 0xcc, struct kvm_sregs2) | 1379 | #define KVM_GET_SREGS2 _IOR(KVMIO, 0xcc, struct kvm_sregs2) |
| 1828 | #define KVM_SET_SREGS2 _IOW(KVMIO, 0xcd, struct kvm_sregs2) | 1380 | #define KVM_SET_SREGS2 _IOW(KVMIO, 0xcd, struct kvm_sregs2) |
| 1829 | 1381 | ||
| 1830 | struct kvm_xen_vcpu_attr { | ||
| 1831 | 	__u16 type; | ||
| 1832 | 	__u16 pad[3]; | ||
| 1833 | 	union { | ||
| 1834 | 		__u64 gpa; | ||
| 1835 | #define KVM_XEN_INVALID_GPA ((__u64)-1) | ||
| 1836 | 		__u64 pad[8]; | ||
| 1837 | 		struct { | ||
| 1838 | 			__u64 state; | ||
| 1839 | 			__u64 state_entry_time; | ||
| 1840 | 			__u64 time_running; | ||
| 1841 | 			__u64 time_runnable; | ||
| 1842 | 			__u64 time_blocked; | ||
| 1843 | 			__u64 time_offline; | ||
| 1844 | 		} runstate; | ||
| 1845 | 		__u32 vcpu_id; | ||
| 1846 | 		struct { | ||
| 1847 | 			__u32 port; | ||
| 1848 | 			__u32 priority; | ||
| 1849 | 			__u64 expires_ns; | ||
| 1850 | 		} timer; | ||
| 1851 | 		__u8 vector; | ||
| 1852 | 	} u; | ||
| 1853 | }; | ||
| 1854 | |||
| 1855 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */ | ||
| 1856 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO	0x0 | ||
| 1857 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO	0x1 | ||
| 1858 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR	0x2 | ||
| 1859 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT	0x3 | ||
| 1860 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA	0x4 | ||
| 1861 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST	0x5 | ||
| 1862 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ | ||
| 1863 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID		0x6 | ||
| 1864 | #define KVM_XEN_VCPU_ATTR_TYPE_TIMER		0x7 | ||
| 1865 | #define KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR	0x8 | ||
| 1866 | |||
| 1867 | /* Secure Encrypted Virtualization command */ | ||
| 1868 | enum sev_cmd_id { | ||
| 1869 | 	/* Guest initialization commands */ | ||
| 1870 | 	KVM_SEV_INIT = 0, | ||
| 1871 | 	KVM_SEV_ES_INIT, | ||
| 1872 | 	/* Guest launch commands */ | ||
| 1873 | 	KVM_SEV_LAUNCH_START, | ||
| 1874 | 	KVM_SEV_LAUNCH_UPDATE_DATA, | ||
| 1875 | 	KVM_SEV_LAUNCH_UPDATE_VMSA, | ||
| 1876 | 	KVM_SEV_LAUNCH_SECRET, | ||
| 1877 | 	KVM_SEV_LAUNCH_MEASURE, | ||
| 1878 | 	KVM_SEV_LAUNCH_FINISH, | ||
| 1879 | 	/* Guest migration commands (outgoing) */ | ||
| 1880 | 	KVM_SEV_SEND_START, | ||
| 1881 | 	KVM_SEV_SEND_UPDATE_DATA, | ||
| 1882 | 	KVM_SEV_SEND_UPDATE_VMSA, | ||
| 1883 | 	KVM_SEV_SEND_FINISH, | ||
| 1884 | 	/* Guest migration commands (incoming) */ | ||
| 1885 | 	KVM_SEV_RECEIVE_START, | ||
| 1886 | 	KVM_SEV_RECEIVE_UPDATE_DATA, | ||
| 1887 | 	KVM_SEV_RECEIVE_UPDATE_VMSA, | ||
| 1888 | 	KVM_SEV_RECEIVE_FINISH, | ||
| 1889 | 	/* Guest status and debug commands */ | ||
| 1890 | 	KVM_SEV_GUEST_STATUS, | ||
| 1891 | 	KVM_SEV_DBG_DECRYPT, | ||
| 1892 | 	KVM_SEV_DBG_ENCRYPT, | ||
| 1893 | 	/* Guest certificates commands */ | ||
| 1894 | 	KVM_SEV_CERT_EXPORT, | ||
| 1895 | 	/* Attestation report */ | ||
| 1896 | 	KVM_SEV_GET_ATTESTATION_REPORT, | ||
| 1897 | 	/* Guest Migration Extension */ | ||
| 1898 | 	KVM_SEV_SEND_CANCEL, | ||
| 1899 | |||
| 1900 | 	KVM_SEV_NR_MAX, | ||
| 1901 | }; | ||
| 1902 | |||
| 1903 | struct kvm_sev_cmd { | ||
| 1904 | 	__u32 id; | ||
| 1905 | 	__u64 data; | ||
| 1906 | 	__u32 error; | ||
| 1907 | 	__u32 sev_fd; | ||
| 1908 | }; | ||
| 1909 | |||
| 1910 | struct kvm_sev_launch_start { | ||
| 1911 | 	__u32 handle; | ||
| 1912 | 	__u32 policy; | ||
| 1913 | 	__u64 dh_uaddr; | ||
| 1914 | 	__u32 dh_len; | ||
| 1915 | 	__u64 session_uaddr; | ||
| 1916 | 	__u32 session_len; | ||
| 1917 | }; | ||
| 1918 | |||
| 1919 | struct kvm_sev_launch_update_data { | ||
| 1920 | 	__u64 uaddr; | ||
| 1921 | 	__u32 len; | ||
| 1922 | }; | ||
| 1923 | |||
| 1924 | |||
| 1925 | struct kvm_sev_launch_secret { | ||
| 1926 | 	__u64 hdr_uaddr; | ||
| 1927 | 	__u32 hdr_len; | ||
| 1928 | 	__u64 guest_uaddr; | ||
| 1929 | 	__u32 guest_len; | ||
| 1930 | 	__u64 trans_uaddr; | ||
| 1931 | 	__u32 trans_len; | ||
| 1932 | }; | ||
| 1933 | |||
| 1934 | struct kvm_sev_launch_measure { | ||
| 1935 | 	__u64 uaddr; | ||
| 1936 | 	__u32 len; | ||
| 1937 | }; | ||
| 1938 | |||
| 1939 | struct kvm_sev_guest_status { | ||
| 1940 | 	__u32 handle; | ||
| 1941 | 	__u32 policy; | ||
| 1942 | 	__u32 state; | ||
| 1943 | }; | ||
| 1944 | |||
| 1945 | struct kvm_sev_dbg { | ||
| 1946 | 	__u64 src_uaddr; | ||
| 1947 | 	__u64 dst_uaddr; | ||
| 1948 | 	__u32 len; | ||
| 1949 | }; | ||
| 1950 | |||
| 1951 | struct kvm_sev_attestation_report { | ||
| 1952 | 	__u8 mnonce[16]; | ||
| 1953 | 	__u64 uaddr; | ||
| 1954 | 	__u32 len; | ||
| 1955 | }; | ||
| 1956 | |||
| 1957 | struct kvm_sev_send_start { | ||
| 1958 | 	__u32 policy; | ||
| 1959 | 	__u64 pdh_cert_uaddr; | ||
| 1960 | 	__u32 pdh_cert_len; | ||
| 1961 | 	__u64 plat_certs_uaddr; | ||
| 1962 | 	__u32 plat_certs_len; | ||
| 1963 | 	__u64 amd_certs_uaddr; | ||
| 1964 | 	__u32 amd_certs_len; | ||
| 1965 | 	__u64 session_uaddr; | ||
| 1966 | 	__u32 session_len; | ||
| 1967 | }; | ||
| 1968 | |||
| 1969 | struct kvm_sev_send_update_data { | ||
| 1970 | 	__u64 hdr_uaddr; | ||
| 1971 | 	__u32 hdr_len; | ||
| 1972 | 	__u64 guest_uaddr; | ||
| 1973 | 	__u32 guest_len; | ||
| 1974 | 	__u64 trans_uaddr; | ||
| 1975 | 	__u32 trans_len; | ||
| 1976 | }; | ||
| 1977 | |||
| 1978 | struct kvm_sev_receive_start { | ||
| 1979 | 	__u32 handle; | ||
| 1980 | 	__u32 policy; | ||
| 1981 | 	__u64 pdh_uaddr; | ||
| 1982 | 	__u32 pdh_len; | ||
| 1983 | 	__u64 session_uaddr; | ||
| 1984 | 	__u32 session_len; | ||
| 1985 | }; | ||
| 1986 | |||
| 1987 | struct kvm_sev_receive_update_data { | ||
| 1988 | 	__u64 hdr_uaddr; | ||
| 1989 | 	__u32 hdr_len; | ||
| 1990 | 	__u64 guest_uaddr; | ||
| 1991 | 	__u32 guest_len; | ||
| 1992 | 	__u64 trans_uaddr; | ||
| 1993 | 	__u32 trans_len; | ||
| 1994 | }; | ||
| 1995 | |||
| 1996 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU	(1 << 0) | ||
| 1997 | #define KVM_DEV_ASSIGN_PCI_2_3		(1 << 1) | ||
| 1998 | #define KVM_DEV_ASSIGN_MASK_INTX	(1 << 2) | ||
| 1999 | |||
| 2000 | struct kvm_assigned_pci_dev { | ||
| 2001 | 	__u32 assigned_dev_id; | ||
| 2002 | 	__u32 busnr; | ||
| 2003 | 	__u32 devfn; | ||
| 2004 | 	__u32 flags; | ||
| 2005 | 	__u32 segnr; | ||
| 2006 | 	union { | ||
| 2007 | 		__u32 reserved[11]; | ||
| 2008 | 	}; | ||
| 2009 | }; | ||
| 2010 | |||
| 2011 | #define KVM_DEV_IRQ_HOST_INTX (1 << 0) | ||
| 2012 | #define KVM_DEV_IRQ_HOST_MSI (1 << 1) | ||
| 2013 | #define KVM_DEV_IRQ_HOST_MSIX (1 << 2) | ||
| 2014 | |||
| 2015 | #define KVM_DEV_IRQ_GUEST_INTX (1 << 8) | ||
| 2016 | #define KVM_DEV_IRQ_GUEST_MSI (1 << 9) | ||
| 2017 | #define KVM_DEV_IRQ_GUEST_MSIX (1 << 10) | ||
| 2018 | |||
| 2019 | #define KVM_DEV_IRQ_HOST_MASK	 0x00ff | ||
| 2020 | #define KVM_DEV_IRQ_GUEST_MASK 0xff00 | ||
| 2021 | |||
| 2022 | struct kvm_assigned_irq { | ||
| 2023 | 	__u32 assigned_dev_id; | ||
| 2024 | 	__u32 host_irq; /* ignored (legacy field) */ | ||
| 2025 | 	__u32 guest_irq; | ||
| 2026 | 	__u32 flags; | ||
| 2027 | 	union { | ||
| 2028 | 		__u32 reserved[12]; | ||
| 2029 | 	}; | ||
| 2030 | }; | ||
| 2031 | |||
| 2032 | struct kvm_assigned_msix_nr { | ||
| 2033 | 	__u32 assigned_dev_id; | ||
| 2034 | 	__u16 entry_nr; | ||
| 2035 | 	__u16 padding; | ||
| 2036 | }; | ||
| 2037 | |||
| 2038 | #define KVM_MAX_MSIX_PER_DEV		256 | ||
| 2039 | struct kvm_assigned_msix_entry { | ||
| 2040 | 	__u32 assigned_dev_id; | ||
| 2041 | 	__u32 gsi; | ||
| 2042 | 	__u16 entry; /* The index of entry in the MSI-X table */ | ||
| 2043 | 	__u16 padding[3]; | ||
| 2044 | }; | ||
| 2045 | |||
| 2046 | #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) | ||
| 2047 | #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1) | ||
| 2048 | |||
| 2049 | /* Available with KVM_CAP_ARM_USER_IRQ */ | ||
| 2050 | |||
| 2051 | /* Bits for run->s.regs.device_irq_level */ | ||
| 2052 | #define KVM_ARM_DEV_EL1_VTIMER		(1 << 0) | ||
| 2053 | #define KVM_ARM_DEV_EL1_PTIMER		(1 << 1) | ||
| 2054 | #define KVM_ARM_DEV_PMU			(1 << 2) | ||
| 2055 | |||
| 2056 | struct kvm_hyperv_eventfd { | ||
| 2057 | 	__u32 conn_id; | ||
| 2058 | 	__s32 fd; | ||
| 2059 | 	__u32 flags; | ||
| 2060 | 	__u32 padding[3]; | ||
| 2061 | }; | ||
| 2062 | |||
| 2063 | #define KVM_HYPERV_CONN_ID_MASK		0x00ffffff | ||
| 2064 | #define KVM_HYPERV_EVENTFD_DEASSIGN	(1 << 0) | ||
| 2065 | |||
| 2066 | #define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) | 1382 | #define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) |
| 2067 | #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1) | 1383 | #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1) |
| 2068 | 1384 | ||
| ... | @@ -2208,31 +1524,24 @@ struct kvm_stats_desc { | ... | @@ -2208,31 +1524,24 @@ struct kvm_stats_desc { |
| 2208 | /* Available with KVM_CAP_S390_ZPCI_OP */ | 1524 | /* Available with KVM_CAP_S390_ZPCI_OP */ |
| 2209 | #define KVM_S390_ZPCI_OP _IOW(KVMIO, 0xd1, struct kvm_s390_zpci_op) | 1525 | #define KVM_S390_ZPCI_OP _IOW(KVMIO, 0xd1, struct kvm_s390_zpci_op) |
| 2210 | 1526 | ||
| 2211 | struct kvm_s390_zpci_op { | 1527 | /* Available with KVM_CAP_MEMORY_ATTRIBUTES */ |
| 2212 | 	/* in */ | 1528 | #define KVM_SET_MEMORY_ATTRIBUTES _IOW(KVMIO, 0xd2, struct kvm_memory_attributes) |
| 2213 | 	__u32 fh; /* target device */ | 1529 | |
| 2214 | 	__u8 op; /* operation to perform */ | 1530 | struct kvm_memory_attributes { |
| 2215 | 	__u8 pad[3]; | 1531 | 	__u64 address; |
| 2216 | 	union { | 1532 | 	__u64 size; |
| 2217 | 		/* for KVM_S390_ZPCIOP_REG_AEN */ | 1533 | 	__u64 attributes; |
| 2218 | 		struct { | 1534 | 	__u64 flags; |
| 2219 | 			__u64 ibv; /* Guest addr of interrupt bit vector */ | ||
| 2220 | 			__u64 sb; /* Guest addr of summary bit */ | ||
| 2221 | 			__u32 flags; | ||
| 2222 | 			__u32 noi; /* Number of interrupts */ | ||
| 2223 | 			__u8 isc; /* Guest interrupt subclass */ | ||
| 2224 | 			__u8 sbo; /* Offset of guest summary bit vector */ | ||
| 2225 | 			__u16 pad; | ||
| 2226 | 		} reg_aen; | ||
| 2227 | 		__u64 reserved[8]; | ||
| 2228 | 	} u; | ||
| 2229 | }; | 1535 | }; |
| 2230 | 1536 | ||
| 2231 | /* types for kvm_s390_zpci_op->op */ | 1537 | #define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3) |
| 2232 | #define KVM_S390_ZPCIOP_REG_AEN 0 | 1538 | |
| 2233 | #define KVM_S390_ZPCIOP_DEREG_AEN 1 | 1539 | #define KVM_CREATE_GUEST_MEMFD	_IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd) |
| 2234 | 1540 | ||
| 2235 | /* flags for kvm_s390_zpci_op->u.reg_aen.flags */ | 1541 | struct kvm_create_guest_memfd { |
| 2236 | #define KVM_S390_ZPCIOP_REGAEN_HOST (1 << 0) | 1542 | 	__u64 size; |
| 1543 | 	__u64 flags; | ||
| 1544 | 	__u64 reserved[6]; | ||
| 1545 | }; | ||
| 2237 | 1546 | ||
| 2238 | #endif /* __LINUX_KVM_H */ | 1547 | #endif /* __LINUX_KVM_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/landlock.h+116-23| ... | @@ -31,6 +31,12 @@ struct landlock_ruleset_attr { | ... | @@ -31,6 +31,12 @@ struct landlock_ruleset_attr { |
| 31 | 	 * this access right. | 31 | 	 * this access right. |
| 32 | 	 */ | 32 | 	 */ |
| 33 | 	__u64 handled_access_fs; | 33 | 	__u64 handled_access_fs; |
| 34 | 	/** | ||
| 35 | 	 * @handled_access_net: Bitmask of actions (cf. `Network flags`_) | ||
| 36 | 	 * that is handled by this ruleset and should then be forbidden if no | ||
| 37 | 	 * rule explicitly allow them. | ||
| 38 | 	 */ | ||
| 39 | 	__u64 handled_access_net; | ||
| 34 | }; | 40 | }; |
| 35 | 41 | ||
| 36 | /* | 42 | /* |
| ... | @@ -54,6 +60,11 @@ enum landlock_rule_type { | ... | @@ -54,6 +60,11 @@ enum landlock_rule_type { |
| 54 | 	 * landlock_path_beneath_attr . | 60 | 	 * landlock_path_beneath_attr . |
| 55 | 	 */ | 61 | 	 */ |
| 56 | 	LANDLOCK_RULE_PATH_BENEATH = 1, | 62 | 	LANDLOCK_RULE_PATH_BENEATH = 1, |
| 63 | 	/** | ||
| 64 | 	 * @LANDLOCK_RULE_NET_PORT: Type of a &struct | ||
| 65 | 	 * landlock_net_port_attr . | ||
| 66 | 	 */ | ||
| 67 | 	LANDLOCK_RULE_NET_PORT, | ||
| 57 | }; | 68 | }; |
| 58 | 69 | ||
| 59 | /** | 70 | /** |
| ... | @@ -79,6 +90,31 @@ struct landlock_path_beneath_attr { | ... | @@ -79,6 +90,31 @@ struct landlock_path_beneath_attr { |
| 79 | 	 */ | 90 | 	 */ |
| 80 | } __attribute__((packed)); | 91 | } __attribute__((packed)); |
| 81 | 92 | ||
| 93 | /** | ||
| 94 | * struct landlock_net_port_attr - Network port definition | ||
| 95 | * | ||
| 96 | * Argument of sys_landlock_add_rule(). | ||
| 97 | */ | ||
| 98 | struct landlock_net_port_attr { | ||
| 99 | 	/** | ||
| 100 | 	 * @allowed_access: Bitmask of allowed access network for a port | ||
| 101 | 	 * (cf. `Network flags`_). | ||
| 102 | 	 */ | ||
| 103 | 	__u64 allowed_access; | ||
| 104 | 	/** | ||
| 105 | 	 * @port: Network port in host endianness. | ||
| 106 | 	 * | ||
| 107 | 	 * It should be noted that port 0 passed to :manpage:`bind(2)` will | ||
| 108 | 	 * bind to an available port from a specific port range. This can be | ||
| 109 | 	 * configured thanks to the ``/proc/sys/net/ipv4/ip_local_port_range`` | ||
| 110 | 	 * sysctl (also used for IPv6). A Landlock rule with port 0 and the | ||
| 111 | 	 * ``LANDLOCK_ACCESS_NET_BIND_TCP`` right means that requesting to bind | ||
| 112 | 	 * on port 0 is allowed and it will automatically translate to binding | ||
| 113 | 	 * on the related port range. | ||
| 114 | 	 */ | ||
| 115 | 	__u64 port; | ||
| 116 | }; | ||
| 117 | |||
| 82 | /** | 118 | /** |
| 83 | * DOC: fs_access | 119 | * DOC: fs_access |
| 84 | * | 120 | * |
| ... | @@ -92,7 +128,7 @@ struct landlock_path_beneath_attr { | ... | @@ -92,7 +128,7 @@ struct landlock_path_beneath_attr { |
| 92 | * files and directories. Files or directories opened before the sandboxing | 128 | * files and directories. Files or directories opened before the sandboxing |
| 93 | * are not subject to these restrictions. | 129 | * are not subject to these restrictions. |
| 94 | * | 130 | * |
| 95 | * A file can only receive these access rights: | 131 | * The following access rights apply only to files: |
| 96 | * | 132 | * |
| 97 | * - %LANDLOCK_ACCESS_FS_EXECUTE: Execute a file. | 133 | * - %LANDLOCK_ACCESS_FS_EXECUTE: Execute a file. |
| 98 | * - %LANDLOCK_ACCESS_FS_WRITE_FILE: Open a file with write access. Note that | 134 | * - %LANDLOCK_ACCESS_FS_WRITE_FILE: Open a file with write access. Note that |
| ... | @@ -102,12 +138,13 @@ struct landlock_path_beneath_attr { | ... | @@ -102,12 +138,13 @@ struct landlock_path_beneath_attr { |
| 102 | * - %LANDLOCK_ACCESS_FS_READ_FILE: Open a file with read access. | 138 | * - %LANDLOCK_ACCESS_FS_READ_FILE: Open a file with read access. |
| 103 | * - %LANDLOCK_ACCESS_FS_TRUNCATE: Truncate a file with :manpage:`truncate(2)`, | 139 | * - %LANDLOCK_ACCESS_FS_TRUNCATE: Truncate a file with :manpage:`truncate(2)`, |
| 104 | * :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with | 140 | * :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with |
| 105 | * ``O_TRUNC``. Whether an opened file can be truncated with | 141 | * ``O_TRUNC``. This access right is available since the third version of the |
| 106 | * :manpage:`ftruncate(2)` is determined during :manpage:`open(2)`, in the | 142 | * Landlock ABI. |
| 107 | * same way as read and write permissions are checked during | 143 | * |
| 108 | * :manpage:`open(2)` using %LANDLOCK_ACCESS_FS_READ_FILE and | 144 | * Whether an opened file can be truncated with :manpage:`ftruncate(2)` or used |
| 109 | * %LANDLOCK_ACCESS_FS_WRITE_FILE. This access right is available since the | 145 | * with `ioctl(2)` is determined during :manpage:`open(2)`, in the same way as |
| 110 | * third version of the Landlock ABI. | 146 | * read and write permissions are checked during :manpage:`open(2)` using |
| 147 | * %LANDLOCK_ACCESS_FS_READ_FILE and %LANDLOCK_ACCESS_FS_WRITE_FILE. | ||
| 111 | * | 148 | * |
| 112 | * A directory can receive access rights related to files or directories. The | 149 | * A directory can receive access rights related to files or directories. The |
| 113 | * following access right is applied to the directory itself, and the | 150 | * following access right is applied to the directory itself, and the |
| ... | @@ -130,21 +167,57 @@ struct landlock_path_beneath_attr { | ... | @@ -130,21 +167,57 @@ struct landlock_path_beneath_attr { |
| 130 | * - %LANDLOCK_ACCESS_FS_MAKE_BLOCK: Create (or rename or link) a block device. | 167 | * - %LANDLOCK_ACCESS_FS_MAKE_BLOCK: Create (or rename or link) a block device. |
| 131 | * - %LANDLOCK_ACCESS_FS_MAKE_SYM: Create (or rename or link) a symbolic link. | 168 | * - %LANDLOCK_ACCESS_FS_MAKE_SYM: Create (or rename or link) a symbolic link. |
| 132 | * - %LANDLOCK_ACCESS_FS_REFER: Link or rename a file from or to a different | 169 | * - %LANDLOCK_ACCESS_FS_REFER: Link or rename a file from or to a different |
| 133 | * directory (i.e. reparent a file hierarchy). This access right is | 170 | * directory (i.e. reparent a file hierarchy). |
| 134 | * available since the second version of the Landlock ABI. This is also the | 171 | * |
| 135 | * only access right which is always considered handled by any ruleset in | 172 | * This access right is available since the second version of the Landlock |
| 136 | * such a way that reparenting a file hierarchy is always denied by default. | 173 | * ABI. |
| 137 | * To avoid privilege escalation, it is not enough to add a rule with this | 174 | * |
| 138 | * access right. When linking or renaming a file, the destination directory | 175 | * This is the only access right which is denied by default by any ruleset, |
| 139 | * hierarchy must also always have the same or a superset of restrictions of | 176 | * even if the right is not specified as handled at ruleset creation time. |
| 140 | * the source hierarchy. If it is not the case, or if the domain doesn't | 177 | * The only way to make a ruleset grant this right is to explicitly allow it |
| 141 | * handle this access right, such actions are denied by default with errno | 178 | * for a specific directory by adding a matching rule to the ruleset. |
| 142 | * set to ``EXDEV``. Linking also requires a ``LANDLOCK_ACCESS_FS_MAKE_*`` | 179 | * |
| 143 | * access right on the destination directory, and renaming also requires a | 180 | * In particular, when using the first Landlock ABI version, Landlock will |
| 144 | * ``LANDLOCK_ACCESS_FS_REMOVE_*`` access right on the source's (file or | 181 | * always deny attempts to reparent files between different directories. |
| 145 | * directory) parent. Otherwise, such actions are denied with errno set to | 182 | * |
| 146 | * ``EACCES``. The ``EACCES`` errno prevails over ``EXDEV`` to let user space | 183 | * In addition to the source and destination directories having the |
| 147 | * efficiently deal with an unrecoverable error. | 184 | * %LANDLOCK_ACCESS_FS_REFER access right, the attempted link or rename |
| 185 | * operation must meet the following constraints: | ||
| 186 | * | ||
| 187 | * * The reparented file may not gain more access rights in the destination | ||
| 188 | * directory than it previously had in the source directory. If this is | ||
| 189 | * attempted, the operation results in an ``EXDEV`` error. | ||
| 190 | * | ||
| 191 | * * When linking or renaming, the ``LANDLOCK_ACCESS_FS_MAKE_*`` right for the | ||
| 192 | * respective file type must be granted for the destination directory. | ||
| 193 | * Otherwise, the operation results in an ``EACCES`` error. | ||
| 194 | * | ||
| 195 | * * When renaming, the ``LANDLOCK_ACCESS_FS_REMOVE_*`` right for the | ||
| 196 | * respective file type must be granted for the source directory. Otherwise, | ||
| 197 | * the operation results in an ``EACCES`` error. | ||
| 198 | * | ||
| 199 | * If multiple requirements are not met, the ``EACCES`` error code takes | ||
| 200 | * precedence over ``EXDEV``. | ||
| 201 | * | ||
| 202 | * The following access right applies both to files and directories: | ||
| 203 | * | ||
| 204 | * - %LANDLOCK_ACCESS_FS_IOCTL_DEV: Invoke :manpage:`ioctl(2)` commands on an opened | ||
| 205 | * character or block device. | ||
| 206 | * | ||
| 207 | * This access right applies to all `ioctl(2)` commands implemented by device | ||
| 208 | * drivers. However, the following common IOCTL commands continue to be | ||
| 209 | * invokable independent of the %LANDLOCK_ACCESS_FS_IOCTL_DEV right: | ||
| 210 | * | ||
| 211 | * * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``), | ||
| 212 | * * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``), | ||
| 213 | * * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``, | ||
| 214 | * ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``) | ||
| 215 | * * Some IOCTL commands which do not make sense when used with devices, but | ||
| 216 | * whose implementations are safe and return the right error codes | ||
| 217 | * (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``) | ||
| 218 | * | ||
| 219 | * This access right is available since the fifth version of the Landlock | ||
| 220 | * ABI. | ||
| 148 | * | 221 | * |
| 149 | * .. warning:: | 222 | * .. warning:: |
| 150 | * | 223 | * |
| ... | @@ -152,7 +225,7 @@ struct landlock_path_beneath_attr { | ... | @@ -152,7 +225,7 @@ struct landlock_path_beneath_attr { |
| 152 | * accessible through these syscall families: :manpage:`chdir(2)`, | 225 | * accessible through these syscall families: :manpage:`chdir(2)`, |
| 153 | * :manpage:`stat(2)`, :manpage:`flock(2)`, :manpage:`chmod(2)`, | 226 | * :manpage:`stat(2)`, :manpage:`flock(2)`, :manpage:`chmod(2)`, |
| 154 | * :manpage:`chown(2)`, :manpage:`setxattr(2)`, :manpage:`utime(2)`, | 227 | * :manpage:`chown(2)`, :manpage:`setxattr(2)`, :manpage:`utime(2)`, |
| 155 | * :manpage:`ioctl(2)`, :manpage:`fcntl(2)`, :manpage:`access(2)`. | 228 | * :manpage:`fcntl(2)`, :manpage:`access(2)`. |
| 156 | * Future Landlock evolutions will enable to restrict them. | 229 | * Future Landlock evolutions will enable to restrict them. |
| 157 | */ | 230 | */ |
| 158 | /* clang-format off */ | 231 | /* clang-format off */ |
| ... | @@ -171,6 +244,26 @@ struct landlock_path_beneath_attr { | ... | @@ -171,6 +244,26 @@ struct landlock_path_beneath_attr { |
| 171 | #define LANDLOCK_ACCESS_FS_MAKE_SYM			(1ULL << 12) | 244 | #define LANDLOCK_ACCESS_FS_MAKE_SYM			(1ULL << 12) |
| 172 | #define LANDLOCK_ACCESS_FS_REFER			(1ULL << 13) | 245 | #define LANDLOCK_ACCESS_FS_REFER			(1ULL << 13) |
| 173 | #define LANDLOCK_ACCESS_FS_TRUNCATE			(1ULL << 14) | 246 | #define LANDLOCK_ACCESS_FS_TRUNCATE			(1ULL << 14) |
| 247 | #define LANDLOCK_ACCESS_FS_IOCTL_DEV			(1ULL << 15) | ||
| 174 | /* clang-format on */ | 248 | /* clang-format on */ |
| 175 | 249 | ||
| 250 | /** | ||
| 251 | * DOC: net_access | ||
| 252 | * | ||
| 253 | * Network flags | ||
| 254 | * ~~~~~~~~~~~~~~~~ | ||
| 255 | * | ||
| 256 | * These flags enable to restrict a sandboxed process to a set of network | ||
| 257 | * actions. This is supported since the Landlock ABI version 4. | ||
| 258 | * | ||
| 259 | * TCP sockets with allowed actions: | ||
| 260 | * | ||
| 261 | * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind a TCP socket to a local port. | ||
| 262 | * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect an active TCP socket to | ||
| 263 | * a remote port. | ||
| 264 | */ | ||
| 265 | /* clang-format off */ | ||
| 266 | #define LANDLOCK_ACCESS_NET_BIND_TCP			(1ULL << 0) | ||
| 267 | #define LANDLOCK_ACCESS_NET_CONNECT_TCP			(1ULL << 1) | ||
| 268 | /* clang-format on */ | ||
| 176 | #endif /* _LINUX_LANDLOCK_H */ | 269 | #endif /* _LINUX_LANDLOCK_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/lsm.h created+92| ... | @@ -0,0 +1,92 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Linux Security Modules (LSM) - User space API | ||
| 4 | * | ||
| 5 | * Copyright (C) 2022 Casey Schaufler <casey@schaufler-ca.com> | ||
| 6 | * Copyright (C) 2022 Intel Corporation | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_LSM_H | ||
| 10 | #define _LINUX_LSM_H | ||
| 11 | |||
| 12 | #include <linux/stddef.h> | ||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/unistd.h> | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct lsm_ctx - LSM context information | ||
| 18 | * @id: the LSM id number, see LSM_ID_XXX | ||
| 19 | * @flags: LSM specific flags | ||
| 20 | * @len: length of the lsm_ctx struct, @ctx and any other data or padding | ||
| 21 | * @ctx_len: the size of @ctx | ||
| 22 | * @ctx: the LSM context value | ||
| 23 | * | ||
| 24 | * The @len field MUST be equal to the size of the lsm_ctx struct | ||
| 25 | * plus any additional padding and/or data placed after @ctx. | ||
| 26 | * | ||
| 27 | * In all cases @ctx_len MUST be equal to the length of @ctx. | ||
| 28 | * If @ctx is a string value it should be nul terminated with | ||
| 29 | * @ctx_len equal to `strlen(@ctx) + 1`. Binary values are | ||
| 30 | * supported. | ||
| 31 | * | ||
| 32 | * The @flags and @ctx fields SHOULD only be interpreted by the | ||
| 33 | * LSM specified by @id; they MUST be set to zero/0 when not used. | ||
| 34 | */ | ||
| 35 | struct lsm_ctx { | ||
| 36 | 	__u64 id; | ||
| 37 | 	__u64 flags; | ||
| 38 | 	__u64 len; | ||
| 39 | 	__u64 ctx_len; | ||
| 40 | 	__u8 ctx[] __counted_by(ctx_len); | ||
| 41 | }; | ||
| 42 | |||
| 43 | /* | ||
| 44 | * ID tokens to identify Linux Security Modules (LSMs) | ||
| 45 | * | ||
| 46 | * These token values are used to uniquely identify specific LSMs | ||
| 47 | * in the kernel as well as in the kernel's LSM userspace API. | ||
| 48 | * | ||
| 49 | * A value of zero/0 is considered undefined and should not be used | ||
| 50 | * outside the kernel. Values 1-99 are reserved for potential | ||
| 51 | * future use. | ||
| 52 | */ | ||
| 53 | #define LSM_ID_UNDEF		0 | ||
| 54 | #define LSM_ID_CAPABILITY	100 | ||
| 55 | #define LSM_ID_SELINUX		101 | ||
| 56 | #define LSM_ID_SMACK		102 | ||
| 57 | #define LSM_ID_TOMOYO		103 | ||
| 58 | #define LSM_ID_APPARMOR		104 | ||
| 59 | #define LSM_ID_YAMA		105 | ||
| 60 | #define LSM_ID_LOADPIN		106 | ||
| 61 | #define LSM_ID_SAFESETID	107 | ||
| 62 | #define LSM_ID_LOCKDOWN		108 | ||
| 63 | #define LSM_ID_BPF		109 | ||
| 64 | #define LSM_ID_LANDLOCK		110 | ||
| 65 | #define LSM_ID_IMA		111 | ||
| 66 | #define LSM_ID_EVM		112 | ||
| 67 | |||
| 68 | /* | ||
| 69 | * LSM_ATTR_XXX definitions identify different LSM attributes | ||
| 70 | * which are used in the kernel's LSM userspace API. Support | ||
| 71 | * for these attributes vary across the different LSMs. None | ||
| 72 | * are required. | ||
| 73 | * | ||
| 74 | * A value of zero/0 is considered undefined and should not be used | ||
| 75 | * outside the kernel. Values 1-99 are reserved for potential | ||
| 76 | * future use. | ||
| 77 | */ | ||
| 78 | #define LSM_ATTR_UNDEF		0 | ||
| 79 | #define LSM_ATTR_CURRENT	100 | ||
| 80 | #define LSM_ATTR_EXEC		101 | ||
| 81 | #define LSM_ATTR_FSCREATE	102 | ||
| 82 | #define LSM_ATTR_KEYCREATE	103 | ||
| 83 | #define LSM_ATTR_PREV		104 | ||
| 84 | #define LSM_ATTR_SOCKCREATE	105 | ||
| 85 | |||
| 86 | /* | ||
| 87 | * LSM_FLAG_XXX definitions identify special handling instructions | ||
| 88 | * for the API. | ||
| 89 | */ | ||
| 90 | #define LSM_FLAG_SINGLE	0x0001 | ||
| 91 | |||
| 92 | #endif /* _LINUX_LSM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/magic.h+2| ... | @@ -37,6 +37,7 @@ | ... | @@ -37,6 +37,7 @@ |
| 37 | #define HOSTFS_SUPER_MAGIC	0x00c0ffee | 37 | #define HOSTFS_SUPER_MAGIC	0x00c0ffee |
| 38 | #define OVERLAYFS_SUPER_MAGIC	0x794c7630 | 38 | #define OVERLAYFS_SUPER_MAGIC	0x794c7630 |
| 39 | #define FUSE_SUPER_MAGIC	0x65735546 | 39 | #define FUSE_SUPER_MAGIC	0x65735546 |
| 40 | #define BCACHEFS_SUPER_MAGIC	0xca451a4e | ||
| 40 | 41 | ||
| 41 | #define MINIX_SUPER_MAGIC	0x137F		/* minix v1 fs, 14 char names */ | 42 | #define MINIX_SUPER_MAGIC	0x137F		/* minix v1 fs, 14 char names */ |
| 42 | #define MINIX_SUPER_MAGIC2	0x138F		/* minix v1 fs, 30 char names */ | 43 | #define MINIX_SUPER_MAGIC2	0x138F		/* minix v1 fs, 30 char names */ |
| ... | @@ -101,5 +102,6 @@ | ... | @@ -101,5 +102,6 @@ |
| 101 | #define DMA_BUF_MAGIC		0x444d4142	/* "DMAB" */ | 102 | #define DMA_BUF_MAGIC		0x444d4142	/* "DMAB" */ |
| 102 | #define DEVMEM_MAGIC		0x454d444d	/* "DMEM" */ | 103 | #define DEVMEM_MAGIC		0x454d444d	/* "DMEM" */ |
| 103 | #define SECRETMEM_MAGIC		0x5345434d	/* "SECM" */ | 104 | #define SECRETMEM_MAGIC		0x5345434d	/* "SECM" */ |
| 105 | #define PID_FS_MAGIC		0x50494446	/* "PIDF" */ | ||
| 104 | 106 | ||
| 105 | #endif /* __LINUX_MAGIC_H__ */ | 107 | #endif /* __LINUX_MAGIC_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mctp.h+32| ... | @@ -50,7 +50,14 @@ struct sockaddr_mctp_ext { | ... | @@ -50,7 +50,14 @@ struct sockaddr_mctp_ext { |
| 50 | 50 | ||
| 51 | #define SIOCMCTPALLOCTAG	(SIOCPROTOPRIVATE + 0) | 51 | #define SIOCMCTPALLOCTAG	(SIOCPROTOPRIVATE + 0) |
| 52 | #define SIOCMCTPDROPTAG		(SIOCPROTOPRIVATE + 1) | 52 | #define SIOCMCTPDROPTAG		(SIOCPROTOPRIVATE + 1) |
| 53 | #define SIOCMCTPALLOCTAG2	(SIOCPROTOPRIVATE + 2) | ||
| 54 | #define SIOCMCTPDROPTAG2	(SIOCPROTOPRIVATE + 3) | ||
| 53 | 55 | ||
| 56 | /* Deprecated: use mctp_ioc_tag_ctl2 / TAG2 ioctls instead, which defines the | ||
| 57 | * MCTP network ID as part of the allocated tag. Using this assumes the default | ||
| 58 | * net ID for allocated tags, which may not give correct behaviour on system | ||
| 59 | * with multiple networks configured. | ||
| 60 | */ | ||
| 54 | struct mctp_ioc_tag_ctl { | 61 | struct mctp_ioc_tag_ctl { |
| 55 | 	mctp_eid_t	peer_addr; | 62 | 	mctp_eid_t	peer_addr; |
| 56 | 63 | ||
| ... | @@ -65,4 +72,29 @@ struct mctp_ioc_tag_ctl { | ... | @@ -65,4 +72,29 @@ struct mctp_ioc_tag_ctl { |
| 65 | 	__u16		flags; | 72 | 	__u16		flags; |
| 66 | }; | 73 | }; |
| 67 | 74 | ||
| 75 | struct mctp_ioc_tag_ctl2 { | ||
| 76 | 	/* Peer details: network ID, peer EID, local EID. All set by the | ||
| 77 | 	 * caller. | ||
| 78 | 	 * | ||
| 79 | 	 * Local EID must be MCTP_ADDR_NULL or MCTP_ADDR_ANY in current | ||
| 80 | 	 * kernels. | ||
| 81 | 	 */ | ||
| 82 | 	unsigned int	net; | ||
| 83 | 	mctp_eid_t	peer_addr; | ||
| 84 | 	mctp_eid_t	local_addr; | ||
| 85 | |||
| 86 | 	/* Set by caller, but no flags defined currently. Must be 0 */ | ||
| 87 | 	__u16		flags; | ||
| 88 | |||
| 89 | 	/* For SIOCMCTPALLOCTAG2: must be passed as zero, kernel will | ||
| 90 | 	 * populate with the allocated tag value. Returned tag value will | ||
| 91 | 	 * always have TO and PREALLOC set. | ||
| 92 | 	 * | ||
| 93 | 	 * For SIOCMCTPDROPTAG2: userspace provides tag value to drop, from | ||
| 94 | 	 * a prior SIOCMCTPALLOCTAG2 call (and so must have TO and PREALLOC set). | ||
| 95 | 	 */ | ||
| 96 | 	__u8		tag; | ||
| 97 | |||
| 98 | }; | ||
| 99 | |||
| 68 | #endif /* __UAPI_MCTP_H */ | 100 | #endif /* __UAPI_MCTP_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mdio.h+45-1| ... | @@ -82,6 +82,8 @@ | ... | @@ -82,6 +82,8 @@ |
| 82 | #define MDIO_AN_10BT1_AN_CTRL	526	/* 10BASE-T1 AN control register */ | 82 | #define MDIO_AN_10BT1_AN_CTRL	526	/* 10BASE-T1 AN control register */ |
| 83 | #define MDIO_AN_10BT1_AN_STAT	527	/* 10BASE-T1 AN status register */ | 83 | #define MDIO_AN_10BT1_AN_STAT	527	/* 10BASE-T1 AN status register */ |
| 84 | #define MDIO_PMA_PMD_BT1_CTRL	2100	/* BASE-T1 PMA/PMD control register */ | 84 | #define MDIO_PMA_PMD_BT1_CTRL	2100	/* BASE-T1 PMA/PMD control register */ |
| 85 | #define MDIO_PCS_1000BT1_CTRL	2304	/* 1000BASE-T1 PCS control register */ | ||
| 86 | #define MDIO_PCS_1000BT1_STAT	2305	/* 1000BASE-T1 PCS status register */ | ||
| 85 | 87 | ||
| 86 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ | 88 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ |
| 87 | #define MDIO_PMA_LASI_RXCTRL	0x9000	/* RX_ALARM control */ | 89 | #define MDIO_PMA_LASI_RXCTRL	0x9000	/* RX_ALARM control */ |
| ... | @@ -136,6 +138,8 @@ | ... | @@ -136,6 +138,8 @@ |
| 136 | #define MDIO_PMA_SPEED_1000		0x0010	/* 1000M capable */ | 138 | #define MDIO_PMA_SPEED_1000		0x0010	/* 1000M capable */ |
| 137 | #define MDIO_PMA_SPEED_100		0x0020	/* 100M capable */ | 139 | #define MDIO_PMA_SPEED_100		0x0020	/* 100M capable */ |
| 138 | #define MDIO_PMA_SPEED_10		0x0040	/* 10M capable */ | 140 | #define MDIO_PMA_SPEED_10		0x0040	/* 10M capable */ |
| 141 | #define MDIO_PMA_SPEED_2_5G		0x2000	/* 2.5G capable */ | ||
| 142 | #define MDIO_PMA_SPEED_5G		0x4000	/* 5G capable */ | ||
| 139 | #define MDIO_PCS_SPEED_10P2B		0x0002	/* 10PASS-TS/2BASE-TL capable */ | 143 | #define MDIO_PCS_SPEED_10P2B		0x0002	/* 10PASS-TS/2BASE-TL capable */ |
| 140 | #define MDIO_PCS_SPEED_2_5G		0x0040	/* 2.5G capable */ | 144 | #define MDIO_PCS_SPEED_2_5G		0x0040	/* 2.5G capable */ |
| 141 | #define MDIO_PCS_SPEED_5G		0x0080	/* 5G capable */ | 145 | #define MDIO_PCS_SPEED_5G		0x0080	/* 5G capable */ |
| ... | @@ -231,6 +235,30 @@ | ... | @@ -231,6 +235,30 @@ |
| 231 | #define MDIO_PMA_EXTABLE_BT1		0x0800	/* BASE-T1 ability */ | 235 | #define MDIO_PMA_EXTABLE_BT1		0x0800	/* BASE-T1 ability */ |
| 232 | #define MDIO_PMA_EXTABLE_NBT		0x4000 /* 2.5/5GBASE-T ability */ | 236 | #define MDIO_PMA_EXTABLE_NBT		0x4000 /* 2.5/5GBASE-T ability */ |
| 233 | 237 | ||
| 238 | /* AN Clause 73 linkword */ | ||
| 239 | #define MDIO_AN_C73_0_S_MASK		GENMASK(4, 0) | ||
| 240 | #define MDIO_AN_C73_0_E_MASK		GENMASK(9, 5) | ||
| 241 | #define MDIO_AN_C73_0_PAUSE		BIT(10) | ||
| 242 | #define MDIO_AN_C73_0_ASM_DIR		BIT(11) | ||
| 243 | #define MDIO_AN_C73_0_C2		BIT(12) | ||
| 244 | #define MDIO_AN_C73_0_RF		BIT(13) | ||
| 245 | #define MDIO_AN_C73_0_ACK		BIT(14) | ||
| 246 | #define MDIO_AN_C73_0_NP		BIT(15) | ||
| 247 | #define MDIO_AN_C73_1_T_MASK		GENMASK(4, 0) | ||
| 248 | #define MDIO_AN_C73_1_1000BASE_KX	BIT(5) | ||
| 249 | #define MDIO_AN_C73_1_10GBASE_KX4	BIT(6) | ||
| 250 | #define MDIO_AN_C73_1_10GBASE_KR	BIT(7) | ||
| 251 | #define MDIO_AN_C73_1_40GBASE_KR4	BIT(8) | ||
| 252 | #define MDIO_AN_C73_1_40GBASE_CR4	BIT(9) | ||
| 253 | #define MDIO_AN_C73_1_100GBASE_CR10	BIT(10) | ||
| 254 | #define MDIO_AN_C73_1_100GBASE_KP4	BIT(11) | ||
| 255 | #define MDIO_AN_C73_1_100GBASE_KR4	BIT(12) | ||
| 256 | #define MDIO_AN_C73_1_100GBASE_CR4	BIT(13) | ||
| 257 | #define MDIO_AN_C73_1_25GBASE_R_S	BIT(14) | ||
| 258 | #define MDIO_AN_C73_1_25GBASE_R		BIT(15) | ||
| 259 | #define MDIO_AN_C73_2_2500BASE_KX	BIT(0) | ||
| 260 | #define MDIO_AN_C73_2_5GBASE_KR		BIT(1) | ||
| 261 | |||
| 234 | /* PHY XGXS lane state register. */ | 262 | /* PHY XGXS lane state register. */ |
| 235 | #define MDIO_PHYXS_LNSTAT_SYNC0		0x0001 | 263 | #define MDIO_PHYXS_LNSTAT_SYNC0		0x0001 |
| 236 | #define MDIO_PHYXS_LNSTAT_SYNC1		0x0002 | 264 | #define MDIO_PHYXS_LNSTAT_SYNC1		0x0002 |
| ... | @@ -308,6 +336,8 @@ | ... | @@ -308,6 +336,8 @@ |
| 308 | #define MDIO_PCS_10T1L_CTRL_RESET	0x8000	/* PCS reset */ | 336 | #define MDIO_PCS_10T1L_CTRL_RESET	0x8000	/* PCS reset */ |
| 309 | 337 | ||
| 310 | /* BASE-T1 PMA/PMD extended ability register. */ | 338 | /* BASE-T1 PMA/PMD extended ability register. */ |
| 339 | #define MDIO_PMA_PMD_BT1_B100_ABLE	0x0001	/* 100BASE-T1 Ability */ | ||
| 340 | #define MDIO_PMA_PMD_BT1_B1000_ABLE	0x0002	/* 1000BASE-T1 Ability */ | ||
| 311 | #define MDIO_PMA_PMD_BT1_B10L_ABLE	0x0004	/* 10BASE-T1L Ability */ | 341 | #define MDIO_PMA_PMD_BT1_B10L_ABLE	0x0004	/* 10BASE-T1L Ability */ |
| 312 | 342 | ||
| 313 | /* BASE-T1 auto-negotiation advertisement register [15:0] */ | 343 | /* BASE-T1 auto-negotiation advertisement register [15:0] */ |
| ... | @@ -320,6 +350,8 @@ | ... | @@ -320,6 +350,8 @@ |
| 320 | 350 | ||
| 321 | /* BASE-T1 auto-negotiation advertisement register [31:16] */ | 351 | /* BASE-T1 auto-negotiation advertisement register [31:16] */ |
| 322 | #define MDIO_AN_T1_ADV_M_B10L		0x4000	/* device is compatible with 10BASE-T1L */ | 352 | #define MDIO_AN_T1_ADV_M_B10L		0x4000	/* device is compatible with 10BASE-T1L */ |
| 353 | #define MDIO_AN_T1_ADV_M_1000BT1	0x0080	/* advertise 1000BASE-T1 */ | ||
| 354 | #define MDIO_AN_T1_ADV_M_100BT1		0x0020	/* advertise 100BASE-T1 */ | ||
| 323 | #define MDIO_AN_T1_ADV_M_MST		0x0010	/* advertise master preference */ | 355 | #define MDIO_AN_T1_ADV_M_MST		0x0010	/* advertise master preference */ |
| 324 | 356 | ||
| 325 | /* BASE-T1 auto-negotiation advertisement register [47:32] */ | 357 | /* BASE-T1 auto-negotiation advertisement register [47:32] */ |
| ... | @@ -349,7 +381,19 @@ | ... | @@ -349,7 +381,19 @@ |
| 349 | #define MDIO_AN_10BT1_AN_STAT_LPA_EEE_T1L	0x4000 /* 10BASE-T1L LP EEE ability advertisement */ | 381 | #define MDIO_AN_10BT1_AN_STAT_LPA_EEE_T1L	0x4000 /* 10BASE-T1L LP EEE ability advertisement */ |
| 350 | 382 | ||
| 351 | /* BASE-T1 PMA/PMD control register */ | 383 | /* BASE-T1 PMA/PMD control register */ |
| 352 | #define MDIO_PMA_PMD_BT1_CTRL_CFG_MST	0x4000 /* MASTER-SLAVE config value */ | 384 | #define MDIO_PMA_PMD_BT1_CTRL_STRAP		0x000F /* Type selection (Strap) */ |
| 385 | #define MDIO_PMA_PMD_BT1_CTRL_STRAP_B1000	0x0001 /* Select 1000BASE-T1 */ | ||
| 386 | #define MDIO_PMA_PMD_BT1_CTRL_CFG_MST		0x4000 /* MASTER-SLAVE config value */ | ||
| 387 | |||
| 388 | /* 1000BASE-T1 PCS control register */ | ||
| 389 | #define MDIO_PCS_1000BT1_CTRL_LOW_POWER		0x0800 /* Low power mode */ | ||
| 390 | #define MDIO_PCS_1000BT1_CTRL_DISABLE_TX	0x4000 /* Global PMA transmit disable */ | ||
| 391 | #define MDIO_PCS_1000BT1_CTRL_RESET		0x8000 /* Software reset value */ | ||
| 392 | |||
| 393 | /* 1000BASE-T1 PCS status register */ | ||
| 394 | #define MDIO_PCS_1000BT1_STAT_LINK	0x0004 /* PCS Link is up */ | ||
| 395 | #define MDIO_PCS_1000BT1_STAT_FAULT	0x0080 /* There is a fault condition */ | ||
| 396 | |||
| 353 | 397 | ||
| 354 | /* EEE Supported/Advertisement/LP Advertisement registers. | 398 | /* EEE Supported/Advertisement/LP Advertisement registers. |
| 355 | * | 399 | * |
lib/libc/include/any-linux-any/linux/media-bus-format.h+11-1| ... | @@ -34,7 +34,7 @@ | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | ||
| 35 | #define MEDIA_BUS_FMT_FIXED			0x0001 | 35 | #define MEDIA_BUS_FMT_FIXED			0x0001 |
| 36 | 36 | ||
| 37 | /* RGB - next is	0x1025 */ | 37 | /* RGB - next is	0x1026 */ |
| 38 | #define MEDIA_BUS_FMT_RGB444_1X12		0x1016 | 38 | #define MEDIA_BUS_FMT_RGB444_1X12		0x1016 |
| 39 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001 | 39 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001 |
| 40 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002 | 40 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002 |
| ... | @@ -46,6 +46,7 @@ | ... | @@ -46,6 +46,7 @@ |
| 46 | #define MEDIA_BUS_FMT_RGB565_2X8_BE		0x1007 | 46 | #define MEDIA_BUS_FMT_RGB565_2X8_BE		0x1007 |
| 47 | #define MEDIA_BUS_FMT_RGB565_2X8_LE		0x1008 | 47 | #define MEDIA_BUS_FMT_RGB565_2X8_LE		0x1008 |
| 48 | #define MEDIA_BUS_FMT_RGB666_1X18		0x1009 | 48 | #define MEDIA_BUS_FMT_RGB666_1X18		0x1009 |
| 49 | #define MEDIA_BUS_FMT_RGB666_2X9_BE		0x1025 | ||
| 49 | #define MEDIA_BUS_FMT_BGR666_1X18		0x1023 | 50 | #define MEDIA_BUS_FMT_BGR666_1X18		0x1023 |
| 50 | #define MEDIA_BUS_FMT_RBG888_1X24		0x100e | 51 | #define MEDIA_BUS_FMT_RBG888_1X24		0x100e |
| 51 | #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI	0x1015 | 52 | #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI	0x1015 |
| ... | @@ -173,4 +174,13 @@ | ... | @@ -173,4 +174,13 @@ |
| 173 | */ | 174 | */ |
| 174 | #define MEDIA_BUS_FMT_METADATA_FIXED		0x7001 | 175 | #define MEDIA_BUS_FMT_METADATA_FIXED		0x7001 |
| 175 | 176 | ||
| 177 | /* Generic line based metadata formats for serial buses. Next is 0x8008. */ | ||
| 178 | #define MEDIA_BUS_FMT_META_8			0x8001 | ||
| 179 | #define MEDIA_BUS_FMT_META_10			0x8002 | ||
| 180 | #define MEDIA_BUS_FMT_META_12			0x8003 | ||
| 181 | #define MEDIA_BUS_FMT_META_14			0x8004 | ||
| 182 | #define MEDIA_BUS_FMT_META_16			0x8005 | ||
| 183 | #define MEDIA_BUS_FMT_META_20			0x8006 | ||
| 184 | #define MEDIA_BUS_FMT_META_24			0x8007 | ||
| 185 | |||
| 176 | #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ | 186 | #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/media.h+14-14| ... | @@ -140,8 +140,8 @@ struct media_device_info { | ... | @@ -140,8 +140,8 @@ struct media_device_info { |
| 140 | #define MEDIA_ENT_F_DV_ENCODER			(MEDIA_ENT_F_BASE + 0x6002) | 140 | #define MEDIA_ENT_F_DV_ENCODER			(MEDIA_ENT_F_BASE + 0x6002) |
| 141 | 141 | ||
| 142 | /* Entity flags */ | 142 | /* Entity flags */ |
| 143 | #define MEDIA_ENT_FL_DEFAULT			(1 << 0) | 143 | #define MEDIA_ENT_FL_DEFAULT			(1U << 0) |
| 144 | #define MEDIA_ENT_FL_CONNECTOR			(1 << 1) | 144 | #define MEDIA_ENT_FL_CONNECTOR			(1U << 1) |
| 145 | 145 | ||
| 146 | /* OR with the entity id value to find the next entity */ | 146 | /* OR with the entity id value to find the next entity */ |
| 147 | #define MEDIA_ENT_ID_FLAG_NEXT			(1U << 31) | 147 | #define MEDIA_ENT_ID_FLAG_NEXT			(1U << 31) |
| ... | @@ -203,9 +203,9 @@ struct media_entity_desc { | ... | @@ -203,9 +203,9 @@ struct media_entity_desc { |
| 203 | 	}; | 203 | 	}; |
| 204 | }; | 204 | }; |
| 205 | 205 | ||
| 206 | #define MEDIA_PAD_FL_SINK			(1 << 0) | 206 | #define MEDIA_PAD_FL_SINK			(1U << 0) |
| 207 | #define MEDIA_PAD_FL_SOURCE			(1 << 1) | 207 | #define MEDIA_PAD_FL_SOURCE			(1U << 1) |
| 208 | #define MEDIA_PAD_FL_MUST_CONNECT		(1 << 2) | 208 | #define MEDIA_PAD_FL_MUST_CONNECT		(1U << 2) |
| 209 | 209 | ||
| 210 | struct media_pad_desc { | 210 | struct media_pad_desc { |
| 211 | 	__u32 entity;		/* entity ID */ | 211 | 	__u32 entity;		/* entity ID */ |
| ... | @@ -214,14 +214,14 @@ struct media_pad_desc { | ... | @@ -214,14 +214,14 @@ struct media_pad_desc { |
| 214 | 	__u32 reserved[2]; | 214 | 	__u32 reserved[2]; |
| 215 | }; | 215 | }; |
| 216 | 216 | ||
| 217 | #define MEDIA_LNK_FL_ENABLED			(1 << 0) | 217 | #define MEDIA_LNK_FL_ENABLED			(1U << 0) |
| 218 | #define MEDIA_LNK_FL_IMMUTABLE			(1 << 1) | 218 | #define MEDIA_LNK_FL_IMMUTABLE			(1U << 1) |
| 219 | #define MEDIA_LNK_FL_DYNAMIC			(1 << 2) | 219 | #define MEDIA_LNK_FL_DYNAMIC			(1U << 2) |
| 220 | 220 | ||
| 221 | #define MEDIA_LNK_FL_LINK_TYPE			(0xf << 28) | 221 | #define MEDIA_LNK_FL_LINK_TYPE			(0xf << 28) |
| 222 | # define MEDIA_LNK_FL_DATA_LINK		(0 << 28) | 222 | # define MEDIA_LNK_FL_DATA_LINK		(0U << 28) |
| 223 | # define MEDIA_LNK_FL_INTERFACE_LINK		(1 << 28) | 223 | # define MEDIA_LNK_FL_INTERFACE_LINK		(1U << 28) |
| 224 | # define MEDIA_LNK_FL_ANCILLARY_LINK		(2 << 28) | 224 | # define MEDIA_LNK_FL_ANCILLARY_LINK		(2U << 28) |
| 225 | 225 | ||
| 226 | struct media_link_desc { | 226 | struct media_link_desc { |
| 227 | 	struct media_pad_desc source; | 227 | 	struct media_pad_desc source; |
| ... | @@ -276,7 +276,7 @@ struct media_links_enum { | ... | @@ -276,7 +276,7 @@ struct media_links_enum { |
| 276 | * struct media_device_info. | 276 | * struct media_device_info. |
| 277 | */ | 277 | */ |
| 278 | #define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) \ | 278 | #define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) \ |
| 279 | 	((media_version) >= ((4 << 16) | (19 << 8) | 0)) | 279 | 	((media_version) >= ((4U << 16) | (19U << 8) | 0U)) |
| 280 | 280 | ||
| 281 | struct media_v2_entity { | 281 | struct media_v2_entity { |
| 282 | 	__u32 id; | 282 | 	__u32 id; |
| ... | @@ -311,7 +311,7 @@ struct media_v2_interface { | ... | @@ -311,7 +311,7 @@ struct media_v2_interface { |
| 311 | * struct media_device_info. | 311 | * struct media_device_info. |
| 312 | */ | 312 | */ |
| 313 | #define MEDIA_V2_PAD_HAS_INDEX(media_version) \ | 313 | #define MEDIA_V2_PAD_HAS_INDEX(media_version) \ |
| 314 | 	((media_version) >= ((4 << 16) | (19 << 8) | 0)) | 314 | 	((media_version) >= ((4U << 16) | (19U << 8) | 0U)) |
| 315 | 315 | ||
| 316 | struct media_v2_pad { | 316 | struct media_v2_pad { |
| 317 | 	__u32 id; | 317 | 	__u32 id; |
| ... | @@ -414,7 +414,7 @@ struct media_v2_topology { | ... | @@ -414,7 +414,7 @@ struct media_v2_topology { |
| 414 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) | 414 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) |
| 415 | 415 | ||
| 416 | /* Obsolete symbol for media_version, no longer used in the kernel */ | 416 | /* Obsolete symbol for media_version, no longer used in the kernel */ |
| 417 | #define MEDIA_API_VERSION			((0 << 16) | (1 << 8) | 0) | 417 | #define MEDIA_API_VERSION			((0U << 16) | (1U << 8) | 0U) |
| 418 | 418 | ||
| 419 | 419 | ||
| 420 | #endif /* __LINUX_MEDIA_H */ | 420 | #endif /* __LINUX_MEDIA_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mei.h+10-10| ... | @@ -7,15 +7,15 @@ | ... | @@ -7,15 +7,15 @@ |
| 7 | #ifndef _LINUX_MEI_H | 7 | #ifndef _LINUX_MEI_H |
| 8 | #define _LINUX_MEI_H | 8 | #define _LINUX_MEI_H |
| 9 | 9 | ||
| 10 | #include <linux/uuid.h> | 10 | #include <linux/mei_uuid.h> |
| 11 | 11 | ||
| 12 | /* | 12 | /* |
| 13 | * This IOCTL is used to associate the current file descriptor with a | 13 | * This IOCTL is used to associate the current file descriptor with a |
| 14 | * FW Client (given by UUID). This opens a communication channel | 14 | * FW Client (given by UUID). This opens a communication channel |
| 15 | * between a host client and a FW client. From this point every read and write | 15 | * between a host client and a FW client. From this point every read and write |
| 16 | * will communicate with the associated FW client. | 16 | * will communicate with the associated FW client. |
| 17 | * Only in close() (file_operation release()) the communication between | 17 | * Only in close() (file_operation release()) is the communication between |
| 18 | * the clients is disconnected | 18 | * the clients disconnected. |
| 19 | * | 19 | * |
| 20 | * The IOCTL argument is a struct with a union that contains | 20 | * The IOCTL argument is a struct with a union that contains |
| 21 | * the input parameter and the output parameter for this IOCTL. | 21 | * the input parameter and the output parameter for this IOCTL. |
| ... | @@ -51,7 +51,7 @@ struct mei_connect_client_data { | ... | @@ -51,7 +51,7 @@ struct mei_connect_client_data { |
| 51 | * DOC: set and unset event notification for a connected client | 51 | * DOC: set and unset event notification for a connected client |
| 52 | * | 52 | * |
| 53 | * The IOCTL argument is 1 for enabling event notification and 0 for | 53 | * The IOCTL argument is 1 for enabling event notification and 0 for |
| 54 | * disabling the service | 54 | * disabling the service. |
| 55 | * Return: -EOPNOTSUPP if the devices doesn't support the feature | 55 | * Return: -EOPNOTSUPP if the devices doesn't support the feature |
| 56 | */ | 56 | */ |
| 57 | #define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32) | 57 | #define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32) |
| ... | @@ -59,8 +59,8 @@ struct mei_connect_client_data { | ... | @@ -59,8 +59,8 @@ struct mei_connect_client_data { |
| 59 | /** | 59 | /** |
| 60 | * DOC: retrieve notification | 60 | * DOC: retrieve notification |
| 61 | * | 61 | * |
| 62 | * The IOCTL output argument is 1 if an event was is pending and 0 otherwise | 62 | * The IOCTL output argument is 1 if an event was pending and 0 otherwise. |
| 63 | * the ioctl has to be called in order to acknowledge pending event | 63 | * The ioctl has to be called in order to acknowledge pending event. |
| 64 | * | 64 | * |
| 65 | * Return: -EOPNOTSUPP if the devices doesn't support the feature | 65 | * Return: -EOPNOTSUPP if the devices doesn't support the feature |
| 66 | */ | 66 | */ |
| ... | @@ -98,16 +98,16 @@ struct mei_connect_client_data_vtag { | ... | @@ -98,16 +98,16 @@ struct mei_connect_client_data_vtag { |
| 98 | * FW Client (given by UUID), and virtual tag (vtag). | 98 | * FW Client (given by UUID), and virtual tag (vtag). |
| 99 | * The IOCTL opens a communication channel between a host client and | 99 | * The IOCTL opens a communication channel between a host client and |
| 100 | * a FW client on a tagged channel. From this point on, every read | 100 | * a FW client on a tagged channel. From this point on, every read |
| 101 | * and write will communicate with the associated FW client with | 101 | * and write will communicate with the associated FW client |
| 102 | * on the tagged channel. | 102 | * on the tagged channel. |
| 103 | * Upone close() the communication is terminated. | 103 | * Upon close() the communication is terminated. |
| 104 | * | 104 | * |
| 105 | * The IOCTL argument is a struct with a union that contains | 105 | * The IOCTL argument is a struct with a union that contains |
| 106 | * the input parameter and the output parameter for this IOCTL. | 106 | * the input parameter and the output parameter for this IOCTL. |
| 107 | * | 107 | * |
| 108 | * The input parameter is UUID of the FW Client, a vtag [0,255] | 108 | * The input parameter is UUID of the FW Client, a vtag [0,255]. |
| 109 | * The output parameter is the properties of the FW client | 109 | * The output parameter is the properties of the FW client |
| 110 | * (FW protocool version and max message size). | 110 | * (FW protocol version and max message size). |
| 111 | * | 111 | * |
| 112 | * Clients that do not support tagged connection | 112 | * Clients that do not support tagged connection |
| 113 | * will respond with -EOPNOTSUPP. | 113 | * will respond with -EOPNOTSUPP. |
lib/libc/include/any-linux-any/linux/mei_uuid.h created+29| ... | @@ -0,0 +1,29 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * MEI UUID definition | ||
| 4 | * | ||
| 5 | * Copyright (C) 2010, Intel Corp. | ||
| 6 | *	Huang Ying <ying.huang@intel.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_MEI_UUID_H_ | ||
| 10 | #define _LINUX_MEI_UUID_H_ | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 14 | typedef struct { | ||
| 15 | 	__u8 b[16]; | ||
| 16 | } uuid_le; | ||
| 17 | |||
| 18 | #define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)		\ | ||
| 19 | ((uuid_le)								\ | ||
| 20 | {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ | ||
| 21 | (b) & 0xff, ((b) >> 8) & 0xff,					\ | ||
| 22 | (c) & 0xff, ((c) >> 8) & 0xff,					\ | ||
| 23 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) | ||
| 24 | |||
| 25 | #define NULL_UUID_LE							\ | ||
| 26 | 	UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,	\ | ||
| 27 | 	 0x00, 0x00, 0x00, 0x00) | ||
| 28 | |||
| 29 | #endif /* _LINUX_MEI_UUID_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mempolicy.h+2-1| ... | @@ -23,6 +23,7 @@ enum { | ... | @@ -23,6 +23,7 @@ enum { |
| 23 | 	MPOL_INTERLEAVE, | 23 | 	MPOL_INTERLEAVE, |
| 24 | 	MPOL_LOCAL, | 24 | 	MPOL_LOCAL, |
| 25 | 	MPOL_PREFERRED_MANY, | 25 | 	MPOL_PREFERRED_MANY, |
| 26 | 	MPOL_WEIGHTED_INTERLEAVE, | ||
| 26 | 	MPOL_MAX,	/* always last member of enum */ | 27 | 	MPOL_MAX,	/* always last member of enum */ |
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| ... | @@ -48,7 +49,7 @@ enum { | ... | @@ -48,7 +49,7 @@ enum { |
| 48 | #define MPOL_MF_MOVE	 (1<<1)	/* Move pages owned by this process to conform | 49 | #define MPOL_MF_MOVE	 (1<<1)	/* Move pages owned by this process to conform |
| 49 | 				 to policy */ | 50 | 				 to policy */ |
| 50 | #define MPOL_MF_MOVE_ALL (1<<2)	/* Move every page to conform to policy */ | 51 | #define MPOL_MF_MOVE_ALL (1<<2)	/* Move every page to conform to policy */ |
| 51 | #define MPOL_MF_LAZY	 (1<<3)	/* Modifies '_MOVE: lazy migrate on fault */ | 52 | #define MPOL_MF_LAZY	 (1<<3)	/* UNSUPPORTED FLAG: Lazy migrate on fault */ |
| 52 | #define MPOL_MF_INTERNAL (1<<4)	/* Internal flags start here */ | 53 | #define MPOL_MF_INTERNAL (1<<4)	/* Internal flags start here */ |
| 53 | 54 | ||
| 54 | #define MPOL_MF_VALID	(MPOL_MF_STRICT | 	\ | 55 | #define MPOL_MF_VALID	(MPOL_MF_STRICT | 	\ |
lib/libc/include/any-linux-any/linux/mman.h+14| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | ||
| 5 | #include <asm/mman.h> | 5 | #include <asm/mman.h> |
| 6 | #include <asm-generic/hugetlb_encode.h> | 6 | #include <asm-generic/hugetlb_encode.h> |
| 7 | #include <linux/types.h> | ||
| 7 | 8 | ||
| 8 | #define MREMAP_MAYMOVE		1 | 9 | #define MREMAP_MAYMOVE		1 |
| 9 | #define MREMAP_FIXED		2 | 10 | #define MREMAP_FIXED		2 |
| ... | @@ -41,4 +42,17 @@ | ... | @@ -41,4 +42,17 @@ |
| 41 | #define MAP_HUGE_2GB	HUGETLB_FLAG_ENCODE_2GB | 42 | #define MAP_HUGE_2GB	HUGETLB_FLAG_ENCODE_2GB |
| 42 | #define MAP_HUGE_16GB	HUGETLB_FLAG_ENCODE_16GB | 43 | #define MAP_HUGE_16GB	HUGETLB_FLAG_ENCODE_16GB |
| 43 | 44 | ||
| 45 | struct cachestat_range { | ||
| 46 | 	__u64 off; | ||
| 47 | 	__u64 len; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct cachestat { | ||
| 51 | 	__u64 nr_cache; | ||
| 52 | 	__u64 nr_dirty; | ||
| 53 | 	__u64 nr_writeback; | ||
| 54 | 	__u64 nr_evicted; | ||
| 55 | 	__u64 nr_recently_evicted; | ||
| 56 | }; | ||
| 57 | |||
| 44 | #endif /* _LINUX_MMAN_H */ | 58 | #endif /* _LINUX_MMAN_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mount.h+74-2| ... | @@ -74,7 +74,8 @@ | ... | @@ -74,7 +74,8 @@ |
| 74 | #define MOVE_MOUNT_T_AUTOMOUNTS		0x00000020 /* Follow automounts on to path */ | 74 | #define MOVE_MOUNT_T_AUTOMOUNTS		0x00000020 /* Follow automounts on to path */ |
| 75 | #define MOVE_MOUNT_T_EMPTY_PATH		0x00000040 /* Empty to path permitted */ | 75 | #define MOVE_MOUNT_T_EMPTY_PATH		0x00000040 /* Empty to path permitted */ |
| 76 | #define MOVE_MOUNT_SET_GROUP		0x00000100 /* Set sharing group instead */ | 76 | #define MOVE_MOUNT_SET_GROUP		0x00000100 /* Set sharing group instead */ |
| 77 | #define MOVE_MOUNT__MASK		0x00000177 | 77 | #define MOVE_MOUNT_BENEATH		0x00000200 /* Mount beneath top mount */ |
| 78 | #define MOVE_MOUNT__MASK		0x00000377 | ||
| 78 | 79 | ||
| 79 | /* | 80 | /* |
| 80 | * fsopen() flags. | 81 | * fsopen() flags. |
| ... | @@ -99,8 +100,9 @@ enum fsconfig_command { | ... | @@ -99,8 +100,9 @@ enum fsconfig_command { |
| 99 | 	FSCONFIG_SET_PATH	= 3,	/* Set parameter, supplying an object by path */ | 100 | 	FSCONFIG_SET_PATH	= 3,	/* Set parameter, supplying an object by path */ |
| 100 | 	FSCONFIG_SET_PATH_EMPTY	= 4,	/* Set parameter, supplying an object by (empty) path */ | 101 | 	FSCONFIG_SET_PATH_EMPTY	= 4,	/* Set parameter, supplying an object by (empty) path */ |
| 101 | 	FSCONFIG_SET_FD		= 5,	/* Set parameter, supplying an object by fd */ | 102 | 	FSCONFIG_SET_FD		= 5,	/* Set parameter, supplying an object by fd */ |
| 102 | 	FSCONFIG_CMD_CREATE	= 6,	/* Invoke superblock creation */ | 103 | 	FSCONFIG_CMD_CREATE	= 6,	/* Create new or reuse existing superblock */ |
| 103 | 	FSCONFIG_CMD_RECONFIGURE = 7,	/* Invoke superblock reconfiguration */ | 104 | 	FSCONFIG_CMD_RECONFIGURE = 7,	/* Invoke superblock reconfiguration */ |
| 105 | 	FSCONFIG_CMD_CREATE_EXCL = 8,	/* Create new superblock, fail if reusing existing superblock */ | ||
| 104 | }; | 106 | }; |
| 105 | 107 | ||
| 106 | /* | 108 | /* |
| ... | @@ -136,4 +138,74 @@ struct mount_attr { | ... | @@ -136,4 +138,74 @@ struct mount_attr { |
| 136 | /* List of all mount_attr versions. */ | 138 | /* List of all mount_attr versions. */ |
| 137 | #define MOUNT_ATTR_SIZE_VER0	32 /* sizeof first published struct */ | 139 | #define MOUNT_ATTR_SIZE_VER0	32 /* sizeof first published struct */ |
| 138 | 140 | ||
| 141 | |||
| 142 | /* | ||
| 143 | * Structure for getting mount/superblock/filesystem info with statmount(2). | ||
| 144 | * | ||
| 145 | * The interface is similar to statx(2): individual fields or groups can be | ||
| 146 | * selected with the @mask argument of statmount(). Kernel will set the @mask | ||
| 147 | * field according to the supported fields. | ||
| 148 | * | ||
| 149 | * If string fields are selected, then the caller needs to pass a buffer that | ||
| 150 | * has space after the fixed part of the structure. Nul terminated strings are | ||
| 151 | * copied there and offsets relative to @str are stored in the relevant fields. | ||
| 152 | * If the buffer is too small, then EOVERFLOW is returned. The actually used | ||
| 153 | * size is returned in @size. | ||
| 154 | */ | ||
| 155 | struct statmount { | ||
| 156 | 	__u32 size;		/* Total size, including strings */ | ||
| 157 | 	__u32 __spare1; | ||
| 158 | 	__u64 mask;		/* What results were written */ | ||
| 159 | 	__u32 sb_dev_major;	/* Device ID */ | ||
| 160 | 	__u32 sb_dev_minor; | ||
| 161 | 	__u64 sb_magic;		/* ..._SUPER_MAGIC */ | ||
| 162 | 	__u32 sb_flags;		/* SB_{RDONLY,SYNCHRONOUS,DIRSYNC,LAZYTIME} */ | ||
| 163 | 	__u32 fs_type;		/* [str] Filesystem type */ | ||
| 164 | 	__u64 mnt_id;		/* Unique ID of mount */ | ||
| 165 | 	__u64 mnt_parent_id;	/* Unique ID of parent (for root == mnt_id) */ | ||
| 166 | 	__u32 mnt_id_old;	/* Reused IDs used in proc/.../mountinfo */ | ||
| 167 | 	__u32 mnt_parent_id_old; | ||
| 168 | 	__u64 mnt_attr;		/* MOUNT_ATTR_... */ | ||
| 169 | 	__u64 mnt_propagation;	/* MS_{SHARED,SLAVE,PRIVATE,UNBINDABLE} */ | ||
| 170 | 	__u64 mnt_peer_group;	/* ID of shared peer group */ | ||
| 171 | 	__u64 mnt_master;	/* Mount receives propagation from this ID */ | ||
| 172 | 	__u64 propagate_from;	/* Propagation from in current namespace */ | ||
| 173 | 	__u32 mnt_root;		/* [str] Root of mount relative to root of fs */ | ||
| 174 | 	__u32 mnt_point;	/* [str] Mountpoint relative to current root */ | ||
| 175 | 	__u64 __spare2[50]; | ||
| 176 | 	char str[];		/* Variable size part containing strings */ | ||
| 177 | }; | ||
| 178 | |||
| 179 | /* | ||
| 180 | * Structure for passing mount ID and miscellaneous parameters to statmount(2) | ||
| 181 | * and listmount(2). | ||
| 182 | * | ||
| 183 | * For statmount(2) @param represents the request mask. | ||
| 184 | * For listmount(2) @param represents the last listed mount id (or zero). | ||
| 185 | */ | ||
| 186 | struct mnt_id_req { | ||
| 187 | 	__u32 size; | ||
| 188 | 	__u32 spare; | ||
| 189 | 	__u64 mnt_id; | ||
| 190 | 	__u64 param; | ||
| 191 | }; | ||
| 192 | |||
| 193 | /* List of all mnt_id_req versions. */ | ||
| 194 | #define MNT_ID_REQ_SIZE_VER0	24 /* sizeof first published struct */ | ||
| 195 | |||
| 196 | /* | ||
| 197 | * @mask bits for statmount(2) | ||
| 198 | */ | ||
| 199 | #define STATMOUNT_SB_BASIC		0x00000001U /* Want/got sb_... */ | ||
| 200 | #define STATMOUNT_MNT_BASIC		0x00000002U	/* Want/got mnt_... */ | ||
| 201 | #define STATMOUNT_PROPAGATE_FROM	0x00000004U	/* Want/got propagate_from */ | ||
| 202 | #define STATMOUNT_MNT_ROOT		0x00000008U	/* Want/got mnt_root */ | ||
| 203 | #define STATMOUNT_MNT_POINT		0x00000010U	/* Want/got mnt_point */ | ||
| 204 | #define STATMOUNT_FS_TYPE		0x00000020U	/* Want/got fs_type */ | ||
| 205 | |||
| 206 | /* | ||
| 207 | * Special @mnt_id values that can be passed to listmount | ||
| 208 | */ | ||
| 209 | #define LSMT_ROOT		0xffffffffffffffff	/* root mount */ | ||
| 210 | |||
| 139 | #endif /* _LINUX_MOUNT_H */ | 211 | #endif /* _LINUX_MOUNT_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mptcp.h+41-165| ... | @@ -21,91 +21,20 @@ | ... | @@ -21,91 +21,20 @@ |
| 21 | #define MPTCP_SUBFLOW_FLAG_CONNECTED		_BITUL(7) | 21 | #define MPTCP_SUBFLOW_FLAG_CONNECTED		_BITUL(7) |
| 22 | #define MPTCP_SUBFLOW_FLAG_MAPVALID		_BITUL(8) | 22 | #define MPTCP_SUBFLOW_FLAG_MAPVALID		_BITUL(8) |
| 23 | 23 | ||
| 24 | enum { | ||
| 25 | 	MPTCP_SUBFLOW_ATTR_UNSPEC, | ||
| 26 | 	MPTCP_SUBFLOW_ATTR_TOKEN_REM, | ||
| 27 | 	MPTCP_SUBFLOW_ATTR_TOKEN_LOC, | ||
| 28 | 	MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ, | ||
| 29 | 	MPTCP_SUBFLOW_ATTR_MAP_SEQ, | ||
| 30 | 	MPTCP_SUBFLOW_ATTR_MAP_SFSEQ, | ||
| 31 | 	MPTCP_SUBFLOW_ATTR_SSN_OFFSET, | ||
| 32 | 	MPTCP_SUBFLOW_ATTR_MAP_DATALEN, | ||
| 33 | 	MPTCP_SUBFLOW_ATTR_FLAGS, | ||
| 34 | 	MPTCP_SUBFLOW_ATTR_ID_REM, | ||
| 35 | 	MPTCP_SUBFLOW_ATTR_ID_LOC, | ||
| 36 | 	MPTCP_SUBFLOW_ATTR_PAD, | ||
| 37 | 	__MPTCP_SUBFLOW_ATTR_MAX | ||
| 38 | }; | ||
| 39 | |||
| 40 | #define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1) | ||
| 41 | |||
| 42 | /* netlink interface */ | ||
| 43 | #define MPTCP_PM_NAME		"mptcp_pm" | ||
| 44 | #define MPTCP_PM_CMD_GRP_NAME	"mptcp_pm_cmds" | 24 | #define MPTCP_PM_CMD_GRP_NAME	"mptcp_pm_cmds" |
| 45 | #define MPTCP_PM_EV_GRP_NAME	"mptcp_pm_events" | 25 | #define MPTCP_PM_EV_GRP_NAME	"mptcp_pm_events" |
| 46 | #define MPTCP_PM_VER		0x1 | ||
| 47 | |||
| 48 | /* | ||
| 49 | * ATTR types defined for MPTCP | ||
| 50 | */ | ||
| 51 | enum { | ||
| 52 | 	MPTCP_PM_ATTR_UNSPEC, | ||
| 53 | |||
| 54 | 	MPTCP_PM_ATTR_ADDR,				/* nested address */ | ||
| 55 | 	MPTCP_PM_ATTR_RCV_ADD_ADDRS,			/* u32 */ | ||
| 56 | 	MPTCP_PM_ATTR_SUBFLOWS,				/* u32 */ | ||
| 57 | 	MPTCP_PM_ATTR_TOKEN,				/* u32 */ | ||
| 58 | 	MPTCP_PM_ATTR_LOC_ID,				/* u8 */ | ||
| 59 | 	MPTCP_PM_ATTR_ADDR_REMOTE,			/* nested address */ | ||
| 60 | |||
| 61 | 	__MPTCP_PM_ATTR_MAX | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1) | ||
| 65 | |||
| 66 | enum { | ||
| 67 | 	MPTCP_PM_ADDR_ATTR_UNSPEC, | ||
| 68 | 26 | ||
| 69 | 	MPTCP_PM_ADDR_ATTR_FAMILY,			/* u16 */ | 27 | #include <linux/mptcp_pm.h> |
| 70 | 	MPTCP_PM_ADDR_ATTR_ID,				/* u8 */ | ||
| 71 | 	MPTCP_PM_ADDR_ATTR_ADDR4,			/* struct in_addr */ | ||
| 72 | 	MPTCP_PM_ADDR_ATTR_ADDR6,			/* struct in6_addr */ | ||
| 73 | 	MPTCP_PM_ADDR_ATTR_PORT,			/* u16 */ | ||
| 74 | 	MPTCP_PM_ADDR_ATTR_FLAGS,			/* u32 */ | ||
| 75 | 	MPTCP_PM_ADDR_ATTR_IF_IDX,			/* s32 */ | ||
| 76 | |||
| 77 | 	__MPTCP_PM_ADDR_ATTR_MAX | ||
| 78 | }; | ||
| 79 | |||
| 80 | #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1) | ||
| 81 | |||
| 82 | #define MPTCP_PM_ADDR_FLAG_SIGNAL			(1 << 0) | ||
| 83 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW			(1 << 1) | ||
| 84 | #define MPTCP_PM_ADDR_FLAG_BACKUP			(1 << 2) | ||
| 85 | #define MPTCP_PM_ADDR_FLAG_FULLMESH			(1 << 3) | ||
| 86 | #define MPTCP_PM_ADDR_FLAG_IMPLICIT			(1 << 4) | ||
| 87 | |||
| 88 | enum { | ||
| 89 | 	MPTCP_PM_CMD_UNSPEC, | ||
| 90 | |||
| 91 | 	MPTCP_PM_CMD_ADD_ADDR, | ||
| 92 | 	MPTCP_PM_CMD_DEL_ADDR, | ||
| 93 | 	MPTCP_PM_CMD_GET_ADDR, | ||
| 94 | 	MPTCP_PM_CMD_FLUSH_ADDRS, | ||
| 95 | 	MPTCP_PM_CMD_SET_LIMITS, | ||
| 96 | 	MPTCP_PM_CMD_GET_LIMITS, | ||
| 97 | 	MPTCP_PM_CMD_SET_FLAGS, | ||
| 98 | 	MPTCP_PM_CMD_ANNOUNCE, | ||
| 99 | 	MPTCP_PM_CMD_REMOVE, | ||
| 100 | 	MPTCP_PM_CMD_SUBFLOW_CREATE, | ||
| 101 | 	MPTCP_PM_CMD_SUBFLOW_DESTROY, | ||
| 102 | |||
| 103 | 	__MPTCP_PM_CMD_AFTER_LAST | ||
| 104 | }; | ||
| 105 | 28 | ||
| 106 | #define MPTCP_INFO_FLAG_FALLBACK		_BITUL(0) | 29 | #define MPTCP_INFO_FLAG_FALLBACK		_BITUL(0) |
| 107 | #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED	_BITUL(1) | 30 | #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED	_BITUL(1) |
| 108 | 31 | ||
| 32 | #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) | ||
| 33 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) | ||
| 34 | #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) | ||
| 35 | #define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3) | ||
| 36 | #define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4) | ||
| 37 | |||
| 109 | struct mptcp_info { | 38 | struct mptcp_info { |
| 110 | 	__u8	mptcpi_subflows; | 39 | 	__u8	mptcpi_subflows; |
| 111 | 	__u8	mptcpi_add_addr_signal; | 40 | 	__u8	mptcpi_add_addr_signal; |
| ... | @@ -121,95 +50,18 @@ struct mptcp_info { | ... | @@ -121,95 +50,18 @@ struct mptcp_info { |
| 121 | 	__u8	mptcpi_local_addr_used; | 50 | 	__u8	mptcpi_local_addr_used; |
| 122 | 	__u8	mptcpi_local_addr_max; | 51 | 	__u8	mptcpi_local_addr_max; |
| 123 | 	__u8	mptcpi_csum_enabled; | 52 | 	__u8	mptcpi_csum_enabled; |
| 53 | 	__u32	mptcpi_retransmits; | ||
| 54 | 	__u64	mptcpi_bytes_retrans; | ||
| 55 | 	__u64	mptcpi_bytes_sent; | ||
| 56 | 	__u64	mptcpi_bytes_received; | ||
| 57 | 	__u64	mptcpi_bytes_acked; | ||
| 58 | 	__u8	mptcpi_subflows_total; | ||
| 59 | 	__u8	reserved[3]; | ||
| 60 | 	__u32	mptcpi_last_data_sent; | ||
| 61 | 	__u32	mptcpi_last_data_recv; | ||
| 62 | 	__u32	mptcpi_last_ack_recv; | ||
| 124 | }; | 63 | }; |
| 125 | 64 | ||
| 126 | /* | ||
| 127 | * MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6, | ||
| 128 | * sport, dport | ||
| 129 | * A new MPTCP connection has been created. It is the good time to allocate | ||
| 130 | * memory and send ADD_ADDR if needed. Depending on the traffic-patterns | ||
| 131 | * it can take a long time until the MPTCP_EVENT_ESTABLISHED is sent. | ||
| 132 | * | ||
| 133 | * MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6, | ||
| 134 | *			 sport, dport | ||
| 135 | * A MPTCP connection is established (can start new subflows). | ||
| 136 | * | ||
| 137 | * MPTCP_EVENT_CLOSED: token | ||
| 138 | * A MPTCP connection has stopped. | ||
| 139 | * | ||
| 140 | * MPTCP_EVENT_ANNOUNCED: token, rem_id, family, daddr4 | daddr6 [, dport] | ||
| 141 | * A new address has been announced by the peer. | ||
| 142 | * | ||
| 143 | * MPTCP_EVENT_REMOVED: token, rem_id | ||
| 144 | * An address has been lost by the peer. | ||
| 145 | * | ||
| 146 | * MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, | ||
| 147 | * saddr4 | saddr6, daddr4 | daddr6, sport, | ||
| 148 | * dport, backup, if_idx [, error] | ||
| 149 | * A new subflow has been established. 'error' should not be set. | ||
| 150 | * | ||
| 151 | * MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6, | ||
| 152 | * daddr4 | daddr6, sport, dport, backup, if_idx | ||
| 153 | * [, error] | ||
| 154 | * A subflow has been closed. An error (copy of sk_err) could be set if an | ||
| 155 | * error has been detected for this subflow. | ||
| 156 | * | ||
| 157 | * MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6, | ||
| 158 | * daddr4 | daddr6, sport, dport, backup, if_idx | ||
| 159 | * [, error] | ||
| 160 | * The priority of a subflow has changed. 'error' should not be set. | ||
| 161 | * | ||
| 162 | * MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6 | ||
| 163 | * A new PM listener is created. | ||
| 164 | * | ||
| 165 | * MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6 | ||
| 166 | * A PM listener is closed. | ||
| 167 | */ | ||
| 168 | enum mptcp_event_type { | ||
| 169 | 	MPTCP_EVENT_UNSPEC = 0, | ||
| 170 | 	MPTCP_EVENT_CREATED = 1, | ||
| 171 | 	MPTCP_EVENT_ESTABLISHED = 2, | ||
| 172 | 	MPTCP_EVENT_CLOSED = 3, | ||
| 173 | |||
| 174 | 	MPTCP_EVENT_ANNOUNCED = 6, | ||
| 175 | 	MPTCP_EVENT_REMOVED = 7, | ||
| 176 | |||
| 177 | 	MPTCP_EVENT_SUB_ESTABLISHED = 10, | ||
| 178 | 	MPTCP_EVENT_SUB_CLOSED = 11, | ||
| 179 | |||
| 180 | 	MPTCP_EVENT_SUB_PRIORITY = 13, | ||
| 181 | |||
| 182 | 	MPTCP_EVENT_LISTENER_CREATED = 15, | ||
| 183 | 	MPTCP_EVENT_LISTENER_CLOSED = 16, | ||
| 184 | }; | ||
| 185 | |||
| 186 | enum mptcp_event_attr { | ||
| 187 | 	MPTCP_ATTR_UNSPEC = 0, | ||
| 188 | |||
| 189 | 	MPTCP_ATTR_TOKEN,	/* u32 */ | ||
| 190 | 	MPTCP_ATTR_FAMILY,	/* u16 */ | ||
| 191 | 	MPTCP_ATTR_LOC_ID,	/* u8 */ | ||
| 192 | 	MPTCP_ATTR_REM_ID,	/* u8 */ | ||
| 193 | 	MPTCP_ATTR_SADDR4,	/* be32 */ | ||
| 194 | 	MPTCP_ATTR_SADDR6,	/* struct in6_addr */ | ||
| 195 | 	MPTCP_ATTR_DADDR4,	/* be32 */ | ||
| 196 | 	MPTCP_ATTR_DADDR6,	/* struct in6_addr */ | ||
| 197 | 	MPTCP_ATTR_SPORT,	/* be16 */ | ||
| 198 | 	MPTCP_ATTR_DPORT,	/* be16 */ | ||
| 199 | 	MPTCP_ATTR_BACKUP,	/* u8 */ | ||
| 200 | 	MPTCP_ATTR_ERROR,	/* u8 */ | ||
| 201 | 	MPTCP_ATTR_FLAGS,	/* u16 */ | ||
| 202 | 	MPTCP_ATTR_TIMEOUT,	/* u32 */ | ||
| 203 | 	MPTCP_ATTR_IF_IDX,	/* s32 */ | ||
| 204 | 	MPTCP_ATTR_RESET_REASON,/* u32 */ | ||
| 205 | 	MPTCP_ATTR_RESET_FLAGS, /* u32 */ | ||
| 206 | 	MPTCP_ATTR_SERVER_SIDE,	/* u8 */ | ||
| 207 | |||
| 208 | 	__MPTCP_ATTR_AFTER_LAST | ||
| 209 | }; | ||
| 210 | |||
| 211 | #define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1) | ||
| 212 | |||
| 213 | /* MPTCP Reset reason codes, rfc8684 */ | 65 | /* MPTCP Reset reason codes, rfc8684 */ |
| 214 | #define MPTCP_RST_EUNSPEC	0 | 66 | #define MPTCP_RST_EUNSPEC	0 |
| 215 | #define MPTCP_RST_EMPTCP	1 | 67 | #define MPTCP_RST_EMPTCP	1 |
| ... | @@ -242,9 +94,33 @@ struct mptcp_subflow_addrs { | ... | @@ -242,9 +94,33 @@ struct mptcp_subflow_addrs { |
| 242 | 	}; | 94 | 	}; |
| 243 | }; | 95 | }; |
| 244 | 96 | ||
| 97 | struct mptcp_subflow_info { | ||
| 98 | 	__u32				id; | ||
| 99 | 	struct mptcp_subflow_addrs	addrs; | ||
| 100 | }; | ||
| 101 | |||
| 102 | struct mptcp_full_info { | ||
| 103 | 	__u32		size_tcpinfo_kernel;	/* must be 0, set by kernel */ | ||
| 104 | 	__u32		size_tcpinfo_user; | ||
| 105 | 	__u32		size_sfinfo_kernel;	/* must be 0, set by kernel */ | ||
| 106 | 	__u32		size_sfinfo_user; | ||
| 107 | 	__u32		num_subflows;		/* must be 0, set by kernel (real subflow count) */ | ||
| 108 | 	__u32		size_arrays_user;	/* max subflows that userspace is interested in; | ||
| 109 | 						 * the buffers at subflow_info/tcp_info | ||
| 110 | 						 * are respectively at least: | ||
| 111 | 						 * size_arrays * size_sfinfo_user | ||
| 112 | 						 * size_arrays * size_tcpinfo_user | ||
| 113 | 						 * bytes wide | ||
| 114 | 						 */ | ||
| 115 | 	__aligned_u64		subflow_info; | ||
| 116 | 	__aligned_u64		tcp_info; | ||
| 117 | 	struct mptcp_info	mptcp_info; | ||
| 118 | }; | ||
| 119 | |||
| 245 | /* MPTCP socket options */ | 120 | /* MPTCP socket options */ |
| 246 | #define MPTCP_INFO		1 | 121 | #define MPTCP_INFO		1 |
| 247 | #define MPTCP_TCPINFO		2 | 122 | #define MPTCP_TCPINFO		2 |
| 248 | #define MPTCP_SUBFLOW_ADDRS	3 | 123 | #define MPTCP_SUBFLOW_ADDRS	3 |
| 124 | #define MPTCP_FULL_INFO		4 | ||
| 249 | 125 | ||
| 250 | #endif /* _MPTCP_H */ | 126 | #endif /* _MPTCP_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mptcp_pm.h created+150| ... | @@ -0,0 +1,150 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/mptcp_pm.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_MPTCP_PM_H | ||
| 7 | #define _LINUX_MPTCP_PM_H | ||
| 8 | |||
| 9 | #define MPTCP_PM_NAME	"mptcp_pm" | ||
| 10 | #define MPTCP_PM_VER	1 | ||
| 11 | |||
| 12 | /** | ||
| 13 | * enum mptcp_event_type | ||
| 14 | * @MPTCP_EVENT_UNSPEC: unused event | ||
| 15 | * @MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6, | ||
| 16 | * sport, dport A new MPTCP connection has been created. It is the good time | ||
| 17 | * to allocate memory and send ADD_ADDR if needed. Depending on the | ||
| 18 | * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED | ||
| 19 | * is sent. | ||
| 20 | * @MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6, | ||
| 21 | * sport, dport A MPTCP connection is established (can start new subflows). | ||
| 22 | * @MPTCP_EVENT_CLOSED: token A MPTCP connection has stopped. | ||
| 23 | * @MPTCP_EVENT_ANNOUNCED: token, rem_id, family, daddr4 | daddr6 [, dport] A | ||
| 24 | * new address has been announced by the peer. | ||
| 25 | * @MPTCP_EVENT_REMOVED: token, rem_id An address has been lost by the peer. | ||
| 26 | * @MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, saddr4 | | ||
| 27 | * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error] A new | ||
| 28 | * subflow has been established. 'error' should not be set. | ||
| 29 | * @MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6, | ||
| 30 | * daddr4 | daddr6, sport, dport, backup, if_idx [, error] A subflow has been | ||
| 31 | * closed. An error (copy of sk_err) could be set if an error has been | ||
| 32 | * detected for this subflow. | ||
| 33 | * @MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6, | ||
| 34 | * daddr4 | daddr6, sport, dport, backup, if_idx [, error] The priority of a | ||
| 35 | * subflow has changed. 'error' should not be set. | ||
| 36 | * @MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6 A new PM | ||
| 37 | * listener is created. | ||
| 38 | * @MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6 A PM listener | ||
| 39 | * is closed. | ||
| 40 | */ | ||
| 41 | enum mptcp_event_type { | ||
| 42 | 	MPTCP_EVENT_UNSPEC, | ||
| 43 | 	MPTCP_EVENT_CREATED, | ||
| 44 | 	MPTCP_EVENT_ESTABLISHED, | ||
| 45 | 	MPTCP_EVENT_CLOSED, | ||
| 46 | 	MPTCP_EVENT_ANNOUNCED = 6, | ||
| 47 | 	MPTCP_EVENT_REMOVED, | ||
| 48 | 	MPTCP_EVENT_SUB_ESTABLISHED = 10, | ||
| 49 | 	MPTCP_EVENT_SUB_CLOSED, | ||
| 50 | 	MPTCP_EVENT_SUB_PRIORITY = 13, | ||
| 51 | 	MPTCP_EVENT_LISTENER_CREATED = 15, | ||
| 52 | 	MPTCP_EVENT_LISTENER_CLOSED, | ||
| 53 | }; | ||
| 54 | |||
| 55 | enum { | ||
| 56 | 	MPTCP_PM_ADDR_ATTR_UNSPEC, | ||
| 57 | 	MPTCP_PM_ADDR_ATTR_FAMILY, | ||
| 58 | 	MPTCP_PM_ADDR_ATTR_ID, | ||
| 59 | 	MPTCP_PM_ADDR_ATTR_ADDR4, | ||
| 60 | 	MPTCP_PM_ADDR_ATTR_ADDR6, | ||
| 61 | 	MPTCP_PM_ADDR_ATTR_PORT, | ||
| 62 | 	MPTCP_PM_ADDR_ATTR_FLAGS, | ||
| 63 | 	MPTCP_PM_ADDR_ATTR_IF_IDX, | ||
| 64 | |||
| 65 | 	__MPTCP_PM_ADDR_ATTR_MAX | ||
| 66 | }; | ||
| 67 | #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1) | ||
| 68 | |||
| 69 | enum { | ||
| 70 | 	MPTCP_SUBFLOW_ATTR_UNSPEC, | ||
| 71 | 	MPTCP_SUBFLOW_ATTR_TOKEN_REM, | ||
| 72 | 	MPTCP_SUBFLOW_ATTR_TOKEN_LOC, | ||
| 73 | 	MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ, | ||
| 74 | 	MPTCP_SUBFLOW_ATTR_MAP_SEQ, | ||
| 75 | 	MPTCP_SUBFLOW_ATTR_MAP_SFSEQ, | ||
| 76 | 	MPTCP_SUBFLOW_ATTR_SSN_OFFSET, | ||
| 77 | 	MPTCP_SUBFLOW_ATTR_MAP_DATALEN, | ||
| 78 | 	MPTCP_SUBFLOW_ATTR_FLAGS, | ||
| 79 | 	MPTCP_SUBFLOW_ATTR_ID_REM, | ||
| 80 | 	MPTCP_SUBFLOW_ATTR_ID_LOC, | ||
| 81 | 	MPTCP_SUBFLOW_ATTR_PAD, | ||
| 82 | |||
| 83 | 	__MPTCP_SUBFLOW_ATTR_MAX | ||
| 84 | }; | ||
| 85 | #define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1) | ||
| 86 | |||
| 87 | enum { | ||
| 88 | 	MPTCP_PM_ENDPOINT_ADDR = 1, | ||
| 89 | |||
| 90 | 	__MPTCP_PM_ENDPOINT_MAX | ||
| 91 | }; | ||
| 92 | #define MPTCP_PM_ENDPOINT_MAX (__MPTCP_PM_ENDPOINT_MAX - 1) | ||
| 93 | |||
| 94 | enum { | ||
| 95 | 	MPTCP_PM_ATTR_UNSPEC, | ||
| 96 | 	MPTCP_PM_ATTR_ADDR, | ||
| 97 | 	MPTCP_PM_ATTR_RCV_ADD_ADDRS, | ||
| 98 | 	MPTCP_PM_ATTR_SUBFLOWS, | ||
| 99 | 	MPTCP_PM_ATTR_TOKEN, | ||
| 100 | 	MPTCP_PM_ATTR_LOC_ID, | ||
| 101 | 	MPTCP_PM_ATTR_ADDR_REMOTE, | ||
| 102 | |||
| 103 | 	__MPTCP_ATTR_AFTER_LAST | ||
| 104 | }; | ||
| 105 | #define MPTCP_PM_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1) | ||
| 106 | |||
| 107 | enum mptcp_event_attr { | ||
| 108 | 	MPTCP_ATTR_UNSPEC, | ||
| 109 | 	MPTCP_ATTR_TOKEN, | ||
| 110 | 	MPTCP_ATTR_FAMILY, | ||
| 111 | 	MPTCP_ATTR_LOC_ID, | ||
| 112 | 	MPTCP_ATTR_REM_ID, | ||
| 113 | 	MPTCP_ATTR_SADDR4, | ||
| 114 | 	MPTCP_ATTR_SADDR6, | ||
| 115 | 	MPTCP_ATTR_DADDR4, | ||
| 116 | 	MPTCP_ATTR_DADDR6, | ||
| 117 | 	MPTCP_ATTR_SPORT, | ||
| 118 | 	MPTCP_ATTR_DPORT, | ||
| 119 | 	MPTCP_ATTR_BACKUP, | ||
| 120 | 	MPTCP_ATTR_ERROR, | ||
| 121 | 	MPTCP_ATTR_FLAGS, | ||
| 122 | 	MPTCP_ATTR_TIMEOUT, | ||
| 123 | 	MPTCP_ATTR_IF_IDX, | ||
| 124 | 	MPTCP_ATTR_RESET_REASON, | ||
| 125 | 	MPTCP_ATTR_RESET_FLAGS, | ||
| 126 | 	MPTCP_ATTR_SERVER_SIDE, | ||
| 127 | |||
| 128 | 	__MPTCP_ATTR_MAX | ||
| 129 | }; | ||
| 130 | #define MPTCP_ATTR_MAX (__MPTCP_ATTR_MAX - 1) | ||
| 131 | |||
| 132 | enum { | ||
| 133 | 	MPTCP_PM_CMD_UNSPEC, | ||
| 134 | 	MPTCP_PM_CMD_ADD_ADDR, | ||
| 135 | 	MPTCP_PM_CMD_DEL_ADDR, | ||
| 136 | 	MPTCP_PM_CMD_GET_ADDR, | ||
| 137 | 	MPTCP_PM_CMD_FLUSH_ADDRS, | ||
| 138 | 	MPTCP_PM_CMD_SET_LIMITS, | ||
| 139 | 	MPTCP_PM_CMD_GET_LIMITS, | ||
| 140 | 	MPTCP_PM_CMD_SET_FLAGS, | ||
| 141 | 	MPTCP_PM_CMD_ANNOUNCE, | ||
| 142 | 	MPTCP_PM_CMD_REMOVE, | ||
| 143 | 	MPTCP_PM_CMD_SUBFLOW_CREATE, | ||
| 144 | 	MPTCP_PM_CMD_SUBFLOW_DESTROY, | ||
| 145 | |||
| 146 | 	__MPTCP_PM_CMD_AFTER_LAST | ||
| 147 | }; | ||
| 148 | #define MPTCP_PM_CMD_MAX (__MPTCP_PM_CMD_AFTER_LAST - 1) | ||
| 149 | |||
| 150 | #endif /* _LINUX_MPTCP_PM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nbd.h+20-5| ... | @@ -11,6 +11,8 @@ | ... | @@ -11,6 +11,8 @@ |
| 11 | * Cleanup PARANOIA usage & code. | 11 | * Cleanup PARANOIA usage & code. |
| 12 | * 2004/02/19 Paul Clements | 12 | * 2004/02/19 Paul Clements |
| 13 | * Removed PARANOIA, plus various cleanup and comments | 13 | * Removed PARANOIA, plus various cleanup and comments |
| 14 | * 2023 Copyright Red Hat | ||
| 15 | * Link to userspace extensions, favor cookie over handle. | ||
| 14 | */ | 16 | */ |
| 15 | 17 | ||
| 16 | #ifndef LINUX_NBD_H | 18 | #ifndef LINUX_NBD_H |
| ... | @@ -30,12 +32,18 @@ | ... | @@ -30,12 +32,18 @@ |
| 30 | #define NBD_SET_TIMEOUT _IO( 0xab, 9 ) | 32 | #define NBD_SET_TIMEOUT _IO( 0xab, 9 ) |
| 31 | #define NBD_SET_FLAGS _IO( 0xab, 10) | 33 | #define NBD_SET_FLAGS _IO( 0xab, 10) |
| 32 | 34 | ||
| 35 | /* | ||
| 36 | * See also https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md | ||
| 37 | * for additional userspace extensions not yet utilized in the kernel module. | ||
| 38 | */ | ||
| 39 | |||
| 33 | enum { | 40 | enum { |
| 34 | 	NBD_CMD_READ = 0, | 41 | 	NBD_CMD_READ = 0, |
| 35 | 	NBD_CMD_WRITE = 1, | 42 | 	NBD_CMD_WRITE = 1, |
| 36 | 	NBD_CMD_DISC = 2, | 43 | 	NBD_CMD_DISC = 2, |
| 37 | 	NBD_CMD_FLUSH = 3, | 44 | 	NBD_CMD_FLUSH = 3, |
| 38 | 	NBD_CMD_TRIM = 4 | 45 | 	NBD_CMD_TRIM = 4 |
| 46 | 	/* userspace defines additional extension commands */ | ||
| 39 | }; | 47 | }; |
| 40 | 48 | ||
| 41 | /* values for flags field, these are server interaction specific. */ | 49 | /* values for flags field, these are server interaction specific. */ |
| ... | @@ -64,15 +72,19 @@ enum { | ... | @@ -64,15 +72,19 @@ enum { |
| 64 | #define NBD_REQUEST_MAGIC 0x25609513 | 72 | #define NBD_REQUEST_MAGIC 0x25609513 |
| 65 | #define NBD_REPLY_MAGIC 0x67446698 | 73 | #define NBD_REPLY_MAGIC 0x67446698 |
| 66 | /* Do *not* use magics: 0x12560953 0x96744668. */ | 74 | /* Do *not* use magics: 0x12560953 0x96744668. */ |
| 75 | /* magic 0x668e33ef for structured reply not supported by kernel yet */ | ||
| 67 | 76 | ||
| 68 | /* | 77 | /* |
| 69 | * This is the packet used for communication between client and | 78 | * This is the packet used for communication between client and |
| 70 | * server. All data are in network byte order. | 79 | * server. All data are in network byte order. |
| 71 | */ | 80 | */ |
| 72 | struct nbd_request { | 81 | struct nbd_request { |
| 73 | 	__be32 magic; | 82 | 	__be32 magic;	/* NBD_REQUEST_MAGIC	*/ |
| 74 | 	__be32 type;	/* == READ || == WRITE 	*/ | 83 | 	__be32 type;	/* See NBD_CMD_*	*/ |
| 75 | 	char handle[8]; | 84 | 	union { |
| 85 | 		__be64 cookie;	/* Opaque identifier for request	*/ | ||
| 86 | 		char handle[8];	/* older spelling of cookie		*/ | ||
| 87 | 	}; | ||
| 76 | 	__be64 from; | 88 | 	__be64 from; |
| 77 | 	__be32 len; | 89 | 	__be32 len; |
| 78 | } __attribute__((packed)); | 90 | } __attribute__((packed)); |
| ... | @@ -82,8 +94,11 @@ struct nbd_request { | ... | @@ -82,8 +94,11 @@ struct nbd_request { |
| 82 | * it has completed an I/O request (or an error occurs). | 94 | * it has completed an I/O request (or an error occurs). |
| 83 | */ | 95 | */ |
| 84 | struct nbd_reply { | 96 | struct nbd_reply { |
| 85 | 	__be32 magic; | 97 | 	__be32 magic;		/* NBD_REPLY_MAGIC	*/ |
| 86 | 	__be32 error;		/* 0 = ok, else error	*/ | 98 | 	__be32 error;		/* 0 = ok, else error	*/ |
| 87 | 	char handle[8];		/* handle you got from request	*/ | 99 | 	union { |
| 100 | 		__be64 cookie;	/* Opaque identifier from request	*/ | ||
| 101 | 		char handle[8];	/* older spelling of cookie		*/ | ||
| 102 | 	}; | ||
| 88 | }; | 103 | }; |
| 89 | #endif /* LINUX_NBD_H */ | 104 | #endif /* LINUX_NBD_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/netdev.h+137-1| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | * enum netdev_xdp_act | 13 | * enum netdev_xdp_act |
| 14 | * @NETDEV_XDP_ACT_BASIC: XDP feautues set supported by all drivers | 14 | * @NETDEV_XDP_ACT_BASIC: XDP features set supported by all drivers |
| 15 | * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) | 15 | * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) |
| 16 | * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT | 16 | * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT |
| 17 | * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements | 17 | * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements |
| ... | @@ -34,28 +34,164 @@ enum netdev_xdp_act { | ... | @@ -34,28 +34,164 @@ enum netdev_xdp_act { |
| 34 | 	NETDEV_XDP_ACT_RX_SG = 32, | 34 | 	NETDEV_XDP_ACT_RX_SG = 32, |
| 35 | 	NETDEV_XDP_ACT_NDO_XMIT_SG = 64, | 35 | 	NETDEV_XDP_ACT_NDO_XMIT_SG = 64, |
| 36 | 36 | ||
| 37 | 	/* private: */ | ||
| 37 | 	NETDEV_XDP_ACT_MASK = 127, | 38 | 	NETDEV_XDP_ACT_MASK = 127, |
| 38 | }; | 39 | }; |
| 39 | 40 | ||
| 41 | /** | ||
| 42 | * enum netdev_xdp_rx_metadata | ||
| 43 | * @NETDEV_XDP_RX_METADATA_TIMESTAMP: Device is capable of exposing receive HW | ||
| 44 | * timestamp via bpf_xdp_metadata_rx_timestamp(). | ||
| 45 | * @NETDEV_XDP_RX_METADATA_HASH: Device is capable of exposing receive packet | ||
| 46 | * hash via bpf_xdp_metadata_rx_hash(). | ||
| 47 | * @NETDEV_XDP_RX_METADATA_VLAN_TAG: Device is capable of exposing receive | ||
| 48 | * packet VLAN tag via bpf_xdp_metadata_rx_vlan_tag(). | ||
| 49 | */ | ||
| 50 | enum netdev_xdp_rx_metadata { | ||
| 51 | 	NETDEV_XDP_RX_METADATA_TIMESTAMP = 1, | ||
| 52 | 	NETDEV_XDP_RX_METADATA_HASH = 2, | ||
| 53 | 	NETDEV_XDP_RX_METADATA_VLAN_TAG = 4, | ||
| 54 | }; | ||
| 55 | |||
| 56 | /** | ||
| 57 | * enum netdev_xsk_flags | ||
| 58 | * @NETDEV_XSK_FLAGS_TX_TIMESTAMP: HW timestamping egress packets is supported | ||
| 59 | * by the driver. | ||
| 60 | * @NETDEV_XSK_FLAGS_TX_CHECKSUM: L3 checksum HW offload is supported by the | ||
| 61 | * driver. | ||
| 62 | */ | ||
| 63 | enum netdev_xsk_flags { | ||
| 64 | 	NETDEV_XSK_FLAGS_TX_TIMESTAMP = 1, | ||
| 65 | 	NETDEV_XSK_FLAGS_TX_CHECKSUM = 2, | ||
| 66 | }; | ||
| 67 | |||
| 68 | enum netdev_queue_type { | ||
| 69 | 	NETDEV_QUEUE_TYPE_RX, | ||
| 70 | 	NETDEV_QUEUE_TYPE_TX, | ||
| 71 | }; | ||
| 72 | |||
| 73 | enum netdev_qstats_scope { | ||
| 74 | 	NETDEV_QSTATS_SCOPE_QUEUE = 1, | ||
| 75 | }; | ||
| 76 | |||
| 40 | enum { | 77 | enum { |
| 41 | 	NETDEV_A_DEV_IFINDEX = 1, | 78 | 	NETDEV_A_DEV_IFINDEX = 1, |
| 42 | 	NETDEV_A_DEV_PAD, | 79 | 	NETDEV_A_DEV_PAD, |
| 43 | 	NETDEV_A_DEV_XDP_FEATURES, | 80 | 	NETDEV_A_DEV_XDP_FEATURES, |
| 81 | 	NETDEV_A_DEV_XDP_ZC_MAX_SEGS, | ||
| 82 | 	NETDEV_A_DEV_XDP_RX_METADATA_FEATURES, | ||
| 83 | 	NETDEV_A_DEV_XSK_FEATURES, | ||
| 44 | 84 | ||
| 45 | 	__NETDEV_A_DEV_MAX, | 85 | 	__NETDEV_A_DEV_MAX, |
| 46 | 	NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) | 86 | 	NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) |
| 47 | }; | 87 | }; |
| 48 | 88 | ||
| 89 | enum { | ||
| 90 | 	NETDEV_A_PAGE_POOL_ID = 1, | ||
| 91 | 	NETDEV_A_PAGE_POOL_IFINDEX, | ||
| 92 | 	NETDEV_A_PAGE_POOL_NAPI_ID, | ||
| 93 | 	NETDEV_A_PAGE_POOL_INFLIGHT, | ||
| 94 | 	NETDEV_A_PAGE_POOL_INFLIGHT_MEM, | ||
| 95 | 	NETDEV_A_PAGE_POOL_DETACH_TIME, | ||
| 96 | |||
| 97 | 	__NETDEV_A_PAGE_POOL_MAX, | ||
| 98 | 	NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1) | ||
| 99 | }; | ||
| 100 | |||
| 101 | enum { | ||
| 102 | 	NETDEV_A_PAGE_POOL_STATS_INFO = 1, | ||
| 103 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_FAST = 8, | ||
| 104 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW, | ||
| 105 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW_HIGH_ORDER, | ||
| 106 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_EMPTY, | ||
| 107 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_REFILL, | ||
| 108 | 	NETDEV_A_PAGE_POOL_STATS_ALLOC_WAIVE, | ||
| 109 | 	NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHED, | ||
| 110 | 	NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHE_FULL, | ||
| 111 | 	NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING, | ||
| 112 | 	NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING_FULL, | ||
| 113 | 	NETDEV_A_PAGE_POOL_STATS_RECYCLE_RELEASED_REFCNT, | ||
| 114 | |||
| 115 | 	__NETDEV_A_PAGE_POOL_STATS_MAX, | ||
| 116 | 	NETDEV_A_PAGE_POOL_STATS_MAX = (__NETDEV_A_PAGE_POOL_STATS_MAX - 1) | ||
| 117 | }; | ||
| 118 | |||
| 119 | enum { | ||
| 120 | 	NETDEV_A_NAPI_IFINDEX = 1, | ||
| 121 | 	NETDEV_A_NAPI_ID, | ||
| 122 | 	NETDEV_A_NAPI_IRQ, | ||
| 123 | 	NETDEV_A_NAPI_PID, | ||
| 124 | |||
| 125 | 	__NETDEV_A_NAPI_MAX, | ||
| 126 | 	NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1) | ||
| 127 | }; | ||
| 128 | |||
| 129 | enum { | ||
| 130 | 	NETDEV_A_QUEUE_ID = 1, | ||
| 131 | 	NETDEV_A_QUEUE_IFINDEX, | ||
| 132 | 	NETDEV_A_QUEUE_TYPE, | ||
| 133 | 	NETDEV_A_QUEUE_NAPI_ID, | ||
| 134 | |||
| 135 | 	__NETDEV_A_QUEUE_MAX, | ||
| 136 | 	NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1) | ||
| 137 | }; | ||
| 138 | |||
| 139 | enum { | ||
| 140 | 	NETDEV_A_QSTATS_IFINDEX = 1, | ||
| 141 | 	NETDEV_A_QSTATS_QUEUE_TYPE, | ||
| 142 | 	NETDEV_A_QSTATS_QUEUE_ID, | ||
| 143 | 	NETDEV_A_QSTATS_SCOPE, | ||
| 144 | 	NETDEV_A_QSTATS_RX_PACKETS = 8, | ||
| 145 | 	NETDEV_A_QSTATS_RX_BYTES, | ||
| 146 | 	NETDEV_A_QSTATS_TX_PACKETS, | ||
| 147 | 	NETDEV_A_QSTATS_TX_BYTES, | ||
| 148 | 	NETDEV_A_QSTATS_RX_ALLOC_FAIL, | ||
| 149 | 	NETDEV_A_QSTATS_RX_HW_DROPS, | ||
| 150 | 	NETDEV_A_QSTATS_RX_HW_DROP_OVERRUNS, | ||
| 151 | 	NETDEV_A_QSTATS_RX_CSUM_COMPLETE, | ||
| 152 | 	NETDEV_A_QSTATS_RX_CSUM_UNNECESSARY, | ||
| 153 | 	NETDEV_A_QSTATS_RX_CSUM_NONE, | ||
| 154 | 	NETDEV_A_QSTATS_RX_CSUM_BAD, | ||
| 155 | 	NETDEV_A_QSTATS_RX_HW_GRO_PACKETS, | ||
| 156 | 	NETDEV_A_QSTATS_RX_HW_GRO_BYTES, | ||
| 157 | 	NETDEV_A_QSTATS_RX_HW_GRO_WIRE_PACKETS, | ||
| 158 | 	NETDEV_A_QSTATS_RX_HW_GRO_WIRE_BYTES, | ||
| 159 | 	NETDEV_A_QSTATS_RX_HW_DROP_RATELIMITS, | ||
| 160 | 	NETDEV_A_QSTATS_TX_HW_DROPS, | ||
| 161 | 	NETDEV_A_QSTATS_TX_HW_DROP_ERRORS, | ||
| 162 | 	NETDEV_A_QSTATS_TX_CSUM_NONE, | ||
| 163 | 	NETDEV_A_QSTATS_TX_NEEDS_CSUM, | ||
| 164 | 	NETDEV_A_QSTATS_TX_HW_GSO_PACKETS, | ||
| 165 | 	NETDEV_A_QSTATS_TX_HW_GSO_BYTES, | ||
| 166 | 	NETDEV_A_QSTATS_TX_HW_GSO_WIRE_PACKETS, | ||
| 167 | 	NETDEV_A_QSTATS_TX_HW_GSO_WIRE_BYTES, | ||
| 168 | 	NETDEV_A_QSTATS_TX_HW_DROP_RATELIMITS, | ||
| 169 | 	NETDEV_A_QSTATS_TX_STOP, | ||
| 170 | 	NETDEV_A_QSTATS_TX_WAKE, | ||
| 171 | |||
| 172 | 	__NETDEV_A_QSTATS_MAX, | ||
| 173 | 	NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1) | ||
| 174 | }; | ||
| 175 | |||
| 49 | enum { | 176 | enum { |
| 50 | 	NETDEV_CMD_DEV_GET = 1, | 177 | 	NETDEV_CMD_DEV_GET = 1, |
| 51 | 	NETDEV_CMD_DEV_ADD_NTF, | 178 | 	NETDEV_CMD_DEV_ADD_NTF, |
| 52 | 	NETDEV_CMD_DEV_DEL_NTF, | 179 | 	NETDEV_CMD_DEV_DEL_NTF, |
| 53 | 	NETDEV_CMD_DEV_CHANGE_NTF, | 180 | 	NETDEV_CMD_DEV_CHANGE_NTF, |
| 181 | 	NETDEV_CMD_PAGE_POOL_GET, | ||
| 182 | 	NETDEV_CMD_PAGE_POOL_ADD_NTF, | ||
| 183 | 	NETDEV_CMD_PAGE_POOL_DEL_NTF, | ||
| 184 | 	NETDEV_CMD_PAGE_POOL_CHANGE_NTF, | ||
| 185 | 	NETDEV_CMD_PAGE_POOL_STATS_GET, | ||
| 186 | 	NETDEV_CMD_QUEUE_GET, | ||
| 187 | 	NETDEV_CMD_NAPI_GET, | ||
| 188 | 	NETDEV_CMD_QSTATS_GET, | ||
| 54 | 189 | ||
| 55 | 	__NETDEV_CMD_MAX, | 190 | 	__NETDEV_CMD_MAX, |
| 56 | 	NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) | 191 | 	NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) |
| 57 | }; | 192 | }; |
| 58 | 193 | ||
| 59 | #define NETDEV_MCGRP_MGMT	"mgmt" | 194 | #define NETDEV_MCGRP_MGMT	"mgmt" |
| 195 | #define NETDEV_MCGRP_PAGE_POOL	"page-pool" | ||
| 60 | 196 | ||
| 61 | #endif /* _LINUX_NETDEV_H */ | 197 | #endif /* _LINUX_NETDEV_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h+18-5| ... | @@ -105,6 +105,7 @@ enum nft_verdicts { | ... | @@ -105,6 +105,7 @@ enum nft_verdicts { |
| 105 | * @NFT_MSG_DESTROYSETELEM: destroy a set element (enum nft_set_elem_attributes) | 105 | * @NFT_MSG_DESTROYSETELEM: destroy a set element (enum nft_set_elem_attributes) |
| 106 | * @NFT_MSG_DESTROYOBJ: destroy a stateful object (enum nft_object_attributes) | 106 | * @NFT_MSG_DESTROYOBJ: destroy a stateful object (enum nft_object_attributes) |
| 107 | * @NFT_MSG_DESTROYFLOWTABLE: destroy flow table (enum nft_flowtable_attributes) | 107 | * @NFT_MSG_DESTROYFLOWTABLE: destroy flow table (enum nft_flowtable_attributes) |
| 108 | * @NFT_MSG_GETSETELEM_RESET: get set elements and reset attached stateful expressions (enum nft_set_elem_attributes) | ||
| 108 | */ | 109 | */ |
| 109 | enum nf_tables_msg_types { | 110 | enum nf_tables_msg_types { |
| 110 | 	NFT_MSG_NEWTABLE, | 111 | 	NFT_MSG_NEWTABLE, |
| ... | @@ -140,6 +141,7 @@ enum nf_tables_msg_types { | ... | @@ -140,6 +141,7 @@ enum nf_tables_msg_types { |
| 140 | 	NFT_MSG_DESTROYSETELEM, | 141 | 	NFT_MSG_DESTROYSETELEM, |
| 141 | 	NFT_MSG_DESTROYOBJ, | 142 | 	NFT_MSG_DESTROYOBJ, |
| 142 | 	NFT_MSG_DESTROYFLOWTABLE, | 143 | 	NFT_MSG_DESTROYFLOWTABLE, |
| 144 | 	NFT_MSG_GETSETELEM_RESET, | ||
| 143 | 	NFT_MSG_MAX, | 145 | 	NFT_MSG_MAX, |
| 144 | }; | 146 | }; |
| 145 | 147 | ||
| ... | @@ -177,13 +179,17 @@ enum nft_hook_attributes { | ... | @@ -177,13 +179,17 @@ enum nft_hook_attributes { |
| 177 | * enum nft_table_flags - nf_tables table flags | 179 | * enum nft_table_flags - nf_tables table flags |
| 178 | * | 180 | * |
| 179 | * @NFT_TABLE_F_DORMANT: this table is not active | 181 | * @NFT_TABLE_F_DORMANT: this table is not active |
| 182 | * @NFT_TABLE_F_OWNER: this table is owned by a process | ||
| 183 | * @NFT_TABLE_F_PERSIST: this table shall outlive its owner | ||
| 180 | */ | 184 | */ |
| 181 | enum nft_table_flags { | 185 | enum nft_table_flags { |
| 182 | 	NFT_TABLE_F_DORMANT	= 0x1, | 186 | 	NFT_TABLE_F_DORMANT	= 0x1, |
| 183 | 	NFT_TABLE_F_OWNER	= 0x2, | 187 | 	NFT_TABLE_F_OWNER	= 0x2, |
| 188 | 	NFT_TABLE_F_PERSIST	= 0x4, | ||
| 184 | }; | 189 | }; |
| 185 | #define NFT_TABLE_F_MASK	(NFT_TABLE_F_DORMANT | \ | 190 | #define NFT_TABLE_F_MASK	(NFT_TABLE_F_DORMANT | \ |
| 186 | 				 NFT_TABLE_F_OWNER) | 191 | 				 NFT_TABLE_F_OWNER | \ |
| 192 | 				 NFT_TABLE_F_PERSIST) | ||
| 187 | 193 | ||
| 188 | /** | 194 | /** |
| 189 | * enum nft_table_attributes - nf_tables table netlink attributes | 195 | * enum nft_table_attributes - nf_tables table netlink attributes |
| ... | @@ -261,6 +267,7 @@ enum nft_chain_attributes { | ... | @@ -261,6 +267,7 @@ enum nft_chain_attributes { |
| 261 | * @NFTA_RULE_USERDATA: user data (NLA_BINARY, NFT_USERDATA_MAXLEN) | 267 | * @NFTA_RULE_USERDATA: user data (NLA_BINARY, NFT_USERDATA_MAXLEN) |
| 262 | * @NFTA_RULE_ID: uniquely identifies a rule in a transaction (NLA_U32) | 268 | * @NFTA_RULE_ID: uniquely identifies a rule in a transaction (NLA_U32) |
| 263 | * @NFTA_RULE_POSITION_ID: transaction unique identifier of the previous rule (NLA_U32) | 269 | * @NFTA_RULE_POSITION_ID: transaction unique identifier of the previous rule (NLA_U32) |
| 270 | * @NFTA_RULE_CHAIN_ID: add the rule to chain by ID, alternative to @NFTA_RULE_CHAIN (NLA_U32) | ||
| 264 | */ | 271 | */ |
| 265 | enum nft_rule_attributes { | 272 | enum nft_rule_attributes { |
| 266 | 	NFTA_RULE_UNSPEC, | 273 | 	NFTA_RULE_UNSPEC, |
| ... | @@ -282,9 +289,11 @@ enum nft_rule_attributes { | ... | @@ -282,9 +289,11 @@ enum nft_rule_attributes { |
| 282 | /** | 289 | /** |
| 283 | * enum nft_rule_compat_flags - nf_tables rule compat flags | 290 | * enum nft_rule_compat_flags - nf_tables rule compat flags |
| 284 | * | 291 | * |
| 292 | * @NFT_RULE_COMPAT_F_UNUSED: unused | ||
| 285 | * @NFT_RULE_COMPAT_F_INV: invert the check result | 293 | * @NFT_RULE_COMPAT_F_INV: invert the check result |
| 286 | */ | 294 | */ |
| 287 | enum nft_rule_compat_flags { | 295 | enum nft_rule_compat_flags { |
| 296 | 	NFT_RULE_COMPAT_F_UNUSED = (1 << 0), | ||
| 288 | 	NFT_RULE_COMPAT_F_INV	= (1 << 1), | 297 | 	NFT_RULE_COMPAT_F_INV	= (1 << 1), |
| 289 | 	NFT_RULE_COMPAT_F_MASK	= NFT_RULE_COMPAT_F_INV, | 298 | 	NFT_RULE_COMPAT_F_MASK	= NFT_RULE_COMPAT_F_INV, |
| 290 | }; | 299 | }; |
| ... | @@ -685,7 +694,7 @@ enum nft_range_ops { | ... | @@ -685,7 +694,7 @@ enum nft_range_ops { |
| 685 | * enum nft_range_attributes - nf_tables range expression netlink attributes | 694 | * enum nft_range_attributes - nf_tables range expression netlink attributes |
| 686 | * | 695 | * |
| 687 | * @NFTA_RANGE_SREG: source register of data to compare (NLA_U32: nft_registers) | 696 | * @NFTA_RANGE_SREG: source register of data to compare (NLA_U32: nft_registers) |
| 688 | * @NFTA_RANGE_OP: cmp operation (NLA_U32: nft_cmp_ops) | 697 | * @NFTA_RANGE_OP: cmp operation (NLA_U32: nft_range_ops) |
| 689 | * @NFTA_RANGE_FROM_DATA: data range from (NLA_NESTED: nft_data_attributes) | 698 | * @NFTA_RANGE_FROM_DATA: data range from (NLA_NESTED: nft_data_attributes) |
| 690 | * @NFTA_RANGE_TO_DATA: data range to (NLA_NESTED: nft_data_attributes) | 699 | * @NFTA_RANGE_TO_DATA: data range to (NLA_NESTED: nft_data_attributes) |
| 691 | */ | 700 | */ |
| ... | @@ -859,12 +868,14 @@ enum nft_exthdr_flags { | ... | @@ -859,12 +868,14 @@ enum nft_exthdr_flags { |
| 859 | * @NFT_EXTHDR_OP_TCP: match against tcp options | 868 | * @NFT_EXTHDR_OP_TCP: match against tcp options |
| 860 | * @NFT_EXTHDR_OP_IPV4: match against ipv4 options | 869 | * @NFT_EXTHDR_OP_IPV4: match against ipv4 options |
| 861 | * @NFT_EXTHDR_OP_SCTP: match against sctp chunks | 870 | * @NFT_EXTHDR_OP_SCTP: match against sctp chunks |
| 871 | * @NFT_EXTHDR_OP_DCCP: match against dccp otions | ||
| 862 | */ | 872 | */ |
| 863 | enum nft_exthdr_op { | 873 | enum nft_exthdr_op { |
| 864 | 	NFT_EXTHDR_OP_IPV6, | 874 | 	NFT_EXTHDR_OP_IPV6, |
| 865 | 	NFT_EXTHDR_OP_TCPOPT, | 875 | 	NFT_EXTHDR_OP_TCPOPT, |
| 866 | 	NFT_EXTHDR_OP_IPV4, | 876 | 	NFT_EXTHDR_OP_IPV4, |
| 867 | 	NFT_EXTHDR_OP_SCTP, | 877 | 	NFT_EXTHDR_OP_SCTP, |
| 878 | 	NFT_EXTHDR_OP_DCCP, | ||
| 868 | 	__NFT_EXTHDR_OP_MAX | 879 | 	__NFT_EXTHDR_OP_MAX |
| 869 | }; | 880 | }; |
| 870 | #define NFT_EXTHDR_OP_MAX	(__NFT_EXTHDR_OP_MAX - 1) | 881 | #define NFT_EXTHDR_OP_MAX	(__NFT_EXTHDR_OP_MAX - 1) |
| ... | @@ -878,7 +889,7 @@ enum nft_exthdr_op { | ... | @@ -878,7 +889,7 @@ enum nft_exthdr_op { |
| 878 | * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) | 889 | * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) |
| 879 | * @NFTA_EXTHDR_FLAGS: extension header flags (NLA_U32) | 890 | * @NFTA_EXTHDR_FLAGS: extension header flags (NLA_U32) |
| 880 | * @NFTA_EXTHDR_OP: option match type (NLA_U32) | 891 | * @NFTA_EXTHDR_OP: option match type (NLA_U32) |
| 881 | * @NFTA_EXTHDR_SREG: option match type (NLA_U32) | 892 | * @NFTA_EXTHDR_SREG: source register (NLA_U32: nft_registers) |
| 882 | */ | 893 | */ |
| 883 | enum nft_exthdr_attributes { | 894 | enum nft_exthdr_attributes { |
| 884 | 	NFTA_EXTHDR_UNSPEC, | 895 | 	NFTA_EXTHDR_UNSPEC, |
| ... | @@ -931,6 +942,7 @@ enum nft_exthdr_attributes { | ... | @@ -931,6 +942,7 @@ enum nft_exthdr_attributes { |
| 931 | * @NFT_META_TIME_HOUR: hour of day (in seconds) | 942 | * @NFT_META_TIME_HOUR: hour of day (in seconds) |
| 932 | * @NFT_META_SDIF: slave device interface index | 943 | * @NFT_META_SDIF: slave device interface index |
| 933 | * @NFT_META_SDIFNAME: slave device interface name | 944 | * @NFT_META_SDIFNAME: slave device interface name |
| 945 | * @NFT_META_BRI_BROUTE: packet br_netfilter_broute bit | ||
| 934 | */ | 946 | */ |
| 935 | enum nft_meta_keys { | 947 | enum nft_meta_keys { |
| 936 | 	NFT_META_LEN, | 948 | 	NFT_META_LEN, |
| ... | @@ -969,6 +981,7 @@ enum nft_meta_keys { | ... | @@ -969,6 +981,7 @@ enum nft_meta_keys { |
| 969 | 	NFT_META_TIME_HOUR, | 981 | 	NFT_META_TIME_HOUR, |
| 970 | 	NFT_META_SDIF, | 982 | 	NFT_META_SDIF, |
| 971 | 	NFT_META_SDIFNAME, | 983 | 	NFT_META_SDIFNAME, |
| 984 | 	NFT_META_BRI_BROUTE, | ||
| 972 | 	__NFT_META_IIFTYPE, | 985 | 	__NFT_META_IIFTYPE, |
| 973 | }; | 986 | }; |
| 974 | 987 | ||
| ... | @@ -1260,10 +1273,10 @@ enum nft_last_attributes { | ... | @@ -1260,10 +1273,10 @@ enum nft_last_attributes { |
| 1260 | /** | 1273 | /** |
| 1261 | * enum nft_log_attributes - nf_tables log expression netlink attributes | 1274 | * enum nft_log_attributes - nf_tables log expression netlink attributes |
| 1262 | * | 1275 | * |
| 1263 | * @NFTA_LOG_GROUP: netlink group to send messages to (NLA_U32) | 1276 | * @NFTA_LOG_GROUP: netlink group to send messages to (NLA_U16) |
| 1264 | * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING) | 1277 | * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING) |
| 1265 | * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32) | 1278 | * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32) |
| 1266 | * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U32) | 1279 | * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U16) |
| 1267 | * @NFTA_LOG_LEVEL: log level (NLA_U32) | 1280 | * @NFTA_LOG_LEVEL: log level (NLA_U32) |
| 1268 | * @NFTA_LOG_FLAGS: logging flags (NLA_U32) | 1281 | * @NFTA_LOG_FLAGS: logging flags (NLA_U32) |
| 1269 | */ | 1282 | */ |
lib/libc/include/any-linux-any/linux/netfilter/nfnetlink_hook.h+21-3| ... | @@ -32,8 +32,12 @@ enum nfnl_hook_attributes { | ... | @@ -32,8 +32,12 @@ enum nfnl_hook_attributes { |
| 32 | /** | 32 | /** |
| 33 | * enum nfnl_hook_chain_info_attributes - chain description | 33 | * enum nfnl_hook_chain_info_attributes - chain description |
| 34 | * | 34 | * |
| 35 | * NFNLA_HOOK_INFO_DESC: nft chain and table name (enum nft_table_attributes) (NLA_NESTED) | 35 | * @NFNLA_HOOK_INFO_DESC: nft chain and table name (NLA_NESTED) |
| 36 | * NFNLA_HOOK_INFO_TYPE: chain type (enum nfnl_hook_chaintype) (NLA_U32) | 36 | * @NFNLA_HOOK_INFO_TYPE: chain type (enum nfnl_hook_chaintype) (NLA_U32) |
| 37 | * | ||
| 38 | * NFNLA_HOOK_INFO_DESC depends on NFNLA_HOOK_INFO_TYPE value: | ||
| 39 | * NFNL_HOOK_TYPE_NFTABLES: enum nft_table_attributes | ||
| 40 | * NFNL_HOOK_TYPE_BPF: enum nfnl_hook_bpf_attributes | ||
| 37 | */ | 41 | */ |
| 38 | enum nfnl_hook_chain_info_attributes { | 42 | enum nfnl_hook_chain_info_attributes { |
| 39 | 	NFNLA_HOOK_INFO_UNSPEC, | 43 | 	NFNLA_HOOK_INFO_UNSPEC, |
| ... | @@ -55,10 +59,24 @@ enum nfnl_hook_chain_desc_attributes { | ... | @@ -55,10 +59,24 @@ enum nfnl_hook_chain_desc_attributes { |
| 55 | /** | 59 | /** |
| 56 | * enum nfnl_hook_chaintype - chain type | 60 | * enum nfnl_hook_chaintype - chain type |
| 57 | * | 61 | * |
| 58 | * @NFNL_HOOK_TYPE_NFTABLES nf_tables base chain | 62 | * @NFNL_HOOK_TYPE_NFTABLES: nf_tables base chain |
| 63 | * @NFNL_HOOK_TYPE_BPF: bpf program | ||
| 59 | */ | 64 | */ |
| 60 | enum nfnl_hook_chaintype { | 65 | enum nfnl_hook_chaintype { |
| 61 | 	NFNL_HOOK_TYPE_NFTABLES = 0x1, | 66 | 	NFNL_HOOK_TYPE_NFTABLES = 0x1, |
| 67 | 	NFNL_HOOK_TYPE_BPF, | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * enum nfnl_hook_bpf_attributes - bpf prog description | ||
| 72 | * | ||
| 73 | * @NFNLA_HOOK_BPF_ID: bpf program id (NLA_U32) | ||
| 74 | */ | ||
| 75 | enum nfnl_hook_bpf_attributes { | ||
| 76 | 	NFNLA_HOOK_BPF_UNSPEC, | ||
| 77 | 	NFNLA_HOOK_BPF_ID, | ||
| 78 | 	__NFNLA_HOOK_BPF_MAX, | ||
| 62 | }; | 79 | }; |
| 80 | #define NFNLA_HOOK_BPF_MAX (__NFNLA_HOOK_BPF_MAX - 1) | ||
| 63 | 81 | ||
| 64 | #endif /* _NFNL_HOOK_H */ | 82 | #endif /* _NFNL_HOOK_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/netfilter/nfnetlink_queue.h+1| ... | @@ -62,6 +62,7 @@ enum nfqnl_attr_type { | ... | @@ -62,6 +62,7 @@ enum nfqnl_attr_type { |
| 62 | 	NFQA_VLAN,			/* nested attribute: packet vlan info */ | 62 | 	NFQA_VLAN,			/* nested attribute: packet vlan info */ |
| 63 | 	NFQA_L2HDR,			/* full L2 header */ | 63 | 	NFQA_L2HDR,			/* full L2 header */ |
| 64 | 	NFQA_PRIORITY,			/* skb->priority */ | 64 | 	NFQA_PRIORITY,			/* skb->priority */ |
| 65 | 	NFQA_CGROUP_CLASSID,		/* __u32 cgroup classid */ | ||
| 65 | 66 | ||
| 66 | 	__NFQA_MAX | 67 | 	__NFQA_MAX |
| 67 | }; | 68 | }; |
lib/libc/include/any-linux-any/linux/netfilter_bridge/ebtables.h+12-10| ... | @@ -87,7 +87,7 @@ struct ebt_entries { | ... | @@ -87,7 +87,7 @@ struct ebt_entries { |
| 87 | 	/* nr. of entries */ | 87 | 	/* nr. of entries */ |
| 88 | 	unsigned int nentries; | 88 | 	unsigned int nentries; |
| 89 | 	/* entry list */ | 89 | 	/* entry list */ |
| 90 | 	char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 90 | 	char data[] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); |
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | /* used for the bitmask of struct ebt_entry */ | 93 | /* used for the bitmask of struct ebt_entry */ |
| ... | @@ -129,7 +129,7 @@ struct ebt_entry_match { | ... | @@ -129,7 +129,7 @@ struct ebt_entry_match { |
| 129 | 	} u; | 129 | 	} u; |
| 130 | 	/* size of data */ | 130 | 	/* size of data */ |
| 131 | 	unsigned int match_size; | 131 | 	unsigned int match_size; |
| 132 | 	unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 132 | 	unsigned char data[] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | struct ebt_entry_watcher { | 135 | struct ebt_entry_watcher { |
| ... | @@ -142,7 +142,7 @@ struct ebt_entry_watcher { | ... | @@ -142,7 +142,7 @@ struct ebt_entry_watcher { |
| 142 | 	} u; | 142 | 	} u; |
| 143 | 	/* size of data */ | 143 | 	/* size of data */ |
| 144 | 	unsigned int watcher_size; | 144 | 	unsigned int watcher_size; |
| 145 | 	unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 145 | 	unsigned char data[] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | struct ebt_entry_target { | 148 | struct ebt_entry_target { |
| ... | @@ -182,13 +182,15 @@ struct ebt_entry { | ... | @@ -182,13 +182,15 @@ struct ebt_entry { |
| 182 | 	unsigned char sourcemsk[ETH_ALEN]; | 182 | 	unsigned char sourcemsk[ETH_ALEN]; |
| 183 | 	unsigned char destmac[ETH_ALEN]; | 183 | 	unsigned char destmac[ETH_ALEN]; |
| 184 | 	unsigned char destmsk[ETH_ALEN]; | 184 | 	unsigned char destmsk[ETH_ALEN]; |
| 185 | 	/* sizeof ebt_entry + matches */ | 185 | 	__struct_group(/* no tag */, offsets, /* no attrs */, |
| 186 | 	unsigned int watchers_offset; | 186 | 		/* sizeof ebt_entry + matches */ |
| 187 | 	/* sizeof ebt_entry + matches + watchers */ | 187 | 		unsigned int watchers_offset; |
| 188 | 	unsigned int target_offset; | 188 | 		/* sizeof ebt_entry + matches + watchers */ |
| 189 | 	/* sizeof ebt_entry + matches + watchers + target */ | 189 | 		unsigned int target_offset; |
| 190 | 	unsigned int next_offset; | 190 | 		/* sizeof ebt_entry + matches + watchers + target */ |
| 191 | 	unsigned char elems[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 191 | 		unsigned int next_offset; |
| 192 | 	); | ||
| 193 | 	unsigned char elems[] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | ||
| 192 | }; | 194 | }; |
| 193 | 195 | ||
| 194 | static __inline__ struct ebt_entry_target * | 196 | static __inline__ struct ebt_entry_target * |
lib/libc/include/any-linux-any/linux/netlink.h+5| ... | @@ -294,6 +294,8 @@ struct nla_bitfield32 { | ... | @@ -294,6 +294,8 @@ struct nla_bitfield32 { |
| 294 | *	entry has attributes again, the policy for those inner ones | 294 | *	entry has attributes again, the policy for those inner ones |
| 295 | *	and the corresponding maxtype may be specified. | 295 | *	and the corresponding maxtype may be specified. |
| 296 | * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute | 296 | * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute |
| 297 | * @NL_ATTR_TYPE_SINT: 32-bit or 64-bit signed attribute, aligned to 4B | ||
| 298 | * @NL_ATTR_TYPE_UINT: 32-bit or 64-bit unsigned attribute, aligned to 4B | ||
| 297 | */ | 299 | */ |
| 298 | enum netlink_attribute_type { | 300 | enum netlink_attribute_type { |
| 299 | 	NL_ATTR_TYPE_INVALID, | 301 | 	NL_ATTR_TYPE_INVALID, |
| ... | @@ -318,6 +320,9 @@ enum netlink_attribute_type { | ... | @@ -318,6 +320,9 @@ enum netlink_attribute_type { |
| 318 | 	NL_ATTR_TYPE_NESTED_ARRAY, | 320 | 	NL_ATTR_TYPE_NESTED_ARRAY, |
| 319 | 321 | ||
| 320 | 	NL_ATTR_TYPE_BITFIELD32, | 322 | 	NL_ATTR_TYPE_BITFIELD32, |
| 323 | |||
| 324 | 	NL_ATTR_TYPE_SINT, | ||
| 325 | 	NL_ATTR_TYPE_UINT, | ||
| 321 | }; | 326 | }; |
| 322 | 327 | ||
| 323 | /** | 328 | /** |
lib/libc/include/any-linux-any/linux/nexthop.h+45| ... | @@ -30,6 +30,9 @@ enum { | ... | @@ -30,6 +30,9 @@ enum { |
| 30 | 30 | ||
| 31 | #define NEXTHOP_GRP_TYPE_MAX (__NEXTHOP_GRP_TYPE_MAX - 1) | 31 | #define NEXTHOP_GRP_TYPE_MAX (__NEXTHOP_GRP_TYPE_MAX - 1) |
| 32 | 32 | ||
| 33 | #define NHA_OP_FLAG_DUMP_STATS		BIT(0) | ||
| 34 | #define NHA_OP_FLAG_DUMP_HW_STATS	BIT(1) | ||
| 35 | |||
| 33 | enum { | 36 | enum { |
| 34 | 	NHA_UNSPEC, | 37 | 	NHA_UNSPEC, |
| 35 | 	NHA_ID,		/* u32; id for nexthop. id == 0 means auto-assign */ | 38 | 	NHA_ID,		/* u32; id for nexthop. id == 0 means auto-assign */ |
| ... | @@ -60,6 +63,18 @@ enum { | ... | @@ -60,6 +63,18 @@ enum { |
| 60 | 	/* nested; nexthop bucket attributes */ | 63 | 	/* nested; nexthop bucket attributes */ |
| 61 | 	NHA_RES_BUCKET, | 64 | 	NHA_RES_BUCKET, |
| 62 | 65 | ||
| 66 | 	/* u32; operation-specific flags */ | ||
| 67 | 	NHA_OP_FLAGS, | ||
| 68 | |||
| 69 | 	/* nested; nexthop group stats */ | ||
| 70 | 	NHA_GROUP_STATS, | ||
| 71 | |||
| 72 | 	/* u32; nexthop hardware stats enable */ | ||
| 73 | 	NHA_HW_STATS_ENABLE, | ||
| 74 | |||
| 75 | 	/* u32; read-only; whether any driver collects HW stats */ | ||
| 76 | 	NHA_HW_STATS_USED, | ||
| 77 | |||
| 63 | 	__NHA_MAX, | 78 | 	__NHA_MAX, |
| 64 | }; | 79 | }; |
| 65 | 80 | ||
| ... | @@ -101,4 +116,34 @@ enum { | ... | @@ -101,4 +116,34 @@ enum { |
| 101 | 116 | ||
| 102 | #define NHA_RES_BUCKET_MAX	(__NHA_RES_BUCKET_MAX - 1) | 117 | #define NHA_RES_BUCKET_MAX	(__NHA_RES_BUCKET_MAX - 1) |
| 103 | 118 | ||
| 119 | enum { | ||
| 120 | 	NHA_GROUP_STATS_UNSPEC, | ||
| 121 | |||
| 122 | 	/* nested; nexthop group entry stats */ | ||
| 123 | 	NHA_GROUP_STATS_ENTRY, | ||
| 124 | |||
| 125 | 	__NHA_GROUP_STATS_MAX, | ||
| 126 | }; | ||
| 127 | |||
| 128 | #define NHA_GROUP_STATS_MAX	(__NHA_GROUP_STATS_MAX - 1) | ||
| 129 | |||
| 130 | enum { | ||
| 131 | 	NHA_GROUP_STATS_ENTRY_UNSPEC, | ||
| 132 | |||
| 133 | 	/* u32; nexthop id of the nexthop group entry */ | ||
| 134 | 	NHA_GROUP_STATS_ENTRY_ID, | ||
| 135 | |||
| 136 | 	/* uint; number of packets forwarded via the nexthop group entry */ | ||
| 137 | 	NHA_GROUP_STATS_ENTRY_PACKETS, | ||
| 138 | |||
| 139 | 	/* uint; number of packets forwarded via the nexthop group entry in | ||
| 140 | 	 * hardware | ||
| 141 | 	 */ | ||
| 142 | 	NHA_GROUP_STATS_ENTRY_PACKETS_HW, | ||
| 143 | |||
| 144 | 	__NHA_GROUP_STATS_ENTRY_MAX, | ||
| 145 | }; | ||
| 146 | |||
| 147 | #define NHA_GROUP_STATS_ENTRY_MAX	(__NHA_GROUP_STATS_ENTRY_MAX - 1) | ||
| 148 | |||
| 104 | #endif | 149 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nfs.h-1| ... | @@ -61,7 +61,6 @@ | ... | @@ -61,7 +61,6 @@ |
| 61 | 	NFSERR_NOSPC = 28,		/* v2 v3 v4 */ | 61 | 	NFSERR_NOSPC = 28,		/* v2 v3 v4 */ |
| 62 | 	NFSERR_ROFS = 30,		/* v2 v3 v4 */ | 62 | 	NFSERR_ROFS = 30,		/* v2 v3 v4 */ |
| 63 | 	NFSERR_MLINK = 31,		/* v3 v4 */ | 63 | 	NFSERR_MLINK = 31,		/* v3 v4 */ |
| 64 | 	NFSERR_OPNOTSUPP = 45,		/* v2 v3 */ | ||
| 65 | 	NFSERR_NAMETOOLONG = 63,	/* v2 v3 v4 */ | 64 | 	NFSERR_NAMETOOLONG = 63,	/* v2 v3 v4 */ |
| 66 | 	NFSERR_NOTEMPTY = 66,		/* v2 v3 v4 */ | 65 | 	NFSERR_NOTEMPTY = 66,		/* v2 v3 v4 */ |
| 67 | 	NFSERR_DQUOT = 69,		/* v2 v3 v4 */ | 66 | 	NFSERR_DQUOT = 69,		/* v2 v3 v4 */ |
lib/libc/include/any-linux-any/linux/nfsd/export.h+13| ... | @@ -62,5 +62,18 @@ | ... | @@ -62,5 +62,18 @@ |
| 62 | 					| NFSEXP_ALLSQUASH \ | 62 | 					| NFSEXP_ALLSQUASH \ |
| 63 | 					| NFSEXP_INSECURE_PORT) | 63 | 					| NFSEXP_INSECURE_PORT) |
| 64 | 64 | ||
| 65 | /* | ||
| 66 | * Transport layer security policies that are permitted to access | ||
| 67 | * an export | ||
| 68 | */ | ||
| 69 | #define NFSEXP_XPRTSEC_NONE	0x0001 | ||
| 70 | #define NFSEXP_XPRTSEC_TLS	0x0002 | ||
| 71 | #define NFSEXP_XPRTSEC_MTLS	0x0004 | ||
| 72 | |||
| 73 | #define NFSEXP_XPRTSEC_NUM	(3) | ||
| 74 | |||
| 75 | #define NFSEXP_XPRTSEC_ALL	(NFSEXP_XPRTSEC_NONE | \ | ||
| 76 | 				 NFSEXP_XPRTSEC_TLS | \ | ||
| 77 | 				 NFSEXP_XPRTSEC_MTLS) | ||
| 65 | 78 | ||
| 66 | #endif /* NFSD_EXPORT_H */ | 79 | #endif /* NFSD_EXPORT_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nfsd_netlink.h created+86| ... | @@ -0,0 +1,86 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/nfsd.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_NFSD_NETLINK_H | ||
| 7 | #define _LINUX_NFSD_NETLINK_H | ||
| 8 | |||
| 9 | #define NFSD_FAMILY_NAME	"nfsd" | ||
| 10 | #define NFSD_FAMILY_VERSION	1 | ||
| 11 | |||
| 12 | enum { | ||
| 13 | 	NFSD_A_RPC_STATUS_XID = 1, | ||
| 14 | 	NFSD_A_RPC_STATUS_FLAGS, | ||
| 15 | 	NFSD_A_RPC_STATUS_PROG, | ||
| 16 | 	NFSD_A_RPC_STATUS_VERSION, | ||
| 17 | 	NFSD_A_RPC_STATUS_PROC, | ||
| 18 | 	NFSD_A_RPC_STATUS_SERVICE_TIME, | ||
| 19 | 	NFSD_A_RPC_STATUS_PAD, | ||
| 20 | 	NFSD_A_RPC_STATUS_SADDR4, | ||
| 21 | 	NFSD_A_RPC_STATUS_DADDR4, | ||
| 22 | 	NFSD_A_RPC_STATUS_SADDR6, | ||
| 23 | 	NFSD_A_RPC_STATUS_DADDR6, | ||
| 24 | 	NFSD_A_RPC_STATUS_SPORT, | ||
| 25 | 	NFSD_A_RPC_STATUS_DPORT, | ||
| 26 | 	NFSD_A_RPC_STATUS_COMPOUND_OPS, | ||
| 27 | |||
| 28 | 	__NFSD_A_RPC_STATUS_MAX, | ||
| 29 | 	NFSD_A_RPC_STATUS_MAX = (__NFSD_A_RPC_STATUS_MAX - 1) | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum { | ||
| 33 | 	NFSD_A_SERVER_THREADS = 1, | ||
| 34 | 	NFSD_A_SERVER_GRACETIME, | ||
| 35 | 	NFSD_A_SERVER_LEASETIME, | ||
| 36 | 	NFSD_A_SERVER_SCOPE, | ||
| 37 | |||
| 38 | 	__NFSD_A_SERVER_MAX, | ||
| 39 | 	NFSD_A_SERVER_MAX = (__NFSD_A_SERVER_MAX - 1) | ||
| 40 | }; | ||
| 41 | |||
| 42 | enum { | ||
| 43 | 	NFSD_A_VERSION_MAJOR = 1, | ||
| 44 | 	NFSD_A_VERSION_MINOR, | ||
| 45 | 	NFSD_A_VERSION_ENABLED, | ||
| 46 | |||
| 47 | 	__NFSD_A_VERSION_MAX, | ||
| 48 | 	NFSD_A_VERSION_MAX = (__NFSD_A_VERSION_MAX - 1) | ||
| 49 | }; | ||
| 50 | |||
| 51 | enum { | ||
| 52 | 	NFSD_A_SERVER_PROTO_VERSION = 1, | ||
| 53 | |||
| 54 | 	__NFSD_A_SERVER_PROTO_MAX, | ||
| 55 | 	NFSD_A_SERVER_PROTO_MAX = (__NFSD_A_SERVER_PROTO_MAX - 1) | ||
| 56 | }; | ||
| 57 | |||
| 58 | enum { | ||
| 59 | 	NFSD_A_SOCK_ADDR = 1, | ||
| 60 | 	NFSD_A_SOCK_TRANSPORT_NAME, | ||
| 61 | |||
| 62 | 	__NFSD_A_SOCK_MAX, | ||
| 63 | 	NFSD_A_SOCK_MAX = (__NFSD_A_SOCK_MAX - 1) | ||
| 64 | }; | ||
| 65 | |||
| 66 | enum { | ||
| 67 | 	NFSD_A_SERVER_SOCK_ADDR = 1, | ||
| 68 | |||
| 69 | 	__NFSD_A_SERVER_SOCK_MAX, | ||
| 70 | 	NFSD_A_SERVER_SOCK_MAX = (__NFSD_A_SERVER_SOCK_MAX - 1) | ||
| 71 | }; | ||
| 72 | |||
| 73 | enum { | ||
| 74 | 	NFSD_CMD_RPC_STATUS_GET = 1, | ||
| 75 | 	NFSD_CMD_THREADS_SET, | ||
| 76 | 	NFSD_CMD_THREADS_GET, | ||
| 77 | 	NFSD_CMD_VERSION_SET, | ||
| 78 | 	NFSD_CMD_VERSION_GET, | ||
| 79 | 	NFSD_CMD_LISTENER_SET, | ||
| 80 | 	NFSD_CMD_LISTENER_GET, | ||
| 81 | |||
| 82 | 	__NFSD_CMD_MAX, | ||
| 83 | 	NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1) | ||
| 84 | }; | ||
| 85 | |||
| 86 | #endif /* _LINUX_NFSD_NETLINK_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nl80211.h+418-176| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> | 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> |
| 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> | 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> |
| 13 | * Copyright 2015-2017	Intel Deutschland GmbH | 13 | * Copyright 2015-2017	Intel Deutschland GmbH |
| 14 | * Copyright (C) 2018-2022 Intel Corporation | 14 | * Copyright (C) 2018-2024 Intel Corporation |
| 15 | * | 15 | * |
| 16 | * Permission to use, copy, modify, and/or distribute this software for any | 16 | * Permission to use, copy, modify, and/or distribute this software for any |
| 17 | * purpose with or without fee is hereby granted, provided that the above | 17 | * purpose with or without fee is hereby granted, provided that the above |
| ... | @@ -72,7 +72,7 @@ | ... | @@ -72,7 +72,7 @@ |
| 72 | * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS | 72 | * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS |
| 73 | * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows: | 73 | * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows: |
| 74 | * - a setup station entry is added, not yet authorized, without any rate | 74 | * - a setup station entry is added, not yet authorized, without any rate |
| 75 | * or capability information, this just exists to avoid race conditions | 75 | * or capability information; this just exists to avoid race conditions |
| 76 | * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid | 76 | * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid |
| 77 | * to add rate and capability information to the station and at the same | 77 | * to add rate and capability information to the station and at the same |
| 78 | * time mark it authorized. | 78 | * time mark it authorized. |
| ... | @@ -87,7 +87,7 @@ | ... | @@ -87,7 +87,7 @@ |
| 87 | * DOC: Frame transmission/registration support | 87 | * DOC: Frame transmission/registration support |
| 88 | * | 88 | * |
| 89 | * Frame transmission and registration support exists to allow userspace | 89 | * Frame transmission and registration support exists to allow userspace |
| 90 | * management entities such as wpa_supplicant react to management frames | 90 | * management entities such as wpa_supplicant to react to management frames |
| 91 | * that are not being handled by the kernel. This includes, for example, | 91 | * that are not being handled by the kernel. This includes, for example, |
| 92 | * certain classes of action frames that cannot be handled in the kernel | 92 | * certain classes of action frames that cannot be handled in the kernel |
| 93 | * for various reasons. | 93 | * for various reasons. |
| ... | @@ -113,7 +113,7 @@ | ... | @@ -113,7 +113,7 @@ |
| 113 | * | 113 | * |
| 114 | * Frame transmission allows userspace to send for example the required | 114 | * Frame transmission allows userspace to send for example the required |
| 115 | * responses to action frames. It is subject to some sanity checking, | 115 | * responses to action frames. It is subject to some sanity checking, |
| 116 | * but many frames can be transmitted. When a frame was transmitted, its | 116 | * but many frames can be transmitted. When a frame is transmitted, its |
| 117 | * status is indicated to the sending socket. | 117 | * status is indicated to the sending socket. |
| 118 | * | 118 | * |
| 119 | * For more technical details, see the corresponding command descriptions | 119 | * For more technical details, see the corresponding command descriptions |
| ... | @@ -123,7 +123,7 @@ | ... | @@ -123,7 +123,7 @@ |
| 123 | /** | 123 | /** |
| 124 | * DOC: Virtual interface / concurrency capabilities | 124 | * DOC: Virtual interface / concurrency capabilities |
| 125 | * | 125 | * |
| 126 | * Some devices are able to operate with virtual MACs, they can have | 126 | * Some devices are able to operate with virtual MACs; they can have |
| 127 | * more than one virtual interface. The capability handling for this | 127 | * more than one virtual interface. The capability handling for this |
| 128 | * is a bit complex though, as there may be a number of restrictions | 128 | * is a bit complex though, as there may be a number of restrictions |
| 129 | * on the types of concurrency that are supported. | 129 | * on the types of concurrency that are supported. |
| ... | @@ -135,7 +135,7 @@ | ... | @@ -135,7 +135,7 @@ |
| 135 | * Once concurrency is desired, more attributes must be observed: | 135 | * Once concurrency is desired, more attributes must be observed: |
| 136 | * To start with, since some interface types are purely managed in | 136 | * To start with, since some interface types are purely managed in |
| 137 | * software, like the AP-VLAN type in mac80211 for example, there's | 137 | * software, like the AP-VLAN type in mac80211 for example, there's |
| 138 | * an additional list of these, they can be added at any time and | 138 | * an additional list of these; they can be added at any time and |
| 139 | * are only restricted by some semantic restrictions (e.g. AP-VLAN | 139 | * are only restricted by some semantic restrictions (e.g. AP-VLAN |
| 140 | * cannot be added without a corresponding AP interface). This list | 140 | * cannot be added without a corresponding AP interface). This list |
| 141 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. | 141 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. |
| ... | @@ -164,17 +164,17 @@ | ... | @@ -164,17 +164,17 @@ |
| 164 | * Packet coalesce feature helps to reduce number of received interrupts | 164 | * Packet coalesce feature helps to reduce number of received interrupts |
| 165 | * to host by buffering these packets in firmware/hardware for some | 165 | * to host by buffering these packets in firmware/hardware for some |
| 166 | * predefined time. Received interrupt will be generated when one of the | 166 | * predefined time. Received interrupt will be generated when one of the |
| 167 | * following events occur. | 167 | * following events occurs. |
| 168 | * a) Expiration of hardware timer whose expiration time is set to maximum | 168 | * a) Expiration of hardware timer whose expiration time is set to maximum |
| 169 | * coalescing delay of matching coalesce rule. | 169 | * coalescing delay of matching coalesce rule. |
| 170 | * b) Coalescing buffer in hardware reaches it's limit. | 170 | * b) Coalescing buffer in hardware reaches its limit. |
| 171 | * c) Packet doesn't match any of the configured coalesce rules. | 171 | * c) Packet doesn't match any of the configured coalesce rules. |
| 172 | * | 172 | * |
| 173 | * User needs to configure following parameters for creating a coalesce | 173 | * User needs to configure following parameters for creating a coalesce |
| 174 | * rule. | 174 | * rule. |
| 175 | * a) Maximum coalescing delay | 175 | * a) Maximum coalescing delay |
| 176 | * b) List of packet patterns which needs to be matched | 176 | * b) List of packet patterns which needs to be matched |
| 177 | * c) Condition for coalescence. pattern 'match' or 'no match' | 177 | * c) Condition for coalescence: pattern 'match' or 'no match' |
| 178 | * Multiple such rules can be created. | 178 | * Multiple such rules can be created. |
| 179 | */ | 179 | */ |
| 180 | 180 | ||
| ... | @@ -213,7 +213,7 @@ | ... | @@ -213,7 +213,7 @@ |
| 213 | /** | 213 | /** |
| 214 | * DOC: FILS shared key authentication offload | 214 | * DOC: FILS shared key authentication offload |
| 215 | * | 215 | * |
| 216 | * FILS shared key authentication offload can be advertized by drivers by | 216 | * FILS shared key authentication offload can be advertised by drivers by |
| 217 | * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support | 217 | * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support |
| 218 | * FILS shared key authentication offload should be able to construct the | 218 | * FILS shared key authentication offload should be able to construct the |
| 219 | * authentication and association frames for FILS shared key authentication and | 219 | * authentication and association frames for FILS shared key authentication and |
| ... | @@ -239,7 +239,7 @@ | ... | @@ -239,7 +239,7 @@ |
| 239 | * The PMKSA can be maintained in userspace persistently so that it can be used | 239 | * The PMKSA can be maintained in userspace persistently so that it can be used |
| 240 | * later after reboots or wifi turn off/on also. | 240 | * later after reboots or wifi turn off/on also. |
| 241 | * | 241 | * |
| 242 | * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertized by a FILS | 242 | * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertised by a FILS |
| 243 | * capable AP supporting PMK caching. It specifies the scope within which the | 243 | * capable AP supporting PMK caching. It specifies the scope within which the |
| 244 | * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and | 244 | * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and |
| 245 | * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based | 245 | * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based |
| ... | @@ -290,12 +290,12 @@ | ... | @@ -290,12 +290,12 @@ |
| 290 | * If the configuration needs to be applied for specific peer then the MAC | 290 | * If the configuration needs to be applied for specific peer then the MAC |
| 291 | * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the | 291 | * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the |
| 292 | * configuration will be applied for all the connected peers in the vif except | 292 | * configuration will be applied for all the connected peers in the vif except |
| 293 | * any peers that have peer specific configuration for the TID by default; if | 293 | * any peers that have peer-specific configuration for the TID by default; if |
| 294 | * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer specific values | 294 | * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer-specific values |
| 295 | * will be overwritten. | 295 | * will be overwritten. |
| 296 | * | 296 | * |
| 297 | * All this configuration is valid only for STA's current connection | 297 | * All this configuration is valid only for STA's current connection, |
| 298 | * i.e. the configuration will be reset to default when the STA connects back | 298 | * i.e., the configuration will be reset to default when the STA connects back |
| 299 | * after disconnection/roaming, and this configuration will be cleared when | 299 | * after disconnection/roaming, and this configuration will be cleared when |
| 300 | * the interface goes down. | 300 | * the interface goes down. |
| 301 | */ | 301 | */ |
| ... | @@ -326,7 +326,7 @@ | ... | @@ -326,7 +326,7 @@ |
| 326 | /** | 326 | /** |
| 327 | * DOC: Multi-Link Operation | 327 | * DOC: Multi-Link Operation |
| 328 | * | 328 | * |
| 329 | * In Multi-Link Operation, a connection between to MLDs utilizes multiple | 329 | * In Multi-Link Operation, a connection between two MLDs utilizes multiple |
| 330 | * links. To use this in nl80211, various commands and responses now need | 330 | * links. To use this in nl80211, various commands and responses now need |
| 331 | * to or will include the new %NL80211_ATTR_MLO_LINKS attribute. | 331 | * to or will include the new %NL80211_ATTR_MLO_LINKS attribute. |
| 332 | * Additionally, various commands that need to operate on a specific link | 332 | * Additionally, various commands that need to operate on a specific link |
| ... | @@ -334,6 +334,15 @@ | ... | @@ -334,6 +334,15 @@ |
| 334 | * use %NL80211_CMD_START_AP or similar functions. | 334 | * use %NL80211_CMD_START_AP or similar functions. |
| 335 | */ | 335 | */ |
| 336 | 336 | ||
| 337 | /** | ||
| 338 | * DOC: OWE DH IE handling offload | ||
| 339 | * | ||
| 340 | * By setting @NL80211_EXT_FEATURE_OWE_OFFLOAD flag, drivers can indicate | ||
| 341 | * kernel/application space to avoid DH IE handling. When this flag is | ||
| 342 | * advertised, the driver/device will take care of DH IE inclusion and | ||
| 343 | * processing of peer DH IE to generate PMK. | ||
| 344 | */ | ||
| 345 | |||
| 337 | /** | 346 | /** |
| 338 | * enum nl80211_commands - supported nl80211 commands | 347 | * enum nl80211_commands - supported nl80211 commands |
| 339 | * | 348 | * |
| ... | @@ -404,8 +413,8 @@ | ... | @@ -404,8 +413,8 @@ |
| 404 | *	are like for %NL80211_CMD_SET_BEACON, and additionally parameters that | 413 | *	are like for %NL80211_CMD_SET_BEACON, and additionally parameters that |
| 405 | *	do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL, | 414 | *	do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL, |
| 406 | *	%NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID, | 415 | *	%NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID, |
| 407 | *	%NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, | 416 | *	%NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHER_SUITES_PAIRWISE, |
| 408 | *	%NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, | 417 | *	%NL80211_ATTR_CIPHER_SUITE_GROUP, %NL80211_ATTR_WPA_VERSIONS, |
| 409 | *	%NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | 418 | *	%NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, |
| 410 | *	%NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT, | 419 | *	%NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT, |
| 411 | *	%NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS. | 420 | *	%NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS. |
| ... | @@ -429,23 +438,19 @@ | ... | @@ -429,23 +438,19 @@ |
| 429 | *	%NL80211_ATTR_REASON_CODE can optionally be used to specify which type | 438 | *	%NL80211_ATTR_REASON_CODE can optionally be used to specify which type |
| 430 | *	of disconnection indication should be sent to the station | 439 | *	of disconnection indication should be sent to the station |
| 431 | *	(Deauthentication or Disassociation frame and reason code for that | 440 | *	(Deauthentication or Disassociation frame and reason code for that |
| 432 | *	frame). | 441 | *	frame). %NL80211_ATTR_MLO_LINK_ID can be used optionally to remove |
| 442 | *	stations connected and using at least that link as one of its links. | ||
| 433 | * | 443 | * |
| 434 | * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to | 444 | * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to |
| 435 | * 	destination %NL80211_ATTR_MAC on the interface identified by | 445 | *	destination %NL80211_ATTR_MAC on the interface identified by |
| 436 | * 	%NL80211_ATTR_IFINDEX. | 446 | *	%NL80211_ATTR_IFINDEX. |
| 437 | * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to | 447 | * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to |
| 438 | * 	destination %NL80211_ATTR_MAC on the interface identified by | 448 | *	destination %NL80211_ATTR_MAC on the interface identified by |
| 439 | * 	%NL80211_ATTR_IFINDEX. | 449 | *	%NL80211_ATTR_IFINDEX. |
| 440 | * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by | 450 | * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by |
| 441 | *	%NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP. | 451 | *	%NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP. |
| 442 | * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by | 452 | * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by |
| 443 | *	%NL80211_ATTR_MAC. | 453 | *	%NL80211_ATTR_MAC. |
| 444 | * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the | ||
| 445 | *	interface identified by %NL80211_ATTR_IFINDEX. | ||
| 446 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC | ||
| 447 | *	or, if no MAC address given, all mesh paths, on the interface identified | ||
| 448 | *	by %NL80211_ATTR_IFINDEX. | ||
| 449 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by | 454 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by |
| 450 | *	%NL80211_ATTR_IFINDEX. | 455 | *	%NL80211_ATTR_IFINDEX. |
| 451 | * | 456 | * |
| ... | @@ -466,15 +471,15 @@ | ... | @@ -466,15 +471,15 @@ |
| 466 | *	after being queried by the kernel. CRDA replies by sending a regulatory | 471 | *	after being queried by the kernel. CRDA replies by sending a regulatory |
| 467 | *	domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our | 472 | *	domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our |
| 468 | *	current alpha2 if it found a match. It also provides | 473 | *	current alpha2 if it found a match. It also provides |
| 469 | * 	NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each | 474 | *	NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each |
| 470 | * 	regulatory rule is a nested set of attributes given by | 475 | *	regulatory rule is a nested set of attributes given by |
| 471 | * 	%NL80211_ATTR_REG_RULE_FREQ_[START|END] and | 476 | *	%NL80211_ATTR_REG_RULE_FREQ_[START|END] and |
| 472 | * 	%NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by | 477 | *	%NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by |
| 473 | * 	%NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and | 478 | *	%NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and |
| 474 | * 	%NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. | 479 | *	%NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. |
| 475 | * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain | 480 | * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain |
| 476 | * 	to the specified ISO/IEC 3166-1 alpha2 country code. The core will | 481 | *	to the specified ISO/IEC 3166-1 alpha2 country code. The core will |
| 477 | * 	store this as a valid request and then query userspace for it. | 482 | *	store this as a valid request and then query userspace for it. |
| 478 | * | 483 | * |
| 479 | * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the | 484 | * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the |
| 480 | *	interface identified by %NL80211_ATTR_IFINDEX | 485 | *	interface identified by %NL80211_ATTR_IFINDEX |
| ... | @@ -512,7 +517,7 @@ | ... | @@ -512,7 +517,7 @@ |
| 512 | *	%NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is | 517 | *	%NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is |
| 513 | *	not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, | 518 | *	not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, |
| 514 | *	scheduled scan will run in an infinite loop with the specified interval. | 519 | *	scheduled scan will run in an infinite loop with the specified interval. |
| 515 | *	These attributes are mutually exculsive, | 520 | *	These attributes are mutually exclusive, |
| 516 | *	i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if | 521 | *	i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if |
| 517 | *	NL80211_ATTR_SCHED_SCAN_PLANS is defined. | 522 | *	NL80211_ATTR_SCHED_SCAN_PLANS is defined. |
| 518 | *	If for some reason scheduled scan is aborted by the driver, all scan | 523 | *	If for some reason scheduled scan is aborted by the driver, all scan |
| ... | @@ -543,7 +548,7 @@ | ... | @@ -543,7 +548,7 @@ |
| 543 | *	%NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface | 548 | *	%NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface |
| 544 | *	is brought down while a scheduled scan was running. | 549 | *	is brought down while a scheduled scan was running. |
| 545 | * | 550 | * |
| 546 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | 551 | * @NL80211_CMD_GET_SURVEY: get survey results, e.g. channel occupation |
| 547 | * or noise level | 552 | * or noise level |
| 548 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 553 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
| 549 | *	NL80211_CMD_GET_SURVEY and on the "scan" multicast group) | 554 | *	NL80211_CMD_GET_SURVEY and on the "scan" multicast group) |
| ... | @@ -554,40 +559,41 @@ | ... | @@ -554,40 +559,41 @@ |
| 554 | *	using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID, | 559 | *	using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID, |
| 555 | *	%NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS | 560 | *	%NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS |
| 556 | *	authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier | 561 | *	authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier |
| 557 | *	advertized by a FILS capable AP identifying the scope of PMKSA in an | 562 | *	advertised by a FILS capable AP identifying the scope of PMKSA in an |
| 558 | *	ESS. | 563 | *	ESS. |
| 559 | * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC | 564 | * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC |
| 560 | *	(for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID, | 565 | *	(for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID, |
| 561 | *	%NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS | 566 | *	%NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS |
| 562 | *	authentication. | 567 | *	authentication. Additionally in case of SAE offload and OWE offloads |
| 568 | *	PMKSA entry can be deleted using %NL80211_ATTR_SSID. | ||
| 563 | * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. | 569 | * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. |
| 564 | * | 570 | * |
| 565 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | 571 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain |
| 566 | * 	has been changed and provides details of the request information | 572 | *	has been changed and provides details of the request information |
| 567 | * 	that caused the change such as who initiated the regulatory request | 573 | *	that caused the change such as who initiated the regulatory request |
| 568 | * 	(%NL80211_ATTR_REG_INITIATOR), the wiphy_idx | 574 | *	(%NL80211_ATTR_REG_INITIATOR), the wiphy_idx |
| 569 | * 	(%NL80211_ATTR_REG_ALPHA2) on which the request was made from if | 575 | *	(%NL80211_ATTR_REG_ALPHA2) on which the request was made from if |
| 570 | * 	the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or | 576 | *	the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or |
| 571 | * 	%NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain | 577 | *	%NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain |
| 572 | * 	set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is | 578 | *	set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is |
| 573 | * 	%NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | 579 | *	%NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on |
| 574 | * 	to (%NL80211_ATTR_REG_ALPHA2). | 580 | *	to (%NL80211_ATTR_REG_ALPHA2). |
| 575 | * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon | 581 | * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon |
| 576 | * 	has been found while world roaming thus enabling active scan or | 582 | *	has been found while world roaming thus enabling active scan or |
| 577 | * 	any mode of operation that initiates TX (beacons) on a channel | 583 | *	any mode of operation that initiates TX (beacons) on a channel |
| 578 | * 	where we would not have been able to do either before. As an example | 584 | *	where we would not have been able to do either before. As an example |
| 579 | * 	if you are world roaming (regulatory domain set to world or if your | 585 | *	if you are world roaming (regulatory domain set to world or if your |
| 580 | * 	driver is using a custom world roaming regulatory domain) and while | 586 | *	driver is using a custom world roaming regulatory domain) and while |
| 581 | * 	doing a passive scan on the 5 GHz band you find an AP there (if not | 587 | *	doing a passive scan on the 5 GHz band you find an AP there (if not |
| 582 | * 	on a DFS channel) you will now be able to actively scan for that AP | 588 | *	on a DFS channel) you will now be able to actively scan for that AP |
| 583 | * 	or use AP mode on your card on that same channel. Note that this will | 589 | *	or use AP mode on your card on that same channel. Note that this will |
| 584 | * 	never be used for channels 1-11 on the 2 GHz band as they are always | 590 | *	never be used for channels 1-11 on the 2 GHz band as they are always |
| 585 | * 	enabled world wide. This beacon hint is only sent if your device had | 591 | *	enabled world wide. This beacon hint is only sent if your device had |
| 586 | * 	either disabled active scanning or beaconing on a channel. We send to | 592 | *	either disabled active scanning or beaconing on a channel. We send to |
| 587 | * 	userspace the wiphy on which we removed a restriction from | 593 | *	userspace the wiphy on which we removed a restriction from |
| 588 | * 	(%NL80211_ATTR_WIPHY) and the channel on which this occurred | 594 | *	(%NL80211_ATTR_WIPHY) and the channel on which this occurred |
| 589 | * 	before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER) | 595 | *	before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER) |
| 590 | * 	the beacon hint was processed. | 596 | *	the beacon hint was processed. |
| 591 | * | 597 | * |
| 592 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. | 598 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. |
| 593 | *	This command is used both as a command (request to authenticate) and | 599 | *	This command is used both as a command (request to authenticate) and |
| ... | @@ -598,7 +604,7 @@ | ... | @@ -598,7 +604,7 @@ |
| 598 | *	BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify | 604 | *	BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify |
| 599 | *	the SSID (mainly for association, but is included in authentication | 605 | *	the SSID (mainly for association, but is included in authentication |
| 600 | *	request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ + | 606 | *	request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ + |
| 601 | *	%NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the | 607 | *	%NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequency of the |
| 602 | *	channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the | 608 | *	channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the |
| 603 | *	authentication type. %NL80211_ATTR_IE is used to define IEs | 609 | *	authentication type. %NL80211_ATTR_IE is used to define IEs |
| 604 | *	(VendorSpecificInfo, but also including RSN IE and FT IEs) to be added | 610 | *	(VendorSpecificInfo, but also including RSN IE and FT IEs) to be added |
| ... | @@ -807,7 +813,7 @@ | ... | @@ -807,7 +813,7 @@ |
| 807 | *	reached. | 813 | *	reached. |
| 808 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ | 814 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ |
| 809 | *	and the attributes determining channel width) the given interface | 815 | *	and the attributes determining channel width) the given interface |
| 810 | *	(identifed by %NL80211_ATTR_IFINDEX) shall operate on. | 816 | *	(identified by %NL80211_ATTR_IFINDEX) shall operate on. |
| 811 | *	In case multiple channels are supported by the device, the mechanism | 817 | *	In case multiple channels are supported by the device, the mechanism |
| 812 | *	with which it switches channels is implementation-defined. | 818 | *	with which it switches channels is implementation-defined. |
| 813 | *	When a monitor interface is given, it can only switch channel while | 819 | *	When a monitor interface is given, it can only switch channel while |
| ... | @@ -879,7 +885,7 @@ | ... | @@ -879,7 +885,7 @@ |
| 879 | *	inform userspace of the new replay counter. | 885 | *	inform userspace of the new replay counter. |
| 880 | * | 886 | * |
| 881 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace | 887 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace |
| 882 | *	of PMKSA caching dandidates. | 888 | *	of PMKSA caching candidates. |
| 883 | * | 889 | * |
| 884 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). | 890 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). |
| 885 | *	In addition, this can be used as an event to request userspace to take | 891 | *	In addition, this can be used as an event to request userspace to take |
| ... | @@ -915,7 +921,7 @@ | ... | @@ -915,7 +921,7 @@ |
| 915 | * | 921 | * |
| 916 | * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface | 922 | * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface |
| 917 | *	by sending a null data frame to it and reporting when the frame is | 923 | *	by sending a null data frame to it and reporting when the frame is |
| 918 | *	acknowleged. This is used to allow timing out inactive clients. Uses | 924 | *	acknowledged. This is used to allow timing out inactive clients. Uses |
| 919 | *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a | 925 | *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a |
| 920 | *	direct reply with an %NL80211_ATTR_COOKIE that is later used to match | 926 | *	direct reply with an %NL80211_ATTR_COOKIE that is later used to match |
| 921 | *	up the event with the request. The event includes the same data and | 927 | *	up the event with the request. The event includes the same data and |
| ... | @@ -1109,7 +1115,7 @@ | ... | @@ -1109,7 +1115,7 @@ |
| 1109 | *	current configuration is not changed. If it is present but | 1115 | *	current configuration is not changed. If it is present but |
| 1110 | *	set to zero, the configuration is changed to don't-care | 1116 | *	set to zero, the configuration is changed to don't-care |
| 1111 | *	(i.e. the device can decide what to do). | 1117 | *	(i.e. the device can decide what to do). |
| 1112 | * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported. | 1118 | * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported. |
| 1113 | *	This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and | 1119 | *	This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and |
| 1114 | *	%NL80211_ATTR_COOKIE. | 1120 | *	%NL80211_ATTR_COOKIE. |
| 1115 | * | 1121 | * |
| ... | @@ -1126,11 +1132,15 @@ | ... | @@ -1126,11 +1132,15 @@ |
| 1126 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously | 1132 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously |
| 1127 | *	configured PMK for the authenticator address identified by | 1133 | *	configured PMK for the authenticator address identified by |
| 1128 | *	%NL80211_ATTR_MAC. | 1134 | *	%NL80211_ATTR_MAC. |
| 1129 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was | 1135 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates port is authorized and |
| 1130 | *	completed successfully. Drivers that support 4 way handshake offload | 1136 | *	open for regular data traffic. For STA/P2P-client, this event is sent |
| 1131 | *	should send this event after indicating 802.1X FT assocation with | 1137 | *	with AP MAC address and for AP/P2P-GO, the event carries the STA/P2P- |
| 1132 | *	%NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT | 1138 | *	client MAC address. |
| 1133 | *	should be indicated instead. | 1139 | *	Drivers that support 4 way handshake offload should send this event for |
| 1140 | *	STA/P2P-client after successful 4-way HS or after 802.1X FT following | ||
| 1141 | *	NL80211_CMD_CONNECT or NL80211_CMD_ROAM. Drivers using AP/P2P-GO 4-way | ||
| 1142 | *	handshake offload should send this event on successful completion of | ||
| 1143 | *	4-way handshake with the peer (STA/P2P-client). | ||
| 1134 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request | 1144 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request |
| 1135 | *	and RX notification. This command is used both as a request to transmit | 1145 | *	and RX notification. This command is used both as a request to transmit |
| 1136 | *	a control port frame and as a notification that a control port frame | 1146 | *	a control port frame and as a notification that a control port frame |
| ... | @@ -1299,6 +1309,26 @@ | ... | @@ -1299,6 +1309,26 @@ |
| 1299 | * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station | 1309 | * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station |
| 1300 | * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station | 1310 | * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station |
| 1301 | * | 1311 | * |
| 1312 | * @NL80211_CMD_SET_HW_TIMESTAMP: Enable/disable HW timestamping of Timing | ||
| 1313 | *	measurement and Fine timing measurement frames. If %NL80211_ATTR_MAC | ||
| 1314 | *	is included, enable/disable HW timestamping only for frames to/from the | ||
| 1315 | *	specified MAC address. Otherwise enable/disable HW timestamping for | ||
| 1316 | *	all TM/FTM frames (including ones that were enabled with specific MAC | ||
| 1317 | *	address). If %NL80211_ATTR_HW_TIMESTAMP_ENABLED is not included, disable | ||
| 1318 | *	HW timestamping. | ||
| 1319 | *	The number of peers that HW timestamping can be enabled for concurrently | ||
| 1320 | *	is indicated by %NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS. | ||
| 1321 | * | ||
| 1322 | * @NL80211_CMD_LINKS_REMOVED: Notify userspace about the removal of STA MLD | ||
| 1323 | *	setup links due to AP MLD removing the corresponding affiliated APs with | ||
| 1324 | *	Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide | ||
| 1325 | *	information about the removed STA MLD setup links. | ||
| 1326 | * | ||
| 1327 | * @NL80211_CMD_SET_TID_TO_LINK_MAPPING: Set the TID to Link Mapping for a | ||
| 1328 | * non-AP MLD station. The %NL80211_ATTR_MLO_TTLM_DLINK and | ||
| 1329 | * %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the | ||
| 1330 | * TID to Link mapping for downlink/uplink traffic. | ||
| 1331 | * | ||
| 1302 | * @NL80211_CMD_MAX: highest used command number | 1332 | * @NL80211_CMD_MAX: highest used command number |
| 1303 | * @__NL80211_CMD_AFTER_LAST: internal use | 1333 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1304 | */ | 1334 | */ |
| ... | @@ -1550,6 +1580,12 @@ enum nl80211_commands { | ... | @@ -1550,6 +1580,12 @@ enum nl80211_commands { |
| 1550 | 	NL80211_CMD_MODIFY_LINK_STA, | 1580 | 	NL80211_CMD_MODIFY_LINK_STA, |
| 1551 | 	NL80211_CMD_REMOVE_LINK_STA, | 1581 | 	NL80211_CMD_REMOVE_LINK_STA, |
| 1552 | 1582 | ||
| 1583 | 	NL80211_CMD_SET_HW_TIMESTAMP, | ||
| 1584 | |||
| 1585 | 	NL80211_CMD_LINKS_REMOVED, | ||
| 1586 | |||
| 1587 | 	NL80211_CMD_SET_TID_TO_LINK_MAPPING, | ||
| 1588 | |||
| 1553 | 	/* add new commands above here */ | 1589 | 	/* add new commands above here */ |
| 1554 | 1590 | ||
| 1555 | 	/* used to define NL80211_CMD_MAX below */ | 1591 | 	/* used to define NL80211_CMD_MAX below */ |
| ... | @@ -1674,21 +1710,21 @@ enum nl80211_commands { | ... | @@ -1674,21 +1710,21 @@ enum nl80211_commands { |
| 1674 | *	(see &enum nl80211_plink_action). | 1710 | *	(see &enum nl80211_plink_action). |
| 1675 | * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. | 1711 | * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. |
| 1676 | * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path | 1712 | * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path |
| 1677 | * 	info given for %NL80211_CMD_GET_MPATH, nested attribute described at | 1713 | *	info given for %NL80211_CMD_GET_MPATH, nested attribute described at |
| 1678 | *	&enum nl80211_mpath_info. | 1714 | *	&enum nl80211_mpath_info. |
| 1679 | * | 1715 | * |
| 1680 | * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of | 1716 | * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of |
| 1681 | * &enum nl80211_mntr_flags. | 1717 | * &enum nl80211_mntr_flags. |
| 1682 | * | 1718 | * |
| 1683 | * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the | 1719 | * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the |
| 1684 | * 	current regulatory domain should be set to or is already set to. | 1720 | *	current regulatory domain should be set to or is already set to. |
| 1685 | * 	For example, 'CR', for Costa Rica. This attribute is used by the kernel | 1721 | *	For example, 'CR', for Costa Rica. This attribute is used by the kernel |
| 1686 | * 	to query the CRDA to retrieve one regulatory domain. This attribute can | 1722 | *	to query the CRDA to retrieve one regulatory domain. This attribute can |
| 1687 | * 	also be used by userspace to query the kernel for the currently set | 1723 | *	also be used by userspace to query the kernel for the currently set |
| 1688 | * 	regulatory domain. We chose an alpha2 as that is also used by the | 1724 | *	regulatory domain. We chose an alpha2 as that is also used by the |
| 1689 | * 	IEEE-802.11 country information element to identify a country. | 1725 | *	IEEE-802.11 country information element to identify a country. |
| 1690 | * 	Users can also simply ask the wireless core to set regulatory domain | 1726 | *	Users can also simply ask the wireless core to set regulatory domain |
| 1691 | * 	to a specific alpha2. | 1727 | *	to a specific alpha2. |
| 1692 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory | 1728 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory |
| 1693 | *	rules. | 1729 | *	rules. |
| 1694 | * | 1730 | * |
| ... | @@ -1731,9 +1767,9 @@ enum nl80211_commands { | ... | @@ -1731,9 +1767,9 @@ enum nl80211_commands { |
| 1731 | * @NL80211_ATTR_BSS: scan result BSS | 1767 | * @NL80211_ATTR_BSS: scan result BSS |
| 1732 | * | 1768 | * |
| 1733 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | 1769 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain |
| 1734 | * 	currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_* | 1770 | *	currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_* |
| 1735 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | 1771 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently |
| 1736 | * 	set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | 1772 | *	set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) |
| 1737 | * | 1773 | * |
| 1738 | * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies | 1774 | * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies |
| 1739 | *	an array of command numbers (i.e. a mapping index to command number) | 1775 | *	an array of command numbers (i.e. a mapping index to command number) |
| ... | @@ -1752,15 +1788,15 @@ enum nl80211_commands { | ... | @@ -1752,15 +1788,15 @@ enum nl80211_commands { |
| 1752 | *	a u32 | 1788 | *	a u32 |
| 1753 | * | 1789 | * |
| 1754 | * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change | 1790 | * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change |
| 1755 | * 	due to considerations from a beacon hint. This attribute reflects | 1791 | *	due to considerations from a beacon hint. This attribute reflects |
| 1756 | * 	the state of the channel _before_ the beacon hint processing. This | 1792 | *	the state of the channel _before_ the beacon hint processing. This |
| 1757 | * 	attributes consists of a nested attribute containing | 1793 | *	attributes consists of a nested attribute containing |
| 1758 | * 	NL80211_FREQUENCY_ATTR_* | 1794 | *	NL80211_FREQUENCY_ATTR_* |
| 1759 | * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change | 1795 | * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change |
| 1760 | * 	due to considerations from a beacon hint. This attribute reflects | 1796 | *	due to considerations from a beacon hint. This attribute reflects |
| 1761 | * 	the state of the channel _after_ the beacon hint processing. This | 1797 | *	the state of the channel _after_ the beacon hint processing. This |
| 1762 | * 	attributes consists of a nested attribute containing | 1798 | *	attributes consists of a nested attribute containing |
| 1763 | * 	NL80211_FREQUENCY_ATTR_* | 1799 | *	NL80211_FREQUENCY_ATTR_* |
| 1764 | * | 1800 | * |
| 1765 | * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported | 1801 | * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported |
| 1766 | *	cipher suites | 1802 | *	cipher suites |
| ... | @@ -1807,7 +1843,7 @@ enum nl80211_commands { | ... | @@ -1807,7 +1843,7 @@ enum nl80211_commands { |
| 1807 | *	using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is | 1843 | *	using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is |
| 1808 | *	to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER | 1844 | *	to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER |
| 1809 | *	flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth | 1845 | *	flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth |
| 1810 | *	frames are not forwared over the control port. | 1846 | *	frames are not forwarded over the control port. |
| 1811 | * | 1847 | * |
| 1812 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | 1848 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. |
| 1813 | *	We recommend using nested, driver-specific attributes within this. | 1849 | *	We recommend using nested, driver-specific attributes within this. |
| ... | @@ -1821,12 +1857,6 @@ enum nl80211_commands { | ... | @@ -1821,12 +1857,6 @@ enum nl80211_commands { |
| 1821 | *	that protected APs should be used. This is also used with NEW_BEACON to | 1857 | *	that protected APs should be used. This is also used with NEW_BEACON to |
| 1822 | *	indicate that the BSS is to use protection. | 1858 | *	indicate that the BSS is to use protection. |
| 1823 | * | 1859 | * |
| 1824 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON | ||
| 1825 | *	to indicate which unicast key ciphers will be used with the connection | ||
| 1826 | *	(an array of u32). | ||
| 1827 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to | ||
| 1828 | *	indicate which group key cipher will be used with the connection (a | ||
| 1829 | *	u32). | ||
| 1830 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to | 1860 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to |
| 1831 | *	indicate which WPA version(s) the AP we want to associate with is using | 1861 | *	indicate which WPA version(s) the AP we want to associate with is using |
| 1832 | *	(a u32 with flags from &enum nl80211_wpa_versions). | 1862 | *	(a u32 with flags from &enum nl80211_wpa_versions). |
| ... | @@ -1857,6 +1887,7 @@ enum nl80211_commands { | ... | @@ -1857,6 +1887,7 @@ enum nl80211_commands { |
| 1857 | *	with %NL80211_KEY_* sub-attributes | 1887 | *	with %NL80211_KEY_* sub-attributes |
| 1858 | * | 1888 | * |
| 1859 | * @NL80211_ATTR_PID: Process ID of a network namespace. | 1889 | * @NL80211_ATTR_PID: Process ID of a network namespace. |
| 1890 | * @NL80211_ATTR_NETNS_FD: File descriptor of a network namespace. | ||
| 1860 | * | 1891 | * |
| 1861 | * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for | 1892 | * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for |
| 1862 | *	dumps. This number increases whenever the object list being | 1893 | *	dumps. This number increases whenever the object list being |
| ... | @@ -1911,6 +1942,7 @@ enum nl80211_commands { | ... | @@ -1911,6 +1942,7 @@ enum nl80211_commands { |
| 1911 | * | 1942 | * |
| 1912 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 1943 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
| 1913 | *	acknowledged by the recipient. | 1944 | *	acknowledged by the recipient. |
| 1945 | * @NL80211_ATTR_ACK_SIGNAL: Station's ack signal strength (s32) | ||
| 1914 | * | 1946 | * |
| 1915 | * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values. | 1947 | * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values. |
| 1916 | * | 1948 | * |
| ... | @@ -1944,10 +1976,10 @@ enum nl80211_commands { | ... | @@ -1944,10 +1976,10 @@ enum nl80211_commands { |
| 1944 | *	bit. Depending on which antennas are selected in the bitmap, 802.11n | 1976 | *	bit. Depending on which antennas are selected in the bitmap, 802.11n |
| 1945 | *	drivers can derive which chainmasks to use (if all antennas belonging to | 1977 | *	drivers can derive which chainmasks to use (if all antennas belonging to |
| 1946 | *	a particular chain are disabled this chain should be disabled) and if | 1978 | *	a particular chain are disabled this chain should be disabled) and if |
| 1947 | *	a chain has diversity antennas wether diversity should be used or not. | 1979 | *	a chain has diversity antennas whether diversity should be used or not. |
| 1948 | *	HT capabilities (STBC, TX Beamforming, Antenna selection) can be | 1980 | *	HT capabilities (STBC, TX Beamforming, Antenna selection) can be |
| 1949 | *	derived from the available chains after applying the antenna mask. | 1981 | *	derived from the available chains after applying the antenna mask. |
| 1950 | *	Non-802.11n drivers can derive wether to use diversity or not. | 1982 | *	Non-802.11n drivers can derive whether to use diversity or not. |
| 1951 | *	Drivers may reject configurations or RX/TX mask combinations they cannot | 1983 | *	Drivers may reject configurations or RX/TX mask combinations they cannot |
| 1952 | *	support by returning -EINVAL. | 1984 | *	support by returning -EINVAL. |
| 1953 | * | 1985 | * |
| ... | @@ -2108,6 +2140,9 @@ enum nl80211_commands { | ... | @@ -2108,6 +2140,9 @@ enum nl80211_commands { |
| 2108 | * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable | 2140 | * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable |
| 2109 | * this feature during association. This is a flag attribute. | 2141 | * this feature during association. This is a flag attribute. |
| 2110 | *	Currently only supported in mac80211 drivers. | 2142 | *	Currently only supported in mac80211 drivers. |
| 2143 | * @NL80211_ATTR_DISABLE_EHT: Force EHT capable interfaces to disable | ||
| 2144 | * this feature during association. This is a flag attribute. | ||
| 2145 | *	Currently only supported in mac80211 drivers. | ||
| 2111 | * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the | 2146 | * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the |
| 2112 | * ATTR_HT_CAPABILITY to which attention should be paid. | 2147 | * ATTR_HT_CAPABILITY to which attention should be paid. |
| 2113 | * Currently, only mac80211 NICs support this feature. | 2148 | * Currently, only mac80211 NICs support this feature. |
| ... | @@ -2117,6 +2152,12 @@ enum nl80211_commands { | ... | @@ -2117,6 +2152,12 @@ enum nl80211_commands { |
| 2117 | * All values are treated as suggestions and may be ignored | 2152 | * All values are treated as suggestions and may be ignored |
| 2118 | * by the driver as required. The actual values may be seen in | 2153 | * by the driver as required. The actual values may be seen in |
| 2119 | * the station debugfs ht_caps file. | 2154 | * the station debugfs ht_caps file. |
| 2155 | * @NL80211_ATTR_VHT_CAPABILITY_MASK: Specify which bits of the | ||
| 2156 | * ATTR_VHT_CAPABILITY to which attention should be paid. | ||
| 2157 | * Currently, only mac80211 NICs support this feature. | ||
| 2158 | * All values are treated as suggestions and may be ignored | ||
| 2159 | * by the driver as required. The actual values may be seen in | ||
| 2160 | * the station debugfs vht_caps file. | ||
| 2120 | * | 2161 | * |
| 2121 | * @NL80211_ATTR_DFS_REGION: region for regulatory rules which this country | 2162 | * @NL80211_ATTR_DFS_REGION: region for regulatory rules which this country |
| 2122 | * abides to when initiating radiation on DFS channels. A country maps | 2163 | * abides to when initiating radiation on DFS channels. A country maps |
| ... | @@ -2375,7 +2416,7 @@ enum nl80211_commands { | ... | @@ -2375,7 +2416,7 @@ enum nl80211_commands { |
| 2375 | *	scheduled scan is started. Or the delay before a WoWLAN | 2416 | *	scheduled scan is started. Or the delay before a WoWLAN |
| 2376 | *	net-detect scan is started, counting from the moment the | 2417 | *	net-detect scan is started, counting from the moment the |
| 2377 | *	system is suspended. This value is a u32, in seconds. | 2418 | *	system is suspended. This value is a u32, in seconds. |
| 2378 | 2419 | * | |
| 2379 | * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device | 2420 | * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device |
| 2380 | * is operating in an indoor environment. | 2421 | * is operating in an indoor environment. |
| 2381 | * | 2422 | * |
| ... | @@ -2517,7 +2558,7 @@ enum nl80211_commands { | ... | @@ -2517,7 +2558,7 @@ enum nl80211_commands { |
| 2517 | *	from successful FILS authentication and is used with | 2558 | *	from successful FILS authentication and is used with |
| 2518 | *	%NL80211_CMD_CONNECT. | 2559 | *	%NL80211_CMD_CONNECT. |
| 2519 | * | 2560 | * |
| 2520 | * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertized by a FILS AP | 2561 | * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertised by a FILS AP |
| 2521 | *	identifying the scope of PMKSAs. This is used with | 2562 | *	identifying the scope of PMKSAs. This is used with |
| 2522 | *	@NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA. | 2563 | *	@NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA. |
| 2523 | * | 2564 | * |
| ... | @@ -2671,11 +2712,13 @@ enum nl80211_commands { | ... | @@ -2671,11 +2712,13 @@ enum nl80211_commands { |
| 2671 | * | 2712 | * |
| 2672 | * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS | 2713 | * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS |
| 2673 | *	discovery. It is a nested attribute, see | 2714 | *	discovery. It is a nested attribute, see |
| 2674 | *	&enum nl80211_fils_discovery_attributes. | 2715 | *	&enum nl80211_fils_discovery_attributes. Userspace should pass an empty |
| 2716 | *	nested attribute to disable this feature and delete the templates. | ||
| 2675 | * | 2717 | * |
| 2676 | * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure | 2718 | * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure |
| 2677 | *	unsolicited broadcast probe response. It is a nested attribute, see | 2719 | *	unsolicited broadcast probe response. It is a nested attribute, see |
| 2678 | *	&enum nl80211_unsol_bcast_probe_resp_attributes. | 2720 | *	&enum nl80211_unsol_bcast_probe_resp_attributes. Userspace should pass an empty |
| 2721 | *	nested attribute to disable this feature and delete the templates. | ||
| 2679 | * | 2722 | * |
| 2680 | * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from | 2723 | * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from |
| 2681 | *	association request when used with NL80211_CMD_NEW_STATION) | 2724 | *	association request when used with NL80211_CMD_NEW_STATION) |
| ... | @@ -2775,6 +2818,44 @@ enum nl80211_commands { | ... | @@ -2775,6 +2818,44 @@ enum nl80211_commands { |
| 2775 | *	indicates that the sub-channel is punctured. Higher 16 bits are | 2818 | *	indicates that the sub-channel is punctured. Higher 16 bits are |
| 2776 | *	reserved. | 2819 | *	reserved. |
| 2777 | * | 2820 | * |
| 2821 | * @NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS: Maximum number of peers that HW | ||
| 2822 | *	timestamping can be enabled for concurrently (u16), a wiphy attribute. | ||
| 2823 | *	A value of 0xffff indicates setting for all peers (i.e. not specifying | ||
| 2824 | *	an address with %NL80211_CMD_SET_HW_TIMESTAMP) is supported. | ||
| 2825 | * @NL80211_ATTR_HW_TIMESTAMP_ENABLED: Indicates whether HW timestamping should | ||
| 2826 | *	be enabled or not (flag attribute). | ||
| 2827 | * | ||
| 2828 | * @NL80211_ATTR_EMA_RNR_ELEMS: Optional nested attribute for | ||
| 2829 | *	reduced neighbor report (RNR) elements. This attribute can be used | ||
| 2830 | *	only when NL80211_MBSSID_CONFIG_ATTR_EMA is enabled. | ||
| 2831 | *	Userspace is responsible for splitting the RNR into multiple | ||
| 2832 | *	elements such that each element excludes the non-transmitting | ||
| 2833 | *	profiles already included in the MBSSID element | ||
| 2834 | *	(%NL80211_ATTR_MBSSID_ELEMS) at the same index. Each EMA beacon | ||
| 2835 | *	will be generated by adding MBSSID and RNR elements at the same | ||
| 2836 | *	index. If the userspace includes more RNR elements than number of | ||
| 2837 | *	MBSSID elements then these will be added in every EMA beacon. | ||
| 2838 | * | ||
| 2839 | * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is | ||
| 2840 | *	disabled. | ||
| 2841 | * | ||
| 2842 | * @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e. | ||
| 2843 | *	include BSSes that can only be used in restricted scenarios and/or | ||
| 2844 | *	cannot be used at all. | ||
| 2845 | * | ||
| 2846 | * @NL80211_ATTR_MLO_TTLM_DLINK: Binary attribute specifying the downlink TID to | ||
| 2847 | * link mapping. The length is 8 * sizeof(u16). For each TID the link | ||
| 2848 | * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element) | ||
| 2849 | * in Draft P802.11be_D4.0. | ||
| 2850 | * @NL80211_ATTR_MLO_TTLM_ULINK: Binary attribute specifying the uplink TID to | ||
| 2851 | * link mapping. The length is 8 * sizeof(u16). For each TID the link | ||
| 2852 | * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element) | ||
| 2853 | * in Draft P802.11be_D4.0. | ||
| 2854 | * | ||
| 2855 | * @NL80211_ATTR_ASSOC_SPP_AMSDU: flag attribute used with | ||
| 2856 | *	%NL80211_CMD_ASSOCIATE indicating the SPP A-MSDUs | ||
| 2857 | *	are used on this connection | ||
| 2858 | * | ||
| 2778 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2859 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2779 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2860 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2780 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2861 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| ... | @@ -3306,6 +3387,20 @@ enum nl80211_attrs { | ... | @@ -3306,6 +3387,20 @@ enum nl80211_attrs { |
| 3306 | 3387 | ||
| 3307 | 	NL80211_ATTR_PUNCT_BITMAP, | 3388 | 	NL80211_ATTR_PUNCT_BITMAP, |
| 3308 | 3389 | ||
| 3390 | 	NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS, | ||
| 3391 | 	NL80211_ATTR_HW_TIMESTAMP_ENABLED, | ||
| 3392 | |||
| 3393 | 	NL80211_ATTR_EMA_RNR_ELEMS, | ||
| 3394 | |||
| 3395 | 	NL80211_ATTR_MLO_LINK_DISABLED, | ||
| 3396 | |||
| 3397 | 	NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA, | ||
| 3398 | |||
| 3399 | 	NL80211_ATTR_MLO_TTLM_DLINK, | ||
| 3400 | 	NL80211_ATTR_MLO_TTLM_ULINK, | ||
| 3401 | |||
| 3402 | 	NL80211_ATTR_ASSOC_SPP_AMSDU, | ||
| 3403 | |||
| 3309 | 	/* add attributes here, update the policy in nl80211.c */ | 3404 | 	/* add attributes here, update the policy in nl80211.c */ |
| 3310 | 3405 | ||
| 3311 | 	__NL80211_ATTR_AFTER_LAST, | 3406 | 	__NL80211_ATTR_AFTER_LAST, |
| ... | @@ -3446,6 +3541,7 @@ enum nl80211_iftype { | ... | @@ -3446,6 +3541,7 @@ enum nl80211_iftype { |
| 3446 | * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers | 3541 | * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers |
| 3447 | *	that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a | 3542 | *	that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a |
| 3448 | *	previously added station into associated state | 3543 | *	previously added station into associated state |
| 3544 | * @NL80211_STA_FLAG_SPP_AMSDU: station supports SPP A-MSDUs | ||
| 3449 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 3545 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
| 3450 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 3546 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
| 3451 | */ | 3547 | */ |
| ... | @@ -3458,6 +3554,7 @@ enum nl80211_sta_flags { | ... | @@ -3458,6 +3554,7 @@ enum nl80211_sta_flags { |
| 3458 | 	NL80211_STA_FLAG_AUTHENTICATED, | 3554 | 	NL80211_STA_FLAG_AUTHENTICATED, |
| 3459 | 	NL80211_STA_FLAG_TDLS_PEER, | 3555 | 	NL80211_STA_FLAG_TDLS_PEER, |
| 3460 | 	NL80211_STA_FLAG_ASSOCIATED, | 3556 | 	NL80211_STA_FLAG_ASSOCIATED, |
| 3557 | 	NL80211_STA_FLAG_SPP_AMSDU, | ||
| 3461 | 3558 | ||
| 3462 | 	/* keep last */ | 3559 | 	/* keep last */ |
| 3463 | 	__NL80211_STA_FLAG_AFTER_LAST, | 3560 | 	__NL80211_STA_FLAG_AFTER_LAST, |
| ... | @@ -3468,7 +3565,7 @@ enum nl80211_sta_flags { | ... | @@ -3468,7 +3565,7 @@ enum nl80211_sta_flags { |
| 3468 | * enum nl80211_sta_p2p_ps_status - station support of P2P PS | 3565 | * enum nl80211_sta_p2p_ps_status - station support of P2P PS |
| 3469 | * | 3566 | * |
| 3470 | * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism | 3567 | * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism |
| 3471 | * @@NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism | 3568 | * @NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism |
| 3472 | * @NUM_NL80211_P2P_PS_STATUS: number of values | 3569 | * @NUM_NL80211_P2P_PS_STATUS: number of values |
| 3473 | */ | 3570 | */ |
| 3474 | enum nl80211_sta_p2p_ps_status { | 3571 | enum nl80211_sta_p2p_ps_status { |
| ... | @@ -3506,9 +3603,9 @@ enum nl80211_he_gi { | ... | @@ -3506,9 +3603,9 @@ enum nl80211_he_gi { |
| 3506 | 3603 | ||
| 3507 | /** | 3604 | /** |
| 3508 | * enum nl80211_he_ltf - HE long training field | 3605 | * enum nl80211_he_ltf - HE long training field |
| 3509 | * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec | 3606 | * @NL80211_RATE_INFO_HE_1XLTF: 3.2 usec |
| 3510 | * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec | 3607 | * @NL80211_RATE_INFO_HE_2XLTF: 6.4 usec |
| 3511 | * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec | 3608 | * @NL80211_RATE_INFO_HE_4XLTF: 12.8 usec |
| 3512 | */ | 3609 | */ |
| 3513 | enum nl80211_he_ltf { | 3610 | enum nl80211_he_ltf { |
| 3514 | 	NL80211_RATE_INFO_HE_1XLTF, | 3611 | 	NL80211_RATE_INFO_HE_1XLTF, |
| ... | @@ -3623,7 +3720,7 @@ enum nl80211_eht_ru_alloc { | ... | @@ -3623,7 +3720,7 @@ enum nl80211_eht_ru_alloc { |
| 3623 | * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier | 3720 | * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier |
| 3624 | *	(u8, see &enum nl80211_he_gi) | 3721 | *	(u8, see &enum nl80211_he_gi) |
| 3625 | * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1) | 3722 | * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1) |
| 3626 | * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then | 3723 | * @NL80211_RATE_INFO_HE_RU_ALLOC: HE RU allocation, if not present then |
| 3627 | *	non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc) | 3724 | *	non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc) |
| 3628 | * @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate | 3725 | * @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate |
| 3629 | * @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15) | 3726 | * @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15) |
| ... | @@ -3632,6 +3729,13 @@ enum nl80211_eht_ru_alloc { | ... | @@ -3632,6 +3729,13 @@ enum nl80211_eht_ru_alloc { |
| 3632 | *	(u8, see &enum nl80211_eht_gi) | 3729 | *	(u8, see &enum nl80211_eht_gi) |
| 3633 | * @NL80211_RATE_INFO_EHT_RU_ALLOC: EHT RU allocation, if not present then | 3730 | * @NL80211_RATE_INFO_EHT_RU_ALLOC: EHT RU allocation, if not present then |
| 3634 | *	non-OFDMA was used (u8, see &enum nl80211_eht_ru_alloc) | 3731 | *	non-OFDMA was used (u8, see &enum nl80211_eht_ru_alloc) |
| 3732 | * @NL80211_RATE_INFO_S1G_MCS: S1G MCS index (u8, 0-10) | ||
| 3733 | * @NL80211_RATE_INFO_S1G_NSS: S1G NSS value (u8, 1-4) | ||
| 3734 | * @NL80211_RATE_INFO_1_MHZ_WIDTH: 1 MHz S1G rate | ||
| 3735 | * @NL80211_RATE_INFO_2_MHZ_WIDTH: 2 MHz S1G rate | ||
| 3736 | * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate | ||
| 3737 | * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate | ||
| 3738 | * @NL80211_RATE_INFO_16_MHZ_WIDTH: 16 MHz S1G rate | ||
| 3635 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use | 3739 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use |
| 3636 | */ | 3740 | */ |
| 3637 | enum nl80211_rate_info { | 3741 | enum nl80211_rate_info { |
| ... | @@ -3658,6 +3762,13 @@ enum nl80211_rate_info { | ... | @@ -3658,6 +3762,13 @@ enum nl80211_rate_info { |
| 3658 | 	NL80211_RATE_INFO_EHT_NSS, | 3762 | 	NL80211_RATE_INFO_EHT_NSS, |
| 3659 | 	NL80211_RATE_INFO_EHT_GI, | 3763 | 	NL80211_RATE_INFO_EHT_GI, |
| 3660 | 	NL80211_RATE_INFO_EHT_RU_ALLOC, | 3764 | 	NL80211_RATE_INFO_EHT_RU_ALLOC, |
| 3765 | 	NL80211_RATE_INFO_S1G_MCS, | ||
| 3766 | 	NL80211_RATE_INFO_S1G_NSS, | ||
| 3767 | 	NL80211_RATE_INFO_1_MHZ_WIDTH, | ||
| 3768 | 	NL80211_RATE_INFO_2_MHZ_WIDTH, | ||
| 3769 | 	NL80211_RATE_INFO_4_MHZ_WIDTH, | ||
| 3770 | 	NL80211_RATE_INFO_8_MHZ_WIDTH, | ||
| 3771 | 	NL80211_RATE_INFO_16_MHZ_WIDTH, | ||
| 3661 | 3772 | ||
| 3662 | 	/* keep last */ | 3773 | 	/* keep last */ |
| 3663 | 	__NL80211_RATE_INFO_AFTER_LAST, | 3774 | 	__NL80211_RATE_INFO_AFTER_LAST, |
| ... | @@ -3712,7 +3823,7 @@ enum nl80211_sta_bss_param { | ... | @@ -3712,7 +3823,7 @@ enum nl80211_sta_bss_param { |
| 3712 | *	(u64, to this station) | 3823 | *	(u64, to this station) |
| 3713 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 3824 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
| 3714 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 3825 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
| 3715 | * 	containing info as possible, see &enum nl80211_rate_info | 3826 | *	containing info as possible, see &enum nl80211_rate_info |
| 3716 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (MSDUs and MMPDUs) | 3827 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (MSDUs and MMPDUs) |
| 3717 | *	(u32, from this station) | 3828 | *	(u32, from this station) |
| 3718 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (MSDUs and MMPDUs) | 3829 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (MSDUs and MMPDUs) |
| ... | @@ -3741,8 +3852,8 @@ enum nl80211_sta_bss_param { | ... | @@ -3741,8 +3852,8 @@ enum nl80211_sta_bss_param { |
| 3741 | *	Contains a nested array of signal strength attributes (u8, dBm) | 3852 | *	Contains a nested array of signal strength attributes (u8, dBm) |
| 3742 | * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average | 3853 | * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average |
| 3743 | *	Same format as NL80211_STA_INFO_CHAIN_SIGNAL. | 3854 | *	Same format as NL80211_STA_INFO_CHAIN_SIGNAL. |
| 3744 | * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput considering also the | 3855 | * @NL80211_STA_INFO_EXPECTED_THROUGHPUT: expected throughput considering also |
| 3745 | *	802.11 header (u32, kbps) | 3856 | *	the 802.11 header (u32, kbps) |
| 3746 | * @NL80211_STA_INFO_RX_DROP_MISC: RX packets dropped for unspecified reasons | 3857 | * @NL80211_STA_INFO_RX_DROP_MISC: RX packets dropped for unspecified reasons |
| 3747 | *	(u64) | 3858 | *	(u64) |
| 3748 | * @NL80211_STA_INFO_BEACON_RX: number of beacons received from this peer (u64) | 3859 | * @NL80211_STA_INFO_BEACON_RX: number of beacons received from this peer (u64) |
| ... | @@ -3928,7 +4039,7 @@ enum nl80211_mpath_flags { | ... | @@ -3928,7 +4039,7 @@ enum nl80211_mpath_flags { |
| 3928 | * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path | 4039 | * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path |
| 3929 | * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now | 4040 | * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now |
| 3930 | * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in | 4041 | * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in |
| 3931 | * 	&enum nl80211_mpath_flags; | 4042 | *	&enum nl80211_mpath_flags; |
| 3932 | * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec | 4043 | * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec |
| 3933 | * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries | 4044 | * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries |
| 3934 | * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination | 4045 | * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination |
| ... | @@ -4026,6 +4137,10 @@ enum nl80211_band_iftype_attr { | ... | @@ -4026,6 +4137,10 @@ enum nl80211_band_iftype_attr { |
| 4026 | * @NL80211_BAND_ATTR_EDMG_BW_CONFIG: Channel BW Configuration subfield encodes | 4137 | * @NL80211_BAND_ATTR_EDMG_BW_CONFIG: Channel BW Configuration subfield encodes |
| 4027 | *	the allowed channel bandwidth configurations. | 4138 | *	the allowed channel bandwidth configurations. |
| 4028 | *	Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13. | 4139 | *	Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13. |
| 4140 | * @NL80211_BAND_ATTR_S1G_MCS_NSS_SET: S1G capabilities, supported S1G-MCS and NSS | ||
| 4141 | *	set subfield, as in the S1G information IE, 5 bytes | ||
| 4142 | * @NL80211_BAND_ATTR_S1G_CAPA: S1G capabilities information subfield as in the | ||
| 4143 | *	S1G information IE, 10 bytes | ||
| 4029 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined | 4144 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined |
| 4030 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use | 4145 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use |
| 4031 | */ | 4146 | */ |
| ... | @@ -4046,6 +4161,9 @@ enum nl80211_band_attr { | ... | @@ -4046,6 +4161,9 @@ enum nl80211_band_attr { |
| 4046 | 	NL80211_BAND_ATTR_EDMG_CHANNELS, | 4161 | 	NL80211_BAND_ATTR_EDMG_CHANNELS, |
| 4047 | 	NL80211_BAND_ATTR_EDMG_BW_CONFIG, | 4162 | 	NL80211_BAND_ATTR_EDMG_BW_CONFIG, |
| 4048 | 4163 | ||
| 4164 | 	NL80211_BAND_ATTR_S1G_MCS_NSS_SET, | ||
| 4165 | 	NL80211_BAND_ATTR_S1G_CAPA, | ||
| 4166 | |||
| 4049 | 	/* keep last */ | 4167 | 	/* keep last */ |
| 4050 | 	__NL80211_BAND_ATTR_AFTER_LAST, | 4168 | 	__NL80211_BAND_ATTR_AFTER_LAST, |
| 4051 | 	NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 | 4169 | 	NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 |
| ... | @@ -4061,7 +4179,7 @@ enum nl80211_band_attr { | ... | @@ -4061,7 +4179,7 @@ enum nl80211_band_attr { |
| 4061 | * @NL80211_WMMR_CW_MAX: Maximum contention window slot. | 4179 | * @NL80211_WMMR_CW_MAX: Maximum contention window slot. |
| 4062 | * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space. | 4180 | * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space. |
| 4063 | * @NL80211_WMMR_TXOP: Maximum allowed tx operation time. | 4181 | * @NL80211_WMMR_TXOP: Maximum allowed tx operation time. |
| 4064 | * @nl80211_WMMR_MAX: highest possible wmm rule. | 4182 | * @NL80211_WMMR_MAX: highest possible wmm rule. |
| 4065 | * @__NL80211_WMMR_LAST: Internal use. | 4183 | * @__NL80211_WMMR_LAST: Internal use. |
| 4066 | */ | 4184 | */ |
| 4067 | enum nl80211_wmm_rule { | 4185 | enum nl80211_wmm_rule { |
| ... | @@ -4083,15 +4201,16 @@ enum nl80211_wmm_rule { | ... | @@ -4083,15 +4201,16 @@ enum nl80211_wmm_rule { |
| 4083 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current | 4201 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current |
| 4084 | *	regulatory domain. | 4202 | *	regulatory domain. |
| 4085 | * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation | 4203 | * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation |
| 4086 | * 	are permitted on this channel, this includes sending probe | 4204 | *	are permitted on this channel, this includes sending probe |
| 4087 | * 	requests, or modes of operation that require beaconing. | 4205 | *	requests, or modes of operation that require beaconing. |
| 4206 | * @__NL80211_FREQUENCY_ATTR_NO_IBSS: obsolete, same as _NO_IR | ||
| 4088 | * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory | 4207 | * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory |
| 4089 | *	on this channel in current regulatory domain. | 4208 | *	on this channel in current regulatory domain. |
| 4090 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm | 4209 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm |
| 4091 | *	(100 * dBm). | 4210 | *	(100 * dBm). |
| 4092 | * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS | 4211 | * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS |
| 4093 | *	(enum nl80211_dfs_state) | 4212 | *	(enum nl80211_dfs_state) |
| 4094 | * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long | 4213 | * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in milliseconds for how long |
| 4095 | *	this channel is in this DFS state. | 4214 | *	this channel is in this DFS state. |
| 4096 | * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this | 4215 | * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this |
| 4097 | *	channel as the control channel | 4216 | *	channel as the control channel |
| ... | @@ -4145,6 +4264,19 @@ enum nl80211_wmm_rule { | ... | @@ -4145,6 +4264,19 @@ enum nl80211_wmm_rule { |
| 4145 | *	as the primary or any of the secondary channels isn't possible | 4264 | *	as the primary or any of the secondary channels isn't possible |
| 4146 | * @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel | 4265 | * @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel |
| 4147 | *	in current regulatory domain. | 4266 | *	in current regulatory domain. |
| 4267 | * @NL80211_FREQUENCY_ATTR_PSD: Power spectral density (in dBm) that | ||
| 4268 | *	is allowed on this channel in current regulatory domain. | ||
| 4269 | * @NL80211_FREQUENCY_ATTR_DFS_CONCURRENT: Operation on this channel is | ||
| 4270 | *	allowed for peer-to-peer or adhoc communication under the control | ||
| 4271 | *	of a DFS master which operates on the same channel (FCC-594280 D01 | ||
| 4272 | *	Section B.3). Should be used together with %NL80211_RRF_DFS only. | ||
| 4273 | * @NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT: Client connection to VLP AP | ||
| 4274 | *	not allowed using this channel | ||
| 4275 | * @NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP | ||
| 4276 | *	not allowed using this channel | ||
| 4277 | * @NL80211_FREQUENCY_ATTR_CAN_MONITOR: This channel can be used in monitor | ||
| 4278 | *	mode despite other (regulatory) restrictions, even if the channel is | ||
| 4279 | *	otherwise completely disabled. | ||
| 4148 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 4280 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 4149 | *	currently defined | 4281 | *	currently defined |
| 4150 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 4282 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| ... | @@ -4183,6 +4315,11 @@ enum nl80211_frequency_attr { | ... | @@ -4183,6 +4315,11 @@ enum nl80211_frequency_attr { |
| 4183 | 	NL80211_FREQUENCY_ATTR_16MHZ, | 4315 | 	NL80211_FREQUENCY_ATTR_16MHZ, |
| 4184 | 	NL80211_FREQUENCY_ATTR_NO_320MHZ, | 4316 | 	NL80211_FREQUENCY_ATTR_NO_320MHZ, |
| 4185 | 	NL80211_FREQUENCY_ATTR_NO_EHT, | 4317 | 	NL80211_FREQUENCY_ATTR_NO_EHT, |
| 4318 | 	NL80211_FREQUENCY_ATTR_PSD, | ||
| 4319 | 	NL80211_FREQUENCY_ATTR_DFS_CONCURRENT, | ||
| 4320 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT, | ||
| 4321 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT, | ||
| 4322 | 	NL80211_FREQUENCY_ATTR_CAN_MONITOR, | ||
| 4186 | 4323 | ||
| 4187 | 	/* keep last */ | 4324 | 	/* keep last */ |
| 4188 | 	__NL80211_FREQUENCY_ATTR_AFTER_LAST, | 4325 | 	__NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| ... | @@ -4195,6 +4332,10 @@ enum nl80211_frequency_attr { | ... | @@ -4195,6 +4332,10 @@ enum nl80211_frequency_attr { |
| 4195 | #define NL80211_FREQUENCY_ATTR_NO_IR		NL80211_FREQUENCY_ATTR_NO_IR | 4332 | #define NL80211_FREQUENCY_ATTR_NO_IR		NL80211_FREQUENCY_ATTR_NO_IR |
| 4196 | #define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \ | 4333 | #define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \ |
| 4197 | 					NL80211_FREQUENCY_ATTR_IR_CONCURRENT | 4334 | 					NL80211_FREQUENCY_ATTR_IR_CONCURRENT |
| 4335 | #define NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT \ | ||
| 4336 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT | ||
| 4337 | #define NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT \ | ||
| 4338 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT | ||
| 4198 | 4339 | ||
| 4199 | /** | 4340 | /** |
| 4200 | * enum nl80211_bitrate_attr - bitrate attributes | 4341 | * enum nl80211_bitrate_attr - bitrate attributes |
| ... | @@ -4217,16 +4358,16 @@ enum nl80211_bitrate_attr { | ... | @@ -4217,16 +4358,16 @@ enum nl80211_bitrate_attr { |
| 4217 | }; | 4358 | }; |
| 4218 | 4359 | ||
| 4219 | /** | 4360 | /** |
| 4220 | * enum nl80211_initiator - Indicates the initiator of a reg domain request | 4361 | * enum nl80211_reg_initiator - Indicates the initiator of a reg domain request |
| 4221 | * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world | 4362 | * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world |
| 4222 | * 	regulatory domain. | 4363 | *	regulatory domain. |
| 4223 | * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the | 4364 | * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the |
| 4224 | * 	regulatory domain. | 4365 | *	regulatory domain. |
| 4225 | * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the | 4366 | * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the |
| 4226 | * 	wireless core it thinks its knows the regulatory domain we should be in. | 4367 | *	wireless core it thinks its knows the regulatory domain we should be in. |
| 4227 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | 4368 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an |
| 4228 | * 	802.11 country information element with regulatory information it | 4369 | *	802.11 country information element with regulatory information it |
| 4229 | * 	thinks we should consider. cfg80211 only processes the country | 4370 | *	thinks we should consider. cfg80211 only processes the country |
| 4230 | *	code from the IE, and relies on the regulatory domain information | 4371 | *	code from the IE, and relies on the regulatory domain information |
| 4231 | *	structure passed by userspace (CRDA) from our wireless-regdb. | 4372 | *	structure passed by userspace (CRDA) from our wireless-regdb. |
| 4232 | *	If a channel is enabled but the country code indicates it should | 4373 | *	If a channel is enabled but the country code indicates it should |
| ... | @@ -4245,11 +4386,11 @@ enum nl80211_reg_initiator { | ... | @@ -4245,11 +4386,11 @@ enum nl80211_reg_initiator { |
| 4245 | *	to a specific country. When this is set you can count on the | 4386 | *	to a specific country. When this is set you can count on the |
| 4246 | *	ISO / IEC 3166 alpha2 country code being valid. | 4387 | *	ISO / IEC 3166 alpha2 country code being valid. |
| 4247 | * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory | 4388 | * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory |
| 4248 | * 	domain. | 4389 | *	domain. |
| 4249 | * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom | 4390 | * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom |
| 4250 | * 	driver specific world regulatory domain. These do not apply system-wide | 4391 | *	driver specific world regulatory domain. These do not apply system-wide |
| 4251 | * 	and are only applicable to the individual devices which have requested | 4392 | *	and are only applicable to the individual devices which have requested |
| 4252 | * 	them to be applied. | 4393 | *	them to be applied. |
| 4253 | * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product | 4394 | * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product |
| 4254 | *	of an intersection between two regulatory domains -- the previously | 4395 | *	of an intersection between two regulatory domains -- the previously |
| 4255 | *	set regulatory domain on the system and the last accepted regulatory | 4396 | *	set regulatory domain on the system and the last accepted regulatory |
| ... | @@ -4266,23 +4407,25 @@ enum nl80211_reg_type { | ... | @@ -4266,23 +4407,25 @@ enum nl80211_reg_type { |
| 4266 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 4407 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
| 4267 | * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved | 4408 | * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved |
| 4268 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | 4409 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional |
| 4269 | * 	considerations for a given frequency range. These are the | 4410 | *	considerations for a given frequency range. These are the |
| 4270 | * 	&enum nl80211_reg_rule_flags. | 4411 | *	&enum nl80211_reg_rule_flags. |
| 4271 | * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory | 4412 | * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory |
| 4272 | * 	rule in KHz. This is not a center of frequency but an actual regulatory | 4413 | *	rule in KHz. This is not a center of frequency but an actual regulatory |
| 4273 | * 	band edge. | 4414 | *	band edge. |
| 4274 | * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule | 4415 | * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule |
| 4275 | * 	in KHz. This is not a center a frequency but an actual regulatory | 4416 | *	in KHz. This is not a center a frequency but an actual regulatory |
| 4276 | * 	band edge. | 4417 | *	band edge. |
| 4277 | * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this | 4418 | * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this |
| 4278 | *	frequency range, in KHz. | 4419 | *	frequency range, in KHz. |
| 4279 | * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain | 4420 | * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain |
| 4280 | * 	for a given frequency range. The value is in mBi (100 * dBi). | 4421 | *	for a given frequency range. The value is in mBi (100 * dBi). |
| 4281 | * 	If you don't have one then don't send this. | 4422 | *	If you don't have one then don't send this. |
| 4282 | * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for | 4423 | * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for |
| 4283 | * 	a given frequency range. The value is in mBm (100 * dBm). | 4424 | *	a given frequency range. The value is in mBm (100 * dBm). |
| 4284 | * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds. | 4425 | * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds. |
| 4285 | *	If not present or 0 default CAC time will be used. | 4426 | *	If not present or 0 default CAC time will be used. |
| 4427 | * @NL80211_ATTR_POWER_RULE_PSD: power spectral density (in dBm). | ||
| 4428 | *	This could be negative. | ||
| 4286 | * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number | 4429 | * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number |
| 4287 | *	currently defined | 4430 | *	currently defined |
| 4288 | * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use | 4431 | * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use |
| ... | @@ -4300,6 +4443,8 @@ enum nl80211_reg_rule_attr { | ... | @@ -4300,6 +4443,8 @@ enum nl80211_reg_rule_attr { |
| 4300 | 4443 | ||
| 4301 | 	NL80211_ATTR_DFS_CAC_TIME, | 4444 | 	NL80211_ATTR_DFS_CAC_TIME, |
| 4302 | 4445 | ||
| 4446 | 	NL80211_ATTR_POWER_RULE_PSD, | ||
| 4447 | |||
| 4303 | 	/* keep last */ | 4448 | 	/* keep last */ |
| 4304 | 	__NL80211_REG_RULE_ATTR_AFTER_LAST, | 4449 | 	__NL80211_REG_RULE_ATTR_AFTER_LAST, |
| 4305 | 	NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 | 4450 | 	NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 |
| ... | @@ -4328,14 +4473,7 @@ enum nl80211_reg_rule_attr { | ... | @@ -4328,14 +4473,7 @@ enum nl80211_reg_rule_attr { |
| 4328 | *	value as specified by &struct nl80211_bss_select_rssi_adjust. | 4473 | *	value as specified by &struct nl80211_bss_select_rssi_adjust. |
| 4329 | * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching | 4474 | * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching |
| 4330 | *	(this cannot be used together with SSID). | 4475 | *	(this cannot be used together with SSID). |
| 4331 | * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the | 4476 | * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Obsolete |
| 4332 | *	band specific minimum rssi thresholds for the bands defined in | ||
| 4333 | *	enum nl80211_band. The minimum rssi threshold value(s32) specific to a | ||
| 4334 | *	band shall be encapsulated in attribute with type value equals to one | ||
| 4335 | *	of the NL80211_BAND_* defined in enum nl80211_band. For example, the | ||
| 4336 | *	minimum rssi threshold value for 2.4GHZ band shall be encapsulated | ||
| 4337 | *	within an attribute of type NL80211_BAND_2GHZ. And one or more of such | ||
| 4338 | *	attributes will be nested within this attribute. | ||
| 4339 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter | 4477 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter |
| 4340 | *	attribute number currently defined | 4478 | *	attribute number currently defined |
| 4341 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use | 4479 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use |
| ... | @@ -4348,7 +4486,7 @@ enum nl80211_sched_scan_match_attr { | ... | @@ -4348,7 +4486,7 @@ enum nl80211_sched_scan_match_attr { |
| 4348 | 	NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI, | 4486 | 	NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI, |
| 4349 | 	NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST, | 4487 | 	NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST, |
| 4350 | 	NL80211_SCHED_SCAN_MATCH_ATTR_BSSID, | 4488 | 	NL80211_SCHED_SCAN_MATCH_ATTR_BSSID, |
| 4351 | 	NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI, | 4489 | 	NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI, /* obsolete */ |
| 4352 | 4490 | ||
| 4353 | 	/* keep last */ | 4491 | 	/* keep last */ |
| 4354 | 	__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, | 4492 | 	__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, |
| ... | @@ -4370,8 +4508,9 @@ enum nl80211_sched_scan_match_attr { | ... | @@ -4370,8 +4508,9 @@ enum nl80211_sched_scan_match_attr { |
| 4370 | * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links | 4508 | * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links |
| 4371 | * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links | 4509 | * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links |
| 4372 | * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed, | 4510 | * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed, |
| 4373 | * 	this includes probe requests or modes of operation that require | 4511 | *	this includes probe requests or modes of operation that require |
| 4374 | * 	beaconing. | 4512 | *	beaconing. |
| 4513 | * @__NL80211_RRF_NO_IBSS: obsolete, same as NO_IR | ||
| 4375 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated | 4514 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated |
| 4376 | *	base on contiguous rules and wider channels will be allowed to cross | 4515 | *	base on contiguous rules and wider channels will be allowed to cross |
| 4377 | *	multiple contiguous/overlapping frequency ranges. | 4516 | *	multiple contiguous/overlapping frequency ranges. |
| ... | @@ -4382,6 +4521,14 @@ enum nl80211_sched_scan_match_attr { | ... | @@ -4382,6 +4521,14 @@ enum nl80211_sched_scan_match_attr { |
| 4382 | * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed | 4521 | * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed |
| 4383 | * @NL80211_RRF_NO_HE: HE operation not allowed | 4522 | * @NL80211_RRF_NO_HE: HE operation not allowed |
| 4384 | * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed | 4523 | * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed |
| 4524 | * @NL80211_RRF_NO_EHT: EHT operation not allowed | ||
| 4525 | * @NL80211_RRF_PSD: Ruleset has power spectral density value | ||
| 4526 | * @NL80211_RRF_DFS_CONCURRENT: Operation on this channel is allowed for | ||
| 4527 | *	peer-to-peer or adhoc communication under the control of a DFS master | ||
| 4528 | *	which operates on the same channel (FCC-594280 D01 Section B.3). | ||
| 4529 | *	Should be used together with %NL80211_RRF_DFS only. | ||
| 4530 | * @NL80211_RRF_NO_6GHZ_VLP_CLIENT: Client connection to VLP AP not allowed | ||
| 4531 | * @NL80211_RRF_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP not allowed | ||
| 4385 | */ | 4532 | */ |
| 4386 | enum nl80211_reg_rule_flags { | 4533 | enum nl80211_reg_rule_flags { |
| 4387 | 	NL80211_RRF_NO_OFDM		= 1<<0, | 4534 | 	NL80211_RRF_NO_OFDM		= 1<<0, |
| ... | @@ -4401,6 +4548,11 @@ enum nl80211_reg_rule_flags { | ... | @@ -4401,6 +4548,11 @@ enum nl80211_reg_rule_flags { |
| 4401 | 	NL80211_RRF_NO_160MHZ		= 1<<16, | 4548 | 	NL80211_RRF_NO_160MHZ		= 1<<16, |
| 4402 | 	NL80211_RRF_NO_HE		= 1<<17, | 4549 | 	NL80211_RRF_NO_HE		= 1<<17, |
| 4403 | 	NL80211_RRF_NO_320MHZ		= 1<<18, | 4550 | 	NL80211_RRF_NO_320MHZ		= 1<<18, |
| 4551 | 	NL80211_RRF_NO_EHT		= 1<<19, | ||
| 4552 | 	NL80211_RRF_PSD			= 1<<20, | ||
| 4553 | 	NL80211_RRF_DFS_CONCURRENT	= 1<<21, | ||
| 4554 | 	NL80211_RRF_NO_6GHZ_VLP_CLIENT	= 1<<22, | ||
| 4555 | 	NL80211_RRF_NO_6GHZ_AFC_CLIENT	= 1<<23, | ||
| 4404 | }; | 4556 | }; |
| 4405 | 4557 | ||
| 4406 | #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR | 4558 | #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR |
| ... | @@ -4409,6 +4561,8 @@ enum nl80211_reg_rule_flags { | ... | @@ -4409,6 +4561,8 @@ enum nl80211_reg_rule_flags { |
| 4409 | #define NL80211_RRF_NO_HT40		(NL80211_RRF_NO_HT40MINUS |\ | 4561 | #define NL80211_RRF_NO_HT40		(NL80211_RRF_NO_HT40MINUS |\ |
| 4410 | 					 NL80211_RRF_NO_HT40PLUS) | 4562 | 					 NL80211_RRF_NO_HT40PLUS) |
| 4411 | #define NL80211_RRF_GO_CONCURRENT	NL80211_RRF_IR_CONCURRENT | 4563 | #define NL80211_RRF_GO_CONCURRENT	NL80211_RRF_IR_CONCURRENT |
| 4564 | #define NL80211_RRF_NO_UHB_VLP_CLIENT	NL80211_RRF_NO_6GHZ_VLP_CLIENT | ||
| 4565 | #define NL80211_RRF_NO_UHB_AFC_CLIENT	NL80211_RRF_NO_6GHZ_AFC_CLIENT | ||
| 4412 | 4566 | ||
| 4413 | /* For backport compatibility with older userspace */ | 4567 | /* For backport compatibility with older userspace */ |
| 4414 | #define NL80211_RRF_NO_IR_ALL		(NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) | 4568 | #define NL80211_RRF_NO_IR_ALL		(NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) |
| ... | @@ -4555,8 +4709,8 @@ enum nl80211_mntr_flags { | ... | @@ -4555,8 +4709,8 @@ enum nl80211_mntr_flags { |
| 4555 | *	alternate between Active and Doze states, but may not wake up | 4709 | *	alternate between Active and Doze states, but may not wake up |
| 4556 | *	for neighbor's beacons. | 4710 | *	for neighbor's beacons. |
| 4557 | * | 4711 | * |
| 4558 | * @__NL80211_MESH_POWER_AFTER_LAST - internal use | 4712 | * @__NL80211_MESH_POWER_AFTER_LAST: internal use |
| 4559 | * @NL80211_MESH_POWER_MAX - highest possible power save level | 4713 | * @NL80211_MESH_POWER_MAX: highest possible power save level |
| 4560 | */ | 4714 | */ |
| 4561 | 4715 | ||
| 4562 | enum nl80211_mesh_power_mode { | 4716 | enum nl80211_mesh_power_mode { |
| ... | @@ -4937,6 +5091,36 @@ enum nl80211_bss_scan_width { | ... | @@ -4937,6 +5091,36 @@ enum nl80211_bss_scan_width { |
| 4937 | 	NL80211_BSS_CHAN_WIDTH_2, | 5091 | 	NL80211_BSS_CHAN_WIDTH_2, |
| 4938 | }; | 5092 | }; |
| 4939 | 5093 | ||
| 5094 | /** | ||
| 5095 | * enum nl80211_bss_use_for - bitmap indicating possible BSS use | ||
| 5096 | * @NL80211_BSS_USE_FOR_NORMAL: Use this BSS for normal "connection", | ||
| 5097 | *	including IBSS/MBSS depending on the type. | ||
| 5098 | * @NL80211_BSS_USE_FOR_MLD_LINK: This BSS can be used as a link in an | ||
| 5099 | *	MLO connection. Note that for an MLO connection, all links including | ||
| 5100 | *	the assoc link must have this flag set, and the assoc link must | ||
| 5101 | *	additionally have %NL80211_BSS_USE_FOR_NORMAL set. | ||
| 5102 | */ | ||
| 5103 | enum nl80211_bss_use_for { | ||
| 5104 | 	NL80211_BSS_USE_FOR_NORMAL = 1 << 0, | ||
| 5105 | 	NL80211_BSS_USE_FOR_MLD_LINK = 1 << 1, | ||
| 5106 | }; | ||
| 5107 | |||
| 5108 | /** | ||
| 5109 | * enum nl80211_bss_cannot_use_reasons - reason(s) connection to a | ||
| 5110 | *	BSS isn't possible | ||
| 5111 | * @NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY: NSTR nonprimary links aren't | ||
| 5112 | *	supported by the device, and this BSS entry represents one. | ||
| 5113 | * @NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH: STA is not supporting | ||
| 5114 | *	the AP power type (SP, VLP, AP) that the AP uses. | ||
| 5115 | */ | ||
| 5116 | enum nl80211_bss_cannot_use_reasons { | ||
| 5117 | 	NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY	= 1 << 0, | ||
| 5118 | 	NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH	= 1 << 1, | ||
| 5119 | }; | ||
| 5120 | |||
| 5121 | #define NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH \ | ||
| 5122 | 	NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH | ||
| 5123 | |||
| 4940 | /** | 5124 | /** |
| 4941 | * enum nl80211_bss - netlink attributes for a BSS | 5125 | * enum nl80211_bss - netlink attributes for a BSS |
| 4942 | * | 5126 | * |
| ... | @@ -4968,7 +5152,7 @@ enum nl80211_bss_scan_width { | ... | @@ -4968,7 +5152,7 @@ enum nl80211_bss_scan_width { |
| 4968 | *	elements from a Beacon frame (bin); not present if no Beacon frame has | 5152 | *	elements from a Beacon frame (bin); not present if no Beacon frame has |
| 4969 | *	yet been received | 5153 | *	yet been received |
| 4970 | * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel | 5154 | * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel |
| 4971 | *	(u32, enum nl80211_bss_scan_width) | 5155 | *	(u32, enum nl80211_bss_scan_width) - No longer used! |
| 4972 | * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64) | 5156 | * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64) |
| 4973 | *	(not present if no beacon frame has been received yet) | 5157 | *	(not present if no beacon frame has been received yet) |
| 4974 | * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and | 5158 | * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and |
| ... | @@ -4989,6 +5173,14 @@ enum nl80211_bss_scan_width { | ... | @@ -4989,6 +5173,14 @@ enum nl80211_bss_scan_width { |
| 4989 | * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz | 5173 | * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz |
| 4990 | * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8). | 5174 | * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8). |
| 4991 | * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it. | 5175 | * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it. |
| 5176 | * @NL80211_BSS_USE_FOR: u32 bitmap attribute indicating what the BSS can be | ||
| 5177 | *	used for, see &enum nl80211_bss_use_for. | ||
| 5178 | * @NL80211_BSS_CANNOT_USE_REASONS: Indicates the reason that this BSS cannot | ||
| 5179 | *	be used for all or some of the possible uses by the device reporting it, | ||
| 5180 | *	even though its presence was detected. | ||
| 5181 | *	This is a u64 attribute containing a bitmap of values from | ||
| 5182 | *	&enum nl80211_cannot_use_reasons, note that the attribute may be missing | ||
| 5183 | *	if no reasons are specified. | ||
| 4992 | * @__NL80211_BSS_AFTER_LAST: internal | 5184 | * @__NL80211_BSS_AFTER_LAST: internal |
| 4993 | * @NL80211_BSS_MAX: highest BSS attribute | 5185 | * @NL80211_BSS_MAX: highest BSS attribute |
| 4994 | */ | 5186 | */ |
| ... | @@ -5016,6 +5208,8 @@ enum nl80211_bss { | ... | @@ -5016,6 +5208,8 @@ enum nl80211_bss { |
| 5016 | 	NL80211_BSS_FREQUENCY_OFFSET, | 5208 | 	NL80211_BSS_FREQUENCY_OFFSET, |
| 5017 | 	NL80211_BSS_MLO_LINK_ID, | 5209 | 	NL80211_BSS_MLO_LINK_ID, |
| 5018 | 	NL80211_BSS_MLD_ADDR, | 5210 | 	NL80211_BSS_MLD_ADDR, |
| 5211 | 	NL80211_BSS_USE_FOR, | ||
| 5212 | 	NL80211_BSS_CANNOT_USE_REASONS, | ||
| 5019 | 5213 | ||
| 5020 | 	/* keep last */ | 5214 | 	/* keep last */ |
| 5021 | 	__NL80211_BSS_AFTER_LAST, | 5215 | 	__NL80211_BSS_AFTER_LAST, |
| ... | @@ -5364,7 +5558,7 @@ enum nl80211_tx_rate_setting { | ... | @@ -5364,7 +5558,7 @@ enum nl80211_tx_rate_setting { |
| 5364 | *	(%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). | 5558 | *	(%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). |
| 5365 | * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but | 5559 | * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but |
| 5366 | *	per peer instead. | 5560 | *	per peer instead. |
| 5367 | * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates | 5561 | * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, if set indicates |
| 5368 | *	that the new configuration overrides all previous peer | 5562 | *	that the new configuration overrides all previous peer |
| 5369 | *	configurations, otherwise previous peer specific configurations | 5563 | *	configurations, otherwise previous peer specific configurations |
| 5370 | *	should be left untouched. | 5564 | *	should be left untouched. |
| ... | @@ -5536,7 +5730,7 @@ struct nl80211_pattern_support { | ... | @@ -5536,7 +5730,7 @@ struct nl80211_pattern_support { |
| 5536 | *	"TCP connection wakeup" for more details. This is a nested attribute | 5730 | *	"TCP connection wakeup" for more details. This is a nested attribute |
| 5537 | *	containing the exact information for establishing and keeping alive | 5731 | *	containing the exact information for establishing and keeping alive |
| 5538 | *	the TCP connection. | 5732 | *	the TCP connection. |
| 5539 | * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the | 5733 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH: For wakeup reporting only, the |
| 5540 | *	wakeup packet was received on the TCP connection | 5734 | *	wakeup packet was received on the TCP connection |
| 5541 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the | 5735 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the |
| 5542 | *	TCP connection was lost or failed to be established | 5736 | *	TCP connection was lost or failed to be established |
| ... | @@ -5565,6 +5759,8 @@ struct nl80211_pattern_support { | ... | @@ -5565,6 +5759,8 @@ struct nl80211_pattern_support { |
| 5565 | *	%NL80211_ATTR_SCAN_FREQUENCIES contains more than one | 5759 | *	%NL80211_ATTR_SCAN_FREQUENCIES contains more than one |
| 5566 | *	frequency, it means that the match occurred in more than one | 5760 | *	frequency, it means that the match occurred in more than one |
| 5567 | *	channel. | 5761 | *	channel. |
| 5762 | * @NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC: For wakeup reporting only. | ||
| 5763 | *	Wake up happened due to unprotected deauth or disassoc frame in MFP. | ||
| 5568 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | 5764 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers |
| 5569 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | 5765 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number |
| 5570 | * | 5766 | * |
| ... | @@ -5592,6 +5788,7 @@ enum nl80211_wowlan_triggers { | ... | @@ -5592,6 +5788,7 @@ enum nl80211_wowlan_triggers { |
| 5592 | 	NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, | 5788 | 	NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, |
| 5593 | 	NL80211_WOWLAN_TRIG_NET_DETECT, | 5789 | 	NL80211_WOWLAN_TRIG_NET_DETECT, |
| 5594 | 	NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS, | 5790 | 	NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS, |
| 5791 | 	NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC, | ||
| 5595 | 5792 | ||
| 5596 | 	/* keep last */ | 5793 | 	/* keep last */ |
| 5597 | 	NUM_NL80211_WOWLAN_TRIG, | 5794 | 	NUM_NL80211_WOWLAN_TRIG, |
| ... | @@ -5747,7 +5944,7 @@ enum nl80211_attr_coalesce_rule { | ... | @@ -5747,7 +5944,7 @@ enum nl80211_attr_coalesce_rule { |
| 5747 | 5944 | ||
| 5748 | /** | 5945 | /** |
| 5749 | * enum nl80211_coalesce_condition - coalesce rule conditions | 5946 | * enum nl80211_coalesce_condition - coalesce rule conditions |
| 5750 | * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns | 5947 | * @NL80211_COALESCE_CONDITION_MATCH: coalesce Rx packets when patterns |
| 5751 | *	in a rule are matched. | 5948 | *	in a rule are matched. |
| 5752 | * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns | 5949 | * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns |
| 5753 | *	in a rule are not matched. | 5950 | *	in a rule are not matched. |
| ... | @@ -5846,7 +6043,7 @@ enum nl80211_if_combination_attrs { | ... | @@ -5846,7 +6043,7 @@ enum nl80211_if_combination_attrs { |
| 5846 | * enum nl80211_plink_state - state of a mesh peer link finite state machine | 6043 | * enum nl80211_plink_state - state of a mesh peer link finite state machine |
| 5847 | * | 6044 | * |
| 5848 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit | 6045 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit |
| 5849 | *	state of non existent mesh peer links | 6046 | *	state of non-existent mesh peer links |
| 5850 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to | 6047 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to |
| 5851 | *	this mesh peer | 6048 | *	this mesh peer |
| 5852 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received | 6049 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received |
| ... | @@ -5882,7 +6079,7 @@ enum nl80211_plink_state { | ... | @@ -5882,7 +6079,7 @@ enum nl80211_plink_state { |
| 5882 | * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer | 6079 | * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer |
| 5883 | * @NUM_NL80211_PLINK_ACTIONS: number of possible actions | 6080 | * @NUM_NL80211_PLINK_ACTIONS: number of possible actions |
| 5884 | */ | 6081 | */ |
| 5885 | enum plink_actions { | 6082 | enum nl80211_plink_action { |
| 5886 | 	NL80211_PLINK_ACTION_NO_ACTION, | 6083 | 	NL80211_PLINK_ACTION_NO_ACTION, |
| 5887 | 	NL80211_PLINK_ACTION_OPEN, | 6084 | 	NL80211_PLINK_ACTION_OPEN, |
| 5888 | 	NL80211_PLINK_ACTION_BLOCK, | 6085 | 	NL80211_PLINK_ACTION_BLOCK, |
| ... | @@ -6139,7 +6336,7 @@ enum nl80211_feature_flags { | ... | @@ -6139,7 +6336,7 @@ enum nl80211_feature_flags { |
| 6139 | *	request to use RRM (see %NL80211_ATTR_USE_RRM) with | 6336 | *	request to use RRM (see %NL80211_ATTR_USE_RRM) with |
| 6140 | *	%NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set | 6337 | *	%NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set |
| 6141 | *	the ASSOC_REQ_USE_RRM flag in the association request even if | 6338 | *	the ASSOC_REQ_USE_RRM flag in the association request even if |
| 6142 | *	NL80211_FEATURE_QUIET is not advertized. | 6339 | *	NL80211_FEATURE_QUIET is not advertised. |
| 6143 | * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air | 6340 | * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air |
| 6144 | *	sniffer which means that it can be configured to hear packets from | 6341 | *	sniffer which means that it can be configured to hear packets from |
| 6145 | *	certain groups which can be configured by the | 6342 | *	certain groups which can be configured by the |
| ... | @@ -6151,13 +6348,15 @@ enum nl80211_feature_flags { | ... | @@ -6151,13 +6348,15 @@ enum nl80211_feature_flags { |
| 6151 | *	the BSS that the interface that requested the scan is connected to | 6348 | *	the BSS that the interface that requested the scan is connected to |
| 6152 | *	(if available). | 6349 | *	(if available). |
| 6153 | * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the | 6350 | * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the |
| 6154 | *	time the last beacon/probe was received. The time is the TSF of the | 6351 | *	time the last beacon/probe was received. For a non-MLO connection, the |
| 6155 | *	BSS that the interface that requested the scan is connected to | 6352 | *	time is the TSF of the BSS that the interface that requested the scan is |
| 6156 | *	(if available). | 6353 | *	connected to (if available). For an MLO connection, the time is the TSF |
| 6354 | *	of the BSS corresponding with link ID specified in the scan request (if | ||
| 6355 | *	specified). | ||
| 6157 | * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of | 6356 | * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of |
| 6158 | *	channel dwell time. | 6357 | *	channel dwell time. |
| 6159 | * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate | 6358 | * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate |
| 6160 | *	configuration (AP/mesh), supporting a legacy (non HT/VHT) rate. | 6359 | *	configuration (AP/mesh), supporting a legacy (non-HT/VHT) rate. |
| 6161 | * @NL80211_EXT_FEATURE_BEACON_RATE_HT: Driver supports beacon rate | 6360 | * @NL80211_EXT_FEATURE_BEACON_RATE_HT: Driver supports beacon rate |
| 6162 | *	configuration (AP/mesh) with HT rates. | 6361 | *	configuration (AP/mesh) with HT rates. |
| 6163 | * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate | 6362 | * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate |
| ... | @@ -6207,6 +6406,7 @@ enum nl80211_feature_flags { | ... | @@ -6207,6 +6406,7 @@ enum nl80211_feature_flags { |
| 6207 | *	receiving control port frames over nl80211 instead of the netdevice. | 6406 | *	receiving control port frames over nl80211 instead of the netdevice. |
| 6208 | * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports | 6407 | * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports |
| 6209 | *	(average) ACK signal strength reporting. | 6408 | *	(average) ACK signal strength reporting. |
| 6409 | * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: Backward-compatible ID | ||
| 6210 | * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate | 6410 | * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate |
| 6211 | * TXQs. | 6411 | * TXQs. |
| 6212 | * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the | 6412 | * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the |
| ... | @@ -6231,8 +6431,7 @@ enum nl80211_feature_flags { | ... | @@ -6231,8 +6431,7 @@ enum nl80211_feature_flags { |
| 6231 | * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching | 6431 | * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching |
| 6232 | *	(set/del PMKSA operations) in AP mode. | 6432 | *	(set/del PMKSA operations) in AP mode. |
| 6233 | * | 6433 | * |
| 6234 | * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports | 6434 | * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Obsolete |
| 6235 | *	filtering of sched scan results using band specific RSSI thresholds. | ||
| 6236 | * | 6435 | * |
| 6237 | * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power | 6436 | * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power |
| 6238 | *	to a station. | 6437 | *	to a station. |
| ... | @@ -6326,6 +6525,26 @@ enum nl80211_feature_flags { | ... | @@ -6326,6 +6525,26 @@ enum nl80211_feature_flags { |
| 6326 | * @NL80211_EXT_FEATURE_SECURE_NAN: Device supports NAN Pairing which enables | 6525 | * @NL80211_EXT_FEATURE_SECURE_NAN: Device supports NAN Pairing which enables |
| 6327 | *	authentication, data encryption and message integrity. | 6526 | *	authentication, data encryption and message integrity. |
| 6328 | * | 6527 | * |
| 6528 | * @NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA: Device supports randomized TA | ||
| 6529 | *	in authentication and deauthentication frames sent to unassociated peer | ||
| 6530 | *	using @NL80211_CMD_FRAME. | ||
| 6531 | * | ||
| 6532 | * @NL80211_EXT_FEATURE_OWE_OFFLOAD: Driver/Device wants to do OWE DH IE | ||
| 6533 | *	handling in station mode. | ||
| 6534 | * | ||
| 6535 | * @NL80211_EXT_FEATURE_OWE_OFFLOAD_AP: Driver/Device wants to do OWE DH IE | ||
| 6536 | *	handling in AP mode. | ||
| 6537 | * | ||
| 6538 | * @NL80211_EXT_FEATURE_DFS_CONCURRENT: The device supports peer-to-peer or | ||
| 6539 | *	ad hoc operation on DFS channels under the control of a concurrent | ||
| 6540 | *	DFS master on the same channel as described in FCC-594280 D01 | ||
| 6541 | *	(Section B.3). This, for example, allows P2P GO and P2P clients to | ||
| 6542 | *	operate on DFS channels as long as there's a concurrent BSS connection. | ||
| 6543 | * | ||
| 6544 | * @NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT: The driver has support for SPP | ||
| 6545 | *	(signaling and payload protected) A-MSDUs and this shall be advertised | ||
| 6546 | *	in the RSNXE. | ||
| 6547 | * | ||
| 6329 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 6548 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 6330 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 6549 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 6331 | */ | 6550 | */ |
| ... | @@ -6367,7 +6586,7 @@ enum nl80211_ext_feature_index { | ... | @@ -6367,7 +6586,7 @@ enum nl80211_ext_feature_index { |
| 6367 | 	NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, | 6586 | 	NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, |
| 6368 | 	NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, | 6587 | 	NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, |
| 6369 | 	NL80211_EXT_FEATURE_AP_PMKSA_CACHING, | 6588 | 	NL80211_EXT_FEATURE_AP_PMKSA_CACHING, |
| 6370 | 	NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD, | 6589 | 	NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD, /* obsolete */ |
| 6371 | 	NL80211_EXT_FEATURE_EXT_KEY_ID, | 6590 | 	NL80211_EXT_FEATURE_EXT_KEY_ID, |
| 6372 | 	NL80211_EXT_FEATURE_STA_TX_PWR, | 6591 | 	NL80211_EXT_FEATURE_STA_TX_PWR, |
| 6373 | 	NL80211_EXT_FEATURE_SAE_OFFLOAD, | 6592 | 	NL80211_EXT_FEATURE_SAE_OFFLOAD, |
| ... | @@ -6396,6 +6615,11 @@ enum nl80211_ext_feature_index { | ... | @@ -6396,6 +6615,11 @@ enum nl80211_ext_feature_index { |
| 6396 | 	NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE, | 6615 | 	NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE, |
| 6397 | 	NL80211_EXT_FEATURE_PUNCT, | 6616 | 	NL80211_EXT_FEATURE_PUNCT, |
| 6398 | 	NL80211_EXT_FEATURE_SECURE_NAN, | 6617 | 	NL80211_EXT_FEATURE_SECURE_NAN, |
| 6618 | 	NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA, | ||
| 6619 | 	NL80211_EXT_FEATURE_OWE_OFFLOAD, | ||
| 6620 | 	NL80211_EXT_FEATURE_OWE_OFFLOAD_AP, | ||
| 6621 | 	NL80211_EXT_FEATURE_DFS_CONCURRENT, | ||
| 6622 | 	NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT, | ||
| 6399 | 6623 | ||
| 6400 | 	/* add new features before the definition below */ | 6624 | 	/* add new features before the definition below */ |
| 6401 | 	NUM_NL80211_EXT_FEATURES, | 6625 | 	NUM_NL80211_EXT_FEATURES, |
| ... | @@ -6480,7 +6704,7 @@ enum nl80211_timeout_reason { | ... | @@ -6480,7 +6704,7 @@ enum nl80211_timeout_reason { |
| 6480 | *	request parameters IE in the probe request | 6704 | *	request parameters IE in the probe request |
| 6481 | * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses | 6705 | * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses |
| 6482 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at | 6706 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at |
| 6483 | *	rate of at least 5.5M. In case non OCE AP is discovered in the channel, | 6707 | *	rate of at least 5.5M. In case non-OCE AP is discovered in the channel, |
| 6484 | *	only the first probe req in the channel will be sent in high rate. | 6708 | *	only the first probe req in the channel will be sent in high rate. |
| 6485 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request | 6709 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request |
| 6486 | *	tx deferral (dot11FILSProbeDelay shall be set to 15ms) | 6710 | *	tx deferral (dot11FILSProbeDelay shall be set to 15ms) |
| ... | @@ -6510,8 +6734,16 @@ enum nl80211_timeout_reason { | ... | @@ -6510,8 +6734,16 @@ enum nl80211_timeout_reason { |
| 6510 | * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with | 6734 | * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with |
| 6511 | *	%NL80211_ATTR_SCAN_FREQ_KHZ. This also means | 6735 | *	%NL80211_ATTR_SCAN_FREQ_KHZ. This also means |
| 6512 | *	%NL80211_ATTR_SCAN_FREQUENCIES will not be included. | 6736 | *	%NL80211_ATTR_SCAN_FREQUENCIES will not be included. |
| 6513 | * @NL80211_SCAN_FLAG_COLOCATED_6GHZ: scan for colocated APs reported by | 6737 | * @NL80211_SCAN_FLAG_COLOCATED_6GHZ: scan for collocated APs reported by |
| 6514 | *	2.4/5 GHz APs | 6738 | *	2.4/5 GHz APs. When the flag is set, the scan logic will use the |
| 6739 | *	information from the RNR element found in beacons/probe responses | ||
| 6740 | *	received on the 2.4/5 GHz channels to actively scan only the 6GHz | ||
| 6741 | *	channels on which APs are expected to be found. Note that when not set, | ||
| 6742 | *	the scan logic would scan all 6GHz channels, but since transmission of | ||
| 6743 | *	probe requests on non-PSC channels is limited, it is highly likely that | ||
| 6744 | *	these channels would passively be scanned. Also note that when the flag | ||
| 6745 | *	is set, in addition to the colocated APs, PSC channels would also be | ||
| 6746 | *	scanned if the user space has asked for it. | ||
| 6515 | */ | 6747 | */ |
| 6516 | enum nl80211_scan_flags { | 6748 | enum nl80211_scan_flags { |
| 6517 | 	NL80211_SCAN_FLAG_LOW_PRIORITY				= 1<<0, | 6749 | 	NL80211_SCAN_FLAG_LOW_PRIORITY				= 1<<0, |
| ... | @@ -6558,6 +6790,8 @@ enum nl80211_acl_policy { | ... | @@ -6558,6 +6790,8 @@ enum nl80211_acl_policy { |
| 6558 | * @NL80211_SMPS_STATIC: static SMPS (use a single antenna) | 6790 | * @NL80211_SMPS_STATIC: static SMPS (use a single antenna) |
| 6559 | * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and | 6791 | * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and |
| 6560 | *	turn on other antennas after CTS/RTS). | 6792 | *	turn on other antennas after CTS/RTS). |
| 6793 | * @__NL80211_SMPS_AFTER_LAST: internal | ||
| 6794 | * @NL80211_SMPS_MAX: highest used enumeration | ||
| 6561 | */ | 6795 | */ |
| 6562 | enum nl80211_smps_mode { | 6796 | enum nl80211_smps_mode { |
| 6563 | 	NL80211_SMPS_OFF, | 6797 | 	NL80211_SMPS_OFF, |
| ... | @@ -6779,6 +7013,8 @@ enum nl80211_bss_select_attr { | ... | @@ -6779,6 +7013,8 @@ enum nl80211_bss_select_attr { |
| 6779 | * @NL80211_NAN_FUNC_PUBLISH: function is publish | 7013 | * @NL80211_NAN_FUNC_PUBLISH: function is publish |
| 6780 | * @NL80211_NAN_FUNC_SUBSCRIBE: function is subscribe | 7014 | * @NL80211_NAN_FUNC_SUBSCRIBE: function is subscribe |
| 6781 | * @NL80211_NAN_FUNC_FOLLOW_UP: function is follow-up | 7015 | * @NL80211_NAN_FUNC_FOLLOW_UP: function is follow-up |
| 7016 | * @__NL80211_NAN_FUNC_TYPE_AFTER_LAST: internal use | ||
| 7017 | * @NL80211_NAN_FUNC_MAX_TYPE: internal use | ||
| 6782 | */ | 7018 | */ |
| 6783 | enum nl80211_nan_function_type { | 7019 | enum nl80211_nan_function_type { |
| 6784 | 	NL80211_NAN_FUNC_PUBLISH, | 7020 | 	NL80211_NAN_FUNC_PUBLISH, |
| ... | @@ -6840,7 +7076,7 @@ enum nl80211_nan_func_term_reason { | ... | @@ -6840,7 +7076,7 @@ enum nl80211_nan_func_term_reason { |
| 6840 | *	The instance ID for the follow up Service Discovery Frame. This is u8. | 7076 | *	The instance ID for the follow up Service Discovery Frame. This is u8. |
| 6841 | * @NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID: relevant if the function's type | 7077 | * @NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID: relevant if the function's type |
| 6842 | *	is follow up. This is a u8. | 7078 | *	is follow up. This is a u8. |
| 6843 | *	The requestor instance ID for the follow up Service Discovery Frame. | 7079 | *	The requester instance ID for the follow up Service Discovery Frame. |
| 6844 | * @NL80211_NAN_FUNC_FOLLOW_UP_DEST: the MAC address of the recipient of the | 7080 | * @NL80211_NAN_FUNC_FOLLOW_UP_DEST: the MAC address of the recipient of the |
| 6845 | *	follow up Service Discovery Frame. This is a binary attribute. | 7081 | *	follow up Service Discovery Frame. This is a binary attribute. |
| 6846 | * @NL80211_NAN_FUNC_CLOSE_RANGE: is this function limited for devices in a | 7082 | * @NL80211_NAN_FUNC_CLOSE_RANGE: is this function limited for devices in a |
| ... | @@ -6939,7 +7175,7 @@ enum nl80211_nan_match_attributes { | ... | @@ -6939,7 +7175,7 @@ enum nl80211_nan_match_attributes { |
| 6939 | }; | 7175 | }; |
| 6940 | 7176 | ||
| 6941 | /** | 7177 | /** |
| 6942 | * nl80211_external_auth_action - Action to perform with external | 7178 | * enum nl80211_external_auth_action - Action to perform with external |
| 6943 | * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION. | 7179 | * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION. |
| 6944 | * @NL80211_EXTERNAL_AUTH_START: Start the authentication. | 7180 | * @NL80211_EXTERNAL_AUTH_START: Start the authentication. |
| 6945 | * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication. | 7181 | * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication. |
| ... | @@ -6957,7 +7193,7 @@ enum nl80211_external_auth_action { | ... | @@ -6957,7 +7193,7 @@ enum nl80211_external_auth_action { |
| 6957 | * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element | 7193 | * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element |
| 6958 | *	(9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10), | 7194 | *	(9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10), |
| 6959 | *	i.e. starting with the measurement token | 7195 | *	i.e. starting with the measurement token |
| 6960 | * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element | 7196 | * @NL80211_FTM_RESP_ATTR_CIVICLOC: The content of Measurement Report Element |
| 6961 | *	(9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13), | 7197 | *	(9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13), |
| 6962 | *	i.e. starting with the measurement token | 7198 | *	i.e. starting with the measurement token |
| 6963 | * @__NL80211_FTM_RESP_ATTR_LAST: Internal | 7199 | * @__NL80211_FTM_RESP_ATTR_LAST: Internal |
| ... | @@ -7230,7 +7466,7 @@ enum nl80211_peer_measurement_attrs { | ... | @@ -7230,7 +7466,7 @@ enum nl80211_peer_measurement_attrs { |
| 7230 | * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if | 7466 | * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if |
| 7231 | *	trigger based ranging measurement is supported | 7467 | *	trigger based ranging measurement is supported |
| 7232 | * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating | 7468 | * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating |
| 7233 | *	if non trigger based ranging measurement is supported | 7469 | *	if non-trigger-based ranging measurement is supported |
| 7234 | * | 7470 | * |
| 7235 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal | 7471 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal |
| 7236 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number | 7472 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number |
| ... | @@ -7284,7 +7520,7 @@ enum nl80211_peer_measurement_ftm_capa { | ... | @@ -7284,7 +7520,7 @@ enum nl80211_peer_measurement_ftm_capa { |
| 7284 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor | 7520 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor |
| 7285 | *	%NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based | 7521 | *	%NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based |
| 7286 | *	ranging will be used. | 7522 | *	ranging will be used. |
| 7287 | * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non trigger based | 7523 | * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non-trigger-based |
| 7288 | *	ranging measurement (flag) | 7524 | *	ranging measurement (flag) |
| 7289 | *	This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are | 7525 | *	This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are |
| 7290 | *	mutually exclusive. | 7526 | *	mutually exclusive. |
| ... | @@ -7362,7 +7598,7 @@ enum nl80211_peer_measurement_ftm_failure_reasons { | ... | @@ -7362,7 +7598,7 @@ enum nl80211_peer_measurement_ftm_failure_reasons { |
| 7362 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames | 7598 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames |
| 7363 | *	transmitted (u32, optional) | 7599 | *	transmitted (u32, optional) |
| 7364 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames | 7600 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames |
| 7365 | *	that were acknowleged (u32, optional) | 7601 | *	that were acknowledged (u32, optional) |
| 7366 | * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the | 7602 | * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the |
| 7367 | *	busy peer (u32, seconds) | 7603 | *	busy peer (u32, seconds) |
| 7368 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent | 7604 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent |
| ... | @@ -7523,7 +7759,7 @@ enum nl80211_iftype_akm_attributes { | ... | @@ -7523,7 +7759,7 @@ enum nl80211_iftype_akm_attributes { |
| 7523 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU). | 7759 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU). |
| 7524 | *	Allowed range: 0..10000 (TU = Time Unit) | 7760 | *	Allowed range: 0..10000 (TU = Time Unit) |
| 7525 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU). | 7761 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU). |
| 7526 | *	Allowed range: 0..10000 (TU = Time Unit) | 7762 | *	Allowed range: 0..10000 (TU = Time Unit). If set to 0, the feature is disabled. |
| 7527 | * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action | 7763 | * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action |
| 7528 | *	frame including the headers. | 7764 | *	frame including the headers. |
| 7529 | * | 7765 | * |
| ... | @@ -7556,7 +7792,8 @@ enum nl80211_fils_discovery_attributes { | ... | @@ -7556,7 +7792,8 @@ enum nl80211_fils_discovery_attributes { |
| 7556 | * | 7792 | * |
| 7557 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU). | 7793 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU). |
| 7558 | *	Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0 | 7794 | *	Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0 |
| 7559 | *	26.17.2.3.2 (AP behavior for fast passive scanning). | 7795 | *	26.17.2.3.2 (AP behavior for fast passive scanning). If set to 0, the feature is |
| 7796 | *	disabled. | ||
| 7560 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response | 7797 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response |
| 7561 | *	frame template (binary). | 7798 | *	frame template (binary). |
| 7562 | * | 7799 | * |
| ... | @@ -7599,6 +7836,7 @@ enum nl80211_sae_pwe_mechanism { | ... | @@ -7599,6 +7836,7 @@ enum nl80211_sae_pwe_mechanism { |
| 7599 | * | 7836 | * |
| 7600 | * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit | 7837 | * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit |
| 7601 | * | 7838 | * |
| 7839 | * @NUM_NL80211_SAR_TYPE: internal | ||
| 7602 | */ | 7840 | */ |
| 7603 | enum nl80211_sar_type { | 7841 | enum nl80211_sar_type { |
| 7604 | 	NL80211_SAR_TYPE_POWER, | 7842 | 	NL80211_SAR_TYPE_POWER, |
| ... | @@ -7612,6 +7850,8 @@ enum nl80211_sar_type { | ... | @@ -7612,6 +7850,8 @@ enum nl80211_sar_type { |
| 7612 | /** | 7850 | /** |
| 7613 | * enum nl80211_sar_attrs - Attributes for SAR spec | 7851 | * enum nl80211_sar_attrs - Attributes for SAR spec |
| 7614 | * | 7852 | * |
| 7853 | * @__NL80211_SAR_ATTR_INVALID: Invalid | ||
| 7854 | * | ||
| 7615 | * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type. | 7855 | * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type. |
| 7616 | * | 7856 | * |
| 7617 | * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power | 7857 | * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power |
| ... | @@ -7643,6 +7883,8 @@ enum nl80211_sar_attrs { | ... | @@ -7643,6 +7883,8 @@ enum nl80211_sar_attrs { |
| 7643 | /** | 7883 | /** |
| 7644 | * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs | 7884 | * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs |
| 7645 | * | 7885 | * |
| 7886 | * @__NL80211_SAR_ATTR_SPECS_INVALID: Invalid | ||
| 7887 | * | ||
| 7646 | * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual | 7888 | * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual |
| 7647 | *	power limit value in units of 0.25 dBm if type is | 7889 | *	power limit value in units of 0.25 dBm if type is |
| 7648 | *	NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm). | 7890 | *	NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm). |
lib/libc/include/any-linux-any/linux/npcm-video.h created+41| ... | @@ -0,0 +1,41 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Controls header for NPCM video driver | ||
| 4 | * | ||
| 5 | * Copyright (C) 2022 Nuvoton Technologies | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _LINUX_NPCM_VIDEO_H | ||
| 9 | #define _LINUX_NPCM_VIDEO_H | ||
| 10 | |||
| 11 | #include <linux/v4l2-controls.h> | ||
| 12 | |||
| 13 | /* | ||
| 14 | * Check Documentation/userspace-api/media/drivers/npcm-video.rst for control | ||
| 15 | * details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | /* | ||
| 19 | * This control is meant to set the mode of NPCM Video Capture/Differentiation | ||
| 20 | * (VCD) engine. | ||
| 21 | * | ||
| 22 | * The VCD engine supports two modes: | ||
| 23 | * COMPLETE - Capture the next complete frame into memory. | ||
| 24 | * DIFF	 - Compare the incoming frame with the frame stored in memory, and | ||
| 25 | *	 updates the differentiated frame in memory. | ||
| 26 | */ | ||
| 27 | #define V4L2_CID_NPCM_CAPTURE_MODE	(V4L2_CID_USER_NPCM_BASE + 0) | ||
| 28 | |||
| 29 | enum v4l2_npcm_capture_mode { | ||
| 30 | 	V4L2_NPCM_CAPTURE_MODE_COMPLETE	= 0, /* COMPLETE mode */ | ||
| 31 | 	V4L2_NPCM_CAPTURE_MODE_DIFF	= 1, /* DIFF mode */ | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* | ||
| 35 | * This control is meant to get the count of compressed HEXTILE rectangles which | ||
| 36 | * is relevant to the number of differentiated frames if VCD is in DIFF mode. | ||
| 37 | * And the count will always be 1 if VCD is in COMPLETE mode. | ||
| 38 | */ | ||
| 39 | #define V4L2_CID_NPCM_RECT_COUNT	(V4L2_CID_USER_NPCM_BASE + 1) | ||
| 40 | |||
| 41 | #endif /* _LINUX_NPCM_VIDEO_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nsm.h created+31| ... | @@ -0,0 +1,31 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef __UAPI_LINUX_NSM_H | ||
| 7 | #define __UAPI_LINUX_NSM_H | ||
| 8 | |||
| 9 | #include <linux/ioctl.h> | ||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | #define NSM_MAGIC		0x0A | ||
| 13 | |||
| 14 | #define NSM_REQUEST_MAX_SIZE	0x1000 | ||
| 15 | #define NSM_RESPONSE_MAX_SIZE	0x3000 | ||
| 16 | |||
| 17 | struct nsm_iovec { | ||
| 18 | 	__u64 addr; /* Virtual address of target buffer */ | ||
| 19 | 	__u64 len; /* Length of target buffer */ | ||
| 20 | }; | ||
| 21 | |||
| 22 | /* Raw NSM message. Only available with CAP_SYS_ADMIN. */ | ||
| 23 | struct nsm_raw { | ||
| 24 | 	/* Request from user */ | ||
| 25 | 	struct nsm_iovec request; | ||
| 26 | 	/* Response to user */ | ||
| 27 | 	struct nsm_iovec response; | ||
| 28 | }; | ||
| 29 | #define NSM_IOCTL_RAW		_IOWR(NSM_MAGIC, 0x0, struct nsm_raw) | ||
| 30 | |||
| 31 | #endif /* __UAPI_LINUX_NSM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ntsync.h created+23| ... | @@ -0,0 +1,23 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Kernel support for NT synchronization primitive emulation | ||
| 4 | * | ||
| 5 | * Copyright (C) 2021-2022 Elizabeth Figura <zfigura@codeweavers.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __LINUX_NTSYNC_H | ||
| 9 | #define __LINUX_NTSYNC_H | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 13 | struct ntsync_sem_args { | ||
| 14 | 	__u32 sem; | ||
| 15 | 	__u32 count; | ||
| 16 | 	__u32 max; | ||
| 17 | }; | ||
| 18 | |||
| 19 | #define NTSYNC_IOC_CREATE_SEM		_IOWR('N', 0x80, struct ntsync_sem_args) | ||
| 20 | |||
| 21 | #define NTSYNC_IOC_SEM_POST		_IOWR('N', 0x81, __u32) | ||
| 22 | |||
| 23 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/openvswitch.h+3| ... | @@ -752,6 +752,7 @@ struct ovs_action_push_vlan { | ... | @@ -752,6 +752,7 @@ struct ovs_action_push_vlan { |
| 752 | */ | 752 | */ |
| 753 | enum ovs_hash_alg { | 753 | enum ovs_hash_alg { |
| 754 | 	OVS_HASH_ALG_L4, | 754 | 	OVS_HASH_ALG_L4, |
| 755 | 	OVS_HASH_ALG_SYM_L4, | ||
| 755 | }; | 756 | }; |
| 756 | 757 | ||
| 757 | /* | 758 | /* |
| ... | @@ -936,6 +937,7 @@ enum ovs_check_pkt_len_attr { | ... | @@ -936,6 +937,7 @@ enum ovs_check_pkt_len_attr { |
| 936 | * start of the packet or at the start of the l3 header depending on the value | 937 | * start of the packet or at the start of the l3 header depending on the value |
| 937 | * of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS | 938 | * of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS |
| 938 | * argument. | 939 | * argument. |
| 940 | * @OVS_ACTION_ATTR_DROP: Explicit drop action. | ||
| 939 | * | 941 | * |
| 940 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | 942 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all |
| 941 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | 943 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment |
| ... | @@ -973,6 +975,7 @@ enum ovs_action_attr { | ... | @@ -973,6 +975,7 @@ enum ovs_action_attr { |
| 973 | 	OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */ | 975 | 	OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */ |
| 974 | 	OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */ | 976 | 	OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */ |
| 975 | 	OVS_ACTION_ATTR_DEC_TTL, /* Nested OVS_DEC_TTL_ATTR_*. */ | 977 | 	OVS_ACTION_ATTR_DEC_TTL, /* Nested OVS_DEC_TTL_ATTR_*. */ |
| 978 | 	OVS_ACTION_ATTR_DROP, /* u32 error code. */ | ||
| 976 | 979 | ||
| 977 | 	__OVS_ACTION_ATTR_MAX,	 /* Nothing past this will be accepted | 980 | 	__OVS_ACTION_ATTR_MAX,	 /* Nothing past this will be accepted |
| 978 | 				 * from userspace. */ | 981 | 				 * from userspace. */ |
lib/libc/include/any-linux-any/linux/papr_pdsm.h created+165| ... | @@ -0,0 +1,165 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * PAPR nvDimm Specific Methods (PDSM) and structs for libndctl | ||
| 4 | * | ||
| 5 | * (C) Copyright IBM 2020 | ||
| 6 | * | ||
| 7 | * Author: Vaibhav Jain <vaibhav at linux.ibm.com> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _ASM_POWERPC_PAPR_PDSM_H_ | ||
| 11 | #define _ASM_POWERPC_PAPR_PDSM_H_ | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/ndctl.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * PDSM Envelope: | ||
| 18 | * | ||
| 19 | * The ioctl ND_CMD_CALL exchange data between user-space and kernel via | ||
| 20 | * envelope which consists of 2 headers sections and payload sections as | ||
| 21 | * illustrated below: | ||
| 22 | * +-----------------+---------------+---------------------------+ | ||
| 23 | * | 64-Bytes | 8-Bytes | Max 184-Bytes | | ||
| 24 | * +-----------------+---------------+---------------------------+ | ||
| 25 | * | ND-HEADER | PDSM-HEADER | PDSM-PAYLOAD | | ||
| 26 | * +-----------------+---------------+---------------------------+ | ||
| 27 | * | nd_family | | | | ||
| 28 | * | nd_size_out | cmd_status | | | ||
| 29 | * | nd_size_in | reserved | nd_pdsm_payload | | ||
| 30 | * | nd_command | payload --> | | | ||
| 31 | * | nd_fw_size | | | | ||
| 32 | * | nd_payload ---> | | | | ||
| 33 | * +---------------+-----------------+---------------------------+ | ||
| 34 | * | ||
| 35 | * ND Header: | ||
| 36 | * This is the generic libnvdimm header described as 'struct nd_cmd_pkg' | ||
| 37 | * which is interpreted by libnvdimm before passed on to papr_scm. Important | ||
| 38 | * member fields used are: | ||
| 39 | * 'nd_family'		: (In) NVDIMM_FAMILY_PAPR_SCM | ||
| 40 | * 'nd_size_in'		: (In) PDSM-HEADER + PDSM-IN-PAYLOAD (usually 0) | ||
| 41 | * 'nd_size_out' : (In) PDSM-HEADER + PDSM-RETURN-PAYLOAD | ||
| 42 | * 'nd_command' : (In) One of PAPR_PDSM_XXX | ||
| 43 | * 'nd_fw_size' : (Out) PDSM-HEADER + size of actual payload returned | ||
| 44 | * | ||
| 45 | * PDSM Header: | ||
| 46 | * This is papr-scm specific header that precedes the payload. This is defined | ||
| 47 | * as nd_cmd_pdsm_pkg. Following fields aare available in this header: | ||
| 48 | * | ||
| 49 | * 'cmd_status'		: (Out) Errors if any encountered while servicing PDSM. | ||
| 50 | * 'reserved'		: Not used, reserved for future and should be set to 0. | ||
| 51 | * 'payload' : A union of all the possible payload structs | ||
| 52 | * | ||
| 53 | * PDSM Payload: | ||
| 54 | * | ||
| 55 | * The layout of the PDSM Payload is defined by various structs shared between | ||
| 56 | * papr_scm and libndctl so that contents of payload can be interpreted. As such | ||
| 57 | * its defined as a union of all possible payload structs as | ||
| 58 | * 'union nd_pdsm_payload'. Based on the value of 'nd_cmd_pkg.nd_command' | ||
| 59 | * appropriate member of the union is accessed. | ||
| 60 | */ | ||
| 61 | |||
| 62 | /* Max payload size that we can handle */ | ||
| 63 | #define ND_PDSM_PAYLOAD_MAX_SIZE 184 | ||
| 64 | |||
| 65 | /* Max payload size that we can handle */ | ||
| 66 | #define ND_PDSM_HDR_SIZE \ | ||
| 67 | 	(sizeof(struct nd_pkg_pdsm) - ND_PDSM_PAYLOAD_MAX_SIZE) | ||
| 68 | |||
| 69 | /* Various nvdimm health indicators */ | ||
| 70 | #define PAPR_PDSM_DIMM_HEALTHY 0 | ||
| 71 | #define PAPR_PDSM_DIMM_UNHEALTHY 1 | ||
| 72 | #define PAPR_PDSM_DIMM_CRITICAL 2 | ||
| 73 | #define PAPR_PDSM_DIMM_FATAL 3 | ||
| 74 | |||
| 75 | /* struct nd_papr_pdsm_health.extension_flags field flags */ | ||
| 76 | |||
| 77 | /* Indicate that the 'dimm_fuel_gauge' field is valid */ | ||
| 78 | #define PDSM_DIMM_HEALTH_RUN_GAUGE_VALID 1 | ||
| 79 | |||
| 80 | /* Indicate that the 'dimm_dsc' field is valid */ | ||
| 81 | #define PDSM_DIMM_DSC_VALID 2 | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Struct exchanged between kernel & ndctl in for PAPR_PDSM_HEALTH | ||
| 85 | * Various flags indicate the health status of the dimm. | ||
| 86 | * | ||
| 87 | * extension_flags	: Any extension fields present in the struct. | ||
| 88 | * dimm_unarmed		: Dimm not armed. So contents wont persist. | ||
| 89 | * dimm_bad_shutdown	: Previous shutdown did not persist contents. | ||
| 90 | * dimm_bad_restore	: Contents from previous shutdown werent restored. | ||
| 91 | * dimm_scrubbed	: Contents of the dimm have been scrubbed. | ||
| 92 | * dimm_locked		: Contents of the dimm cant be modified until CEC reboot | ||
| 93 | * dimm_encrypted	: Contents of dimm are encrypted. | ||
| 94 | * dimm_health		: Dimm health indicator. One of PAPR_PDSM_DIMM_XXXX | ||
| 95 | * dimm_fuel_gauge	: Life remaining of DIMM as a percentage from 0-100 | ||
| 96 | */ | ||
| 97 | struct nd_papr_pdsm_health { | ||
| 98 | 	union { | ||
| 99 | 		struct { | ||
| 100 | 			__u32 extension_flags; | ||
| 101 | 			__u8 dimm_unarmed; | ||
| 102 | 			__u8 dimm_bad_shutdown; | ||
| 103 | 			__u8 dimm_bad_restore; | ||
| 104 | 			__u8 dimm_scrubbed; | ||
| 105 | 			__u8 dimm_locked; | ||
| 106 | 			__u8 dimm_encrypted; | ||
| 107 | 			__u16 dimm_health; | ||
| 108 | |||
| 109 | 			/* Extension flag PDSM_DIMM_HEALTH_RUN_GAUGE_VALID */ | ||
| 110 | 			__u16 dimm_fuel_gauge; | ||
| 111 | |||
| 112 | 			/* Extension flag PDSM_DIMM_DSC_VALID */ | ||
| 113 | 			__u64 dimm_dsc; | ||
| 114 | 		}; | ||
| 115 | 		__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 116 | 	}; | ||
| 117 | }; | ||
| 118 | |||
| 119 | /* Flags for injecting specific smart errors */ | ||
| 120 | #define PDSM_SMART_INJECT_HEALTH_FATAL		(1 << 0) | ||
| 121 | #define PDSM_SMART_INJECT_BAD_SHUTDOWN		(1 << 1) | ||
| 122 | |||
| 123 | struct nd_papr_pdsm_smart_inject { | ||
| 124 | 	union { | ||
| 125 | 		struct { | ||
| 126 | 			/* One or more of PDSM_SMART_INJECT_ */ | ||
| 127 | 			__u32 flags; | ||
| 128 | 			__u8 fatal_enable; | ||
| 129 | 			__u8 unsafe_shutdown_enable; | ||
| 130 | 		}; | ||
| 131 | 		__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 132 | 	}; | ||
| 133 | }; | ||
| 134 | |||
| 135 | /* | ||
| 136 | * Methods to be embedded in ND_CMD_CALL request. These are sent to the kernel | ||
| 137 | * via 'nd_cmd_pkg.nd_command' member of the ioctl struct | ||
| 138 | */ | ||
| 139 | enum papr_pdsm { | ||
| 140 | 	PAPR_PDSM_MIN = 0x0, | ||
| 141 | 	PAPR_PDSM_HEALTH, | ||
| 142 | 	PAPR_PDSM_SMART_INJECT, | ||
| 143 | 	PAPR_PDSM_MAX, | ||
| 144 | }; | ||
| 145 | |||
| 146 | /* Maximal union that can hold all possible payload types */ | ||
| 147 | union nd_pdsm_payload { | ||
| 148 | 	struct nd_papr_pdsm_health health; | ||
| 149 | 	struct nd_papr_pdsm_smart_inject smart_inject; | ||
| 150 | 	__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 151 | } __attribute__((packed)); | ||
| 152 | |||
| 153 | /* | ||
| 154 | * PDSM-header + payload expected with ND_CMD_CALL ioctl from libnvdimm | ||
| 155 | * Valid member of union 'payload' is identified via 'nd_cmd_pkg.nd_command' | ||
| 156 | * that should always precede this struct when sent to papr_scm via CMD_CALL | ||
| 157 | * interface. | ||
| 158 | */ | ||
| 159 | struct nd_pkg_pdsm { | ||
| 160 | 	__s32 cmd_status;	/* Out: Sub-cmd status returned back */ | ||
| 161 | 	__u16 reserved[2];	/* Ignored and to be set as '0' */ | ||
| 162 | 	union nd_pdsm_payload payload; | ||
| 163 | } __attribute__((packed)); | ||
| 164 | |||
| 165 | #endif /* _ASM_POWERPC_PAPR_PDSM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/parport.h+3| ... | @@ -90,6 +90,9 @@ typedef enum { | ... | @@ -90,6 +90,9 @@ typedef enum { |
| 90 | /* Flags for block transfer operations. */ | 90 | /* Flags for block transfer operations. */ |
| 91 | #define PARPORT_EPP_FAST		(1<<0) /* Unreliable counts. */ | 91 | #define PARPORT_EPP_FAST		(1<<0) /* Unreliable counts. */ |
| 92 | #define PARPORT_W91284PIC		(1<<1) /* have a Warp9 w91284pic in the device */ | 92 | #define PARPORT_W91284PIC		(1<<1) /* have a Warp9 w91284pic in the device */ |
| 93 | #define PARPORT_EPP_FAST_32		PARPORT_EPP_FAST /* 32-bit EPP transfers */ | ||
| 94 | #define PARPORT_EPP_FAST_16		(1<<2) /* 16-bit EPP transfers */ | ||
| 95 | #define PARPORT_EPP_FAST_8		(1<<3) /* 8-bit EPP transfers */ | ||
| 93 | 96 | ||
| 94 | /* The rest is for the kernel only */ | 97 | /* The rest is for the kernel only */ |
| 95 | #endif /* _PARPORT_H_ */ | 98 | #endif /* _PARPORT_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/pci_regs.h+26-5| ... | @@ -80,6 +80,7 @@ | ... | @@ -80,6 +80,7 @@ |
| 80 | #define PCI_HEADER_TYPE_NORMAL		0 | 80 | #define PCI_HEADER_TYPE_NORMAL		0 |
| 81 | #define PCI_HEADER_TYPE_BRIDGE		1 | 81 | #define PCI_HEADER_TYPE_BRIDGE		1 |
| 82 | #define PCI_HEADER_TYPE_CARDBUS	2 | 82 | #define PCI_HEADER_TYPE_CARDBUS	2 |
| 83 | #define PCI_HEADER_TYPE_MFD		0x80	/* Multi-Function Device (possible) */ | ||
| 83 | 84 | ||
| 84 | #define PCI_BIST		0x0f	/* 8 bits */ | 85 | #define PCI_BIST		0x0f	/* 8 bits */ |
| 85 | #define PCI_BIST_CODE_MASK	0x0f	/* Return result */ | 86 | #define PCI_BIST_CODE_MASK	0x0f	/* Return result */ |
| ... | @@ -637,6 +638,7 @@ | ... | @@ -637,6 +638,7 @@ |
| 637 | #define PCI_EXP_RTCAP		0x1e	/* Root Capabilities */ | 638 | #define PCI_EXP_RTCAP		0x1e	/* Root Capabilities */ |
| 638 | #define PCI_EXP_RTCAP_CRSVIS	0x0001	/* CRS Software Visibility capability */ | 639 | #define PCI_EXP_RTCAP_CRSVIS	0x0001	/* CRS Software Visibility capability */ |
| 639 | #define PCI_EXP_RTSTA		0x20	/* Root Status */ | 640 | #define PCI_EXP_RTSTA		0x20	/* Root Status */ |
| 641 | #define PCI_EXP_RTSTA_PME_RQ_ID 0x0000ffff /* PME Requester ID */ | ||
| 640 | #define PCI_EXP_RTSTA_PME	0x00010000 /* PME status */ | 642 | #define PCI_EXP_RTSTA_PME	0x00010000 /* PME status */ |
| 641 | #define PCI_EXP_RTSTA_PENDING	0x00020000 /* PME pending */ | 643 | #define PCI_EXP_RTSTA_PENDING	0x00020000 /* PME pending */ |
| 642 | /* | 644 | /* |
| ... | @@ -738,6 +740,7 @@ | ... | @@ -738,6 +740,7 @@ |
| 738 | #define PCI_EXT_CAP_ID_DVSEC	0x23	/* Designated Vendor-Specific */ | 740 | #define PCI_EXT_CAP_ID_DVSEC	0x23	/* Designated Vendor-Specific */ |
| 739 | #define PCI_EXT_CAP_ID_DLF	0x25	/* Data Link Feature */ | 741 | #define PCI_EXT_CAP_ID_DLF	0x25	/* Data Link Feature */ |
| 740 | #define PCI_EXT_CAP_ID_PL_16GT	0x26	/* Physical Layer 16.0 GT/s */ | 742 | #define PCI_EXT_CAP_ID_PL_16GT	0x26	/* Physical Layer 16.0 GT/s */ |
| 743 | #define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */ | ||
| 741 | #define PCI_EXT_CAP_ID_DOE	0x2E	/* Data Object Exchange */ | 744 | #define PCI_EXT_CAP_ID_DOE	0x2E	/* Data Object Exchange */ |
| 742 | #define PCI_EXT_CAP_ID_MAX	PCI_EXT_CAP_ID_DOE | 745 | #define PCI_EXT_CAP_ID_MAX	PCI_EXT_CAP_ID_DOE |
| 743 | 746 | ||
| ... | @@ -929,12 +932,13 @@ | ... | @@ -929,12 +932,13 @@ |
| 929 | 932 | ||
| 930 | /* Process Address Space ID */ | 933 | /* Process Address Space ID */ |
| 931 | #define PCI_PASID_CAP		0x04 /* PASID feature register */ | 934 | #define PCI_PASID_CAP		0x04 /* PASID feature register */ |
| 932 | #define PCI_PASID_CAP_EXEC	0x02	/* Exec permissions Supported */ | 935 | #define PCI_PASID_CAP_EXEC	0x0002	/* Exec permissions Supported */ |
| 933 | #define PCI_PASID_CAP_PRIV	0x04	/* Privilege Mode Supported */ | 936 | #define PCI_PASID_CAP_PRIV	0x0004	/* Privilege Mode Supported */ |
| 937 | #define PCI_PASID_CAP_WIDTH	0x1f00 | ||
| 934 | #define PCI_PASID_CTRL		0x06 /* PASID control register */ | 938 | #define PCI_PASID_CTRL		0x06 /* PASID control register */ |
| 935 | #define PCI_PASID_CTRL_ENABLE	0x01	/* Enable bit */ | 939 | #define PCI_PASID_CTRL_ENABLE	0x0001	/* Enable bit */ |
| 936 | #define PCI_PASID_CTRL_EXEC	0x02	/* Exec permissions Enable */ | 940 | #define PCI_PASID_CTRL_EXEC	0x0002	/* Exec permissions Enable */ |
| 937 | #define PCI_PASID_CTRL_PRIV	0x04	/* Privilege Mode Enable */ | 941 | #define PCI_PASID_CTRL_PRIV	0x0004	/* Privilege Mode Enable */ |
| 938 | #define PCI_EXT_CAP_PASID_SIZEOF	8 | 942 | #define PCI_EXT_CAP_PASID_SIZEOF	8 |
| 939 | 943 | ||
| 940 | /* Single Root I/O Virtualization */ | 944 | /* Single Root I/O Virtualization */ |
| ... | @@ -974,6 +978,8 @@ | ... | @@ -974,6 +978,8 @@ |
| 974 | #define PCI_LTR_VALUE_MASK	0x000003ff | 978 | #define PCI_LTR_VALUE_MASK	0x000003ff |
| 975 | #define PCI_LTR_SCALE_MASK	0x00001c00 | 979 | #define PCI_LTR_SCALE_MASK	0x00001c00 |
| 976 | #define PCI_LTR_SCALE_SHIFT	10 | 980 | #define PCI_LTR_SCALE_SHIFT	10 |
| 981 | #define PCI_LTR_NOSNOOP_VALUE	0x03ff0000 /* Max No-Snoop Latency Value */ | ||
| 982 | #define PCI_LTR_NOSNOOP_SCALE	0x1c000000 /* Scale for Max Value */ | ||
| 977 | #define PCI_EXT_CAP_LTR_SIZEOF	8 | 983 | #define PCI_EXT_CAP_LTR_SIZEOF	8 |
| 978 | 984 | ||
| 979 | /* Access Control Service */ | 985 | /* Access Control Service */ |
| ... | @@ -1041,9 +1047,16 @@ | ... | @@ -1041,9 +1047,16 @@ |
| 1041 | #define PCI_EXP_DPC_STATUS		0x08	/* DPC Status */ | 1047 | #define PCI_EXP_DPC_STATUS		0x08	/* DPC Status */ |
| 1042 | #define PCI_EXP_DPC_STATUS_TRIGGER	 0x0001 /* Trigger Status */ | 1048 | #define PCI_EXP_DPC_STATUS_TRIGGER	 0x0001 /* Trigger Status */ |
| 1043 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN	 0x0006 /* Trigger Reason */ | 1049 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN	 0x0006 /* Trigger Reason */ |
| 1050 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_UNCOR 0x0000 /* Uncorrectable error */ | ||
| 1051 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE 0x0002 /* Rcvd ERR_NONFATAL */ | ||
| 1052 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE 0x0004 /* Rcvd ERR_FATAL */ | ||
| 1053 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_IN_EXT 0x0006 /* Reason in Trig Reason Extension field */ | ||
| 1044 | #define PCI_EXP_DPC_STATUS_INTERRUPT	 0x0008 /* Interrupt Status */ | 1054 | #define PCI_EXP_DPC_STATUS_INTERRUPT	 0x0008 /* Interrupt Status */ |
| 1045 | #define PCI_EXP_DPC_RP_BUSY		 0x0010 /* Root Port Busy */ | 1055 | #define PCI_EXP_DPC_RP_BUSY		 0x0010 /* Root Port Busy */ |
| 1046 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */ | 1056 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */ |
| 1057 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO		0x0000	/* RP PIO error */ | ||
| 1058 | #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_SW_TRIGGER	0x0020	/* DPC SW Trigger bit */ | ||
| 1059 | #define PCI_EXP_DPC_RP_PIO_FEP		 0x1f00 /* RP PIO First Err Ptr */ | ||
| 1047 | 1060 | ||
| 1048 | #define PCI_EXP_DPC_SOURCE_ID		 0x0A	/* DPC Source Identifier */ | 1061 | #define PCI_EXP_DPC_SOURCE_ID		 0x0A	/* DPC Source Identifier */ |
| 1049 | 1062 | ||
| ... | @@ -1087,6 +1100,8 @@ | ... | @@ -1087,6 +1100,8 @@ |
| 1087 | #define PCI_L1SS_CTL1_LTR_L12_TH_VALUE	0x03ff0000 /* LTR_L1.2_THRESHOLD_Value */ | 1100 | #define PCI_L1SS_CTL1_LTR_L12_TH_VALUE	0x03ff0000 /* LTR_L1.2_THRESHOLD_Value */ |
| 1088 | #define PCI_L1SS_CTL1_LTR_L12_TH_SCALE	0xe0000000 /* LTR_L1.2_THRESHOLD_Scale */ | 1101 | #define PCI_L1SS_CTL1_LTR_L12_TH_SCALE	0xe0000000 /* LTR_L1.2_THRESHOLD_Scale */ |
| 1089 | #define PCI_L1SS_CTL2		0x0c	/* Control 2 Register */ | 1102 | #define PCI_L1SS_CTL2		0x0c	/* Control 2 Register */ |
| 1103 | #define PCI_L1SS_CTL2_T_PWR_ON_SCALE	0x00000003 /* T_POWER_ON Scale */ | ||
| 1104 | #define PCI_L1SS_CTL2_T_PWR_ON_VALUE	0x000000f8 /* T_POWER_ON Value */ | ||
| 1090 | 1105 | ||
| 1091 | /* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */ | 1106 | /* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */ |
| 1092 | #define PCI_DVSEC_HEADER1		0x4 /* Designated Vendor-Specific Header1 */ | 1107 | #define PCI_DVSEC_HEADER1		0x4 /* Designated Vendor-Specific Header1 */ |
| ... | @@ -1129,8 +1144,14 @@ | ... | @@ -1129,8 +1144,14 @@ |
| 1129 | #define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH		0x0003ffff | 1144 | #define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH		0x0003ffff |
| 1130 | 1145 | ||
| 1131 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX		0x000000ff | 1146 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX		0x000000ff |
| 1147 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER		0x0000ff00 | ||
| 1132 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID		0x0000ffff | 1148 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID		0x0000ffff |
| 1133 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL		0x00ff0000 | 1149 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL		0x00ff0000 |
| 1134 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX	0xff000000 | 1150 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX	0xff000000 |
| 1135 | 1151 | ||
| 1152 | /* Compute Express Link (CXL r3.1, sec 8.1.5) */ | ||
| 1153 | #define PCI_DVSEC_CXL_PORT				3 | ||
| 1154 | #define PCI_DVSEC_CXL_PORT_CTL				0x0c | ||
| 1155 | #define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR		0x00000001 | ||
| 1156 | |||
| 1136 | #endif /* LINUX_PCI_REGS_H */ | 1157 | #endif /* LINUX_PCI_REGS_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/pcitest.h+2-1| ... | @@ -11,7 +11,8 @@ | ... | @@ -11,7 +11,8 @@ |
| 11 | #define __UAPI_LINUX_PCITEST_H | 11 | #define __UAPI_LINUX_PCITEST_H |
| 12 | 12 | ||
| 13 | #define PCITEST_BAR		_IO('P', 0x1) | 13 | #define PCITEST_BAR		_IO('P', 0x1) |
| 14 | #define PCITEST_LEGACY_IRQ	_IO('P', 0x2) | 14 | #define PCITEST_INTX_IRQ	_IO('P', 0x2) |
| 15 | #define PCITEST_LEGACY_IRQ	PCITEST_INTX_IRQ | ||
| 15 | #define PCITEST_MSI		_IOW('P', 0x3, int) | 16 | #define PCITEST_MSI		_IOW('P', 0x3, int) |
| 16 | #define PCITEST_WRITE		_IOW('P', 0x4, unsigned long) | 17 | #define PCITEST_WRITE		_IOW('P', 0x4, unsigned long) |
| 17 | #define PCITEST_READ		_IOW('P', 0x5, unsigned long) | 18 | #define PCITEST_READ		_IOW('P', 0x5, unsigned long) |
lib/libc/include/any-linux-any/linux/perf_event.h+15-1| ... | @@ -204,6 +204,8 @@ enum perf_branch_sample_type_shift { | ... | @@ -204,6 +204,8 @@ enum perf_branch_sample_type_shift { |
| 204 | 204 | ||
| 205 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT	= 18, /* save privilege mode */ | 205 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT	= 18, /* save privilege mode */ |
| 206 | 206 | ||
| 207 | 	PERF_SAMPLE_BRANCH_COUNTERS_SHIFT	= 19, /* save occurrences of events on a branch */ | ||
| 208 | |||
| 207 | 	PERF_SAMPLE_BRANCH_MAX_SHIFT		/* non-ABI */ | 209 | 	PERF_SAMPLE_BRANCH_MAX_SHIFT		/* non-ABI */ |
| 208 | }; | 210 | }; |
| 209 | 211 | ||
| ... | @@ -235,6 +237,8 @@ enum perf_branch_sample_type { | ... | @@ -235,6 +237,8 @@ enum perf_branch_sample_type { |
| 235 | 237 | ||
| 236 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE	= 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, | 238 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE	= 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, |
| 237 | 239 | ||
| 240 | 	PERF_SAMPLE_BRANCH_COUNTERS	= 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, | ||
| 241 | |||
| 238 | 	PERF_SAMPLE_BRANCH_MAX		= 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 242 | 	PERF_SAMPLE_BRANCH_MAX		= 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 239 | }; | 243 | }; |
| 240 | 244 | ||
| ... | @@ -982,6 +986,12 @@ enum perf_event_type { | ... | @@ -982,6 +986,12 @@ enum perf_event_type { |
| 982 | 	 *	{ u64 nr; | 986 | 	 *	{ u64 nr; |
| 983 | 	 *	 { u64	hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX | 987 | 	 *	 { u64	hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX |
| 984 | 	 * { u64 from, to, flags } lbr[nr]; | 988 | 	 * { u64 from, to, flags } lbr[nr]; |
| 989 | 	 * # | ||
| 990 | 	 * # The format of the counters is decided by the | ||
| 991 | 	 * # "branch_counter_nr" and "branch_counter_width", | ||
| 992 | 	 * # which are defined in the ABI. | ||
| 993 | 	 * # | ||
| 994 | 	 * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS | ||
| 985 | 	 * } && PERF_SAMPLE_BRANCH_STACK | 995 | 	 * } && PERF_SAMPLE_BRANCH_STACK |
| 986 | 	 * | 996 | 	 * |
| 987 | 	 * 	{ u64			abi; # enum perf_sample_regs_abi | 997 | 	 * 	{ u64			abi; # enum perf_sample_regs_abi |
| ... | @@ -1339,7 +1349,8 @@ union perf_mem_data_src { | ... | @@ -1339,7 +1349,8 @@ union perf_mem_data_src { |
| 1339 | #define PERF_MEM_LVLNUM_L2	0x02 /* L2 */ | 1349 | #define PERF_MEM_LVLNUM_L2	0x02 /* L2 */ |
| 1340 | #define PERF_MEM_LVLNUM_L3	0x03 /* L3 */ | 1350 | #define PERF_MEM_LVLNUM_L3	0x03 /* L3 */ |
| 1341 | #define PERF_MEM_LVLNUM_L4	0x04 /* L4 */ | 1351 | #define PERF_MEM_LVLNUM_L4	0x04 /* L4 */ |
| 1342 | /* 5-0x8 available */ | 1352 | /* 5-0x7 available */ |
| 1353 | #define PERF_MEM_LVLNUM_UNC	0x08 /* Uncached */ | ||
| 1343 | #define PERF_MEM_LVLNUM_CXL	0x09 /* CXL */ | 1354 | #define PERF_MEM_LVLNUM_CXL	0x09 /* CXL */ |
| 1344 | #define PERF_MEM_LVLNUM_IO	0x0a /* I/O */ | 1355 | #define PERF_MEM_LVLNUM_IO	0x0a /* I/O */ |
| 1345 | #define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ | 1356 | #define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ |
| ... | @@ -1426,6 +1437,9 @@ struct perf_branch_entry { | ... | @@ -1426,6 +1437,9 @@ struct perf_branch_entry { |
| 1426 | 		reserved:31; | 1437 | 		reserved:31; |
| 1427 | }; | 1438 | }; |
| 1428 | 1439 | ||
| 1440 | /* Size of used info bits in struct perf_branch_entry */ | ||
| 1441 | #define PERF_BRANCH_ENTRY_INFO_BITS_MAX		33 | ||
| 1442 | |||
| 1429 | union perf_sample_weight { | 1443 | union perf_sample_weight { |
| 1430 | 	__u64		full; | 1444 | 	__u64		full; |
| 1431 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 1445 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
lib/libc/include/any-linux-any/linux/pidfd.h+7-1| ... | @@ -7,6 +7,12 @@ | ... | @@ -7,6 +7,12 @@ |
| 7 | #include <linux/fcntl.h> | 7 | #include <linux/fcntl.h> |
| 8 | 8 | ||
| 9 | /* Flags for pidfd_open(). */ | 9 | /* Flags for pidfd_open(). */ |
| 10 | #define PIDFD_NONBLOCK O_NONBLOCK | 10 | #define PIDFD_NONBLOCK	O_NONBLOCK |
| 11 | #define PIDFD_THREAD	O_EXCL | ||
| 12 | |||
| 13 | /* Flags for pidfd_send_signal(). */ | ||
| 14 | #define PIDFD_SIGNAL_THREAD		(1UL << 0) | ||
| 15 | #define PIDFD_SIGNAL_THREAD_GROUP	(1UL << 1) | ||
| 16 | #define PIDFD_SIGNAL_PROCESS_GROUP	(1UL << 2) | ||
| 11 | 17 | ||
| 12 | #endif /* _LINUX_PIDFD_H */ | 18 | #endif /* _LINUX_PIDFD_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/pkt_cls.h+32-49| ... | @@ -99,7 +99,7 @@ enum { | ... | @@ -99,7 +99,7 @@ enum { |
| 99 | * versions. | 99 | * versions. |
| 100 | */ | 100 | */ |
| 101 | #define TCA_ACT_GACT 5 | 101 | #define TCA_ACT_GACT 5 |
| 102 | #define TCA_ACT_IPT 6 | 102 | #define TCA_ACT_IPT 6 /* obsoleted, can be reused */ |
| 103 | #define TCA_ACT_PEDIT 7 | 103 | #define TCA_ACT_PEDIT 7 |
| 104 | #define TCA_ACT_MIRRED 8 | 104 | #define TCA_ACT_MIRRED 8 |
| 105 | #define TCA_ACT_NAT 9 | 105 | #define TCA_ACT_NAT 9 |
| ... | @@ -120,7 +120,7 @@ enum tca_id { | ... | @@ -120,7 +120,7 @@ enum tca_id { |
| 120 | 	TCA_ID_UNSPEC = 0, | 120 | 	TCA_ID_UNSPEC = 0, |
| 121 | 	TCA_ID_POLICE = 1, | 121 | 	TCA_ID_POLICE = 1, |
| 122 | 	TCA_ID_GACT = TCA_ACT_GACT, | 122 | 	TCA_ID_GACT = TCA_ACT_GACT, |
| 123 | 	TCA_ID_IPT = TCA_ACT_IPT, | 123 | 	TCA_ID_IPT = TCA_ACT_IPT, /* Obsoleted, can be reused */ |
| 124 | 	TCA_ID_PEDIT = TCA_ACT_PEDIT, | 124 | 	TCA_ID_PEDIT = TCA_ACT_PEDIT, |
| 125 | 	TCA_ID_MIRRED = TCA_ACT_MIRRED, | 125 | 	TCA_ID_MIRRED = TCA_ACT_MIRRED, |
| 126 | 	TCA_ID_NAT = TCA_ACT_NAT, | 126 | 	TCA_ID_NAT = TCA_ACT_NAT, |
| ... | @@ -280,37 +280,6 @@ struct tc_u32_pcnt { | ... | @@ -280,37 +280,6 @@ struct tc_u32_pcnt { |
| 280 | 280 | ||
| 281 | #define TC_U32_MAXDEPTH 8 | 281 | #define TC_U32_MAXDEPTH 8 |
| 282 | 282 | ||
| 283 | |||
| 284 | /* RSVP filter */ | ||
| 285 | |||
| 286 | enum { | ||
| 287 | 	TCA_RSVP_UNSPEC, | ||
| 288 | 	TCA_RSVP_CLASSID, | ||
| 289 | 	TCA_RSVP_DST, | ||
| 290 | 	TCA_RSVP_SRC, | ||
| 291 | 	TCA_RSVP_PINFO, | ||
| 292 | 	TCA_RSVP_POLICE, | ||
| 293 | 	TCA_RSVP_ACT, | ||
| 294 | 	__TCA_RSVP_MAX | ||
| 295 | }; | ||
| 296 | |||
| 297 | #define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) | ||
| 298 | |||
| 299 | struct tc_rsvp_gpi { | ||
| 300 | 	__u32	key; | ||
| 301 | 	__u32	mask; | ||
| 302 | 	int	offset; | ||
| 303 | }; | ||
| 304 | |||
| 305 | struct tc_rsvp_pinfo { | ||
| 306 | 	struct tc_rsvp_gpi dpi; | ||
| 307 | 	struct tc_rsvp_gpi spi; | ||
| 308 | 	__u8	protocol; | ||
| 309 | 	__u8	tunnelid; | ||
| 310 | 	__u8	tunnelhdr; | ||
| 311 | 	__u8	pad; | ||
| 312 | }; | ||
| 313 | |||
| 314 | /* ROUTE filter */ | 283 | /* ROUTE filter */ |
| 315 | 284 | ||
| 316 | enum { | 285 | enum { |
| ... | @@ -341,22 +310,6 @@ enum { | ... | @@ -341,22 +310,6 @@ enum { |
| 341 | 310 | ||
| 342 | #define TCA_FW_MAX (__TCA_FW_MAX - 1) | 311 | #define TCA_FW_MAX (__TCA_FW_MAX - 1) |
| 343 | 312 | ||
| 344 | /* TC index filter */ | ||
| 345 | |||
| 346 | enum { | ||
| 347 | 	TCA_TCINDEX_UNSPEC, | ||
| 348 | 	TCA_TCINDEX_HASH, | ||
| 349 | 	TCA_TCINDEX_MASK, | ||
| 350 | 	TCA_TCINDEX_SHIFT, | ||
| 351 | 	TCA_TCINDEX_FALL_THROUGH, | ||
| 352 | 	TCA_TCINDEX_CLASSID, | ||
| 353 | 	TCA_TCINDEX_POLICE, | ||
| 354 | 	TCA_TCINDEX_ACT, | ||
| 355 | 	__TCA_TCINDEX_MAX | ||
| 356 | }; | ||
| 357 | |||
| 358 | #define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1) | ||
| 359 | |||
| 360 | /* Flow filter */ | 313 | /* Flow filter */ |
| 361 | 314 | ||
| 362 | enum { | 315 | enum { |
| ... | @@ -594,6 +547,13 @@ enum { | ... | @@ -594,6 +547,13 @@ enum { |
| 594 | 547 | ||
| 595 | 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */ | 548 | 	TCA_FLOWER_KEY_L2TPV3_SID,	/* be32 */ |
| 596 | 549 | ||
| 550 | 	TCA_FLOWER_L2_MISS,		/* u8 */ | ||
| 551 | |||
| 552 | 	TCA_FLOWER_KEY_CFM,		/* nested */ | ||
| 553 | |||
| 554 | 	TCA_FLOWER_KEY_SPI,		/* be32 */ | ||
| 555 | 	TCA_FLOWER_KEY_SPI_MASK,	/* be32 */ | ||
| 556 | |||
| 597 | 	__TCA_FLOWER_MAX, | 557 | 	__TCA_FLOWER_MAX, |
| 598 | }; | 558 | }; |
| 599 | 559 | ||
| ... | @@ -627,6 +587,10 @@ enum { | ... | @@ -627,6 +587,10 @@ enum { |
| 627 | 					 * TCA_FLOWER_KEY_ENC_OPT_GTP_ | 587 | 					 * TCA_FLOWER_KEY_ENC_OPT_GTP_ |
| 628 | 					 * attributes | 588 | 					 * attributes |
| 629 | 					 */ | 589 | 					 */ |
| 590 | 	TCA_FLOWER_KEY_ENC_OPTS_PFCP,	/* Nested | ||
| 591 | 					 * TCA_FLOWER_KEY_ENC_IPT_PFCP | ||
| 592 | 					 * attributes | ||
| 593 | 					 */ | ||
| 630 | 	__TCA_FLOWER_KEY_ENC_OPTS_MAX, | 594 | 	__TCA_FLOWER_KEY_ENC_OPTS_MAX, |
| 631 | }; | 595 | }; |
| 632 | 596 | ||
| ... | @@ -676,6 +640,16 @@ enum { | ... | @@ -676,6 +640,16 @@ enum { |
| 676 | #define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX \ | 640 | #define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX \ |
| 677 | 		(__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1) | 641 | 		(__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1) |
| 678 | 642 | ||
| 643 | enum { | ||
| 644 | 	TCA_FLOWER_KEY_ENC_OPT_PFCP_UNSPEC, | ||
| 645 | 	TCA_FLOWER_KEY_ENC_OPT_PFCP_TYPE,		/* u8 */ | ||
| 646 | 	TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID,		/* be64 */ | ||
| 647 | 	__TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX, | ||
| 648 | }; | ||
| 649 | |||
| 650 | #define TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX \ | ||
| 651 | 		(__TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX - 1) | ||
| 652 | |||
| 679 | enum { | 653 | enum { |
| 680 | 	TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC, | 654 | 	TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC, |
| 681 | 	TCA_FLOWER_KEY_MPLS_OPTS_LSE, | 655 | 	TCA_FLOWER_KEY_MPLS_OPTS_LSE, |
| ... | @@ -702,6 +676,15 @@ enum { | ... | @@ -702,6 +676,15 @@ enum { |
| 702 | 	TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1), | 676 | 	TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1), |
| 703 | }; | 677 | }; |
| 704 | 678 | ||
| 679 | enum { | ||
| 680 | 	TCA_FLOWER_KEY_CFM_OPT_UNSPEC, | ||
| 681 | 	TCA_FLOWER_KEY_CFM_MD_LEVEL, | ||
| 682 | 	TCA_FLOWER_KEY_CFM_OPCODE, | ||
| 683 | 	__TCA_FLOWER_KEY_CFM_OPT_MAX, | ||
| 684 | }; | ||
| 685 | |||
| 686 | #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) | ||
| 687 | |||
| 705 | #define TCA_FLOWER_MASK_FLAGS_RANGE	(1 << 0) /* Range-based match */ | 688 | #define TCA_FLOWER_MASK_FLAGS_RANGE	(1 << 0) /* Range-based match */ |
| 706 | 689 | ||
| 707 | /* Match-all classifier */ | 690 | /* Match-all classifier */ |
lib/libc/include/any-linux-any/linux/pkt_sched.h+41-111| ... | @@ -477,115 +477,6 @@ enum { | ... | @@ -477,115 +477,6 @@ enum { |
| 477 | 477 | ||
| 478 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) | 478 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) |
| 479 | 479 | ||
| 480 | |||
| 481 | /* CBQ section */ | ||
| 482 | |||
| 483 | #define TC_CBQ_MAXPRIO		8 | ||
| 484 | #define TC_CBQ_MAXLEVEL		8 | ||
| 485 | #define TC_CBQ_DEF_EWMA		5 | ||
| 486 | |||
| 487 | struct tc_cbq_lssopt { | ||
| 488 | 	unsigned char	change; | ||
| 489 | 	unsigned char	flags; | ||
| 490 | #define TCF_CBQ_LSS_BOUNDED	1 | ||
| 491 | #define TCF_CBQ_LSS_ISOLATED	2 | ||
| 492 | 	unsigned char 	ewma_log; | ||
| 493 | 	unsigned char 	level; | ||
| 494 | #define TCF_CBQ_LSS_FLAGS	1 | ||
| 495 | #define TCF_CBQ_LSS_EWMA	2 | ||
| 496 | #define TCF_CBQ_LSS_MAXIDLE	4 | ||
| 497 | #define TCF_CBQ_LSS_MINIDLE	8 | ||
| 498 | #define TCF_CBQ_LSS_OFFTIME	0x10 | ||
| 499 | #define TCF_CBQ_LSS_AVPKT	0x20 | ||
| 500 | 	__u32		maxidle; | ||
| 501 | 	__u32		minidle; | ||
| 502 | 	__u32		offtime; | ||
| 503 | 	__u32		avpkt; | ||
| 504 | }; | ||
| 505 | |||
| 506 | struct tc_cbq_wrropt { | ||
| 507 | 	unsigned char	flags; | ||
| 508 | 	unsigned char	priority; | ||
| 509 | 	unsigned char	cpriority; | ||
| 510 | 	unsigned char	__reserved; | ||
| 511 | 	__u32		allot; | ||
| 512 | 	__u32		weight; | ||
| 513 | }; | ||
| 514 | |||
| 515 | struct tc_cbq_ovl { | ||
| 516 | 	unsigned char	strategy; | ||
| 517 | #define	TC_CBQ_OVL_CLASSIC	0 | ||
| 518 | #define	TC_CBQ_OVL_DELAY	1 | ||
| 519 | #define	TC_CBQ_OVL_LOWPRIO	2 | ||
| 520 | #define	TC_CBQ_OVL_DROP		3 | ||
| 521 | #define	TC_CBQ_OVL_RCLASSIC	4 | ||
| 522 | 	unsigned char	priority2; | ||
| 523 | 	__u16		pad; | ||
| 524 | 	__u32		penalty; | ||
| 525 | }; | ||
| 526 | |||
| 527 | struct tc_cbq_police { | ||
| 528 | 	unsigned char	police; | ||
| 529 | 	unsigned char	__res1; | ||
| 530 | 	unsigned short	__res2; | ||
| 531 | }; | ||
| 532 | |||
| 533 | struct tc_cbq_fopt { | ||
| 534 | 	__u32		split; | ||
| 535 | 	__u32		defmap; | ||
| 536 | 	__u32		defchange; | ||
| 537 | }; | ||
| 538 | |||
| 539 | struct tc_cbq_xstats { | ||
| 540 | 	__u32		borrows; | ||
| 541 | 	__u32		overactions; | ||
| 542 | 	__s32		avgidle; | ||
| 543 | 	__s32		undertime; | ||
| 544 | }; | ||
| 545 | |||
| 546 | enum { | ||
| 547 | 	TCA_CBQ_UNSPEC, | ||
| 548 | 	TCA_CBQ_LSSOPT, | ||
| 549 | 	TCA_CBQ_WRROPT, | ||
| 550 | 	TCA_CBQ_FOPT, | ||
| 551 | 	TCA_CBQ_OVL_STRATEGY, | ||
| 552 | 	TCA_CBQ_RATE, | ||
| 553 | 	TCA_CBQ_RTAB, | ||
| 554 | 	TCA_CBQ_POLICE, | ||
| 555 | 	__TCA_CBQ_MAX, | ||
| 556 | }; | ||
| 557 | |||
| 558 | #define TCA_CBQ_MAX	(__TCA_CBQ_MAX - 1) | ||
| 559 | |||
| 560 | /* dsmark section */ | ||
| 561 | |||
| 562 | enum { | ||
| 563 | 	TCA_DSMARK_UNSPEC, | ||
| 564 | 	TCA_DSMARK_INDICES, | ||
| 565 | 	TCA_DSMARK_DEFAULT_INDEX, | ||
| 566 | 	TCA_DSMARK_SET_TC_INDEX, | ||
| 567 | 	TCA_DSMARK_MASK, | ||
| 568 | 	TCA_DSMARK_VALUE, | ||
| 569 | 	__TCA_DSMARK_MAX, | ||
| 570 | }; | ||
| 571 | |||
| 572 | #define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) | ||
| 573 | |||
| 574 | /* ATM section */ | ||
| 575 | |||
| 576 | enum { | ||
| 577 | 	TCA_ATM_UNSPEC, | ||
| 578 | 	TCA_ATM_FD,		/* file/socket descriptor */ | ||
| 579 | 	TCA_ATM_PTR,		/* pointer to descriptor - later */ | ||
| 580 | 	TCA_ATM_HDR,		/* LL header */ | ||
| 581 | 	TCA_ATM_EXCESS,		/* excess traffic class (0 for CLP) */ | ||
| 582 | 	TCA_ATM_ADDR,		/* PVC address (for output only) */ | ||
| 583 | 	TCA_ATM_STATE,		/* VC state (ATM_VS_*; for output only) */ | ||
| 584 | 	__TCA_ATM_MAX, | ||
| 585 | }; | ||
| 586 | |||
| 587 | #define TCA_ATM_MAX	(__TCA_ATM_MAX - 1) | ||
| 588 | |||
| 589 | /* Network emulator */ | 480 | /* Network emulator */ |
| 590 | 481 | ||
| 591 | enum { | 482 | enum { |
| ... | @@ -603,6 +494,7 @@ enum { | ... | @@ -603,6 +494,7 @@ enum { |
| 603 | 	TCA_NETEM_JITTER64, | 494 | 	TCA_NETEM_JITTER64, |
| 604 | 	TCA_NETEM_SLOT, | 495 | 	TCA_NETEM_SLOT, |
| 605 | 	TCA_NETEM_SLOT_DIST, | 496 | 	TCA_NETEM_SLOT_DIST, |
| 497 | 	TCA_NETEM_PRNG_SEED, | ||
| 606 | 	__TCA_NETEM_MAX, | 498 | 	__TCA_NETEM_MAX, |
| 607 | }; | 499 | }; |
| 608 | 500 | ||
| ... | @@ -719,6 +611,11 @@ enum { | ... | @@ -719,6 +611,11 @@ enum { |
| 719 | 611 | ||
| 720 | #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1) | 612 | #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1) |
| 721 | 613 | ||
| 614 | enum { | ||
| 615 | 	TC_FP_EXPRESS = 1, | ||
| 616 | 	TC_FP_PREEMPTIBLE = 2, | ||
| 617 | }; | ||
| 618 | |||
| 722 | struct tc_mqprio_qopt { | 619 | struct tc_mqprio_qopt { |
| 723 | 	__u8	num_tc; | 620 | 	__u8	num_tc; |
| 724 | 	__u8	prio_tc_map[TC_QOPT_BITMASK + 1]; | 621 | 	__u8	prio_tc_map[TC_QOPT_BITMASK + 1]; |
| ... | @@ -732,12 +629,23 @@ struct tc_mqprio_qopt { | ... | @@ -732,12 +629,23 @@ struct tc_mqprio_qopt { |
| 732 | #define TC_MQPRIO_F_MIN_RATE		0x4 | 629 | #define TC_MQPRIO_F_MIN_RATE		0x4 |
| 733 | #define TC_MQPRIO_F_MAX_RATE		0x8 | 630 | #define TC_MQPRIO_F_MAX_RATE		0x8 |
| 734 | 631 | ||
| 632 | enum { | ||
| 633 | 	TCA_MQPRIO_TC_ENTRY_UNSPEC, | ||
| 634 | 	TCA_MQPRIO_TC_ENTRY_INDEX,		/* u32 */ | ||
| 635 | 	TCA_MQPRIO_TC_ENTRY_FP,			/* u32 */ | ||
| 636 | |||
| 637 | 	/* add new constants above here */ | ||
| 638 | 	__TCA_MQPRIO_TC_ENTRY_CNT, | ||
| 639 | 	TCA_MQPRIO_TC_ENTRY_MAX = (__TCA_MQPRIO_TC_ENTRY_CNT - 1) | ||
| 640 | }; | ||
| 641 | |||
| 735 | enum { | 642 | enum { |
| 736 | 	TCA_MQPRIO_UNSPEC, | 643 | 	TCA_MQPRIO_UNSPEC, |
| 737 | 	TCA_MQPRIO_MODE, | 644 | 	TCA_MQPRIO_MODE, |
| 738 | 	TCA_MQPRIO_SHAPER, | 645 | 	TCA_MQPRIO_SHAPER, |
| 739 | 	TCA_MQPRIO_MIN_RATE64, | 646 | 	TCA_MQPRIO_MIN_RATE64, |
| 740 | 	TCA_MQPRIO_MAX_RATE64, | 647 | 	TCA_MQPRIO_MAX_RATE64, |
| 648 | 	TCA_MQPRIO_TC_ENTRY, | ||
| 741 | 	__TCA_MQPRIO_MAX, | 649 | 	__TCA_MQPRIO_MAX, |
| 742 | }; | 650 | }; |
| 743 | 651 | ||
| ... | @@ -924,15 +832,22 @@ enum { | ... | @@ -924,15 +832,22 @@ enum { |
| 924 | 832 | ||
| 925 | 	TCA_FQ_HORIZON_DROP,	/* drop packets beyond horizon, or cap their EDT */ | 833 | 	TCA_FQ_HORIZON_DROP,	/* drop packets beyond horizon, or cap their EDT */ |
| 926 | 834 | ||
| 835 | 	TCA_FQ_PRIOMAP,		/* prio2band */ | ||
| 836 | |||
| 837 | 	TCA_FQ_WEIGHTS,		/* Weights for each band */ | ||
| 838 | |||
| 927 | 	__TCA_FQ_MAX | 839 | 	__TCA_FQ_MAX |
| 928 | }; | 840 | }; |
| 929 | 841 | ||
| 930 | #define TCA_FQ_MAX	(__TCA_FQ_MAX - 1) | 842 | #define TCA_FQ_MAX	(__TCA_FQ_MAX - 1) |
| 931 | 843 | ||
| 844 | #define FQ_BANDS 3 | ||
| 845 | #define FQ_MIN_WEIGHT 16384 | ||
| 846 | |||
| 932 | struct tc_fq_qd_stats { | 847 | struct tc_fq_qd_stats { |
| 933 | 	__u64	gc_flows; | 848 | 	__u64	gc_flows; |
| 934 | 	__u64	highprio_packets; | 849 | 	__u64	highprio_packets;	/* obsolete */ |
| 935 | 	__u64	tcp_retrans; | 850 | 	__u64	tcp_retrans;		/* obsolete */ |
| 936 | 	__u64	throttled; | 851 | 	__u64	throttled; |
| 937 | 	__u64	flows_plimit; | 852 | 	__u64	flows_plimit; |
| 938 | 	__u64	pkts_too_long; | 853 | 	__u64	pkts_too_long; |
| ... | @@ -945,6 +860,10 @@ struct tc_fq_qd_stats { | ... | @@ -945,6 +860,10 @@ struct tc_fq_qd_stats { |
| 945 | 	__u64	ce_mark;		/* packets above ce_threshold */ | 860 | 	__u64	ce_mark;		/* packets above ce_threshold */ |
| 946 | 	__u64	horizon_drops; | 861 | 	__u64	horizon_drops; |
| 947 | 	__u64	horizon_caps; | 862 | 	__u64	horizon_caps; |
| 863 | 	__u64	fastpath_packets; | ||
| 864 | 	__u64	band_drops[FQ_BANDS]; | ||
| 865 | 	__u32	band_pkt_count[FQ_BANDS]; | ||
| 866 | 	__u32	pad; | ||
| 948 | }; | 867 | }; |
| 949 | 868 | ||
| 950 | /* Heavy-Hitter Filter */ | 869 | /* Heavy-Hitter Filter */ |
| ... | @@ -1236,12 +1155,23 @@ enum { | ... | @@ -1236,12 +1155,23 @@ enum { |
| 1236 | 	TCA_TAPRIO_TC_ENTRY_UNSPEC, | 1155 | 	TCA_TAPRIO_TC_ENTRY_UNSPEC, |
| 1237 | 	TCA_TAPRIO_TC_ENTRY_INDEX,		/* u32 */ | 1156 | 	TCA_TAPRIO_TC_ENTRY_INDEX,		/* u32 */ |
| 1238 | 	TCA_TAPRIO_TC_ENTRY_MAX_SDU,		/* u32 */ | 1157 | 	TCA_TAPRIO_TC_ENTRY_MAX_SDU,		/* u32 */ |
| 1158 | 	TCA_TAPRIO_TC_ENTRY_FP,			/* u32 */ | ||
| 1239 | 1159 | ||
| 1240 | 	/* add new constants above here */ | 1160 | 	/* add new constants above here */ |
| 1241 | 	__TCA_TAPRIO_TC_ENTRY_CNT, | 1161 | 	__TCA_TAPRIO_TC_ENTRY_CNT, |
| 1242 | 	TCA_TAPRIO_TC_ENTRY_MAX = (__TCA_TAPRIO_TC_ENTRY_CNT - 1) | 1162 | 	TCA_TAPRIO_TC_ENTRY_MAX = (__TCA_TAPRIO_TC_ENTRY_CNT - 1) |
| 1243 | }; | 1163 | }; |
| 1244 | 1164 | ||
| 1165 | enum { | ||
| 1166 | 	TCA_TAPRIO_OFFLOAD_STATS_PAD = 1,	/* u64 */ | ||
| 1167 | 	TCA_TAPRIO_OFFLOAD_STATS_WINDOW_DROPS,	/* u64 */ | ||
| 1168 | 	TCA_TAPRIO_OFFLOAD_STATS_TX_OVERRUNS,	/* u64 */ | ||
| 1169 | |||
| 1170 | 	/* add new constants above here */ | ||
| 1171 | 	__TCA_TAPRIO_OFFLOAD_STATS_CNT, | ||
| 1172 | 	TCA_TAPRIO_OFFLOAD_STATS_MAX = (__TCA_TAPRIO_OFFLOAD_STATS_CNT - 1) | ||
| 1173 | }; | ||
| 1174 | |||
| 1245 | enum { | 1175 | enum { |
| 1246 | 	TCA_TAPRIO_ATTR_UNSPEC, | 1176 | 	TCA_TAPRIO_ATTR_UNSPEC, |
| 1247 | 	TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ | 1177 | 	TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ |
lib/libc/include/any-linux-any/linux/pktcdvd.h+1-11| ... | @@ -16,6 +16,7 @@ | ... | @@ -16,6 +16,7 @@ |
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | 17 | ||
| 18 | /* | 18 | /* |
| 19 | * UNUSED: | ||
| 19 | * 1 for normal debug messages, 2 is very verbose. 0 to turn it off. | 20 | * 1 for normal debug messages, 2 is very verbose. 0 to turn it off. |
| 20 | */ | 21 | */ |
| 21 | #define PACKET_DEBUG		1 | 22 | #define PACKET_DEBUG		1 |
| ... | @@ -29,17 +30,6 @@ | ... | @@ -29,17 +30,6 @@ |
| 29 | */ | 30 | */ |
| 30 | #define PACKET_WAIT_TIME	(HZ * 5 / 1000) | 31 | #define PACKET_WAIT_TIME	(HZ * 5 / 1000) |
| 31 | 32 | ||
| 32 | /* | ||
| 33 | * use drive write caching -- we need deferred error handling to be | ||
| 34 | * able to successfully recover with this option (drive will return good | ||
| 35 | * status as soon as the cdb is validated). | ||
| 36 | */ | ||
| 37 | #if defined(CONFIG_CDROM_PKTCDVD_WCACHE) | ||
| 38 | #define USE_WCACHING		1 | ||
| 39 | #else | ||
| 40 | #define USE_WCACHING		0 | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* | 33 | /* |
| 44 | * No user-servicable parts beyond this point -> | 34 | * No user-servicable parts beyond this point -> |
| 45 | */ | 35 | */ |
lib/libc/include/any-linux-any/linux/prctl.h+39-1| ... | @@ -283,11 +283,49 @@ struct prctl_mm_map { | ... | @@ -283,11 +283,49 @@ struct prctl_mm_map { |
| 283 | 283 | ||
| 284 | /* Memory deny write / execute */ | 284 | /* Memory deny write / execute */ |
| 285 | #define PR_SET_MDWE			65 | 285 | #define PR_SET_MDWE			65 |
| 286 | # define PR_MDWE_REFUSE_EXEC_GAIN	1 | 286 | # define PR_MDWE_REFUSE_EXEC_GAIN	(1UL << 0) |
| 287 | # define PR_MDWE_NO_INHERIT		(1UL << 1) | ||
| 287 | 288 | ||
| 288 | #define PR_GET_MDWE			66 | 289 | #define PR_GET_MDWE			66 |
| 289 | 290 | ||
| 290 | #define PR_SET_VMA		0x53564d41 | 291 | #define PR_SET_VMA		0x53564d41 |
| 291 | # define PR_SET_VMA_ANON_NAME		0 | 292 | # define PR_SET_VMA_ANON_NAME		0 |
| 292 | 293 | ||
| 294 | #define PR_GET_AUXV			0x41555856 | ||
| 295 | |||
| 296 | #define PR_SET_MEMORY_MERGE		67 | ||
| 297 | #define PR_GET_MEMORY_MERGE		68 | ||
| 298 | |||
| 299 | #define PR_RISCV_V_SET_CONTROL		69 | ||
| 300 | #define PR_RISCV_V_GET_CONTROL		70 | ||
| 301 | # define PR_RISCV_V_VSTATE_CTRL_DEFAULT		0 | ||
| 302 | # define PR_RISCV_V_VSTATE_CTRL_OFF		1 | ||
| 303 | # define PR_RISCV_V_VSTATE_CTRL_ON		2 | ||
| 304 | # define PR_RISCV_V_VSTATE_CTRL_INHERIT		(1 << 4) | ||
| 305 | # define PR_RISCV_V_VSTATE_CTRL_CUR_MASK	0x3 | ||
| 306 | # define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK	0xc | ||
| 307 | # define PR_RISCV_V_VSTATE_CTRL_MASK		0x1f | ||
| 308 | |||
| 309 | #define PR_RISCV_SET_ICACHE_FLUSH_CTX	71 | ||
| 310 | # define PR_RISCV_CTX_SW_FENCEI_ON	0 | ||
| 311 | # define PR_RISCV_CTX_SW_FENCEI_OFF	1 | ||
| 312 | # define PR_RISCV_SCOPE_PER_PROCESS	0 | ||
| 313 | # define PR_RISCV_SCOPE_PER_THREAD	1 | ||
| 314 | |||
| 315 | /* PowerPC Dynamic Execution Control Register (DEXCR) controls */ | ||
| 316 | #define PR_PPC_GET_DEXCR		72 | ||
| 317 | #define PR_PPC_SET_DEXCR		73 | ||
| 318 | /* DEXCR aspect to act on */ | ||
| 319 | # define PR_PPC_DEXCR_SBHE		0 /* Speculative branch hint enable */ | ||
| 320 | # define PR_PPC_DEXCR_IBRTPD		1 /* Indirect branch recurrent target prediction disable */ | ||
| 321 | # define PR_PPC_DEXCR_SRAPD		2 /* Subroutine return address prediction disable */ | ||
| 322 | # define PR_PPC_DEXCR_NPHIE		3 /* Non-privileged hash instruction enable */ | ||
| 323 | /* Action to apply / return */ | ||
| 324 | # define PR_PPC_DEXCR_CTRL_EDITABLE	 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */ | ||
| 325 | # define PR_PPC_DEXCR_CTRL_SET		 0x2 /* Set the aspect for this process */ | ||
| 326 | # define PR_PPC_DEXCR_CTRL_CLEAR	 0x4 /* Clear the aspect for this process */ | ||
| 327 | # define PR_PPC_DEXCR_CTRL_SET_ONEXEC	 0x8 /* Set the aspect on exec */ | ||
| 328 | # define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC	0x10 /* Clear the aspect on exec */ | ||
| 329 | # define PR_PPC_DEXCR_CTRL_MASK		0x1f | ||
| 330 | |||
| 293 | #endif /* _LINUX_PRCTL_H */ | 331 | #endif /* _LINUX_PRCTL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/psp-dbc.h created+147| ... | @@ -0,0 +1,147 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Userspace interface for AMD Dynamic Boost Control (DBC) | ||
| 4 | * | ||
| 5 | * Copyright (C) 2023 Advanced Micro Devices, Inc. | ||
| 6 | * | ||
| 7 | * Author: Mario Limonciello <mario.limonciello@amd.com> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __PSP_DBC_USER_H__ | ||
| 11 | #define __PSP_DBC_USER_H__ | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 15 | /** | ||
| 16 | * DOC: AMD Dynamic Boost Control (DBC) interface | ||
| 17 | */ | ||
| 18 | |||
| 19 | #define DBC_NONCE_SIZE		16 | ||
| 20 | #define DBC_SIG_SIZE		32 | ||
| 21 | #define DBC_UID_SIZE		16 | ||
| 22 | |||
| 23 | /** | ||
| 24 | * struct dbc_user_nonce - Nonce exchange structure (input/output). | ||
| 25 | * @auth_needed: Whether the PSP should authenticate this request (input). | ||
| 26 | * 0: no authentication, PSP will return single use nonce. | ||
| 27 | * 1: authentication: PSP will return multi-use nonce. | ||
| 28 | * @nonce: 8 byte value used for future authentication (output). | ||
| 29 | * @signature: Optional 32 byte signature created by software using a | ||
| 30 | * previous nonce (input). | ||
| 31 | */ | ||
| 32 | struct dbc_user_nonce { | ||
| 33 | 	__u32	auth_needed; | ||
| 34 | 	__u8	nonce[DBC_NONCE_SIZE]; | ||
| 35 | 	__u8	signature[DBC_SIG_SIZE]; | ||
| 36 | } __attribute__((packed)); | ||
| 37 | |||
| 38 | /** | ||
| 39 | * struct dbc_user_setuid - UID exchange structure (input). | ||
| 40 | * @uid: 16 byte value representing software identity | ||
| 41 | * @signature: 32 byte signature created by software using a previous nonce | ||
| 42 | */ | ||
| 43 | struct dbc_user_setuid { | ||
| 44 | 	__u8	uid[DBC_UID_SIZE]; | ||
| 45 | 	__u8	signature[DBC_SIG_SIZE]; | ||
| 46 | } __attribute__((packed)); | ||
| 47 | |||
| 48 | /** | ||
| 49 | * struct dbc_user_param - Parameter exchange structure (input/output). | ||
| 50 | * @msg_index: Message indicating what parameter to set or get (input) | ||
| 51 | * @param: 4 byte parameter, units are message specific. (input/output) | ||
| 52 | * @signature: 32 byte signature. | ||
| 53 | * - When sending a message this is to be created by software | ||
| 54 | * using a previous nonce (input) | ||
| 55 | * - For interpreting results, this signature is updated by the | ||
| 56 | * PSP to allow software to validate the authenticity of the | ||
| 57 | * results. | ||
| 58 | */ | ||
| 59 | struct dbc_user_param { | ||
| 60 | 	__u32	msg_index; | ||
| 61 | 	__u32	param; | ||
| 62 | 	__u8	signature[DBC_SIG_SIZE]; | ||
| 63 | } __attribute__((packed)); | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Dynamic Boost Control (DBC) IOC | ||
| 67 | * | ||
| 68 | * possible return codes for all DBC IOCTLs: | ||
| 69 | * 0: success | ||
| 70 | * -EINVAL: invalid input | ||
| 71 | * -E2BIG: excess data passed | ||
| 72 | * -EFAULT: failed to copy to/from userspace | ||
| 73 | * -EBUSY: mailbox in recovery or in use | ||
| 74 | * -ENODEV: driver not bound with PSP device | ||
| 75 | * -EACCES: request isn't authorized | ||
| 76 | * -EINVAL: invalid parameter | ||
| 77 | * -ETIMEDOUT: request timed out | ||
| 78 | * -EAGAIN: invalid request for state machine | ||
| 79 | * -ENOENT: not implemented | ||
| 80 | * -ENFILE: overflow | ||
| 81 | * -EPERM: invalid signature | ||
| 82 | * -EIO: unknown error | ||
| 83 | */ | ||
| 84 | #define DBC_IOC_TYPE	'D' | ||
| 85 | |||
| 86 | /** | ||
| 87 | * DBCIOCNONCE - Fetch a nonce from the PSP for authenticating commands. | ||
| 88 | * If a nonce is fetched without authentication it can only | ||
| 89 | * be utilized for one command. | ||
| 90 | * If a nonce is fetched with authentication it can be used | ||
| 91 | * for multiple requests. | ||
| 92 | */ | ||
| 93 | #define DBCIOCNONCE	_IOWR(DBC_IOC_TYPE, 0x1, struct dbc_user_nonce) | ||
| 94 | |||
| 95 | /** | ||
| 96 | * DBCIOCUID - Set the user ID (UID) of a calling process. | ||
| 97 | * The user ID is 8 bytes long. It must be programmed using a | ||
| 98 | * 32 byte signature built using the nonce fetched from | ||
| 99 | * DBCIOCNONCE. | ||
| 100 | * The UID can only be set once until the system is rebooted. | ||
| 101 | */ | ||
| 102 | #define DBCIOCUID	_IOW(DBC_IOC_TYPE, 0x2, struct dbc_user_setuid) | ||
| 103 | |||
| 104 | /** | ||
| 105 | * DBCIOCPARAM - Set or get a parameter from the PSP. | ||
| 106 | * This request will only work after DBCIOCUID has successfully | ||
| 107 | * set the UID of the calling process. | ||
| 108 | * Whether the parameter is set or get is controlled by the | ||
| 109 | * message ID in the request. | ||
| 110 | * This command must be sent using a 32 byte signature built | ||
| 111 | * using the nonce fetched from DBCIOCNONCE. | ||
| 112 | * When the command succeeds, the 32 byte signature will be | ||
| 113 | * updated by the PSP for software to authenticate the results. | ||
| 114 | */ | ||
| 115 | #define DBCIOCPARAM	_IOWR(DBC_IOC_TYPE, 0x3, struct dbc_user_param) | ||
| 116 | |||
| 117 | /** | ||
| 118 | * enum dbc_cmd_msg - Messages utilized by DBCIOCPARAM | ||
| 119 | * @PARAM_GET_FMAX_CAP:		Get frequency cap (MHz) | ||
| 120 | * @PARAM_SET_FMAX_CAP:		Set frequency cap (MHz) | ||
| 121 | * @PARAM_GET_PWR_CAP:		Get socket power cap (mW) | ||
| 122 | * @PARAM_SET_PWR_CAP:		Set socket power cap (mW) | ||
| 123 | * @PARAM_GET_GFX_MODE:		Get graphics mode (0/1) | ||
| 124 | * @PARAM_SET_GFX_MODE:		Set graphics mode (0/1) | ||
| 125 | * @PARAM_GET_CURR_TEMP:	Get current temperature (degrees C) | ||
| 126 | * @PARAM_GET_FMAX_MAX:		Get maximum allowed value for frequency (MHz) | ||
| 127 | * @PARAM_GET_FMAX_MIN:		Get minimum allowed value for frequency (MHz) | ||
| 128 | * @PARAM_GET_SOC_PWR_MAX:	Get maximum allowed value for SoC power (mw) | ||
| 129 | * @PARAM_GET_SOC_PWR_MIN:	Get minimum allowed value for SoC power (mw) | ||
| 130 | * @PARAM_GET_SOC_PWR_CUR:	Get current value for SoC Power (mW) | ||
| 131 | */ | ||
| 132 | enum dbc_cmd_msg { | ||
| 133 | 	PARAM_GET_FMAX_CAP	= 0x3, | ||
| 134 | 	PARAM_SET_FMAX_CAP	= 0x4, | ||
| 135 | 	PARAM_GET_PWR_CAP	= 0x5, | ||
| 136 | 	PARAM_SET_PWR_CAP	= 0x6, | ||
| 137 | 	PARAM_GET_GFX_MODE	= 0x7, | ||
| 138 | 	PARAM_SET_GFX_MODE	= 0x8, | ||
| 139 | 	PARAM_GET_CURR_TEMP	= 0x9, | ||
| 140 | 	PARAM_GET_FMAX_MAX	= 0xA, | ||
| 141 | 	PARAM_GET_FMAX_MIN	= 0xB, | ||
| 142 | 	PARAM_GET_SOC_PWR_MAX	= 0xC, | ||
| 143 | 	PARAM_GET_SOC_PWR_MIN	= 0xD, | ||
| 144 | 	PARAM_GET_SOC_PWR_CUR	= 0xE, | ||
| 145 | }; | ||
| 146 | |||
| 147 | #endif /* __PSP_DBC_USER_H__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/psp-sev.h+67| ... | @@ -28,6 +28,9 @@ enum { | ... | @@ -28,6 +28,9 @@ enum { |
| 28 | 	SEV_PEK_CERT_IMPORT, | 28 | 	SEV_PEK_CERT_IMPORT, |
| 29 | 	SEV_GET_ID,	/* This command is deprecated, use SEV_GET_ID2 */ | 29 | 	SEV_GET_ID,	/* This command is deprecated, use SEV_GET_ID2 */ |
| 30 | 	SEV_GET_ID2, | 30 | 	SEV_GET_ID2, |
| 31 | 	SNP_PLATFORM_STATUS, | ||
| 32 | 	SNP_COMMIT, | ||
| 33 | 	SNP_SET_CONFIG, | ||
| 31 | 34 | ||
| 32 | 	SEV_MAX, | 35 | 	SEV_MAX, |
| 33 | }; | 36 | }; |
| ... | @@ -36,6 +39,13 @@ enum { | ... | @@ -36,6 +39,13 @@ enum { |
| 36 | * SEV Firmware status code | 39 | * SEV Firmware status code |
| 37 | */ | 40 | */ |
| 38 | typedef enum { | 41 | typedef enum { |
| 42 | 	/* | ||
| 43 | 	 * This error code is not in the SEV spec. Its purpose is to convey that | ||
| 44 | 	 * there was an error that prevented the SEV firmware from being called. | ||
| 45 | 	 * The SEV API error codes are 16 bits, so the -1 value will not overlap | ||
| 46 | 	 * with possible values from the specification. | ||
| 47 | 	 */ | ||
| 48 | 	SEV_RET_NO_FW_CALL = -1, | ||
| 39 | 	SEV_RET_SUCCESS = 0, | 49 | 	SEV_RET_SUCCESS = 0, |
| 40 | 	SEV_RET_INVALID_PLATFORM_STATE, | 50 | 	SEV_RET_INVALID_PLATFORM_STATE, |
| 41 | 	SEV_RET_INVALID_GUEST_STATE, | 51 | 	SEV_RET_INVALID_GUEST_STATE, |
| ... | @@ -61,6 +71,13 @@ typedef enum { | ... | @@ -61,6 +71,13 @@ typedef enum { |
| 61 | 	SEV_RET_INVALID_PARAM, | 71 | 	SEV_RET_INVALID_PARAM, |
| 62 | 	SEV_RET_RESOURCE_LIMIT, | 72 | 	SEV_RET_RESOURCE_LIMIT, |
| 63 | 	SEV_RET_SECURE_DATA_INVALID, | 73 | 	SEV_RET_SECURE_DATA_INVALID, |
| 74 | 	SEV_RET_INVALID_KEY = 0x27, | ||
| 75 | 	SEV_RET_INVALID_PAGE_SIZE, | ||
| 76 | 	SEV_RET_INVALID_PAGE_STATE, | ||
| 77 | 	SEV_RET_INVALID_MDATA_ENTRY, | ||
| 78 | 	SEV_RET_INVALID_PAGE_OWNER, | ||
| 79 | 	SEV_RET_INVALID_PAGE_AEAD_OFLOW, | ||
| 80 | 	SEV_RET_RMP_INIT_REQUIRED, | ||
| 64 | 	SEV_RET_MAX, | 81 | 	SEV_RET_MAX, |
| 65 | } sev_ret_code; | 82 | } sev_ret_code; |
| 66 | 83 | ||
| ... | @@ -147,6 +164,56 @@ struct sev_user_data_get_id2 { | ... | @@ -147,6 +164,56 @@ struct sev_user_data_get_id2 { |
| 147 | 	__u32 length;				/* In/Out */ | 164 | 	__u32 length;				/* In/Out */ |
| 148 | } __attribute__((packed)); | 165 | } __attribute__((packed)); |
| 149 | 166 | ||
| 167 | /** | ||
| 168 | * struct sev_user_data_snp_status - SNP status | ||
| 169 | * | ||
| 170 | * @api_major: API major version | ||
| 171 | * @api_minor: API minor version | ||
| 172 | * @state: current platform state | ||
| 173 | * @is_rmp_initialized: whether RMP is initialized or not | ||
| 174 | * @rsvd: reserved | ||
| 175 | * @build_id: firmware build id for the API version | ||
| 176 | * @mask_chip_id: whether chip id is present in attestation reports or not | ||
| 177 | * @mask_chip_key: whether attestation reports are signed or not | ||
| 178 | * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded | ||
| 179 | * @rsvd1: reserved | ||
| 180 | * @guest_count: the number of guest currently managed by the firmware | ||
| 181 | * @current_tcb_version: current TCB version | ||
| 182 | * @reported_tcb_version: reported TCB version | ||
| 183 | */ | ||
| 184 | struct sev_user_data_snp_status { | ||
| 185 | 	__u8 api_major;			/* Out */ | ||
| 186 | 	__u8 api_minor;			/* Out */ | ||
| 187 | 	__u8 state;			/* Out */ | ||
| 188 | 	__u8 is_rmp_initialized:1;	/* Out */ | ||
| 189 | 	__u8 rsvd:7; | ||
| 190 | 	__u32 build_id;			/* Out */ | ||
| 191 | 	__u32 mask_chip_id:1;		/* Out */ | ||
| 192 | 	__u32 mask_chip_key:1;		/* Out */ | ||
| 193 | 	__u32 vlek_en:1;		/* Out */ | ||
| 194 | 	__u32 rsvd1:29; | ||
| 195 | 	__u32 guest_count;		/* Out */ | ||
| 196 | 	__u64 current_tcb_version;	/* Out */ | ||
| 197 | 	__u64 reported_tcb_version;	/* Out */ | ||
| 198 | } __attribute__((packed)); | ||
| 199 | |||
| 200 | /** | ||
| 201 | * struct sev_user_data_snp_config - system wide configuration value for SNP. | ||
| 202 | * | ||
| 203 | * @reported_tcb: the TCB version to report in the guest attestation report. | ||
| 204 | * @mask_chip_id: whether chip id is present in attestation reports or not | ||
| 205 | * @mask_chip_key: whether attestation reports are signed or not | ||
| 206 | * @rsvd: reserved | ||
| 207 | * @rsvd1: reserved | ||
| 208 | */ | ||
| 209 | struct sev_user_data_snp_config { | ||
| 210 | 	__u64 reported_tcb ; /* In */ | ||
| 211 | 	__u32 mask_chip_id:1; /* In */ | ||
| 212 | 	__u32 mask_chip_key:1; /* In */ | ||
| 213 | 	__u32 rsvd:30; /* In */ | ||
| 214 | 	__u8 rsvd1[52]; | ||
| 215 | } __attribute__((packed)); | ||
| 216 | |||
| 150 | /** | 217 | /** |
| 151 | * struct sev_issue_cmd - SEV ioctl parameters | 218 | * struct sev_issue_cmd - SEV ioctl parameters |
| 152 | * | 219 | * |
lib/libc/include/any-linux-any/linux/ptp_clock.h+14-4| ... | @@ -32,6 +32,7 @@ | ... | @@ -32,6 +32,7 @@ |
| 32 | #define PTP_RISING_EDGE (1<<1) | 32 | #define PTP_RISING_EDGE (1<<1) |
| 33 | #define PTP_FALLING_EDGE (1<<2) | 33 | #define PTP_FALLING_EDGE (1<<2) |
| 34 | #define PTP_STRICT_FLAGS (1<<3) | 34 | #define PTP_STRICT_FLAGS (1<<3) |
| 35 | #define PTP_EXT_OFFSET (1<<4) | ||
| 35 | #define PTP_EXTTS_EDGES (PTP_RISING_EDGE | PTP_FALLING_EDGE) | 36 | #define PTP_EXTTS_EDGES (PTP_RISING_EDGE | PTP_FALLING_EDGE) |
| 36 | 37 | ||
| 37 | /* | 38 | /* |
| ... | @@ -40,7 +41,8 @@ | ... | @@ -40,7 +41,8 @@ |
| 40 | #define PTP_EXTTS_VALID_FLAGS	(PTP_ENABLE_FEATURE |	\ | 41 | #define PTP_EXTTS_VALID_FLAGS	(PTP_ENABLE_FEATURE |	\ |
| 41 | 				 PTP_RISING_EDGE |	\ | 42 | 				 PTP_RISING_EDGE |	\ |
| 42 | 				 PTP_FALLING_EDGE |	\ | 43 | 				 PTP_FALLING_EDGE |	\ |
| 43 | 				 PTP_STRICT_FLAGS) | 44 | 				 PTP_STRICT_FLAGS |	\ |
| 45 | 				 PTP_EXT_OFFSET) | ||
| 44 | 46 | ||
| 45 | /* | 47 | /* |
| 46 | * flag fields valid for the original PTP_EXTTS_REQUEST ioctl. | 48 | * flag fields valid for the original PTP_EXTTS_REQUEST ioctl. |
| ... | @@ -50,6 +52,11 @@ | ... | @@ -50,6 +52,11 @@ |
| 50 | 					 PTP_RISING_EDGE |	\ | 52 | 					 PTP_RISING_EDGE |	\ |
| 51 | 					 PTP_FALLING_EDGE) | 53 | 					 PTP_FALLING_EDGE) |
| 52 | 54 | ||
| 55 | /* | ||
| 56 | * flag fields valid for the ptp_extts_event report. | ||
| 57 | */ | ||
| 58 | #define PTP_EXTTS_EVENT_VALID	(PTP_ENABLE_FEATURE) | ||
| 59 | |||
| 53 | /* | 60 | /* |
| 54 | * Bits of the ptp_perout_request.flags field: | 61 | * Bits of the ptp_perout_request.flags field: |
| 55 | */ | 62 | */ |
| ... | @@ -95,7 +102,8 @@ struct ptp_clock_caps { | ... | @@ -95,7 +102,8 @@ struct ptp_clock_caps { |
| 95 | 	int cross_timestamping; | 102 | 	int cross_timestamping; |
| 96 | 	/* Whether the clock supports adjust phase */ | 103 | 	/* Whether the clock supports adjust phase */ |
| 97 | 	int adjust_phase; | 104 | 	int adjust_phase; |
| 98 | 	int rsv[12]; /* Reserved for future use. */ | 105 | 	int max_phase_adj; /* Maximum phase adjustment in nanoseconds. */ |
| 106 | 	int rsv[11]; /* Reserved for future use. */ | ||
| 99 | }; | 107 | }; |
| 100 | 108 | ||
| 101 | struct ptp_extts_request { | 109 | struct ptp_extts_request { |
| ... | @@ -223,11 +231,13 @@ struct ptp_pin_desc { | ... | @@ -223,11 +231,13 @@ struct ptp_pin_desc { |
| 223 | 	_IOWR(PTP_CLK_MAGIC, 17, struct ptp_sys_offset_precise) | 231 | 	_IOWR(PTP_CLK_MAGIC, 17, struct ptp_sys_offset_precise) |
| 224 | #define PTP_SYS_OFFSET_EXTENDED2 \ | 232 | #define PTP_SYS_OFFSET_EXTENDED2 \ |
| 225 | 	_IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended) | 233 | 	_IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended) |
| 234 | #define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19) | ||
| 235 | #define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int) | ||
| 226 | 236 | ||
| 227 | struct ptp_extts_event { | 237 | struct ptp_extts_event { |
| 228 | 	struct ptp_clock_time t; /* Time event occured. */ | 238 | 	struct ptp_clock_time t; /* Time event occurred. */ |
| 229 | 	unsigned int index; /* Which channel produced the event. */ | 239 | 	unsigned int index; /* Which channel produced the event. */ |
| 230 | 	unsigned int flags; /* Reserved for future use. */ | 240 | 	unsigned int flags; /* Event type. */ |
| 231 | 	unsigned int rsv[2]; /* Reserved for future use. */ | 241 | 	unsigned int rsv[2]; /* Reserved for future use. */ |
| 232 | }; | 242 | }; |
| 233 | 243 |
lib/libc/include/any-linux-any/linux/ptrace.h+30| ... | @@ -112,6 +112,36 @@ struct ptrace_rseq_configuration { | ... | @@ -112,6 +112,36 @@ struct ptrace_rseq_configuration { |
| 112 | 	__u32 pad; | 112 | 	__u32 pad; |
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | #define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG 0x4210 | ||
| 116 | #define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG 0x4211 | ||
| 117 | |||
| 118 | /* | ||
| 119 | * struct ptrace_sud_config - Per-task configuration for Syscall User Dispatch | ||
| 120 | * @mode:	One of PR_SYS_DISPATCH_ON or PR_SYS_DISPATCH_OFF | ||
| 121 | * @selector:	Tracees user virtual address of SUD selector | ||
| 122 | * @offset:	SUD exclusion area (virtual address) | ||
| 123 | * @len:	Length of SUD exclusion area | ||
| 124 | * | ||
| 125 | * Used to get/set the syscall user dispatch configuration for a tracee. | ||
| 126 | * Selector is optional (may be NULL), and if invalid will produce | ||
| 127 | * a SIGSEGV in the tracee upon first access. | ||
| 128 | * | ||
| 129 | * If mode is PR_SYS_DISPATCH_ON, syscall dispatch will be enabled. If | ||
| 130 | * PR_SYS_DISPATCH_OFF, syscall dispatch will be disabled and all other | ||
| 131 | * parameters must be 0. The value in *selector (if not null), also determines | ||
| 132 | * whether syscall dispatch will occur. | ||
| 133 | * | ||
| 134 | * The Syscall User Dispatch Exclusion area described by offset/len is the | ||
| 135 | * virtual address space from which syscalls will not produce a user | ||
| 136 | * dispatch. | ||
| 137 | */ | ||
| 138 | struct ptrace_sud_config { | ||
| 139 | 	__u64 mode; | ||
| 140 | 	__u64 selector; | ||
| 141 | 	__u64 offset; | ||
| 142 | 	__u64 len; | ||
| 143 | }; | ||
| 144 | |||
| 115 | /* | 145 | /* |
| 116 | * These values are stored in task->ptrace_message | 146 | * These values are stored in task->ptrace_message |
| 117 | * by ptrace_stop to describe the current syscall-stop. | 147 | * by ptrace_stop to describe the current syscall-stop. |
lib/libc/include/any-linux-any/linux/quota.h+1| ... | @@ -77,6 +77,7 @@ | ... | @@ -77,6 +77,7 @@ |
| 77 | #define	QFMT_VFS_V0 2 | 77 | #define	QFMT_VFS_V0 2 |
| 78 | #define QFMT_OCFS2 3 | 78 | #define QFMT_OCFS2 3 |
| 79 | #define	QFMT_VFS_V1 4 | 79 | #define	QFMT_VFS_V1 4 |
| 80 | #define	QFMT_SHMEM 5 | ||
| 80 | 81 | ||
| 81 | /* Size of block in which space limits are passed through the quota | 82 | /* Size of block in which space limits are passed through the quota |
| 82 | * interface */ | 83 | * interface */ |
lib/libc/include/any-linux-any/linux/raid/md_p.h+2-6| ... | @@ -2,15 +2,11 @@ | ... | @@ -2,15 +2,11 @@ |
| 2 | /* | 2 | /* |
| 3 | md_p.h : physical layout of Linux RAID devices | 3 | md_p.h : physical layout of Linux RAID devices |
| 4 | Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman | 4 | Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman |
| 5 | 	 | 5 | |
| 6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | |||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | (for example /usr/src/linux/COPYING); if not, write to the Free | ||
| 13 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 14 | */ | 10 | */ |
| 15 | 11 | ||
| 16 | #ifndef _MD_P_H | 12 | #ifndef _MD_P_H |
| ... | @@ -237,7 +233,7 @@ struct mdp_superblock_1 { | ... | @@ -237,7 +233,7 @@ struct mdp_superblock_1 { |
| 237 | 	char	set_name[32];	/* set and interpreted by user-space */ | 233 | 	char	set_name[32];	/* set and interpreted by user-space */ |
| 238 | 234 | ||
| 239 | 	__le64	ctime;		/* lo 40 bits are seconds, top 24 are microseconds or 0*/ | 235 | 	__le64	ctime;		/* lo 40 bits are seconds, top 24 are microseconds or 0*/ |
| 240 | 	__le32	level;		/* -4 (multipath), -1 (linear), 0,1,4,5 */ | 236 | 	__le32	level;		/* 0,1,4,5 */ |
| 241 | 	__le32	layout;		/* only for raid5 and raid10 currently */ | 237 | 	__le32	layout;		/* only for raid5 and raid10 currently */ |
| 242 | 	__le64	size;		/* used size of component devices, in 512byte sectors */ | 238 | 	__le64	size;		/* used size of component devices, in 512byte sectors */ |
| 243 | 239 |
lib/libc/include/any-linux-any/linux/raid/md_u.h+1-10| ... | @@ -2,15 +2,11 @@ | ... | @@ -2,15 +2,11 @@ |
| 2 | /* | 2 | /* |
| 3 | md_u.h : user <=> kernel API between Linux raidtools and RAID drivers | 3 | md_u.h : user <=> kernel API between Linux raidtools and RAID drivers |
| 4 | Copyright (C) 1998 Ingo Molnar | 4 | Copyright (C) 1998 Ingo Molnar |
| 5 | 	 | 5 | |
| 6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | |||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | (for example /usr/src/linux/COPYING); if not, write to the Free | ||
| 13 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 14 | */ | 10 | */ |
| 15 | 11 | ||
| 16 | #ifndef _MD_U_H | 12 | #ifndef _MD_U_H |
| ... | @@ -107,11 +103,6 @@ typedef struct mdu_array_info_s { | ... | @@ -107,11 +103,6 @@ typedef struct mdu_array_info_s { |
| 107 | 103 | ||
| 108 | } mdu_array_info_t; | 104 | } mdu_array_info_t; |
| 109 | 105 | ||
| 110 | /* non-obvious values for 'level' */ | ||
| 111 | #define	LEVEL_MULTIPATH		(-4) | ||
| 112 | #define	LEVEL_LINEAR		(-1) | ||
| 113 | #define	LEVEL_FAULTY		(-5) | ||
| 114 | |||
| 115 | /* we need a value for 'no level specified' and 0 | 106 | /* we need a value for 'no level specified' and 0 |
| 116 | * means 'raid0', so we need something else. This is | 107 | * means 'raid0', so we need something else. This is |
| 117 | * for internal use only | 108 | * for internal use only |
lib/libc/include/any-linux-any/linux/resource.h+1-1| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | #ifndef _LINUX_RESOURCE_H | 2 | #ifndef _LINUX_RESOURCE_H |
| 3 | #define _LINUX_RESOURCE_H | 3 | #define _LINUX_RESOURCE_H |
| 4 | 4 | ||
| 5 | #include <linux/time.h> | 5 | #include <linux/time_types.h> |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
lib/libc/include/any-linux-any/linux/rkisp1-config.h+27-23| ... | @@ -175,16 +175,21 @@ | ... | @@ -175,16 +175,21 @@ |
| 175 | /** | 175 | /** |
| 176 | * enum rkisp1_cif_isp_version - ISP variants | 176 | * enum rkisp1_cif_isp_version - ISP variants |
| 177 | * | 177 | * |
| 178 | * @RKISP1_V10: used at least in rk3288 and rk3399 | 178 | * @RKISP1_V10: Used at least in RK3288 and RK3399. |
| 179 | * @RKISP1_V11: declared in the original vendor code, but not used | 179 | * @RKISP1_V11: Declared in the original vendor code, but not used. Same number |
| 180 | * @RKISP1_V12: used at least in rk3326 and px30 | 180 | *	of entries in grids and histogram as v10. |
| 181 | * @RKISP1_V13: used at least in rk1808 | 181 | * @RKISP1_V12: Used at least in RK3326 and PX30. |
| 182 | * @RKISP1_V13: Used at least in RK1808. Same number of entries in grids and | ||
| 183 | *	histogram as v12. | ||
| 184 | * @RKISP1_V_IMX8MP: Used in at least i.MX8MP. Same number of entries in grids | ||
| 185 | *	and histogram as v10. | ||
| 182 | */ | 186 | */ |
| 183 | enum rkisp1_cif_isp_version { | 187 | enum rkisp1_cif_isp_version { |
| 184 | 	RKISP1_V10 = 10, | 188 | 	RKISP1_V10 = 10, |
| 185 | 	RKISP1_V11, | 189 | 	RKISP1_V11, |
| 186 | 	RKISP1_V12, | 190 | 	RKISP1_V12, |
| 187 | 	RKISP1_V13, | 191 | 	RKISP1_V13, |
| 192 | 	RKISP1_V_IMX8MP, | ||
| 188 | }; | 193 | }; |
| 189 | 194 | ||
| 190 | enum rkisp1_cif_isp_histogram_mode { | 195 | enum rkisp1_cif_isp_histogram_mode { |
| ... | @@ -584,10 +589,9 @@ enum rkisp1_cif_isp_goc_mode { | ... | @@ -584,10 +589,9 @@ enum rkisp1_cif_isp_goc_mode { |
| 584 | * as is reported by the hw_revision field of the struct media_device_info | 589 | * as is reported by the hw_revision field of the struct media_device_info |
| 585 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. | 590 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. |
| 586 | * | 591 | * |
| 587 | * Versions <= V11 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 | 592 | * V10 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 entries, V12 has |
| 588 | * entries, versions >= V12 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 | 593 | * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 entries. |
| 589 | * entries. RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum | 594 | * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum of the two. |
| 590 | * of the two. | ||
| 591 | */ | 595 | */ |
| 592 | struct rkisp1_cif_isp_goc_config { | 596 | struct rkisp1_cif_isp_goc_config { |
| 593 | 	__u32 mode; | 597 | 	__u32 mode; |
| ... | @@ -607,10 +611,10 @@ struct rkisp1_cif_isp_goc_config { | ... | @@ -607,10 +611,10 @@ struct rkisp1_cif_isp_goc_config { |
| 607 | * as is reported by the hw_revision field of the struct media_device_info | 611 | * as is reported by the hw_revision field of the struct media_device_info |
| 608 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. | 612 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. |
| 609 | * | 613 | * |
| 610 | * Versions <= V11 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 | 614 | * V10 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 entries, V12 has |
| 611 | * entries, versions >= V12 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 | 615 | * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 entries. |
| 612 | * entries. RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum | 616 | * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum of the |
| 613 | * of the two. | 617 | * two. |
| 614 | */ | 618 | */ |
| 615 | struct rkisp1_cif_isp_hst_config { | 619 | struct rkisp1_cif_isp_hst_config { |
| 616 | 	__u32 mode; | 620 | 	__u32 mode; |
| ... | @@ -902,9 +906,9 @@ struct rkisp1_cif_isp_bls_meas_val { | ... | @@ -902,9 +906,9 @@ struct rkisp1_cif_isp_bls_meas_val { |
| 902 | * as is reported by the hw_revision field of the struct media_device_info | 906 | * as is reported by the hw_revision field of the struct media_device_info |
| 903 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. | 907 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. |
| 904 | * | 908 | * |
| 905 | * Versions <= V11 have RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, | 909 | * V10 has RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, V12 has |
| 906 | * versions >= V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. | 910 | * RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. RKISP1_CIF_ISP_AE_MEAN_MAX is equal |
| 907 | * RKISP1_CIF_ISP_AE_MEAN_MAX is equal to the maximum of the two. | 911 | * to the maximum of the two. |
| 908 | * | 912 | * |
| 909 | * Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12. | 913 | * Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12. |
| 910 | */ | 914 | */ |
| ... | @@ -944,21 +948,21 @@ struct rkisp1_cif_isp_af_stat { | ... | @@ -944,21 +948,21 @@ struct rkisp1_cif_isp_af_stat { |
| 944 | *	 integer part. | 948 | *	 integer part. |
| 945 | * | 949 | * |
| 946 | * The window of the measurements area is divided to 5x5 sub-windows for | 950 | * The window of the measurements area is divided to 5x5 sub-windows for |
| 947 | * V10/V11 and to 9x9 sub-windows for V12. The histogram is then computed for | 951 | * V10 and to 9x9 sub-windows for V12. The histogram is then computed for each |
| 948 | * each sub-window independently and the final result is a weighted average of | 952 | * sub-window independently and the final result is a weighted average of the |
| 949 | * the histogram measurements on all sub-windows. The window of the | 953 | * histogram measurements on all sub-windows. The window of the measurements |
| 950 | * measurements area and the weight of each sub-window are configurable using | 954 | * area and the weight of each sub-window are configurable using |
| 951 | * struct @rkisp1_cif_isp_hst_config. | 955 | * struct @rkisp1_cif_isp_hst_config. |
| 952 | * | 956 | * |
| 953 | * The histogram contains 16 bins in V10/V11 and 32 bins in V12/V13. | 957 | * The histogram contains 16 bins in V10 and 32 bins in V12. |
| 954 | * | 958 | * |
| 955 | * The number of entries of @hist_bins depends on the hardware revision | 959 | * The number of entries of @hist_bins depends on the hardware revision |
| 956 | * as is reported by the hw_revision field of the struct media_device_info | 960 | * as is reported by the hw_revision field of the struct media_device_info |
| 957 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. | 961 | * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. |
| 958 | * | 962 | * |
| 959 | * Versions <= V11 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, | 963 | * V10 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, V12 has |
| 960 | * versions >= V12 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. | 964 | * RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. RKISP1_CIF_ISP_HIST_BIN_N_MAX is |
| 961 | * RKISP1_CIF_ISP_HIST_BIN_N_MAX is equal to the maximum of the two. | 965 | * equal to the maximum of the two. |
| 962 | */ | 966 | */ |
| 963 | struct rkisp1_cif_isp_hist_stat { | 967 | struct rkisp1_cif_isp_hist_stat { |
| 964 | 	__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; | 968 | 	__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; |
lib/libc/include/any-linux-any/linux/rpmsg.h+10| ... | @@ -43,4 +43,14 @@ struct rpmsg_endpoint_info { | ... | @@ -43,4 +43,14 @@ struct rpmsg_endpoint_info { |
| 43 | */ | 43 | */ |
| 44 | #define RPMSG_RELEASE_DEV_IOCTL	_IOW(0xb5, 0x4, struct rpmsg_endpoint_info) | 44 | #define RPMSG_RELEASE_DEV_IOCTL	_IOW(0xb5, 0x4, struct rpmsg_endpoint_info) |
| 45 | 45 | ||
| 46 | /** | ||
| 47 | * Get the flow control state of the remote rpmsg char device. | ||
| 48 | */ | ||
| 49 | #define RPMSG_GET_OUTGOING_FLOWCONTROL _IOR(0xb5, 0x5, int) | ||
| 50 | |||
| 51 | /** | ||
| 52 | * Set the flow control state of the local rpmsg char device. | ||
| 53 | */ | ||
| 54 | #define RPMSG_SET_INCOMING_FLOWCONTROL _IOR(0xb5, 0x6, int) | ||
| 55 | |||
| 46 | #endif | 56 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/rtnetlink.h+11-7| ... | @@ -502,13 +502,17 @@ enum { | ... | @@ -502,13 +502,17 @@ enum { |
| 502 | 502 | ||
| 503 | #define RTAX_MAX (__RTAX_MAX - 1) | 503 | #define RTAX_MAX (__RTAX_MAX - 1) |
| 504 | 504 | ||
| 505 | #define RTAX_FEATURE_ECN	(1 << 0) | 505 | #define RTAX_FEATURE_ECN		(1 << 0) |
| 506 | #define RTAX_FEATURE_SACK	(1 << 1) | 506 | #define RTAX_FEATURE_SACK		(1 << 1) /* unused */ |
| 507 | #define RTAX_FEATURE_TIMESTAMP	(1 << 2) | 507 | #define RTAX_FEATURE_TIMESTAMP		(1 << 2) /* unused */ |
| 508 | #define RTAX_FEATURE_ALLFRAG	(1 << 3) | 508 | #define RTAX_FEATURE_ALLFRAG		(1 << 3) /* unused */ |
| 509 | 509 | #define RTAX_FEATURE_TCP_USEC_TS	(1 << 4) | |
| 510 | #define RTAX_FEATURE_MASK	(RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \ | 510 | |
| 511 | 				 RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG) | 511 | #define RTAX_FEATURE_MASK	(RTAX_FEATURE_ECN |		\ |
| 512 | 				 RTAX_FEATURE_SACK |		\ | ||
| 513 | 				 RTAX_FEATURE_TIMESTAMP |	\ | ||
| 514 | 				 RTAX_FEATURE_ALLFRAG |		\ | ||
| 515 | 				 RTAX_FEATURE_TCP_USEC_TS) | ||
| 512 | 516 | ||
| 513 | struct rta_session { | 517 | struct rta_session { |
| 514 | 	__u8	proto; | 518 | 	__u8	proto; |
lib/libc/include/any-linux-any/linux/sched/types.h-4| ... | @@ -4,10 +4,6 @@ | ... | @@ -4,10 +4,6 @@ |
| 4 | 4 | ||
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | 6 | ||
| 7 | struct sched_param { | ||
| 8 | 	int sched_priority; | ||
| 9 | }; | ||
| 10 | |||
| 11 | #define SCHED_ATTR_SIZE_VER0	48	/* sizeof first published struct */ | 7 | #define SCHED_ATTR_SIZE_VER0	48	/* sizeof first published struct */ |
| 12 | #define SCHED_ATTR_SIZE_VER1	56	/* add: util_{min,max} */ | 8 | #define SCHED_ATTR_SIZE_VER1	56	/* add: util_{min,max} */ |
| 13 | 9 |
lib/libc/include/any-linux-any/linux/sctp.h+3-1| ... | @@ -1205,7 +1205,9 @@ enum sctp_sched_type { | ... | @@ -1205,7 +1205,9 @@ enum sctp_sched_type { |
| 1205 | 	SCTP_SS_DEFAULT = SCTP_SS_FCFS, | 1205 | 	SCTP_SS_DEFAULT = SCTP_SS_FCFS, |
| 1206 | 	SCTP_SS_PRIO, | 1206 | 	SCTP_SS_PRIO, |
| 1207 | 	SCTP_SS_RR, | 1207 | 	SCTP_SS_RR, |
| 1208 | 	SCTP_SS_MAX = SCTP_SS_RR | 1208 | 	SCTP_SS_FC, |
| 1209 | 	SCTP_SS_WFQ, | ||
| 1210 | 	SCTP_SS_MAX = SCTP_SS_WFQ | ||
| 1209 | }; | 1211 | }; |
| 1210 | 1212 | ||
| 1211 | /* Probe Interval socket option */ | 1213 | /* Probe Interval socket option */ |
lib/libc/include/any-linux-any/linux/seccomp.h+4| ... | @@ -115,6 +115,8 @@ struct seccomp_notif_resp { | ... | @@ -115,6 +115,8 @@ struct seccomp_notif_resp { |
| 115 | 	__u32 flags; | 115 | 	__u32 flags; |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | #define SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP (1UL << 0) | ||
| 119 | |||
| 118 | /* valid flags for seccomp_notif_addfd */ | 120 | /* valid flags for seccomp_notif_addfd */ |
| 119 | #define SECCOMP_ADDFD_FLAG_SETFD	(1UL << 0) /* Specify remote fd */ | 121 | #define SECCOMP_ADDFD_FLAG_SETFD	(1UL << 0) /* Specify remote fd */ |
| 120 | #define SECCOMP_ADDFD_FLAG_SEND		(1UL << 1) /* Addfd and return it, atomically */ | 122 | #define SECCOMP_ADDFD_FLAG_SEND		(1UL << 1) /* Addfd and return it, atomically */ |
| ... | @@ -150,4 +152,6 @@ struct seccomp_notif_addfd { | ... | @@ -150,4 +152,6 @@ struct seccomp_notif_addfd { |
| 150 | #define SECCOMP_IOCTL_NOTIF_ADDFD	SECCOMP_IOW(3, \ | 152 | #define SECCOMP_IOCTL_NOTIF_ADDFD	SECCOMP_IOW(3, \ |
| 151 | 						struct seccomp_notif_addfd) | 153 | 						struct seccomp_notif_addfd) |
| 152 | 154 | ||
| 155 | #define SECCOMP_IOCTL_NOTIF_SET_FLAGS	SECCOMP_IOW(4, __u64) | ||
| 156 | |||
| 153 | #endif /* _LINUX_SECCOMP_H */ | 157 | #endif /* _LINUX_SECCOMP_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/sed-opal.h+48-1| ... | @@ -49,13 +49,23 @@ enum opal_lock_flags { | ... | @@ -49,13 +49,23 @@ enum opal_lock_flags { |
| 49 | 	OPAL_SAVE_FOR_LOCK = 0x01, | 49 | 	OPAL_SAVE_FOR_LOCK = 0x01, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | enum opal_key_type { | ||
| 53 | 	OPAL_INCLUDED = 0,	/* key[] is the key */ | ||
| 54 | 	OPAL_KEYRING,		/* key is in keyring */ | ||
| 55 | }; | ||
| 56 | |||
| 52 | struct opal_key { | 57 | struct opal_key { |
| 53 | 	__u8 lr; | 58 | 	__u8 lr; |
| 54 | 	__u8 key_len; | 59 | 	__u8 key_len; |
| 55 | 	__u8 __align[6]; | 60 | 	__u8 key_type; |
| 61 | 	__u8 __align[5]; | ||
| 56 | 	__u8 key[OPAL_KEY_MAX]; | 62 | 	__u8 key[OPAL_KEY_MAX]; |
| 57 | }; | 63 | }; |
| 58 | 64 | ||
| 65 | enum opal_revert_lsp_opts { | ||
| 66 | 	OPAL_PRESERVE = 0x01, | ||
| 67 | }; | ||
| 68 | |||
| 59 | struct opal_lr_act { | 69 | struct opal_lr_act { |
| 60 | 	struct opal_key key; | 70 | 	struct opal_key key; |
| 61 | 	__u32 sum; | 71 | 	__u32 sum; |
| ... | @@ -78,6 +88,16 @@ struct opal_user_lr_setup { | ... | @@ -78,6 +88,16 @@ struct opal_user_lr_setup { |
| 78 | 	struct opal_session_info session; | 88 | 	struct opal_session_info session; |
| 79 | }; | 89 | }; |
| 80 | 90 | ||
| 91 | struct opal_lr_status { | ||
| 92 | 	struct opal_session_info session; | ||
| 93 | 	__u64 range_start; | ||
| 94 | 	__u64 range_length; | ||
| 95 | 	__u32 RLE; /* Read Lock enabled */ | ||
| 96 | 	__u32 WLE; /* Write Lock Enabled */ | ||
| 97 | 	__u32 l_state; | ||
| 98 | 	__u8 align[4]; | ||
| 99 | }; | ||
| 100 | |||
| 81 | struct opal_lock_unlock { | 101 | struct opal_lock_unlock { |
| 82 | 	struct opal_session_info session; | 102 | 	struct opal_session_info session; |
| 83 | 	__u32 l_state; | 103 | 	__u32 l_state; |
| ... | @@ -151,6 +171,29 @@ struct opal_status { | ... | @@ -151,6 +171,29 @@ struct opal_status { |
| 151 | 	__u32 reserved; | 171 | 	__u32 reserved; |
| 152 | }; | 172 | }; |
| 153 | 173 | ||
| 174 | /* | ||
| 175 | * Geometry Reporting per TCG Storage OPAL SSC | ||
| 176 | * section 3.1.1.4 | ||
| 177 | */ | ||
| 178 | struct opal_geometry { | ||
| 179 | 	__u8 align; | ||
| 180 | 	__u32 logical_block_size; | ||
| 181 | 	__u64 alignment_granularity; | ||
| 182 | 	__u64 lowest_aligned_lba; | ||
| 183 | 	__u8 __align[3]; | ||
| 184 | }; | ||
| 185 | |||
| 186 | struct opal_discovery { | ||
| 187 | 	__u64 data; | ||
| 188 | 	__u64 size; | ||
| 189 | }; | ||
| 190 | |||
| 191 | struct opal_revert_lsp { | ||
| 192 | 	struct opal_key key; | ||
| 193 | 	__u32 options; | ||
| 194 | 	__u32 __pad; | ||
| 195 | }; | ||
| 196 | |||
| 154 | #define IOC_OPAL_SAVE		 _IOW('p', 220, struct opal_lock_unlock) | 197 | #define IOC_OPAL_SAVE		 _IOW('p', 220, struct opal_lock_unlock) |
| 155 | #define IOC_OPAL_LOCK_UNLOCK	 _IOW('p', 221, struct opal_lock_unlock) | 198 | #define IOC_OPAL_LOCK_UNLOCK	 _IOW('p', 221, struct opal_lock_unlock) |
| 156 | #define IOC_OPAL_TAKE_OWNERSHIP	 _IOW('p', 222, struct opal_key) | 199 | #define IOC_OPAL_TAKE_OWNERSHIP	 _IOW('p', 222, struct opal_key) |
| ... | @@ -168,5 +211,9 @@ struct opal_status { | ... | @@ -168,5 +211,9 @@ struct opal_status { |
| 168 | #define IOC_OPAL_WRITE_SHADOW_MBR _IOW('p', 234, struct opal_shadow_mbr) | 211 | #define IOC_OPAL_WRITE_SHADOW_MBR _IOW('p', 234, struct opal_shadow_mbr) |
| 169 | #define IOC_OPAL_GENERIC_TABLE_RW _IOW('p', 235, struct opal_read_write_table) | 212 | #define IOC_OPAL_GENERIC_TABLE_RW _IOW('p', 235, struct opal_read_write_table) |
| 170 | #define IOC_OPAL_GET_STATUS _IOR('p', 236, struct opal_status) | 213 | #define IOC_OPAL_GET_STATUS _IOR('p', 236, struct opal_status) |
| 214 | #define IOC_OPAL_GET_LR_STATUS _IOW('p', 237, struct opal_lr_status) | ||
| 215 | #define IOC_OPAL_GET_GEOMETRY _IOR('p', 238, struct opal_geometry) | ||
| 216 | #define IOC_OPAL_DISCOVERY _IOW('p', 239, struct opal_discovery) | ||
| 217 | #define IOC_OPAL_REVERT_LSP _IOW('p', 240, struct opal_revert_lsp) | ||
| 171 | 218 | ||
| 172 | #endif /* _SED_OPAL_H */ | 219 | #endif /* _SED_OPAL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/serial.h+12-8| ... | @@ -11,6 +11,7 @@ | ... | @@ -11,6 +11,7 @@ |
| 11 | #ifndef _LINUX_SERIAL_H | 11 | #ifndef _LINUX_SERIAL_H |
| 12 | #define _LINUX_SERIAL_H | 12 | #define _LINUX_SERIAL_H |
| 13 | 13 | ||
| 14 | #include <linux/const.h> | ||
| 14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 15 | 16 | ||
| 16 | #include <linux/tty_flags.h> | 17 | #include <linux/tty_flags.h> |
| ... | @@ -137,17 +138,20 @@ struct serial_icounter_struct { | ... | @@ -137,17 +138,20 @@ struct serial_icounter_struct { |
| 137 | * * %SER_RS485_ADDRB		- Enable RS485 addressing mode. | 138 | * * %SER_RS485_ADDRB		- Enable RS485 addressing mode. |
| 138 | * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB. | 139 | * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB. |
| 139 | * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB. | 140 | * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB. |
| 141 | * * %SER_RS485_MODE_RS422	- Enable RS422. Requires %SER_RS485_ENABLED. | ||
| 140 | */ | 142 | */ |
| 141 | struct serial_rs485 { | 143 | struct serial_rs485 { |
| 142 | 	__u32	flags; | 144 | 	__u32	flags; |
| 143 | #define SER_RS485_ENABLED		(1 << 0) | 145 | #define SER_RS485_ENABLED		_BITUL(0) |
| 144 | #define SER_RS485_RTS_ON_SEND		(1 << 1) | 146 | #define SER_RS485_RTS_ON_SEND		_BITUL(1) |
| 145 | #define SER_RS485_RTS_AFTER_SEND	(1 << 2) | 147 | #define SER_RS485_RTS_AFTER_SEND	_BITUL(2) |
| 146 | #define SER_RS485_RX_DURING_TX		(1 << 4) | 148 | /* Placeholder for bit 3: SER_RS485_RTS_BEFORE_SEND, which isn't used anymore */ |
| 147 | #define SER_RS485_TERMINATE_BUS		(1 << 5) | 149 | #define SER_RS485_RX_DURING_TX		_BITUL(4) |
| 148 | #define SER_RS485_ADDRB			(1 << 6) | 150 | #define SER_RS485_TERMINATE_BUS		_BITUL(5) |
| 149 | #define SER_RS485_ADDR_RECV		(1 << 7) | 151 | #define SER_RS485_ADDRB			_BITUL(6) |
| 150 | #define SER_RS485_ADDR_DEST		(1 << 8) | 152 | #define SER_RS485_ADDR_RECV		_BITUL(7) |
| 153 | #define SER_RS485_ADDR_DEST		_BITUL(8) | ||
| 154 | #define SER_RS485_MODE_RS422		_BITUL(9) | ||
| 151 | 155 | ||
| 152 | 	__u32	delay_rts_before_send; | 156 | 	__u32	delay_rts_before_send; |
| 153 | 	__u32	delay_rts_after_send; | 157 | 	__u32	delay_rts_after_send; |
lib/libc/include/any-linux-any/linux/serial_core.h+10-55| ... | @@ -1,22 +1,6 @@ | ... | @@ -1,22 +1,6 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * linux/drivers/char/serial_core.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | 3 | * Copyright (C) 2000 Deep Blue Solutions Ltd. |
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | 4 | */ |
| 21 | #ifndef LINUX_SERIAL_CORE_H | 5 | #ifndef LINUX_SERIAL_CORE_H |
| 22 | #define LINUX_SERIAL_CORE_H | 6 | #define LINUX_SERIAL_CORE_H |
| ... | @@ -25,6 +9,10 @@ | ... | @@ -25,6 +9,10 @@ |
| 25 | 9 | ||
| 26 | /* | 10 | /* |
| 27 | * The type definitions. These are from Ted Ts'o's serial.h | 11 | * The type definitions. These are from Ted Ts'o's serial.h |
| 12 | * By historical reasons the values from 0 to 13 are defined | ||
| 13 | * in the include/uapi/linux/serial.h, do not define them here. | ||
| 14 | * Values 0 to 19 are used by setserial from busybox and must never | ||
| 15 | * be modified. | ||
| 28 | */ | 16 | */ |
| 29 | #define PORT_NS16550A	14 | 17 | #define PORT_NS16550A	14 |
| 30 | #define PORT_XSCALE	15 | 18 | #define PORT_XSCALE	15 |
| ... | @@ -94,15 +82,9 @@ | ... | @@ -94,15 +82,9 @@ |
| 94 | #define PORT_SCIF	53 | 82 | #define PORT_SCIF	53 |
| 95 | #define PORT_IRDA	54 | 83 | #define PORT_IRDA	54 |
| 96 | 84 | ||
| 97 | /* Samsung S3C2410 SoC and derivatives thereof */ | ||
| 98 | #define PORT_S3C2410 55 | ||
| 99 | |||
| 100 | /* SGI IP22 aka Indy / Challenge S / Indigo 2 */ | 85 | /* SGI IP22 aka Indy / Challenge S / Indigo 2 */ |
| 101 | #define PORT_IP22ZILOG	56 | 86 | #define PORT_IP22ZILOG	56 |
| 102 | 87 | ||
| 103 | /* Sharp LH7a40x -- an ARM9 SoC series */ | ||
| 104 | #define PORT_LH7A40X	57 | ||
| 105 | |||
| 106 | /* PPC CPM type number */ | 88 | /* PPC CPM type number */ |
| 107 | #define PORT_CPM 58 | 89 | #define PORT_CPM 58 |
| 108 | 90 | ||
| ... | @@ -112,37 +94,23 @@ | ... | @@ -112,37 +94,23 @@ |
| 112 | /* IBM icom */ | 94 | /* IBM icom */ |
| 113 | #define PORT_ICOM	60 | 95 | #define PORT_ICOM	60 |
| 114 | 96 | ||
| 115 | /* Samsung S3C2440 SoC */ | ||
| 116 | #define PORT_S3C2440	61 | ||
| 117 | |||
| 118 | /* Motorola i.MX SoC */ | 97 | /* Motorola i.MX SoC */ |
| 119 | #define PORT_IMX	62 | 98 | #define PORT_IMX	62 |
| 120 | 99 | ||
| 121 | /* Marvell MPSC (obsolete unused) */ | ||
| 122 | #define PORT_MPSC	63 | ||
| 123 | |||
| 124 | /* TXX9 type number */ | 100 | /* TXX9 type number */ |
| 125 | #define PORT_TXX9	64 | 101 | #define PORT_TXX9	64 |
| 126 | 102 | ||
| 127 | /* Samsung S3C2400 SoC */ | ||
| 128 | #define PORT_S3C2400	67 | ||
| 129 | |||
| 130 | /* M32R SIO */ | ||
| 131 | #define PORT_M32R_SIO	68 | ||
| 132 | |||
| 133 | /*Digi jsm */ | 103 | /*Digi jsm */ |
| 134 | #define PORT_JSM 69 | 104 | #define PORT_JSM 69 |
| 135 | 105 | ||
| 136 | /* SUN4V Hypervisor Console */ | 106 | /* SUN4V Hypervisor Console */ |
| 137 | #define PORT_SUNHV	72 | 107 | #define PORT_SUNHV	72 |
| 138 | 108 | ||
| 139 | #define PORT_S3C2412	73 | ||
| 140 | |||
| 141 | /* Xilinx uartlite */ | 109 | /* Xilinx uartlite */ |
| 142 | #define PORT_UARTLITE	74 | 110 | #define PORT_UARTLITE	74 |
| 143 | 111 | ||
| 144 | /* Blackfin bf5xx */ | 112 | /* Broadcom BCM7271 UART */ |
| 145 | #define PORT_BFIN	75 | 113 | #define PORT_BCM7271	76 |
| 146 | 114 | ||
| 147 | /* Broadcom SB1250, etc. SOC */ | 115 | /* Broadcom SB1250, etc. SOC */ |
| 148 | #define PORT_SB1250_DUART	77 | 116 | #define PORT_SB1250_DUART	77 |
| ... | @@ -150,13 +118,6 @@ | ... | @@ -150,13 +118,6 @@ |
| 150 | /* Freescale ColdFire */ | 118 | /* Freescale ColdFire */ |
| 151 | #define PORT_MCF	78 | 119 | #define PORT_MCF	78 |
| 152 | 120 | ||
| 153 | /* Blackfin SPORT */ | ||
| 154 | #define PORT_BFIN_SPORT		79 | ||
| 155 | |||
| 156 | /* MN10300 on-chip UART numbers */ | ||
| 157 | #define PORT_MN10300		80 | ||
| 158 | #define PORT_MN10300_CTS	81 | ||
| 159 | |||
| 160 | #define PORT_SC26XX	82 | 121 | #define PORT_SC26XX	82 |
| 161 | 122 | ||
| 162 | /* SH-SCI */ | 123 | /* SH-SCI */ |
| ... | @@ -164,9 +125,6 @@ | ... | @@ -164,9 +125,6 @@ |
| 164 | 125 | ||
| 165 | #define PORT_S3C6400	84 | 126 | #define PORT_S3C6400	84 |
| 166 | 127 | ||
| 167 | /* NWPSERIAL, now removed */ | ||
| 168 | #define PORT_NWPSERIAL	85 | ||
| 169 | |||
| 170 | /* MAX3100 */ | 128 | /* MAX3100 */ |
| 171 | #define PORT_MAX3100 86 | 129 | #define PORT_MAX3100 86 |
| 172 | 130 | ||
| ... | @@ -225,13 +183,10 @@ | ... | @@ -225,13 +183,10 @@ |
| 225 | /* ST ASC type numbers */ | 183 | /* ST ASC type numbers */ |
| 226 | #define PORT_ASC 105 | 184 | #define PORT_ASC 105 |
| 227 | 185 | ||
| 228 | /* Tilera TILE-Gx UART */ | ||
| 229 | #define PORT_TILEGX	106 | ||
| 230 | |||
| 231 | /* MEN 16z135 UART */ | 186 | /* MEN 16z135 UART */ |
| 232 | #define PORT_MEN_Z135	107 | 187 | #define PORT_MEN_Z135	107 |
| 233 | 188 | ||
| 234 | /* SC16IS74xx */ | 189 | /* SC16IS7xx */ |
| 235 | #define PORT_SC16IS7XX 108 | 190 | #define PORT_SC16IS7XX 108 |
| 236 | 191 | ||
| 237 | /* MESON */ | 192 | /* MESON */ |
| ... | @@ -243,9 +198,6 @@ | ... | @@ -243,9 +198,6 @@ |
| 243 | /* SPRD SERIAL */ | 198 | /* SPRD SERIAL */ |
| 244 | #define PORT_SPRD	111 | 199 | #define PORT_SPRD	111 |
| 245 | 200 | ||
| 246 | /* Cris v10 / v32 SoC */ | ||
| 247 | #define PORT_CRIS	112 | ||
| 248 | |||
| 249 | /* STM32 USART */ | 201 | /* STM32 USART */ |
| 250 | #define PORT_STM32	113 | 202 | #define PORT_STM32	113 |
| 251 | 203 | ||
| ... | @@ -279,4 +231,7 @@ | ... | @@ -279,4 +231,7 @@ |
| 279 | /* Sunplus UART */ | 231 | /* Sunplus UART */ |
| 280 | #define PORT_SUNPLUS	123 | 232 | #define PORT_SUNPLUS	123 |
| 281 | 233 | ||
| 234 | /* Generic type identifier for ports which type is not important to userspace. */ | ||
| 235 | #define PORT_GENERIC	(-1) | ||
| 236 | |||
| 282 | #endif /* LINUX_SERIAL_CORE_H */ | 237 | #endif /* LINUX_SERIAL_CORE_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/serial_reg.h+1| ... | @@ -49,6 +49,7 @@ | ... | @@ -49,6 +49,7 @@ |
| 49 | #define UART_IIR_FIFO_ENABLED_8250	0x00	/* 8250: no FIFO */ | 49 | #define UART_IIR_FIFO_ENABLED_8250	0x00	/* 8250: no FIFO */ |
| 50 | #define UART_IIR_FIFO_ENABLED_16550	0x80	/* 16550: (broken/unusable) FIFO */ | 50 | #define UART_IIR_FIFO_ENABLED_16550	0x80	/* 16550: (broken/unusable) FIFO */ |
| 51 | #define UART_IIR_FIFO_ENABLED_16550A	0xc0	/* 16550A: FIFO enabled */ | 51 | #define UART_IIR_FIFO_ENABLED_16550A	0xc0	/* 16550A: FIFO enabled */ |
| 52 | #define UART_IIR_FIFO_ENABLED_16750	0xe0	/* 16750: 64 bytes FIFO enabled */ | ||
| 52 | 53 | ||
| 53 | #define UART_FCR	2	/* Out: FIFO Control Register */ | 54 | #define UART_FCR	2	/* Out: FIFO Control Register */ |
| 54 | #define UART_FCR_ENABLE_FIFO	0x01 /* Enable the FIFO */ | 55 | #define UART_FCR_ENABLE_FIFO	0x01 /* Enable the FIFO */ |
lib/libc/include/any-linux-any/linux/sev-guest.h+19-3| ... | @@ -14,9 +14,11 @@ | ... | @@ -14,9 +14,11 @@ |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | 16 | ||
| 17 | #define SNP_REPORT_USER_DATA_SIZE 64 | ||
| 18 | |||
| 17 | struct snp_report_req { | 19 | struct snp_report_req { |
| 18 | 	/* user data that should be included in the report */ | 20 | 	/* user data that should be included in the report */ |
| 19 | 	__u8 user_data[64]; | 21 | 	__u8 user_data[SNP_REPORT_USER_DATA_SIZE]; |
| 20 | 22 | ||
| 21 | 	/* The vmpl level to be included in the report */ | 23 | 	/* The vmpl level to be included in the report */ |
| 22 | 	__u32 vmpl; | 24 | 	__u32 vmpl; |
| ... | @@ -52,8 +54,14 @@ struct snp_guest_request_ioctl { | ... | @@ -52,8 +54,14 @@ struct snp_guest_request_ioctl { |
| 52 | 	__u64 req_data; | 54 | 	__u64 req_data; |
| 53 | 	__u64 resp_data; | 55 | 	__u64 resp_data; |
| 54 | 56 | ||
| 55 | 	/* firmware error code on failure (see psp-sev.h) */ | 57 | 	/* bits[63:32]: VMM error code, bits[31:0] firmware error code (see psp-sev.h) */ |
| 56 | 	__u64 fw_err; | 58 | 	union { |
| 59 | 		__u64 exitinfo2; | ||
| 60 | 		struct { | ||
| 61 | 			__u32 fw_error; | ||
| 62 | 			__u32 vmm_error; | ||
| 63 | 		}; | ||
| 64 | 	}; | ||
| 57 | }; | 65 | }; |
| 58 | 66 | ||
| 59 | struct snp_ext_report_req { | 67 | struct snp_ext_report_req { |
| ... | @@ -77,4 +85,12 @@ struct snp_ext_report_req { | ... | @@ -77,4 +85,12 @@ struct snp_ext_report_req { |
| 77 | /* Get SNP extended report as defined in the GHCB specification version 2. */ | 85 | /* Get SNP extended report as defined in the GHCB specification version 2. */ |
| 78 | #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) | 86 | #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) |
| 79 | 87 | ||
| 88 | /* Guest message request EXIT_INFO_2 constants */ | ||
| 89 | #define SNP_GUEST_FW_ERR_MASK		GENMASK_ULL(31, 0) | ||
| 90 | #define SNP_GUEST_VMM_ERR_SHIFT		32 | ||
| 91 | #define SNP_GUEST_VMM_ERR(x)		(((u64)x) << SNP_GUEST_VMM_ERR_SHIFT) | ||
| 92 | |||
| 93 | #define SNP_GUEST_VMM_ERR_INVALID_LEN	1 | ||
| 94 | #define SNP_GUEST_VMM_ERR_BUSY		2 | ||
| 95 | |||
| 80 | #endif /* __UAPI_LINUX_SEV_GUEST_H_ */ | 96 | #endif /* __UAPI_LINUX_SEV_GUEST_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/smc.h+4| ... | @@ -107,6 +107,8 @@ enum { | ... | @@ -107,6 +107,8 @@ enum { |
| 107 | enum { | 107 | enum { |
| 108 | 	SMC_NLA_LGR_R_V2_UNSPEC, | 108 | 	SMC_NLA_LGR_R_V2_UNSPEC, |
| 109 | 	SMC_NLA_LGR_R_V2_DIRECT,	/* u8 */ | 109 | 	SMC_NLA_LGR_R_V2_DIRECT,	/* u8 */ |
| 110 | 	SMC_NLA_LGR_R_V2_MAX_CONNS,	/* u8 */ | ||
| 111 | 	SMC_NLA_LGR_R_V2_MAX_LINKS,	/* u8 */ | ||
| 110 | 	__SMC_NLA_LGR_R_V2_MAX, | 112 | 	__SMC_NLA_LGR_R_V2_MAX, |
| 111 | 	SMC_NLA_LGR_R_V2_MAX = __SMC_NLA_LGR_R_V2_MAX - 1 | 113 | 	SMC_NLA_LGR_R_V2_MAX = __SMC_NLA_LGR_R_V2_MAX - 1 |
| 112 | }; | 114 | }; |
| ... | @@ -158,6 +160,8 @@ enum { | ... | @@ -158,6 +160,8 @@ enum { |
| 158 | 	SMC_NLA_LGR_D_CHID,		/* u16 */ | 160 | 	SMC_NLA_LGR_D_CHID,		/* u16 */ |
| 159 | 	SMC_NLA_LGR_D_PAD,		/* flag */ | 161 | 	SMC_NLA_LGR_D_PAD,		/* flag */ |
| 160 | 	SMC_NLA_LGR_D_V2_COMMON,	/* nest */ | 162 | 	SMC_NLA_LGR_D_V2_COMMON,	/* nest */ |
| 163 | 	SMC_NLA_LGR_D_EXT_GID,		/* u64 */ | ||
| 164 | 	SMC_NLA_LGR_D_PEER_EXT_GID,	/* u64 */ | ||
| 161 | 	__SMC_NLA_LGR_D_MAX, | 165 | 	__SMC_NLA_LGR_D_MAX, |
| 162 | 	SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1 | 166 | 	SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1 |
| 163 | }; | 167 | }; |
lib/libc/include/any-linux-any/linux/smc_diag.h+2| ... | @@ -107,6 +107,8 @@ struct smcd_diag_dmbinfo {		/* SMC-D Socket internals */ | ... | @@ -107,6 +107,8 @@ struct smcd_diag_dmbinfo {		/* SMC-D Socket internals */ |
| 107 | 	__aligned_u64	my_gid;		/* My GID */ | 107 | 	__aligned_u64	my_gid;		/* My GID */ |
| 108 | 	__aligned_u64	token;		/* Token of DMB */ | 108 | 	__aligned_u64	token;		/* Token of DMB */ |
| 109 | 	__aligned_u64	peer_token;	/* Token of remote DMBE */ | 109 | 	__aligned_u64	peer_token;	/* Token of remote DMBE */ |
| 110 | 	__aligned_u64	peer_gid_ext;	/* Peer GID (extended part) */ | ||
| 111 | 	__aligned_u64	my_gid_ext;	/* My GID (extended part) */ | ||
| 110 | }; | 112 | }; |
| 111 | 113 | ||
| 112 | #endif /* _SMC_DIAG_H_ */ | 114 | #endif /* _SMC_DIAG_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/snmp.h+9-1| ... | @@ -24,7 +24,7 @@ enum | ... | @@ -24,7 +24,7 @@ enum |
| 24 | 	IPSTATS_MIB_INOCTETS,			/* InOctets */ | 24 | 	IPSTATS_MIB_INOCTETS,			/* InOctets */ |
| 25 | 	IPSTATS_MIB_INDELIVERS,			/* InDelivers */ | 25 | 	IPSTATS_MIB_INDELIVERS,			/* InDelivers */ |
| 26 | 	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */ | 26 | 	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */ |
| 27 | 	IPSTATS_MIB_OUTPKTS,			/* OutRequests */ | 27 | 	IPSTATS_MIB_OUTREQUESTS,		/* OutRequests */ |
| 28 | 	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */ | 28 | 	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */ |
| 29 | /* other fields */ | 29 | /* other fields */ |
| 30 | 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */ | 30 | 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */ |
| ... | @@ -57,6 +57,7 @@ enum | ... | @@ -57,6 +57,7 @@ enum |
| 57 | 	IPSTATS_MIB_ECT0PKTS,			/* InECT0Pkts */ | 57 | 	IPSTATS_MIB_ECT0PKTS,			/* InECT0Pkts */ |
| 58 | 	IPSTATS_MIB_CEPKTS,			/* InCEPkts */ | 58 | 	IPSTATS_MIB_CEPKTS,			/* InCEPkts */ |
| 59 | 	IPSTATS_MIB_REASM_OVERLAPS,		/* ReasmOverlaps */ | 59 | 	IPSTATS_MIB_REASM_OVERLAPS,		/* ReasmOverlaps */ |
| 60 | 	IPSTATS_MIB_OUTPKTS,			/* OutTransmits */ | ||
| 60 | 	__IPSTATS_MIB_MAX | 61 | 	__IPSTATS_MIB_MAX |
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| ... | @@ -296,6 +297,11 @@ enum | ... | @@ -296,6 +297,11 @@ enum |
| 296 | 	LINUX_MIB_TCPMIGRATEREQSUCCESS,		/* TCPMigrateReqSuccess */ | 297 | 	LINUX_MIB_TCPMIGRATEREQSUCCESS,		/* TCPMigrateReqSuccess */ |
| 297 | 	LINUX_MIB_TCPMIGRATEREQFAILURE,		/* TCPMigrateReqFailure */ | 298 | 	LINUX_MIB_TCPMIGRATEREQFAILURE,		/* TCPMigrateReqFailure */ |
| 298 | 	LINUX_MIB_TCPPLBREHASH,			/* TCPPLBRehash */ | 299 | 	LINUX_MIB_TCPPLBREHASH,			/* TCPPLBRehash */ |
| 300 | 	LINUX_MIB_TCPAOREQUIRED,		/* TCPAORequired */ | ||
| 301 | 	LINUX_MIB_TCPAOBAD,			/* TCPAOBad */ | ||
| 302 | 	LINUX_MIB_TCPAOKEYNOTFOUND,		/* TCPAOKeyNotFound */ | ||
| 303 | 	LINUX_MIB_TCPAOGOOD,			/* TCPAOGood */ | ||
| 304 | 	LINUX_MIB_TCPAODROPPEDICMPS,		/* TCPAODroppedIcmps */ | ||
| 299 | 	__LINUX_MIB_MAX | 305 | 	__LINUX_MIB_MAX |
| 300 | }; | 306 | }; |
| 301 | 307 | ||
| ... | @@ -331,6 +337,8 @@ enum | ... | @@ -331,6 +337,8 @@ enum |
| 331 | 	LINUX_MIB_XFRMFWDHDRERROR,		/* XfrmFwdHdrError*/ | 337 | 	LINUX_MIB_XFRMFWDHDRERROR,		/* XfrmFwdHdrError*/ |
| 332 | 	LINUX_MIB_XFRMOUTSTATEINVALID,		/* XfrmOutStateInvalid */ | 338 | 	LINUX_MIB_XFRMOUTSTATEINVALID,		/* XfrmOutStateInvalid */ |
| 333 | 	LINUX_MIB_XFRMACQUIREERROR,		/* XfrmAcquireError */ | 339 | 	LINUX_MIB_XFRMACQUIREERROR,		/* XfrmAcquireError */ |
| 340 | 	LINUX_MIB_XFRMOUTSTATEDIRERROR,		/* XfrmOutStateDirError */ | ||
| 341 | 	LINUX_MIB_XFRMINSTATEDIRERROR,		/* XfrmInStateDirError */ | ||
| 334 | 	__LINUX_MIB_XFRMMAX | 342 | 	__LINUX_MIB_XFRMMAX |
| 335 | }; | 343 | }; |
| 336 | 344 |
lib/libc/include/any-linux-any/linux/spi/spi.h+2-1| ... | @@ -28,6 +28,7 @@ | ... | @@ -28,6 +28,7 @@ |
| 28 | #define	SPI_RX_OCTAL		_BITUL(14)	/* receive with 8 wires */ | 28 | #define	SPI_RX_OCTAL		_BITUL(14)	/* receive with 8 wires */ |
| 29 | #define	SPI_3WIRE_HIZ		_BITUL(15)	/* high impedance turnaround */ | 29 | #define	SPI_3WIRE_HIZ		_BITUL(15)	/* high impedance turnaround */ |
| 30 | #define	SPI_RX_CPHA_FLIP	_BITUL(16)	/* flip CPHA on Rx only xfer */ | 30 | #define	SPI_RX_CPHA_FLIP	_BITUL(16)	/* flip CPHA on Rx only xfer */ |
| 31 | #define SPI_MOSI_IDLE_LOW	_BITUL(17)	/* leave mosi line low when idle */ | ||
| 31 | 32 | ||
| 32 | /* | 33 | /* |
| 33 | * All the bits defined above should be covered by SPI_MODE_USER_MASK. | 34 | * All the bits defined above should be covered by SPI_MODE_USER_MASK. |
| ... | @@ -37,6 +38,6 @@ | ... | @@ -37,6 +38,6 @@ |
| 37 | * These bits must not overlap. A static assert check should make sure of that. | 38 | * These bits must not overlap. A static assert check should make sure of that. |
| 38 | * If adding extra bits, make sure to increase the bit index below as well. | 39 | * If adding extra bits, make sure to increase the bit index below as well. |
| 39 | */ | 40 | */ |
| 40 | #define SPI_MODE_USER_MASK	(_BITUL(17) - 1) | 41 | #define SPI_MODE_USER_MASK	(_BITUL(18) - 1) |
| 41 | 42 | ||
| 42 | #endif /* _SPI_H */ | 43 | #endif /* _SPI_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/stat.h+4-1| ... | @@ -127,7 +127,8 @@ struct statx { | ... | @@ -127,7 +127,8 @@ struct statx { |
| 127 | 	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */ | 127 | 	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */ |
| 128 | 	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */ | 128 | 	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */ |
| 129 | 	/* 0xa0 */ | 129 | 	/* 0xa0 */ |
| 130 | 	__u64	__spare3[12];	/* Spare space for future expansion */ | 130 | 	__u64	stx_subvol;	/* Subvolume identifier */ |
| 131 | 	__u64	__spare3[11];	/* Spare space for future expansion */ | ||
| 131 | 	/* 0x100 */ | 132 | 	/* 0x100 */ |
| 132 | }; | 133 | }; |
| 133 | 134 | ||
| ... | @@ -154,6 +155,8 @@ struct statx { | ... | @@ -154,6 +155,8 @@ struct statx { |
| 154 | #define STATX_BTIME		0x00000800U	/* Want/got stx_btime */ | 155 | #define STATX_BTIME		0x00000800U	/* Want/got stx_btime */ |
| 155 | #define STATX_MNT_ID		0x00001000U	/* Got stx_mnt_id */ | 156 | #define STATX_MNT_ID		0x00001000U	/* Got stx_mnt_id */ |
| 156 | #define STATX_DIOALIGN		0x00002000U	/* Want/got direct I/O alignment info */ | 157 | #define STATX_DIOALIGN		0x00002000U	/* Want/got direct I/O alignment info */ |
| 158 | #define STATX_MNT_ID_UNIQUE	0x00004000U	/* Want/got extended stx_mount_id */ | ||
| 159 | #define STATX_SUBVOL		0x00008000U	/* Want/got stx_subvol */ | ||
| 157 | 160 | ||
| 158 | #define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */ | 161 | #define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */ |
| 159 | 162 |
lib/libc/include/any-linux-any/linux/stddef.h+21-2| ... | @@ -27,8 +27,13 @@ | ... | @@ -27,8 +27,13 @@ |
| 27 | 	union { \ | 27 | 	union { \ |
| 28 | 		struct { MEMBERS } ATTRS; \ | 28 | 		struct { MEMBERS } ATTRS; \ |
| 29 | 		struct TAG { MEMBERS } ATTRS NAME; \ | 29 | 		struct TAG { MEMBERS } ATTRS NAME; \ |
| 30 | 	} | 30 | 	} ATTRS |
| 31 | 31 | ||
| 32 | #ifdef __cplusplus | ||
| 33 | /* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */ | ||
| 34 | #define __DECLARE_FLEX_ARRAY(T, member)	\ | ||
| 35 | 	T member[0] | ||
| 36 | #else | ||
| 32 | /** | 37 | /** |
| 33 | * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union | 38 | * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union |
| 34 | * | 39 | * |
| ... | @@ -44,4 +49,18 @@ | ... | @@ -44,4 +49,18 @@ |
| 44 | 		struct { } __empty_ ## NAME; \ | 49 | 		struct { } __empty_ ## NAME; \ |
| 45 | 		TYPE NAME[]; \ | 50 | 		TYPE NAME[]; \ |
| 46 | 	} | 51 | 	} |
| 47 | #endif | ||
| \ No newline at end of file | |||
| 52 | #endif | ||
| 53 | |||
| 54 | #ifndef __counted_by | ||
| 55 | #define __counted_by(m) | ||
| 56 | #endif | ||
| 57 | |||
| 58 | #ifndef __counted_by_le | ||
| 59 | #define __counted_by_le(m) | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #ifndef __counted_by_be | ||
| 63 | #define __counted_by_be(m) | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #endif /* _LINUX_STDDEF_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/sync_file.h+38-23| ... | @@ -16,12 +16,16 @@ | ... | @@ -16,12 +16,16 @@ |
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | 17 | ||
| 18 | /** | 18 | /** |
| 19 | * struct sync_merge_data - data passed to merge ioctl | 19 | * struct sync_merge_data - SYNC_IOC_MERGE: merge two fences |
| 20 | * @name:	name of new fence | 20 | * @name:	name of new fence |
| 21 | * @fd2:	file descriptor of second fence | 21 | * @fd2:	file descriptor of second fence |
| 22 | * @fence:	returns the fd of the new fence to userspace | 22 | * @fence:	returns the fd of the new fence to userspace |
| 23 | * @flags:	merge_data flags | 23 | * @flags:	merge_data flags |
| 24 | * @pad:	padding for 64-bit alignment, should always be zero | 24 | * @pad:	padding for 64-bit alignment, should always be zero |
| 25 | * | ||
| 26 | * Creates a new fence containing copies of the sync_pts in both | ||
| 27 | * the calling fd and sync_merge_data.fd2. Returns the new fence's | ||
| 28 | * fd in sync_merge_data.fence | ||
| 25 | */ | 29 | */ |
| 26 | struct sync_merge_data { | 30 | struct sync_merge_data { |
| 27 | 	char	name[32]; | 31 | 	char	name[32]; |
| ... | @@ -34,8 +38,8 @@ struct sync_merge_data { | ... | @@ -34,8 +38,8 @@ struct sync_merge_data { |
| 34 | /** | 38 | /** |
| 35 | * struct sync_fence_info - detailed fence information | 39 | * struct sync_fence_info - detailed fence information |
| 36 | * @obj_name:		name of parent sync_timeline | 40 | * @obj_name:		name of parent sync_timeline |
| 37 | * @driver_name:	name of driver implementing the parent | 41 | * @driver_name:	name of driver implementing the parent |
| 38 | * @status:		status of the fence 0:active 1:signaled <0:error | 42 | * @status:		status of the fence 0:active 1:signaled <0:error |
| 39 | * @flags:		fence_info flags | 43 | * @flags:		fence_info flags |
| 40 | * @timestamp_ns:	timestamp of status change in nanoseconds | 44 | * @timestamp_ns:	timestamp of status change in nanoseconds |
| 41 | */ | 45 | */ |
| ... | @@ -48,14 +52,19 @@ struct sync_fence_info { | ... | @@ -48,14 +52,19 @@ struct sync_fence_info { |
| 48 | }; | 52 | }; |
| 49 | 53 | ||
| 50 | /** | 54 | /** |
| 51 | * struct sync_file_info - data returned from fence info ioctl | 55 | * struct sync_file_info - SYNC_IOC_FILE_INFO: get detailed information on a sync_file |
| 52 | * @name:	name of fence | 56 | * @name:	name of fence |
| 53 | * @status:	status of fence. 1: signaled 0:active <0:error | 57 | * @status:	status of fence. 1: signaled 0:active <0:error |
| 54 | * @flags:	sync_file_info flags | 58 | * @flags:	sync_file_info flags |
| 55 | * @num_fences	number of fences in the sync_file | 59 | * @num_fences:	number of fences in the sync_file |
| 56 | * @pad:	padding for 64-bit alignment, should always be zero | 60 | * @pad:	padding for 64-bit alignment, should always be zero |
| 57 | * @sync_fence_info: pointer to array of structs sync_fence_info with all | 61 | * @sync_fence_info: pointer to array of struct &sync_fence_info with all |
| 58 | *		 fences in the sync_file | 62 | *		 fences in the sync_file |
| 63 | * | ||
| 64 | * Takes a struct sync_file_info. If num_fences is 0, the field is updated | ||
| 65 | * with the actual number of fences. If num_fences is > 0, the system will | ||
| 66 | * use the pointer provided on sync_fence_info to return up to num_fences of | ||
| 67 | * struct sync_fence_info, with detailed fence information. | ||
| 59 | */ | 68 | */ |
| 60 | struct sync_file_info { | 69 | struct sync_file_info { |
| 61 | 	char	name[32]; | 70 | 	char	name[32]; |
| ... | @@ -67,32 +76,38 @@ struct sync_file_info { | ... | @@ -67,32 +76,38 @@ struct sync_file_info { |
| 67 | 	__u64	sync_fence_info; | 76 | 	__u64	sync_fence_info; |
| 68 | }; | 77 | }; |
| 69 | 78 | ||
| 79 | /** | ||
| 80 | * struct sync_set_deadline - SYNC_IOC_SET_DEADLINE - set a deadline hint on a fence | ||
| 81 | * @deadline_ns: absolute time of the deadline | ||
| 82 | * @pad:	must be zero | ||
| 83 | * | ||
| 84 | * Allows userspace to set a deadline on a fence, see &dma_fence_set_deadline | ||
| 85 | * | ||
| 86 | * The timebase for the deadline is CLOCK_MONOTONIC (same as vblank). For | ||
| 87 | * example | ||
| 88 | * | ||
| 89 | * clock_gettime(CLOCK_MONOTONIC, &t); | ||
| 90 | * deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline | ||
| 91 | */ | ||
| 92 | struct sync_set_deadline { | ||
| 93 | 	__u64	deadline_ns; | ||
| 94 | 	/* Not strictly needed for alignment but gives some possibility | ||
| 95 | 	 * for future extension: | ||
| 96 | 	 */ | ||
| 97 | 	__u64	pad; | ||
| 98 | }; | ||
| 99 | |||
| 70 | #define SYNC_IOC_MAGIC		'>' | 100 | #define SYNC_IOC_MAGIC		'>' |
| 71 | 101 | ||
| 72 | /** | 102 | /* |
| 73 | * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the | 103 | * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the |
| 74 | * old API to get weird errors when trying to handling sync_files. The API | 104 | * old API to get weird errors when trying to handling sync_files. The API |
| 75 | * change happened during the de-stage of the Sync Framework when there was | 105 | * change happened during the de-stage of the Sync Framework when there was |
| 76 | * no upstream users available. | 106 | * no upstream users available. |
| 77 | */ | 107 | */ |
| 78 | 108 | ||
| 79 | /** | ||
| 80 | * DOC: SYNC_IOC_MERGE - merge two fences | ||
| 81 | * | ||
| 82 | * Takes a struct sync_merge_data. Creates a new fence containing copies of | ||
| 83 | * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the | ||
| 84 | * new fence's fd in sync_merge_data.fence | ||
| 85 | */ | ||
| 86 | #define SYNC_IOC_MERGE		_IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) | 109 | #define SYNC_IOC_MERGE		_IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) |
| 87 | |||
| 88 | /** | ||
| 89 | * DOC: SYNC_IOC_FILE_INFO - get detailed information on a sync_file | ||
| 90 | * | ||
| 91 | * Takes a struct sync_file_info. If num_fences is 0, the field is updated | ||
| 92 | * with the actual number of fences. If num_fences is > 0, the system will | ||
| 93 | * use the pointer provided on sync_fence_info to return up to num_fences of | ||
| 94 | * struct sync_fence_info, with detailed fence information. | ||
| 95 | */ | ||
| 96 | #define SYNC_IOC_FILE_INFO	_IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) | 110 | #define SYNC_IOC_FILE_INFO	_IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) |
| 111 | #define SYNC_IOC_SET_DEADLINE	_IOW(SYNC_IOC_MAGIC, 5, struct sync_set_deadline) | ||
| 97 | 112 | ||
| 98 | #endif /* _LINUX_SYNC_H */ | 113 | #endif /* _LINUX_SYNC_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/target_core_user.h+1-1| ... | @@ -119,7 +119,7 @@ struct tcmu_cmd_entry { | ... | @@ -119,7 +119,7 @@ struct tcmu_cmd_entry { |
| 119 | 			__u64 cdb_off; | 119 | 			__u64 cdb_off; |
| 120 | 			__u64 __pad1; | 120 | 			__u64 __pad1; |
| 121 | 			__u64 __pad2; | 121 | 			__u64 __pad2; |
| 122 | 			struct iovec iov[0]; | 122 | 			__DECLARE_FLEX_ARRAY(struct iovec, iov); |
| 123 | 		} req; | 123 | 		} req; |
| 124 | 		struct { | 124 | 		struct { |
| 125 | 			__u8 scsi_status; | 125 | 			__u8 scsi_status; |
lib/libc/include/any-linux-any/linux/taskstats.h+5-1| ... | @@ -34,7 +34,7 @@ | ... | @@ -34,7 +34,7 @@ |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | #define TASKSTATS_VERSION	13 | 37 | #define TASKSTATS_VERSION	14 |
| 38 | #define TS_COMM_LEN		32	/* should be >= TASK_COMM_LEN | 38 | #define TS_COMM_LEN		32	/* should be >= TASK_COMM_LEN |
| 39 | 					 * in linux/sched.h */ | 39 | 					 * in linux/sched.h */ |
| 40 | 40 | ||
| ... | @@ -198,6 +198,10 @@ struct taskstats { | ... | @@ -198,6 +198,10 @@ struct taskstats { |
| 198 | 	/* v13: Delay waiting for write-protect copy */ | 198 | 	/* v13: Delay waiting for write-protect copy */ |
| 199 | 	__u64 wpcopy_count; | 199 | 	__u64 wpcopy_count; |
| 200 | 	__u64 wpcopy_delay_total; | 200 | 	__u64 wpcopy_delay_total; |
| 201 | |||
| 202 | 	/* v14: Delay waiting for IRQ/SOFTIRQ */ | ||
| 203 | 	__u64 irq_count; | ||
| 204 | 	__u64 irq_delay_total; | ||
| 201 | }; | 205 | }; |
| 202 | 206 | ||
| 203 | 207 |
lib/libc/include/any-linux-any/linux/tc_act/tc_ipt.h deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef __LINUX_TC_IPT_H | ||
| 3 | #define __LINUX_TC_IPT_H | ||
| 4 | |||
| 5 | #include <linux/pkt_cls.h> | ||
| 6 | |||
| 7 | enum { | ||
| 8 | 	TCA_IPT_UNSPEC, | ||
| 9 | 	TCA_IPT_TABLE, | ||
| 10 | 	TCA_IPT_HOOK, | ||
| 11 | 	TCA_IPT_INDEX, | ||
| 12 | 	TCA_IPT_CNT, | ||
| 13 | 	TCA_IPT_TM, | ||
| 14 | 	TCA_IPT_TARG, | ||
| 15 | 	TCA_IPT_PAD, | ||
| 16 | 	__TCA_IPT_MAX | ||
| 17 | }; | ||
| 18 | #define TCA_IPT_MAX (__TCA_IPT_MAX - 1) | ||
| 19 | |||
| 20 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/tc_act/tc_mirred.h+1| ... | @@ -21,6 +21,7 @@ enum { | ... | @@ -21,6 +21,7 @@ enum { |
| 21 | 	TCA_MIRRED_TM, | 21 | 	TCA_MIRRED_TM, |
| 22 | 	TCA_MIRRED_PARMS, | 22 | 	TCA_MIRRED_PARMS, |
| 23 | 	TCA_MIRRED_PAD, | 23 | 	TCA_MIRRED_PAD, |
| 24 | 	TCA_MIRRED_BLOCKID, | ||
| 24 | 	__TCA_MIRRED_MAX | 25 | 	__TCA_MIRRED_MAX |
| 25 | }; | 26 | }; |
| 26 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) | 27 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) |
lib/libc/include/any-linux-any/linux/tc_act/tc_pedit.h+1-1| ... | @@ -62,7 +62,7 @@ struct tc_pedit_sel { | ... | @@ -62,7 +62,7 @@ struct tc_pedit_sel { |
| 62 | 	tc_gen; | 62 | 	tc_gen; |
| 63 | 	unsigned char nkeys; | 63 | 	unsigned char nkeys; |
| 64 | 	unsigned char flags; | 64 | 	unsigned char flags; |
| 65 | 	struct tc_pedit_key keys[0]; | 65 | 	struct tc_pedit_key keys[] __counted_by(nkeys); |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | #define tc_pedit tc_pedit_sel | 68 | #define tc_pedit tc_pedit_sel |
lib/libc/include/any-linux-any/linux/tc_act/tc_tunnel_key.h+1| ... | @@ -34,6 +34,7 @@ enum { | ... | @@ -34,6 +34,7 @@ enum { |
| 34 | 					 */ | 34 | 					 */ |
| 35 | 	TCA_TUNNEL_KEY_ENC_TOS,		/* u8 */ | 35 | 	TCA_TUNNEL_KEY_ENC_TOS,		/* u8 */ |
| 36 | 	TCA_TUNNEL_KEY_ENC_TTL,		/* u8 */ | 36 | 	TCA_TUNNEL_KEY_ENC_TTL,		/* u8 */ |
| 37 | 	TCA_TUNNEL_KEY_NO_FRAG,		/* flag */ | ||
| 37 | 	__TCA_TUNNEL_KEY_MAX, | 38 | 	__TCA_TUNNEL_KEY_MAX, |
| 38 | }; | 39 | }; |
| 39 | 40 |
lib/libc/include/any-linux-any/linux/tcp.h+120| ... | @@ -129,6 +129,13 @@ enum { | ... | @@ -129,6 +129,13 @@ enum { |
| 129 | 129 | ||
| 130 | #define TCP_TX_DELAY		37	/* delay outgoing packets by XX usec */ | 130 | #define TCP_TX_DELAY		37	/* delay outgoing packets by XX usec */ |
| 131 | 131 | ||
| 132 | #define TCP_AO_ADD_KEY		38	/* Add/Set MKT */ | ||
| 133 | #define TCP_AO_DEL_KEY		39	/* Delete MKT */ | ||
| 134 | #define TCP_AO_INFO		40	/* Set/list TCP-AO per-socket options */ | ||
| 135 | #define TCP_AO_GET_KEYS		41	/* List MKT(s) */ | ||
| 136 | #define TCP_AO_REPAIR		42	/* Get/Set SNEs and ISNs */ | ||
| 137 | |||
| 138 | #define TCP_IS_MPTCP		43	/* Is MPTCP being used? */ | ||
| 132 | 139 | ||
| 133 | #define TCP_REPAIR_ON		1 | 140 | #define TCP_REPAIR_ON		1 |
| 134 | #define TCP_REPAIR_OFF		0 | 141 | #define TCP_REPAIR_OFF		0 |
| ... | @@ -170,6 +177,7 @@ enum tcp_fastopen_client_fail { | ... | @@ -170,6 +177,7 @@ enum tcp_fastopen_client_fail { |
| 170 | #define TCPI_OPT_ECN		8 /* ECN was negociated at TCP session init */ | 177 | #define TCPI_OPT_ECN		8 /* ECN was negociated at TCP session init */ |
| 171 | #define TCPI_OPT_ECN_SEEN	16 /* we received at least one packet with ECT */ | 178 | #define TCPI_OPT_ECN_SEEN	16 /* we received at least one packet with ECT */ |
| 172 | #define TCPI_OPT_SYN_DATA	32 /* SYN-ACK acked data in SYN sent or rcvd */ | 179 | #define TCPI_OPT_SYN_DATA	32 /* SYN-ACK acked data in SYN sent or rcvd */ |
| 180 | #define TCPI_OPT_USEC_TS	64 /* usec timestamps */ | ||
| 173 | 181 | ||
| 174 | /* | 182 | /* |
| 175 | * Sender's congestion state indicating normal or abnormal situations | 183 | * Sender's congestion state indicating normal or abnormal situations |
| ... | @@ -289,6 +297,18 @@ struct tcp_info { | ... | @@ -289,6 +297,18 @@ struct tcp_info { |
| 289 | 				 */ | 297 | 				 */ |
| 290 | 298 | ||
| 291 | 	__u32 tcpi_rehash; /* PLB or timeout triggered rehash attempts */ | 299 | 	__u32 tcpi_rehash; /* PLB or timeout triggered rehash attempts */ |
| 300 | |||
| 301 | 	__u16	tcpi_total_rto;	/* Total number of RTO timeouts, including | ||
| 302 | 				 * SYN/SYN-ACK and recurring timeouts. | ||
| 303 | 				 */ | ||
| 304 | 	__u16	tcpi_total_rto_recoveries;	/* Total number of RTO | ||
| 305 | 						 * recoveries, including any | ||
| 306 | 						 * unfinished recovery. | ||
| 307 | 						 */ | ||
| 308 | 	__u32	tcpi_total_rto_time;	/* Total time spent in RTO recoveries | ||
| 309 | 					 * in milliseconds, including any | ||
| 310 | 					 * unfinished recovery. | ||
| 311 | 					 */ | ||
| 292 | }; | 312 | }; |
| 293 | 313 | ||
| 294 | /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */ | 314 | /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */ |
| ... | @@ -348,6 +368,106 @@ struct tcp_diag_md5sig { | ... | @@ -348,6 +368,106 @@ struct tcp_diag_md5sig { |
| 348 | 	__u8	tcpm_key[TCP_MD5SIG_MAXKEYLEN]; | 368 | 	__u8	tcpm_key[TCP_MD5SIG_MAXKEYLEN]; |
| 349 | }; | 369 | }; |
| 350 | 370 | ||
| 371 | #define TCP_AO_MAXKEYLEN	80 | ||
| 372 | |||
| 373 | #define TCP_AO_KEYF_IFINDEX	(1 << 0)	/* L3 ifindex for VRF */ | ||
| 374 | #define TCP_AO_KEYF_EXCLUDE_OPT	(1 << 1)	/* "Indicates whether TCP | ||
| 375 | 						 * options other than TCP-AO | ||
| 376 | 						 * are included in the MAC | ||
| 377 | 						 * calculation" | ||
| 378 | 						 */ | ||
| 379 | |||
| 380 | struct tcp_ao_add { /* setsockopt(TCP_AO_ADD_KEY) */ | ||
| 381 | 	struct __kernel_sockaddr_storage addr;	/* peer's address for the key */ | ||
| 382 | 	char	alg_name[64];		/* crypto hash algorithm to use */ | ||
| 383 | 	__s32	ifindex;		/* L3 dev index for VRF */ | ||
| 384 | 	__u32 set_current	:1,	/* set key as Current_key at once */ | ||
| 385 | 		set_rnext	:1,	/* request it from peer with RNext_key */ | ||
| 386 | 		reserved	:30;	/* must be 0 */ | ||
| 387 | 	__u16	reserved2;		/* padding, must be 0 */ | ||
| 388 | 	__u8	prefix;			/* peer's address prefix */ | ||
| 389 | 	__u8	sndid;			/* SendID for outgoing segments */ | ||
| 390 | 	__u8	rcvid;			/* RecvID to match for incoming seg */ | ||
| 391 | 	__u8	maclen;			/* length of authentication code (hash) */ | ||
| 392 | 	__u8	keyflags;		/* see TCP_AO_KEYF_ */ | ||
| 393 | 	__u8	keylen;			/* length of ::key */ | ||
| 394 | 	__u8	key[TCP_AO_MAXKEYLEN]; | ||
| 395 | } __attribute__((aligned(8))); | ||
| 396 | |||
| 397 | struct tcp_ao_del { /* setsockopt(TCP_AO_DEL_KEY) */ | ||
| 398 | 	struct __kernel_sockaddr_storage addr;	/* peer's address for the key */ | ||
| 399 | 	__s32	ifindex;		/* L3 dev index for VRF */ | ||
| 400 | 	__u32 set_current	:1,	/* corresponding ::current_key */ | ||
| 401 | 		set_rnext	:1,	/* corresponding ::rnext */ | ||
| 402 | 		del_async	:1,	/* only valid for listen sockets */ | ||
| 403 | 		reserved	:29;	/* must be 0 */ | ||
| 404 | 	__u16	reserved2;		/* padding, must be 0 */ | ||
| 405 | 	__u8	prefix;			/* peer's address prefix */ | ||
| 406 | 	__u8	sndid;			/* SendID for outgoing segments */ | ||
| 407 | 	__u8	rcvid;			/* RecvID to match for incoming seg */ | ||
| 408 | 	__u8	current_key;		/* KeyID to set as Current_key */ | ||
| 409 | 	__u8	rnext;			/* KeyID to set as Rnext_key */ | ||
| 410 | 	__u8	keyflags;		/* see TCP_AO_KEYF_ */ | ||
| 411 | } __attribute__((aligned(8))); | ||
| 412 | |||
| 413 | struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO), getsockopt(TCP_AO_INFO) */ | ||
| 414 | 	/* Here 'in' is for setsockopt(), 'out' is for getsockopt() */ | ||
| 415 | 	__u32 set_current	:1,	/* in/out: corresponding ::current_key */ | ||
| 416 | 		set_rnext	:1,	/* in/out: corresponding ::rnext */ | ||
| 417 | 		ao_required	:1,	/* in/out: don't accept non-AO connects */ | ||
| 418 | 		set_counters	:1,	/* in: set/clear ::pkt_* counters */ | ||
| 419 | 		accept_icmps	:1,	/* in/out: accept incoming ICMPs */ | ||
| 420 | 		reserved	:27;	/* must be 0 */ | ||
| 421 | 	__u16	reserved2;		/* padding, must be 0 */ | ||
| 422 | 	__u8	current_key;		/* in/out: KeyID of Current_key */ | ||
| 423 | 	__u8	rnext;			/* in/out: keyid of RNext_key */ | ||
| 424 | 	__u64	pkt_good;		/* in/out: verified segments */ | ||
| 425 | 	__u64	pkt_bad;		/* in/out: failed verification */ | ||
| 426 | 	__u64	pkt_key_not_found;	/* in/out: could not find a key to verify */ | ||
| 427 | 	__u64	pkt_ao_required;	/* in/out: segments missing TCP-AO sign */ | ||
| 428 | 	__u64	pkt_dropped_icmp;	/* in/out: ICMPs that were ignored */ | ||
| 429 | } __attribute__((aligned(8))); | ||
| 430 | |||
| 431 | struct tcp_ao_getsockopt { /* getsockopt(TCP_AO_GET_KEYS) */ | ||
| 432 | 	struct __kernel_sockaddr_storage addr;	/* in/out: dump keys for peer | ||
| 433 | 						 * with this address/prefix | ||
| 434 | 						 */ | ||
| 435 | 	char	alg_name[64];		/* out: crypto hash algorithm */ | ||
| 436 | 	__u8	key[TCP_AO_MAXKEYLEN]; | ||
| 437 | 	__u32	nkeys;			/* in: size of the userspace buffer | ||
| 438 | 					 * @optval, measured in @optlen - the | ||
| 439 | 					 * sizeof(struct tcp_ao_getsockopt) | ||
| 440 | 					 * out: number of keys that matched | ||
| 441 | 					 */ | ||
| 442 | 	__u16 is_current	:1,	/* in: match and dump Current_key, | ||
| 443 | 					 * out: the dumped key is Current_key | ||
| 444 | 					 */ | ||
| 445 | |||
| 446 | 		is_rnext	:1,	/* in: match and dump RNext_key, | ||
| 447 | 					 * out: the dumped key is RNext_key | ||
| 448 | 					 */ | ||
| 449 | 		get_all		:1,	/* in: dump all keys */ | ||
| 450 | 		reserved	:13;	/* padding, must be 0 */ | ||
| 451 | 	__u8	sndid;			/* in/out: dump keys with SendID */ | ||
| 452 | 	__u8	rcvid;			/* in/out: dump keys with RecvID */ | ||
| 453 | 	__u8	prefix;			/* in/out: dump keys with address/prefix */ | ||
| 454 | 	__u8	maclen;			/* out: key's length of authentication | ||
| 455 | 					 * code (hash) | ||
| 456 | 					 */ | ||
| 457 | 	__u8	keyflags;		/* in/out: see TCP_AO_KEYF_ */ | ||
| 458 | 	__u8	keylen;			/* out: length of ::key */ | ||
| 459 | 	__s32	ifindex;		/* in/out: L3 dev index for VRF */ | ||
| 460 | 	__u64	pkt_good;		/* out: verified segments */ | ||
| 461 | 	__u64	pkt_bad;		/* out: segments that failed verification */ | ||
| 462 | } __attribute__((aligned(8))); | ||
| 463 | |||
| 464 | struct tcp_ao_repair { /* {s,g}etsockopt(TCP_AO_REPAIR) */ | ||
| 465 | 	__be32			snt_isn; | ||
| 466 | 	__be32			rcv_isn; | ||
| 467 | 	__u32			snd_sne; | ||
| 468 | 	__u32			rcv_sne; | ||
| 469 | } __attribute__((aligned(8))); | ||
| 470 | |||
| 351 | /* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */ | 471 | /* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */ |
| 352 | 472 | ||
| 353 | #define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1 | 473 | #define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1 |
lib/libc/include/any-linux-any/linux/tee.h+1| ... | @@ -56,6 +56,7 @@ | ... | @@ -56,6 +56,7 @@ |
| 56 | */ | 56 | */ |
| 57 | #define TEE_IMPL_ID_OPTEE	1 | 57 | #define TEE_IMPL_ID_OPTEE	1 |
| 58 | #define TEE_IMPL_ID_AMDTEE	2 | 58 | #define TEE_IMPL_ID_AMDTEE	2 |
| 59 | #define TEE_IMPL_ID_TSTEE	3 | ||
| 59 | 60 | ||
| 60 | /* | 61 | /* |
| 61 | * OP-TEE specific capabilities | 62 | * OP-TEE specific capabilities |
lib/libc/include/any-linux-any/linux/thp7312.h created+19| ... | @@ -0,0 +1,19 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * THine THP7312 user space header file. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2021 THine Electronics, Inc. | ||
| 6 | * Copyright (C) 2023 Ideas on Board Oy | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __UAPI_THP7312_H_ | ||
| 10 | #define __UAPI_THP7312_H_ | ||
| 11 | |||
| 12 | #include <linux/v4l2-controls.h> | ||
| 13 | |||
| 14 | #define V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION		(V4L2_CID_USER_THP7312_BASE + 0x01) | ||
| 15 | #define V4L2_CID_THP7312_AUTO_FOCUS_METHOD		(V4L2_CID_USER_THP7312_BASE + 0x02) | ||
| 16 | #define V4L2_CID_THP7312_NOISE_REDUCTION_AUTO		(V4L2_CID_USER_THP7312_BASE + 0x03) | ||
| 17 | #define V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE	(V4L2_CID_USER_THP7312_BASE + 0x04) | ||
| 18 | |||
| 19 | #endif /* __UAPI_THP7312_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/tps6594_pfsm.h created+37| ... | @@ -0,0 +1,37 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Userspace ABI for TPS6594 PMIC Pre-configurable Finite State Machine | ||
| 4 | * | ||
| 5 | * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/ | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __TPS6594_PFSM_H | ||
| 9 | #define __TPS6594_PFSM_H | ||
| 10 | |||
| 11 | #include <linux/const.h> | ||
| 12 | #include <linux/ioctl.h> | ||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 15 | /** | ||
| 16 | * struct pmic_state_opt - PMIC state options | ||
| 17 | * @gpio_retention: if enabled, power rails associated with GPIO retention remain active | ||
| 18 | * @ddr_retention: if enabled, power rails associated with DDR retention remain active | ||
| 19 | * @mcu_only_startup_dest: if enabled, startup destination state is MCU_ONLY | ||
| 20 | */ | ||
| 21 | struct pmic_state_opt { | ||
| 22 | 	__u8 gpio_retention; | ||
| 23 | 	__u8 ddr_retention; | ||
| 24 | 	__u8 mcu_only_startup_dest; | ||
| 25 | }; | ||
| 26 | |||
| 27 | /* Commands */ | ||
| 28 | #define PMIC_BASE			'P' | ||
| 29 | |||
| 30 | #define PMIC_GOTO_STANDBY		_IO(PMIC_BASE, 0) | ||
| 31 | #define PMIC_GOTO_LP_STANDBY		_IO(PMIC_BASE, 1) | ||
| 32 | #define PMIC_UPDATE_PGM			_IO(PMIC_BASE, 2) | ||
| 33 | #define PMIC_SET_ACTIVE_STATE		_IO(PMIC_BASE, 3) | ||
| 34 | #define PMIC_SET_MCU_ONLY_STATE		_IOW(PMIC_BASE, 4, struct pmic_state_opt) | ||
| 35 | #define PMIC_SET_RETENTION_STATE	_IOW(PMIC_BASE, 5, struct pmic_state_opt) | ||
| 36 | |||
| 37 | #endif /* __TPS6594_PFSM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/trace_mmap.h created+48| ... | @@ -0,0 +1,48 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _TRACE_MMAP_H_ | ||
| 3 | #define _TRACE_MMAP_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * struct trace_buffer_meta - Ring-buffer Meta-page description | ||
| 9 | * @meta_page_size:	Size of this meta-page. | ||
| 10 | * @meta_struct_len:	Size of this structure. | ||
| 11 | * @subbuf_size:	Size of each sub-buffer. | ||
| 12 | * @nr_subbufs:		Number of subbfs in the ring-buffer, including the reader. | ||
| 13 | * @reader.lost_events:	Number of events lost at the time of the reader swap. | ||
| 14 | * @reader.id:		subbuf ID of the current reader. ID range [0 : @nr_subbufs - 1] | ||
| 15 | * @reader.read:	Number of bytes read on the reader subbuf. | ||
| 16 | * @flags:		Placeholder for now, 0 until new features are supported. | ||
| 17 | * @entries:		Number of entries in the ring-buffer. | ||
| 18 | * @overrun:		Number of entries lost in the ring-buffer. | ||
| 19 | * @read:		Number of entries that have been read. | ||
| 20 | * @Reserved1:		Internal use only. | ||
| 21 | * @Reserved2:		Internal use only. | ||
| 22 | */ | ||
| 23 | struct trace_buffer_meta { | ||
| 24 | 	__u32		meta_page_size; | ||
| 25 | 	__u32		meta_struct_len; | ||
| 26 | |||
| 27 | 	__u32		subbuf_size; | ||
| 28 | 	__u32		nr_subbufs; | ||
| 29 | |||
| 30 | 	struct { | ||
| 31 | 		__u64	lost_events; | ||
| 32 | 		__u32	id; | ||
| 33 | 		__u32	read; | ||
| 34 | 	} reader; | ||
| 35 | |||
| 36 | 	__u64	flags; | ||
| 37 | |||
| 38 | 	__u64	entries; | ||
| 39 | 	__u64	overrun; | ||
| 40 | 	__u64	read; | ||
| 41 | |||
| 42 | 	__u64	Reserved1; | ||
| 43 | 	__u64	Reserved2; | ||
| 44 | }; | ||
| 45 | |||
| 46 | #define TRACE_MMAP_IOCTL_GET_READER		_IO('R', 0x20) | ||
| 47 | |||
| 48 | #endif /* _TRACE_MMAP_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/types.h+4| ... | @@ -8,6 +8,10 @@ | ... | @@ -8,6 +8,10 @@ |
| 8 | 8 | ||
| 9 | #include <linux/posix_types.h> | 9 | #include <linux/posix_types.h> |
| 10 | 10 | ||
| 11 | #ifdef __SIZEOF_INT128__ | ||
| 12 | typedef __signed__ __int128 __s128 __attribute__((aligned(16))); | ||
| 13 | typedef unsigned __int128 __u128 __attribute__((aligned(16))); | ||
| 14 | #endif | ||
| 11 | 15 | ||
| 12 | /* | 16 | /* |
| 13 | * Below are truly Linux-specific types that should never collide with | 17 | * Below are truly Linux-specific types that should never collide with |
lib/libc/include/any-linux-any/linux/ublk_cmd.h+132-10| ... | @@ -8,6 +8,9 @@ | ... | @@ -8,6 +8,9 @@ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| 10 | * Admin commands, issued by ublk server, and handled by ublk driver. | 10 | * Admin commands, issued by ublk server, and handled by ublk driver. |
| 11 | * | ||
| 12 | * Legacy command definition, don't use in new application, and don't | ||
| 13 | * add new such definition any more | ||
| 11 | */ | 14 | */ |
| 12 | #define	UBLK_CMD_GET_QUEUE_AFFINITY	0x01 | 15 | #define	UBLK_CMD_GET_QUEUE_AFFINITY	0x01 |
| 13 | #define	UBLK_CMD_GET_DEV_INFO	0x02 | 16 | #define	UBLK_CMD_GET_DEV_INFO	0x02 |
| ... | @@ -21,6 +24,40 @@ | ... | @@ -21,6 +24,40 @@ |
| 21 | #define	UBLK_CMD_END_USER_RECOVERY	0x11 | 24 | #define	UBLK_CMD_END_USER_RECOVERY	0x11 |
| 22 | #define	UBLK_CMD_GET_DEV_INFO2		0x12 | 25 | #define	UBLK_CMD_GET_DEV_INFO2		0x12 |
| 23 | 26 | ||
| 27 | /* Any new ctrl command should encode by __IO*() */ | ||
| 28 | #define UBLK_U_CMD_GET_QUEUE_AFFINITY	\ | ||
| 29 | 	_IOR('u', UBLK_CMD_GET_QUEUE_AFFINITY, struct ublksrv_ctrl_cmd) | ||
| 30 | #define UBLK_U_CMD_GET_DEV_INFO		\ | ||
| 31 | 	_IOR('u', UBLK_CMD_GET_DEV_INFO, struct ublksrv_ctrl_cmd) | ||
| 32 | #define UBLK_U_CMD_ADD_DEV		\ | ||
| 33 | 	_IOWR('u', UBLK_CMD_ADD_DEV, struct ublksrv_ctrl_cmd) | ||
| 34 | #define UBLK_U_CMD_DEL_DEV		\ | ||
| 35 | 	_IOWR('u', UBLK_CMD_DEL_DEV, struct ublksrv_ctrl_cmd) | ||
| 36 | #define UBLK_U_CMD_START_DEV		\ | ||
| 37 | 	_IOWR('u', UBLK_CMD_START_DEV, struct ublksrv_ctrl_cmd) | ||
| 38 | #define UBLK_U_CMD_STOP_DEV		\ | ||
| 39 | 	_IOWR('u', UBLK_CMD_STOP_DEV, struct ublksrv_ctrl_cmd) | ||
| 40 | #define UBLK_U_CMD_SET_PARAMS		\ | ||
| 41 | 	_IOWR('u', UBLK_CMD_SET_PARAMS, struct ublksrv_ctrl_cmd) | ||
| 42 | #define UBLK_U_CMD_GET_PARAMS		\ | ||
| 43 | 	_IOR('u', UBLK_CMD_GET_PARAMS, struct ublksrv_ctrl_cmd) | ||
| 44 | #define UBLK_U_CMD_START_USER_RECOVERY	\ | ||
| 45 | 	_IOWR('u', UBLK_CMD_START_USER_RECOVERY, struct ublksrv_ctrl_cmd) | ||
| 46 | #define UBLK_U_CMD_END_USER_RECOVERY	\ | ||
| 47 | 	_IOWR('u', UBLK_CMD_END_USER_RECOVERY, struct ublksrv_ctrl_cmd) | ||
| 48 | #define UBLK_U_CMD_GET_DEV_INFO2	\ | ||
| 49 | 	_IOR('u', UBLK_CMD_GET_DEV_INFO2, struct ublksrv_ctrl_cmd) | ||
| 50 | #define UBLK_U_CMD_GET_FEATURES	\ | ||
| 51 | 	_IOR('u', 0x13, struct ublksrv_ctrl_cmd) | ||
| 52 | #define UBLK_U_CMD_DEL_DEV_ASYNC	\ | ||
| 53 | 	_IOR('u', 0x14, struct ublksrv_ctrl_cmd) | ||
| 54 | |||
| 55 | /* | ||
| 56 | * 64bits are enough now, and it should be easy to extend in case of | ||
| 57 | * running out of feature flags | ||
| 58 | */ | ||
| 59 | #define UBLK_FEATURES_LEN 8 | ||
| 60 | |||
| 24 | /* | 61 | /* |
| 25 | * IO commands, issued by ublk server, and handled by ublk driver. | 62 | * IO commands, issued by ublk server, and handled by ublk driver. |
| 26 | * | 63 | * |
| ... | @@ -41,10 +78,23 @@ | ... | @@ -41,10 +78,23 @@ |
| 41 | * It is only used if ublksrv set UBLK_F_NEED_GET_DATA flag | 78 | * It is only used if ublksrv set UBLK_F_NEED_GET_DATA flag |
| 42 | * while starting a ublk device. | 79 | * while starting a ublk device. |
| 43 | */ | 80 | */ |
| 81 | |||
| 82 | /* | ||
| 83 | * Legacy IO command definition, don't use in new application, and don't | ||
| 84 | * add new such definition any more | ||
| 85 | */ | ||
| 44 | #define	UBLK_IO_FETCH_REQ		0x20 | 86 | #define	UBLK_IO_FETCH_REQ		0x20 |
| 45 | #define	UBLK_IO_COMMIT_AND_FETCH_REQ	0x21 | 87 | #define	UBLK_IO_COMMIT_AND_FETCH_REQ	0x21 |
| 46 | #define	UBLK_IO_NEED_GET_DATA	0x22 | 88 | #define	UBLK_IO_NEED_GET_DATA	0x22 |
| 47 | 89 | ||
| 90 | /* Any new IO command should encode by __IOWR() */ | ||
| 91 | #define	UBLK_U_IO_FETCH_REQ		\ | ||
| 92 | 	_IOWR('u', UBLK_IO_FETCH_REQ, struct ublksrv_io_cmd) | ||
| 93 | #define	UBLK_U_IO_COMMIT_AND_FETCH_REQ	\ | ||
| 94 | 	_IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd) | ||
| 95 | #define	UBLK_U_IO_NEED_GET_DATA		\ | ||
| 96 | 	_IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd) | ||
| 97 | |||
| 48 | /* only ABORT means that no re-fetch */ | 98 | /* only ABORT means that no re-fetch */ |
| 49 | #define UBLK_IO_RES_OK			0 | 99 | #define UBLK_IO_RES_OK			0 |
| 50 | #define UBLK_IO_RES_NEED_GET_DATA	1 | 100 | #define UBLK_IO_RES_NEED_GET_DATA	1 |
| ... | @@ -53,9 +103,29 @@ | ... | @@ -53,9 +103,29 @@ |
| 53 | #define UBLKSRV_CMD_BUF_OFFSET	0 | 103 | #define UBLKSRV_CMD_BUF_OFFSET	0 |
| 54 | #define UBLKSRV_IO_BUF_OFFSET	0x80000000 | 104 | #define UBLKSRV_IO_BUF_OFFSET	0x80000000 |
| 55 | 105 | ||
| 56 | /* tag bit is 12bit, so at most 4096 IOs for each queue */ | 106 | /* tag bit is 16bit, so far limit at most 4096 IOs for each queue */ |
| 57 | #define UBLK_MAX_QUEUE_DEPTH	4096 | 107 | #define UBLK_MAX_QUEUE_DEPTH	4096 |
| 58 | 108 | ||
| 109 | /* single IO buffer max size is 32MB */ | ||
| 110 | #define UBLK_IO_BUF_OFF		0 | ||
| 111 | #define UBLK_IO_BUF_BITS	25 | ||
| 112 | #define UBLK_IO_BUF_BITS_MASK	((1ULL << UBLK_IO_BUF_BITS) - 1) | ||
| 113 | |||
| 114 | /* so at most 64K IOs for each queue */ | ||
| 115 | #define UBLK_TAG_OFF		UBLK_IO_BUF_BITS | ||
| 116 | #define UBLK_TAG_BITS		16 | ||
| 117 | #define UBLK_TAG_BITS_MASK	((1ULL << UBLK_TAG_BITS) - 1) | ||
| 118 | |||
| 119 | /* max 4096 queues */ | ||
| 120 | #define UBLK_QID_OFF		(UBLK_TAG_OFF + UBLK_TAG_BITS) | ||
| 121 | #define UBLK_QID_BITS		12 | ||
| 122 | #define UBLK_QID_BITS_MASK	((1ULL << UBLK_QID_BITS) - 1) | ||
| 123 | |||
| 124 | #define UBLK_MAX_NR_QUEUES	(1U << UBLK_QID_BITS) | ||
| 125 | |||
| 126 | #define UBLKSRV_IO_BUF_TOTAL_BITS	(UBLK_QID_OFF + UBLK_QID_BITS) | ||
| 127 | #define UBLKSRV_IO_BUF_TOTAL_SIZE	(1ULL << UBLKSRV_IO_BUF_TOTAL_BITS) | ||
| 128 | |||
| 59 | /* | 129 | /* |
| 60 | * zero copy requires 4k block size, and can remap ublk driver's io | 130 | * zero copy requires 4k block size, and can remap ublk driver's io |
| 61 | * request into ublksrv's vm space | 131 | * request into ublksrv's vm space |
| ... | @@ -102,6 +172,18 @@ | ... | @@ -102,6 +172,18 @@ |
| 102 | */ | 172 | */ |
| 103 | #define UBLK_F_UNPRIVILEGED_DEV	(1UL << 5) | 173 | #define UBLK_F_UNPRIVILEGED_DEV	(1UL << 5) |
| 104 | 174 | ||
| 175 | /* use ioctl encoding for uring command */ | ||
| 176 | #define UBLK_F_CMD_IOCTL_ENCODE	(1UL << 6) | ||
| 177 | |||
| 178 | /* Copy between request and user buffer by pread()/pwrite() */ | ||
| 179 | #define UBLK_F_USER_COPY	(1UL << 7) | ||
| 180 | |||
| 181 | /* | ||
| 182 | * User space sets this flag when setting up the device to request zoned storage support. Kernel may | ||
| 183 | * deny the request by returning an error. | ||
| 184 | */ | ||
| 185 | #define UBLK_F_ZONED (1ULL << 8) | ||
| 186 | |||
| 105 | /* device state */ | 187 | /* device state */ |
| 106 | #define UBLK_S_DEV_DEAD	0 | 188 | #define UBLK_S_DEV_DEAD	0 |
| 107 | #define UBLK_S_DEV_LIVE	1 | 189 | #define UBLK_S_DEV_LIVE	1 |
| ... | @@ -158,9 +240,27 @@ struct ublksrv_ctrl_dev_info { | ... | @@ -158,9 +240,27 @@ struct ublksrv_ctrl_dev_info { |
| 158 | #define		UBLK_IO_OP_READ		0 | 240 | #define		UBLK_IO_OP_READ		0 |
| 159 | #define		UBLK_IO_OP_WRITE		1 | 241 | #define		UBLK_IO_OP_WRITE		1 |
| 160 | #define		UBLK_IO_OP_FLUSH		2 | 242 | #define		UBLK_IO_OP_FLUSH		2 |
| 161 | #define		UBLK_IO_OP_DISCARD	3 | 243 | #define		UBLK_IO_OP_DISCARD		3 |
| 162 | #define		UBLK_IO_OP_WRITE_SAME	4 | 244 | #define		UBLK_IO_OP_WRITE_SAME		4 |
| 163 | #define		UBLK_IO_OP_WRITE_ZEROES	5 | 245 | #define		UBLK_IO_OP_WRITE_ZEROES		5 |
| 246 | #define		UBLK_IO_OP_ZONE_OPEN		10 | ||
| 247 | #define		UBLK_IO_OP_ZONE_CLOSE		11 | ||
| 248 | #define		UBLK_IO_OP_ZONE_FINISH		12 | ||
| 249 | #define		UBLK_IO_OP_ZONE_APPEND		13 | ||
| 250 | #define		UBLK_IO_OP_ZONE_RESET_ALL	14 | ||
| 251 | #define		UBLK_IO_OP_ZONE_RESET		15 | ||
| 252 | /* | ||
| 253 | * Construct a zone report. The report request is carried in `struct | ||
| 254 | * ublksrv_io_desc`. The `start_sector` field must be the first sector of a zone | ||
| 255 | * and shall indicate the first zone of the report. The `nr_zones` shall | ||
| 256 | * indicate how many zones should be reported at most. The report shall be | ||
| 257 | * delivered as a `struct blk_zone` array. To report fewer zones than requested, | ||
| 258 | * zero the last entry of the returned array. | ||
| 259 | * | ||
| 260 | * Related definitions(blk_zone, blk_zone_cond, blk_zone_type, ...) in | ||
| 261 | * include/uapi/linux/blkzoned.h are part of ublk UAPI. | ||
| 262 | */ | ||
| 263 | #define		UBLK_IO_OP_REPORT_ZONES		18 | ||
| 164 | 264 | ||
| 165 | #define		UBLK_IO_F_FAILFAST_DEV		(1U << 8) | 265 | #define		UBLK_IO_F_FAILFAST_DEV		(1U << 8) |
| 166 | #define		UBLK_IO_F_FAILFAST_TRANSPORT	(1U << 9) | 266 | #define		UBLK_IO_F_FAILFAST_TRANSPORT	(1U << 9) |
| ... | @@ -181,7 +281,10 @@ struct ublksrv_io_desc { | ... | @@ -181,7 +281,10 @@ struct ublksrv_io_desc { |
| 181 | 	/* op: bit 0-7, flags: bit 8-31 */ | 281 | 	/* op: bit 0-7, flags: bit 8-31 */ |
| 182 | 	__u32		op_flags; | 282 | 	__u32		op_flags; |
| 183 | 283 | ||
| 184 | 	__u32		nr_sectors; | 284 | 	union { |
| 285 | 		__u32		nr_sectors; | ||
| 286 | 		__u32		nr_zones; /* for UBLK_IO_OP_REPORT_ZONES */ | ||
| 287 | 	}; | ||
| 185 | 288 | ||
| 186 | 	/* start sector for this io */ | 289 | 	/* start sector for this io */ |
| 187 | 	__u64		start_sector; | 290 | 	__u64		start_sector; |
| ... | @@ -210,11 +313,21 @@ struct ublksrv_io_cmd { | ... | @@ -210,11 +313,21 @@ struct ublksrv_io_cmd { |
| 210 | 	/* io result, it is valid for COMMIT* command only */ | 313 | 	/* io result, it is valid for COMMIT* command only */ |
| 211 | 	__s32	result; | 314 | 	__s32	result; |
| 212 | 315 | ||
| 213 | 	/* | 316 | 	union { |
| 214 | 	 * userspace buffer address in ublksrv daemon process, valid for | 317 | 		/* |
| 215 | 	 * FETCH* command only | 318 | 		 * userspace buffer address in ublksrv daemon process, valid for |
| 216 | 	 */ | 319 | 		 * FETCH* command only |
| 217 | 	__u64	addr; | 320 | 		 * |
| 321 | 		 * `addr` should not be used when UBLK_F_USER_COPY is enabled, | ||
| 322 | 		 * because userspace handles data copy by pread()/pwrite() over | ||
| 323 | 		 * /dev/ublkcN. But in case of UBLK_F_ZONED, this union is | ||
| 324 | 		 * re-used to pass back the allocated LBA for | ||
| 325 | 		 * UBLK_IO_OP_ZONE_APPEND which actually depends on | ||
| 326 | 		 * UBLK_F_USER_COPY | ||
| 327 | 		 */ | ||
| 328 | 		__u64	addr; | ||
| 329 | 		__u64	zone_append_lba; | ||
| 330 | 	}; | ||
| 218 | }; | 331 | }; |
| 219 | 332 | ||
| 220 | struct ublk_param_basic { | 333 | struct ublk_param_basic { |
| ... | @@ -257,6 +370,13 @@ struct ublk_param_devt { | ... | @@ -257,6 +370,13 @@ struct ublk_param_devt { |
| 257 | 	__u32 disk_minor; | 370 | 	__u32 disk_minor; |
| 258 | }; | 371 | }; |
| 259 | 372 | ||
| 373 | struct ublk_param_zoned { | ||
| 374 | 	__u32	max_open_zones; | ||
| 375 | 	__u32	max_active_zones; | ||
| 376 | 	__u32	max_zone_append_sectors; | ||
| 377 | 	__u8	reserved[20]; | ||
| 378 | }; | ||
| 379 | |||
| 260 | struct ublk_params { | 380 | struct ublk_params { |
| 261 | 	/* | 381 | 	/* |
| 262 | 	 * Total length of parameters, userspace has to set 'len' for both | 382 | 	 * Total length of parameters, userspace has to set 'len' for both |
| ... | @@ -268,11 +388,13 @@ struct ublk_params { | ... | @@ -268,11 +388,13 @@ struct ublk_params { |
| 268 | #define UBLK_PARAM_TYPE_BASIC (1 << 0) | 388 | #define UBLK_PARAM_TYPE_BASIC (1 << 0) |
| 269 | #define UBLK_PARAM_TYPE_DISCARD (1 << 1) | 389 | #define UBLK_PARAM_TYPE_DISCARD (1 << 1) |
| 270 | #define UBLK_PARAM_TYPE_DEVT (1 << 2) | 390 | #define UBLK_PARAM_TYPE_DEVT (1 << 2) |
| 391 | #define UBLK_PARAM_TYPE_ZONED (1 << 3) | ||
| 271 | 	__u32	types;			/* types of parameter included */ | 392 | 	__u32	types;			/* types of parameter included */ |
| 272 | 393 | ||
| 273 | 	struct ublk_param_basic		basic; | 394 | 	struct ublk_param_basic		basic; |
| 274 | 	struct ublk_param_discard	discard; | 395 | 	struct ublk_param_discard	discard; |
| 275 | 	struct ublk_param_devt		devt; | 396 | 	struct ublk_param_devt		devt; |
| 397 | 	struct ublk_param_zoned	zoned; | ||
| 276 | }; | 398 | }; |
| 277 | 399 | ||
| 278 | #endif | 400 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/udp.h+1-1| ... | @@ -36,7 +36,7 @@ struct udphdr { | ... | @@ -36,7 +36,7 @@ struct udphdr { |
| 36 | #define UDP_GRO		104	/* This socket can receive UDP GRO packets */ | 36 | #define UDP_GRO		104	/* This socket can receive UDP GRO packets */ |
| 37 | 37 | ||
| 38 | /* UDP encapsulation types */ | 38 | /* UDP encapsulation types */ |
| 39 | #define UDP_ENCAP_ESPINUDP_NON_IKE	1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ | 39 | #define UDP_ENCAP_ESPINUDP_NON_IKE	1 /* unused draft-ietf-ipsec-nat-t-ike-00/01 */ |
| 40 | #define UDP_ENCAP_ESPINUDP	2 /* draft-ietf-ipsec-udp-encaps-06 */ | 40 | #define UDP_ENCAP_ESPINUDP	2 /* draft-ietf-ipsec-udp-encaps-06 */ |
| 41 | #define UDP_ENCAP_L2TPINUDP	3 /* rfc2661 */ | 41 | #define UDP_ENCAP_L2TPINUDP	3 /* rfc2661 */ |
| 42 | #define UDP_ENCAP_GTP0		4 /* GSM TS 09.60 */ | 42 | #define UDP_ENCAP_GTP0		4 /* GSM TS 09.60 */ |
lib/libc/include/any-linux-any/linux/usb/ch11.h+2-4| ... | @@ -15,10 +15,8 @@ | ... | @@ -15,10 +15,8 @@ |
| 15 | /* This is arbitrary. | 15 | /* This is arbitrary. |
| 16 | * From USB 2.0 spec Table 11-13, offset 7, a hub can | 16 | * From USB 2.0 spec Table 11-13, offset 7, a hub can |
| 17 | * have up to 255 ports. The most yet reported is 10. | 17 | * have up to 255 ports. The most yet reported is 10. |
| 18 | * | 18 | * Upcoming hardware might raise that limit. |
| 19 | * Current Wireless USB host hardware (Intel i1480 for example) allows | 19 | * Because the arrays need to add a bit for hub status data, we |
| 20 | * up to 22 devices to connect. Upcoming hardware might raise that | ||
| 21 | * limit. Because the arrays need to add a bit for hub status data, we | ||
| 22 | * use 31, so plus one evens out to four bytes. | 20 | * use 31, so plus one evens out to four bytes. |
| 23 | */ | 21 | */ |
| 24 | #define USB_MAXCHILDREN		31 | 22 | #define USB_MAXCHILDREN		31 |
lib/libc/include/any-linux-any/linux/usb/ch9.h+12-6| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | * This file holds USB constants and structures that are needed for | 3 | * This file holds USB constants and structures that are needed for |
| 4 | * USB device APIs. These are used by the USB device model, which is | 4 | * USB device APIs. These are used by the USB device model, which is |
| 5 | * defined in chapter 9 of the USB 2.0 specification and in the | 5 | * defined in chapter 9 of the USB 2.0 specification and in the |
| 6 | * Wireless USB 1.0 (spread around). Linux has several APIs in C that | 6 | * Wireless USB 1.0 spec (now defunct). Linux has several APIs in C that |
| 7 | * need these: | 7 | * need these: |
| 8 | * | 8 | * |
| 9 | * - the master/host side Linux-USB kernel driver API; | 9 | * - the master/host side Linux-USB kernel driver API; |
| ... | @@ -14,9 +14,6 @@ | ... | @@ -14,9 +14,6 @@ |
| 14 | * act either as a USB master/host or as a USB slave/device. That means | 14 | * act either as a USB master/host or as a USB slave/device. That means |
| 15 | * the master and slave side APIs benefit from working well together. | 15 | * the master and slave side APIs benefit from working well together. |
| 16 | * | 16 | * |
| 17 | * There's also "Wireless USB", using low power short range radios for | ||
| 18 | * peripheral interconnection but otherwise building on the USB framework. | ||
| 19 | * | ||
| 20 | * Note all descriptors are declared '__attribute__((packed))' so that: | 17 | * Note all descriptors are declared '__attribute__((packed))' so that: |
| 21 | * | 18 | * |
| 22 | * [a] they never get padded, either internally (USB spec writers | 19 | * [a] they never get padded, either internally (USB spec writers |
| ... | @@ -376,7 +373,10 @@ struct usb_string_descriptor { | ... | @@ -376,7 +373,10 @@ struct usb_string_descriptor { |
| 376 | 	__u8 bLength; | 373 | 	__u8 bLength; |
| 377 | 	__u8 bDescriptorType; | 374 | 	__u8 bDescriptorType; |
| 378 | 375 | ||
| 379 | 	__le16 wData[1];		/* UTF-16LE encoded */ | 376 | 	union { |
| 377 | 		__le16 legacy_padding; | ||
| 378 | 		__DECLARE_FLEX_ARRAY(__le16, wData);	/* UTF-16LE encoded */ | ||
| 379 | 	}; | ||
| 380 | } __attribute__ ((packed)); | 380 | } __attribute__ ((packed)); |
| 381 | 381 | ||
| 382 | /* note that "string" zero is special, it holds language codes that | 382 | /* note that "string" zero is special, it holds language codes that |
| ... | @@ -763,6 +763,8 @@ struct usb_otg20_descriptor { | ... | @@ -763,6 +763,8 @@ struct usb_otg20_descriptor { |
| 763 | #define USB_OTG_SRP		(1 << 0) | 763 | #define USB_OTG_SRP		(1 << 0) |
| 764 | #define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */ | 764 | #define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */ |
| 765 | #define USB_OTG_ADP		(1 << 2)	/* support ADP */ | 765 | #define USB_OTG_ADP		(1 << 2)	/* support ADP */ |
| 766 | /* OTG 3.0 */ | ||
| 767 | #define USB_OTG_RSP		(1 << 3)	/* support RSP */ | ||
| 766 | 768 | ||
| 767 | #define OTG_STS_SELECTOR	0xF000		/* OTG status selector */ | 769 | #define OTG_STS_SELECTOR	0xF000		/* OTG status selector */ |
| 768 | /*-------------------------------------------------------------------------*/ | 770 | /*-------------------------------------------------------------------------*/ |
| ... | @@ -981,7 +983,11 @@ struct usb_ssp_cap_descriptor { | ... | @@ -981,7 +983,11 @@ struct usb_ssp_cap_descriptor { |
| 981 | #define USB_SSP_MIN_RX_LANE_COUNT		(0xf << 8) | 983 | #define USB_SSP_MIN_RX_LANE_COUNT		(0xf << 8) |
| 982 | #define USB_SSP_MIN_TX_LANE_COUNT		(0xf << 12) | 984 | #define USB_SSP_MIN_TX_LANE_COUNT		(0xf << 12) |
| 983 | 	__le16 wReserved; | 985 | 	__le16 wReserved; |
| 984 | 	__le32 bmSublinkSpeedAttr[1]; /* list of sublink speed attrib entries */ | 986 | 	union { |
| 987 | 		__le32 legacy_padding; | ||
| 988 | 		/* list of sublink speed attrib entries */ | ||
| 989 | 		__DECLARE_FLEX_ARRAY(__le32, bmSublinkSpeedAttr); | ||
| 990 | 	}; | ||
| 985 | #define USB_SSP_SUBLINK_SPEED_SSID	(0xf)		/* sublink speed ID */ | 991 | #define USB_SSP_SUBLINK_SPEED_SSID	(0xf)		/* sublink speed ID */ |
| 986 | #define USB_SSP_SUBLINK_SPEED_LSE	(0x3 << 4)	/* Lanespeed exponent */ | 992 | #define USB_SSP_SUBLINK_SPEED_LSE	(0x3 << 4)	/* Lanespeed exponent */ |
| 987 | #define USB_SSP_SUBLINK_SPEED_LSE_BPS		0 | 993 | #define USB_SSP_SUBLINK_SPEED_LSE_BPS		0 |
lib/libc/include/any-linux-any/linux/usb/functionfs.h+45-2| ... | @@ -73,8 +73,10 @@ struct usb_os_desc_header { | ... | @@ -73,8 +73,10 @@ struct usb_os_desc_header { |
| 73 | struct usb_ext_compat_desc { | 73 | struct usb_ext_compat_desc { |
| 74 | 	__u8	bFirstInterfaceNumber; | 74 | 	__u8	bFirstInterfaceNumber; |
| 75 | 	__u8	Reserved1; | 75 | 	__u8	Reserved1; |
| 76 | 	__u8	CompatibleID[8]; | 76 | 	__struct_group(/* no tag */, IDs, /* no attrs */, |
| 77 | 	__u8	SubCompatibleID[8]; | 77 | 		__u8	CompatibleID[8]; |
| 78 | 		__u8	SubCompatibleID[8]; | ||
| 79 | 	); | ||
| 78 | 	__u8	Reserved2[6]; | 80 | 	__u8	Reserved2[6]; |
| 79 | }; | 81 | }; |
| 80 | 82 | ||
| ... | @@ -84,6 +86,22 @@ struct usb_ext_prop_desc { | ... | @@ -84,6 +86,22 @@ struct usb_ext_prop_desc { |
| 84 | 	__le16	wPropertyNameLength; | 86 | 	__le16	wPropertyNameLength; |
| 85 | } __attribute__((packed)); | 87 | } __attribute__((packed)); |
| 86 | 88 | ||
| 89 | /* Flags for usb_ffs_dmabuf_transfer_req->flags (none for now) */ | ||
| 90 | #define USB_FFS_DMABUF_TRANSFER_MASK	0x0 | ||
| 91 | |||
| 92 | /** | ||
| 93 | * struct usb_ffs_dmabuf_transfer_req - Transfer request for a DMABUF object | ||
| 94 | * @fd:		file descriptor of the DMABUF object | ||
| 95 | * @flags:	one or more USB_FFS_DMABUF_TRANSFER_* flags | ||
| 96 | * @length:	number of bytes used in this DMABUF for the data transfer. | ||
| 97 | *		Should generally be set to the DMABUF's size. | ||
| 98 | */ | ||
| 99 | struct usb_ffs_dmabuf_transfer_req { | ||
| 100 | 	int fd; | ||
| 101 | 	__u32 flags; | ||
| 102 | 	__u64 length; | ||
| 103 | } __attribute__((packed)); | ||
| 104 | |||
| 87 | 105 | ||
| 88 | /* | 106 | /* |
| 89 | * Descriptors format: | 107 | * Descriptors format: |
| ... | @@ -286,6 +304,31 @@ struct usb_functionfs_event { | ... | @@ -286,6 +304,31 @@ struct usb_functionfs_event { |
| 286 | #define	FUNCTIONFS_ENDPOINT_DESC	_IOR('g', 130, \ | 304 | #define	FUNCTIONFS_ENDPOINT_DESC	_IOR('g', 130, \ |
| 287 | 					 struct usb_endpoint_descriptor) | 305 | 					 struct usb_endpoint_descriptor) |
| 288 | 306 | ||
| 307 | /* | ||
| 308 | * Attach the DMABUF object, identified by its file descriptor, to the | ||
| 309 | * data endpoint. Returns zero on success, and a negative errno value | ||
| 310 | * on error. | ||
| 311 | */ | ||
| 312 | #define FUNCTIONFS_DMABUF_ATTACH	_IOW('g', 131, int) | ||
| 313 | |||
| 314 | |||
| 315 | /* | ||
| 316 | * Detach the given DMABUF object, identified by its file descriptor, | ||
| 317 | * from the data endpoint. Returns zero on success, and a negative | ||
| 318 | * errno value on error. Note that closing the endpoint's file | ||
| 319 | * descriptor will automatically detach all attached DMABUFs. | ||
| 320 | */ | ||
| 321 | #define FUNCTIONFS_DMABUF_DETACH	_IOW('g', 132, int) | ||
| 289 | 322 | ||
| 323 | /* | ||
| 324 | * Enqueue the previously attached DMABUF to the transfer queue. | ||
| 325 | * The argument is a structure that packs the DMABUF's file descriptor, | ||
| 326 | * the size in bytes to transfer (which should generally correspond to | ||
| 327 | * the size of the DMABUF), and a 'flags' field which is unused | ||
| 328 | * for now. Returns zero on success, and a negative errno value on | ||
| 329 | * error. | ||
| 330 | */ | ||
| 331 | #define FUNCTIONFS_DMABUF_TRANSFER	_IOW('g', 133, \ | ||
| 332 | 					 struct usb_ffs_dmabuf_transfer_req) | ||
| 290 | 333 | ||
| 291 | #endif /* __LINUX_FUNCTIONFS_H__ */ | 334 | #endif /* __LINUX_FUNCTIONFS_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/usb/raw_gadget.h+12-2| ... | @@ -44,6 +44,16 @@ enum usb_raw_event_type { | ... | @@ -44,6 +44,16 @@ enum usb_raw_event_type { |
| 44 | 	/* This event is queued when a new control request arrived to ep0. */ | 44 | 	/* This event is queued when a new control request arrived to ep0. */ |
| 45 | 	USB_RAW_EVENT_CONTROL = 2, | 45 | 	USB_RAW_EVENT_CONTROL = 2, |
| 46 | 46 | ||
| 47 | 	/* | ||
| 48 | 	 * These events are queued when the gadget driver is suspended, | ||
| 49 | 	 * resumed, reset, or disconnected. Note that some UDCs (e.g. dwc2) | ||
| 50 | 	 * report a disconnect event instead of a reset. | ||
| 51 | 	 */ | ||
| 52 | 	USB_RAW_EVENT_SUSPEND = 3, | ||
| 53 | 	USB_RAW_EVENT_RESUME = 4, | ||
| 54 | 	USB_RAW_EVENT_RESET = 5, | ||
| 55 | 	USB_RAW_EVENT_DISCONNECT = 6, | ||
| 56 | |||
| 47 | 	/* The list might grow in the future. */ | 57 | 	/* The list might grow in the future. */ |
| 48 | }; | 58 | }; |
| 49 | 59 | ||
| ... | @@ -54,8 +64,8 @@ enum usb_raw_event_type { | ... | @@ -54,8 +64,8 @@ enum usb_raw_event_type { |
| 54 | * actual length of the fetched event data. | 64 | * actual length of the fetched event data. |
| 55 | * @data: A buffer to store the fetched event data. | 65 | * @data: A buffer to store the fetched event data. |
| 56 | * | 66 | * |
| 57 | * Currently the fetched data buffer is empty for USB_RAW_EVENT_CONNECT, | 67 | * The fetched event data buffer contains struct usb_ctrlrequest for |
| 58 | * and contains struct usb_ctrlrequest for USB_RAW_EVENT_CONTROL. | 68 | * USB_RAW_EVENT_CONTROL and is empty for other events. |
| 59 | */ | 69 | */ |
| 60 | struct usb_raw_event { | 70 | struct usb_raw_event { |
| 61 | 	__u32		type; | 71 | 	__u32		type; |
lib/libc/include/any-linux-any/linux/user_events.h created+94| ... | @@ -0,0 +1,94 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2021-2022, Microsoft Corporation. | ||
| 4 | * | ||
| 5 | * Authors: | ||
| 6 | * Beau Belgrave <beaub@linux.microsoft.com> | ||
| 7 | */ | ||
| 8 | #ifndef _LINUX_USER_EVENTS_H | ||
| 9 | #define _LINUX_USER_EVENTS_H | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | #include <linux/ioctl.h> | ||
| 13 | |||
| 14 | #define USER_EVENTS_SYSTEM "user_events" | ||
| 15 | #define USER_EVENTS_MULTI_SYSTEM "user_events_multi" | ||
| 16 | #define USER_EVENTS_PREFIX "u:" | ||
| 17 | |||
| 18 | /* Create dynamic location entry within a 32-bit value */ | ||
| 19 | #define DYN_LOC(offset, size) ((size) << 16 | (offset)) | ||
| 20 | |||
| 21 | /* List of supported registration flags */ | ||
| 22 | enum user_reg_flag { | ||
| 23 | 	/* Event will not delete upon last reference closing */ | ||
| 24 | 	USER_EVENT_REG_PERSIST		= 1U << 0, | ||
| 25 | |||
| 26 | 	/* Event will be allowed to have multiple formats */ | ||
| 27 | 	USER_EVENT_REG_MULTI_FORMAT	= 1U << 1, | ||
| 28 | |||
| 29 | 	/* This value or above is currently non-ABI */ | ||
| 30 | 	USER_EVENT_REG_MAX		= 1U << 2, | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Describes an event registration and stores the results of the registration. | ||
| 35 | * This structure is passed to the DIAG_IOCSREG ioctl, callers at a minimum | ||
| 36 | * must set the size and name_args before invocation. | ||
| 37 | */ | ||
| 38 | struct user_reg { | ||
| 39 | |||
| 40 | 	/* Input: Size of the user_reg structure being used */ | ||
| 41 | 	__u32	size; | ||
| 42 | |||
| 43 | 	/* Input: Bit in enable address to use */ | ||
| 44 | 	__u8	enable_bit; | ||
| 45 | |||
| 46 | 	/* Input: Enable size in bytes at address */ | ||
| 47 | 	__u8	enable_size; | ||
| 48 | |||
| 49 | 	/* Input: Flags to use, if any */ | ||
| 50 | 	__u16	flags; | ||
| 51 | |||
| 52 | 	/* Input: Address to update when enabled */ | ||
| 53 | 	__u64	enable_addr; | ||
| 54 | |||
| 55 | 	/* Input: Pointer to string with event name, description and flags */ | ||
| 56 | 	__u64	name_args; | ||
| 57 | |||
| 58 | 	/* Output: Index of the event to use when writing data */ | ||
| 59 | 	__u32	write_index; | ||
| 60 | } __attribute__((__packed__)); | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Describes an event unregister, callers must set the size, address and bit. | ||
| 64 | * This structure is passed to the DIAG_IOCSUNREG ioctl to disable bit updates. | ||
| 65 | */ | ||
| 66 | struct user_unreg { | ||
| 67 | 	/* Input: Size of the user_unreg structure being used */ | ||
| 68 | 	__u32	size; | ||
| 69 | |||
| 70 | 	/* Input: Bit to unregister */ | ||
| 71 | 	__u8	disable_bit; | ||
| 72 | |||
| 73 | 	/* Input: Reserved, set to 0 */ | ||
| 74 | 	__u8	__reserved; | ||
| 75 | |||
| 76 | 	/* Input: Reserved, set to 0 */ | ||
| 77 | 	__u16	__reserved2; | ||
| 78 | |||
| 79 | 	/* Input: Address to unregister */ | ||
| 80 | 	__u64	disable_addr; | ||
| 81 | } __attribute__((__packed__)); | ||
| 82 | |||
| 83 | #define DIAG_IOC_MAGIC '*' | ||
| 84 | |||
| 85 | /* Request to register a user_event */ | ||
| 86 | #define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *) | ||
| 87 | |||
| 88 | /* Request to delete a user_event */ | ||
| 89 | #define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *) | ||
| 90 | |||
| 91 | /* Requests to unregister a user_event */ | ||
| 92 | #define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg*) | ||
| 93 | |||
| 94 | #endif /* _LINUX_USER_EVENTS_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/userfaultfd.h+71-3| ... | @@ -38,7 +38,11 @@ | ... | @@ -38,7 +38,11 @@ |
| 38 | 			 UFFD_FEATURE_MINOR_HUGETLBFS |	\ | 38 | 			 UFFD_FEATURE_MINOR_HUGETLBFS |	\ |
| 39 | 			 UFFD_FEATURE_MINOR_SHMEM |		\ | 39 | 			 UFFD_FEATURE_MINOR_SHMEM |		\ |
| 40 | 			 UFFD_FEATURE_EXACT_ADDRESS |		\ | 40 | 			 UFFD_FEATURE_EXACT_ADDRESS |		\ |
| 41 | 			 UFFD_FEATURE_WP_HUGETLBFS_SHMEM) | 41 | 			 UFFD_FEATURE_WP_HUGETLBFS_SHMEM |	\ |
| 42 | 			 UFFD_FEATURE_WP_UNPOPULATED |	\ | ||
| 43 | 			 UFFD_FEATURE_POISON |		\ | ||
| 44 | 			 UFFD_FEATURE_WP_ASYNC |		\ | ||
| 45 | 			 UFFD_FEATURE_MOVE) | ||
| 42 | #define UFFD_API_IOCTLS				\ | 46 | #define UFFD_API_IOCTLS				\ |
| 43 | 	((__u64)1 << _UFFDIO_REGISTER |		\ | 47 | 	((__u64)1 << _UFFDIO_REGISTER |		\ |
| 44 | 	 (__u64)1 << _UFFDIO_UNREGISTER |	\ | 48 | 	 (__u64)1 << _UFFDIO_UNREGISTER |	\ |
| ... | @@ -47,13 +51,16 @@ | ... | @@ -47,13 +51,16 @@ |
| 47 | 	((__u64)1 << _UFFDIO_WAKE |		\ | 51 | 	((__u64)1 << _UFFDIO_WAKE |		\ |
| 48 | 	 (__u64)1 << _UFFDIO_COPY |		\ | 52 | 	 (__u64)1 << _UFFDIO_COPY |		\ |
| 49 | 	 (__u64)1 << _UFFDIO_ZEROPAGE |		\ | 53 | 	 (__u64)1 << _UFFDIO_ZEROPAGE |		\ |
| 54 | 	 (__u64)1 << _UFFDIO_MOVE |		\ | ||
| 50 | 	 (__u64)1 << _UFFDIO_WRITEPROTECT |	\ | 55 | 	 (__u64)1 << _UFFDIO_WRITEPROTECT |	\ |
| 51 | 	 (__u64)1 << _UFFDIO_CONTINUE) | 56 | 	 (__u64)1 << _UFFDIO_CONTINUE |		\ |
| 57 | 	 (__u64)1 << _UFFDIO_POISON) | ||
| 52 | #define UFFD_API_RANGE_IOCTLS_BASIC		\ | 58 | #define UFFD_API_RANGE_IOCTLS_BASIC		\ |
| 53 | 	((__u64)1 << _UFFDIO_WAKE |		\ | 59 | 	((__u64)1 << _UFFDIO_WAKE |		\ |
| 54 | 	 (__u64)1 << _UFFDIO_COPY |		\ | 60 | 	 (__u64)1 << _UFFDIO_COPY |		\ |
| 61 | 	 (__u64)1 << _UFFDIO_WRITEPROTECT |	\ | ||
| 55 | 	 (__u64)1 << _UFFDIO_CONTINUE |		\ | 62 | 	 (__u64)1 << _UFFDIO_CONTINUE |		\ |
| 56 | 	 (__u64)1 << _UFFDIO_WRITEPROTECT) | 63 | 	 (__u64)1 << _UFFDIO_POISON) |
| 57 | 64 | ||
| 58 | /* | 65 | /* |
| 59 | * Valid ioctl command number range with this API is from 0x00 to | 66 | * Valid ioctl command number range with this API is from 0x00 to |
| ... | @@ -68,8 +75,10 @@ | ... | @@ -68,8 +75,10 @@ |
| 68 | #define _UFFDIO_WAKE			(0x02) | 75 | #define _UFFDIO_WAKE			(0x02) |
| 69 | #define _UFFDIO_COPY			(0x03) | 76 | #define _UFFDIO_COPY			(0x03) |
| 70 | #define _UFFDIO_ZEROPAGE		(0x04) | 77 | #define _UFFDIO_ZEROPAGE		(0x04) |
| 78 | #define _UFFDIO_MOVE			(0x05) | ||
| 71 | #define _UFFDIO_WRITEPROTECT		(0x06) | 79 | #define _UFFDIO_WRITEPROTECT		(0x06) |
| 72 | #define _UFFDIO_CONTINUE		(0x07) | 80 | #define _UFFDIO_CONTINUE		(0x07) |
| 81 | #define _UFFDIO_POISON			(0x08) | ||
| 73 | #define _UFFDIO_API			(0x3F) | 82 | #define _UFFDIO_API			(0x3F) |
| 74 | 83 | ||
| 75 | /* userfaultfd ioctl ids */ | 84 | /* userfaultfd ioctl ids */ |
| ... | @@ -86,10 +95,14 @@ | ... | @@ -86,10 +95,14 @@ |
| 86 | 				 struct uffdio_copy) | 95 | 				 struct uffdio_copy) |
| 87 | #define UFFDIO_ZEROPAGE		_IOWR(UFFDIO, _UFFDIO_ZEROPAGE,	\ | 96 | #define UFFDIO_ZEROPAGE		_IOWR(UFFDIO, _UFFDIO_ZEROPAGE,	\ |
| 88 | 				 struct uffdio_zeropage) | 97 | 				 struct uffdio_zeropage) |
| 98 | #define UFFDIO_MOVE		_IOWR(UFFDIO, _UFFDIO_MOVE,	\ | ||
| 99 | 				 struct uffdio_move) | ||
| 89 | #define UFFDIO_WRITEPROTECT	_IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ | 100 | #define UFFDIO_WRITEPROTECT	_IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ |
| 90 | 				 struct uffdio_writeprotect) | 101 | 				 struct uffdio_writeprotect) |
| 91 | #define UFFDIO_CONTINUE		_IOWR(UFFDIO, _UFFDIO_CONTINUE,	\ | 102 | #define UFFDIO_CONTINUE		_IOWR(UFFDIO, _UFFDIO_CONTINUE,	\ |
| 92 | 				 struct uffdio_continue) | 103 | 				 struct uffdio_continue) |
| 104 | #define UFFDIO_POISON		_IOWR(UFFDIO, _UFFDIO_POISON, \ | ||
| 105 | 				 struct uffdio_poison) | ||
| 93 | 106 | ||
| 94 | /* read() structure */ | 107 | /* read() structure */ |
| 95 | struct uffd_msg { | 108 | struct uffd_msg { |
| ... | @@ -203,6 +216,20 @@ struct uffdio_api { | ... | @@ -203,6 +216,20 @@ struct uffdio_api { |
| 203 | 	 * | 216 | 	 * |
| 204 | 	 * UFFD_FEATURE_WP_HUGETLBFS_SHMEM indicates that userfaultfd | 217 | 	 * UFFD_FEATURE_WP_HUGETLBFS_SHMEM indicates that userfaultfd |
| 205 | 	 * write-protection mode is supported on both shmem and hugetlbfs. | 218 | 	 * write-protection mode is supported on both shmem and hugetlbfs. |
| 219 | 	 * | ||
| 220 | 	 * UFFD_FEATURE_WP_UNPOPULATED indicates that userfaultfd | ||
| 221 | 	 * write-protection mode will always apply to unpopulated pages | ||
| 222 | 	 * (i.e. empty ptes). This will be the default behavior for shmem | ||
| 223 | 	 * & hugetlbfs, so this flag only affects anonymous memory behavior | ||
| 224 | 	 * when userfault write-protection mode is registered. | ||
| 225 | 	 * | ||
| 226 | 	 * UFFD_FEATURE_WP_ASYNC indicates that userfaultfd write-protection | ||
| 227 | 	 * asynchronous mode is supported in which the write fault is | ||
| 228 | 	 * automatically resolved and write-protection is un-set. | ||
| 229 | 	 * It implies UFFD_FEATURE_WP_UNPOPULATED. | ||
| 230 | 	 * | ||
| 231 | 	 * UFFD_FEATURE_MOVE indicates that the kernel supports moving an | ||
| 232 | 	 * existing page contents from userspace. | ||
| 206 | 	 */ | 233 | 	 */ |
| 207 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP		(1<<0) | 234 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP		(1<<0) |
| 208 | #define UFFD_FEATURE_EVENT_FORK			(1<<1) | 235 | #define UFFD_FEATURE_EVENT_FORK			(1<<1) |
| ... | @@ -217,6 +244,10 @@ struct uffdio_api { | ... | @@ -217,6 +244,10 @@ struct uffdio_api { |
| 217 | #define UFFD_FEATURE_MINOR_SHMEM		(1<<10) | 244 | #define UFFD_FEATURE_MINOR_SHMEM		(1<<10) |
| 218 | #define UFFD_FEATURE_EXACT_ADDRESS		(1<<11) | 245 | #define UFFD_FEATURE_EXACT_ADDRESS		(1<<11) |
| 219 | #define UFFD_FEATURE_WP_HUGETLBFS_SHMEM		(1<<12) | 246 | #define UFFD_FEATURE_WP_HUGETLBFS_SHMEM		(1<<12) |
| 247 | #define UFFD_FEATURE_WP_UNPOPULATED		(1<<13) | ||
| 248 | #define UFFD_FEATURE_POISON			(1<<14) | ||
| 249 | #define UFFD_FEATURE_WP_ASYNC			(1<<15) | ||
| 250 | #define UFFD_FEATURE_MOVE			(1<<16) | ||
| 220 | 	__u64 features; | 251 | 	__u64 features; |
| 221 | 252 | ||
| 222 | 	__u64 ioctls; | 253 | 	__u64 ioctls; |
| ... | @@ -297,6 +328,13 @@ struct uffdio_writeprotect { | ... | @@ -297,6 +328,13 @@ struct uffdio_writeprotect { |
| 297 | struct uffdio_continue { | 328 | struct uffdio_continue { |
| 298 | 	struct uffdio_range range; | 329 | 	struct uffdio_range range; |
| 299 | #define UFFDIO_CONTINUE_MODE_DONTWAKE		((__u64)1<<0) | 330 | #define UFFDIO_CONTINUE_MODE_DONTWAKE		((__u64)1<<0) |
| 331 | 	/* | ||
| 332 | 	 * UFFDIO_CONTINUE_MODE_WP will map the page write protected on | ||
| 333 | 	 * the fly. UFFDIO_CONTINUE_MODE_WP is available only if the | ||
| 334 | 	 * write protected ioctl is implemented for the range | ||
| 335 | 	 * according to the uffdio_register.ioctls. | ||
| 336 | 	 */ | ||
| 337 | #define UFFDIO_CONTINUE_MODE_WP			((__u64)1<<1) | ||
| 300 | 	__u64 mode; | 338 | 	__u64 mode; |
| 301 | 339 | ||
| 302 | 	/* | 340 | 	/* |
| ... | @@ -306,6 +344,36 @@ struct uffdio_continue { | ... | @@ -306,6 +344,36 @@ struct uffdio_continue { |
| 306 | 	__s64 mapped; | 344 | 	__s64 mapped; |
| 307 | }; | 345 | }; |
| 308 | 346 | ||
| 347 | struct uffdio_poison { | ||
| 348 | 	struct uffdio_range range; | ||
| 349 | #define UFFDIO_POISON_MODE_DONTWAKE		((__u64)1<<0) | ||
| 350 | 	__u64 mode; | ||
| 351 | |||
| 352 | 	/* | ||
| 353 | 	 * Fields below here are written by the ioctl and must be at the end: | ||
| 354 | 	 * the copy_from_user will not read past here. | ||
| 355 | 	 */ | ||
| 356 | 	__s64 updated; | ||
| 357 | }; | ||
| 358 | |||
| 359 | struct uffdio_move { | ||
| 360 | 	__u64 dst; | ||
| 361 | 	__u64 src; | ||
| 362 | 	__u64 len; | ||
| 363 | 	/* | ||
| 364 | 	 * Especially if used to atomically remove memory from the | ||
| 365 | 	 * address space the wake on the dst range is not needed. | ||
| 366 | 	 */ | ||
| 367 | #define UFFDIO_MOVE_MODE_DONTWAKE		((__u64)1<<0) | ||
| 368 | #define UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES	((__u64)1<<1) | ||
| 369 | 	__u64 mode; | ||
| 370 | 	/* | ||
| 371 | 	 * "move" is written by the ioctl and must be at the end: the | ||
| 372 | 	 * copy_from_user will not read the last 8 bytes. | ||
| 373 | 	 */ | ||
| 374 | 	__s64 move; | ||
| 375 | }; | ||
| 376 | |||
| 309 | /* | 377 | /* |
| 310 | * Flags for the userfaultfd(2) system call itself. | 378 | * Flags for the userfaultfd(2) system call itself. |
| 311 | */ | 379 | */ |
lib/libc/include/any-linux-any/linux/uuid.h+1-30| ... | @@ -1,30 +1 @@ | ... | @@ -1,30 +1 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* DO NOT USE in new code! This is solely for MEI due to legacy reasons */ | ||
| 3 | /* | ||
| 4 | * MEI UUID definition | ||
| 5 | * | ||
| 6 | * Copyright (C) 2010, Intel Corp. | ||
| 7 | *	Huang Ying <ying.huang@intel.com> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _LINUX_UUID_H_ | ||
| 11 | #define _LINUX_UUID_H_ | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 15 | typedef struct { | ||
| 16 | 	__u8 b[16]; | ||
| 17 | } uuid_le; | ||
| 18 | |||
| 19 | #define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)		\ | ||
| 20 | ((uuid_le)								\ | ||
| 21 | {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ | ||
| 22 | (b) & 0xff, ((b) >> 8) & 0xff,					\ | ||
| 23 | (c) & 0xff, ((c) >> 8) & 0xff,					\ | ||
| 24 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) | ||
| 25 | |||
| 26 | #define NULL_UUID_LE							\ | ||
| 27 | 	UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,	\ | ||
| 28 | 	 0x00, 0x00, 0x00, 0x00) | ||
| 29 | |||
| 30 | #endif /* _LINUX_UUID_H_ */ | ||
| \ No newline at end of file | |||
| 1 | #include <linux/mei_uuid.h> | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/v4l2-controls.h+738-1| ... | @@ -201,6 +201,18 @@ enum v4l2_colorfx { | ... | @@ -201,6 +201,18 @@ enum v4l2_colorfx { |
| 201 | */ | 201 | */ |
| 202 | #define V4L2_CID_USER_ASPEED_BASE		(V4L2_CID_USER_BASE + 0x11a0) | 202 | #define V4L2_CID_USER_ASPEED_BASE		(V4L2_CID_USER_BASE + 0x11a0) |
| 203 | 203 | ||
| 204 | /* | ||
| 205 | * The base for Nuvoton NPCM driver controls. | ||
| 206 | * We reserve 16 controls for this driver. | ||
| 207 | */ | ||
| 208 | #define V4L2_CID_USER_NPCM_BASE			(V4L2_CID_USER_BASE + 0x11b0) | ||
| 209 | |||
| 210 | /* | ||
| 211 | * The base for THine THP7312 driver controls. | ||
| 212 | * We reserve 32 controls for this driver. | ||
| 213 | */ | ||
| 214 | #define V4L2_CID_USER_THP7312_BASE		(V4L2_CID_USER_BASE + 0x11c0) | ||
| 215 | |||
| 204 | /* MPEG-class control IDs */ | 216 | /* MPEG-class control IDs */ |
| 205 | /* The MPEG controls are applicable to all codec controls | 217 | /* The MPEG controls are applicable to all codec controls |
| 206 | * and the 'MPEG' part of the define is historical */ | 218 | * and the 'MPEG' part of the define is historical */ |
| ... | @@ -800,6 +812,88 @@ enum v4l2_mpeg_video_frame_skip_mode { | ... | @@ -800,6 +812,88 @@ enum v4l2_mpeg_video_frame_skip_mode { |
| 800 | #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY		(V4L2_CID_CODEC_BASE + 653) | 812 | #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY		(V4L2_CID_CODEC_BASE + 653) |
| 801 | #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE	(V4L2_CID_CODEC_BASE + 654) | 813 | #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE	(V4L2_CID_CODEC_BASE + 654) |
| 802 | 814 | ||
| 815 | #define V4L2_CID_MPEG_VIDEO_AV1_PROFILE (V4L2_CID_CODEC_BASE + 655) | ||
| 816 | /** | ||
| 817 | * enum v4l2_mpeg_video_av1_profile - AV1 profiles | ||
| 818 | * | ||
| 819 | * @V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN: compliant decoders must be able to decode | ||
| 820 | * streams with seq_profile equal to 0. | ||
| 821 | * @V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH: compliant decoders must be able to decode | ||
| 822 | * streams with seq_profile equal less than or equal to 1. | ||
| 823 | * @V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL: compliant decoders must be able to | ||
| 824 | * decode streams with seq_profile less than or equal to 2. | ||
| 825 | * | ||
| 826 | * Conveys the highest profile a decoder can work with. | ||
| 827 | */ | ||
| 828 | enum v4l2_mpeg_video_av1_profile { | ||
| 829 | 	V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN = 0, | ||
| 830 | 	V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH = 1, | ||
| 831 | 	V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL = 2, | ||
| 832 | }; | ||
| 833 | |||
| 834 | #define V4L2_CID_MPEG_VIDEO_AV1_LEVEL (V4L2_CID_CODEC_BASE + 656) | ||
| 835 | /** | ||
| 836 | * enum v4l2_mpeg_video_av1_level - AV1 levels | ||
| 837 | * | ||
| 838 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_2_0: Level 2.0. | ||
| 839 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_2_1: Level 2.1. | ||
| 840 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_2_2: Level 2.2. | ||
| 841 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_2_3: Level 2.3. | ||
| 842 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_3_0: Level 3.0. | ||
| 843 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_3_1: Level 3.1. | ||
| 844 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_3_2: Level 3.2. | ||
| 845 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_3_3: Level 3.3. | ||
| 846 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_4_0: Level 4.0. | ||
| 847 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_4_1: Level 4.1. | ||
| 848 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_4_2: Level 4.2. | ||
| 849 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_4_3: Level 4.3. | ||
| 850 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_5_0: Level 5.0. | ||
| 851 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_5_1: Level 5.1. | ||
| 852 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_5_2: Level 5.2. | ||
| 853 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_5_3: Level 5.3. | ||
| 854 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_6_0: Level 6.0. | ||
| 855 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_6_1: Level 6.1. | ||
| 856 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_6_2: Level 6.2. | ||
| 857 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_6_3: Level 6.3. | ||
| 858 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_7_0: Level 7.0. | ||
| 859 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_7_1: Level 7.1. | ||
| 860 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_7_2: Level 7.2. | ||
| 861 | * @V4L2_MPEG_VIDEO_AV1_LEVEL_7_3: Level 7.3. | ||
| 862 | * | ||
| 863 | * Conveys the highest level a decoder can work with. | ||
| 864 | */ | ||
| 865 | enum v4l2_mpeg_video_av1_level { | ||
| 866 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_2_0 = 0, | ||
| 867 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_2_1 = 1, | ||
| 868 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_2_2 = 2, | ||
| 869 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_2_3 = 3, | ||
| 870 | |||
| 871 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_3_0 = 4, | ||
| 872 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_3_1 = 5, | ||
| 873 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_3_2 = 6, | ||
| 874 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_3_3 = 7, | ||
| 875 | |||
| 876 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_4_0 = 8, | ||
| 877 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_4_1 = 9, | ||
| 878 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_4_2 = 10, | ||
| 879 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_4_3 = 11, | ||
| 880 | |||
| 881 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_5_0 = 12, | ||
| 882 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_5_1 = 13, | ||
| 883 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_5_2 = 14, | ||
| 884 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_5_3 = 15, | ||
| 885 | |||
| 886 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_6_0 = 16, | ||
| 887 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_6_1 = 17, | ||
| 888 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_6_2 = 18, | ||
| 889 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_6_3 = 19, | ||
| 890 | |||
| 891 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_7_0 = 20, | ||
| 892 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_7_1 = 21, | ||
| 893 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_7_2 = 22, | ||
| 894 | 	V4L2_MPEG_VIDEO_AV1_LEVEL_7_3 = 23 | ||
| 895 | }; | ||
| 896 | |||
| 803 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ | 897 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ |
| 804 | #define V4L2_CID_CODEC_CX2341X_BASE				(V4L2_CTRL_CLASS_CODEC | 0x1000) | 898 | #define V4L2_CID_CODEC_CX2341X_BASE				(V4L2_CTRL_CLASS_CODEC | 0x1000) |
| 805 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE		(V4L2_CID_CODEC_CX2341X_BASE+0) | 899 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE		(V4L2_CID_CODEC_CX2341X_BASE+0) |
| ... | @@ -2381,6 +2475,9 @@ struct v4l2_ctrl_hevc_slice_params { | ... | @@ -2381,6 +2475,9 @@ struct v4l2_ctrl_hevc_slice_params { |
| 2381 | * @poc_st_curr_after: provides the index of the short term after references | 2475 | * @poc_st_curr_after: provides the index of the short term after references |
| 2382 | *		 in DPB array | 2476 | *		 in DPB array |
| 2383 | * @poc_lt_curr: provides the index of the long term references in DPB array | 2477 | * @poc_lt_curr: provides the index of the long term references in DPB array |
| 2478 | * @num_delta_pocs_of_ref_rps_idx: same as the derived value NumDeltaPocs[RefRpsIdx], | ||
| 2479 | *				 can be used to parse the RPS data in slice headers | ||
| 2480 | *				 instead of skipping it with @short_term_ref_pic_set_size. | ||
| 2384 | * @reserved: padding field. Should be zeroed by applications. | 2481 | * @reserved: padding field. Should be zeroed by applications. |
| 2385 | * @dpb: the decoded picture buffer, for meta-data about reference frames | 2482 | * @dpb: the decoded picture buffer, for meta-data about reference frames |
| 2386 | * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{} | 2483 | * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{} |
| ... | @@ -2396,7 +2493,8 @@ struct v4l2_ctrl_hevc_decode_params { | ... | @@ -2396,7 +2493,8 @@ struct v4l2_ctrl_hevc_decode_params { |
| 2396 | 	__u8	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; | 2493 | 	__u8	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; |
| 2397 | 	__u8	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; | 2494 | 	__u8	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; |
| 2398 | 	__u8	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; | 2495 | 	__u8	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; |
| 2399 | 	__u8	reserved[4]; | 2496 | 	__u8	num_delta_pocs_of_ref_rps_idx; |
| 2497 | 	__u8	reserved[3]; | ||
| 2400 | 	struct	v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; | 2498 | 	struct	v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; |
| 2401 | 	__u64	flags; | 2499 | 	__u64	flags; |
| 2402 | }; | 2500 | }; |
| ... | @@ -2750,6 +2848,645 @@ struct v4l2_ctrl_vp9_compressed_hdr { | ... | @@ -2750,6 +2848,645 @@ struct v4l2_ctrl_vp9_compressed_hdr { |
| 2750 | 	struct v4l2_vp9_mv_probs mv; | 2848 | 	struct v4l2_vp9_mv_probs mv; |
| 2751 | }; | 2849 | }; |
| 2752 | 2850 | ||
| 2851 | /* Stateless AV1 controls */ | ||
| 2852 | |||
| 2853 | #define V4L2_AV1_TOTAL_REFS_PER_FRAME	8 | ||
| 2854 | #define V4L2_AV1_CDEF_MAX		8 | ||
| 2855 | #define V4L2_AV1_NUM_PLANES_MAX		3 /* 1 if monochrome, 3 otherwise */ | ||
| 2856 | #define V4L2_AV1_MAX_SEGMENTS		8 | ||
| 2857 | #define V4L2_AV1_MAX_OPERATING_POINTS	(1 << 5) /* 5 bits to encode */ | ||
| 2858 | #define V4L2_AV1_REFS_PER_FRAME		7 | ||
| 2859 | #define V4L2_AV1_MAX_NUM_Y_POINTS	(1 << 4) /* 4 bits to encode */ | ||
| 2860 | #define V4L2_AV1_MAX_NUM_CB_POINTS	(1 << 4) /* 4 bits to encode */ | ||
| 2861 | #define V4L2_AV1_MAX_NUM_CR_POINTS	(1 << 4) /* 4 bits to encode */ | ||
| 2862 | #define V4L2_AV1_AR_COEFFS_SIZE		25 /* (2 * 3 * (3 + 1)) + 1 */ | ||
| 2863 | #define V4L2_AV1_MAX_NUM_PLANES		3 | ||
| 2864 | #define V4L2_AV1_MAX_TILE_COLS		64 | ||
| 2865 | #define V4L2_AV1_MAX_TILE_ROWS		64 | ||
| 2866 | #define V4L2_AV1_MAX_TILE_COUNT		512 | ||
| 2867 | |||
| 2868 | #define V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE		 0x00000001 | ||
| 2869 | #define V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK	 0x00000002 | ||
| 2870 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA	 0x00000004 | ||
| 2871 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER 0x00000008 | ||
| 2872 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND 0x00000010 | ||
| 2873 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND	 0x00000020 | ||
| 2874 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION	 0x00000040 | ||
| 2875 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER	 0x00000080 | ||
| 2876 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT	 0x00000100 | ||
| 2877 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP		 0x00000200 | ||
| 2878 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS	 0x00000400 | ||
| 2879 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES		 0x00000800 | ||
| 2880 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF		 0x00001000 | ||
| 2881 | #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION	 0x00002000 | ||
| 2882 | #define V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME		 0x00004000 | ||
| 2883 | #define V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE		 0x00008000 | ||
| 2884 | #define V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X		 0x00010000 | ||
| 2885 | #define V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y		 0x00020000 | ||
| 2886 | #define V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT 0x00040000 | ||
| 2887 | #define V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q	 0x00080000 | ||
| 2888 | |||
| 2889 | #define V4L2_CID_STATELESS_AV1_SEQUENCE (V4L2_CID_CODEC_STATELESS_BASE + 500) | ||
| 2890 | /** | ||
| 2891 | * struct v4l2_ctrl_av1_sequence - AV1 Sequence | ||
| 2892 | * | ||
| 2893 | * Represents an AV1 Sequence OBU. See section 5.5 "Sequence header OBU syntax" | ||
| 2894 | * for more details. | ||
| 2895 | * | ||
| 2896 | * @flags: See V4L2_AV1_SEQUENCE_FLAG_{}. | ||
| 2897 | * @seq_profile: specifies the features that can be used in the coded video | ||
| 2898 | * sequence. | ||
| 2899 | * @order_hint_bits: specifies the number of bits used for the order_hint field | ||
| 2900 | * at each frame. | ||
| 2901 | * @bit_depth: the bitdepth to use for the sequence as described in section | ||
| 2902 | * 5.5.2 "Color config syntax". | ||
| 2903 | * @reserved: padding field. Should be zeroed by applications. | ||
| 2904 | * @max_frame_width_minus_1: specifies the maximum frame width minus 1 for the | ||
| 2905 | * frames represented by this sequence header. | ||
| 2906 | * @max_frame_height_minus_1: specifies the maximum frame height minus 1 for the | ||
| 2907 | * frames represented by this sequence header. | ||
| 2908 | */ | ||
| 2909 | struct v4l2_ctrl_av1_sequence { | ||
| 2910 | 	__u32 flags; | ||
| 2911 | 	__u8 seq_profile; | ||
| 2912 | 	__u8 order_hint_bits; | ||
| 2913 | 	__u8 bit_depth; | ||
| 2914 | 	__u8 reserved; | ||
| 2915 | 	__u16 max_frame_width_minus_1; | ||
| 2916 | 	__u16 max_frame_height_minus_1; | ||
| 2917 | }; | ||
| 2918 | |||
| 2919 | #define V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (V4L2_CID_CODEC_STATELESS_BASE + 501) | ||
| 2920 | /** | ||
| 2921 | * struct v4l2_ctrl_av1_tile_group_entry - AV1 Tile Group entry | ||
| 2922 | * | ||
| 2923 | * Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart, | ||
| 2924 | * MiRowEnd, MiColStart and MiColEnd can be retrieved from struct | ||
| 2925 | * v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and | ||
| 2926 | * tile_col. See section 6.10.1 "General tile group OBU semantics" for more | ||
| 2927 | * details. | ||
| 2928 | * | ||
| 2929 | * @tile_offset: offset from the OBU data, i.e. where the coded tile data | ||
| 2930 | * actually starts. | ||
| 2931 | * @tile_size: specifies the size in bytes of the coded tile. Equivalent to | ||
| 2932 | * "TileSize" in the AV1 Specification. | ||
| 2933 | * @tile_row: specifies the row of the current tile. Equivalent to "TileRow" in | ||
| 2934 | * the AV1 Specification. | ||
| 2935 | * @tile_col: specifies the col of the current tile. Equivalent to "TileCol" in | ||
| 2936 | * the AV1 Specification. | ||
| 2937 | */ | ||
| 2938 | struct v4l2_ctrl_av1_tile_group_entry { | ||
| 2939 | 	__u32 tile_offset; | ||
| 2940 | 	__u32 tile_size; | ||
| 2941 | 	__u32 tile_row; | ||
| 2942 | 	__u32 tile_col; | ||
| 2943 | }; | ||
| 2944 | |||
| 2945 | /** | ||
| 2946 | * enum v4l2_av1_warp_model - AV1 Warp Model as described in section 3 | ||
| 2947 | * "Symbols and abbreviated terms" of the AV1 Specification. | ||
| 2948 | * | ||
| 2949 | * @V4L2_AV1_WARP_MODEL_IDENTITY: Warp model is just an identity transform. | ||
| 2950 | * @V4L2_AV1_WARP_MODEL_TRANSLATION: Warp model is a pure translation. | ||
| 2951 | * @V4L2_AV1_WARP_MODEL_ROTZOOM: Warp model is a rotation + symmetric zoom + | ||
| 2952 | * translation. | ||
| 2953 | * @V4L2_AV1_WARP_MODEL_AFFINE: Warp model is a general affine transform. | ||
| 2954 | */ | ||
| 2955 | enum v4l2_av1_warp_model { | ||
| 2956 | 	V4L2_AV1_WARP_MODEL_IDENTITY = 0, | ||
| 2957 | 	V4L2_AV1_WARP_MODEL_TRANSLATION = 1, | ||
| 2958 | 	V4L2_AV1_WARP_MODEL_ROTZOOM = 2, | ||
| 2959 | 	V4L2_AV1_WARP_MODEL_AFFINE = 3, | ||
| 2960 | }; | ||
| 2961 | |||
| 2962 | /** | ||
| 2963 | * enum v4l2_av1_reference_frame - AV1 reference frames | ||
| 2964 | * | ||
| 2965 | * @V4L2_AV1_REF_INTRA_FRAME: Intra Frame Reference | ||
| 2966 | * @V4L2_AV1_REF_LAST_FRAME: Last Reference Frame | ||
| 2967 | * @V4L2_AV1_REF_LAST2_FRAME: Last2 Reference Frame | ||
| 2968 | * @V4L2_AV1_REF_LAST3_FRAME: Last3 Reference Frame | ||
| 2969 | * @V4L2_AV1_REF_GOLDEN_FRAME: Golden Reference Frame | ||
| 2970 | * @V4L2_AV1_REF_BWDREF_FRAME: BWD Reference Frame | ||
| 2971 | * @V4L2_AV1_REF_ALTREF2_FRAME: Alternative2 Reference Frame | ||
| 2972 | * @V4L2_AV1_REF_ALTREF_FRAME: Alternative Reference Frame | ||
| 2973 | */ | ||
| 2974 | enum v4l2_av1_reference_frame { | ||
| 2975 | 	V4L2_AV1_REF_INTRA_FRAME = 0, | ||
| 2976 | 	V4L2_AV1_REF_LAST_FRAME = 1, | ||
| 2977 | 	V4L2_AV1_REF_LAST2_FRAME = 2, | ||
| 2978 | 	V4L2_AV1_REF_LAST3_FRAME = 3, | ||
| 2979 | 	V4L2_AV1_REF_GOLDEN_FRAME = 4, | ||
| 2980 | 	V4L2_AV1_REF_BWDREF_FRAME = 5, | ||
| 2981 | 	V4L2_AV1_REF_ALTREF2_FRAME = 6, | ||
| 2982 | 	V4L2_AV1_REF_ALTREF_FRAME = 7, | ||
| 2983 | }; | ||
| 2984 | |||
| 2985 | #define V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) (1 << (ref)) | ||
| 2986 | |||
| 2987 | #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL	 0x1 | ||
| 2988 | #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM	 0x2 | ||
| 2989 | #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION 0x4 | ||
| 2990 | /** | ||
| 2991 | * struct v4l2_av1_global_motion - AV1 Global Motion parameters as described in | ||
| 2992 | * section 6.8.17 "Global motion params semantics" of the AV1 specification. | ||
| 2993 | * | ||
| 2994 | * @flags: A bitfield containing the flags per reference frame. See | ||
| 2995 | * V4L2_AV1_GLOBAL_MOTION_FLAG_{} | ||
| 2996 | * @type: The type of global motion transform used. | ||
| 2997 | * @params: this field has the same meaning as "gm_params" in the AV1 | ||
| 2998 | * specification. | ||
| 2999 | * @invalid: bitfield indicating whether the global motion params are invalid | ||
| 3000 | * for a given reference frame. See section 7.11.3.6 Setup shear process and | ||
| 3001 | * the variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to | ||
| 3002 | * create a suitable mask. | ||
| 3003 | * @reserved: padding field. Should be zeroed by applications. | ||
| 3004 | */ | ||
| 3005 | |||
| 3006 | struct v4l2_av1_global_motion { | ||
| 3007 | 	__u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]; | ||
| 3008 | 	enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME]; | ||
| 3009 | 	__s32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]; | ||
| 3010 | 	__u8 invalid; | ||
| 3011 | 	__u8 reserved[3]; | ||
| 3012 | }; | ||
| 3013 | |||
| 3014 | /** | ||
| 3015 | * enum v4l2_av1_frame_restoration_type - AV1 Frame Restoration Type | ||
| 3016 | * @V4L2_AV1_FRAME_RESTORE_NONE: no filtering is applied. | ||
| 3017 | * @V4L2_AV1_FRAME_RESTORE_WIENER: Wiener filter process is invoked. | ||
| 3018 | * @V4L2_AV1_FRAME_RESTORE_SGRPROJ: self guided filter process is invoked. | ||
| 3019 | * @V4L2_AV1_FRAME_RESTORE_SWITCHABLE: restoration filter is swichtable. | ||
| 3020 | */ | ||
| 3021 | enum v4l2_av1_frame_restoration_type { | ||
| 3022 | 	V4L2_AV1_FRAME_RESTORE_NONE = 0, | ||
| 3023 | 	V4L2_AV1_FRAME_RESTORE_WIENER = 1, | ||
| 3024 | 	V4L2_AV1_FRAME_RESTORE_SGRPROJ = 2, | ||
| 3025 | 	V4L2_AV1_FRAME_RESTORE_SWITCHABLE = 3, | ||
| 3026 | }; | ||
| 3027 | |||
| 3028 | #define V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR		0x1 | ||
| 3029 | #define V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR	0x2 | ||
| 3030 | |||
| 3031 | /** | ||
| 3032 | * struct v4l2_av1_loop_restoration - AV1 Loop Restauration as described in | ||
| 3033 | * section 6.10.15 "Loop restoration params semantics" of the AV1 specification. | ||
| 3034 | * | ||
| 3035 | * @flags: See V4L2_AV1_LOOP_RESTORATION_FLAG_{}. | ||
| 3036 | * @lr_unit_shift: specifies if the luma restoration size should be halved. | ||
| 3037 | * @lr_uv_shift: specifies if the chroma size should be half the luma size. | ||
| 3038 | * @reserved: padding field. Should be zeroed by applications. | ||
| 3039 | * @frame_restoration_type: specifies the type of restoration used for each | ||
| 3040 | * plane. See enum v4l2_av1_frame_restoration_type. | ||
| 3041 | * @loop_restoration_size: specifies the size of loop restoration units in units | ||
| 3042 | * of samples in the current plane. | ||
| 3043 | */ | ||
| 3044 | struct v4l2_av1_loop_restoration { | ||
| 3045 | 	__u8 flags; | ||
| 3046 | 	__u8 lr_unit_shift; | ||
| 3047 | 	__u8 lr_uv_shift; | ||
| 3048 | 	__u8 reserved; | ||
| 3049 | 	enum v4l2_av1_frame_restoration_type frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]; | ||
| 3050 | 	__u32 loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]; | ||
| 3051 | }; | ||
| 3052 | |||
| 3053 | /** | ||
| 3054 | * struct v4l2_av1_cdef - AV1 CDEF params semantics as described in section | ||
| 3055 | * 6.10.14 "CDEF params semantics" of the AV1 specification | ||
| 3056 | * | ||
| 3057 | * @damping_minus_3: controls the amount of damping in the deringing filter. | ||
| 3058 | * @bits: specifies the number of bits needed to specify which CDEF filter to | ||
| 3059 | * apply. | ||
| 3060 | * @y_pri_strength: specifies the strength of the primary filter. | ||
| 3061 | * @y_sec_strength: specifies the strength of the secondary filter. | ||
| 3062 | * @uv_pri_strength: specifies the strength of the primary filter. | ||
| 3063 | * @uv_sec_strength: specifies the strength of the secondary filter. | ||
| 3064 | */ | ||
| 3065 | struct v4l2_av1_cdef { | ||
| 3066 | 	__u8 damping_minus_3; | ||
| 3067 | 	__u8 bits; | ||
| 3068 | 	__u8 y_pri_strength[V4L2_AV1_CDEF_MAX]; | ||
| 3069 | 	__u8 y_sec_strength[V4L2_AV1_CDEF_MAX]; | ||
| 3070 | 	__u8 uv_pri_strength[V4L2_AV1_CDEF_MAX]; | ||
| 3071 | 	__u8 uv_sec_strength[V4L2_AV1_CDEF_MAX]; | ||
| 3072 | }; | ||
| 3073 | |||
| 3074 | #define V4L2_AV1_SEGMENTATION_FLAG_ENABLED	 0x1 | ||
| 3075 | #define V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP	 0x2 | ||
| 3076 | #define V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE 0x4 | ||
| 3077 | #define V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA	 0x8 | ||
| 3078 | #define V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP 0x10 | ||
| 3079 | |||
| 3080 | /** | ||
| 3081 | * enum v4l2_av1_segment_feature - AV1 segment features as described in section | ||
| 3082 | * 3 "Symbols and abbreviated terms" of the AV1 specification. | ||
| 3083 | * | ||
| 3084 | * @V4L2_AV1_SEG_LVL_ALT_Q: Index for quantizer segment feature. | ||
| 3085 | * @V4L2_AV1_SEG_LVL_ALT_LF_Y_V: Index for vertical luma loop filter segment | ||
| 3086 | * feature. | ||
| 3087 | * @V4L2_AV1_SEG_LVL_REF_FRAME: Index for reference frame segment feature. | ||
| 3088 | * @V4L2_AV1_SEG_LVL_REF_SKIP: Index for skip segment feature. | ||
| 3089 | * @V4L2_AV1_SEG_LVL_REF_GLOBALMV: Index for global mv feature. | ||
| 3090 | * @V4L2_AV1_SEG_LVL_MAX: Number of segment features. | ||
| 3091 | */ | ||
| 3092 | enum v4l2_av1_segment_feature { | ||
| 3093 | 	V4L2_AV1_SEG_LVL_ALT_Q = 0, | ||
| 3094 | 	V4L2_AV1_SEG_LVL_ALT_LF_Y_V = 1, | ||
| 3095 | 	V4L2_AV1_SEG_LVL_REF_FRAME = 5, | ||
| 3096 | 	V4L2_AV1_SEG_LVL_REF_SKIP = 6, | ||
| 3097 | 	V4L2_AV1_SEG_LVL_REF_GLOBALMV = 7, | ||
| 3098 | 	V4L2_AV1_SEG_LVL_MAX = 8 | ||
| 3099 | }; | ||
| 3100 | |||
| 3101 | #define V4L2_AV1_SEGMENT_FEATURE_ENABLED(id)	(1 << (id)) | ||
| 3102 | |||
| 3103 | /** | ||
| 3104 | * struct v4l2_av1_segmentation - AV1 Segmentation params as defined in section | ||
| 3105 | * 6.8.13 "Segmentation params semantics" of the AV1 specification. | ||
| 3106 | * | ||
| 3107 | * @flags: see V4L2_AV1_SEGMENTATION_FLAG_{}. | ||
| 3108 | * @last_active_seg_id: indicates the highest numbered segment id that has some | ||
| 3109 | * enabled feature. This is used when decoding the segment id to only decode | ||
| 3110 | * choices corresponding to used segments. | ||
| 3111 | * @feature_enabled: bitmask defining which features are enabled in each | ||
| 3112 | * segment. Use V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask. | ||
| 3113 | * @feature_data: data attached to each feature. Data entry is only valid if the | ||
| 3114 | * feature is enabled | ||
| 3115 | */ | ||
| 3116 | struct v4l2_av1_segmentation { | ||
| 3117 | 	__u8 flags; | ||
| 3118 | 	__u8 last_active_seg_id; | ||
| 3119 | 	__u8 feature_enabled[V4L2_AV1_MAX_SEGMENTS]; | ||
| 3120 | 	__s16 feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]; | ||
| 3121 | }; | ||
| 3122 | |||
| 3123 | #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1 | ||
| 3124 | #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2 | ||
| 3125 | #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT 0x4 | ||
| 3126 | #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI 0x8 | ||
| 3127 | |||
| 3128 | /** | ||
| 3129 | * struct v4l2_av1_loop_filter - AV1 Loop filter params as defined in section | ||
| 3130 | * 6.8.10 "Loop filter semantics" and 6.8.16 "Loop filter delta parameters | ||
| 3131 | * semantics" of the AV1 specification. | ||
| 3132 | * | ||
| 3133 | * @flags: see V4L2_AV1_LOOP_FILTER_FLAG_{} | ||
| 3134 | * @level: an array containing loop filter strength values. Different loop | ||
| 3135 | * filter strength values from the array are used depending on the image plane | ||
| 3136 | * being filtered, and the edge direction (vertical or horizontal) being | ||
| 3137 | * filtered. | ||
| 3138 | * @sharpness: indicates the sharpness level. The loop_filter_level and | ||
| 3139 | * loop_filter_sharpness together determine when a block edge is filtered, and | ||
| 3140 | * by how much the filtering can change the sample values. The loop filter | ||
| 3141 | * process is described in section 7.14 of the AV1 specification. | ||
| 3142 | * @ref_deltas: contains the adjustment needed for the filter level based on the | ||
| 3143 | * chosen reference frame. If this syntax element is not present, it maintains | ||
| 3144 | * its previous value. | ||
| 3145 | * @mode_deltas: contains the adjustment needed for the filter level based on | ||
| 3146 | * the chosen mode. If this syntax element is not present, it maintains its | ||
| 3147 | * previous value. | ||
| 3148 | * @delta_lf_res: specifies the left shift which should be applied to decoded | ||
| 3149 | * loop filter delta values. | ||
| 3150 | */ | ||
| 3151 | struct v4l2_av1_loop_filter { | ||
| 3152 | 	__u8 flags; | ||
| 3153 | 	__u8 level[4]; | ||
| 3154 | 	__u8 sharpness; | ||
| 3155 | 	__s8 ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]; | ||
| 3156 | 	__s8 mode_deltas[2]; | ||
| 3157 | 	__u8 delta_lf_res; | ||
| 3158 | }; | ||
| 3159 | |||
| 3160 | #define V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA 0x1 | ||
| 3161 | #define V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX 0x2 | ||
| 3162 | #define V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT 0x4 | ||
| 3163 | |||
| 3164 | /** | ||
| 3165 | * struct v4l2_av1_quantization - AV1 Quantization params as defined in section | ||
| 3166 | * 6.8.11 "Quantization params semantics" of the AV1 specification. | ||
| 3167 | * | ||
| 3168 | * @flags: see V4L2_AV1_QUANTIZATION_FLAG_{} | ||
| 3169 | * @base_q_idx: indicates the base frame qindex. This is used for Y AC | ||
| 3170 | * coefficients and as the base value for the other quantizers. | ||
| 3171 | * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx. | ||
| 3172 | * @delta_q_u_dc: indicates the U DC quantizer relative to base_q_idx. | ||
| 3173 | * @delta_q_u_ac: indicates the U AC quantizer relative to base_q_idx. | ||
| 3174 | * @delta_q_v_dc: indicates the V DC quantizer relative to base_q_idx. | ||
| 3175 | * @delta_q_v_ac: indicates the V AC quantizer relative to base_q_idx. | ||
| 3176 | * @qm_y: specifies the level in the quantizer matrix that should be used for | ||
| 3177 | * luma plane decoding. | ||
| 3178 | * @qm_u: specifies the level in the quantizer matrix that should be used for | ||
| 3179 | * chroma U plane decoding. | ||
| 3180 | * @qm_v: specifies the level in the quantizer matrix that should be used for | ||
| 3181 | * chroma V plane decoding. | ||
| 3182 | * @delta_q_res: specifies the left shift which should be applied to decoded | ||
| 3183 | * quantizer index delta values. | ||
| 3184 | */ | ||
| 3185 | struct v4l2_av1_quantization { | ||
| 3186 | 	__u8 flags; | ||
| 3187 | 	__u8 base_q_idx; | ||
| 3188 | 	__s8 delta_q_y_dc; | ||
| 3189 | 	__s8 delta_q_u_dc; | ||
| 3190 | 	__s8 delta_q_u_ac; | ||
| 3191 | 	__s8 delta_q_v_dc; | ||
| 3192 | 	__s8 delta_q_v_ac; | ||
| 3193 | 	__u8 qm_y; | ||
| 3194 | 	__u8 qm_u; | ||
| 3195 | 	__u8 qm_v; | ||
| 3196 | 	__u8 delta_q_res; | ||
| 3197 | }; | ||
| 3198 | |||
| 3199 | #define V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING	0x1 | ||
| 3200 | |||
| 3201 | /** | ||
| 3202 | * struct v4l2_av1_tile_info - AV1 Tile info as defined in section 6.8.14 "Tile | ||
| 3203 | * info semantics" of the AV1 specification. | ||
| 3204 | * | ||
| 3205 | * @flags: see V4L2_AV1_TILE_INFO_FLAG_{} | ||
| 3206 | * @context_update_tile_id: specifies which tile to use for the CDF update. | ||
| 3207 | * @tile_rows: specifies the number of tiles down the frame. | ||
| 3208 | * @tile_cols: specifies the number of tiles across the frame. | ||
| 3209 | * @mi_col_starts: an array specifying the start column (in units of 4x4 luma | ||
| 3210 | * samples) for each tile across the image. | ||
| 3211 | * @mi_row_starts: an array specifying the start row (in units of 4x4 luma | ||
| 3212 | * samples) for each tile down the image. | ||
| 3213 | * @width_in_sbs_minus_1: specifies the width of a tile minus 1 in units of | ||
| 3214 | * superblocks. | ||
| 3215 | * @height_in_sbs_minus_1: specifies the height of a tile minus 1 in units of | ||
| 3216 | * superblocks. | ||
| 3217 | * @tile_size_bytes: specifies the number of bytes needed to code each tile | ||
| 3218 | * size. | ||
| 3219 | * @reserved: padding field. Should be zeroed by applications. | ||
| 3220 | */ | ||
| 3221 | struct v4l2_av1_tile_info { | ||
| 3222 | 	__u8 flags; | ||
| 3223 | 	__u8 context_update_tile_id; | ||
| 3224 | 	__u8 tile_cols; | ||
| 3225 | 	__u8 tile_rows; | ||
| 3226 | 	__u32 mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]; | ||
| 3227 | 	__u32 mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]; | ||
| 3228 | 	__u32 width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]; | ||
| 3229 | 	__u32 height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]; | ||
| 3230 | 	__u8 tile_size_bytes; | ||
| 3231 | 	__u8 reserved[3]; | ||
| 3232 | }; | ||
| 3233 | |||
| 3234 | /** | ||
| 3235 | * enum v4l2_av1_frame_type - AV1 Frame Type | ||
| 3236 | * | ||
| 3237 | * @V4L2_AV1_KEY_FRAME: Key frame | ||
| 3238 | * @V4L2_AV1_INTER_FRAME: Inter frame | ||
| 3239 | * @V4L2_AV1_INTRA_ONLY_FRAME: Intra-only frame | ||
| 3240 | * @V4L2_AV1_SWITCH_FRAME: Switch frame | ||
| 3241 | */ | ||
| 3242 | enum v4l2_av1_frame_type { | ||
| 3243 | 	V4L2_AV1_KEY_FRAME = 0, | ||
| 3244 | 	V4L2_AV1_INTER_FRAME = 1, | ||
| 3245 | 	V4L2_AV1_INTRA_ONLY_FRAME = 2, | ||
| 3246 | 	V4L2_AV1_SWITCH_FRAME = 3 | ||
| 3247 | }; | ||
| 3248 | |||
| 3249 | /** | ||
| 3250 | * enum v4l2_av1_interpolation_filter - AV1 interpolation filter types | ||
| 3251 | * | ||
| 3252 | * @V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP: eight tap filter | ||
| 3253 | * @V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH: eight tap smooth filter | ||
| 3254 | * @V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP: eight tap sharp filter | ||
| 3255 | * @V4L2_AV1_INTERPOLATION_FILTER_BILINEAR: bilinear filter | ||
| 3256 | * @V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE: filter selection is signaled at | ||
| 3257 | * the block level | ||
| 3258 | * | ||
| 3259 | * See section 6.8.9 "Interpolation filter semantics" of the AV1 specification | ||
| 3260 | * for more details. | ||
| 3261 | */ | ||
| 3262 | enum v4l2_av1_interpolation_filter { | ||
| 3263 | 	V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0, | ||
| 3264 | 	V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1, | ||
| 3265 | 	V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2, | ||
| 3266 | 	V4L2_AV1_INTERPOLATION_FILTER_BILINEAR = 3, | ||
| 3267 | 	V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4, | ||
| 3268 | }; | ||
| 3269 | |||
| 3270 | /** | ||
| 3271 | * enum v4l2_av1_tx_mode - AV1 Tx mode as described in section 6.8.21 "TX mode | ||
| 3272 | * semantics" of the AV1 specification. | ||
| 3273 | * @V4L2_AV1_TX_MODE_ONLY_4X4: the inverse transform will use only 4x4 | ||
| 3274 | * transforms | ||
| 3275 | * @V4L2_AV1_TX_MODE_LARGEST: the inverse transform will use the largest | ||
| 3276 | * transform size that fits inside the block | ||
| 3277 | * @V4L2_AV1_TX_MODE_SELECT: the choice of transform size is specified | ||
| 3278 | * explicitly for each block. | ||
| 3279 | */ | ||
| 3280 | enum v4l2_av1_tx_mode { | ||
| 3281 | 	V4L2_AV1_TX_MODE_ONLY_4X4 = 0, | ||
| 3282 | 	V4L2_AV1_TX_MODE_LARGEST = 1, | ||
| 3283 | 	V4L2_AV1_TX_MODE_SELECT = 2 | ||
| 3284 | }; | ||
| 3285 | |||
| 3286 | #define V4L2_AV1_FRAME_FLAG_SHOW_FRAME			 0x00000001 | ||
| 3287 | #define V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME		 0x00000002 | ||
| 3288 | #define V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE	 0x00000004 | ||
| 3289 | #define V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE		 0x00000008 | ||
| 3290 | #define V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS	 0x00000010 | ||
| 3291 | #define V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV		 0x00000020 | ||
| 3292 | #define V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC		 0x00000040 | ||
| 3293 | #define V4L2_AV1_FRAME_FLAG_USE_SUPERRES		 0x00000080 | ||
| 3294 | #define V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV	 0x00000100 | ||
| 3295 | #define V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE	 0x00000200 | ||
| 3296 | #define V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS		 0x00000400 | ||
| 3297 | #define V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF 0x00000800 | ||
| 3298 | #define V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION		 0x00001000 | ||
| 3299 | #define V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT		 0x00002000 | ||
| 3300 | #define V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET		 0x00004000 | ||
| 3301 | #define V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED		 0x00008000 | ||
| 3302 | #define V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT		 0x00010000 | ||
| 3303 | #define V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE		 0x00020000 | ||
| 3304 | #define V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT	 0x00040000 | ||
| 3305 | #define V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING	 0x00080000 | ||
| 3306 | |||
| 3307 | #define V4L2_CID_STATELESS_AV1_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 502) | ||
| 3308 | /** | ||
| 3309 | * struct v4l2_ctrl_av1_frame - Represents an AV1 Frame Header OBU. | ||
| 3310 | * | ||
| 3311 | * @tile_info: tile info | ||
| 3312 | * @quantization: quantization params | ||
| 3313 | * @segmentation: segmentation params | ||
| 3314 | * @superres_denom: the denominator for the upscaling ratio. | ||
| 3315 | * @loop_filter: loop filter params | ||
| 3316 | * @cdef: cdef params | ||
| 3317 | * @skip_mode_frame: specifies the frames to use for compound prediction when | ||
| 3318 | * skip_mode is equal to 1. | ||
| 3319 | * @primary_ref_frame: specifies which reference frame contains the CDF values | ||
| 3320 | * and other state that should be loaded at the start of the frame. | ||
| 3321 | * @loop_restoration: loop restoration params | ||
| 3322 | * @global_motion: global motion params | ||
| 3323 | * @flags: see V4L2_AV1_FRAME_FLAG_{} | ||
| 3324 | * @frame_type: specifies the AV1 frame type | ||
| 3325 | * @order_hint: specifies OrderHintBits least significant bits of the expected | ||
| 3326 | * output order for this frame. | ||
| 3327 | * @upscaled_width: the upscaled width. | ||
| 3328 | * @interpolation_filter: specifies the filter selection used for performing | ||
| 3329 | * inter prediction. | ||
| 3330 | * @tx_mode: specifies how the transform size is determined. | ||
| 3331 | * @frame_width_minus_1: add 1 to get the frame's width. | ||
| 3332 | * @frame_height_minus_1: add 1 to get the frame's height | ||
| 3333 | * @render_width_minus_1: add 1 to get the render width of the frame in luma | ||
| 3334 | * samples. | ||
| 3335 | * @render_height_minus_1: add 1 to get the render height of the frame in luma | ||
| 3336 | * samples. | ||
| 3337 | * @current_frame_id: specifies the frame id number for the current frame. Frame | ||
| 3338 | * id numbers are additional information that do not affect the decoding | ||
| 3339 | * process, but provide decoders with a way of detecting missing reference | ||
| 3340 | * frames so that appropriate action can be taken. | ||
| 3341 | * @buffer_removal_time: specifies the frame removal time in units of DecCT clock | ||
| 3342 | * ticks counted from the removal time of the last random access point for | ||
| 3343 | * operating point opNum. | ||
| 3344 | * @reserved: padding field. Should be zeroed by applications. | ||
| 3345 | * @order_hints: specifies the expected output order hint for each reference | ||
| 3346 | * frame. This field corresponds to the OrderHints variable from the | ||
| 3347 | * specification (section 5.9.2 "Uncompressed header syntax"). As such, this is | ||
| 3348 | * only used for non-intra frames and ignored otherwise. order_hints[0] is | ||
| 3349 | * always ignored. | ||
| 3350 | * @reference_frame_ts: the V4L2 timestamp of the reference frame slots. | ||
| 3351 | * @ref_frame_idx: used to index into @reference_frame_ts when decoding | ||
| 3352 | * inter-frames. The meaning of this array is the same as in the specification. | ||
| 3353 | * The timestamp refers to the timestamp field in struct v4l2_buffer. Use | ||
| 3354 | * v4l2_timeval_to_ns() to convert the struct timeval to a __u64. | ||
| 3355 | * @refresh_frame_flags: contains a bitmask that specifies which reference frame | ||
| 3356 | * slots will be updated with the current frame after it is decoded. | ||
| 3357 | */ | ||
| 3358 | struct v4l2_ctrl_av1_frame { | ||
| 3359 | 	struct v4l2_av1_tile_info tile_info; | ||
| 3360 | 	struct v4l2_av1_quantization quantization; | ||
| 3361 | 	__u8 superres_denom; | ||
| 3362 | 	struct v4l2_av1_segmentation segmentation; | ||
| 3363 | 	struct v4l2_av1_loop_filter loop_filter; | ||
| 3364 | 	struct v4l2_av1_cdef cdef; | ||
| 3365 | 	__u8 skip_mode_frame[2]; | ||
| 3366 | 	__u8 primary_ref_frame; | ||
| 3367 | 	struct v4l2_av1_loop_restoration loop_restoration; | ||
| 3368 | 	struct v4l2_av1_global_motion global_motion; | ||
| 3369 | 	__u32 flags; | ||
| 3370 | 	enum v4l2_av1_frame_type frame_type; | ||
| 3371 | 	__u32 order_hint; | ||
| 3372 | 	__u32 upscaled_width; | ||
| 3373 | 	enum v4l2_av1_interpolation_filter interpolation_filter; | ||
| 3374 | 	enum v4l2_av1_tx_mode tx_mode; | ||
| 3375 | 	__u32 frame_width_minus_1; | ||
| 3376 | 	__u32 frame_height_minus_1; | ||
| 3377 | 	__u16 render_width_minus_1; | ||
| 3378 | 	__u16 render_height_minus_1; | ||
| 3379 | |||
| 3380 | 	__u32 current_frame_id; | ||
| 3381 | 	__u32 buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]; | ||
| 3382 | 	__u8 reserved[4]; | ||
| 3383 | 	__u32 order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]; | ||
| 3384 | 	__u64 reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]; | ||
| 3385 | 	__s8 ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]; | ||
| 3386 | 	__u8 refresh_frame_flags; | ||
| 3387 | }; | ||
| 3388 | |||
| 3389 | #define V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN 0x1 | ||
| 3390 | #define V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN 0x2 | ||
| 3391 | #define V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA 0x4 | ||
| 3392 | #define V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP 0x8 | ||
| 3393 | #define V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE 0x10 | ||
| 3394 | |||
| 3395 | #define V4L2_CID_STATELESS_AV1_FILM_GRAIN (V4L2_CID_CODEC_STATELESS_BASE + 505) | ||
| 3396 | /** | ||
| 3397 | * struct v4l2_ctrl_av1_film_grain - AV1 Film Grain parameters. | ||
| 3398 | * | ||
| 3399 | * Film grain parameters as specified by section 6.8.20 of the AV1 Specification. | ||
| 3400 | * | ||
| 3401 | * @flags: see V4L2_AV1_FILM_GRAIN_{}. | ||
| 3402 | * @cr_mult: represents a multiplier for the cr component used in derivation of | ||
| 3403 | * the input index to the cr component scaling function. | ||
| 3404 | * @grain_seed: specifies the starting value for the pseudo-random numbers used | ||
| 3405 | * during film grain synthesis. | ||
| 3406 | * @film_grain_params_ref_idx: indicates which reference frame contains the | ||
| 3407 | * film grain parameters to be used for this frame. | ||
| 3408 | * @num_y_points: specifies the number of points for the piece-wise linear | ||
| 3409 | * scaling function of the luma component. | ||
| 3410 | * @point_y_value: represents the x (luma value) coordinate for the i-th point | ||
| 3411 | * of the piecewise linear scaling function for luma component. The values are | ||
| 3412 | * signaled on the scale of 0..255. In case of 10 bit video, these values | ||
| 3413 | * correspond to luma values divided by 4. In case of 12 bit video, these values | ||
| 3414 | * correspond to luma values divided by 16. | ||
| 3415 | * @point_y_scaling: represents the scaling (output) value for the i-th point | ||
| 3416 | * of the piecewise linear scaling function for luma component. | ||
| 3417 | * @num_cb_points: specifies the number of points for the piece-wise linear | ||
| 3418 | * scaling function of the cb component. | ||
| 3419 | * @point_cb_value: represents the x coordinate for the i-th point of the | ||
| 3420 | * piece-wise linear scaling function for cb component. The values are signaled | ||
| 3421 | * on the scale of 0..255. | ||
| 3422 | * @point_cb_scaling: represents the scaling (output) value for the i-th point | ||
| 3423 | * of the piecewise linear scaling function for cb component. | ||
| 3424 | * @num_cr_points: specifies represents the number of points for the piece-wise | ||
| 3425 | * linear scaling function of the cr component. | ||
| 3426 | * @point_cr_value: represents the x coordinate for the i-th point of the | ||
| 3427 | * piece-wise linear scaling function for cr component. The values are signaled | ||
| 3428 | * on the scale of 0..255. | ||
| 3429 | * @point_cr_scaling: represents the scaling (output) value for the i-th point | ||
| 3430 | * of the piecewise linear scaling function for cr component. | ||
| 3431 | * @grain_scaling_minus_8: represents the shift – 8 applied to the values of the | ||
| 3432 | * chroma component. The grain_scaling_minus_8 can take values of 0..3 and | ||
| 3433 | * determines the range and quantization step of the standard deviation of film | ||
| 3434 | * grain. | ||
| 3435 | * @ar_coeff_lag: specifies the number of auto-regressive coefficients for luma | ||
| 3436 | * and chroma. | ||
| 3437 | * @ar_coeffs_y_plus_128: specifies auto-regressive coefficients used for the Y | ||
| 3438 | * plane. | ||
| 3439 | * @ar_coeffs_cb_plus_128: specifies auto-regressive coefficients used for the U | ||
| 3440 | * plane. | ||
| 3441 | * @ar_coeffs_cr_plus_128: specifies auto-regressive coefficients used for the V | ||
| 3442 | * plane. | ||
| 3443 | * @ar_coeff_shift_minus_6: specifies the range of the auto-regressive | ||
| 3444 | * coefficients. Values of 0, 1, 2, and 3 correspond to the ranges for | ||
| 3445 | * auto-regressive coefficients of [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, | ||
| 3446 | * 0.25) respectively. | ||
| 3447 | * @grain_scale_shift: specifies how much the Gaussian random numbers should be | ||
| 3448 | * scaled down during the grain synthesis process. | ||
| 3449 | * @cb_mult: represents a multiplier for the cb component used in derivation of | ||
| 3450 | * the input index to the cb component scaling function. | ||
| 3451 | * @cb_luma_mult: represents a multiplier for the average luma component used in | ||
| 3452 | * derivation of the input index to the cb component scaling function. | ||
| 3453 | * @cr_luma_mult: represents a multiplier for the average luma component used in | ||
| 3454 | * derivation of the input index to the cr component scaling function. | ||
| 3455 | * @cb_offset: represents an offset used in derivation of the input index to the | ||
| 3456 | * cb component scaling function. | ||
| 3457 | * @cr_offset: represents an offset used in derivation of the input index to the | ||
| 3458 | * cr component scaling function. | ||
| 3459 | * @reserved: padding field. Should be zeroed by applications. | ||
| 3460 | */ | ||
| 3461 | struct v4l2_ctrl_av1_film_grain { | ||
| 3462 | 	__u8 flags; | ||
| 3463 | 	__u8 cr_mult; | ||
| 3464 | 	__u16 grain_seed; | ||
| 3465 | 	__u8 film_grain_params_ref_idx; | ||
| 3466 | 	__u8 num_y_points; | ||
| 3467 | 	__u8 point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]; | ||
| 3468 | 	__u8 point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]; | ||
| 3469 | 	__u8 num_cb_points; | ||
| 3470 | 	__u8 point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]; | ||
| 3471 | 	__u8 point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]; | ||
| 3472 | 	__u8 num_cr_points; | ||
| 3473 | 	__u8 point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]; | ||
| 3474 | 	__u8 point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]; | ||
| 3475 | 	__u8 grain_scaling_minus_8; | ||
| 3476 | 	__u8 ar_coeff_lag; | ||
| 3477 | 	__u8 ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]; | ||
| 3478 | 	__u8 ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]; | ||
| 3479 | 	__u8 ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]; | ||
| 3480 | 	__u8 ar_coeff_shift_minus_6; | ||
| 3481 | 	__u8 grain_scale_shift; | ||
| 3482 | 	__u8 cb_mult; | ||
| 3483 | 	__u8 cb_luma_mult; | ||
| 3484 | 	__u8 cr_luma_mult; | ||
| 3485 | 	__u16 cb_offset; | ||
| 3486 | 	__u16 cr_offset; | ||
| 3487 | 	__u8 reserved[4]; | ||
| 3488 | }; | ||
| 3489 | |||
| 2753 | /* MPEG-compression definitions kept for backwards compatibility */ | 3490 | /* MPEG-compression definitions kept for backwards compatibility */ |
| 2754 | #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC | 3491 | #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC |
| 2755 | #define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS | 3492 | #define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS |
lib/libc/include/any-linux-any/linux/v4l2-mediabus.h+12-6| ... | @@ -19,12 +19,18 @@ | ... | @@ -19,12 +19,18 @@ |
| 19 | * @width:	image width | 19 | * @width:	image width |
| 20 | * @height:	image height | 20 | * @height:	image height |
| 21 | * @code:	data format code (from enum v4l2_mbus_pixelcode) | 21 | * @code:	data format code (from enum v4l2_mbus_pixelcode) |
| 22 | * @field:	used interlacing type (from enum v4l2_field) | 22 | * @field:	used interlacing type (from enum v4l2_field), zero for metadata |
| 23 | * @colorspace:	colorspace of the data (from enum v4l2_colorspace) | 23 | *		mbus codes |
| 24 | * @ycbcr_enc:	YCbCr encoding of the data (from enum v4l2_ycbcr_encoding) | 24 | * @colorspace:	colorspace of the data (from enum v4l2_colorspace), zero on |
| 25 | * @hsv_enc:	HSV encoding of the data (from enum v4l2_hsv_encoding) | 25 | *		metadata mbus codes |
| 26 | * @quantization: quantization of the data (from enum v4l2_quantization) | 26 | * @ycbcr_enc:	YCbCr encoding of the data (from enum v4l2_ycbcr_encoding), zero |
| 27 | * @xfer_func: transfer function of the data (from enum v4l2_xfer_func) | 27 | *		for metadata mbus codes |
| 28 | * @hsv_enc:	HSV encoding of the data (from enum v4l2_hsv_encoding), zero for | ||
| 29 | *		metadata mbus codes | ||
| 30 | * @quantization: quantization of the data (from enum v4l2_quantization), zero | ||
| 31 | *		for metadata mbus codes | ||
| 32 | * @xfer_func: transfer function of the data (from enum v4l2_xfer_func), zero | ||
| 33 | *		for metadata mbus codes | ||
| 28 | * @flags:	flags (V4L2_MBUS_FRAMEFMT_*) | 34 | * @flags:	flags (V4L2_MBUS_FRAMEFMT_*) |
| 29 | * @reserved: reserved bytes that can be later used | 35 | * @reserved: reserved bytes that can be later used |
| 30 | */ | 36 | */ |
lib/libc/include/any-linux-any/linux/v4l2-subdev.h+43-5| ... | @@ -50,6 +50,10 @@ struct v4l2_subdev_format { | ... | @@ -50,6 +50,10 @@ struct v4l2_subdev_format { |
| 50 | * @rect: pad crop rectangle boundaries | 50 | * @rect: pad crop rectangle boundaries |
| 51 | * @stream: stream number, defined in subdev routing | 51 | * @stream: stream number, defined in subdev routing |
| 52 | * @reserved: drivers and applications must zero this array | 52 | * @reserved: drivers and applications must zero this array |
| 53 | * | ||
| 54 | * The subdev crop API is an obsolete interface and may be removed in the | ||
| 55 | * future. It is superseded by the selection API. No new extensions to this | ||
| 56 | * structure will be accepted. | ||
| 53 | */ | 57 | */ |
| 54 | struct v4l2_subdev_crop { | 58 | struct v4l2_subdev_crop { |
| 55 | 	__u32 which; | 59 | 	__u32 which; |
| ... | @@ -116,13 +120,15 @@ struct v4l2_subdev_frame_size_enum { | ... | @@ -116,13 +120,15 @@ struct v4l2_subdev_frame_size_enum { |
| 116 | * @pad: pad number, as reported by the media API | 120 | * @pad: pad number, as reported by the media API |
| 117 | * @interval: frame interval in seconds | 121 | * @interval: frame interval in seconds |
| 118 | * @stream: stream number, defined in subdev routing | 122 | * @stream: stream number, defined in subdev routing |
| 123 | * @which: interval type (from enum v4l2_subdev_format_whence) | ||
| 119 | * @reserved: drivers and applications must zero this array | 124 | * @reserved: drivers and applications must zero this array |
| 120 | */ | 125 | */ |
| 121 | struct v4l2_subdev_frame_interval { | 126 | struct v4l2_subdev_frame_interval { |
| 122 | 	__u32 pad; | 127 | 	__u32 pad; |
| 123 | 	struct v4l2_fract interval; | 128 | 	struct v4l2_fract interval; |
| 124 | 	__u32 stream; | 129 | 	__u32 stream; |
| 125 | 	__u32 reserved[8]; | 130 | 	__u32 which; |
| 131 | 	__u32 reserved[7]; | ||
| 126 | }; | 132 | }; |
| 127 | 133 | ||
| 128 | /** | 134 | /** |
| ... | @@ -133,7 +139,7 @@ struct v4l2_subdev_frame_interval { | ... | @@ -133,7 +139,7 @@ struct v4l2_subdev_frame_interval { |
| 133 | * @width: frame width in pixels | 139 | * @width: frame width in pixels |
| 134 | * @height: frame height in pixels | 140 | * @height: frame height in pixels |
| 135 | * @interval: frame interval in seconds | 141 | * @interval: frame interval in seconds |
| 136 | * @which: format type (from enum v4l2_subdev_format_whence) | 142 | * @which: interval type (from enum v4l2_subdev_format_whence) |
| 137 | * @stream: stream number, defined in subdev routing | 143 | * @stream: stream number, defined in subdev routing |
| 138 | * @reserved: drivers and applications must zero this array | 144 | * @reserved: drivers and applications must zero this array |
| 139 | */ | 145 | */ |
| ... | @@ -222,15 +228,44 @@ struct v4l2_subdev_route { | ... | @@ -222,15 +228,44 @@ struct v4l2_subdev_route { |
| 222 | * struct v4l2_subdev_routing - Subdev routing information | 228 | * struct v4l2_subdev_routing - Subdev routing information |
| 223 | * | 229 | * |
| 224 | * @which: configuration type (from enum v4l2_subdev_format_whence) | 230 | * @which: configuration type (from enum v4l2_subdev_format_whence) |
| 225 | * @num_routes: the total number of routes in the routes array | 231 | * @len_routes: the length of the routes array, in routes; set by the user, not |
| 232 | *		modified by the kernel | ||
| 226 | * @routes: pointer to the routes array | 233 | * @routes: pointer to the routes array |
| 234 | * @num_routes: the total number of routes, possibly more than fits in the | ||
| 235 | *		routes array | ||
| 227 | * @reserved: drivers and applications must zero this array | 236 | * @reserved: drivers and applications must zero this array |
| 228 | */ | 237 | */ |
| 229 | struct v4l2_subdev_routing { | 238 | struct v4l2_subdev_routing { |
| 230 | 	__u32 which; | 239 | 	__u32 which; |
| 231 | 	__u32 num_routes; | 240 | 	__u32 len_routes; |
| 232 | 	__u64 routes; | 241 | 	__u64 routes; |
| 233 | 	__u32 reserved[6]; | 242 | 	__u32 num_routes; |
| 243 | 	__u32 reserved[11]; | ||
| 244 | }; | ||
| 245 | |||
| 246 | /* | ||
| 247 | * The client is aware of streams. Setting this flag enables the use of 'stream' | ||
| 248 | * fields (referring to the stream number) with various ioctls. If this is not | ||
| 249 | * set (which is the default), the 'stream' fields will be forced to 0 by the | ||
| 250 | * kernel. | ||
| 251 | */ | ||
| 252 | #define V4L2_SUBDEV_CLIENT_CAP_STREAMS			(1ULL << 0) | ||
| 253 | |||
| 254 | /* | ||
| 255 | * The client is aware of the struct v4l2_subdev_frame_interval which field. If | ||
| 256 | * this is not set (which is the default), the which field is forced to | ||
| 257 | * V4L2_SUBDEV_FORMAT_ACTIVE by the kernel. | ||
| 258 | */ | ||
| 259 | #define V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH	(1ULL << 1) | ||
| 260 | |||
| 261 | /** | ||
| 262 | * struct v4l2_subdev_client_capability - Capabilities of the client accessing | ||
| 263 | *					 the subdev | ||
| 264 | * | ||
| 265 | * @capabilities: A bitmask of V4L2_SUBDEV_CLIENT_CAP_* flags. | ||
| 266 | */ | ||
| 267 | struct v4l2_subdev_client_capability { | ||
| 268 | 	__u64 capabilities; | ||
| 234 | }; | 269 | }; |
| 235 | 270 | ||
| 236 | /* Backwards compatibility define --- to be removed */ | 271 | /* Backwards compatibility define --- to be removed */ |
| ... | @@ -250,6 +285,9 @@ struct v4l2_subdev_routing { | ... | @@ -250,6 +285,9 @@ struct v4l2_subdev_routing { |
| 250 | #define VIDIOC_SUBDEV_S_SELECTION		_IOWR('V', 62, struct v4l2_subdev_selection) | 285 | #define VIDIOC_SUBDEV_S_SELECTION		_IOWR('V', 62, struct v4l2_subdev_selection) |
| 251 | #define VIDIOC_SUBDEV_G_ROUTING			_IOWR('V', 38, struct v4l2_subdev_routing) | 286 | #define VIDIOC_SUBDEV_G_ROUTING			_IOWR('V', 38, struct v4l2_subdev_routing) |
| 252 | #define VIDIOC_SUBDEV_S_ROUTING			_IOWR('V', 39, struct v4l2_subdev_routing) | 287 | #define VIDIOC_SUBDEV_S_ROUTING			_IOWR('V', 39, struct v4l2_subdev_routing) |
| 288 | #define VIDIOC_SUBDEV_G_CLIENT_CAP		_IOR('V', 101, struct v4l2_subdev_client_capability) | ||
| 289 | #define VIDIOC_SUBDEV_S_CLIENT_CAP		_IOWR('V', 102, struct v4l2_subdev_client_capability) | ||
| 290 | |||
| 253 | /* The following ioctls are identical to the ioctls in videodev2.h */ | 291 | /* The following ioctls are identical to the ioctls in videodev2.h */ |
| 254 | #define VIDIOC_SUBDEV_G_STD			_IOR('V', 23, v4l2_std_id) | 292 | #define VIDIOC_SUBDEV_G_STD			_IOR('V', 23, v4l2_std_id) |
| 255 | #define VIDIOC_SUBDEV_S_STD			_IOW('V', 24, v4l2_std_id) | 293 | #define VIDIOC_SUBDEV_S_STD			_IOW('V', 24, v4l2_std_id) |
lib/libc/include/any-linux-any/linux/vdpa.h+17| ... | @@ -56,6 +56,23 @@ enum vdpa_attr { | ... | @@ -56,6 +56,23 @@ enum vdpa_attr { |
| 56 | 	/* virtio features that are provisioned to the vDPA device */ | 56 | 	/* virtio features that are provisioned to the vDPA device */ |
| 57 | 	VDPA_ATTR_DEV_FEATURES, /* u64 */ | 57 | 	VDPA_ATTR_DEV_FEATURES, /* u64 */ |
| 58 | 58 | ||
| 59 | 	VDPA_ATTR_DEV_BLK_CFG_CAPACITY,		/* u64 */ | ||
| 60 | 	VDPA_ATTR_DEV_BLK_CFG_SIZE_MAX,		/* u32 */ | ||
| 61 | 	VDPA_ATTR_DEV_BLK_CFG_BLK_SIZE,		/* u32 */ | ||
| 62 | 	VDPA_ATTR_DEV_BLK_CFG_SEG_MAX,		/* u32 */ | ||
| 63 | 	VDPA_ATTR_DEV_BLK_CFG_NUM_QUEUES,	/* u16 */ | ||
| 64 | 	VDPA_ATTR_DEV_BLK_CFG_PHY_BLK_EXP,	/* u8 */ | ||
| 65 | 	VDPA_ATTR_DEV_BLK_CFG_ALIGN_OFFSET,	/* u8 */ | ||
| 66 | 	VDPA_ATTR_DEV_BLK_CFG_MIN_IO_SIZE,	/* u16 */ | ||
| 67 | 	VDPA_ATTR_DEV_BLK_CFG_OPT_IO_SIZE,	/* u32 */ | ||
| 68 | 	VDPA_ATTR_DEV_BLK_CFG_MAX_DISCARD_SEC,	/* u32 */ | ||
| 69 | 	VDPA_ATTR_DEV_BLK_CFG_MAX_DISCARD_SEG,	/* u32 */ | ||
| 70 | 	VDPA_ATTR_DEV_BLK_CFG_DISCARD_SEC_ALIGN,/* u32 */ | ||
| 71 | 	VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEC,	/* u32 */ | ||
| 72 | 	VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEG,	/* u32 */ | ||
| 73 | 	VDPA_ATTR_DEV_BLK_READ_ONLY,		/* u8 */ | ||
| 74 | 	VDPA_ATTR_DEV_BLK_FLUSH,		/* u8 */ | ||
| 75 | |||
| 59 | 	/* new attributes must be added above here */ | 76 | 	/* new attributes must be added above here */ |
| 60 | 	VDPA_ATTR_MAX, | 77 | 	VDPA_ATTR_MAX, |
| 61 | }; | 78 | }; |
lib/libc/include/any-linux-any/linux/version.h+3-3| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | #define LINUX_VERSION_CODE 393992 | 1 | #define LINUX_VERSION_CODE 395776 |
| 2 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) | 2 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) |
| 3 | #define LINUX_VERSION_MAJOR 6 | 3 | #define LINUX_VERSION_MAJOR 6 |
| 4 | #define LINUX_VERSION_PATCHLEVEL 3 | ||
| 5 | #define LINUX_VERSION_SUBLEVEL 8 | ||
| \ No newline at end of file | |||
| 4 | #define LINUX_VERSION_PATCHLEVEL 10 | ||
| 5 | #define LINUX_VERSION_SUBLEVEL 0 | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vesa.h created+18| ... | @@ -0,0 +1,18 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _LINUX_VESA_H | ||
| 3 | #define _LINUX_VESA_H | ||
| 4 | |||
| 5 | /* VESA Blanking Levels */ | ||
| 6 | enum vesa_blank_mode { | ||
| 7 | 	VESA_NO_BLANKING	= 0, | ||
| 8 | #define VESA_NO_BLANKING	VESA_NO_BLANKING | ||
| 9 | 	VESA_VSYNC_SUSPEND	= 1, | ||
| 10 | #define VESA_VSYNC_SUSPEND	VESA_VSYNC_SUSPEND | ||
| 11 | 	VESA_HSYNC_SUSPEND	= 2, | ||
| 12 | #define VESA_HSYNC_SUSPEND	VESA_HSYNC_SUSPEND | ||
| 13 | 	VESA_POWERDOWN		= VESA_VSYNC_SUSPEND | VESA_HSYNC_SUSPEND, | ||
| 14 | #define VESA_POWERDOWN		VESA_POWERDOWN | ||
| 15 | 	VESA_BLANK_MAX		= VESA_POWERDOWN, | ||
| 16 | }; | ||
| 17 | |||
| 18 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vfio.h+212-13| ... | @@ -213,9 +213,11 @@ struct vfio_device_info { | ... | @@ -213,9 +213,11 @@ struct vfio_device_info { |
| 213 | #define VFIO_DEVICE_FLAGS_AP	(1 << 5)	/* vfio-ap device */ | 213 | #define VFIO_DEVICE_FLAGS_AP	(1 << 5)	/* vfio-ap device */ |
| 214 | #define VFIO_DEVICE_FLAGS_FSL_MC (1 << 6)	/* vfio-fsl-mc device */ | 214 | #define VFIO_DEVICE_FLAGS_FSL_MC (1 << 6)	/* vfio-fsl-mc device */ |
| 215 | #define VFIO_DEVICE_FLAGS_CAPS	(1 << 7)	/* Info supports caps */ | 215 | #define VFIO_DEVICE_FLAGS_CAPS	(1 << 7)	/* Info supports caps */ |
| 216 | #define VFIO_DEVICE_FLAGS_CDX	(1 << 8)	/* vfio-cdx device */ | ||
| 216 | 	__u32	num_regions;	/* Max region index + 1 */ | 217 | 	__u32	num_regions;	/* Max region index + 1 */ |
| 217 | 	__u32	num_irqs;	/* Max IRQ index + 1 */ | 218 | 	__u32	num_irqs;	/* Max IRQ index + 1 */ |
| 218 | 	__u32 cap_offset;	/* Offset within info struct of first cap */ | 219 | 	__u32 cap_offset;	/* Offset within info struct of first cap */ |
| 220 | 	__u32 pad; | ||
| 219 | }; | 221 | }; |
| 220 | #define VFIO_DEVICE_GET_INFO		_IO(VFIO_TYPE, VFIO_BASE + 7) | 222 | #define VFIO_DEVICE_GET_INFO		_IO(VFIO_TYPE, VFIO_BASE + 7) |
| 221 | 223 | ||
| ... | @@ -240,6 +242,20 @@ struct vfio_device_info { | ... | @@ -240,6 +242,20 @@ struct vfio_device_info { |
| 240 | #define VFIO_DEVICE_INFO_CAP_ZPCI_UTIL		3 | 242 | #define VFIO_DEVICE_INFO_CAP_ZPCI_UTIL		3 |
| 241 | #define VFIO_DEVICE_INFO_CAP_ZPCI_PFIP		4 | 243 | #define VFIO_DEVICE_INFO_CAP_ZPCI_PFIP		4 |
| 242 | 244 | ||
| 245 | /* | ||
| 246 | * The following VFIO_DEVICE_INFO capability reports support for PCIe AtomicOp | ||
| 247 | * completion to the root bus with supported widths provided via flags. | ||
| 248 | */ | ||
| 249 | #define VFIO_DEVICE_INFO_CAP_PCI_ATOMIC_COMP	5 | ||
| 250 | struct vfio_device_info_cap_pci_atomic_comp { | ||
| 251 | 	struct vfio_info_cap_header header; | ||
| 252 | 	__u32 flags; | ||
| 253 | #define VFIO_PCI_ATOMIC_COMP32	(1 << 0) | ||
| 254 | #define VFIO_PCI_ATOMIC_COMP64	(1 << 1) | ||
| 255 | #define VFIO_PCI_ATOMIC_COMP128	(1 << 2) | ||
| 256 | 	__u32 reserved; | ||
| 257 | }; | ||
| 258 | |||
| 243 | /** | 259 | /** |
| 244 | * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, | 260 | * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, |
| 245 | *				 struct vfio_region_info) | 261 | *				 struct vfio_region_info) |
| ... | @@ -261,8 +277,8 @@ struct vfio_region_info { | ... | @@ -261,8 +277,8 @@ struct vfio_region_info { |
| 261 | #define VFIO_REGION_INFO_FLAG_CAPS	(1 << 3) /* Info supports caps */ | 277 | #define VFIO_REGION_INFO_FLAG_CAPS	(1 << 3) /* Info supports caps */ |
| 262 | 	__u32	index;		/* Region index */ | 278 | 	__u32	index;		/* Region index */ |
| 263 | 	__u32	cap_offset;	/* Offset within info struct of first cap */ | 279 | 	__u32	cap_offset;	/* Offset within info struct of first cap */ |
| 264 | 	__u64	size;		/* Region size (bytes) */ | 280 | 	__aligned_u64	size;	/* Region size (bytes) */ |
| 265 | 	__u64	offset;		/* Region offset from start of device fd */ | 281 | 	__aligned_u64	offset;	/* Region offset from start of device fd */ |
| 266 | }; | 282 | }; |
| 267 | #define VFIO_DEVICE_GET_REGION_INFO	_IO(VFIO_TYPE, VFIO_BASE + 8) | 283 | #define VFIO_DEVICE_GET_REGION_INFO	_IO(VFIO_TYPE, VFIO_BASE + 8) |
| 268 | 284 | ||
| ... | @@ -278,8 +294,8 @@ struct vfio_region_info { | ... | @@ -278,8 +294,8 @@ struct vfio_region_info { |
| 278 | #define VFIO_REGION_INFO_CAP_SPARSE_MMAP	1 | 294 | #define VFIO_REGION_INFO_CAP_SPARSE_MMAP	1 |
| 279 | 295 | ||
| 280 | struct vfio_region_sparse_mmap_area { | 296 | struct vfio_region_sparse_mmap_area { |
| 281 | 	__u64	offset;	/* Offset of mmap'able area within region */ | 297 | 	__aligned_u64	offset;	/* Offset of mmap'able area within region */ |
| 282 | 	__u64	size;	/* Size of mmap'able area */ | 298 | 	__aligned_u64	size;	/* Size of mmap'able area */ |
| 283 | }; | 299 | }; |
| 284 | 300 | ||
| 285 | struct vfio_region_info_cap_sparse_mmap { | 301 | struct vfio_region_info_cap_sparse_mmap { |
| ... | @@ -434,9 +450,9 @@ struct vfio_device_migration_info { | ... | @@ -434,9 +450,9 @@ struct vfio_device_migration_info { |
| 434 | 					 VFIO_DEVICE_STATE_V1_RESUMING) | 450 | 					 VFIO_DEVICE_STATE_V1_RESUMING) |
| 435 | 451 | ||
| 436 | 	__u32 reserved; | 452 | 	__u32 reserved; |
| 437 | 	__u64 pending_bytes; | 453 | 	__aligned_u64 pending_bytes; |
| 438 | 	__u64 data_offset; | 454 | 	__aligned_u64 data_offset; |
| 439 | 	__u64 data_size; | 455 | 	__aligned_u64 data_size; |
| 440 | }; | 456 | }; |
| 441 | 457 | ||
| 442 | /* | 458 | /* |
| ... | @@ -460,7 +476,7 @@ struct vfio_device_migration_info { | ... | @@ -460,7 +476,7 @@ struct vfio_device_migration_info { |
| 460 | 476 | ||
| 461 | struct vfio_region_info_cap_nvlink2_ssatgt { | 477 | struct vfio_region_info_cap_nvlink2_ssatgt { |
| 462 | 	struct vfio_info_cap_header header; | 478 | 	struct vfio_info_cap_header header; |
| 463 | 	__u64 tgt; | 479 | 	__aligned_u64 tgt; |
| 464 | }; | 480 | }; |
| 465 | 481 | ||
| 466 | /* | 482 | /* |
| ... | @@ -511,6 +527,9 @@ struct vfio_region_info_cap_nvlink2_lnkspd { | ... | @@ -511,6 +527,9 @@ struct vfio_region_info_cap_nvlink2_lnkspd { |
| 511 | * then add and unmask vectors, it's up to userspace to make the decision | 527 | * then add and unmask vectors, it's up to userspace to make the decision |
| 512 | * whether to allocate the maximum supported number of vectors or tear | 528 | * whether to allocate the maximum supported number of vectors or tear |
| 513 | * down setup and incrementally increase the vectors as each is enabled. | 529 | * down setup and incrementally increase the vectors as each is enabled. |
| 530 | * Absence of the NORESIZE flag indicates that vectors can be enabled | ||
| 531 | * and disabled dynamically without impacting other vectors within the | ||
| 532 | * index. | ||
| 514 | */ | 533 | */ |
| 515 | struct vfio_irq_info { | 534 | struct vfio_irq_info { |
| 516 | 	__u32	argsz; | 535 | 	__u32	argsz; |
| ... | @@ -646,15 +665,73 @@ enum { | ... | @@ -646,15 +665,73 @@ enum { |
| 646 | 	VFIO_CCW_NUM_IRQS | 665 | 	VFIO_CCW_NUM_IRQS |
| 647 | }; | 666 | }; |
| 648 | 667 | ||
| 668 | /* | ||
| 669 | * The vfio-ap bus driver makes use of the following IRQ index mapping. | ||
| 670 | * Unimplemented IRQ types return a count of zero. | ||
| 671 | */ | ||
| 672 | enum { | ||
| 673 | 	VFIO_AP_REQ_IRQ_INDEX, | ||
| 674 | 	VFIO_AP_NUM_IRQS | ||
| 675 | }; | ||
| 676 | |||
| 649 | /** | 677 | /** |
| 650 | * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 12, | 678 | * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 12, |
| 651 | *					 struct vfio_pci_hot_reset_info) | 679 | *					 struct vfio_pci_hot_reset_info) |
| 652 | * | 680 | * |
| 681 | * This command is used to query the affected devices in the hot reset for | ||
| 682 | * a given device. | ||
| 683 | * | ||
| 684 | * This command always reports the segment, bus, and devfn information for | ||
| 685 | * each affected device, and selectively reports the group_id or devid per | ||
| 686 | * the way how the calling device is opened. | ||
| 687 | * | ||
| 688 | *	- If the calling device is opened via the traditional group/container | ||
| 689 | *	 API, group_id is reported. User should check if it has owned all | ||
| 690 | *	 the affected devices and provides a set of group fds to prove the | ||
| 691 | *	 ownership in VFIO_DEVICE_PCI_HOT_RESET ioctl. | ||
| 692 | * | ||
| 693 | *	- If the calling device is opened as a cdev, devid is reported. | ||
| 694 | *	 Flag VFIO_PCI_HOT_RESET_FLAG_DEV_ID is set to indicate this | ||
| 695 | *	 data type. All the affected devices should be represented in | ||
| 696 | *	 the dev_set, ex. bound to a vfio driver, and also be owned by | ||
| 697 | *	 this interface which is determined by the following conditions: | ||
| 698 | *	 1) Has a valid devid within the iommufd_ctx of the calling device. | ||
| 699 | *	 Ownership cannot be determined across separate iommufd_ctx and | ||
| 700 | *	 the cdev calling conventions do not support a proof-of-ownership | ||
| 701 | *	 model as provided in the legacy group interface. In this case | ||
| 702 | *	 valid devid with value greater than zero is provided in the return | ||
| 703 | *	 structure. | ||
| 704 | *	 2) Does not have a valid devid within the iommufd_ctx of the calling | ||
| 705 | *	 device, but belongs to the same IOMMU group as the calling device | ||
| 706 | *	 or another opened device that has a valid devid within the | ||
| 707 | *	 iommufd_ctx of the calling device. This provides implicit ownership | ||
| 708 | *	 for devices within the same DMA isolation context. In this case | ||
| 709 | *	 the devid value of VFIO_PCI_DEVID_OWNED is provided in the return | ||
| 710 | *	 structure. | ||
| 711 | * | ||
| 712 | *	 A devid value of VFIO_PCI_DEVID_NOT_OWNED is provided in the return | ||
| 713 | *	 structure for affected devices where device is NOT represented in the | ||
| 714 | *	 dev_set or ownership is not available. Such devices prevent the use | ||
| 715 | *	 of VFIO_DEVICE_PCI_HOT_RESET ioctl outside of the proof-of-ownership | ||
| 716 | *	 calling conventions (ie. via legacy group accessed devices). Flag | ||
| 717 | *	 VFIO_PCI_HOT_RESET_FLAG_DEV_ID_OWNED would be set when all the | ||
| 718 | *	 affected devices are represented in the dev_set and also owned by | ||
| 719 | *	 the user. This flag is available only when | ||
| 720 | *	 flag VFIO_PCI_HOT_RESET_FLAG_DEV_ID is set, otherwise reserved. | ||
| 721 | *	 When set, user could invoke VFIO_DEVICE_PCI_HOT_RESET with a zero | ||
| 722 | *	 length fd array on the calling device as the ownership is validated | ||
| 723 | *	 by iommufd_ctx. | ||
| 724 | * | ||
| 653 | * Return: 0 on success, -errno on failure: | 725 | * Return: 0 on success, -errno on failure: |
| 654 | *	-enospc = insufficient buffer, -enodev = unsupported for device. | 726 | *	-enospc = insufficient buffer, -enodev = unsupported for device. |
| 655 | */ | 727 | */ |
| 656 | struct vfio_pci_dependent_device { | 728 | struct vfio_pci_dependent_device { |
| 657 | 	__u32	group_id; | 729 | 	union { |
| 730 | 		__u32 group_id; | ||
| 731 | 		__u32	devid; | ||
| 732 | #define VFIO_PCI_DEVID_OWNED		0 | ||
| 733 | #define VFIO_PCI_DEVID_NOT_OWNED	-1 | ||
| 734 | 	}; | ||
| 658 | 	__u16	segment; | 735 | 	__u16	segment; |
| 659 | 	__u8	bus; | 736 | 	__u8	bus; |
| 660 | 	__u8	devfn; /* Use PCI_SLOT/PCI_FUNC */ | 737 | 	__u8	devfn; /* Use PCI_SLOT/PCI_FUNC */ |
| ... | @@ -663,6 +740,8 @@ struct vfio_pci_dependent_device { | ... | @@ -663,6 +740,8 @@ struct vfio_pci_dependent_device { |
| 663 | struct vfio_pci_hot_reset_info { | 740 | struct vfio_pci_hot_reset_info { |
| 664 | 	__u32	argsz; | 741 | 	__u32	argsz; |
| 665 | 	__u32	flags; | 742 | 	__u32	flags; |
| 743 | #define VFIO_PCI_HOT_RESET_FLAG_DEV_ID		(1 << 0) | ||
| 744 | #define VFIO_PCI_HOT_RESET_FLAG_DEV_ID_OWNED	(1 << 1) | ||
| 666 | 	__u32	count; | 745 | 	__u32	count; |
| 667 | 	struct vfio_pci_dependent_device	devices[]; | 746 | 	struct vfio_pci_dependent_device	devices[]; |
| 668 | }; | 747 | }; |
| ... | @@ -673,6 +752,24 @@ struct vfio_pci_hot_reset_info { | ... | @@ -673,6 +752,24 @@ struct vfio_pci_hot_reset_info { |
| 673 | * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13, | 752 | * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13, |
| 674 | *				 struct vfio_pci_hot_reset) | 753 | *				 struct vfio_pci_hot_reset) |
| 675 | * | 754 | * |
| 755 | * A PCI hot reset results in either a bus or slot reset which may affect | ||
| 756 | * other devices sharing the bus/slot. The calling user must have | ||
| 757 | * ownership of the full set of affected devices as determined by the | ||
| 758 | * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl. | ||
| 759 | * | ||
| 760 | * When called on a device file descriptor acquired through the vfio | ||
| 761 | * group interface, the user is required to provide proof of ownership | ||
| 762 | * of those affected devices via the group_fds array in struct | ||
| 763 | * vfio_pci_hot_reset. | ||
| 764 | * | ||
| 765 | * When called on a direct cdev opened vfio device, the flags field of | ||
| 766 | * struct vfio_pci_hot_reset_info reports the ownership status of the | ||
| 767 | * affected devices and this ioctl must be called with an empty group_fds | ||
| 768 | * array. See above INFO ioctl definition for ownership requirements. | ||
| 769 | * | ||
| 770 | * Mixed usage of legacy groups and cdevs across the set of affected | ||
| 771 | * devices is not supported. | ||
| 772 | * | ||
| 676 | * Return: 0 on success, -errno on failure. | 773 | * Return: 0 on success, -errno on failure. |
| 677 | */ | 774 | */ |
| 678 | struct vfio_pci_hot_reset { | 775 | struct vfio_pci_hot_reset { |
| ... | @@ -719,7 +816,7 @@ struct vfio_device_gfx_plane_info { | ... | @@ -719,7 +816,7 @@ struct vfio_device_gfx_plane_info { |
| 719 | 	__u32 drm_plane_type;	/* type of plane: DRM_PLANE_TYPE_* */ | 816 | 	__u32 drm_plane_type;	/* type of plane: DRM_PLANE_TYPE_* */ |
| 720 | 	/* out */ | 817 | 	/* out */ |
| 721 | 	__u32 drm_format;	/* drm format of plane */ | 818 | 	__u32 drm_format;	/* drm format of plane */ |
| 722 | 	__u64 drm_format_mod; /* tiled mode */ | 819 | 	__aligned_u64 drm_format_mod; /* tiled mode */ |
| 723 | 	__u32 width;	/* width of plane */ | 820 | 	__u32 width;	/* width of plane */ |
| 724 | 	__u32 height;	/* height of plane */ | 821 | 	__u32 height;	/* height of plane */ |
| 725 | 	__u32 stride;	/* stride of plane */ | 822 | 	__u32 stride;	/* stride of plane */ |
| ... | @@ -732,6 +829,7 @@ struct vfio_device_gfx_plane_info { | ... | @@ -732,6 +829,7 @@ struct vfio_device_gfx_plane_info { |
| 732 | 		__u32 region_index;	/* region index */ | 829 | 		__u32 region_index;	/* region index */ |
| 733 | 		__u32 dmabuf_id;	/* dma-buf id */ | 830 | 		__u32 dmabuf_id;	/* dma-buf id */ |
| 734 | 	}; | 831 | 	}; |
| 832 | 	__u32 reserved; | ||
| 735 | }; | 833 | }; |
| 736 | 834 | ||
| 737 | #define VFIO_DEVICE_QUERY_GFX_PLANE _IO(VFIO_TYPE, VFIO_BASE + 14) | 835 | #define VFIO_DEVICE_QUERY_GFX_PLANE _IO(VFIO_TYPE, VFIO_BASE + 14) |
| ... | @@ -766,9 +864,10 @@ struct vfio_device_ioeventfd { | ... | @@ -766,9 +864,10 @@ struct vfio_device_ioeventfd { |
| 766 | #define VFIO_DEVICE_IOEVENTFD_32	(1 << 2) /* 4-byte write */ | 864 | #define VFIO_DEVICE_IOEVENTFD_32	(1 << 2) /* 4-byte write */ |
| 767 | #define VFIO_DEVICE_IOEVENTFD_64	(1 << 3) /* 8-byte write */ | 865 | #define VFIO_DEVICE_IOEVENTFD_64	(1 << 3) /* 8-byte write */ |
| 768 | #define VFIO_DEVICE_IOEVENTFD_SIZE_MASK	(0xf) | 866 | #define VFIO_DEVICE_IOEVENTFD_SIZE_MASK	(0xf) |
| 769 | 	__u64	offset;			/* device fd offset of write */ | 867 | 	__aligned_u64	offset;		/* device fd offset of write */ |
| 770 | 	__u64	data;			/* data to be written */ | 868 | 	__aligned_u64	data;		/* data to be written */ |
| 771 | 	__s32	fd;			/* -1 for de-assignment */ | 869 | 	__s32	fd;			/* -1 for de-assignment */ |
| 870 | 	__u32	reserved; | ||
| 772 | }; | 871 | }; |
| 773 | 872 | ||
| 774 | #define VFIO_DEVICE_IOEVENTFD		_IO(VFIO_TYPE, VFIO_BASE + 16) | 873 | #define VFIO_DEVICE_IOEVENTFD		_IO(VFIO_TYPE, VFIO_BASE + 16) |
| ... | @@ -801,6 +900,83 @@ struct vfio_device_feature { | ... | @@ -801,6 +900,83 @@ struct vfio_device_feature { |
| 801 | 900 | ||
| 802 | #define VFIO_DEVICE_FEATURE		_IO(VFIO_TYPE, VFIO_BASE + 17) | 901 | #define VFIO_DEVICE_FEATURE		_IO(VFIO_TYPE, VFIO_BASE + 17) |
| 803 | 902 | ||
| 903 | /* | ||
| 904 | * VFIO_DEVICE_BIND_IOMMUFD - _IOR(VFIO_TYPE, VFIO_BASE + 18, | ||
| 905 | *				 struct vfio_device_bind_iommufd) | ||
| 906 | * @argsz:	 User filled size of this data. | ||
| 907 | * @flags:	 Must be 0. | ||
| 908 | * @iommufd:	 iommufd to bind. | ||
| 909 | * @out_devid:	 The device id generated by this bind. devid is a handle for | ||
| 910 | *		 this device/iommufd bond and can be used in IOMMUFD commands. | ||
| 911 | * | ||
| 912 | * Bind a vfio_device to the specified iommufd. | ||
| 913 | * | ||
| 914 | * User is restricted from accessing the device before the binding operation | ||
| 915 | * is completed. Only allowed on cdev fds. | ||
| 916 | * | ||
| 917 | * Unbind is automatically conducted when device fd is closed. | ||
| 918 | * | ||
| 919 | * Return: 0 on success, -errno on failure. | ||
| 920 | */ | ||
| 921 | struct vfio_device_bind_iommufd { | ||
| 922 | 	__u32		argsz; | ||
| 923 | 	__u32		flags; | ||
| 924 | 	__s32		iommufd; | ||
| 925 | 	__u32		out_devid; | ||
| 926 | }; | ||
| 927 | |||
| 928 | #define VFIO_DEVICE_BIND_IOMMUFD	_IO(VFIO_TYPE, VFIO_BASE + 18) | ||
| 929 | |||
| 930 | /* | ||
| 931 | * VFIO_DEVICE_ATTACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 19, | ||
| 932 | *					struct vfio_device_attach_iommufd_pt) | ||
| 933 | * @argsz:	User filled size of this data. | ||
| 934 | * @flags:	Must be 0. | ||
| 935 | * @pt_id:	Input the target id which can represent an ioas or a hwpt | ||
| 936 | *		allocated via iommufd subsystem. | ||
| 937 | *		Output the input ioas id or the attached hwpt id which could | ||
| 938 | *		be the specified hwpt itself or a hwpt automatically created | ||
| 939 | *		for the specified ioas by kernel during the attachment. | ||
| 940 | * | ||
| 941 | * Associate the device with an address space within the bound iommufd. | ||
| 942 | * Undo by VFIO_DEVICE_DETACH_IOMMUFD_PT or device fd close. This is only | ||
| 943 | * allowed on cdev fds. | ||
| 944 | * | ||
| 945 | * If a vfio device is currently attached to a valid hw_pagetable, without doing | ||
| 946 | * a VFIO_DEVICE_DETACH_IOMMUFD_PT, a second VFIO_DEVICE_ATTACH_IOMMUFD_PT ioctl | ||
| 947 | * passing in another hw_pagetable (hwpt) id is allowed. This action, also known | ||
| 948 | * as a hw_pagetable replacement, will replace the device's currently attached | ||
| 949 | * hw_pagetable with a new hw_pagetable corresponding to the given pt_id. | ||
| 950 | * | ||
| 951 | * Return: 0 on success, -errno on failure. | ||
| 952 | */ | ||
| 953 | struct vfio_device_attach_iommufd_pt { | ||
| 954 | 	__u32	argsz; | ||
| 955 | 	__u32	flags; | ||
| 956 | 	__u32	pt_id; | ||
| 957 | }; | ||
| 958 | |||
| 959 | #define VFIO_DEVICE_ATTACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 19) | ||
| 960 | |||
| 961 | /* | ||
| 962 | * VFIO_DEVICE_DETACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 20, | ||
| 963 | *					struct vfio_device_detach_iommufd_pt) | ||
| 964 | * @argsz:	User filled size of this data. | ||
| 965 | * @flags:	Must be 0. | ||
| 966 | * | ||
| 967 | * Remove the association of the device and its current associated address | ||
| 968 | * space. After it, the device should be in a blocking DMA state. This is only | ||
| 969 | * allowed on cdev fds. | ||
| 970 | * | ||
| 971 | * Return: 0 on success, -errno on failure. | ||
| 972 | */ | ||
| 973 | struct vfio_device_detach_iommufd_pt { | ||
| 974 | 	__u32	argsz; | ||
| 975 | 	__u32	flags; | ||
| 976 | }; | ||
| 977 | |||
| 978 | #define VFIO_DEVICE_DETACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 20) | ||
| 979 | |||
| 804 | /* | 980 | /* |
| 805 | * Provide support for setting a PCI VF Token, which is used as a shared | 981 | * Provide support for setting a PCI VF Token, which is used as a shared |
| 806 | * secret between PF and VF drivers. This feature may only be set on a | 982 | * secret between PF and VF drivers. This feature may only be set on a |
| ... | @@ -1043,6 +1219,7 @@ enum vfio_device_mig_state { | ... | @@ -1043,6 +1219,7 @@ enum vfio_device_mig_state { |
| 1043 | 	VFIO_DEVICE_STATE_RUNNING_P2P = 5, | 1219 | 	VFIO_DEVICE_STATE_RUNNING_P2P = 5, |
| 1044 | 	VFIO_DEVICE_STATE_PRE_COPY = 6, | 1220 | 	VFIO_DEVICE_STATE_PRE_COPY = 6, |
| 1045 | 	VFIO_DEVICE_STATE_PRE_COPY_P2P = 7, | 1221 | 	VFIO_DEVICE_STATE_PRE_COPY_P2P = 7, |
| 1222 | 	VFIO_DEVICE_STATE_NR, | ||
| 1046 | }; | 1223 | }; |
| 1047 | 1224 | ||
| 1048 | /** | 1225 | /** |
| ... | @@ -1260,6 +1437,27 @@ struct vfio_device_feature_mig_data_size { | ... | @@ -1260,6 +1437,27 @@ struct vfio_device_feature_mig_data_size { |
| 1260 | 1437 | ||
| 1261 | #define VFIO_DEVICE_FEATURE_MIG_DATA_SIZE 9 | 1438 | #define VFIO_DEVICE_FEATURE_MIG_DATA_SIZE 9 |
| 1262 | 1439 | ||
| 1440 | /** | ||
| 1441 | * Upon VFIO_DEVICE_FEATURE_SET, set or clear the BUS mastering for the device | ||
| 1442 | * based on the operation specified in op flag. | ||
| 1443 | * | ||
| 1444 | * The functionality is incorporated for devices that needs bus master control, | ||
| 1445 | * but the in-band device interface lacks the support. Consequently, it is not | ||
| 1446 | * applicable to PCI devices, as bus master control for PCI devices is managed | ||
| 1447 | * in-band through the configuration space. At present, this feature is supported | ||
| 1448 | * only for CDX devices. | ||
| 1449 | * When the device's BUS MASTER setting is configured as CLEAR, it will result in | ||
| 1450 | * blocking all incoming DMA requests from the device. On the other hand, configuring | ||
| 1451 | * the device's BUS MASTER setting as SET (enable) will grant the device the | ||
| 1452 | * capability to perform DMA to the host memory. | ||
| 1453 | */ | ||
| 1454 | struct vfio_device_feature_bus_master { | ||
| 1455 | 	__u32 op; | ||
| 1456 | #define		VFIO_DEVICE_FEATURE_CLEAR_MASTER	0	/* Clear Bus Master */ | ||
| 1457 | #define		VFIO_DEVICE_FEATURE_SET_MASTER		1	/* Set Bus Master */ | ||
| 1458 | }; | ||
| 1459 | #define VFIO_DEVICE_FEATURE_BUS_MASTER 10 | ||
| 1460 | |||
| 1263 | /* -------- API for Type1 VFIO IOMMU -------- */ | 1461 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 1264 | 1462 | ||
| 1265 | /** | 1463 | /** |
| ... | @@ -1275,8 +1473,9 @@ struct vfio_iommu_type1_info { | ... | @@ -1275,8 +1473,9 @@ struct vfio_iommu_type1_info { |
| 1275 | 	__u32	flags; | 1473 | 	__u32	flags; |
| 1276 | #define VFIO_IOMMU_INFO_PGSIZES (1 << 0)	/* supported page sizes info */ | 1474 | #define VFIO_IOMMU_INFO_PGSIZES (1 << 0)	/* supported page sizes info */ |
| 1277 | #define VFIO_IOMMU_INFO_CAPS	(1 << 1)	/* Info supports caps */ | 1475 | #define VFIO_IOMMU_INFO_CAPS	(1 << 1)	/* Info supports caps */ |
| 1278 | 	__u64	iova_pgsizes;	/* Bitmap of supported page sizes */ | 1476 | 	__aligned_u64	iova_pgsizes;		/* Bitmap of supported page sizes */ |
| 1279 | 	__u32 cap_offset;	/* Offset within info struct of first cap */ | 1477 | 	__u32 cap_offset;	/* Offset within info struct of first cap */ |
| 1478 | 	__u32 pad; | ||
| 1280 | }; | 1479 | }; |
| 1281 | 1480 | ||
| 1282 | /* | 1481 | /* |
lib/libc/include/any-linux-any/linux/vhost.h+53-6| ... | @@ -45,6 +45,25 @@ | ... | @@ -45,6 +45,25 @@ |
| 45 | #define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64) | 45 | #define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64) |
| 46 | /* Specify an eventfd file descriptor to signal on log write. */ | 46 | /* Specify an eventfd file descriptor to signal on log write. */ |
| 47 | #define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int) | 47 | #define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int) |
| 48 | /* By default, a device gets one vhost_worker that its virtqueues share. This | ||
| 49 | * command allows the owner of the device to create an additional vhost_worker | ||
| 50 | * for the device. It can later be bound to 1 or more of its virtqueues using | ||
| 51 | * the VHOST_ATTACH_VRING_WORKER command. | ||
| 52 | * | ||
| 53 | * This must be called after VHOST_SET_OWNER and the caller must be the owner | ||
| 54 | * of the device. The new thread will inherit caller's cgroups and namespaces, | ||
| 55 | * and will share the caller's memory space. The new thread will also be | ||
| 56 | * counted against the caller's RLIMIT_NPROC value. | ||
| 57 | * | ||
| 58 | * The worker's ID used in other commands will be returned in | ||
| 59 | * vhost_worker_state. | ||
| 60 | */ | ||
| 61 | #define VHOST_NEW_WORKER _IOR(VHOST_VIRTIO, 0x8, struct vhost_worker_state) | ||
| 62 | /* Free a worker created with VHOST_NEW_WORKER if it's not attached to any | ||
| 63 | * virtqueue. If userspace is not able to call this for workers its created, | ||
| 64 | * the kernel will free all the device's workers when the device is closed. | ||
| 65 | */ | ||
| 66 | #define VHOST_FREE_WORKER _IOW(VHOST_VIRTIO, 0x9, struct vhost_worker_state) | ||
| 48 | 67 | ||
| 49 | /* Ring setup. */ | 68 | /* Ring setup. */ |
| 50 | /* Set number of descriptors in ring. This parameter can not | 69 | /* Set number of descriptors in ring. This parameter can not |
| ... | @@ -70,6 +89,18 @@ | ... | @@ -70,6 +89,18 @@ |
| 70 | #define VHOST_VRING_BIG_ENDIAN 1 | 89 | #define VHOST_VRING_BIG_ENDIAN 1 |
| 71 | #define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) | 90 | #define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) |
| 72 | #define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) | 91 | #define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) |
| 92 | /* Attach a vhost_worker created with VHOST_NEW_WORKER to one of the device's | ||
| 93 | * virtqueues. | ||
| 94 | * | ||
| 95 | * This will replace the virtqueue's existing worker. If the replaced worker | ||
| 96 | * is no longer attached to any virtqueues, it can be freed with | ||
| 97 | * VHOST_FREE_WORKER. | ||
| 98 | */ | ||
| 99 | #define VHOST_ATTACH_VRING_WORKER _IOW(VHOST_VIRTIO, 0x15,		\ | ||
| 100 | 				 struct vhost_vring_worker) | ||
| 101 | /* Return the vring worker's ID */ | ||
| 102 | #define VHOST_GET_VRING_WORKER _IOWR(VHOST_VIRTIO, 0x16,		\ | ||
| 103 | 				 struct vhost_vring_worker) | ||
| 73 | 104 | ||
| 74 | /* The following ioctls use eventfd file descriptors to signal and poll | 105 | /* The following ioctls use eventfd file descriptors to signal and poll |
| 75 | * for events. */ | 106 | * for events. */ |
| ... | @@ -148,12 +179,6 @@ | ... | @@ -148,12 +179,6 @@ |
| 148 | /* Get the config size */ | 179 | /* Get the config size */ |
| 149 | #define VHOST_VDPA_GET_CONFIG_SIZE	_IOR(VHOST_VIRTIO, 0x79, __u32) | 180 | #define VHOST_VDPA_GET_CONFIG_SIZE	_IOR(VHOST_VIRTIO, 0x79, __u32) |
| 150 | 181 | ||
| 151 | /* Get the count of all virtqueues */ | ||
| 152 | #define VHOST_VDPA_GET_VQS_COUNT	_IOR(VHOST_VIRTIO, 0x80, __u32) | ||
| 153 | |||
| 154 | /* Get the number of virtqueue groups. */ | ||
| 155 | #define VHOST_VDPA_GET_GROUP_NUM	_IOR(VHOST_VIRTIO, 0x81, __u32) | ||
| 156 | |||
| 157 | /* Get the number of address spaces. */ | 182 | /* Get the number of address spaces. */ |
| 158 | #define VHOST_VDPA_GET_AS_NUM		_IOR(VHOST_VIRTIO, 0x7A, unsigned int) | 183 | #define VHOST_VDPA_GET_AS_NUM		_IOR(VHOST_VIRTIO, 0x7A, unsigned int) |
| 159 | 184 | ||
| ... | @@ -188,4 +213,26 @@ | ... | @@ -188,4 +213,26 @@ |
| 188 | */ | 213 | */ |
| 189 | #define VHOST_VDPA_RESUME		_IO(VHOST_VIRTIO, 0x7E) | 214 | #define VHOST_VDPA_RESUME		_IO(VHOST_VIRTIO, 0x7E) |
| 190 | 215 | ||
| 216 | /* Get the group for the descriptor table including driver & device areas | ||
| 217 | * of a virtqueue: read index, write group in num. | ||
| 218 | * The virtqueue index is stored in the index field of vhost_vring_state. | ||
| 219 | * The group ID of the descriptor table for this specific virtqueue | ||
| 220 | * is returned via num field of vhost_vring_state. | ||
| 221 | */ | ||
| 222 | #define VHOST_VDPA_GET_VRING_DESC_GROUP	_IOWR(VHOST_VIRTIO, 0x7F,	\ | ||
| 223 | 					 struct vhost_vring_state) | ||
| 224 | |||
| 225 | |||
| 226 | /* Get the count of all virtqueues */ | ||
| 227 | #define VHOST_VDPA_GET_VQS_COUNT	_IOR(VHOST_VIRTIO, 0x80, __u32) | ||
| 228 | |||
| 229 | /* Get the number of virtqueue groups. */ | ||
| 230 | #define VHOST_VDPA_GET_GROUP_NUM	_IOR(VHOST_VIRTIO, 0x81, __u32) | ||
| 231 | |||
| 232 | /* Get the queue size of a specific virtqueue. | ||
| 233 | * userspace set the vring index in vhost_vring_state.index | ||
| 234 | * kernel set the queue size in vhost_vring_state.num | ||
| 235 | */ | ||
| 236 | #define VHOST_VDPA_GET_VRING_SIZE	_IOWR(VHOST_VIRTIO, 0x82,	\ | ||
| 237 | 					 struct vhost_vring_state) | ||
| 191 | #endif | 238 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vhost_types.h+27| ... | @@ -47,6 +47,22 @@ struct vhost_vring_addr { | ... | @@ -47,6 +47,22 @@ struct vhost_vring_addr { |
| 47 | 	__u64 log_guest_addr; | 47 | 	__u64 log_guest_addr; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | struct vhost_worker_state { | ||
| 51 | 	/* | ||
| 52 | 	 * For VHOST_NEW_WORKER the kernel will return the new vhost_worker id. | ||
| 53 | 	 * For VHOST_FREE_WORKER this must be set to the id of the vhost_worker | ||
| 54 | 	 * to free. | ||
| 55 | 	 */ | ||
| 56 | 	unsigned int worker_id; | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct vhost_vring_worker { | ||
| 60 | 	/* vring index */ | ||
| 61 | 	unsigned int index; | ||
| 62 | 	/* The id of the vhost_worker returned from VHOST_NEW_WORKER */ | ||
| 63 | 	unsigned int worker_id; | ||
| 64 | }; | ||
| 65 | |||
| 50 | /* no alignment requirement */ | 66 | /* no alignment requirement */ |
| 51 | struct vhost_iotlb_msg { | 67 | struct vhost_iotlb_msg { |
| 52 | 	__u64 iova; | 68 | 	__u64 iova; |
| ... | @@ -165,5 +181,16 @@ struct vhost_vdpa_iova_range { | ... | @@ -165,5 +181,16 @@ struct vhost_vdpa_iova_range { |
| 165 | #define VHOST_BACKEND_F_SUSPEND 0x4 | 181 | #define VHOST_BACKEND_F_SUSPEND 0x4 |
| 166 | /* Device can be resumed */ | 182 | /* Device can be resumed */ |
| 167 | #define VHOST_BACKEND_F_RESUME 0x5 | 183 | #define VHOST_BACKEND_F_RESUME 0x5 |
| 184 | /* Device supports the driver enabling virtqueues both before and after | ||
| 185 | * DRIVER_OK | ||
| 186 | */ | ||
| 187 | #define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK 0x6 | ||
| 188 | /* Device may expose the virtqueue's descriptor area, driver area and | ||
| 189 | * device area to a different group for ASID binding than where its | ||
| 190 | * buffers may reside. Requires VHOST_BACKEND_F_IOTLB_ASID. | ||
| 191 | */ | ||
| 192 | #define VHOST_BACKEND_F_DESC_ASID 0x7 | ||
| 193 | /* IOTLB don't flush memory mapping across device reset */ | ||
| 194 | #define VHOST_BACKEND_F_IOTLB_PERSIST 0x8 | ||
| 168 | 195 | ||
| 169 | #endif | 196 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/videodev2.h+83-21| ... | @@ -553,12 +553,17 @@ struct v4l2_pix_format { | ... | @@ -553,12 +553,17 @@ struct v4l2_pix_format { |
| 553 | #define V4L2_PIX_FMT_RGBA1010102 v4l2_fourcc('R', 'A', '3', '0') /* 32 RGBA-10-10-10-2 */ | 553 | #define V4L2_PIX_FMT_RGBA1010102 v4l2_fourcc('R', 'A', '3', '0') /* 32 RGBA-10-10-10-2 */ |
| 554 | #define V4L2_PIX_FMT_ARGB2101010 v4l2_fourcc('A', 'R', '3', '0') /* 32 ARGB-2-10-10-10 */ | 554 | #define V4L2_PIX_FMT_ARGB2101010 v4l2_fourcc('A', 'R', '3', '0') /* 32 ARGB-2-10-10-10 */ |
| 555 | 555 | ||
| 556 | /* RGB formats (6 or 8 bytes per pixel) */ | ||
| 557 | #define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */ | ||
| 558 | #define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */ | ||
| 559 | |||
| 556 | /* Grey formats */ | 560 | /* Grey formats */ |
| 557 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ | 561 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ |
| 558 | #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ | 562 | #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ |
| 559 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ | 563 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ |
| 560 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | 564 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ |
| 561 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ | 565 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ |
| 566 | #define V4L2_PIX_FMT_Y012 v4l2_fourcc('Y', '0', '1', '2') /* 12 Greyscale */ | ||
| 562 | #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ | 567 | #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ |
| 563 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 568 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
| 564 | #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ | 569 | #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ |
| ... | @@ -567,6 +572,8 @@ struct v4l2_pix_format { | ... | @@ -567,6 +572,8 @@ struct v4l2_pix_format { |
| 567 | #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ | 572 | #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ |
| 568 | #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ | 573 | #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ |
| 569 | #define V4L2_PIX_FMT_IPU3_Y10		v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */ | 574 | #define V4L2_PIX_FMT_IPU3_Y10		v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */ |
| 575 | #define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */ | ||
| 576 | #define V4L2_PIX_FMT_Y14P v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */ | ||
| 570 | 577 | ||
| 571 | /* Palette formats */ | 578 | /* Palette formats */ |
| 572 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ | 579 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ |
| ... | @@ -593,6 +600,7 @@ struct v4l2_pix_format { | ... | @@ -593,6 +600,7 @@ struct v4l2_pix_format { |
| 593 | #define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ | 600 | #define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ |
| 594 | #define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ | 601 | #define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ |
| 595 | #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ | 602 | #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ |
| 603 | #define V4L2_PIX_FMT_YUV48_12 v4l2_fourcc('Y', '3', '1', '2') /* 48 YUV 4:4:4 12-bit per component */ | ||
| 596 | 604 | ||
| 597 | /* | 605 | /* |
| 598 | * YCbCr packed format. For each Y2xx format, xx bits of valid data occupy the MSBs | 606 | * YCbCr packed format. For each Y2xx format, xx bits of valid data occupy the MSBs |
| ... | @@ -610,12 +618,14 @@ struct v4l2_pix_format { | ... | @@ -610,12 +618,14 @@ struct v4l2_pix_format { |
| 610 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ | 618 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ |
| 611 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ | 619 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ |
| 612 | #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ | 620 | #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ |
| 621 | #define V4L2_PIX_FMT_P012 v4l2_fourcc('P', '0', '1', '2') /* 24 Y/CbCr 4:2:0 12-bit per component */ | ||
| 613 | 622 | ||
| 614 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ | 623 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ |
| 615 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 624 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| 616 | #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ | 625 | #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ |
| 617 | #define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ | 626 | #define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ |
| 618 | #define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ | 627 | #define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ |
| 628 | #define V4L2_PIX_FMT_P012M v4l2_fourcc('P', 'M', '1', '2') /* 24 Y/CbCr 4:2:0 12-bit per component */ | ||
| 619 | 629 | ||
| 620 | /* three planes - Y Cb, Cr */ | 630 | /* three planes - Y Cb, Cr */ |
| 621 | #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ | 631 | #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ |
| ... | @@ -637,6 +647,7 @@ struct v4l2_pix_format { | ... | @@ -637,6 +647,7 @@ struct v4l2_pix_format { |
| 637 | #define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */ | 647 | #define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */ |
| 638 | #define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ | 648 | #define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ |
| 639 | #define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */ | 649 | #define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */ |
| 650 | #define V4L2_PIX_FMT_NV15_4L4 v4l2_fourcc('V', 'T', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit 4x4 tiles */ | ||
| 640 | #define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */ | 651 | #define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */ |
| 641 | #define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ | 652 | #define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ |
| 642 | #define V4L2_PIX_FMT_NV12_10BE_8L128 v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */ | 653 | #define V4L2_PIX_FMT_NV12_10BE_8L128 v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */ |
| ... | @@ -723,6 +734,10 @@ struct v4l2_pix_format { | ... | @@ -723,6 +734,10 @@ struct v4l2_pix_format { |
| 723 | #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ | 734 | #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ |
| 724 | #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ | 735 | #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ |
| 725 | #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ | 736 | #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ |
| 737 | #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */ | ||
| 738 | #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ | ||
| 739 | #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ | ||
| 740 | #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */ | ||
| 726 | 741 | ||
| 727 | /* Vendor-specific formats */ | 742 | /* Vendor-specific formats */ |
| 728 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | 743 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ |
| ... | @@ -756,12 +771,15 @@ struct v4l2_pix_format { | ... | @@ -756,12 +771,15 @@ struct v4l2_pix_format { |
| 756 | #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ | 771 | #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ |
| 757 | #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ | 772 | #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ |
| 758 | #define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ | 773 | #define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ |
| 774 | #define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */ | ||
| 775 | #define V4L2_PIX_FMT_MT2110R v4l2_fourcc('M', 'T', '2', 'R') /* Mediatek 10-bit block raster mode */ | ||
| 759 | #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ | 776 | #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ |
| 760 | #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ | 777 | #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ |
| 761 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ | 778 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ |
| 762 | #define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ | 779 | #define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ |
| 763 | #define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ | 780 | #define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ |
| 764 | #define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ | 781 | #define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ |
| 782 | #define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compressed */ | ||
| 765 | 783 | ||
| 766 | /* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ | 784 | /* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ |
| 767 | #define V4L2_PIX_FMT_IPU3_SBGGR10	v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ | 785 | #define V4L2_PIX_FMT_IPU3_SBGGR10	v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ |
| ... | @@ -796,6 +814,7 @@ struct v4l2_pix_format { | ... | @@ -796,6 +814,7 @@ struct v4l2_pix_format { |
| 796 | #define V4L2_META_FMT_RK_ISP1_PARAMS	v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ | 814 | #define V4L2_META_FMT_RK_ISP1_PARAMS	v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ |
| 797 | #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ | 815 | #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ |
| 798 | 816 | ||
| 817 | |||
| 799 | /* priv field value to indicates that subsequent fields are valid. */ | 818 | /* priv field value to indicates that subsequent fields are valid. */ |
| 800 | #define V4L2_PIX_FMT_PRIV_MAGIC		0xfeedcafe | 819 | #define V4L2_PIX_FMT_PRIV_MAGIC		0xfeedcafe |
| 801 | 820 | ||
| ... | @@ -826,6 +845,7 @@ struct v4l2_fmtdesc { | ... | @@ -826,6 +845,7 @@ struct v4l2_fmtdesc { |
| 826 | #define V4L2_FMT_FLAG_CSC_YCBCR_ENC		0x0080 | 845 | #define V4L2_FMT_FLAG_CSC_YCBCR_ENC		0x0080 |
| 827 | #define V4L2_FMT_FLAG_CSC_HSV_ENC		V4L2_FMT_FLAG_CSC_YCBCR_ENC | 846 | #define V4L2_FMT_FLAG_CSC_HSV_ENC		V4L2_FMT_FLAG_CSC_YCBCR_ENC |
| 828 | #define V4L2_FMT_FLAG_CSC_QUANTIZATION		0x0100 | 847 | #define V4L2_FMT_FLAG_CSC_QUANTIZATION		0x0100 |
| 848 | #define V4L2_FMT_FLAG_META_LINE_BASED		0x0200 | ||
| 829 | 849 | ||
| 830 | 	/* Frame Size and frame rate enumeration */ | 850 | 	/* Frame Size and frame rate enumeration */ |
| 831 | /* | 851 | /* |
| ... | @@ -975,18 +995,20 @@ struct v4l2_requestbuffers { | ... | @@ -975,18 +995,20 @@ struct v4l2_requestbuffers { |
| 975 | #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS		(1 << 4) | 995 | #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS		(1 << 4) |
| 976 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF	(1 << 5) | 996 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF	(1 << 5) |
| 977 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS		(1 << 6) | 997 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS		(1 << 6) |
| 998 | #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS		(1 << 7) | ||
| 999 | #define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS		(1 << 8) | ||
| 978 | 1000 | ||
| 979 | /** | 1001 | /** |
| 980 | * struct v4l2_plane - plane info for multi-planar buffers | 1002 | * struct v4l2_plane - plane info for multi-planar buffers |
| 981 | * @bytesused:		number of bytes occupied by data in the plane (payload) | 1003 | * @bytesused:		number of bytes occupied by data in the plane (payload) |
| 982 | * @length:		size of this plane (NOT the payload) in bytes | 1004 | * @length:		size of this plane (NOT the payload) in bytes |
| 983 | * @mem_offset:		when memory in the associated struct v4l2_buffer is | 1005 | * @m.mem_offset:	when memory in the associated struct v4l2_buffer is |
| 984 | *			V4L2_MEMORY_MMAP, equals the offset from the start of | 1006 | *			V4L2_MEMORY_MMAP, equals the offset from the start of |
| 985 | *			the device memory for this plane (or is a "cookie" that | 1007 | *			the device memory for this plane (or is a "cookie" that |
| 986 | *			should be passed to mmap() called on the video node) | 1008 | *			should be passed to mmap() called on the video node) |
| 987 | * @userptr:		when memory is V4L2_MEMORY_USERPTR, a userspace pointer | 1009 | * @m.userptr:		when memory is V4L2_MEMORY_USERPTR, a userspace pointer |
| 988 | *			pointing to this plane | 1010 | *			pointing to this plane |
| 989 | * @fd:			when memory is V4L2_MEMORY_DMABUF, a userspace file | 1011 | * @m.fd:		when memory is V4L2_MEMORY_DMABUF, a userspace file |
| 990 | *			descriptor associated with this plane | 1012 | *			descriptor associated with this plane |
| 991 | * @m:			union of @mem_offset, @userptr and @fd | 1013 | * @m:			union of @mem_offset, @userptr and @fd |
| 992 | * @data_offset:	offset in the plane to the start of data; usually 0, | 1014 | * @data_offset:	offset in the plane to the start of data; usually 0, |
| ... | @@ -1024,14 +1046,14 @@ struct v4l2_plane { | ... | @@ -1024,14 +1046,14 @@ struct v4l2_plane { |
| 1024 | * @sequence:	sequence count of this frame | 1046 | * @sequence:	sequence count of this frame |
| 1025 | * @memory:	enum v4l2_memory; the method, in which the actual video data is | 1047 | * @memory:	enum v4l2_memory; the method, in which the actual video data is |
| 1026 | *		passed | 1048 | *		passed |
| 1027 | * @offset:	for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP; | 1049 | * @m.offset:	for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP; |
| 1028 | *		offset from the start of the device memory for this plane, | 1050 | *		offset from the start of the device memory for this plane, |
| 1029 | *		(or a "cookie" that should be passed to mmap() as offset) | 1051 | *		(or a "cookie" that should be passed to mmap() as offset) |
| 1030 | * @userptr:	for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR; | 1052 | * @m.userptr:	for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR; |
| 1031 | *		a userspace pointer pointing to this buffer | 1053 | *		a userspace pointer pointing to this buffer |
| 1032 | * @fd:		for non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF; | 1054 | * @m.fd:		for non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF; |
| 1033 | *		a userspace file descriptor associated with this buffer | 1055 | *		a userspace file descriptor associated with this buffer |
| 1034 | * @planes:	for multiplanar buffers; userspace pointer to the array of plane | 1056 | * @m.planes:	for multiplanar buffers; userspace pointer to the array of plane |
| 1035 | *		info structs for this buffer | 1057 | *		info structs for this buffer |
| 1036 | * @m:		union of @offset, @userptr, @planes and @fd | 1058 | * @m:		union of @offset, @userptr, @planes and @fd |
| 1037 | * @length:	size in bytes of the buffer (NOT its payload) for single-plane | 1059 | * @length:	size in bytes of the buffer (NOT its payload) for single-plane |
| ... | @@ -1657,7 +1679,7 @@ struct v4l2_input { | ... | @@ -1657,7 +1679,7 @@ struct v4l2_input { |
| 1657 | 	__u8	 name[32];		/* Label */ | 1679 | 	__u8	 name[32];		/* Label */ |
| 1658 | 	__u32	 type;		/* Type of input */ | 1680 | 	__u32	 type;		/* Type of input */ |
| 1659 | 	__u32	 audioset;		/* Associated audios (bitfield) */ | 1681 | 	__u32	 audioset;		/* Associated audios (bitfield) */ |
| 1660 | 	__u32 tuner; /* enum v4l2_tuner_type */ | 1682 | 	__u32 tuner; /* Tuner index */ |
| 1661 | 	v4l2_std_id std; | 1683 | 	v4l2_std_id std; |
| 1662 | 	__u32	 status; | 1684 | 	__u32	 status; |
| 1663 | 	__u32	 capabilities; | 1685 | 	__u32	 capabilities; |
| ... | @@ -1744,8 +1766,8 @@ struct v4l2_ext_control { | ... | @@ -1744,8 +1766,8 @@ struct v4l2_ext_control { |
| 1744 | 		__u8 *p_u8; | 1766 | 		__u8 *p_u8; |
| 1745 | 		__u16 *p_u16; | 1767 | 		__u16 *p_u16; |
| 1746 | 		__u32 *p_u32; | 1768 | 		__u32 *p_u32; |
| 1747 | 		__u32 *p_s32; | 1769 | 		__s32 *p_s32; |
| 1748 | 		__u32 *p_s64; | 1770 | 		__s64 *p_s64; |
| 1749 | 		struct v4l2_area *p_area; | 1771 | 		struct v4l2_area *p_area; |
| 1750 | 		struct v4l2_ctrl_h264_sps *p_h264_sps; | 1772 | 		struct v4l2_ctrl_h264_sps *p_h264_sps; |
| 1751 | 		struct v4l2_ctrl_h264_pps *p_h264_pps; | 1773 | 		struct v4l2_ctrl_h264_pps *p_h264_pps; |
| ... | @@ -1765,8 +1787,14 @@ struct v4l2_ext_control { | ... | @@ -1765,8 +1787,14 @@ struct v4l2_ext_control { |
| 1765 | 		struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; | 1787 | 		struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; |
| 1766 | 		struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix; | 1788 | 		struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix; |
| 1767 | 		struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params; | 1789 | 		struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params; |
| 1790 | 		struct v4l2_ctrl_av1_sequence *p_av1_sequence; | ||
| 1791 | 		struct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry; | ||
| 1792 | 		struct v4l2_ctrl_av1_frame *p_av1_frame; | ||
| 1793 | 		struct v4l2_ctrl_av1_film_grain *p_av1_film_grain; | ||
| 1794 | 		struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info; | ||
| 1795 | 		struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display; | ||
| 1768 | 		void *ptr; | 1796 | 		void *ptr; |
| 1769 | 	}; | 1797 | 	} __attribute__ ((packed)); |
| 1770 | } __attribute__ ((packed)); | 1798 | } __attribute__ ((packed)); |
| 1771 | 1799 | ||
| 1772 | struct v4l2_ext_controls { | 1800 | struct v4l2_ext_controls { |
| ... | @@ -1834,6 +1862,11 @@ enum v4l2_ctrl_type { | ... | @@ -1834,6 +1862,11 @@ enum v4l2_ctrl_type { |
| 1834 | 	V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS	= 0x0272, | 1862 | 	V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS	= 0x0272, |
| 1835 | 	V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX	= 0x0273, | 1863 | 	V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX	= 0x0273, |
| 1836 | 	V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS	= 0x0274, | 1864 | 	V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS	= 0x0274, |
| 1865 | |||
| 1866 | 	V4L2_CTRL_TYPE_AV1_SEQUENCE	 = 0x280, | ||
| 1867 | 	V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281, | ||
| 1868 | 	V4L2_CTRL_TYPE_AV1_FRAME	 = 0x282, | ||
| 1869 | 	V4L2_CTRL_TYPE_AV1_FILM_GRAIN	 = 0x283, | ||
| 1837 | }; | 1870 | }; |
| 1838 | 1871 | ||
| 1839 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 1872 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
| ... | @@ -2331,23 +2364,32 @@ struct v4l2_sdr_format { | ... | @@ -2331,23 +2364,32 @@ struct v4l2_sdr_format { |
| 2331 | * struct v4l2_meta_format - metadata format definition | 2364 | * struct v4l2_meta_format - metadata format definition |
| 2332 | * @dataformat:		little endian four character code (fourcc) | 2365 | * @dataformat:		little endian four character code (fourcc) |
| 2333 | * @buffersize:		maximum size in bytes required for data | 2366 | * @buffersize:		maximum size in bytes required for data |
| 2367 | * @width:		number of data units of data per line (valid for line | ||
| 2368 | *			based formats only, see format documentation) | ||
| 2369 | * @height:		number of lines of data per buffer (valid for line based | ||
| 2370 | *			formats only) | ||
| 2371 | * @bytesperline:	offset between the beginnings of two adjacent lines in | ||
| 2372 | *			bytes (valid for line based formats only) | ||
| 2334 | */ | 2373 | */ |
| 2335 | struct v4l2_meta_format { | 2374 | struct v4l2_meta_format { |
| 2336 | 	__u32				dataformat; | 2375 | 	__u32				dataformat; |
| 2337 | 	__u32				buffersize; | 2376 | 	__u32				buffersize; |
| 2377 | 	__u32				width; | ||
| 2378 | 	__u32				height; | ||
| 2379 | 	__u32				bytesperline; | ||
| 2338 | } __attribute__ ((packed)); | 2380 | } __attribute__ ((packed)); |
| 2339 | 2381 | ||
| 2340 | /** | 2382 | /** |
| 2341 | * struct v4l2_format - stream data format | 2383 | * struct v4l2_format - stream data format |
| 2342 | * @type:	enum v4l2_buf_type; type of the data stream | 2384 | * @type:		enum v4l2_buf_type; type of the data stream |
| 2343 | * @pix:	definition of an image format | 2385 | * @fmt.pix:		definition of an image format |
| 2344 | * @pix_mp:	definition of a multiplanar image format | 2386 | * @fmt.pix_mp:		definition of a multiplanar image format |
| 2345 | * @win:	definition of an overlaid image | 2387 | * @fmt.win:		definition of an overlaid image |
| 2346 | * @vbi:	raw VBI capture or output parameters | 2388 | * @fmt.vbi:		raw VBI capture or output parameters |
| 2347 | * @sliced:	sliced VBI capture or output parameters | 2389 | * @fmt.sliced:		sliced VBI capture or output parameters |
| 2348 | * @raw_data:	placeholder for future extensions and custom formats | 2390 | * @fmt.raw_data:	placeholder for future extensions and custom formats |
| 2349 | * @fmt:	union of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta | 2391 | * @fmt:		union of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, |
| 2350 | *		and @raw_data | 2392 | *			@meta and @raw_data |
| 2351 | */ | 2393 | */ |
| 2352 | struct v4l2_format { | 2394 | struct v4l2_format { |
| 2353 | 	__u32	 type; | 2395 | 	__u32	 type; |
| ... | @@ -2520,6 +2562,9 @@ struct v4l2_dbg_chip_info { | ... | @@ -2520,6 +2562,9 @@ struct v4l2_dbg_chip_info { |
| 2520 | * @flags:	additional buffer management attributes (ignored unless the | 2562 | * @flags:	additional buffer management attributes (ignored unless the |
| 2521 | *		queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability | 2563 | *		queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability |
| 2522 | *		and configured for MMAP streaming I/O). | 2564 | *		and configured for MMAP streaming I/O). |
| 2565 | * @max_num_buffers: if V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set | ||
| 2566 | *		this field indicate the maximum possible number of buffers | ||
| 2567 | *		for this queue. | ||
| 2523 | * @reserved:	future extensions | 2568 | * @reserved:	future extensions |
| 2524 | */ | 2569 | */ |
| 2525 | struct v4l2_create_buffers { | 2570 | struct v4l2_create_buffers { |
| ... | @@ -2529,7 +2574,22 @@ struct v4l2_create_buffers { | ... | @@ -2529,7 +2574,22 @@ struct v4l2_create_buffers { |
| 2529 | 	struct v4l2_format	format; | 2574 | 	struct v4l2_format	format; |
| 2530 | 	__u32			capabilities; | 2575 | 	__u32			capabilities; |
| 2531 | 	__u32			flags; | 2576 | 	__u32			flags; |
| 2532 | 	__u32			reserved[6]; | 2577 | 	__u32			max_num_buffers; |
| 2578 | 	__u32			reserved[5]; | ||
| 2579 | }; | ||
| 2580 | |||
| 2581 | /** | ||
| 2582 | * struct v4l2_remove_buffers - VIDIOC_REMOVE_BUFS argument | ||
| 2583 | * @index:	the first buffer to be removed | ||
| 2584 | * @count:	number of buffers to removed | ||
| 2585 | * @type:	enum v4l2_buf_type | ||
| 2586 | * @reserved:	future extensions | ||
| 2587 | */ | ||
| 2588 | struct v4l2_remove_buffers { | ||
| 2589 | 	__u32			index; | ||
| 2590 | 	__u32			count; | ||
| 2591 | 	__u32			type; | ||
| 2592 | 	__u32			reserved[13]; | ||
| 2533 | }; | 2593 | }; |
| 2534 | 2594 | ||
| 2535 | /* | 2595 | /* |
| ... | @@ -2631,6 +2691,8 @@ struct v4l2_create_buffers { | ... | @@ -2631,6 +2691,8 @@ struct v4l2_create_buffers { |
| 2631 | #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) | 2691 | #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) |
| 2632 | 2692 | ||
| 2633 | #define VIDIOC_QUERY_EXT_CTRL	_IOWR('V', 103, struct v4l2_query_ext_ctrl) | 2693 | #define VIDIOC_QUERY_EXT_CTRL	_IOWR('V', 103, struct v4l2_query_ext_ctrl) |
| 2694 | #define VIDIOC_REMOVE_BUFS	_IOWR('V', 104, struct v4l2_remove_buffers) | ||
| 2695 | |||
| 2634 | 2696 | ||
| 2635 | /* Reminder: when adding new ioctls please add support for them to | 2697 | /* Reminder: when adding new ioctls please add support for them to |
| 2636 | drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ | 2698 | drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ |
lib/libc/include/any-linux-any/linux/virtio_bt.h-1| ... | @@ -13,7 +13,6 @@ | ... | @@ -13,7 +13,6 @@ |
| 13 | 13 | ||
| 14 | enum virtio_bt_config_type { | 14 | enum virtio_bt_config_type { |
| 15 | 	VIRTIO_BT_CONFIG_TYPE_PRIMARY	= 0, | 15 | 	VIRTIO_BT_CONFIG_TYPE_PRIMARY	= 0, |
| 16 | 	VIRTIO_BT_CONFIG_TYPE_AMP	= 1, | ||
| 17 | }; | 16 | }; |
| 18 | 17 | ||
| 19 | enum virtio_bt_config_vendor { | 18 | enum virtio_bt_config_vendor { |
lib/libc/include/any-linux-any/linux/virtio_config.h+18-1| ... | @@ -52,7 +52,7 @@ | ... | @@ -52,7 +52,7 @@ |
| 52 | * rest are per-device feature bits. | 52 | * rest are per-device feature bits. |
| 53 | */ | 53 | */ |
| 54 | #define VIRTIO_TRANSPORT_F_START	28 | 54 | #define VIRTIO_TRANSPORT_F_START	28 |
| 55 | #define VIRTIO_TRANSPORT_F_END		41 | 55 | #define VIRTIO_TRANSPORT_F_END		42 |
| 56 | 56 | ||
| 57 | #ifndef VIRTIO_CONFIG_NO_LEGACY | 57 | #ifndef VIRTIO_CONFIG_NO_LEGACY |
| 58 | /* Do we get callbacks when the ring is completely used, even if we've | 58 | /* Do we get callbacks when the ring is completely used, even if we've |
| ... | @@ -97,8 +97,25 @@ | ... | @@ -97,8 +97,25 @@ |
| 97 | */ | 97 | */ |
| 98 | #define VIRTIO_F_SR_IOV			37 | 98 | #define VIRTIO_F_SR_IOV			37 |
| 99 | 99 | ||
| 100 | /* | ||
| 101 | * This feature indicates that the driver passes extra data (besides | ||
| 102 | * identifying the virtqueue) in its device notifications. | ||
| 103 | */ | ||
| 104 | #define VIRTIO_F_NOTIFICATION_DATA	38 | ||
| 105 | |||
| 106 | /* This feature indicates that the driver uses the data provided by the device | ||
| 107 | * as a virtqueue identifier in available buffer notifications. | ||
| 108 | */ | ||
| 109 | #define VIRTIO_F_NOTIF_CONFIG_DATA	39 | ||
| 110 | |||
| 100 | /* | 111 | /* |
| 101 | * This feature indicates that the driver can reset a queue individually. | 112 | * This feature indicates that the driver can reset a queue individually. |
| 102 | */ | 113 | */ |
| 103 | #define VIRTIO_F_RING_RESET		40 | 114 | #define VIRTIO_F_RING_RESET		40 |
| 115 | |||
| 116 | /* | ||
| 117 | * This feature indicates that the device support administration virtqueues. | ||
| 118 | */ | ||
| 119 | #define VIRTIO_F_ADMIN_VQ		41 | ||
| 120 | |||
| 104 | #endif /* _LINUX_VIRTIO_CONFIG_H */ | 121 | #endif /* _LINUX_VIRTIO_CONFIG_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/virtio_gpu.h+2| ... | @@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit { | ... | @@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit { |
| 309 | 309 | ||
| 310 | #define VIRTIO_GPU_CAPSET_VIRGL 1 | 310 | #define VIRTIO_GPU_CAPSET_VIRGL 1 |
| 311 | #define VIRTIO_GPU_CAPSET_VIRGL2 2 | 311 | #define VIRTIO_GPU_CAPSET_VIRGL2 2 |
| 312 | /* 3 is reserved for gfxstream */ | ||
| 313 | #define VIRTIO_GPU_CAPSET_VENUS 4 | ||
| 312 | 314 | ||
| 313 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ | 315 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ |
| 314 | struct virtio_gpu_get_capset_info { | 316 | struct virtio_gpu_get_capset_info { |
lib/libc/include/any-linux-any/linux/virtio_mem.h+2| ... | @@ -90,6 +90,8 @@ | ... | @@ -90,6 +90,8 @@ |
| 90 | #define VIRTIO_MEM_F_ACPI_PXM		0 | 90 | #define VIRTIO_MEM_F_ACPI_PXM		0 |
| 91 | /* unplugged memory must not be accessed */ | 91 | /* unplugged memory must not be accessed */ |
| 92 | #define VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE	1 | 92 | #define VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE	1 |
| 93 | /* plugged memory will remain plugged when suspending+resuming */ | ||
| 94 | #define VIRTIO_MEM_F_PERSISTENT_SUSPEND		2 | ||
| 93 | 95 | ||
| 94 | 96 | ||
| 95 | /* --- virtio-mem: guest -> host requests --- */ | 97 | /* --- virtio-mem: guest -> host requests --- */ |
lib/libc/include/any-linux-any/linux/virtio_net.h+158| ... | @@ -56,11 +56,14 @@ | ... | @@ -56,11 +56,14 @@ |
| 56 | #define VIRTIO_NET_F_MQ	22	/* Device supports Receive Flow | 56 | #define VIRTIO_NET_F_MQ	22	/* Device supports Receive Flow |
| 57 | 					 * Steering */ | 57 | 					 * Steering */ |
| 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23	/* Set MAC address */ | 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23	/* Set MAC address */ |
| 59 | #define VIRTIO_NET_F_DEVICE_STATS 50	/* Device can provide device-level statistics. */ | ||
| 60 | #define VIRTIO_NET_F_VQ_NOTF_COAL 52	/* Device supports virtqueue notification coalescing */ | ||
| 59 | #define VIRTIO_NET_F_NOTF_COAL	53	/* Device supports notifications coalescing */ | 61 | #define VIRTIO_NET_F_NOTF_COAL	53	/* Device supports notifications coalescing */ |
| 60 | #define VIRTIO_NET_F_GUEST_USO4	54	/* Guest can handle USOv4 in. */ | 62 | #define VIRTIO_NET_F_GUEST_USO4	54	/* Guest can handle USOv4 in. */ |
| 61 | #define VIRTIO_NET_F_GUEST_USO6	55	/* Guest can handle USOv6 in. */ | 63 | #define VIRTIO_NET_F_GUEST_USO6	55	/* Guest can handle USOv6 in. */ |
| 62 | #define VIRTIO_NET_F_HOST_USO	56	/* Host can handle USO in. */ | 64 | #define VIRTIO_NET_F_HOST_USO	56	/* Host can handle USO in. */ |
| 63 | #define VIRTIO_NET_F_HASH_REPORT 57	/* Supports hash report */ | 65 | #define VIRTIO_NET_F_HASH_REPORT 57	/* Supports hash report */ |
| 66 | #define VIRTIO_NET_F_GUEST_HDRLEN 59	/* Guest provides the exact hdr_len value. */ | ||
| 64 | #define VIRTIO_NET_F_RSS	 60	/* Supports RSS RX steering */ | 67 | #define VIRTIO_NET_F_RSS	 60	/* Supports RSS RX steering */ |
| 65 | #define VIRTIO_NET_F_RSC_EXT	 61	/* extended coalescing info */ | 68 | #define VIRTIO_NET_F_RSC_EXT	 61	/* extended coalescing info */ |
| 66 | #define VIRTIO_NET_F_STANDBY	 62	/* Act as standby for another device | 69 | #define VIRTIO_NET_F_STANDBY	 62	/* Act as standby for another device |
| ... | @@ -390,5 +393,160 @@ struct virtio_net_ctrl_coal_rx { | ... | @@ -390,5 +393,160 @@ struct virtio_net_ctrl_coal_rx { |
| 390 | }; | 393 | }; |
| 391 | 394 | ||
| 392 | #define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET		1 | 395 | #define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET		1 |
| 396 | #define VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET		2 | ||
| 397 | #define VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET		3 | ||
| 398 | |||
| 399 | struct virtio_net_ctrl_coal { | ||
| 400 | 	__le32 max_packets; | ||
| 401 | 	__le32 max_usecs; | ||
| 402 | }; | ||
| 403 | |||
| 404 | struct virtio_net_ctrl_coal_vq { | ||
| 405 | 	__le16 vqn; | ||
| 406 | 	__le16 reserved; | ||
| 407 | 	struct virtio_net_ctrl_coal coal; | ||
| 408 | }; | ||
| 409 | |||
| 410 | /* | ||
| 411 | * Device Statistics | ||
| 412 | */ | ||
| 413 | #define VIRTIO_NET_CTRL_STATS 8 | ||
| 414 | #define VIRTIO_NET_CTRL_STATS_QUERY 0 | ||
| 415 | #define VIRTIO_NET_CTRL_STATS_GET 1 | ||
| 416 | |||
| 417 | struct virtio_net_stats_capabilities { | ||
| 418 | |||
| 419 | #define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32) | ||
| 420 | |||
| 421 | #define VIRTIO_NET_STATS_TYPE_RX_BASIC (1ULL << 0) | ||
| 422 | #define VIRTIO_NET_STATS_TYPE_RX_CSUM (1ULL << 1) | ||
| 423 | #define VIRTIO_NET_STATS_TYPE_RX_GSO (1ULL << 2) | ||
| 424 | #define VIRTIO_NET_STATS_TYPE_RX_SPEED (1ULL << 3) | ||
| 425 | |||
| 426 | #define VIRTIO_NET_STATS_TYPE_TX_BASIC (1ULL << 16) | ||
| 427 | #define VIRTIO_NET_STATS_TYPE_TX_CSUM (1ULL << 17) | ||
| 428 | #define VIRTIO_NET_STATS_TYPE_TX_GSO (1ULL << 18) | ||
| 429 | #define VIRTIO_NET_STATS_TYPE_TX_SPEED (1ULL << 19) | ||
| 430 | |||
| 431 | 	__le64 supported_stats_types[1]; | ||
| 432 | }; | ||
| 433 | |||
| 434 | struct virtio_net_ctrl_queue_stats { | ||
| 435 | 	struct { | ||
| 436 | 		__le16 vq_index; | ||
| 437 | 		__le16 reserved[3]; | ||
| 438 | 		__le64 types_bitmap[1]; | ||
| 439 | 	} stats[1]; | ||
| 440 | }; | ||
| 441 | |||
| 442 | struct virtio_net_stats_reply_hdr { | ||
| 443 | #define VIRTIO_NET_STATS_TYPE_REPLY_CVQ 32 | ||
| 444 | |||
| 445 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC 0 | ||
| 446 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM 1 | ||
| 447 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO 2 | ||
| 448 | #define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED 3 | ||
| 449 | |||
| 450 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC 16 | ||
| 451 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM 17 | ||
| 452 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO 18 | ||
| 453 | #define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED 19 | ||
| 454 | 	__u8 type; | ||
| 455 | 	__u8 reserved; | ||
| 456 | 	__le16 vq_index; | ||
| 457 | 	__le16 reserved1; | ||
| 458 | 	__le16 size; | ||
| 459 | }; | ||
| 460 | |||
| 461 | struct virtio_net_stats_cvq { | ||
| 462 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 463 | |||
| 464 | 	__le64 command_num; | ||
| 465 | 	__le64 ok_num; | ||
| 466 | }; | ||
| 467 | |||
| 468 | struct virtio_net_stats_rx_basic { | ||
| 469 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 470 | |||
| 471 | 	__le64 rx_notifications; | ||
| 472 | |||
| 473 | 	__le64 rx_packets; | ||
| 474 | 	__le64 rx_bytes; | ||
| 475 | |||
| 476 | 	__le64 rx_interrupts; | ||
| 477 | |||
| 478 | 	__le64 rx_drops; | ||
| 479 | 	__le64 rx_drop_overruns; | ||
| 480 | }; | ||
| 481 | |||
| 482 | struct virtio_net_stats_tx_basic { | ||
| 483 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 484 | |||
| 485 | 	__le64 tx_notifications; | ||
| 486 | |||
| 487 | 	__le64 tx_packets; | ||
| 488 | 	__le64 tx_bytes; | ||
| 489 | |||
| 490 | 	__le64 tx_interrupts; | ||
| 491 | |||
| 492 | 	__le64 tx_drops; | ||
| 493 | 	__le64 tx_drop_malformed; | ||
| 494 | }; | ||
| 495 | |||
| 496 | struct virtio_net_stats_rx_csum { | ||
| 497 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 498 | |||
| 499 | 	__le64 rx_csum_valid; | ||
| 500 | 	__le64 rx_needs_csum; | ||
| 501 | 	__le64 rx_csum_none; | ||
| 502 | 	__le64 rx_csum_bad; | ||
| 503 | }; | ||
| 504 | |||
| 505 | struct virtio_net_stats_tx_csum { | ||
| 506 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 507 | |||
| 508 | 	__le64 tx_csum_none; | ||
| 509 | 	__le64 tx_needs_csum; | ||
| 510 | }; | ||
| 511 | |||
| 512 | struct virtio_net_stats_rx_gso { | ||
| 513 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 514 | |||
| 515 | 	__le64 rx_gso_packets; | ||
| 516 | 	__le64 rx_gso_bytes; | ||
| 517 | 	__le64 rx_gso_packets_coalesced; | ||
| 518 | 	__le64 rx_gso_bytes_coalesced; | ||
| 519 | }; | ||
| 520 | |||
| 521 | struct virtio_net_stats_tx_gso { | ||
| 522 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 523 | |||
| 524 | 	__le64 tx_gso_packets; | ||
| 525 | 	__le64 tx_gso_bytes; | ||
| 526 | 	__le64 tx_gso_segments; | ||
| 527 | 	__le64 tx_gso_segments_bytes; | ||
| 528 | 	__le64 tx_gso_packets_noseg; | ||
| 529 | 	__le64 tx_gso_bytes_noseg; | ||
| 530 | }; | ||
| 531 | |||
| 532 | struct virtio_net_stats_rx_speed { | ||
| 533 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 534 | |||
| 535 | 	/* rx_{packets,bytes}_allowance_exceeded are too long. So rename to | ||
| 536 | 	 * short name. | ||
| 537 | 	 */ | ||
| 538 | 	__le64 rx_ratelimit_packets; | ||
| 539 | 	__le64 rx_ratelimit_bytes; | ||
| 540 | }; | ||
| 541 | |||
| 542 | struct virtio_net_stats_tx_speed { | ||
| 543 | 	struct virtio_net_stats_reply_hdr hdr; | ||
| 544 | |||
| 545 | 	/* tx_{packets,bytes}_allowance_exceeded are too long. So rename to | ||
| 546 | 	 * short name. | ||
| 547 | 	 */ | ||
| 548 | 	__le64 tx_ratelimit_packets; | ||
| 549 | 	__le64 tx_ratelimit_bytes; | ||
| 550 | }; | ||
| 393 | 551 | ||
| 394 | #endif /* _LINUX_VIRTIO_NET_H */ | 552 | #endif /* _LINUX_VIRTIO_NET_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/virtio_pci.h+79| ... | @@ -166,6 +166,20 @@ struct virtio_pci_common_cfg { | ... | @@ -166,6 +166,20 @@ struct virtio_pci_common_cfg { |
| 166 | 	__le32 queue_used_hi;		/* read-write */ | 166 | 	__le32 queue_used_hi;		/* read-write */ |
| 167 | }; | 167 | }; |
| 168 | 168 | ||
| 169 | /* | ||
| 170 | * Warning: do not use sizeof on this: use offsetofend for | ||
| 171 | * specific fields you need. | ||
| 172 | */ | ||
| 173 | struct virtio_pci_modern_common_cfg { | ||
| 174 | 	struct virtio_pci_common_cfg cfg; | ||
| 175 | |||
| 176 | 	__le16 queue_notify_data;	/* read-write */ | ||
| 177 | 	__le16 queue_reset;		/* read-write */ | ||
| 178 | |||
| 179 | 	__le16 admin_queue_index;	/* read-only */ | ||
| 180 | 	__le16 admin_queue_num;		/* read-only */ | ||
| 181 | }; | ||
| 182 | |||
| 169 | /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ | 183 | /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ |
| 170 | struct virtio_pci_cfg_cap { | 184 | struct virtio_pci_cfg_cap { |
| 171 | 	struct virtio_pci_cap cap; | 185 | 	struct virtio_pci_cap cap; |
| ... | @@ -204,7 +218,72 @@ struct virtio_pci_cfg_cap { | ... | @@ -204,7 +218,72 @@ struct virtio_pci_cfg_cap { |
| 204 | #define VIRTIO_PCI_COMMON_Q_USEDHI	52 | 218 | #define VIRTIO_PCI_COMMON_Q_USEDHI	52 |
| 205 | #define VIRTIO_PCI_COMMON_Q_NDATA	56 | 219 | #define VIRTIO_PCI_COMMON_Q_NDATA	56 |
| 206 | #define VIRTIO_PCI_COMMON_Q_RESET	58 | 220 | #define VIRTIO_PCI_COMMON_Q_RESET	58 |
| 221 | #define VIRTIO_PCI_COMMON_ADM_Q_IDX	60 | ||
| 222 | #define VIRTIO_PCI_COMMON_ADM_Q_NUM	62 | ||
| 207 | 223 | ||
| 208 | #endif /* VIRTIO_PCI_NO_MODERN */ | 224 | #endif /* VIRTIO_PCI_NO_MODERN */ |
| 209 | 225 | ||
| 226 | /* Admin command status. */ | ||
| 227 | #define VIRTIO_ADMIN_STATUS_OK		0 | ||
| 228 | |||
| 229 | /* Admin command opcode. */ | ||
| 230 | #define VIRTIO_ADMIN_CMD_LIST_QUERY	0x0 | ||
| 231 | #define VIRTIO_ADMIN_CMD_LIST_USE	0x1 | ||
| 232 | |||
| 233 | /* Admin command group type. */ | ||
| 234 | #define VIRTIO_ADMIN_GROUP_TYPE_SRIOV	0x1 | ||
| 235 | |||
| 236 | /* Transitional device admin command. */ | ||
| 237 | #define VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_WRITE	0x2 | ||
| 238 | #define VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_READ		0x3 | ||
| 239 | #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_WRITE		0x4 | ||
| 240 | #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_READ		0x5 | ||
| 241 | #define VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO		0x6 | ||
| 242 | |||
| 243 | struct virtio_admin_cmd_hdr { | ||
| 244 | 	__le16 opcode; | ||
| 245 | 	/* | ||
| 246 | 	 * 1 - SR-IOV | ||
| 247 | 	 * 2-65535 - reserved | ||
| 248 | 	 */ | ||
| 249 | 	__le16 group_type; | ||
| 250 | 	/* Unused, reserved for future extensions. */ | ||
| 251 | 	__u8 reserved1[12]; | ||
| 252 | 	__le64 group_member_id; | ||
| 253 | }; | ||
| 254 | |||
| 255 | struct virtio_admin_cmd_status { | ||
| 256 | 	__le16 status; | ||
| 257 | 	__le16 status_qualifier; | ||
| 258 | 	/* Unused, reserved for future extensions. */ | ||
| 259 | 	__u8 reserved2[4]; | ||
| 260 | }; | ||
| 261 | |||
| 262 | struct virtio_admin_cmd_legacy_wr_data { | ||
| 263 | 	__u8 offset; /* Starting offset of the register(s) to write. */ | ||
| 264 | 	__u8 reserved[7]; | ||
| 265 | 	__u8 registers[]; | ||
| 266 | }; | ||
| 267 | |||
| 268 | struct virtio_admin_cmd_legacy_rd_data { | ||
| 269 | 	__u8 offset; /* Starting offset of the register(s) to read. */ | ||
| 270 | }; | ||
| 271 | |||
| 272 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_END 0 | ||
| 273 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_OWNER_DEV 0x1 | ||
| 274 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_OWNER_MEM 0x2 | ||
| 275 | |||
| 276 | #define VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO 4 | ||
| 277 | |||
| 278 | struct virtio_admin_cmd_notify_info_data { | ||
| 279 | 	__u8 flags; /* 0 = end of list, 1 = owner device, 2 = member device */ | ||
| 280 | 	__u8 bar; /* BAR of the member or the owner device */ | ||
| 281 | 	__u8 padding[6]; | ||
| 282 | 	__le64 offset; /* Offset within bar. */ | ||
| 283 | }; | ||
| 284 | |||
| 285 | struct virtio_admin_cmd_notify_info_result { | ||
| 286 | 	struct virtio_admin_cmd_notify_info_data entries[VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO]; | ||
| 287 | }; | ||
| 288 | |||
| 210 | #endif | 289 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/virtio_pmem.h+7| ... | @@ -14,6 +14,13 @@ | ... | @@ -14,6 +14,13 @@ |
| 14 | #include <linux/virtio_ids.h> | 14 | #include <linux/virtio_ids.h> |
| 15 | #include <linux/virtio_config.h> | 15 | #include <linux/virtio_config.h> |
| 16 | 16 | ||
| 17 | /* Feature bits */ | ||
| 18 | /* guest physical address range will be indicated as shared memory region 0 */ | ||
| 19 | #define VIRTIO_PMEM_F_SHMEM_REGION 0 | ||
| 20 | |||
| 21 | /* shmid of the shared memory region corresponding to the pmem */ | ||
| 22 | #define VIRTIO_PMEM_SHMEM_REGION_ID 0 | ||
| 23 | |||
| 17 | struct virtio_pmem_config { | 24 | struct virtio_pmem_config { |
| 18 | 	__le64 start; | 25 | 	__le64 start; |
| 19 | 	__le64 size; | 26 | 	__le64 size; |
lib/libc/include/any-linux-any/linux/virtio_snd.h+154| ... | @@ -7,6 +7,14 @@ | ... | @@ -7,6 +7,14 @@ |
| 7 | 7 | ||
| 8 | #include <linux/virtio_types.h> | 8 | #include <linux/virtio_types.h> |
| 9 | 9 | ||
| 10 | /******************************************************************************* | ||
| 11 | * FEATURE BITS | ||
| 12 | */ | ||
| 13 | enum { | ||
| 14 | 	/* device supports control elements */ | ||
| 15 | 	VIRTIO_SND_F_CTLS = 0 | ||
| 16 | }; | ||
| 17 | |||
| 10 | /******************************************************************************* | 18 | /******************************************************************************* |
| 11 | * CONFIGURATION SPACE | 19 | * CONFIGURATION SPACE |
| 12 | */ | 20 | */ |
| ... | @@ -17,6 +25,8 @@ struct virtio_snd_config { | ... | @@ -17,6 +25,8 @@ struct virtio_snd_config { |
| 17 | 	__le32 streams; | 25 | 	__le32 streams; |
| 18 | 	/* # of available channel maps */ | 26 | 	/* # of available channel maps */ |
| 19 | 	__le32 chmaps; | 27 | 	__le32 chmaps; |
| 28 | 	/* # of available control elements */ | ||
| 29 | 	__le32 controls; | ||
| 20 | }; | 30 | }; |
| 21 | 31 | ||
| 22 | enum { | 32 | enum { |
| ... | @@ -55,6 +65,15 @@ enum { | ... | @@ -55,6 +65,15 @@ enum { |
| 55 | 	/* channel map control request types */ | 65 | 	/* channel map control request types */ |
| 56 | 	VIRTIO_SND_R_CHMAP_INFO = 0x0200, | 66 | 	VIRTIO_SND_R_CHMAP_INFO = 0x0200, |
| 57 | 67 | ||
| 68 | 	/* control element request types */ | ||
| 69 | 	VIRTIO_SND_R_CTL_INFO = 0x0300, | ||
| 70 | 	VIRTIO_SND_R_CTL_ENUM_ITEMS, | ||
| 71 | 	VIRTIO_SND_R_CTL_READ, | ||
| 72 | 	VIRTIO_SND_R_CTL_WRITE, | ||
| 73 | 	VIRTIO_SND_R_CTL_TLV_READ, | ||
| 74 | 	VIRTIO_SND_R_CTL_TLV_WRITE, | ||
| 75 | 	VIRTIO_SND_R_CTL_TLV_COMMAND, | ||
| 76 | |||
| 58 | 	/* jack event types */ | 77 | 	/* jack event types */ |
| 59 | 	VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000, | 78 | 	VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000, |
| 60 | 	VIRTIO_SND_EVT_JACK_DISCONNECTED, | 79 | 	VIRTIO_SND_EVT_JACK_DISCONNECTED, |
| ... | @@ -63,6 +82,9 @@ enum { | ... | @@ -63,6 +82,9 @@ enum { |
| 63 | 	VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100, | 82 | 	VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100, |
| 64 | 	VIRTIO_SND_EVT_PCM_XRUN, | 83 | 	VIRTIO_SND_EVT_PCM_XRUN, |
| 65 | 84 | ||
| 85 | 	/* control element event types */ | ||
| 86 | 	VIRTIO_SND_EVT_CTL_NOTIFY = 0x1200, | ||
| 87 | |||
| 66 | 	/* common status codes */ | 88 | 	/* common status codes */ |
| 67 | 	VIRTIO_SND_S_OK = 0x8000, | 89 | 	VIRTIO_SND_S_OK = 0x8000, |
| 68 | 	VIRTIO_SND_S_BAD_MSG, | 90 | 	VIRTIO_SND_S_BAD_MSG, |
| ... | @@ -331,4 +353,136 @@ struct virtio_snd_chmap_info { | ... | @@ -331,4 +353,136 @@ struct virtio_snd_chmap_info { |
| 331 | 	__u8 positions[VIRTIO_SND_CHMAP_MAX_SIZE]; | 353 | 	__u8 positions[VIRTIO_SND_CHMAP_MAX_SIZE]; |
| 332 | }; | 354 | }; |
| 333 | 355 | ||
| 356 | /******************************************************************************* | ||
| 357 | * CONTROL ELEMENTS MESSAGES | ||
| 358 | */ | ||
| 359 | struct virtio_snd_ctl_hdr { | ||
| 360 | 	/* VIRTIO_SND_R_CTL_XXX */ | ||
| 361 | 	struct virtio_snd_hdr hdr; | ||
| 362 | 	/* 0 ... virtio_snd_config::controls - 1 */ | ||
| 363 | 	__le32 control_id; | ||
| 364 | }; | ||
| 365 | |||
| 366 | /* supported roles for control elements */ | ||
| 367 | enum { | ||
| 368 | 	VIRTIO_SND_CTL_ROLE_UNDEFINED = 0, | ||
| 369 | 	VIRTIO_SND_CTL_ROLE_VOLUME, | ||
| 370 | 	VIRTIO_SND_CTL_ROLE_MUTE, | ||
| 371 | 	VIRTIO_SND_CTL_ROLE_GAIN | ||
| 372 | }; | ||
| 373 | |||
| 374 | /* supported value types for control elements */ | ||
| 375 | enum { | ||
| 376 | 	VIRTIO_SND_CTL_TYPE_BOOLEAN = 0, | ||
| 377 | 	VIRTIO_SND_CTL_TYPE_INTEGER, | ||
| 378 | 	VIRTIO_SND_CTL_TYPE_INTEGER64, | ||
| 379 | 	VIRTIO_SND_CTL_TYPE_ENUMERATED, | ||
| 380 | 	VIRTIO_SND_CTL_TYPE_BYTES, | ||
| 381 | 	VIRTIO_SND_CTL_TYPE_IEC958 | ||
| 382 | }; | ||
| 383 | |||
| 384 | /* supported access rights for control elements */ | ||
| 385 | enum { | ||
| 386 | 	VIRTIO_SND_CTL_ACCESS_READ = 0, | ||
| 387 | 	VIRTIO_SND_CTL_ACCESS_WRITE, | ||
| 388 | 	VIRTIO_SND_CTL_ACCESS_VOLATILE, | ||
| 389 | 	VIRTIO_SND_CTL_ACCESS_INACTIVE, | ||
| 390 | 	VIRTIO_SND_CTL_ACCESS_TLV_READ, | ||
| 391 | 	VIRTIO_SND_CTL_ACCESS_TLV_WRITE, | ||
| 392 | 	VIRTIO_SND_CTL_ACCESS_TLV_COMMAND | ||
| 393 | }; | ||
| 394 | |||
| 395 | struct virtio_snd_ctl_info { | ||
| 396 | 	/* common header */ | ||
| 397 | 	struct virtio_snd_info hdr; | ||
| 398 | 	/* element role (VIRTIO_SND_CTL_ROLE_XXX) */ | ||
| 399 | 	__le32 role; | ||
| 400 | 	/* element value type (VIRTIO_SND_CTL_TYPE_XXX) */ | ||
| 401 | 	__le32 type; | ||
| 402 | 	/* element access right bit map (1 << VIRTIO_SND_CTL_ACCESS_XXX) */ | ||
| 403 | 	__le32 access; | ||
| 404 | 	/* # of members in the element value */ | ||
| 405 | 	__le32 count; | ||
| 406 | 	/* index for an element with a non-unique name */ | ||
| 407 | 	__le32 index; | ||
| 408 | 	/* name identifier string for the element */ | ||
| 409 | 	__u8 name[44]; | ||
| 410 | 	/* additional information about the element's value */ | ||
| 411 | 	union { | ||
| 412 | 		/* VIRTIO_SND_CTL_TYPE_INTEGER */ | ||
| 413 | 		struct { | ||
| 414 | 			/* minimum supported value */ | ||
| 415 | 			__le32 min; | ||
| 416 | 			/* maximum supported value */ | ||
| 417 | 			__le32 max; | ||
| 418 | 			/* fixed step size for value (0 = variable size) */ | ||
| 419 | 			__le32 step; | ||
| 420 | 		} integer; | ||
| 421 | 		/* VIRTIO_SND_CTL_TYPE_INTEGER64 */ | ||
| 422 | 		struct { | ||
| 423 | 			/* minimum supported value */ | ||
| 424 | 			__le64 min; | ||
| 425 | 			/* maximum supported value */ | ||
| 426 | 			__le64 max; | ||
| 427 | 			/* fixed step size for value (0 = variable size) */ | ||
| 428 | 			__le64 step; | ||
| 429 | 		} integer64; | ||
| 430 | 		/* VIRTIO_SND_CTL_TYPE_ENUMERATED */ | ||
| 431 | 		struct { | ||
| 432 | 			/* # of options supported for value */ | ||
| 433 | 			__le32 items; | ||
| 434 | 		} enumerated; | ||
| 435 | 	} value; | ||
| 436 | }; | ||
| 437 | |||
| 438 | struct virtio_snd_ctl_enum_item { | ||
| 439 | 	/* option name */ | ||
| 440 | 	__u8 item[64]; | ||
| 441 | }; | ||
| 442 | |||
| 443 | struct virtio_snd_ctl_iec958 { | ||
| 444 | 	/* AES/IEC958 channel status bits */ | ||
| 445 | 	__u8 status[24]; | ||
| 446 | 	/* AES/IEC958 subcode bits */ | ||
| 447 | 	__u8 subcode[147]; | ||
| 448 | 	/* nothing */ | ||
| 449 | 	__u8 pad; | ||
| 450 | 	/* AES/IEC958 subframe bits */ | ||
| 451 | 	__u8 dig_subframe[4]; | ||
| 452 | }; | ||
| 453 | |||
| 454 | struct virtio_snd_ctl_value { | ||
| 455 | 	union { | ||
| 456 | 		/* VIRTIO_SND_CTL_TYPE_BOOLEAN|INTEGER value */ | ||
| 457 | 		__le32 integer[128]; | ||
| 458 | 		/* VIRTIO_SND_CTL_TYPE_INTEGER64 value */ | ||
| 459 | 		__le64 integer64[64]; | ||
| 460 | 		/* VIRTIO_SND_CTL_TYPE_ENUMERATED value (option indexes) */ | ||
| 461 | 		__le32 enumerated[128]; | ||
| 462 | 		/* VIRTIO_SND_CTL_TYPE_BYTES value */ | ||
| 463 | 		__u8 bytes[512]; | ||
| 464 | 		/* VIRTIO_SND_CTL_TYPE_IEC958 value */ | ||
| 465 | 		struct virtio_snd_ctl_iec958 iec958; | ||
| 466 | 	} value; | ||
| 467 | }; | ||
| 468 | |||
| 469 | /* supported event reason types */ | ||
| 470 | enum { | ||
| 471 | 	/* element's value has changed */ | ||
| 472 | 	VIRTIO_SND_CTL_EVT_MASK_VALUE = 0, | ||
| 473 | 	/* element's information has changed */ | ||
| 474 | 	VIRTIO_SND_CTL_EVT_MASK_INFO, | ||
| 475 | 	/* element's metadata has changed */ | ||
| 476 | 	VIRTIO_SND_CTL_EVT_MASK_TLV | ||
| 477 | }; | ||
| 478 | |||
| 479 | struct virtio_snd_ctl_event { | ||
| 480 | 	/* VIRTIO_SND_EVT_CTL_NOTIFY */ | ||
| 481 | 	struct virtio_snd_hdr hdr; | ||
| 482 | 	/* 0 ... virtio_snd_config::controls - 1 */ | ||
| 483 | 	__le16 control_id; | ||
| 484 | 	/* event reason bit map (1 << VIRTIO_SND_CTL_EVT_MASK_XXX) */ | ||
| 485 | 	__le16 mask; | ||
| 486 | }; | ||
| 487 | |||
| 334 | #endif /* VIRTIO_SND_IF_H */ | 488 | #endif /* VIRTIO_SND_IF_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vm_sockets.h+17| ... | @@ -189,4 +189,21 @@ struct sockaddr_vm { | ... | @@ -189,4 +189,21 @@ struct sockaddr_vm { |
| 189 | 189 | ||
| 190 | #define IOCTL_VM_SOCKETS_GET_LOCAL_CID		_IO(7, 0xb9) | 190 | #define IOCTL_VM_SOCKETS_GET_LOCAL_CID		_IO(7, 0xb9) |
| 191 | 191 | ||
| 192 | /* MSG_ZEROCOPY notifications are encoded in the standard error format, | ||
| 193 | * sock_extended_err. See Documentation/networking/msg_zerocopy.rst in | ||
| 194 | * kernel source tree for more details. | ||
| 195 | */ | ||
| 196 | |||
| 197 | /* 'cmsg_level' field value of 'struct cmsghdr' for notification parsing | ||
| 198 | * when MSG_ZEROCOPY flag is used on transmissions. | ||
| 199 | */ | ||
| 200 | |||
| 201 | #define SOL_VSOCK	287 | ||
| 202 | |||
| 203 | /* 'cmsg_type' field value of 'struct cmsghdr' for notification parsing | ||
| 204 | * when MSG_ZEROCOPY flag is used on transmissions. | ||
| 205 | */ | ||
| 206 | |||
| 207 | #define VSOCK_RECVERR	1 | ||
| 208 | |||
| 192 | #endif /* _VM_SOCKETS_H */ | 209 | #endif /* _VM_SOCKETS_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/wireless.h+1-1| ... | @@ -831,7 +831,7 @@ struct iw_encode_ext { | ... | @@ -831,7 +831,7 @@ struct iw_encode_ext { |
| 831 | 			 * individual keys */ | 831 | 			 * individual keys */ |
| 832 | 	__u16		alg; /* IW_ENCODE_ALG_* */ | 832 | 	__u16		alg; /* IW_ENCODE_ALG_* */ |
| 833 | 	__u16		key_len; | 833 | 	__u16		key_len; |
| 834 | 	__u8		key[0]; | 834 | 	__u8		key[]; |
| 835 | }; | 835 | }; |
| 836 | 836 | ||
| 837 | /* SIOCSIWMLME data */ | 837 | /* SIOCSIWMLME data */ |
lib/libc/include/any-linux-any/linux/xfrm.h+9-2| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | ||
| 5 | #include <linux/in6.h> | 5 | #include <linux/in6.h> |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | #include <linux/stddef.h> | ||
| 7 | 8 | ||
| 8 | /* All of the structures in this file may not change size as they are | 9 | /* All of the structures in this file may not change size as they are |
| 9 | * passed into the kernel from userspace via netlink sockets. | 10 | * passed into the kernel from userspace via netlink sockets. |
| ... | @@ -33,7 +34,7 @@ struct xfrm_sec_ctx { | ... | @@ -33,7 +34,7 @@ struct xfrm_sec_ctx { |
| 33 | 	__u8	ctx_alg; | 34 | 	__u8	ctx_alg; |
| 34 | 	__u16	ctx_len; | 35 | 	__u16	ctx_len; |
| 35 | 	__u32	ctx_sid; | 36 | 	__u32	ctx_sid; |
| 36 | 	char	ctx_str[]; | 37 | 	char	ctx_str[] __counted_by(ctx_len); |
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | /* Security Context Domains of Interpretation */ | 40 | /* Security Context Domains of Interpretation */ |
| ... | @@ -140,6 +141,11 @@ enum { | ... | @@ -140,6 +141,11 @@ enum { |
| 140 | 	XFRM_POLICY_MAX	= 3 | 141 | 	XFRM_POLICY_MAX	= 3 |
| 141 | }; | 142 | }; |
| 142 | 143 | ||
| 144 | enum xfrm_sa_dir { | ||
| 145 | 	XFRM_SA_DIR_IN	= 1, | ||
| 146 | 	XFRM_SA_DIR_OUT = 2 | ||
| 147 | }; | ||
| 148 | |||
| 143 | enum { | 149 | enum { |
| 144 | 	XFRM_SHARE_ANY,		/* No limitations */ | 150 | 	XFRM_SHARE_ANY,		/* No limitations */ |
| 145 | 	XFRM_SHARE_SESSION,	/* For this session only */ | 151 | 	XFRM_SHARE_SESSION,	/* For this session only */ |
| ... | @@ -227,7 +233,7 @@ enum { | ... | @@ -227,7 +233,7 @@ enum { |
| 227 | #define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE) | 233 | #define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE) |
| 228 | 234 | ||
| 229 | /* | 235 | /* |
| 230 | * Generic LSM security context for comunicating to user space | 236 | * Generic LSM security context for communicating to user space |
| 231 | * NOTE: Same format as sadb_x_sec_ctx | 237 | * NOTE: Same format as sadb_x_sec_ctx |
| 232 | */ | 238 | */ |
| 233 | struct xfrm_user_sec_ctx { | 239 | struct xfrm_user_sec_ctx { |
| ... | @@ -314,6 +320,7 @@ enum xfrm_attr_type_t { | ... | @@ -314,6 +320,7 @@ enum xfrm_attr_type_t { |
| 314 | 	XFRMA_SET_MARK_MASK,	/* __u32 */ | 320 | 	XFRMA_SET_MARK_MASK,	/* __u32 */ |
| 315 | 	XFRMA_IF_ID,		/* __u32 */ | 321 | 	XFRMA_IF_ID,		/* __u32 */ |
| 316 | 	XFRMA_MTIMER_THRESH,	/* __u32 in seconds for input SA */ | 322 | 	XFRMA_MTIMER_THRESH,	/* __u32 in seconds for input SA */ |
| 323 | 	XFRMA_SA_DIR,		/* __u8 */ | ||
| 317 | 	__XFRMA_MAX | 324 | 	__XFRMA_MAX |
| 318 | 325 | ||
| 319 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK	/* Compatibility */ | 326 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK	/* Compatibility */ |
lib/libc/include/any-linux-any/misc/fastrpc.h+3| ... | @@ -8,11 +8,14 @@ | ... | @@ -8,11 +8,14 @@ |
| 8 | #define FASTRPC_IOCTL_ALLOC_DMA_BUFF	_IOWR('R', 1, struct fastrpc_alloc_dma_buf) | 8 | #define FASTRPC_IOCTL_ALLOC_DMA_BUFF	_IOWR('R', 1, struct fastrpc_alloc_dma_buf) |
| 9 | #define FASTRPC_IOCTL_FREE_DMA_BUFF	_IOWR('R', 2, __u32) | 9 | #define FASTRPC_IOCTL_FREE_DMA_BUFF	_IOWR('R', 2, __u32) |
| 10 | #define FASTRPC_IOCTL_INVOKE		_IOWR('R', 3, struct fastrpc_invoke) | 10 | #define FASTRPC_IOCTL_INVOKE		_IOWR('R', 3, struct fastrpc_invoke) |
| 11 | /* This ioctl is only supported with secure device nodes */ | ||
| 11 | #define FASTRPC_IOCTL_INIT_ATTACH	_IO('R', 4) | 12 | #define FASTRPC_IOCTL_INIT_ATTACH	_IO('R', 4) |
| 12 | #define FASTRPC_IOCTL_INIT_CREATE	_IOWR('R', 5, struct fastrpc_init_create) | 13 | #define FASTRPC_IOCTL_INIT_CREATE	_IOWR('R', 5, struct fastrpc_init_create) |
| 13 | #define FASTRPC_IOCTL_MMAP		_IOWR('R', 6, struct fastrpc_req_mmap) | 14 | #define FASTRPC_IOCTL_MMAP		_IOWR('R', 6, struct fastrpc_req_mmap) |
| 14 | #define FASTRPC_IOCTL_MUNMAP		_IOWR('R', 7, struct fastrpc_req_munmap) | 15 | #define FASTRPC_IOCTL_MUNMAP		_IOWR('R', 7, struct fastrpc_req_munmap) |
| 16 | /* This ioctl is only supported with secure device nodes */ | ||
| 15 | #define FASTRPC_IOCTL_INIT_ATTACH_SNS	_IO('R', 8) | 17 | #define FASTRPC_IOCTL_INIT_ATTACH_SNS	_IO('R', 8) |
| 18 | /* This ioctl is only supported with secure device nodes */ | ||
| 16 | #define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static) | 19 | #define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static) |
| 17 | #define FASTRPC_IOCTL_MEM_MAP		_IOWR('R', 10, struct fastrpc_mem_map) | 20 | #define FASTRPC_IOCTL_MEM_MAP		_IOWR('R', 10, struct fastrpc_mem_map) |
| 18 | #define FASTRPC_IOCTL_MEM_UNMAP		_IOWR('R', 11, struct fastrpc_mem_unmap) | 21 | #define FASTRPC_IOCTL_MEM_UNMAP		_IOWR('R', 11, struct fastrpc_mem_unmap) |
lib/libc/include/any-linux-any/misc/pvpanic.h+5-2| ... | @@ -3,7 +3,10 @@ | ... | @@ -3,7 +3,10 @@ |
| 3 | #ifndef __PVPANIC_H__ | 3 | #ifndef __PVPANIC_H__ |
| 4 | #define __PVPANIC_H__ | 4 | #define __PVPANIC_H__ |
| 5 | 5 | ||
| 6 | #define PVPANIC_PANICKED	(1 << 0) | 6 | #include <linux/const.h> |
| 7 | #define PVPANIC_CRASH_LOADED	(1 << 1) | 7 | |
| 8 | #define PVPANIC_PANICKED	_BITUL(0) | ||
| 9 | #define PVPANIC_CRASH_LOADED	_BITUL(1) | ||
| 10 | #define PVPANIC_SHUTDOWN	_BITUL(2) | ||
| 8 | 11 | ||
| 9 | #endif /* __PVPANIC_H__ */ | 12 | #endif /* __PVPANIC_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/mtd/ubi-user.h+3-1| ... | @@ -248,6 +248,7 @@ enum { | ... | @@ -248,6 +248,7 @@ enum { |
| 248 | * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs | 248 | * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs |
| 249 | * @padding: reserved for future, not used, has to be zeroed | 249 | * @padding: reserved for future, not used, has to be zeroed |
| 250 | * @disable_fm: whether disable fastmap | 250 | * @disable_fm: whether disable fastmap |
| 251 | * @need_resv_pool: whether reserve free pebs for filling pool/wl_pool | ||
| 251 | * | 252 | * |
| 252 | * This data structure is used to specify MTD device UBI has to attach and the | 253 | * This data structure is used to specify MTD device UBI has to attach and the |
| 253 | * parameters it has to use. The number which should be assigned to the new UBI | 254 | * parameters it has to use. The number which should be assigned to the new UBI |
| ... | @@ -293,7 +294,8 @@ struct ubi_attach_req { | ... | @@ -293,7 +294,8 @@ struct ubi_attach_req { |
| 293 | 	__s32 vid_hdr_offset; | 294 | 	__s32 vid_hdr_offset; |
| 294 | 	__s16 max_beb_per1024; | 295 | 	__s16 max_beb_per1024; |
| 295 | 	__s8 disable_fm; | 296 | 	__s8 disable_fm; |
| 296 | 	__s8 padding[9]; | 297 | 	__s8 need_resv_pool; |
| 298 | 	__s8 padding[8]; | ||
| 297 | }; | 299 | }; |
| 298 | 300 | ||
| 299 | /* | 301 | /* |
lib/libc/include/any-linux-any/rdma/bnxt_re-abi.h+79| ... | @@ -41,6 +41,7 @@ | ... | @@ -41,6 +41,7 @@ |
| 41 | #define __BNXT_RE_UVERBS_ABI_H__ | 41 | #define __BNXT_RE_UVERBS_ABI_H__ |
| 42 | 42 | ||
| 43 | #include <linux/types.h> | 43 | #include <linux/types.h> |
| 44 | #include <rdma/ib_user_ioctl_cmds.h> | ||
| 44 | 45 | ||
| 45 | #define BNXT_RE_ABI_VERSION	1 | 46 | #define BNXT_RE_ABI_VERSION	1 |
| 46 | 47 | ||
| ... | @@ -51,6 +52,10 @@ | ... | @@ -51,6 +52,10 @@ |
| 51 | enum { | 52 | enum { |
| 52 | 	BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, | 53 | 	BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, |
| 53 | 	BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, | 54 | 	BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, |
| 55 | 	BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, | ||
| 56 | 	BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, | ||
| 57 | 	BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL, | ||
| 58 | 	BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, | ||
| 54 | }; | 59 | }; |
| 55 | 60 | ||
| 56 | enum bnxt_re_wqe_mode { | 61 | enum bnxt_re_wqe_mode { |
| ... | @@ -59,6 +64,14 @@ enum bnxt_re_wqe_mode { | ... | @@ -59,6 +64,14 @@ enum bnxt_re_wqe_mode { |
| 59 | 	BNXT_QPLIB_WQE_MODE_INVALID	= 0x02, | 64 | 	BNXT_QPLIB_WQE_MODE_INVALID	= 0x02, |
| 60 | }; | 65 | }; |
| 61 | 66 | ||
| 67 | enum { | ||
| 68 | 	BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct bnxt_re_uctx_req { | ||
| 72 | 	__aligned_u64 comp_mask; | ||
| 73 | }; | ||
| 74 | |||
| 62 | struct bnxt_re_uctx_resp { | 75 | struct bnxt_re_uctx_resp { |
| 63 | 	__u32 dev_id; | 76 | 	__u32 dev_id; |
| 64 | 	__u32 max_qp; | 77 | 	__u32 max_qp; |
| ... | @@ -89,11 +102,20 @@ struct bnxt_re_cq_req { | ... | @@ -89,11 +102,20 @@ struct bnxt_re_cq_req { |
| 89 | 	__aligned_u64 cq_handle; | 102 | 	__aligned_u64 cq_handle; |
| 90 | }; | 103 | }; |
| 91 | 104 | ||
| 105 | enum bnxt_re_cq_mask { | ||
| 106 | 	BNXT_RE_CQ_TOGGLE_PAGE_SUPPORT = 0x1, | ||
| 107 | }; | ||
| 108 | |||
| 92 | struct bnxt_re_cq_resp { | 109 | struct bnxt_re_cq_resp { |
| 93 | 	__u32 cqid; | 110 | 	__u32 cqid; |
| 94 | 	__u32 tail; | 111 | 	__u32 tail; |
| 95 | 	__u32 phase; | 112 | 	__u32 phase; |
| 96 | 	__u32 rsvd; | 113 | 	__u32 rsvd; |
| 114 | 	__aligned_u64 comp_mask; | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct bnxt_re_resize_cq_req { | ||
| 118 | 	__aligned_u64 cq_va; | ||
| 97 | }; | 119 | }; |
| 98 | 120 | ||
| 99 | struct bnxt_re_qp_req { | 121 | struct bnxt_re_qp_req { |
| ... | @@ -123,4 +145,61 @@ enum bnxt_re_shpg_offt { | ... | @@ -123,4 +145,61 @@ enum bnxt_re_shpg_offt { |
| 123 | 	BNXT_RE_END_RESV_OFFT	= 0xFF0 | 145 | 	BNXT_RE_END_RESV_OFFT	= 0xFF0 |
| 124 | }; | 146 | }; |
| 125 | 147 | ||
| 148 | enum bnxt_re_objects { | ||
| 149 | 	BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 150 | 	BNXT_RE_OBJECT_NOTIFY_DRV, | ||
| 151 | 	BNXT_RE_OBJECT_GET_TOGGLE_MEM, | ||
| 152 | }; | ||
| 153 | |||
| 154 | enum bnxt_re_alloc_page_type { | ||
| 155 | 	BNXT_RE_ALLOC_WC_PAGE = 0, | ||
| 156 | 	BNXT_RE_ALLOC_DBR_BAR_PAGE, | ||
| 157 | 	BNXT_RE_ALLOC_DBR_PAGE, | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum bnxt_re_var_alloc_page_attrs { | ||
| 161 | 	BNXT_RE_ALLOC_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 162 | 	BNXT_RE_ALLOC_PAGE_TYPE, | ||
| 163 | 	BNXT_RE_ALLOC_PAGE_DPI, | ||
| 164 | 	BNXT_RE_ALLOC_PAGE_MMAP_OFFSET, | ||
| 165 | 	BNXT_RE_ALLOC_PAGE_MMAP_LENGTH, | ||
| 166 | }; | ||
| 167 | |||
| 168 | enum bnxt_re_alloc_page_attrs { | ||
| 169 | 	BNXT_RE_DESTROY_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 170 | }; | ||
| 171 | |||
| 172 | enum bnxt_re_alloc_page_methods { | ||
| 173 | 	BNXT_RE_METHOD_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 174 | 	BNXT_RE_METHOD_DESTROY_PAGE, | ||
| 175 | }; | ||
| 176 | |||
| 177 | enum bnxt_re_notify_drv_methods { | ||
| 178 | 	BNXT_RE_METHOD_NOTIFY_DRV = (1U << UVERBS_ID_NS_SHIFT), | ||
| 179 | }; | ||
| 180 | |||
| 181 | /* Toggle mem */ | ||
| 182 | |||
| 183 | enum bnxt_re_get_toggle_mem_type { | ||
| 184 | 	BNXT_RE_CQ_TOGGLE_MEM = 0, | ||
| 185 | 	BNXT_RE_SRQ_TOGGLE_MEM, | ||
| 186 | }; | ||
| 187 | |||
| 188 | enum bnxt_re_var_toggle_mem_attrs { | ||
| 189 | 	BNXT_RE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 190 | 	BNXT_RE_TOGGLE_MEM_TYPE, | ||
| 191 | 	BNXT_RE_TOGGLE_MEM_RES_ID, | ||
| 192 | 	BNXT_RE_TOGGLE_MEM_MMAP_PAGE, | ||
| 193 | 	BNXT_RE_TOGGLE_MEM_MMAP_OFFSET, | ||
| 194 | 	BNXT_RE_TOGGLE_MEM_MMAP_LENGTH, | ||
| 195 | }; | ||
| 196 | |||
| 197 | enum bnxt_re_toggle_mem_attrs { | ||
| 198 | 	BNXT_RE_RELEASE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 199 | }; | ||
| 200 | |||
| 201 | enum bnxt_re_toggle_mem_methods { | ||
| 202 | 	BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT), | ||
| 203 | 	BNXT_RE_METHOD_RELEASE_TOGGLE_MEM, | ||
| 204 | }; | ||
| 126 | #endif /* __BNXT_RE_UVERBS_ABI_H__*/ | 205 | #endif /* __BNXT_RE_UVERBS_ABI_H__*/ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/rdma/efa-abi.h+29-1| ... | @@ -1,12 +1,13 @@ | ... | @@ -1,12 +1,13 @@ |
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All rights reserved. | 3 | * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef EFA_ABI_USER_H | 6 | #ifndef EFA_ABI_USER_H |
| 7 | #define EFA_ABI_USER_H | 7 | #define EFA_ABI_USER_H |
| 8 | 8 | ||
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | #include <rdma/ib_user_ioctl_cmds.h> | ||
| 10 | 11 | ||
| 11 | /* | 12 | /* |
| 12 | * Increment this value if any changes that break userspace ABI | 13 | * Increment this value if any changes that break userspace ABI |
| ... | @@ -84,11 +85,17 @@ enum { | ... | @@ -84,11 +85,17 @@ enum { |
| 84 | 	EFA_QP_DRIVER_TYPE_SRD = 0, | 85 | 	EFA_QP_DRIVER_TYPE_SRD = 0, |
| 85 | }; | 86 | }; |
| 86 | 87 | ||
| 88 | enum { | ||
| 89 | 	EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV = 1 << 0, | ||
| 90 | }; | ||
| 91 | |||
| 87 | struct efa_ibv_create_qp { | 92 | struct efa_ibv_create_qp { |
| 88 | 	__u32 comp_mask; | 93 | 	__u32 comp_mask; |
| 89 | 	__u32 rq_ring_size; /* bytes */ | 94 | 	__u32 rq_ring_size; /* bytes */ |
| 90 | 	__u32 sq_ring_size; /* bytes */ | 95 | 	__u32 sq_ring_size; /* bytes */ |
| 91 | 	__u32 driver_qp_type; | 96 | 	__u32 driver_qp_type; |
| 97 | 	__u16 flags; | ||
| 98 | 	__u8 reserved_90[6]; | ||
| 92 | }; | 99 | }; |
| 93 | 100 | ||
| 94 | struct efa_ibv_create_qp_resp { | 101 | struct efa_ibv_create_qp_resp { |
| ... | @@ -120,6 +127,9 @@ enum { | ... | @@ -120,6 +127,9 @@ enum { |
| 120 | 	EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1, | 127 | 	EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1, |
| 121 | 	EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2, | 128 | 	EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2, |
| 122 | 	EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3, | 129 | 	EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3, |
| 130 | 	EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4, | ||
| 131 | 	EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5, | ||
| 132 | 	EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6, | ||
| 123 | }; | 133 | }; |
| 124 | 134 | ||
| 125 | struct efa_ibv_ex_query_device_resp { | 135 | struct efa_ibv_ex_query_device_resp { |
| ... | @@ -132,4 +142,22 @@ struct efa_ibv_ex_query_device_resp { | ... | @@ -132,4 +142,22 @@ struct efa_ibv_ex_query_device_resp { |
| 132 | 	__u32 device_caps; | 142 | 	__u32 device_caps; |
| 133 | }; | 143 | }; |
| 134 | 144 | ||
| 145 | enum { | ||
| 146 | 	EFA_QUERY_MR_VALIDITY_RECV_IC_ID = 1 << 0, | ||
| 147 | 	EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID = 1 << 1, | ||
| 148 | 	EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID = 1 << 2, | ||
| 149 | }; | ||
| 150 | |||
| 151 | enum efa_query_mr_attrs { | ||
| 152 | 	EFA_IB_ATTR_QUERY_MR_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 153 | 	EFA_IB_ATTR_QUERY_MR_RESP_IC_ID_VALIDITY, | ||
| 154 | 	EFA_IB_ATTR_QUERY_MR_RESP_RECV_IC_ID, | ||
| 155 | 	EFA_IB_ATTR_QUERY_MR_RESP_RDMA_READ_IC_ID, | ||
| 156 | 	EFA_IB_ATTR_QUERY_MR_RESP_RDMA_RECV_IC_ID, | ||
| 157 | }; | ||
| 158 | |||
| 159 | enum efa_mr_methods { | ||
| 160 | 	EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT), | ||
| 161 | }; | ||
| 162 | |||
| 135 | #endif /* EFA_ABI_USER_H */ | 163 | #endif /* EFA_ABI_USER_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/rdma/hns-abi.h+39-1| ... | @@ -52,15 +52,36 @@ struct hns_roce_ib_create_cq_resp { | ... | @@ -52,15 +52,36 @@ struct hns_roce_ib_create_cq_resp { |
| 52 | 	__aligned_u64 cap_flags; | 52 | 	__aligned_u64 cap_flags; |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | enum hns_roce_srq_cap_flags { | ||
| 56 | 	HNS_ROCE_SRQ_CAP_RECORD_DB = 1 << 0, | ||
| 57 | }; | ||
| 58 | |||
| 59 | enum hns_roce_srq_cap_flags_resp { | ||
| 60 | 	HNS_ROCE_RSP_SRQ_CAP_RECORD_DB = 1 << 0, | ||
| 61 | }; | ||
| 62 | |||
| 55 | struct hns_roce_ib_create_srq { | 63 | struct hns_roce_ib_create_srq { |
| 56 | 	__aligned_u64 buf_addr; | 64 | 	__aligned_u64 buf_addr; |
| 57 | 	__aligned_u64 db_addr; | 65 | 	__aligned_u64 db_addr; |
| 58 | 	__aligned_u64 que_addr; | 66 | 	__aligned_u64 que_addr; |
| 67 | 	__u32 req_cap_flags; /* Use enum hns_roce_srq_cap_flags */ | ||
| 68 | 	__u32 reserved; | ||
| 59 | }; | 69 | }; |
| 60 | 70 | ||
| 61 | struct hns_roce_ib_create_srq_resp { | 71 | struct hns_roce_ib_create_srq_resp { |
| 62 | 	__u32	srqn; | 72 | 	__u32	srqn; |
| 63 | 	__u32	reserved; | 73 | 	__u32	cap_flags; /* Use enum hns_roce_srq_cap_flags */ |
| 74 | }; | ||
| 75 | |||
| 76 | enum hns_roce_congest_type_flags { | ||
| 77 | 	HNS_ROCE_CREATE_QP_FLAGS_DCQCN, | ||
| 78 | 	HNS_ROCE_CREATE_QP_FLAGS_LDCP, | ||
| 79 | 	HNS_ROCE_CREATE_QP_FLAGS_HC3, | ||
| 80 | 	HNS_ROCE_CREATE_QP_FLAGS_DIP, | ||
| 81 | }; | ||
| 82 | |||
| 83 | enum hns_roce_create_qp_comp_mask { | ||
| 84 | 	HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 0, | ||
| 64 | }; | 85 | }; |
| 65 | 86 | ||
| 66 | struct hns_roce_ib_create_qp { | 87 | struct hns_roce_ib_create_qp { |
| ... | @@ -71,6 +92,9 @@ struct hns_roce_ib_create_qp { | ... | @@ -71,6 +92,9 @@ struct hns_roce_ib_create_qp { |
| 71 | 	__u8 sq_no_prefetch; | 92 | 	__u8 sq_no_prefetch; |
| 72 | 	__u8 reserved[5]; | 93 | 	__u8 reserved[5]; |
| 73 | 	__aligned_u64 sdb_addr; | 94 | 	__aligned_u64 sdb_addr; |
| 95 | 	__aligned_u64 comp_mask; /* Use enum hns_roce_create_qp_comp_mask */ | ||
| 96 | 	__aligned_u64 create_flags; | ||
| 97 | 	__aligned_u64 cong_type_flags; | ||
| 74 | }; | 98 | }; |
| 75 | 99 | ||
| 76 | enum hns_roce_qp_cap_flags { | 100 | enum hns_roce_qp_cap_flags { |
| ... | @@ -85,6 +109,12 @@ struct hns_roce_ib_create_qp_resp { | ... | @@ -85,6 +109,12 @@ struct hns_roce_ib_create_qp_resp { |
| 85 | 	__aligned_u64 dwqe_mmap_key; | 109 | 	__aligned_u64 dwqe_mmap_key; |
| 86 | }; | 110 | }; |
| 87 | 111 | ||
| 112 | struct hns_roce_ib_modify_qp_resp { | ||
| 113 | 	__u8	tc_mode; | ||
| 114 | 	__u8	priority; | ||
| 115 | 	__u8	reserved[6]; | ||
| 116 | }; | ||
| 117 | |||
| 88 | enum { | 118 | enum { |
| 89 | 	HNS_ROCE_EXSGE_FLAGS = 1 << 0, | 119 | 	HNS_ROCE_EXSGE_FLAGS = 1 << 0, |
| 90 | 	HNS_ROCE_RQ_INLINE_FLAGS = 1 << 1, | 120 | 	HNS_ROCE_RQ_INLINE_FLAGS = 1 << 1, |
| ... | @@ -104,6 +134,8 @@ struct hns_roce_ib_alloc_ucontext_resp { | ... | @@ -104,6 +134,8 @@ struct hns_roce_ib_alloc_ucontext_resp { |
| 104 | 	__u32	reserved; | 134 | 	__u32	reserved; |
| 105 | 	__u32	config; | 135 | 	__u32	config; |
| 106 | 	__u32	max_inline_data; | 136 | 	__u32	max_inline_data; |
| 137 | 	__u8	congest_type; | ||
| 138 | 	__u8	reserved0[7]; | ||
| 107 | }; | 139 | }; |
| 108 | 140 | ||
| 109 | struct hns_roce_ib_alloc_ucontext { | 141 | struct hns_roce_ib_alloc_ucontext { |
| ... | @@ -115,4 +147,10 @@ struct hns_roce_ib_alloc_pd_resp { | ... | @@ -115,4 +147,10 @@ struct hns_roce_ib_alloc_pd_resp { |
| 115 | 	__u32 pdn; | 147 | 	__u32 pdn; |
| 116 | }; | 148 | }; |
| 117 | 149 | ||
| 150 | struct hns_roce_ib_create_ah_resp { | ||
| 151 | 	__u8 dmac[6]; | ||
| 152 | 	__u8 priority; | ||
| 153 | 	__u8 tc_mode; | ||
| 154 | }; | ||
| 155 | |||
| 118 | #endif /* HNS_ABI_USER_H */ | 156 | #endif /* HNS_ABI_USER_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h+2-1| ... | @@ -220,7 +220,8 @@ enum ib_uverbs_advise_mr_flag { | ... | @@ -220,7 +220,8 @@ enum ib_uverbs_advise_mr_flag { |
| 220 | struct ib_uverbs_query_port_resp_ex { | 220 | struct ib_uverbs_query_port_resp_ex { |
| 221 | 	struct ib_uverbs_query_port_resp legacy_resp; | 221 | 	struct ib_uverbs_query_port_resp legacy_resp; |
| 222 | 	__u16 port_cap_flags2; | 222 | 	__u16 port_cap_flags2; |
| 223 | 	__u8 reserved[6]; | 223 | 	__u8 reserved[2]; |
| 224 | 	__u32 active_speed_ex; | ||
| 224 | }; | 225 | }; |
| 225 | 226 | ||
| 226 | struct ib_uverbs_qp_cap { | 227 | struct ib_uverbs_qp_cap { |
lib/libc/include/any-linux-any/rdma/irdma-abi.h+9| ... | @@ -22,10 +22,16 @@ enum irdma_memreg_type { | ... | @@ -22,10 +22,16 @@ enum irdma_memreg_type { |
| 22 | 	IRDMA_MEMREG_TYPE_CQ = 2, | 22 | 	IRDMA_MEMREG_TYPE_CQ = 2, |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | enum { | ||
| 26 | 	IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0, | ||
| 27 | 	IRDMA_ALLOC_UCTX_MIN_HW_WQ_SIZE = 1 << 1, | ||
| 28 | }; | ||
| 29 | |||
| 25 | struct irdma_alloc_ucontext_req { | 30 | struct irdma_alloc_ucontext_req { |
| 26 | 	__u32 rsvd32; | 31 | 	__u32 rsvd32; |
| 27 | 	__u8 userspace_ver; | 32 | 	__u8 userspace_ver; |
| 28 | 	__u8 rsvd8[3]; | 33 | 	__u8 rsvd8[3]; |
| 34 | 	__aligned_u64 comp_mask; | ||
| 29 | }; | 35 | }; |
| 30 | 36 | ||
| 31 | struct irdma_alloc_ucontext_resp { | 37 | struct irdma_alloc_ucontext_resp { |
| ... | @@ -46,6 +52,9 @@ struct irdma_alloc_ucontext_resp { | ... | @@ -46,6 +52,9 @@ struct irdma_alloc_ucontext_resp { |
| 46 | 	__u16 max_hw_sq_chunk; | 52 | 	__u16 max_hw_sq_chunk; |
| 47 | 	__u8 hw_rev; | 53 | 	__u8 hw_rev; |
| 48 | 	__u8 rsvd2; | 54 | 	__u8 rsvd2; |
| 55 | 	__aligned_u64 comp_mask; | ||
| 56 | 	__u16 min_hw_wq_size; | ||
| 57 | 	__u8 rsvd3[6]; | ||
| 49 | }; | 58 | }; |
| 50 | 59 | ||
| 51 | struct irdma_alloc_pd_resp { | 60 | struct irdma_alloc_pd_resp { |
lib/libc/include/any-linux-any/rdma/mana-abi.h+12| ... | @@ -16,8 +16,20 @@ | ... | @@ -16,8 +16,20 @@ |
| 16 | 16 | ||
| 17 | #define MANA_IB_UVERBS_ABI_VERSION 1 | 17 | #define MANA_IB_UVERBS_ABI_VERSION 1 |
| 18 | 18 | ||
| 19 | enum mana_ib_create_cq_flags { | ||
| 20 | 	MANA_IB_CREATE_RNIC_CQ	= 1 << 0, | ||
| 21 | }; | ||
| 22 | |||
| 19 | struct mana_ib_create_cq { | 23 | struct mana_ib_create_cq { |
| 20 | 	__aligned_u64 buf_addr; | 24 | 	__aligned_u64 buf_addr; |
| 25 | 	__u16	flags; | ||
| 26 | 	__u16	reserved0; | ||
| 27 | 	__u32	reserved1; | ||
| 28 | }; | ||
| 29 | |||
| 30 | struct mana_ib_create_cq_resp { | ||
| 31 | 	__u32 cqid; | ||
| 32 | 	__u32 reserved; | ||
| 21 | }; | 33 | }; |
| 22 | 34 | ||
| 23 | struct mana_ib_create_qp { | 35 | struct mana_ib_create_qp { |
lib/libc/include/any-linux-any/rdma/mlx5-abi.h+2| ... | @@ -37,6 +37,7 @@ | ... | @@ -37,6 +37,7 @@ |
| 37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 38 | #include <linux/if_ether.h>	/* For ETH_ALEN. */ | 38 | #include <linux/if_ether.h>	/* For ETH_ALEN. */ |
| 39 | #include <rdma/ib_user_ioctl_verbs.h> | 39 | #include <rdma/ib_user_ioctl_verbs.h> |
| 40 | #include <rdma/mlx5_user_ioctl_verbs.h> | ||
| 40 | 41 | ||
| 41 | enum { | 42 | enum { |
| 42 | 	MLX5_QP_FLAG_SIGNATURE		= 1 << 0, | 43 | 	MLX5_QP_FLAG_SIGNATURE		= 1 << 0, |
| ... | @@ -275,6 +276,7 @@ struct mlx5_ib_query_device_resp { | ... | @@ -275,6 +276,7 @@ struct mlx5_ib_query_device_resp { |
| 275 | 	__u32	tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ | 276 | 	__u32	tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ |
| 276 | 	struct mlx5_ib_dci_streams_caps dci_streams_caps; | 277 | 	struct mlx5_ib_dci_streams_caps dci_streams_caps; |
| 277 | 	__u16 reserved; | 278 | 	__u16 reserved; |
| 279 | 	struct mlx5_ib_uapi_reg reg_c0; | ||
| 278 | }; | 280 | }; |
| 279 | 281 | ||
| 280 | enum mlx5_ib_create_cq_flags { | 282 | enum mlx5_ib_create_cq_flags { |
lib/libc/include/any-linux-any/rdma/mlx5_user_ioctl_verbs.h+1| ... | @@ -64,6 +64,7 @@ enum mlx5_ib_uapi_dm_type { | ... | @@ -64,6 +64,7 @@ enum mlx5_ib_uapi_dm_type { |
| 64 | 	MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, | 64 | 	MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, |
| 65 | 	MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, | 65 | 	MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, |
| 66 | 	MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, | 66 | 	MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, |
| 67 | 	MLX5_IB_UAPI_DM_TYPE_ENCAP_SW_ICM, | ||
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | enum mlx5_ib_uapi_devx_create_event_channel_flags { | 70 | enum mlx5_ib_uapi_devx_create_event_channel_flags { |
lib/libc/include/any-linux-any/rdma/rdma_netlink.h+10| ... | @@ -299,6 +299,8 @@ enum rdma_nldev_command { | ... | @@ -299,6 +299,8 @@ enum rdma_nldev_command { |
| 299 | 299 | ||
| 300 | 	RDMA_NLDEV_CMD_STAT_GET_STATUS, | 300 | 	RDMA_NLDEV_CMD_STAT_GET_STATUS, |
| 301 | 301 | ||
| 302 | 	RDMA_NLDEV_CMD_RES_SRQ_GET_RAW, | ||
| 303 | |||
| 302 | 	RDMA_NLDEV_NUM_OPS | 304 | 	RDMA_NLDEV_NUM_OPS |
| 303 | }; | 305 | }; |
| 304 | 306 | ||
| ... | @@ -554,6 +556,14 @@ enum rdma_nldev_attr { | ... | @@ -554,6 +556,14 @@ enum rdma_nldev_attr { |
| 554 | 	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX,	/* u32 */ | 556 | 	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX,	/* u32 */ |
| 555 | 	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC, /* u8 */ | 557 | 	RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC, /* u8 */ |
| 556 | 558 | ||
| 559 | 	RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE, /* u8 */ | ||
| 560 | |||
| 561 | 	RDMA_NLDEV_ATTR_DRIVER_DETAILS,		/* u8 */ | ||
| 562 | 	/* | ||
| 563 | 	 * QP subtype string, used for driver QPs | ||
| 564 | 	 */ | ||
| 565 | 	RDMA_NLDEV_ATTR_RES_SUBTYPE,		/* string */ | ||
| 566 | |||
| 557 | 	/* | 567 | 	/* |
| 558 | 	 * Always the end | 568 | 	 * Always the end |
| 559 | 	 */ | 569 | 	 */ |
lib/libc/include/any-linux-any/rdma/siw-abi.h+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) or BSD-3-Clause */ | 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */ |
| 2 | 2 | ||
| 3 | /* Authors: Bernard Metzler <bmt@zurich.ibm.com> */ | 3 | /* Authors: Bernard Metzler <bmt@zurich.ibm.com> */ |
| 4 | /* Copyright (c) 2008-2019, IBM Corporation */ | 4 | /* Copyright (c) 2008-2019, IBM Corporation */ |
lib/libc/include/any-linux-any/regulator/regulator.h created+86| ... | @@ -0,0 +1,86 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Regulator uapi header | ||
| 4 | * | ||
| 5 | * Author: Naresh Solanki <Naresh.Solanki@9elements.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _REGULATOR_H | ||
| 9 | #define _REGULATOR_H | ||
| 10 | |||
| 11 | #include <stdint.h> | ||
| 12 | |||
| 13 | /* | ||
| 14 | * Regulator notifier events. | ||
| 15 | * | ||
| 16 | * UNDER_VOLTAGE Regulator output is under voltage. | ||
| 17 | * OVER_CURRENT Regulator output current is too high. | ||
| 18 | * REGULATION_OUT Regulator output is out of regulation. | ||
| 19 | * FAIL Regulator output has failed. | ||
| 20 | * OVER_TEMP Regulator over temp. | ||
| 21 | * FORCE_DISABLE Regulator forcibly shut down by software. | ||
| 22 | * VOLTAGE_CHANGE Regulator voltage changed. | ||
| 23 | * Data passed is old voltage cast to (void *). | ||
| 24 | * DISABLE Regulator was disabled. | ||
| 25 | * PRE_VOLTAGE_CHANGE Regulator is about to have voltage changed. | ||
| 26 | * Data passed is "struct pre_voltage_change_data" | ||
| 27 | * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason. | ||
| 28 | * Data passed is old voltage cast to (void *). | ||
| 29 | * PRE_DISABLE Regulator is about to be disabled | ||
| 30 | * ABORT_DISABLE Regulator disable failed for some reason | ||
| 31 | * | ||
| 32 | * NOTE: These events can be OR'ed together when passed into handler. | ||
| 33 | */ | ||
| 34 | |||
| 35 | #define REGULATOR_EVENT_UNDER_VOLTAGE		0x01 | ||
| 36 | #define REGULATOR_EVENT_OVER_CURRENT		0x02 | ||
| 37 | #define REGULATOR_EVENT_REGULATION_OUT		0x04 | ||
| 38 | #define REGULATOR_EVENT_FAIL			0x08 | ||
| 39 | #define REGULATOR_EVENT_OVER_TEMP		0x10 | ||
| 40 | #define REGULATOR_EVENT_FORCE_DISABLE		0x20 | ||
| 41 | #define REGULATOR_EVENT_VOLTAGE_CHANGE		0x40 | ||
| 42 | #define REGULATOR_EVENT_DISABLE			0x80 | ||
| 43 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE	0x100 | ||
| 44 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE	0x200 | ||
| 45 | #define REGULATOR_EVENT_PRE_DISABLE		0x400 | ||
| 46 | #define REGULATOR_EVENT_ABORT_DISABLE		0x800 | ||
| 47 | #define REGULATOR_EVENT_ENABLE			0x1000 | ||
| 48 | /* | ||
| 49 | * Following notifications should be emitted only if detected condition | ||
| 50 | * is such that the HW is likely to still be working but consumers should | ||
| 51 | * take a recovery action to prevent problems escalating into errors. | ||
| 52 | */ | ||
| 53 | #define REGULATOR_EVENT_UNDER_VOLTAGE_WARN	0x2000 | ||
| 54 | #define REGULATOR_EVENT_OVER_CURRENT_WARN	0x4000 | ||
| 55 | #define REGULATOR_EVENT_OVER_VOLTAGE_WARN	0x8000 | ||
| 56 | #define REGULATOR_EVENT_OVER_TEMP_WARN		0x10000 | ||
| 57 | #define REGULATOR_EVENT_WARN_MASK		0x1E000 | ||
| 58 | |||
| 59 | struct reg_genl_event { | ||
| 60 | 	char reg_name[32]; | ||
| 61 | 	uint64_t event; | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* attributes of reg_genl_family */ | ||
| 65 | enum { | ||
| 66 | 	REG_GENL_ATTR_UNSPEC, | ||
| 67 | 	REG_GENL_ATTR_EVENT,	/* reg event info needed by user space */ | ||
| 68 | 	__REG_GENL_ATTR_MAX, | ||
| 69 | }; | ||
| 70 | |||
| 71 | #define REG_GENL_ATTR_MAX (__REG_GENL_ATTR_MAX - 1) | ||
| 72 | |||
| 73 | /* commands supported by the reg_genl_family */ | ||
| 74 | enum { | ||
| 75 | 	REG_GENL_CMD_UNSPEC, | ||
| 76 | 	REG_GENL_CMD_EVENT,	/* kernel->user notifications for reg events */ | ||
| 77 | 	__REG_GENL_CMD_MAX, | ||
| 78 | }; | ||
| 79 | |||
| 80 | #define REG_GENL_CMD_MAX (__REG_GENL_CMD_MAX - 1) | ||
| 81 | |||
| 82 | #define REG_GENL_FAMILY_NAME		"reg_event" | ||
| 83 | #define REG_GENL_VERSION		0x01 | ||
| 84 | #define REG_GENL_MCAST_GROUP_NAME	"reg_mc_group" | ||
| 85 | |||
| 86 | #endif /* _REGULATOR_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/scsi/scsi_bsg_mpi3mr.h+8-4| ... | @@ -382,7 +382,7 @@ struct mpi3mr_bsg_in_reply_buf { | ... | @@ -382,7 +382,7 @@ struct mpi3mr_bsg_in_reply_buf { |
| 382 | 	__u8	mpi_reply_type; | 382 | 	__u8	mpi_reply_type; |
| 383 | 	__u8	rsvd1; | 383 | 	__u8	rsvd1; |
| 384 | 	__u16	rsvd2; | 384 | 	__u16	rsvd2; |
| 385 | 	__u8	reply_buf[1]; | 385 | 	__u8	reply_buf[]; |
| 386 | }; | 386 | }; |
| 387 | 387 | ||
| 388 | /** | 388 | /** |
| ... | @@ -401,7 +401,7 @@ struct mpi3mr_buf_entry { | ... | @@ -401,7 +401,7 @@ struct mpi3mr_buf_entry { |
| 401 | 	__u32	buf_len; | 401 | 	__u32	buf_len; |
| 402 | }; | 402 | }; |
| 403 | /** | 403 | /** |
| 404 | * struct mpi3mr_bsg_buf_entry_list - list of user buffer | 404 | * struct mpi3mr_buf_entry_list - list of user buffer |
| 405 | * descriptor for MPI Passthrough requests. | 405 | * descriptor for MPI Passthrough requests. |
| 406 | * | 406 | * |
| 407 | * @num_of_entries: Number of buffer descriptors | 407 | * @num_of_entries: Number of buffer descriptors |
| ... | @@ -424,6 +424,7 @@ struct mpi3mr_buf_entry_list { | ... | @@ -424,6 +424,7 @@ struct mpi3mr_buf_entry_list { |
| 424 | * @mrioc_id: Controller ID | 424 | * @mrioc_id: Controller ID |
| 425 | * @rsvd1: Reserved | 425 | * @rsvd1: Reserved |
| 426 | * @timeout: MPI request timeout | 426 | * @timeout: MPI request timeout |
| 427 | * @rsvd2: Reserved | ||
| 427 | * @buf_entry_list: Buffer descriptor list | 428 | * @buf_entry_list: Buffer descriptor list |
| 428 | */ | 429 | */ |
| 429 | struct mpi3mr_bsg_mptcmd { | 430 | struct mpi3mr_bsg_mptcmd { |
| ... | @@ -441,8 +442,9 @@ struct mpi3mr_bsg_mptcmd { | ... | @@ -441,8 +442,9 @@ struct mpi3mr_bsg_mptcmd { |
| 441 | * @cmd_type: represents drvrcmd or mptcmd | 442 | * @cmd_type: represents drvrcmd or mptcmd |
| 442 | * @rsvd1: Reserved | 443 | * @rsvd1: Reserved |
| 443 | * @rsvd2: Reserved | 444 | * @rsvd2: Reserved |
| 444 | * @drvrcmd: driver request structure | 445 | * @rsvd3: Reserved |
| 445 | * @mptcmd: mpt request structure | 446 | * @cmd.drvrcmd: driver request structure |
| 447 | * @cmd.mptcmd: mpt request structure | ||
| 446 | */ | 448 | */ |
| 447 | struct mpi3mr_bsg_packet { | 449 | struct mpi3mr_bsg_packet { |
| 448 | 	__u8	cmd_type; | 450 | 	__u8	cmd_type; |
| ... | @@ -491,6 +493,8 @@ struct mpi3_nvme_encapsulated_error_reply { | ... | @@ -491,6 +493,8 @@ struct mpi3_nvme_encapsulated_error_reply { |
| 491 | #define MPI3MR_NVME_DATA_FORMAT_PRP	0 | 493 | #define MPI3MR_NVME_DATA_FORMAT_PRP	0 |
| 492 | #define MPI3MR_NVME_DATA_FORMAT_SGL1	1 | 494 | #define MPI3MR_NVME_DATA_FORMAT_SGL1	1 |
| 493 | #define MPI3MR_NVME_DATA_FORMAT_SGL2	2 | 495 | #define MPI3MR_NVME_DATA_FORMAT_SGL2	2 |
| 496 | #define MPI3MR_NVMESGL_DATA_SEGMENT	0x00 | ||
| 497 | #define MPI3MR_NVMESGL_LAST_SEGMENT	0x03 | ||
| 494 | 498 | ||
| 495 | /* MPI3: task management related definitions */ | 499 | /* MPI3: task management related definitions */ |
| 496 | struct mpi3_scsi_task_mgmt_request { | 500 | struct mpi3_scsi_task_mgmt_request { |
lib/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h+77-4| ... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
| 8 | #ifndef SCSI_BSG_UFS_H | 8 | #ifndef SCSI_BSG_UFS_H |
| 9 | #define SCSI_BSG_UFS_H | 9 | #define SCSI_BSG_UFS_H |
| 10 | 10 | ||
| 11 | #include <asm/byteorder.h> | ||
| 11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 12 | /* | 13 | /* |
| 13 | * This file intended to be included by both kernel and user space | 14 | * This file intended to be included by both kernel and user space |
| ... | @@ -40,11 +41,56 @@ enum ufs_rpmb_op_type { | ... | @@ -40,11 +41,56 @@ enum ufs_rpmb_op_type { |
| 40 | * @dword_0: UPIU header DW-0 | 41 | * @dword_0: UPIU header DW-0 |
| 41 | * @dword_1: UPIU header DW-1 | 42 | * @dword_1: UPIU header DW-1 |
| 42 | * @dword_2: UPIU header DW-2 | 43 | * @dword_2: UPIU header DW-2 |
| 44 | * | ||
| 45 | * @transaction_code: Type of request or response. See also enum | ||
| 46 | *	upiu_request_transaction and enum upiu_response_transaction. | ||
| 47 | * @flags: UPIU flags. The meaning of individual flags depends on the | ||
| 48 | *	transaction code. | ||
| 49 | * @lun: Logical unit number. | ||
| 50 | * @task_tag: Task tag. | ||
| 51 | * @iid: Initiator ID. | ||
| 52 | * @command_set_type: 0 for SCSI command set; 1 for UFS specific. | ||
| 53 | * @tm_function: Task management function in case of a task management request | ||
| 54 | *	UPIU. | ||
| 55 | * @query_function: Query function in case of a query request UPIU. | ||
| 56 | * @response: 0 for success; 1 for failure. | ||
| 57 | * @status: SCSI status if this is the header of a response to a SCSI command. | ||
| 58 | * @ehs_length: EHS length in units of 32 bytes. | ||
| 59 | * @device_information: | ||
| 60 | * @data_segment_length: data segment length. | ||
| 43 | */ | 61 | */ |
| 44 | struct utp_upiu_header { | 62 | struct utp_upiu_header { |
| 45 | 	__be32 dword_0; | 63 | 	union { |
| 46 | 	__be32 dword_1; | 64 | 		struct { |
| 47 | 	__be32 dword_2; | 65 | 			__be32 dword_0; |
| 66 | 			__be32 dword_1; | ||
| 67 | 			__be32 dword_2; | ||
| 68 | 		}; | ||
| 69 | 		struct { | ||
| 70 | 			__u8 transaction_code; | ||
| 71 | 			__u8 flags; | ||
| 72 | 			__u8 lun; | ||
| 73 | 			__u8 task_tag; | ||
| 74 | #if defined(__BIG_ENDIAN) | ||
| 75 | 			__u8 iid: 4; | ||
| 76 | 			__u8 command_set_type: 4; | ||
| 77 | #elif defined(__LITTLE_ENDIAN) | ||
| 78 | 			__u8 command_set_type: 4; | ||
| 79 | 			__u8 iid: 4; | ||
| 80 | #else | ||
| 81 | #error | ||
| 82 | #endif | ||
| 83 | 			union { | ||
| 84 | 				__u8 tm_function; | ||
| 85 | 				__u8 query_function; | ||
| 86 | 			} __attribute__((packed)); | ||
| 87 | 			__u8 response; | ||
| 88 | 			__u8 status; | ||
| 89 | 			__u8 ehs_length; | ||
| 90 | 			__u8 device_information; | ||
| 91 | 			__be16 data_segment_length; | ||
| 92 | 		}; | ||
| 93 | 	}; | ||
| 48 | }; | 94 | }; |
| 49 | 95 | ||
| 50 | /** | 96 | /** |
| ... | @@ -70,9 +116,36 @@ struct utp_upiu_query { | ... | @@ -70,9 +116,36 @@ struct utp_upiu_query { |
| 70 | 	__be32 reserved[2]; | 116 | 	__be32 reserved[2]; |
| 71 | }; | 117 | }; |
| 72 | 118 | ||
| 119 | /** | ||
| 120 | * struct utp_upiu_query_v4_0 - upiu request buffer structure for | ||
| 121 | * query request >= UFS 4.0 spec. | ||
| 122 | * @opcode: command to perform B-0 | ||
| 123 | * @idn: a value that indicates the particular type of data B-1 | ||
| 124 | * @index: Index to further identify data B-2 | ||
| 125 | * @selector: Index to further identify data B-3 | ||
| 126 | * @osf3: spec field B-4 | ||
| 127 | * @osf4: spec field B-5 | ||
| 128 | * @osf5: spec field B 6,7 | ||
| 129 | * @osf6: spec field DW 8,9 | ||
| 130 | * @osf7: spec field DW 10,11 | ||
| 131 | */ | ||
| 132 | struct utp_upiu_query_v4_0 { | ||
| 133 | 	__u8 opcode; | ||
| 134 | 	__u8 idn; | ||
| 135 | 	__u8 index; | ||
| 136 | 	__u8 selector; | ||
| 137 | 	__u8 osf3; | ||
| 138 | 	__u8 osf4; | ||
| 139 | 	__be16 osf5; | ||
| 140 | 	__be32 osf6; | ||
| 141 | 	__be32 osf7; | ||
| 142 | 	/* private: */ | ||
| 143 | 	__be32 reserved; | ||
| 144 | }; | ||
| 145 | |||
| 73 | /** | 146 | /** |
| 74 | * struct utp_upiu_cmd - Command UPIU structure | 147 | * struct utp_upiu_cmd - Command UPIU structure |
| 75 | * @data_transfer_len: Data Transfer Length DW-3 | 148 | * @exp_data_transfer_len: Data Transfer Length DW-3 |
| 76 | * @cdb: Command Descriptor Block CDB DW-4 to DW-7 | 149 | * @cdb: Command Descriptor Block CDB DW-4 to DW-7 |
| 77 | */ | 150 | */ |
| 78 | struct utp_upiu_cmd { | 151 | struct utp_upiu_cmd { |
lib/libc/include/any-linux-any/sound/asequencer.h+69-17| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | #include <sound/asound.h> | 10 | #include <sound/asound.h> |
| 11 | 11 | ||
| 12 | /** version of the sequencer */ | 12 | /** version of the sequencer */ |
| 13 | #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2) | 13 | #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 3) |
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| 16 | * definition of sequencer event types | 16 | * definition of sequencer event types |
| ... | @@ -174,6 +174,7 @@ struct snd_seq_connect { | ... | @@ -174,6 +174,7 @@ struct snd_seq_connect { |
| 174 | #define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */ | 174 | #define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */ |
| 175 | #define SNDRV_SEQ_PRIORITY_MASK		(1<<4) | 175 | #define SNDRV_SEQ_PRIORITY_MASK		(1<<4) |
| 176 | 176 | ||
| 177 | #define SNDRV_SEQ_EVENT_UMP		(1<<5)	/* event holds a UMP packet */ | ||
| 177 | 178 | ||
| 178 | 	/* note event */ | 179 | 	/* note event */ |
| 179 | struct snd_seq_ev_note { | 180 | struct snd_seq_ev_note { |
| ... | @@ -252,6 +253,19 @@ struct snd_seq_ev_quote { | ... | @@ -252,6 +253,19 @@ struct snd_seq_ev_quote { |
| 252 | 	struct snd_seq_event *event;		/* quoted event */ | 253 | 	struct snd_seq_event *event;		/* quoted event */ |
| 253 | } __attribute__((packed)); | 254 | } __attribute__((packed)); |
| 254 | 255 | ||
| 256 | union snd_seq_event_data { /* event data... */ | ||
| 257 | 	struct snd_seq_ev_note note; | ||
| 258 | 	struct snd_seq_ev_ctrl control; | ||
| 259 | 	struct snd_seq_ev_raw8 raw8; | ||
| 260 | 	struct snd_seq_ev_raw32 raw32; | ||
| 261 | 	struct snd_seq_ev_ext ext; | ||
| 262 | 	struct snd_seq_ev_queue_control queue; | ||
| 263 | 	union snd_seq_timestamp time; | ||
| 264 | 	struct snd_seq_addr addr; | ||
| 265 | 	struct snd_seq_connect connect; | ||
| 266 | 	struct snd_seq_result result; | ||
| 267 | 	struct snd_seq_ev_quote quote; | ||
| 268 | }; | ||
| 255 | 269 | ||
| 256 | 	/* sequencer event */ | 270 | 	/* sequencer event */ |
| 257 | struct snd_seq_event { | 271 | struct snd_seq_event { |
| ... | @@ -262,25 +276,27 @@ struct snd_seq_event { | ... | @@ -262,25 +276,27 @@ struct snd_seq_event { |
| 262 | 	unsigned char queue;		/* schedule queue */ | 276 | 	unsigned char queue;		/* schedule queue */ |
| 263 | 	union snd_seq_timestamp time;	/* schedule time */ | 277 | 	union snd_seq_timestamp time;	/* schedule time */ |
| 264 | 278 | ||
| 265 | |||
| 266 | 	struct snd_seq_addr source;	/* source address */ | 279 | 	struct snd_seq_addr source;	/* source address */ |
| 267 | 	struct snd_seq_addr dest;	/* destination address */ | 280 | 	struct snd_seq_addr dest;	/* destination address */ |
| 268 | 281 | ||
| 269 | 	union {				/* event data... */ | 282 | 	union snd_seq_event_data data; |
| 270 | 		struct snd_seq_ev_note note; | ||
| 271 | 		struct snd_seq_ev_ctrl control; | ||
| 272 | 		struct snd_seq_ev_raw8 raw8; | ||
| 273 | 		struct snd_seq_ev_raw32 raw32; | ||
| 274 | 		struct snd_seq_ev_ext ext; | ||
| 275 | 		struct snd_seq_ev_queue_control queue; | ||
| 276 | 		union snd_seq_timestamp time; | ||
| 277 | 		struct snd_seq_addr addr; | ||
| 278 | 		struct snd_seq_connect connect; | ||
| 279 | 		struct snd_seq_result result; | ||
| 280 | 		struct snd_seq_ev_quote quote; | ||
| 281 | 	} data; | ||
| 282 | }; | 283 | }; |
| 283 | 284 | ||
| 285 | 	/* (compatible) event for UMP-capable clients */ | ||
| 286 | struct snd_seq_ump_event { | ||
| 287 | 	snd_seq_event_type_t type;	/* event type */ | ||
| 288 | 	unsigned char flags;		/* event flags */ | ||
| 289 | 	char tag; | ||
| 290 | 	unsigned char queue;		/* schedule queue */ | ||
| 291 | 	union snd_seq_timestamp time;	/* schedule time */ | ||
| 292 | 	struct snd_seq_addr source;	/* source address */ | ||
| 293 | 	struct snd_seq_addr dest;	/* destination address */ | ||
| 294 | |||
| 295 | 	union { | ||
| 296 | 		union snd_seq_event_data data; | ||
| 297 | 		unsigned int ump[4]; | ||
| 298 | 	}; | ||
| 299 | }; | ||
| 284 | 300 | ||
| 285 | /* | 301 | /* |
| 286 | * bounce event - stored as variable size data | 302 | * bounce event - stored as variable size data |
| ... | @@ -331,6 +347,7 @@ typedef int __bitwise snd_seq_client_type_t; | ... | @@ -331,6 +347,7 @@ typedef int __bitwise snd_seq_client_type_t; |
| 331 | #define SNDRV_SEQ_FILTER_BROADCAST	(1U<<0)	/* accept broadcast messages */ | 347 | #define SNDRV_SEQ_FILTER_BROADCAST	(1U<<0)	/* accept broadcast messages */ |
| 332 | #define SNDRV_SEQ_FILTER_MULTICAST	(1U<<1)	/* accept multicast messages */ | 348 | #define SNDRV_SEQ_FILTER_MULTICAST	(1U<<1)	/* accept multicast messages */ |
| 333 | #define SNDRV_SEQ_FILTER_BOUNCE		(1U<<2)	/* accept bounce event in error */ | 349 | #define SNDRV_SEQ_FILTER_BOUNCE		(1U<<2)	/* accept bounce event in error */ |
| 350 | #define SNDRV_SEQ_FILTER_NO_CONVERT	(1U<<30) /* don't convert UMP events */ | ||
| 334 | #define SNDRV_SEQ_FILTER_USE_EVENT	(1U<<31)	/* use event filter */ | 351 | #define SNDRV_SEQ_FILTER_USE_EVENT	(1U<<31)	/* use event filter */ |
| 335 | 352 | ||
| 336 | struct snd_seq_client_info { | 353 | struct snd_seq_client_info { |
| ... | @@ -344,9 +361,18 @@ struct snd_seq_client_info { | ... | @@ -344,9 +361,18 @@ struct snd_seq_client_info { |
| 344 | 	int event_lost;			/* number of lost events */ | 361 | 	int event_lost;			/* number of lost events */ |
| 345 | 	int card;			/* RO: card number[kernel] */ | 362 | 	int card;			/* RO: card number[kernel] */ |
| 346 | 	int pid;			/* RO: pid[user] */ | 363 | 	int pid;			/* RO: pid[user] */ |
| 347 | 	char reserved[56];		/* for future use */ | 364 | 	unsigned int midi_version;	/* MIDI version */ |
| 365 | 	unsigned int group_filter;	/* UMP group filter bitmap | ||
| 366 | 					 * (bit 0 = groupless messages, | ||
| 367 | 					 * bit 1-16 = messages for groups 1-16) | ||
| 368 | 					 */ | ||
| 369 | 	char reserved[48];		/* for future use */ | ||
| 348 | }; | 370 | }; |
| 349 | 371 | ||
| 372 | /* MIDI version numbers in client info */ | ||
| 373 | #define SNDRV_SEQ_CLIENT_LEGACY_MIDI		0	/* Legacy client */ | ||
| 374 | #define SNDRV_SEQ_CLIENT_UMP_MIDI_1_0		1	/* UMP MIDI 1.0 */ | ||
| 375 | #define SNDRV_SEQ_CLIENT_UMP_MIDI_2_0		2	/* UMP MIDI 2.0 */ | ||
| 350 | 376 | ||
| 351 | /* client pool size */ | 377 | /* client pool size */ |
| 352 | struct snd_seq_client_pool { | 378 | struct snd_seq_client_pool { |
| ... | @@ -406,6 +432,8 @@ struct snd_seq_remove_events { | ... | @@ -406,6 +432,8 @@ struct snd_seq_remove_events { |
| 406 | #define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */ | 432 | #define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */ |
| 407 | #define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */ | 433 | #define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */ |
| 408 | #define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */ | 434 | #define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */ |
| 435 | #define SNDRV_SEQ_PORT_CAP_INACTIVE	(1<<8)	/* inactive port */ | ||
| 436 | #define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT	(1<<9)	/* MIDI 2.0 UMP Endpoint port */ | ||
| 409 | 437 | ||
| 410 | 	/* port type */ | 438 | 	/* port type */ |
| 411 | #define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */ | 439 | #define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */ |
| ... | @@ -415,6 +443,7 @@ struct snd_seq_remove_events { | ... | @@ -415,6 +443,7 @@ struct snd_seq_remove_events { |
| 415 | #define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */ | 443 | #define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */ |
| 416 | #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */ | 444 | #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */ |
| 417 | #define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */ | 445 | #define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */ |
| 446 | #define SNDRV_SEQ_PORT_TYPE_MIDI_UMP	(1<<7)	/* UMP */ | ||
| 418 | 447 | ||
| 419 | /* other standards...*/ | 448 | /* other standards...*/ |
| 420 | #define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */ | 449 | #define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */ |
| ... | @@ -432,6 +461,12 @@ struct snd_seq_remove_events { | ... | @@ -432,6 +461,12 @@ struct snd_seq_remove_events { |
| 432 | #define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1) | 461 | #define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1) |
| 433 | #define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2) | 462 | #define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2) |
| 434 | 463 | ||
| 464 | /* port direction */ | ||
| 465 | #define SNDRV_SEQ_PORT_DIR_UNKNOWN	0 | ||
| 466 | #define SNDRV_SEQ_PORT_DIR_INPUT	1 | ||
| 467 | #define SNDRV_SEQ_PORT_DIR_OUTPUT	2 | ||
| 468 | #define SNDRV_SEQ_PORT_DIR_BIDIRECTION	3 | ||
| 469 | |||
| 435 | struct snd_seq_port_info { | 470 | struct snd_seq_port_info { |
| 436 | 	struct snd_seq_addr addr;	/* client/port numbers */ | 471 | 	struct snd_seq_addr addr;	/* client/port numbers */ |
| 437 | 	char name[64];			/* port name */ | 472 | 	char name[64];			/* port name */ |
| ... | @@ -448,7 +483,9 @@ struct snd_seq_port_info { | ... | @@ -448,7 +483,9 @@ struct snd_seq_port_info { |
| 448 | 	void *kernel;			/* reserved for kernel use (must be NULL) */ | 483 | 	void *kernel;			/* reserved for kernel use (must be NULL) */ |
| 449 | 	unsigned int flags;		/* misc. conditioning */ | 484 | 	unsigned int flags;		/* misc. conditioning */ |
| 450 | 	unsigned char time_queue;	/* queue # for timestamping */ | 485 | 	unsigned char time_queue;	/* queue # for timestamping */ |
| 451 | 	char reserved[59];		/* for future use */ | 486 | 	unsigned char direction;	/* port usage direction (r/w/bidir) */ |
| 487 | 	unsigned char ump_group;	/* 0 = UMP EP (no conversion), 1-16 = UMP group number */ | ||
| 488 | 	char reserved[57];		/* for future use */ | ||
| 452 | }; | 489 | }; |
| 453 | 490 | ||
| 454 | 491 | ||
| ... | @@ -552,6 +589,18 @@ struct snd_seq_query_subs { | ... | @@ -552,6 +589,18 @@ struct snd_seq_query_subs { |
| 552 | 	char reserved[64];	/* for future use */ | 589 | 	char reserved[64];	/* for future use */ |
| 553 | }; | 590 | }; |
| 554 | 591 | ||
| 592 | /* | ||
| 593 | * UMP-specific information | ||
| 594 | */ | ||
| 595 | /* type of UMP info query */ | ||
| 596 | #define SNDRV_SEQ_CLIENT_UMP_INFO_ENDPOINT	0 | ||
| 597 | #define SNDRV_SEQ_CLIENT_UMP_INFO_BLOCK		1 | ||
| 598 | |||
| 599 | struct snd_seq_client_ump_info { | ||
| 600 | 	int client;			/* client number to inquire/set */ | ||
| 601 | 	int type;			/* type to inquire/set */ | ||
| 602 | 	unsigned char info[512];	/* info (either UMP ep or block info) */ | ||
| 603 | } __attribute__((packed)); | ||
| 555 | 604 | ||
| 556 | /* | 605 | /* |
| 557 | * IOCTL commands | 606 | * IOCTL commands |
| ... | @@ -561,9 +610,12 @@ struct snd_seq_query_subs { | ... | @@ -561,9 +610,12 @@ struct snd_seq_query_subs { |
| 561 | #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int) | 610 | #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int) |
| 562 | #define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info) | 611 | #define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info) |
| 563 | #define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info) | 612 | #define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info) |
| 613 | #define SNDRV_SEQ_IOCTL_USER_PVERSION	_IOW('S', 0x04, int) | ||
| 564 | 614 | ||
| 565 | #define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info) | 615 | #define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info) |
| 566 | #define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info) | 616 | #define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info) |
| 617 | #define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO	_IOWR('S', 0x12, struct snd_seq_client_ump_info) | ||
| 618 | #define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO	_IOWR('S', 0x13, struct snd_seq_client_ump_info) | ||
| 567 | 619 | ||
| 568 | #define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info) | 620 | #define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info) |
| 569 | #define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info) | 621 | #define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info) |
lib/libc/include/any-linux-any/sound/asoc.h+3-59| ... | @@ -222,9 +222,9 @@ struct snd_soc_tplg_vendor_array { | ... | @@ -222,9 +222,9 @@ struct snd_soc_tplg_vendor_array { |
| 222 | 	__le32 type;	/* SND_SOC_TPLG_TUPLE_TYPE_ */ | 222 | 	__le32 type;	/* SND_SOC_TPLG_TUPLE_TYPE_ */ |
| 223 | 	__le32 num_elems;	/* number of elements in array */ | 223 | 	__le32 num_elems;	/* number of elements in array */ |
| 224 | 	union { | 224 | 	union { |
| 225 | 		struct snd_soc_tplg_vendor_uuid_elem uuid[0]; | 225 | 		__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid); |
| 226 | 		struct snd_soc_tplg_vendor_value_elem value[0]; | 226 | 		__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value); |
| 227 | 		struct snd_soc_tplg_vendor_string_elem string[0]; | 227 | 		__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string); |
| 228 | 	}; | 228 | 	}; |
| 229 | } __attribute__((packed)); | 229 | } __attribute__((packed)); |
| 230 | 230 | ||
| ... | @@ -576,60 +576,4 @@ struct snd_soc_tplg_dai { | ... | @@ -576,60 +576,4 @@ struct snd_soc_tplg_dai { |
| 576 | 	struct snd_soc_tplg_private priv; | 576 | 	struct snd_soc_tplg_private priv; |
| 577 | } __attribute__((packed)); | 577 | } __attribute__((packed)); |
| 578 | 578 | ||
| 579 | /* | ||
| 580 | * Old version of ABI structs, supported for backward compatibility. | ||
| 581 | */ | ||
| 582 | |||
| 583 | /* Manifest v4 */ | ||
| 584 | struct snd_soc_tplg_manifest_v4 { | ||
| 585 | 	__le32 size;		/* in bytes of this structure */ | ||
| 586 | 	__le32 control_elems;	/* number of control elements */ | ||
| 587 | 	__le32 widget_elems;	/* number of widget elements */ | ||
| 588 | 	__le32 graph_elems;	/* number of graph elements */ | ||
| 589 | 	__le32 pcm_elems;	/* number of PCM elements */ | ||
| 590 | 	__le32 dai_link_elems;	/* number of DAI link elements */ | ||
| 591 | 	struct snd_soc_tplg_private priv; | ||
| 592 | } __attribute__((packed)); | ||
| 593 | |||
| 594 | /* Stream Capabilities v4 */ | ||
| 595 | struct snd_soc_tplg_stream_caps_v4 { | ||
| 596 | 	__le32 size;		/* in bytes of this structure */ | ||
| 597 | 	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
| 598 | 	__le64 formats;	/* supported formats SNDRV_PCM_FMTBIT_* */ | ||
| 599 | 	__le32 rates;		/* supported rates SNDRV_PCM_RATE_* */ | ||
| 600 | 	__le32 rate_min;	/* min rate */ | ||
| 601 | 	__le32 rate_max;	/* max rate */ | ||
| 602 | 	__le32 channels_min;	/* min channels */ | ||
| 603 | 	__le32 channels_max;	/* max channels */ | ||
| 604 | 	__le32 periods_min;	/* min number of periods */ | ||
| 605 | 	__le32 periods_max;	/* max number of periods */ | ||
| 606 | 	__le32 period_size_min;	/* min period size bytes */ | ||
| 607 | 	__le32 period_size_max;	/* max period size bytes */ | ||
| 608 | 	__le32 buffer_size_min;	/* min buffer size bytes */ | ||
| 609 | 	__le32 buffer_size_max;	/* max buffer size bytes */ | ||
| 610 | } __attribute__((packed)); | ||
| 611 | |||
| 612 | /* PCM v4 */ | ||
| 613 | struct snd_soc_tplg_pcm_v4 { | ||
| 614 | 	__le32 size;		/* in bytes of this structure */ | ||
| 615 | 	char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
| 616 | 	char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
| 617 | 	__le32 pcm_id;		/* unique ID - used to match with DAI link */ | ||
| 618 | 	__le32 dai_id;		/* unique ID - used to match */ | ||
| 619 | 	__le32 playback;	/* supports playback mode */ | ||
| 620 | 	__le32 capture;		/* supports capture mode */ | ||
| 621 | 	__le32 compress;	/* 1 = compressed; 0 = PCM */ | ||
| 622 | 	struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ | ||
| 623 | 	__le32 num_streams;	/* number of streams */ | ||
| 624 | 	struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ | ||
| 625 | } __attribute__((packed)); | ||
| 626 | |||
| 627 | /* Physical link config v4 */ | ||
| 628 | struct snd_soc_tplg_link_config_v4 { | ||
| 629 | 	__le32 size; /* in bytes of this structure */ | ||
| 630 | 	__le32 id; /* unique ID - used to match */ | ||
| 631 | 	struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ | ||
| 632 | 	__le32 num_streams; /* number of streams */ | ||
| 633 | } __attribute__((packed)); | ||
| 634 | |||
| 635 | #endif | 579 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/asound.h+95-9| ... | @@ -140,7 +140,7 @@ struct snd_hwdep_dsp_image { | ... | @@ -140,7 +140,7 @@ struct snd_hwdep_dsp_image { |
| 140 | * * | 140 | * * |
| 141 | *****************************************************************************/ | 141 | *****************************************************************************/ |
| 142 | 142 | ||
| 143 | #define SNDRV_PCM_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 15) | 143 | #define SNDRV_PCM_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 17) |
| 144 | 144 | ||
| 145 | typedef unsigned long snd_pcm_uframes_t; | 145 | typedef unsigned long snd_pcm_uframes_t; |
| 146 | typedef signed long snd_pcm_sframes_t; | 146 | typedef signed long snd_pcm_sframes_t; |
| ... | @@ -265,13 +265,17 @@ typedef int __bitwise snd_pcm_format_t; | ... | @@ -265,13 +265,17 @@ typedef int __bitwise snd_pcm_format_t; |
| 265 | 265 | ||
| 266 | typedef int __bitwise snd_pcm_subformat_t; | 266 | typedef int __bitwise snd_pcm_subformat_t; |
| 267 | #define	SNDRV_PCM_SUBFORMAT_STD		((snd_pcm_subformat_t) 0) | 267 | #define	SNDRV_PCM_SUBFORMAT_STD		((snd_pcm_subformat_t) 0) |
| 268 | #define	SNDRV_PCM_SUBFORMAT_LAST	SNDRV_PCM_SUBFORMAT_STD | 268 | #define	SNDRV_PCM_SUBFORMAT_MSBITS_MAX	((snd_pcm_subformat_t) 1) |
| 269 | #define	SNDRV_PCM_SUBFORMAT_MSBITS_20	((snd_pcm_subformat_t) 2) | ||
| 270 | #define	SNDRV_PCM_SUBFORMAT_MSBITS_24	((snd_pcm_subformat_t) 3) | ||
| 271 | #define	SNDRV_PCM_SUBFORMAT_LAST	SNDRV_PCM_SUBFORMAT_MSBITS_24 | ||
| 269 | 272 | ||
| 270 | #define SNDRV_PCM_INFO_MMAP		0x00000001	/* hardware supports mmap */ | 273 | #define SNDRV_PCM_INFO_MMAP		0x00000001	/* hardware supports mmap */ |
| 271 | #define SNDRV_PCM_INFO_MMAP_VALID	0x00000002	/* period data are valid during transfer */ | 274 | #define SNDRV_PCM_INFO_MMAP_VALID	0x00000002	/* period data are valid during transfer */ |
| 272 | #define SNDRV_PCM_INFO_DOUBLE		0x00000004	/* Double buffering needed for PCM start/stop */ | 275 | #define SNDRV_PCM_INFO_DOUBLE		0x00000004	/* Double buffering needed for PCM start/stop */ |
| 273 | #define SNDRV_PCM_INFO_BATCH		0x00000010	/* double buffering */ | 276 | #define SNDRV_PCM_INFO_BATCH		0x00000010	/* double buffering */ |
| 274 | #define SNDRV_PCM_INFO_SYNC_APPLPTR	0x00000020	/* need the explicit sync of appl_ptr update */ | 277 | #define SNDRV_PCM_INFO_SYNC_APPLPTR	0x00000020	/* need the explicit sync of appl_ptr update */ |
| 278 | #define SNDRV_PCM_INFO_PERFECT_DRAIN	0x00000040	/* silencing at the end of stream is not required */ | ||
| 275 | #define SNDRV_PCM_INFO_INTERLEAVED	0x00000100	/* channels are interleaved */ | 279 | #define SNDRV_PCM_INFO_INTERLEAVED	0x00000100	/* channels are interleaved */ |
| 276 | #define SNDRV_PCM_INFO_NONINTERLEAVED	0x00000200	/* channels are not interleaved */ | 280 | #define SNDRV_PCM_INFO_NONINTERLEAVED	0x00000200	/* channels are not interleaved */ |
| 277 | #define SNDRV_PCM_INFO_COMPLEX		0x00000400	/* complex frame organization (mmap only) */ | 281 | #define SNDRV_PCM_INFO_COMPLEX		0x00000400	/* complex frame organization (mmap only) */ |
| ... | @@ -381,6 +385,9 @@ typedef int snd_pcm_hw_param_t; | ... | @@ -381,6 +385,9 @@ typedef int snd_pcm_hw_param_t; |
| 381 | #define SNDRV_PCM_HW_PARAMS_NORESAMPLE	(1<<0)	/* avoid rate resampling */ | 385 | #define SNDRV_PCM_HW_PARAMS_NORESAMPLE	(1<<0)	/* avoid rate resampling */ |
| 382 | #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER	(1<<1)	/* export buffer */ | 386 | #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER	(1<<1)	/* export buffer */ |
| 383 | #define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP	(1<<2)	/* disable period wakeups */ | 387 | #define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP	(1<<2)	/* disable period wakeups */ |
| 388 | #define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE	(1<<3)	/* suppress drain with the filling | ||
| 389 | 							 * of the silence samples | ||
| 390 | 							 */ | ||
| 384 | 391 | ||
| 385 | struct snd_interval { | 392 | struct snd_interval { |
| 386 | 	unsigned int min, max; | 393 | 	unsigned int min, max; |
| ... | @@ -407,7 +414,7 @@ struct snd_pcm_hw_params { | ... | @@ -407,7 +414,7 @@ struct snd_pcm_hw_params { |
| 407 | 	unsigned int rmask;		/* W: requested masks */ | 414 | 	unsigned int rmask;		/* W: requested masks */ |
| 408 | 	unsigned int cmask;		/* R: changed masks */ | 415 | 	unsigned int cmask;		/* R: changed masks */ |
| 409 | 	unsigned int info;		/* R: Info flags for returned setup */ | 416 | 	unsigned int info;		/* R: Info flags for returned setup */ |
| 410 | 	unsigned int msbits;		/* R: used most significant bits */ | 417 | 	unsigned int msbits;		/* R: used most significant bits (in sample bit-width) */ |
| 411 | 	unsigned int rate_num;		/* R: rate numerator */ | 418 | 	unsigned int rate_num;		/* R: rate numerator */ |
| 412 | 	unsigned int rate_den;		/* R: rate denominator */ | 419 | 	unsigned int rate_den;		/* R: rate denominator */ |
| 413 | 	snd_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */ | 420 | 	snd_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */ |
| ... | @@ -427,9 +434,14 @@ struct snd_pcm_sw_params { | ... | @@ -427,9 +434,14 @@ struct snd_pcm_sw_params { |
| 427 | 	snd_pcm_uframes_t avail_min;		/* min avail frames for wakeup */ | 434 | 	snd_pcm_uframes_t avail_min;		/* min avail frames for wakeup */ |
| 428 | 	snd_pcm_uframes_t xfer_align;		/* obsolete: xfer size need to be a multiple */ | 435 | 	snd_pcm_uframes_t xfer_align;		/* obsolete: xfer size need to be a multiple */ |
| 429 | 	snd_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */ | 436 | 	snd_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */ |
| 430 | 	snd_pcm_uframes_t stop_threshold;	/* min avail frames for automatic stop */ | 437 | 	/* |
| 431 | 	snd_pcm_uframes_t silence_threshold;	/* min distance from noise for silence filling */ | 438 | 	 * The following two thresholds alleviate playback buffer underruns; when |
| 432 | 	snd_pcm_uframes_t silence_size;		/* silence block size */ | 439 | 	 * hw_avail drops below the threshold, the respective action is triggered: |
| 440 | 	 */ | ||
| 441 | 	snd_pcm_uframes_t stop_threshold;	/* - stop playback */ | ||
| 442 | 	snd_pcm_uframes_t silence_threshold;	/* - pre-fill buffer with silence */ | ||
| 443 | 	snd_pcm_uframes_t silence_size;		/* max size of silence pre-fill; when >= boundary, | ||
| 444 | 						 * fill played area with silence immediately */ | ||
| 433 | 	snd_pcm_uframes_t boundary;		/* pointers wrap point */ | 445 | 	snd_pcm_uframes_t boundary;		/* pointers wrap point */ |
| 434 | 	unsigned int proto;			/* protocol version */ | 446 | 	unsigned int proto;			/* protocol version */ |
| 435 | 	unsigned int tstamp_type;		/* timestamp type (req. proto >= 2.0.12) */ | 447 | 	unsigned int tstamp_type;		/* timestamp type (req. proto >= 2.0.12) */ |
| ... | @@ -562,7 +574,8 @@ struct __snd_pcm_mmap_status64 { | ... | @@ -562,7 +574,8 @@ struct __snd_pcm_mmap_status64 { |
| 562 | struct __snd_pcm_mmap_control64 { | 574 | struct __snd_pcm_mmap_control64 { |
| 563 | 	__pad_before_uframe __pad1; | 575 | 	__pad_before_uframe __pad1; |
| 564 | 	snd_pcm_uframes_t appl_ptr;	 /* RW: appl ptr (0...boundary-1) */ | 576 | 	snd_pcm_uframes_t appl_ptr;	 /* RW: appl ptr (0...boundary-1) */ |
| 565 | 	__pad_before_uframe __pad2; | 577 | 	__pad_before_uframe __pad2;	 // This should be __pad_after_uframe, but binary |
| 578 | 					 // backwards compatibility constraints prevent a fix. | ||
| 566 | 579 | ||
| 567 | 	__pad_before_uframe __pad3; | 580 | 	__pad_before_uframe __pad3; |
| 568 | 	snd_pcm_uframes_t avail_min;	 /* RW: min available frames for wakeup */ | 581 | 	snd_pcm_uframes_t avail_min;	 /* RW: min available frames for wakeup */ |
| ... | @@ -694,7 +707,7 @@ enum { | ... | @@ -694,7 +707,7 @@ enum { |
| 694 | * Raw MIDI section - /dev/snd/midi?? | 707 | * Raw MIDI section - /dev/snd/midi?? |
| 695 | */ | 708 | */ |
| 696 | 709 | ||
| 697 | #define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 2) | 710 | #define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 4) |
| 698 | 711 | ||
| 699 | enum { | 712 | enum { |
| 700 | 	SNDRV_RAWMIDI_STREAM_OUTPUT = 0, | 713 | 	SNDRV_RAWMIDI_STREAM_OUTPUT = 0, |
| ... | @@ -705,6 +718,7 @@ enum { | ... | @@ -705,6 +718,7 @@ enum { |
| 705 | #define SNDRV_RAWMIDI_INFO_OUTPUT		0x00000001 | 718 | #define SNDRV_RAWMIDI_INFO_OUTPUT		0x00000001 |
| 706 | #define SNDRV_RAWMIDI_INFO_INPUT		0x00000002 | 719 | #define SNDRV_RAWMIDI_INFO_INPUT		0x00000002 |
| 707 | #define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004 | 720 | #define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004 |
| 721 | #define SNDRV_RAWMIDI_INFO_UMP			0x00000008 | ||
| 708 | 722 | ||
| 709 | struct snd_rawmidi_info { | 723 | struct snd_rawmidi_info { |
| 710 | 	unsigned int device;		/* RO/WR (control): device number */ | 724 | 	unsigned int device;		/* RO/WR (control): device number */ |
| ... | @@ -763,6 +777,72 @@ struct snd_rawmidi_status { | ... | @@ -763,6 +777,72 @@ struct snd_rawmidi_status { |
| 763 | 	unsigned char reserved[16];	/* reserved for future use */ | 777 | 	unsigned char reserved[16];	/* reserved for future use */ |
| 764 | }; | 778 | }; |
| 765 | 779 | ||
| 780 | /* UMP EP info flags */ | ||
| 781 | #define SNDRV_UMP_EP_INFO_STATIC_BLOCKS		0x01 | ||
| 782 | |||
| 783 | /* UMP EP Protocol / JRTS capability bits */ | ||
| 784 | #define SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK	0x0300 | ||
| 785 | #define SNDRV_UMP_EP_INFO_PROTO_MIDI1		0x0100 /* MIDI 1.0 */ | ||
| 786 | #define SNDRV_UMP_EP_INFO_PROTO_MIDI2		0x0200 /* MIDI 2.0 */ | ||
| 787 | #define SNDRV_UMP_EP_INFO_PROTO_JRTS_MASK	0x0003 | ||
| 788 | #define SNDRV_UMP_EP_INFO_PROTO_JRTS_TX		0x0001 /* JRTS Transmit */ | ||
| 789 | #define SNDRV_UMP_EP_INFO_PROTO_JRTS_RX		0x0002 /* JRTS Receive */ | ||
| 790 | |||
| 791 | /* UMP Endpoint information */ | ||
| 792 | struct snd_ump_endpoint_info { | ||
| 793 | 	int card;			/* card number */ | ||
| 794 | 	int device;			/* device number */ | ||
| 795 | 	unsigned int flags;		/* additional info */ | ||
| 796 | 	unsigned int protocol_caps;	/* protocol capabilities */ | ||
| 797 | 	unsigned int protocol;		/* current protocol */ | ||
| 798 | 	unsigned int num_blocks;	/* # of function blocks */ | ||
| 799 | 	unsigned short version;		/* UMP major/minor version */ | ||
| 800 | 	unsigned short family_id;	/* MIDI device family ID */ | ||
| 801 | 	unsigned short model_id;	/* MIDI family model ID */ | ||
| 802 | 	unsigned int manufacturer_id;	/* MIDI manufacturer ID */ | ||
| 803 | 	unsigned char sw_revision[4];	/* software revision */ | ||
| 804 | 	unsigned short padding; | ||
| 805 | 	unsigned char name[128];	/* endpoint name string */ | ||
| 806 | 	unsigned char product_id[128];	/* unique product id string */ | ||
| 807 | 	unsigned char reserved[32]; | ||
| 808 | } __attribute__((packed)); | ||
| 809 | |||
| 810 | /* UMP direction */ | ||
| 811 | #define SNDRV_UMP_DIR_INPUT		0x01 | ||
| 812 | #define SNDRV_UMP_DIR_OUTPUT		0x02 | ||
| 813 | #define SNDRV_UMP_DIR_BIDIRECTION	0x03 | ||
| 814 | |||
| 815 | /* UMP block info flags */ | ||
| 816 | #define SNDRV_UMP_BLOCK_IS_MIDI1	(1U << 0) /* MIDI 1.0 port w/o restrict */ | ||
| 817 | #define SNDRV_UMP_BLOCK_IS_LOWSPEED	(1U << 1) /* 31.25Kbps B/W MIDI1 port */ | ||
| 818 | |||
| 819 | /* UMP block user-interface hint */ | ||
| 820 | #define SNDRV_UMP_BLOCK_UI_HINT_UNKNOWN		0x00 | ||
| 821 | #define SNDRV_UMP_BLOCK_UI_HINT_RECEIVER	0x01 | ||
| 822 | #define SNDRV_UMP_BLOCK_UI_HINT_SENDER		0x02 | ||
| 823 | #define SNDRV_UMP_BLOCK_UI_HINT_BOTH		0x03 | ||
| 824 | |||
| 825 | /* UMP groups and blocks */ | ||
| 826 | #define SNDRV_UMP_MAX_GROUPS		16 | ||
| 827 | #define SNDRV_UMP_MAX_BLOCKS		32 | ||
| 828 | |||
| 829 | /* UMP Block information */ | ||
| 830 | struct snd_ump_block_info { | ||
| 831 | 	int card;			/* card number */ | ||
| 832 | 	int device;			/* device number */ | ||
| 833 | 	unsigned char block_id;		/* block ID (R/W) */ | ||
| 834 | 	unsigned char direction;	/* UMP direction */ | ||
| 835 | 	unsigned char active;		/* Activeness */ | ||
| 836 | 	unsigned char first_group;	/* first group ID */ | ||
| 837 | 	unsigned char num_groups;	/* number of groups */ | ||
| 838 | 	unsigned char midi_ci_version;	/* MIDI-CI support version */ | ||
| 839 | 	unsigned char sysex8_streams;	/* max number of sysex8 streams */ | ||
| 840 | 	unsigned char ui_hint;		/* user interface hint */ | ||
| 841 | 	unsigned int flags;		/* various info flags */ | ||
| 842 | 	unsigned char name[128];	/* block name string */ | ||
| 843 | 	unsigned char reserved[32]; | ||
| 844 | } __attribute__((packed)); | ||
| 845 | |||
| 766 | #define SNDRV_RAWMIDI_IOCTL_PVERSION	_IOR('W', 0x00, int) | 846 | #define SNDRV_RAWMIDI_IOCTL_PVERSION	_IOR('W', 0x00, int) |
| 767 | #define SNDRV_RAWMIDI_IOCTL_INFO	_IOR('W', 0x01, struct snd_rawmidi_info) | 847 | #define SNDRV_RAWMIDI_IOCTL_INFO	_IOR('W', 0x01, struct snd_rawmidi_info) |
| 768 | #define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int) | 848 | #define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int) |
| ... | @@ -770,6 +850,9 @@ struct snd_rawmidi_status { | ... | @@ -770,6 +850,9 @@ struct snd_rawmidi_status { |
| 770 | #define SNDRV_RAWMIDI_IOCTL_STATUS	_IOWR('W', 0x20, struct snd_rawmidi_status) | 850 | #define SNDRV_RAWMIDI_IOCTL_STATUS	_IOWR('W', 0x20, struct snd_rawmidi_status) |
| 771 | #define SNDRV_RAWMIDI_IOCTL_DROP	_IOW('W', 0x30, int) | 851 | #define SNDRV_RAWMIDI_IOCTL_DROP	_IOW('W', 0x30, int) |
| 772 | #define SNDRV_RAWMIDI_IOCTL_DRAIN	_IOW('W', 0x31, int) | 852 | #define SNDRV_RAWMIDI_IOCTL_DRAIN	_IOW('W', 0x31, int) |
| 853 | /* Additional ioctls for UMP rawmidi devices */ | ||
| 854 | #define SNDRV_UMP_IOCTL_ENDPOINT_INFO	_IOR('W', 0x40, struct snd_ump_endpoint_info) | ||
| 855 | #define SNDRV_UMP_IOCTL_BLOCK_INFO	_IOR('W', 0x41, struct snd_ump_block_info) | ||
| 773 | 856 | ||
| 774 | /* | 857 | /* |
| 775 | * Timer section - /dev/snd/timer | 858 | * Timer section - /dev/snd/timer |
| ... | @@ -941,7 +1024,7 @@ struct snd_timer_tread { | ... | @@ -941,7 +1024,7 @@ struct snd_timer_tread { |
| 941 | * * | 1024 | * * |
| 942 | ****************************************************************************/ | 1025 | ****************************************************************************/ |
| 943 | 1026 | ||
| 944 | #define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 8) | 1027 | #define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 9) |
| 945 | 1028 | ||
| 946 | struct snd_ctl_card_info { | 1029 | struct snd_ctl_card_info { |
| 947 | 	int card;			/* card number */ | 1030 | 	int card;			/* card number */ |
| ... | @@ -1102,6 +1185,9 @@ struct snd_ctl_tlv { | ... | @@ -1102,6 +1185,9 @@ struct snd_ctl_tlv { |
| 1102 | #define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) | 1185 | #define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) |
| 1103 | #define SNDRV_CTL_IOCTL_RAWMIDI_INFO	_IOWR('U', 0x41, struct snd_rawmidi_info) | 1186 | #define SNDRV_CTL_IOCTL_RAWMIDI_INFO	_IOWR('U', 0x41, struct snd_rawmidi_info) |
| 1104 | #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) | 1187 | #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) |
| 1188 | #define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE	_IOWR('U', 0x43, int) | ||
| 1189 | #define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info) | ||
| 1190 | #define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO	_IOWR('U', 0x45, struct snd_ump_block_info) | ||
| 1105 | #define SNDRV_CTL_IOCTL_POWER		_IOWR('U', 0xd0, int) | 1191 | #define SNDRV_CTL_IOCTL_POWER		_IOWR('U', 0xd0, int) |
| 1106 | #define SNDRV_CTL_IOCTL_POWER_STATE	_IOR('U', 0xd1, int) | 1192 | #define SNDRV_CTL_IOCTL_POWER_STATE	_IOR('U', 0xd1, int) |
| 1107 | 1193 |
lib/libc/include/any-linux-any/sound/emu10k1.h+101-55| ... | @@ -15,9 +15,6 @@ | ... | @@ -15,9 +15,6 @@ |
| 15 | * ---- FX8010 ---- | 15 | * ---- FX8010 ---- |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #define EMU10K1_CARD_CREATIVE			0x00000000 | ||
| 19 | #define EMU10K1_CARD_EMUAPS			0x00000001 | ||
| 20 | |||
| 21 | #define EMU10K1_FX8010_PCM_COUNT		8 | 18 | #define EMU10K1_FX8010_PCM_COUNT		8 |
| 22 | 19 | ||
| 23 | /* | 20 | /* |
| ... | @@ -46,6 +43,19 @@ | ... | @@ -46,6 +43,19 @@ |
| 46 | #define iINTERP 0x0e	/* R = A + (X * (Y - A) >> 31) ; saturation */ | 43 | #define iINTERP 0x0e	/* R = A + (X * (Y - A) >> 31) ; saturation */ |
| 47 | #define iSKIP 0x0f	/* R = A (cc_reg), X (count), Y (cc_test) */ | 44 | #define iSKIP 0x0f	/* R = A (cc_reg), X (count), Y (cc_test) */ |
| 48 | 45 | ||
| 46 | #define LOWORD_OPX_MASK		0x000ffc00	/* Instruction operand X			*/ | ||
| 47 | #define LOWORD_OPY_MASK		0x000003ff	/* Instruction operand Y			*/ | ||
| 48 | #define HIWORD_OPCODE_MASK	0x00f00000	/* Instruction opcode				*/ | ||
| 49 | #define HIWORD_RESULT_MASK	0x000ffc00	/* Instruction result				*/ | ||
| 50 | #define HIWORD_OPA_MASK		0x000003ff	/* Instruction operand A			*/ | ||
| 51 | |||
| 52 | /* Audigy Soundcards have a different instruction format */ | ||
| 53 | #define A_LOWORD_OPX_MASK	0x007ff000 | ||
| 54 | #define A_LOWORD_OPY_MASK	0x000007ff | ||
| 55 | #define A_HIWORD_OPCODE_MASK	0x0f000000 | ||
| 56 | #define A_HIWORD_RESULT_MASK	0x007ff000 | ||
| 57 | #define A_HIWORD_OPA_MASK	0x000007ff | ||
| 58 | |||
| 49 | /* GPRs */ | 59 | /* GPRs */ |
| 50 | #define FXBUS(x)	(0x00 + (x))	/* x = 0x00 - 0x0f */ | 60 | #define FXBUS(x)	(0x00 + (x))	/* x = 0x00 - 0x0f */ |
| 51 | #define EXTIN(x)	(0x10 + (x))	/* x = 0x00 - 0x0f */ | 61 | #define EXTIN(x)	(0x10 + (x))	/* x = 0x00 - 0x0f */ |
| ... | @@ -53,6 +63,16 @@ | ... | @@ -53,6 +63,16 @@ |
| 53 | #define FXBUS2(x)	(0x30 + (x))	/* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */ | 63 | #define FXBUS2(x)	(0x30 + (x))	/* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */ |
| 54 | 					/* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ | 64 | 					/* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ |
| 55 | 65 | ||
| 66 | #define A_FXBUS(x)	(0x00 + (x))	/* x = 0x00 - 0x3f FX buses */ | ||
| 67 | #define A_EXTIN(x)	(0x40 + (x))	/* x = 0x00 - 0x0f physical ins */ | ||
| 68 | #define A_P16VIN(x)	(0x50 + (x))	/* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ | ||
| 69 | #define A_EXTOUT(x)	(0x60 + (x))	/* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */ | ||
| 70 | #define A_FXBUS2(x)	(0x80 + (x))	/* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ | ||
| 71 | #define A_EMU32OUTH(x)	(0xa0 + (x))	/* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" */ | ||
| 72 | #define A_EMU32OUTL(x)	(0xb0 + (x))	/* x = 0x00 - 0x0f "EMU32_OUT_01 - _0F" */ | ||
| 73 | #define A3_EMU32IN(x)	(0x160 + (x))	/* x = 0x00 - 0x1f "EMU32_IN_00 - _1F" - Only when .device = 0x0008 */ | ||
| 74 | #define A3_EMU32OUT(x)	(0x1E0 + (x))	/* x = 0x00 - 0x1f "EMU32_OUT_00 - _1F" - Only when .device = 0x0008 */ | ||
| 75 | |||
| 56 | #define C_00000000	0x40 | 76 | #define C_00000000	0x40 |
| 57 | #define C_00000001	0x41 | 77 | #define C_00000001	0x41 |
| 58 | #define C_00000002	0x42 | 78 | #define C_00000002	0x42 |
| ... | @@ -81,12 +101,66 @@ | ... | @@ -81,12 +101,66 @@ |
| 81 | #define GPR_NOISE1	0x59		/* noise source */ | 101 | #define GPR_NOISE1	0x59		/* noise source */ |
| 82 | #define GPR_IRQ		0x5a		/* IRQ register */ | 102 | #define GPR_IRQ		0x5a		/* IRQ register */ |
| 83 | #define GPR_DBAC	0x5b		/* TRAM Delay Base Address Counter */ | 103 | #define GPR_DBAC	0x5b		/* TRAM Delay Base Address Counter */ |
| 104 | |||
| 105 | /* Audigy constants */ | ||
| 106 | #define A_C_00000000	0xc0 | ||
| 107 | #define A_C_00000001	0xc1 | ||
| 108 | #define A_C_00000002	0xc2 | ||
| 109 | #define A_C_00000003	0xc3 | ||
| 110 | #define A_C_00000004	0xc4 | ||
| 111 | #define A_C_00000008	0xc5 | ||
| 112 | #define A_C_00000010	0xc6 | ||
| 113 | #define A_C_00000020	0xc7 | ||
| 114 | #define A_C_00000100	0xc8 | ||
| 115 | #define A_C_00010000	0xc9 | ||
| 116 | #define A_C_00000800	0xca | ||
| 117 | #define A_C_10000000	0xcb | ||
| 118 | #define A_C_20000000	0xcc | ||
| 119 | #define A_C_40000000	0xcd | ||
| 120 | #define A_C_80000000	0xce | ||
| 121 | #define A_C_7fffffff	0xcf | ||
| 122 | #define A_C_ffffffff	0xd0 | ||
| 123 | #define A_C_fffffffe	0xd1 | ||
| 124 | #define A_C_c0000000	0xd2 | ||
| 125 | #define A_C_4f1bbcdc	0xd3 | ||
| 126 | #define A_C_5a7ef9db	0xd4 | ||
| 127 | #define A_C_00100000	0xd5 | ||
| 128 | #define A_GPR_ACCU	0xd6		/* ACCUM, accumulator */ | ||
| 129 | #define A_GPR_COND	0xd7		/* CCR, condition register */ | ||
| 130 | #define A_GPR_NOISE0	0xd8		/* noise source */ | ||
| 131 | #define A_GPR_NOISE1	0xd9		/* noise source */ | ||
| 132 | #define A_GPR_IRQ	0xda		/* IRQ register */ | ||
| 133 | #define A_GPR_DBAC	0xdb		/* TRAM Delay Base Address Counter - internal */ | ||
| 134 | #define A_GPR_DBACE	0xde		/* TRAM Delay Base Address Counter - external */ | ||
| 135 | |||
| 136 | /* Each FX general purpose register is 32 bits in length, all bits are used			*/ | ||
| 137 | #define FXGPREGBASE		0x100		/* FX general purpose registers base 	*/ | ||
| 138 | #define A_FXGPREGBASE		0x400		/* Audigy GPRs, 0x400 to 0x5ff			*/ | ||
| 139 | |||
| 140 | #define A_TANKMEMCTLREGBASE	0x100		/* Tank memory control registers base - only for Audigy */ | ||
| 141 | #define A_TANKMEMCTLREG_MASK	0x1f		/* only 5 bits used - only for Audigy */ | ||
| 142 | |||
| 143 | /* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is	*/ | ||
| 144 | /* decompressed back to 20 bits on a read. There are a total of 160 locations, the last 32	*/ | ||
| 145 | /* locations are for external TRAM. 								*/ | ||
| 146 | #define TANKMEMDATAREGBASE	0x200		/* Tank memory data registers base 		*/ | ||
| 147 | #define TANKMEMDATAREG_MASK	0x000fffff	/* 20 bit tank audio data field			*/ | ||
| 148 | |||
| 149 | /* Combined address field and memory opcode or flag field. 160 locations, last 32 are external	*/ | ||
| 150 | #define TANKMEMADDRREGBASE	0x300		/* Tank memory address registers base		*/ | ||
| 151 | #define TANKMEMADDRREG_ADDR_MASK 0x000fffff	/* 20 bit tank address field			*/ | ||
| 152 | #define TANKMEMADDRREG_CLEAR	0x00800000	/* Clear tank memory				*/ | ||
| 153 | #define TANKMEMADDRREG_ALIGN	0x00400000	/* Align read or write relative to tank access	*/ | ||
| 154 | #define TANKMEMADDRREG_WRITE	0x00200000	/* Write to tank memory				*/ | ||
| 155 | #define TANKMEMADDRREG_READ	0x00100000	/* Read from tank memory			*/ | ||
| 156 | |||
| 84 | #define GPR(x)		(FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ | 157 | #define GPR(x)		(FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ |
| 85 | #define ITRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ | 158 | #define ITRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ |
| 86 | #define ETRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ | 159 | #define ETRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ |
| 87 | #define ITRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ | 160 | #define ITRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ |
| 88 | #define ETRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ | 161 | #define ETRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ |
| 89 | 162 | ||
| 163 | #define A_GPR(x)	(A_FXGPREGBASE + (x)) | ||
| 90 | #define A_ITRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ | 164 | #define A_ITRAM_DATA(x)	(TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ |
| 91 | #define A_ETRAM_DATA(x)	(TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ | 165 | #define A_ETRAM_DATA(x)	(TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ |
| 92 | #define A_ITRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ | 166 | #define A_ITRAM_ADDR(x)	(TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ |
| ... | @@ -94,17 +168,6 @@ | ... | @@ -94,17 +168,6 @@ |
| 94 | #define A_ITRAM_CTL(x)	(A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ | 168 | #define A_ITRAM_CTL(x)	(A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ |
| 95 | #define A_ETRAM_CTL(x)	(A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ | 169 | #define A_ETRAM_CTL(x)	(A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ |
| 96 | 170 | ||
| 97 | #define A_FXBUS(x)	(0x00 + (x))	/* x = 0x00 - 0x3f FX buses */ | ||
| 98 | #define A_EXTIN(x)	(0x40 + (x))	/* x = 0x00 - 0x0f physical ins */ | ||
| 99 | #define A_P16VIN(x)	(0x50 + (x))	/* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ | ||
| 100 | #define A_EXTOUT(x)	(0x60 + (x))	/* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */ | ||
| 101 | #define A_FXBUS2(x)	(0x80 + (x))	/* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ | ||
| 102 | #define A_EMU32OUTH(x)	(0xa0 + (x))	/* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */ | ||
| 103 | #define A_EMU32OUTL(x)	(0xb0 + (x))	/* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */ | ||
| 104 | #define A3_EMU32IN(x)	(0x160 + (x))	/* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */ | ||
| 105 | #define A3_EMU32OUT(x)	(0x1E0 + (x))	/* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */ | ||
| 106 | #define A_GPR(x)	(A_FXGPREGBASE + (x)) | ||
| 107 | |||
| 108 | /* cc_reg constants */ | 171 | /* cc_reg constants */ |
| 109 | #define CC_REG_NORMALIZED C_00000001 | 172 | #define CC_REG_NORMALIZED C_00000001 |
| 110 | #define CC_REG_BORROW	C_00000002 | 173 | #define CC_REG_BORROW	C_00000002 |
| ... | @@ -113,7 +176,17 @@ | ... | @@ -113,7 +176,17 @@ |
| 113 | #define CC_REG_SATURATE	C_00000010 | 176 | #define CC_REG_SATURATE	C_00000010 |
| 114 | #define CC_REG_NONZERO	C_00000100 | 177 | #define CC_REG_NONZERO	C_00000100 |
| 115 | 178 | ||
| 179 | #define A_CC_REG_NORMALIZED	A_C_00000001 | ||
| 180 | #define A_CC_REG_BORROW		A_C_00000002 | ||
| 181 | #define A_CC_REG_MINUS		A_C_00000004 | ||
| 182 | #define A_CC_REG_ZERO		A_C_00000008 | ||
| 183 | #define A_CC_REG_SATURATE	A_C_00000010 | ||
| 184 | #define A_CC_REG_NONZERO	A_C_00000100 | ||
| 185 | |||
| 116 | /* FX buses */ | 186 | /* FX buses */ |
| 187 | // These are arbitrary mappings; our DSP code simply expects | ||
| 188 | // the config files to route the channels this way. | ||
| 189 | // The numbers are documented in {audigy,sb-live}-mixer.rst. | ||
| 117 | #define FXBUS_PCM_LEFT		0x00 | 190 | #define FXBUS_PCM_LEFT		0x00 |
| 118 | #define FXBUS_PCM_RIGHT		0x01 | 191 | #define FXBUS_PCM_RIGHT		0x01 |
| 119 | #define FXBUS_PCM_LEFT_REAR	0x02 | 192 | #define FXBUS_PCM_LEFT_REAR	0x02 |
| ... | @@ -203,38 +276,7 @@ | ... | @@ -203,38 +276,7 @@ |
| 203 | #define A_EXTOUT_ADC_CAP_R	0x17	/* right */ | 276 | #define A_EXTOUT_ADC_CAP_R	0x17	/* right */ |
| 204 | #define A_EXTOUT_MIC_CAP	0x18	/* Mic capture buffer */ | 277 | #define A_EXTOUT_MIC_CAP	0x18	/* Mic capture buffer */ |
| 205 | 278 | ||
| 206 | /* Audigy constants */ | 279 | /* Definitions for debug register. Note that these are for emu10k1 ONLY. */ |
| 207 | #define A_C_00000000	0xc0 | ||
| 208 | #define A_C_00000001	0xc1 | ||
| 209 | #define A_C_00000002	0xc2 | ||
| 210 | #define A_C_00000003	0xc3 | ||
| 211 | #define A_C_00000004	0xc4 | ||
| 212 | #define A_C_00000008	0xc5 | ||
| 213 | #define A_C_00000010	0xc6 | ||
| 214 | #define A_C_00000020	0xc7 | ||
| 215 | #define A_C_00000100	0xc8 | ||
| 216 | #define A_C_00010000	0xc9 | ||
| 217 | #define A_C_00000800	0xca | ||
| 218 | #define A_C_10000000	0xcb | ||
| 219 | #define A_C_20000000	0xcc | ||
| 220 | #define A_C_40000000	0xcd | ||
| 221 | #define A_C_80000000	0xce | ||
| 222 | #define A_C_7fffffff	0xcf | ||
| 223 | #define A_C_ffffffff	0xd0 | ||
| 224 | #define A_C_fffffffe	0xd1 | ||
| 225 | #define A_C_c0000000	0xd2 | ||
| 226 | #define A_C_4f1bbcdc	0xd3 | ||
| 227 | #define A_C_5a7ef9db	0xd4 | ||
| 228 | #define A_C_00100000	0xd5 | ||
| 229 | #define A_GPR_ACCU	0xd6		/* ACCUM, accumulator */ | ||
| 230 | #define A_GPR_COND	0xd7		/* CCR, condition register */ | ||
| 231 | #define A_GPR_NOISE0	0xd8		/* noise source */ | ||
| 232 | #define A_GPR_NOISE1	0xd9		/* noise source */ | ||
| 233 | #define A_GPR_IRQ	0xda		/* IRQ register */ | ||
| 234 | #define A_GPR_DBAC	0xdb		/* TRAM Delay Base Address Counter - internal */ | ||
| 235 | #define A_GPR_DBACE	0xde		/* TRAM Delay Base Address Counter - external */ | ||
| 236 | |||
| 237 | /* definitions for debug register */ | ||
| 238 | #define EMU10K1_DBG_ZC			0x80000000	/* zero tram counter */ | 280 | #define EMU10K1_DBG_ZC			0x80000000	/* zero tram counter */ |
| 239 | #define EMU10K1_DBG_SATURATION_OCCURED	0x02000000	/* saturation control */ | 281 | #define EMU10K1_DBG_SATURATION_OCCURED	0x02000000	/* saturation control */ |
| 240 | #define EMU10K1_DBG_SATURATION_ADDR	0x01ff0000	/* saturation address */ | 282 | #define EMU10K1_DBG_SATURATION_ADDR	0x01ff0000	/* saturation address */ |
| ... | @@ -243,12 +285,14 @@ | ... | @@ -243,12 +285,14 @@ |
| 243 | #define EMU10K1_DBG_CONDITION_CODE	0x00003e00	/* condition code */ | 285 | #define EMU10K1_DBG_CONDITION_CODE	0x00003e00	/* condition code */ |
| 244 | #define EMU10K1_DBG_SINGLE_STEP_ADDR	0x000001ff	/* single step address */ | 286 | #define EMU10K1_DBG_SINGLE_STEP_ADDR	0x000001ff	/* single step address */ |
| 245 | 287 | ||
| 246 | /* tank memory address line */ | 288 | /* Definitions for emu10k2 debug register. */ |
| 247 | #define TANKMEMADDRREG_ADDR_MASK 0x000fffff	/* 20 bit tank address field			*/ | 289 | #define A_DBG_ZC			0x40000000	/* zero tram counter */ |
| 248 | #define TANKMEMADDRREG_CLEAR	 0x00800000	/* Clear tank memory				*/ | 290 | #define A_DBG_SATURATION_OCCURED	0x20000000 |
| 249 | #define TANKMEMADDRREG_ALIGN	 0x00400000	/* Align read or write relative to tank access	*/ | 291 | #define A_DBG_SATURATION_ADDR		0x0ffc0000 |
| 250 | #define TANKMEMADDRREG_WRITE	 0x00200000	/* Write to tank memory				*/ | 292 | #define A_DBG_SINGLE_STEP		0x00020000	/* Set to zero to start dsp */ |
| 251 | #define TANKMEMADDRREG_READ	 0x00100000	/* Read from tank memory			*/ | 293 | #define A_DBG_STEP			0x00010000 |
| 294 | #define A_DBG_CONDITION_CODE		0x0000f800 | ||
| 295 | #define A_DBG_STEP_ADDR			0x000003ff | ||
| 252 | 296 | ||
| 253 | struct snd_emu10k1_fx8010_info { | 297 | struct snd_emu10k1_fx8010_info { |
| 254 | 	unsigned int internal_tram_size;	/* in samples */ | 298 | 	unsigned int internal_tram_size;	/* in samples */ |
| ... | @@ -264,6 +308,8 @@ struct snd_emu10k1_fx8010_info { | ... | @@ -264,6 +308,8 @@ struct snd_emu10k1_fx8010_info { |
| 264 | #define EMU10K1_GPR_TRANSLATION_BASS		2 | 308 | #define EMU10K1_GPR_TRANSLATION_BASS		2 |
| 265 | #define EMU10K1_GPR_TRANSLATION_TREBLE		3 | 309 | #define EMU10K1_GPR_TRANSLATION_TREBLE		3 |
| 266 | #define EMU10K1_GPR_TRANSLATION_ONOFF		4 | 310 | #define EMU10K1_GPR_TRANSLATION_ONOFF		4 |
| 311 | #define EMU10K1_GPR_TRANSLATION_NEGATE		5 | ||
| 312 | #define EMU10K1_GPR_TRANSLATION_NEG_TABLE100	6 | ||
| 267 | 313 | ||
| 268 | enum emu10k1_ctl_elem_iface { | 314 | enum emu10k1_ctl_elem_iface { |
| 269 | 	EMU10K1_CTL_ELEM_IFACE_MIXER = 2,	/* virtual mixer device */ | 315 | 	EMU10K1_CTL_ELEM_IFACE_MIXER = 2,	/* virtual mixer device */ |
| ... | @@ -284,9 +330,9 @@ struct snd_emu10k1_fx8010_control_gpr { | ... | @@ -284,9 +330,9 @@ struct snd_emu10k1_fx8010_control_gpr { |
| 284 | 	unsigned int vcount;		/* visible count */ | 330 | 	unsigned int vcount;		/* visible count */ |
| 285 | 	unsigned int count;		/* count of GPR (1..16) */ | 331 | 	unsigned int count;		/* count of GPR (1..16) */ |
| 286 | 	unsigned short gpr[32];		/* GPR number(s) */ | 332 | 	unsigned short gpr[32];		/* GPR number(s) */ |
| 287 | 	unsigned int value[32];		/* initial values */ | 333 | 	int value[32];			/* initial values */ |
| 288 | 	unsigned int min;		/* minimum range */ | 334 | 	int min;			/* minimum range */ |
| 289 | 	unsigned int max;		/* maximum range */ | 335 | 	int max;			/* maximum range */ |
| 290 | 	unsigned int translation;	/* translation type (EMU10K1_GPR_TRANSLATION*) */ | 336 | 	unsigned int translation;	/* translation type (EMU10K1_GPR_TRANSLATION*) */ |
| 291 | 	const unsigned int *tlv; | 337 | 	const unsigned int *tlv; |
| 292 | }; | 338 | }; |
lib/libc/include/any-linux-any/sound/intel/avs/tokens.h+10-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright(c) 2021 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2021 Intel Corporation |
| 4 | * | 4 | * |
| 5 | * Authors: Cezary Rojewski <cezary.rojewski@intel.com> | 5 | * Authors: Cezary Rojewski <cezary.rojewski@intel.com> |
| 6 | * Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com> | 6 | * Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com> |
| ... | @@ -19,6 +19,8 @@ enum avs_tplg_token { | ... | @@ -19,6 +19,8 @@ enum avs_tplg_token { |
| 19 | 	AVS_TKN_MANIFEST_NUM_MODCFGS_EXT_U32		= 6, | 19 | 	AVS_TKN_MANIFEST_NUM_MODCFGS_EXT_U32		= 6, |
| 20 | 	AVS_TKN_MANIFEST_NUM_PPLCFGS_U32		= 7, | 20 | 	AVS_TKN_MANIFEST_NUM_PPLCFGS_U32		= 7, |
| 21 | 	AVS_TKN_MANIFEST_NUM_BINDINGS_U32		= 8, | 21 | 	AVS_TKN_MANIFEST_NUM_BINDINGS_U32		= 8, |
| 22 | 	AVS_TKN_MANIFEST_NUM_CONDPATH_TMPLS_U32		= 9, | ||
| 23 | 	AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32		= 10, | ||
| 22 | 24 | ||
| 23 | 	/* struct avs_tplg_library */ | 25 | 	/* struct avs_tplg_library */ |
| 24 | 	AVS_TKN_LIBRARY_ID_U32				= 101, | 26 | 	AVS_TKN_LIBRARY_ID_U32				= 101, |
| ... | @@ -109,6 +111,8 @@ enum avs_tplg_token { | ... | @@ -109,6 +111,8 @@ enum avs_tplg_token { |
| 109 | 	AVS_TKN_MOD_PROC_DOMAIN_U8			= 1705, | 111 | 	AVS_TKN_MOD_PROC_DOMAIN_U8			= 1705, |
| 110 | 	AVS_TKN_MOD_MODCFG_EXT_ID_U32			= 1706, | 112 | 	AVS_TKN_MOD_MODCFG_EXT_ID_U32			= 1706, |
| 111 | 	AVS_TKN_MOD_KCONTROL_ID_U32			= 1707, | 113 | 	AVS_TKN_MOD_KCONTROL_ID_U32			= 1707, |
| 114 | 	AVS_TKN_MOD_INIT_CONFIG_NUM_IDS_U32		= 1708, | ||
| 115 | 	AVS_TKN_MOD_INIT_CONFIG_ID_U32			= 1709, | ||
| 112 | 116 | ||
| 113 | 	/* struct avs_tplg_path_template */ | 117 | 	/* struct avs_tplg_path_template */ |
| 114 | 	AVS_TKN_PATH_TMPL_ID_U32			= 1801, | 118 | 	AVS_TKN_PATH_TMPL_ID_U32			= 1801, |
| ... | @@ -125,6 +129,11 @@ enum avs_tplg_token { | ... | @@ -125,6 +129,11 @@ enum avs_tplg_token { |
| 125 | 129 | ||
| 126 | 	/* struct avs_tplg_kcontrol */ | 130 | 	/* struct avs_tplg_kcontrol */ |
| 127 | 	AVS_TKN_KCONTROL_ID_U32				= 2301, | 131 | 	AVS_TKN_KCONTROL_ID_U32				= 2301, |
| 132 | |||
| 133 | 	/* struct avs_tplg_init_config */ | ||
| 134 | 	AVS_TKN_INIT_CONFIG_ID_U32			= 2401, | ||
| 135 | 	AVS_TKN_INIT_CONFIG_PARAM_U8			= 2402, | ||
| 136 | 	AVS_TKN_INIT_CONFIG_LENGTH_U32			= 2403, | ||
| 128 | }; | 137 | }; |
| 129 | 138 | ||
| 130 | #endif | 139 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/scarlett2.h created+54| ... | @@ -0,0 +1,54 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Focusrite Scarlett 2 Protocol Driver for ALSA | ||
| 4 | * (including Scarlett 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, and | ||
| 5 | * Clarett+ series products) | ||
| 6 | * | ||
| 7 | * Copyright (c) 2023 by Geoffrey D. Bennett <g at b4.vu> | ||
| 8 | */ | ||
| 9 | #ifndef __UAPI_SOUND_SCARLETT2_H | ||
| 10 | #define __UAPI_SOUND_SCARLETT2_H | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | #include <linux/ioctl.h> | ||
| 14 | |||
| 15 | #define SCARLETT2_HWDEP_MAJOR 1 | ||
| 16 | #define SCARLETT2_HWDEP_MINOR 0 | ||
| 17 | #define SCARLETT2_HWDEP_SUBMINOR 0 | ||
| 18 | |||
| 19 | #define SCARLETT2_HWDEP_VERSION \ | ||
| 20 | 	((SCARLETT2_HWDEP_MAJOR << 16) | \ | ||
| 21 | 	 (SCARLETT2_HWDEP_MINOR << 8) | \ | ||
| 22 | 	 SCARLETT2_HWDEP_SUBMINOR) | ||
| 23 | |||
| 24 | #define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF) | ||
| 25 | #define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF) | ||
| 26 | #define SCARLETT2_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF) | ||
| 27 | |||
| 28 | /* Get protocol version */ | ||
| 29 | #define SCARLETT2_IOCTL_PVERSION _IOR('S', 0x60, int) | ||
| 30 | |||
| 31 | /* Reboot */ | ||
| 32 | #define SCARLETT2_IOCTL_REBOOT _IO('S', 0x61) | ||
| 33 | |||
| 34 | /* Select flash segment */ | ||
| 35 | #define SCARLETT2_SEGMENT_ID_SETTINGS 0 | ||
| 36 | #define SCARLETT2_SEGMENT_ID_FIRMWARE 1 | ||
| 37 | #define SCARLETT2_SEGMENT_ID_COUNT 2 | ||
| 38 | |||
| 39 | #define SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT _IOW('S', 0x62, int) | ||
| 40 | |||
| 41 | /* Erase selected flash segment */ | ||
| 42 | #define SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT _IO('S', 0x63) | ||
| 43 | |||
| 44 | /* Get selected flash segment erase progress | ||
| 45 | * 1 through to num_blocks, or 255 for complete | ||
| 46 | */ | ||
| 47 | struct scarlett2_flash_segment_erase_progress { | ||
| 48 | 	unsigned char progress; | ||
| 49 | 	unsigned char num_blocks; | ||
| 50 | }; | ||
| 51 | #define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \ | ||
| 52 | 	_IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress) | ||
| 53 | |||
| 54 | #endif /* __UAPI_SOUND_SCARLETT2_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/skl-tplg-interface.h-74| ... | @@ -165,78 +165,4 @@ enum skl_tuple_type { | ... | @@ -165,78 +165,4 @@ enum skl_tuple_type { |
| 165 | 	SKL_TYPE_DATA | 165 | 	SKL_TYPE_DATA |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | /* v4 configuration data */ | ||
| 169 | |||
| 170 | struct skl_dfw_v4_module_pin { | ||
| 171 | 	__u16 module_id; | ||
| 172 | 	__u16 instance_id; | ||
| 173 | } __attribute__((packed)); | ||
| 174 | |||
| 175 | struct skl_dfw_v4_module_fmt { | ||
| 176 | 	__u32 channels; | ||
| 177 | 	__u32 freq; | ||
| 178 | 	__u32 bit_depth; | ||
| 179 | 	__u32 valid_bit_depth; | ||
| 180 | 	__u32 ch_cfg; | ||
| 181 | 	__u32 interleaving_style; | ||
| 182 | 	__u32 sample_type; | ||
| 183 | 	__u32 ch_map; | ||
| 184 | } __attribute__((packed)); | ||
| 185 | |||
| 186 | struct skl_dfw_v4_module_caps { | ||
| 187 | 	__u32 set_params:2; | ||
| 188 | 	__u32 rsvd:30; | ||
| 189 | 	__u32 param_id; | ||
| 190 | 	__u32 caps_size; | ||
| 191 | 	__u32 caps[HDA_SST_CFG_MAX]; | ||
| 192 | } __attribute__((packed)); | ||
| 193 | |||
| 194 | struct skl_dfw_v4_pipe { | ||
| 195 | 	__u8 pipe_id; | ||
| 196 | 	__u8 pipe_priority; | ||
| 197 | 	__u16 conn_type:4; | ||
| 198 | 	__u16 rsvd:4; | ||
| 199 | 	__u16 memory_pages:8; | ||
| 200 | } __attribute__((packed)); | ||
| 201 | |||
| 202 | struct skl_dfw_v4_module { | ||
| 203 | 	char uuid[SKL_UUID_STR_SZ]; | ||
| 204 | |||
| 205 | 	__u16 module_id; | ||
| 206 | 	__u16 instance_id; | ||
| 207 | 	__u32 max_mcps; | ||
| 208 | 	__u32 mem_pages; | ||
| 209 | 	__u32 obs; | ||
| 210 | 	__u32 ibs; | ||
| 211 | 	__u32 vbus_id; | ||
| 212 | |||
| 213 | 	__u32 max_in_queue:8; | ||
| 214 | 	__u32 max_out_queue:8; | ||
| 215 | 	__u32 time_slot:8; | ||
| 216 | 	__u32 core_id:4; | ||
| 217 | 	__u32 rsvd1:4; | ||
| 218 | |||
| 219 | 	__u32 module_type:8; | ||
| 220 | 	__u32 conn_type:4; | ||
| 221 | 	__u32 dev_type:4; | ||
| 222 | 	__u32 hw_conn_type:4; | ||
| 223 | 	__u32 rsvd2:12; | ||
| 224 | |||
| 225 | 	__u32 params_fixup:8; | ||
| 226 | 	__u32 converter:8; | ||
| 227 | 	__u32 input_pin_type:1; | ||
| 228 | 	__u32 output_pin_type:1; | ||
| 229 | 	__u32 is_dynamic_in_pin:1; | ||
| 230 | 	__u32 is_dynamic_out_pin:1; | ||
| 231 | 	__u32 is_loadable:1; | ||
| 232 | 	__u32 rsvd3:11; | ||
| 233 | |||
| 234 | 	struct skl_dfw_v4_pipe pipe; | ||
| 235 | 	struct skl_dfw_v4_module_fmt in_fmt[MAX_IN_QUEUE]; | ||
| 236 | 	struct skl_dfw_v4_module_fmt out_fmt[MAX_OUT_QUEUE]; | ||
| 237 | 	struct skl_dfw_v4_module_pin in_pin[MAX_IN_QUEUE]; | ||
| 238 | 	struct skl_dfw_v4_module_pin out_pin[MAX_OUT_QUEUE]; | ||
| 239 | 	struct skl_dfw_v4_module_caps caps; | ||
| 240 | } __attribute__((packed)); | ||
| 241 | |||
| 242 | #endif | 168 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/sof/abi.h+3-1| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or | 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. | 4 | * redistributing this file, you may do so under either license. |
| 5 | * | 5 | * |
| 6 | * Copyright(c) 2018 Intel Corporation. All rights reserved. | 6 | * Copyright(c) 2018 Intel Corporation |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| ... | @@ -60,5 +60,7 @@ | ... | @@ -60,5 +60,7 @@ |
| 60 | 60 | ||
| 61 | /* SOF ABI magic number "SOF\0". */ | 61 | /* SOF ABI magic number "SOF\0". */ |
| 62 | #define SOF_ABI_MAGIC		0x00464F53 | 62 | #define SOF_ABI_MAGIC		0x00464F53 |
| 63 | /* SOF IPC4 ABI magic number "SOF4". */ | ||
| 64 | #define SOF_IPC4_ABI_MAGIC	0x34464F53 | ||
| 63 | 65 | ||
| 64 | #endif | 66 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/sof/fw.h+1-1| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or | 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. | 4 | * redistributing this file, you may do so under either license. |
| 5 | * | 5 | * |
| 6 | * Copyright(c) 2018 Intel Corporation. All rights reserved. | 6 | * Copyright(c) 2018 Intel Corporation |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
lib/libc/include/any-linux-any/sound/sof/header.h+20-9| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or | 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. | 4 | * redistributing this file, you may do so under either license. |
| 5 | * | 5 | * |
| 6 | * Copyright(c) 2018 Intel Corporation. All rights reserved. | 6 | * Copyright(c) 2018 Intel Corporation |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__ | 9 | #ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__ |
| ... | @@ -11,19 +11,30 @@ | ... | @@ -11,19 +11,30 @@ |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | 13 | ||
| 14 | /* | 14 | /** |
| 15 | * Header for all non IPC ABI data. | 15 | * struct sof_abi_hdr - Header for all non IPC ABI data. |
| 16 | * @magic: Magic number for validation | ||
| 17 | *	 for IPC3 data: 0x00464F53 ('S', 'O', 'F', '\0') | ||
| 18 | *	 for IPC4 data: 0x34464F53 ('S', 'O', 'F', '4') | ||
| 19 | * @type: module specific parameter | ||
| 20 | *	 for IPC3: Component specific type | ||
| 21 | *	 for IPC4: parameter ID (param_id) of the data | ||
| 22 | * @size: The size in bytes of the data, excluding this struct | ||
| 23 | * @abi: SOF ABI version. The version is valid in scope of the 'magic', IPC3 and | ||
| 24 | *	 IPC4 ABI version numbers have no relationship. | ||
| 25 | * @reserved: Reserved for future use | ||
| 26 | * @data: Component data - opaque to core | ||
| 16 | * | 27 | * |
| 17 | * Identifies data type, size and ABI. | 28 | * Identifies data type, size and ABI. |
| 18 | * Used by any bespoke component data structures or binary blobs. | 29 | * Used by any bespoke component data structures or binary blobs. |
| 19 | */ | 30 | */ |
| 20 | struct sof_abi_hdr { | 31 | struct sof_abi_hdr { |
| 21 | 	__u32 magic;		/**< 'S', 'O', 'F', '\0' */ | 32 | 	__u32 magic; |
| 22 | 	__u32 type;		/**< component specific type */ | 33 | 	__u32 type; |
| 23 | 	__u32 size;		/**< size in bytes of data excl. this struct */ | 34 | 	__u32 size; |
| 24 | 	__u32 abi;		/**< SOF ABI version */ | 35 | 	__u32 abi; |
| 25 | 	__u32 reserved[4];	/**< reserved for future use */ | 36 | 	__u32 reserved[4]; |
| 26 | 	__u32 data[];		/**< Component data - opaque to core */ | 37 | 	__u32 data[]; |
| 27 | } __attribute__((packed)); | 38 | } __attribute__((packed)); |
| 28 | 39 | ||
| 29 | #define SOF_MANIFEST_DATA_TYPE_NHLT 1 | 40 | #define SOF_MANIFEST_DATA_TYPE_NHLT 1 |
lib/libc/include/any-linux-any/sound/sof/tokens.h+29-10| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or | 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. | 4 | * redistributing this file, you may do so under either license. |
| 5 | * | 5 | * |
| 6 | * Copyright(c) 2018 Intel Corporation. All rights reserved. | 6 | * Copyright(c) 2018 Intel Corporation |
| 7 | * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> | 7 | * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> |
| 8 | * Keyon Jie <yang.jie@linux.intel.com> | 8 | * Keyon Jie <yang.jie@linux.intel.com> |
| 9 | */ | 9 | */ |
| ... | @@ -35,6 +35,7 @@ | ... | @@ -35,6 +35,7 @@ |
| 35 | /* buffers */ | 35 | /* buffers */ |
| 36 | #define SOF_TKN_BUF_SIZE			100 | 36 | #define SOF_TKN_BUF_SIZE			100 |
| 37 | #define SOF_TKN_BUF_CAPS			101 | 37 | #define SOF_TKN_BUF_CAPS			101 |
| 38 | #define SOF_TKN_BUF_FLAGS			102 | ||
| 38 | 39 | ||
| 39 | /* DAI */ | 40 | /* DAI */ |
| 40 | /* Token retired with ABI 3.2, do not use for new capabilities | 41 | /* Token retired with ABI 3.2, do not use for new capabilities |
| ... | @@ -54,6 +55,7 @@ | ... | @@ -54,6 +55,7 @@ |
| 54 | #define SOF_TKN_SCHED_DYNAMIC_PIPELINE		206 | 55 | #define SOF_TKN_SCHED_DYNAMIC_PIPELINE		206 |
| 55 | #define SOF_TKN_SCHED_LP_MODE			207 | 56 | #define SOF_TKN_SCHED_LP_MODE			207 |
| 56 | #define SOF_TKN_SCHED_MEM_USAGE			208 | 57 | #define SOF_TKN_SCHED_MEM_USAGE			208 |
| 58 | #define SOF_TKN_SCHED_USE_CHAIN_DMA		209 | ||
| 57 | 59 | ||
| 58 | /* volume */ | 60 | /* volume */ |
| 59 | #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250 | 61 | #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250 |
| ... | @@ -88,15 +90,21 @@ | ... | @@ -88,15 +90,21 @@ |
| 88 | #define SOF_TKN_COMP_CPC			406 | 90 | #define SOF_TKN_COMP_CPC			406 |
| 89 | #define SOF_TKN_COMP_IS_PAGES			409 | 91 | #define SOF_TKN_COMP_IS_PAGES			409 |
| 90 | #define SOF_TKN_COMP_NUM_AUDIO_FORMATS		410 | 92 | #define SOF_TKN_COMP_NUM_AUDIO_FORMATS		410 |
| 91 | #define SOF_TKN_COMP_NUM_SINK_PINS		411 | 93 | #define SOF_TKN_COMP_NUM_INPUT_PINS		411 |
| 92 | #define SOF_TKN_COMP_NUM_SOURCE_PINS		412 | 94 | #define SOF_TKN_COMP_NUM_OUTPUT_PINS		412 |
| 93 | /* | 95 | /* |
| 94 | * The token for sink/source pin binding, it specifies the widget | 96 | * The token for input/output pin binding, it specifies the widget |
| 95 | * name that the sink/source pin is connected from/to. | 97 | * name that the input/output pin is connected from/to. |
| 96 | */ | 98 | */ |
| 97 | #define SOF_TKN_COMP_SINK_PIN_BINDING_WNAME	413 | 99 | #define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME	413 |
| 98 | #define SOF_TKN_COMP_SRC_PIN_BINDING_WNAME	414 | 100 | #define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME	414 |
| 99 | 101 | #define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS	415 | |
| 102 | #define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS	416 | ||
| 103 | /* | ||
| 104 | * The token value is copied to the dapm_widget's | ||
| 105 | * no_wname_in_kcontrol_name. | ||
| 106 | */ | ||
| 107 | #define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME	417 | ||
| 100 | 108 | ||
| 101 | /* SSP */ | 109 | /* SSP */ |
| 102 | #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500 | 110 | #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500 |
| ... | @@ -173,23 +181,25 @@ | ... | @@ -173,23 +181,25 @@ |
| 173 | /* CAVS AUDIO FORMAT */ | 181 | /* CAVS AUDIO FORMAT */ |
| 174 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE	1900 | 182 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE	1900 |
| 175 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH	1901 | 183 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH	1901 |
| 176 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT	1902 | 184 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH	1902 |
| 177 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS	1903 | 185 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS	1903 |
| 178 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP	1904 | 186 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP	1904 |
| 179 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG	1905 | 187 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG	1905 |
| 180 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE	1906 | 188 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE	1906 |
| 181 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG	1907 | 189 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG	1907 |
| 182 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE	1908 | 190 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE	1908 |
| 191 | #define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX	1909 | ||
| 183 | /* intentional token numbering discontinuity, reserved for future use */ | 192 | /* intentional token numbering discontinuity, reserved for future use */ |
| 184 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE	1930 | 193 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE	1930 |
| 185 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH	1931 | 194 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH	1931 |
| 186 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT	1932 | 195 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH 1932 |
| 187 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS	1933 | 196 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS	1933 |
| 188 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP	1934 | 197 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP	1934 |
| 189 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG	1935 | 198 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG	1935 |
| 190 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE	1936 | 199 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE	1936 |
| 191 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG	1937 | 200 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG	1937 |
| 192 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE	1938 | 201 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE	1938 |
| 202 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX	1939 | ||
| 193 | /* intentional token numbering discontinuity, reserved for future use */ | 203 | /* intentional token numbering discontinuity, reserved for future use */ |
| 194 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS		1970 | 204 | #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS		1970 |
| 195 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS		1971 | 205 | #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS		1971 |
| ... | @@ -197,10 +207,19 @@ | ... | @@ -197,10 +207,19 @@ |
| 197 | 207 | ||
| 198 | /* COPIER */ | 208 | /* COPIER */ |
| 199 | #define SOF_TKN_INTEL_COPIER_NODE_TYPE		1980 | 209 | #define SOF_TKN_INTEL_COPIER_NODE_TYPE		1980 |
| 210 | #define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS	1981 | ||
| 200 | 211 | ||
| 201 | /* ACP I2S */ | 212 | /* ACP I2S */ |
| 202 | #define SOF_TKN_AMD_ACPI2S_RATE			1700 | 213 | #define SOF_TKN_AMD_ACPI2S_RATE			1700 |
| 203 | #define SOF_TKN_AMD_ACPI2S_CH			1701 | 214 | #define SOF_TKN_AMD_ACPI2S_CH			1701 |
| 204 | #define SOF_TKN_AMD_ACPI2S_TDM_MODE		1702 | 215 | #define SOF_TKN_AMD_ACPI2S_TDM_MODE		1702 |
| 205 | 216 | ||
| 217 | /* MICFIL PDM */ | ||
| 218 | #define SOF_TKN_IMX_MICFIL_RATE			2000 | ||
| 219 | #define SOF_TKN_IMX_MICFIL_CH			2001 | ||
| 220 | |||
| 221 | /* ACP SDW */ | ||
| 222 | #define SOF_TKN_AMD_ACP_SDW_RATE		2100 | ||
| 223 | #define SOF_TKN_AMD_ACP_SDW_CH			2101 | ||
| 224 | |||
| 206 | #endif | 225 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/xen/evtchn.h+9| ... | @@ -101,4 +101,13 @@ struct ioctl_evtchn_restrict_domid { | ... | @@ -101,4 +101,13 @@ struct ioctl_evtchn_restrict_domid { |
| 101 | 	domid_t domid; | 101 | 	domid_t domid; |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | /* | ||
| 105 | * Bind statically allocated @port. | ||
| 106 | */ | ||
| 107 | #define IOCTL_EVTCHN_BIND_STATIC			\ | ||
| 108 | 	_IOC(_IOC_NONE, 'E', 7, sizeof(struct ioctl_evtchn_bind)) | ||
| 109 | struct ioctl_evtchn_bind { | ||
| 110 | 	unsigned int port; | ||
| 111 | }; | ||
| 112 | |||
| 104 | #endif /* __LINUX_PUBLIC_EVTCHN_H__ */ | 113 | #endif /* __LINUX_PUBLIC_EVTCHN_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/xen/gntalloc.h+4-1| ... | @@ -31,7 +31,10 @@ struct ioctl_gntalloc_alloc_gref { | ... | @@ -31,7 +31,10 @@ struct ioctl_gntalloc_alloc_gref { |
| 31 | 	__u64 index; | 31 | 	__u64 index; |
| 32 | 	/* The grant references of the newly created grant, one per page */ | 32 | 	/* The grant references of the newly created grant, one per page */ |
| 33 | 	/* Variable size, depending on count */ | 33 | 	/* Variable size, depending on count */ |
| 34 | 	__u32 gref_ids[1]; | 34 | 	union { |
| 35 | 		__u32 gref_ids[1]; | ||
| 36 | 		__DECLARE_FLEX_ARRAY(__u32, gref_ids_flex); | ||
| 37 | 	}; | ||
| 35 | }; | 38 | }; |
| 36 | 39 | ||
| 37 | #define GNTALLOC_FLAG_WRITABLE 1 | 40 | #define GNTALLOC_FLAG_WRITABLE 1 |
lib/libc/include/any-linux-any/xen/privcmd.h+32| ... | @@ -98,6 +98,34 @@ struct privcmd_mmap_resource { | ... | @@ -98,6 +98,34 @@ struct privcmd_mmap_resource { |
| 98 | 	__u64 addr; | 98 | 	__u64 addr; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | /* For privcmd_irqfd::flags */ | ||
| 102 | #define PRIVCMD_IRQFD_FLAG_DEASSIGN (1 << 0) | ||
| 103 | |||
| 104 | struct privcmd_irqfd { | ||
| 105 | 	__u64 dm_op; | ||
| 106 | 	__u32 size; /* Size of structure pointed by dm_op */ | ||
| 107 | 	__u32 fd; | ||
| 108 | 	__u32 flags; | ||
| 109 | 	domid_t dom; | ||
| 110 | 	__u8 pad[2]; | ||
| 111 | }; | ||
| 112 | |||
| 113 | /* For privcmd_ioeventfd::flags */ | ||
| 114 | #define PRIVCMD_IOEVENTFD_FLAG_DEASSIGN (1 << 0) | ||
| 115 | |||
| 116 | struct privcmd_ioeventfd { | ||
| 117 | 	__u64 ioreq; | ||
| 118 | 	__u64 ports; | ||
| 119 | 	__u64 addr; | ||
| 120 | 	__u32 addr_len; | ||
| 121 | 	__u32 event_fd; | ||
| 122 | 	__u32 vcpus; | ||
| 123 | 	__u32 vq; | ||
| 124 | 	__u32 flags; | ||
| 125 | 	domid_t dom; | ||
| 126 | 	__u8 pad[2]; | ||
| 127 | }; | ||
| 128 | |||
| 101 | /* | 129 | /* |
| 102 | * @cmd: IOCTL_PRIVCMD_HYPERCALL | 130 | * @cmd: IOCTL_PRIVCMD_HYPERCALL |
| 103 | * @arg: &privcmd_hypercall_t | 131 | * @arg: &privcmd_hypercall_t |
| ... | @@ -125,5 +153,9 @@ struct privcmd_mmap_resource { | ... | @@ -125,5 +153,9 @@ struct privcmd_mmap_resource { |
| 125 | 	_IOC(_IOC_NONE, 'P', 6, sizeof(domid_t)) | 153 | 	_IOC(_IOC_NONE, 'P', 6, sizeof(domid_t)) |
| 126 | #define IOCTL_PRIVCMD_MMAP_RESOURCE				\ | 154 | #define IOCTL_PRIVCMD_MMAP_RESOURCE				\ |
| 127 | 	_IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource)) | 155 | 	_IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource)) |
| 156 | #define IOCTL_PRIVCMD_IRQFD					\ | ||
| 157 | 	_IOW('P', 8, struct privcmd_irqfd) | ||
| 158 | #define IOCTL_PRIVCMD_IOEVENTFD					\ | ||
| 159 | 	_IOW('P', 9, struct privcmd_ioeventfd) | ||
| 128 | 160 | ||
| 129 | #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ | 161 | #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/arc-linux-any/asm/page.h-6| ... | @@ -13,11 +13,6 @@ | ... | @@ -13,11 +13,6 @@ |
| 13 | #include <linux/const.h> | 13 | #include <linux/const.h> |
| 14 | 14 | ||
| 15 | /* PAGE_SHIFT determines the page size */ | 15 | /* PAGE_SHIFT determines the page size */ |
| 16 | #if defined(CONFIG_ARC_PAGE_SIZE_16K) | ||
| 17 | #define PAGE_SHIFT 14 | ||
| 18 | #elif defined(CONFIG_ARC_PAGE_SIZE_4K) | ||
| 19 | #define PAGE_SHIFT 12 | ||
| 20 | #else | ||
| 21 | /* | 16 | /* |
| 22 | * Default 8k | 17 | * Default 8k |
| 23 | * done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc | 18 | * done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc |
| ... | @@ -26,7 +21,6 @@ | ... | @@ -26,7 +21,6 @@ |
| 26 | * not available | 21 | * not available |
| 27 | */ | 22 | */ |
| 28 | #define PAGE_SHIFT 13 | 23 | #define PAGE_SHIFT 13 |
| 29 | #endif | ||
| 30 | 24 | ||
| 31 | #define PAGE_SIZE	_BITUL(PAGE_SHIFT)	/* Default 8K */ | 25 | #define PAGE_SIZE	_BITUL(PAGE_SHIFT)	/* Default 8K */ |
| 32 | #define PAGE_OFFSET	_AC(0x80000000, UL)	/* Kernel starts at 2G onwrds */ | 26 | #define PAGE_OFFSET	_AC(0x80000000, UL)	/* Kernel starts at 2G onwrds */ |
lib/libc/include/arc-linux-any/asm/swab.h+1-1| ... | @@ -62,7 +62,7 @@ | ... | @@ -62,7 +62,7 @@ |
| 62 | * 8051fdc4:	st r2,[r1,20]	; Mem op : save result back to mem | 62 | * 8051fdc4:	st r2,[r1,20]	; Mem op : save result back to mem |
| 63 | * | 63 | * |
| 64 | * Joern suggested a better "C" algorithm which is great since | 64 | * Joern suggested a better "C" algorithm which is great since |
| 65 | * (1) It is portable to any architecure | 65 | * (1) It is portable to any architecture |
| 66 | * (2) At the same time it takes advantage of ARC ISA (rotate intrns) | 66 | * (2) At the same time it takes advantage of ARC ISA (rotate intrns) |
| 67 | */ | 67 | */ |
| 68 | 68 |
lib/libc/include/arm-linux-any/asm/setup.h+1-1| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | * | 10 | * |
| 11 | * Structure passed to kernel to tell it about the | 11 | * Structure passed to kernel to tell it about the |
| 12 | * hardware it's running on. See Documentation/arm/setup.rst | 12 | * hardware it's running on. See Documentation/arch/arm/setup.rst |
| 13 | * for more info. | 13 | * for more info. |
| 14 | */ | 14 | */ |
| 15 | #ifndef __ASMARM_SETUP_H | 15 | #ifndef __ASMARM_SETUP_H |
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+12| ... | @@ -404,5 +404,17 @@ | ... | @@ -404,5 +404,17 @@ |
| 404 | #define __NR_process_mrelease (__NR_SYSCALL_BASE + 448) | 404 | #define __NR_process_mrelease (__NR_SYSCALL_BASE + 448) |
| 405 | #define __NR_futex_waitv (__NR_SYSCALL_BASE + 449) | 405 | #define __NR_futex_waitv (__NR_SYSCALL_BASE + 449) |
| 406 | #define __NR_set_mempolicy_home_node (__NR_SYSCALL_BASE + 450) | 406 | #define __NR_set_mempolicy_home_node (__NR_SYSCALL_BASE + 450) |
| 407 | #define __NR_cachestat (__NR_SYSCALL_BASE + 451) | ||
| 408 | #define __NR_fchmodat2 (__NR_SYSCALL_BASE + 452) | ||
| 409 | #define __NR_map_shadow_stack (__NR_SYSCALL_BASE + 453) | ||
| 410 | #define __NR_futex_wake (__NR_SYSCALL_BASE + 454) | ||
| 411 | #define __NR_futex_wait (__NR_SYSCALL_BASE + 455) | ||
| 412 | #define __NR_futex_requeue (__NR_SYSCALL_BASE + 456) | ||
| 413 | #define __NR_statmount (__NR_SYSCALL_BASE + 457) | ||
| 414 | #define __NR_listmount (__NR_SYSCALL_BASE + 458) | ||
| 415 | #define __NR_lsm_get_self_attr (__NR_SYSCALL_BASE + 459) | ||
| 416 | #define __NR_lsm_set_self_attr (__NR_SYSCALL_BASE + 460) | ||
| 417 | #define __NR_lsm_list_modules (__NR_SYSCALL_BASE + 461) | ||
| 418 | #define __NR_mseal (__NR_SYSCALL_BASE + 462) | ||
| 407 | 419 | ||
| 408 | #endif /* _ASM_UNISTD_EABI_H */ | 420 | #endif /* _ASM_UNISTD_EABI_H */ |
| \ No newline at end of file | |||
lib/libc/include/arm-linux-any/asm/unistd-oabi.h+12| ... | @@ -416,5 +416,17 @@ | ... | @@ -416,5 +416,17 @@ |
| 416 | #define __NR_process_mrelease (__NR_SYSCALL_BASE + 448) | 416 | #define __NR_process_mrelease (__NR_SYSCALL_BASE + 448) |
| 417 | #define __NR_futex_waitv (__NR_SYSCALL_BASE + 449) | 417 | #define __NR_futex_waitv (__NR_SYSCALL_BASE + 449) |
| 418 | #define __NR_set_mempolicy_home_node (__NR_SYSCALL_BASE + 450) | 418 | #define __NR_set_mempolicy_home_node (__NR_SYSCALL_BASE + 450) |
| 419 | #define __NR_cachestat (__NR_SYSCALL_BASE + 451) | ||
| 420 | #define __NR_fchmodat2 (__NR_SYSCALL_BASE + 452) | ||
| 421 | #define __NR_map_shadow_stack (__NR_SYSCALL_BASE + 453) | ||
| 422 | #define __NR_futex_wake (__NR_SYSCALL_BASE + 454) | ||
| 423 | #define __NR_futex_wait (__NR_SYSCALL_BASE + 455) | ||
| 424 | #define __NR_futex_requeue (__NR_SYSCALL_BASE + 456) | ||
| 425 | #define __NR_statmount (__NR_SYSCALL_BASE + 457) | ||
| 426 | #define __NR_listmount (__NR_SYSCALL_BASE + 458) | ||
| 427 | #define __NR_lsm_get_self_attr (__NR_SYSCALL_BASE + 459) | ||
| 428 | #define __NR_lsm_set_self_attr (__NR_SYSCALL_BASE + 460) | ||
| 429 | #define __NR_lsm_list_modules (__NR_SYSCALL_BASE + 461) | ||
| 430 | #define __NR_mseal (__NR_SYSCALL_BASE + 462) | ||
| 419 | 431 | ||
| 420 | #endif /* _ASM_UNISTD_OABI_H */ | 432 | #endif /* _ASM_UNISTD_OABI_H */ |
| \ No newline at end of file | |||
lib/libc/include/csky-linux-any/asm/unistd.h+1| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | #define __ARCH_WANT_SYS_CLONE3 | 6 | #define __ARCH_WANT_SYS_CLONE3 |
| 7 | #define __ARCH_WANT_SET_GET_RLIMIT | 7 | #define __ARCH_WANT_SET_GET_RLIMIT |
| 8 | #define __ARCH_WANT_TIME32_SYSCALLS | 8 | #define __ARCH_WANT_TIME32_SYSCALLS |
| 9 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | ||
| 9 | #include <asm-generic/unistd.h> | 10 | #include <asm-generic/unistd.h> |
| 10 | 11 | ||
| 11 | #define __NR_set_thread_area	(__NR_arch_specific_syscall + 0) | 12 | #define __NR_set_thread_area	(__NR_arch_specific_syscall + 0) |
lib/libc/include/hexagon-linux-any/asm/ptrace.h-13| ... | @@ -29,17 +29,4 @@ | ... | @@ -29,17 +29,4 @@ |
| 29 | 29 | ||
| 30 | #define profile_pc(regs) instruction_pointer(regs) | 30 | #define profile_pc(regs) instruction_pointer(regs) |
| 31 | 31 | ||
| 32 | /* kprobe-based event tracer support */ | ||
| 33 | extern int regs_query_register_offset(const char *name); | ||
| 34 | extern const char *regs_query_register_name(unsigned int offset); | ||
| 35 | |||
| 36 | #define current_pt_regs() \ | ||
| 37 | 	((struct pt_regs *) \ | ||
| 38 | 	 ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | ||
| 39 | |||
| 40 | #if CONFIG_HEXAGON_ARCH_VERSION >= 4 | ||
| 41 | #define arch_has_single_step()	(1) | ||
| 42 | #endif | ||
| 43 | |||
| 44 | |||
| 45 | #endif | 32 | #endif |
| \ No newline at end of file | |||
lib/libc/include/hexagon-linux-any/asm/unistd.h+1| ... | @@ -36,5 +36,6 @@ | ... | @@ -36,5 +36,6 @@ |
| 36 | #define __ARCH_WANT_SYS_VFORK | 36 | #define __ARCH_WANT_SYS_VFORK |
| 37 | #define __ARCH_WANT_SYS_FORK | 37 | #define __ARCH_WANT_SYS_FORK |
| 38 | #define __ARCH_WANT_TIME32_SYSCALLS | 38 | #define __ARCH_WANT_TIME32_SYSCALLS |
| 39 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | ||
| 39 | 40 | ||
| 40 | #include <asm-generic/unistd.h> | 41 | #include <asm-generic/unistd.h> |
| \ No newline at end of file | |||
lib/libc/include/hexagon-linux-any/asm/user.h+1-6| ... | @@ -56,15 +56,10 @@ struct user_regs_struct { | ... | @@ -56,15 +56,10 @@ struct user_regs_struct { |
| 56 | 	unsigned long pc; | 56 | 	unsigned long pc; |
| 57 | 	unsigned long cause; | 57 | 	unsigned long cause; |
| 58 | 	unsigned long badva; | 58 | 	unsigned long badva; |
| 59 | #if CONFIG_HEXAGON_ARCH_VERSION < 4 | 59 | 	/* cs0 and cs1 are only available with HEXAGON_ARCH_VERSION >= 4 */ |
| 60 | 	unsigned long pad1; /* pad out to 48 words total */ | ||
| 61 | 	unsigned long pad2; /* pad out to 48 words total */ | ||
| 62 | 	unsigned long pad3; /* pad out to 48 words total */ | ||
| 63 | #else | ||
| 64 | 	unsigned long cs0; | 60 | 	unsigned long cs0; |
| 65 | 	unsigned long cs1; | 61 | 	unsigned long cs1; |
| 66 | 	unsigned long pad1; /* pad out to 48 words total */ | 62 | 	unsigned long pad1; /* pad out to 48 words total */ |
| 67 | #endif | ||
| 68 | }; | 63 | }; |
| 69 | 64 | ||
| 70 | #endif | 65 | #endif |
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/bitsperlong.h deleted-9| ... | @@ -1,9 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef __ASM_LOONGARCH_BITSPERLONG_H | ||
| 3 | #define __ASM_LOONGARCH_BITSPERLONG_H | ||
| 4 | |||
| 5 | #define __BITS_PER_LONG (__SIZEOF_LONG__ * 8) | ||
| 6 | |||
| 7 | #include <asm-generic/bitsperlong.h> | ||
| 8 | |||
| 9 | #endif /* __ASM_LOONGARCH_BITSPERLONG_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/hwcap.h+1| ... | @@ -16,5 +16,6 @@ | ... | @@ -16,5 +16,6 @@ |
| 16 | #define HWCAP_LOONGARCH_LBT_X86		(1 << 10) | 16 | #define HWCAP_LOONGARCH_LBT_X86		(1 << 10) |
| 17 | #define HWCAP_LOONGARCH_LBT_ARM		(1 << 11) | 17 | #define HWCAP_LOONGARCH_LBT_ARM		(1 << 11) |
| 18 | #define HWCAP_LOONGARCH_LBT_MIPS	(1 << 12) | 18 | #define HWCAP_LOONGARCH_LBT_MIPS	(1 << 12) |
| 19 | #define HWCAP_LOONGARCH_PTW		(1 << 13) | ||
| 19 | 20 | ||
| 20 | #endif /* _ASM_HWCAP_H */ | 21 | #endif /* _ASM_HWCAP_H */ |
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/kvm.h created+111| ... | @@ -0,0 +1,111 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2020-2023 Loongson Technology Corporation Limited | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef __UAPI_ASM_LOONGARCH_KVM_H | ||
| 7 | #define __UAPI_ASM_LOONGARCH_KVM_H | ||
| 8 | |||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * KVM LoongArch specific structures and definitions. | ||
| 13 | * | ||
| 14 | * Some parts derived from the x86 version of this file. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #define KVM_COALESCED_MMIO_PAGE_OFFSET	1 | ||
| 18 | #define KVM_DIRTY_LOG_PAGE_OFFSET	64 | ||
| 19 | |||
| 20 | #define KVM_GUESTDBG_USE_SW_BP		0x00010000 | ||
| 21 | |||
| 22 | /* | ||
| 23 | * for KVM_GET_REGS and KVM_SET_REGS | ||
| 24 | */ | ||
| 25 | struct kvm_regs { | ||
| 26 | 	/* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ | ||
| 27 | 	__u64 gpr[32]; | ||
| 28 | 	__u64 pc; | ||
| 29 | }; | ||
| 30 | |||
| 31 | /* | ||
| 32 | * for KVM_GET_FPU and KVM_SET_FPU | ||
| 33 | */ | ||
| 34 | struct kvm_fpu { | ||
| 35 | 	__u32 fcsr; | ||
| 36 | 	__u64 fcc; /* 8x8 */ | ||
| 37 | 	struct kvm_fpureg { | ||
| 38 | 		__u64 val64[4]; | ||
| 39 | 	} fpr[32]; | ||
| 40 | }; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * For LoongArch, we use KVM_SET_ONE_REG and KVM_GET_ONE_REG to access various | ||
| 44 | * registers. The id field is broken down as follows: | ||
| 45 | * | ||
| 46 | * bits[63..52] - As per linux/kvm.h | ||
| 47 | * bits[51..32] - Must be zero. | ||
| 48 | * bits[31..16] - Register set. | ||
| 49 | * | ||
| 50 | * Register set = 0: GP registers from kvm_regs (see definitions below). | ||
| 51 | * | ||
| 52 | * Register set = 1: CSR registers. | ||
| 53 | * | ||
| 54 | * Register set = 2: KVM specific registers (see definitions below). | ||
| 55 | * | ||
| 56 | * Register set = 3: FPU / SIMD registers (see definitions below). | ||
| 57 | * | ||
| 58 | * Other sets registers may be added in the future. Each set would | ||
| 59 | * have its own identifier in bits[31..16]. | ||
| 60 | */ | ||
| 61 | |||
| 62 | #define KVM_REG_LOONGARCH_GPR		(KVM_REG_LOONGARCH | 0x00000ULL) | ||
| 63 | #define KVM_REG_LOONGARCH_CSR		(KVM_REG_LOONGARCH | 0x10000ULL) | ||
| 64 | #define KVM_REG_LOONGARCH_KVM		(KVM_REG_LOONGARCH | 0x20000ULL) | ||
| 65 | #define KVM_REG_LOONGARCH_FPSIMD	(KVM_REG_LOONGARCH | 0x30000ULL) | ||
| 66 | #define KVM_REG_LOONGARCH_CPUCFG	(KVM_REG_LOONGARCH | 0x40000ULL) | ||
| 67 | #define KVM_REG_LOONGARCH_MASK		(KVM_REG_LOONGARCH | 0x70000ULL) | ||
| 68 | #define KVM_CSR_IDX_MASK		0x7fff | ||
| 69 | #define KVM_CPUCFG_IDX_MASK		0x7fff | ||
| 70 | |||
| 71 | /* | ||
| 72 | * KVM_REG_LOONGARCH_KVM - KVM specific control registers. | ||
| 73 | */ | ||
| 74 | |||
| 75 | #define KVM_REG_LOONGARCH_COUNTER	(KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 1) | ||
| 76 | #define KVM_REG_LOONGARCH_VCPU_RESET	(KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 2) | ||
| 77 | /* Debugging: Special instruction for software breakpoint */ | ||
| 78 | #define KVM_REG_LOONGARCH_DEBUG_INST	(KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 3) | ||
| 79 | |||
| 80 | #define LOONGARCH_REG_SHIFT		3 | ||
| 81 | #define LOONGARCH_REG_64(TYPE, REG)	(TYPE | KVM_REG_SIZE_U64 | (REG << LOONGARCH_REG_SHIFT)) | ||
| 82 | #define KVM_IOC_CSRID(REG)		LOONGARCH_REG_64(KVM_REG_LOONGARCH_CSR, REG) | ||
| 83 | #define KVM_IOC_CPUCFG(REG)		LOONGARCH_REG_64(KVM_REG_LOONGARCH_CPUCFG, REG) | ||
| 84 | #define KVM_LOONGARCH_VCPU_CPUCFG	0 | ||
| 85 | |||
| 86 | struct kvm_debug_exit_arch { | ||
| 87 | }; | ||
| 88 | |||
| 89 | /* for KVM_SET_GUEST_DEBUG */ | ||
| 90 | struct kvm_guest_debug_arch { | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* definition of registers in kvm_run */ | ||
| 94 | struct kvm_sync_regs { | ||
| 95 | }; | ||
| 96 | |||
| 97 | /* dummy definition */ | ||
| 98 | struct kvm_sregs { | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct kvm_iocsr_entry { | ||
| 102 | 	__u32 addr; | ||
| 103 | 	__u32 pad; | ||
| 104 | 	__u64 data; | ||
| 105 | }; | ||
| 106 | |||
| 107 | #define KVM_NR_IRQCHIPS		1 | ||
| 108 | #define KVM_IRQCHIP_NUM_PINS	64 | ||
| 109 | #define KVM_MAX_CORES		256 | ||
| 110 | |||
| 111 | #endif /* __UAPI_ASM_LOONGARCH_KVM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/ptrace.h+19-3| ... | @@ -39,9 +39,25 @@ struct user_pt_regs { | ... | @@ -39,9 +39,25 @@ struct user_pt_regs { |
| 39 | } __attribute__((aligned(8))); | 39 | } __attribute__((aligned(8))); |
| 40 | 40 | ||
| 41 | struct user_fp_state { | 41 | struct user_fp_state { |
| 42 | 	uint64_t fpr[32]; | 42 | 	uint64_t fpr[32]; |
| 43 | 	uint64_t fcc; | 43 | 	uint64_t fcc; |
| 44 | 	uint32_t fcsr; | 44 | 	uint32_t fcsr; |
| 45 | }; | ||
| 46 | |||
| 47 | struct user_lsx_state { | ||
| 48 | 	/* 32 registers, 128 bits width per register. */ | ||
| 49 | 	uint64_t vregs[32*2]; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct user_lasx_state { | ||
| 53 | 	/* 32 registers, 256 bits width per register. */ | ||
| 54 | 	uint64_t vregs[32*4]; | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct user_lbt_state { | ||
| 58 | 	uint64_t scr[4]; | ||
| 59 | 	uint32_t eflags; | ||
| 60 | 	uint32_t ftop; | ||
| 45 | }; | 61 | }; |
| 46 | 62 | ||
| 47 | struct user_watch_state { | 63 | struct user_watch_state { |
lib/libc/include/loongarch-linux-any/asm/sigcontext.h+28| ... | @@ -41,4 +41,32 @@ struct fpu_context { | ... | @@ -41,4 +41,32 @@ struct fpu_context { |
| 41 | 	__u32	fcsr; | 41 | 	__u32	fcsr; |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | /* LSX context */ | ||
| 45 | #define LSX_CTX_MAGIC		0x53580001 | ||
| 46 | #define LSX_CTX_ALIGN		16 | ||
| 47 | struct lsx_context { | ||
| 48 | 	__u64	regs[2*32]; | ||
| 49 | 	__u64	fcc; | ||
| 50 | 	__u32	fcsr; | ||
| 51 | }; | ||
| 52 | |||
| 53 | /* LASX context */ | ||
| 54 | #define LASX_CTX_MAGIC		0x41535801 | ||
| 55 | #define LASX_CTX_ALIGN		32 | ||
| 56 | struct lasx_context { | ||
| 57 | 	__u64	regs[4*32]; | ||
| 58 | 	__u64	fcc; | ||
| 59 | 	__u32	fcsr; | ||
| 60 | }; | ||
| 61 | |||
| 62 | /* LBT context */ | ||
| 63 | #define LBT_CTX_MAGIC		0x42540001 | ||
| 64 | #define LBT_CTX_ALIGN		8 | ||
| 65 | struct lbt_context { | ||
| 66 | 	__u64	regs[4]; | ||
| 67 | 	__u32	eflags; | ||
| 68 | 	__u32	ftop; | ||
| 69 | }; | ||
| 70 | |||
| 71 | |||
| 44 | #endif /* _ASM_SIGCONTEXT_H */ | 72 | #endif /* _ASM_SIGCONTEXT_H */ |
| \ No newline at end of file | |||
lib/libc/include/m68k-linux-any/asm/ptrace.h+1-1| ... | @@ -39,7 +39,7 @@ struct pt_regs { | ... | @@ -39,7 +39,7 @@ struct pt_regs { |
| 39 | long d0; | 39 | long d0; |
| 40 | long orig_d0; | 40 | long orig_d0; |
| 41 | long stkadj; | 41 | long stkadj; |
| 42 | #ifdef CONFIG_COLDFIRE | 42 | #ifdef __mcoldfire__ |
| 43 | unsigned format : 4; /* frame format specifier */ | 43 | unsigned format : 4; /* frame format specifier */ |
| 44 | unsigned vector : 12; /* vector offset */ | 44 | unsigned vector : 12; /* vector offset */ |
| 45 | unsigned short sr; | 45 | unsigned short sr; |
lib/libc/include/m68k-linux-any/asm/unistd_32.h+12| ... | @@ -423,6 +423,18 @@ | ... | @@ -423,6 +423,18 @@ |
| 423 | #define __NR_process_mrelease 448 | 423 | #define __NR_process_mrelease 448 |
| 424 | #define __NR_futex_waitv 449 | 424 | #define __NR_futex_waitv 449 |
| 425 | #define __NR_set_mempolicy_home_node 450 | 425 | #define __NR_set_mempolicy_home_node 450 |
| 426 | #define __NR_cachestat 451 | ||
| 427 | #define __NR_fchmodat2 452 | ||
| 428 | #define __NR_map_shadow_stack 453 | ||
| 429 | #define __NR_futex_wake 454 | ||
| 430 | #define __NR_futex_wait 455 | ||
| 431 | #define __NR_futex_requeue 456 | ||
| 432 | #define __NR_statmount 457 | ||
| 433 | #define __NR_listmount 458 | ||
| 434 | #define __NR_lsm_get_self_attr 459 | ||
| 435 | #define __NR_lsm_set_self_attr 460 | ||
| 436 | #define __NR_lsm_list_modules 461 | ||
| 437 | #define __NR_mseal 462 | ||
| 426 | 438 | ||
| 427 | 439 | ||
| 428 | #endif /* _ASM_UNISTD_32_H */ | 440 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/inst.h+33| ... | @@ -272,6 +272,27 @@ enum lx_func { | ... | @@ -272,6 +272,27 @@ enum lx_func { |
| 272 | 	lbx_op	= 0x16, | 272 | 	lbx_op	= 0x16, |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | /* | ||
| 276 | * func field for special2 MXU opcodes (Ingenic XBurst MXU). | ||
| 277 | */ | ||
| 278 | enum mxu_func { | ||
| 279 | 	/* TODO, other MXU funcs */ | ||
| 280 | 	mxu_lx_op = 0x28, | ||
| 281 | }; | ||
| 282 | |||
| 283 | /* | ||
| 284 | * op field for special2 MXU LX opcodes (Ingenic XBurst MXU). | ||
| 285 | */ | ||
| 286 | enum lx_ingenic_func { | ||
| 287 | 	mxu_lxb_op, | ||
| 288 | 	mxu_lxh_op, | ||
| 289 | 	/* reserved */ | ||
| 290 | 	mxu_lxw_op = 3, | ||
| 291 | 	mxu_lxbu_op, | ||
| 292 | 	mxu_lxhu_op, | ||
| 293 | 	/* more reserved */ | ||
| 294 | }; | ||
| 295 | |||
| 275 | /* | 296 | /* |
| 276 | * BSHFL opcodes | 297 | * BSHFL opcodes |
| 277 | */ | 298 | */ |
| ... | @@ -774,6 +795,17 @@ struct dsp_format {		/* SPEC3 DSP format instructions */ | ... | @@ -774,6 +795,17 @@ struct dsp_format {		/* SPEC3 DSP format instructions */ |
| 774 | 	;)))))) | 795 | 	;)))))) |
| 775 | }; | 796 | }; |
| 776 | 797 | ||
| 798 | struct mxu_lx_format {		/* SPEC2 MXU LX format instructions */ | ||
| 799 | 	__BITFIELD_FIELD(unsigned int opcode : 6, | ||
| 800 | 	__BITFIELD_FIELD(unsigned int rs : 5, | ||
| 801 | 	__BITFIELD_FIELD(unsigned int rt : 5, | ||
| 802 | 	__BITFIELD_FIELD(unsigned int rd : 5, | ||
| 803 | 	__BITFIELD_FIELD(unsigned int strd : 2, | ||
| 804 | 	__BITFIELD_FIELD(unsigned int op : 3, | ||
| 805 | 	__BITFIELD_FIELD(unsigned int func : 6, | ||
| 806 | 	;))))))) | ||
| 807 | }; | ||
| 808 | |||
| 777 | struct spec3_format { /* SPEC3 */ | 809 | struct spec3_format { /* SPEC3 */ |
| 778 | 	__BITFIELD_FIELD(unsigned int opcode:6, | 810 | 	__BITFIELD_FIELD(unsigned int opcode:6, |
| 779 | 	__BITFIELD_FIELD(unsigned int rs:5, | 811 | 	__BITFIELD_FIELD(unsigned int rs:5, |
| ... | @@ -1125,6 +1157,7 @@ union mips_instruction { | ... | @@ -1125,6 +1157,7 @@ union mips_instruction { |
| 1125 | 	struct loongson3_lswc2_format loongson3_lswc2_format; | 1157 | 	struct loongson3_lswc2_format loongson3_lswc2_format; |
| 1126 | 	struct loongson3_lsdc2_format loongson3_lsdc2_format; | 1158 | 	struct loongson3_lsdc2_format loongson3_lsdc2_format; |
| 1127 | 	struct loongson3_lscsr_format loongson3_lscsr_format; | 1159 | 	struct loongson3_lscsr_format loongson3_lscsr_format; |
| 1160 | 	struct mxu_lx_format mxu_lx_format; | ||
| 1128 | }; | 1161 | }; |
| 1129 | 1162 | ||
| 1130 | union mips16e_instruction { | 1163 | union mips16e_instruction { |
lib/libc/include/mips-linux-any/asm/kvm.h-2| ... | @@ -20,8 +20,6 @@ | ... | @@ -20,8 +20,6 @@ |
| 20 | * Some parts derived from the x86 version of this file. | 20 | * Some parts derived from the x86 version of this file. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | #define __KVM_HAVE_READONLY_MEM | ||
| 24 | |||
| 25 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 23 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 26 | 24 | ||
| 27 | /* | 25 | /* |
lib/libc/include/mips-linux-any/asm/mman.h+1-1| ... | @@ -88,7 +88,7 @@ | ... | @@ -88,7 +88,7 @@ |
| 88 | #define MADV_HUGEPAGE	14		/* Worth backing with hugepages */ | 88 | #define MADV_HUGEPAGE	14		/* Worth backing with hugepages */ |
| 89 | #define MADV_NOHUGEPAGE 15		/* Not worth backing with hugepages */ | 89 | #define MADV_NOHUGEPAGE 15		/* Not worth backing with hugepages */ |
| 90 | 90 | ||
| 91 | #define MADV_DONTDUMP	16		/* Explicity exclude from the core dump, | 91 | #define MADV_DONTDUMP	16		/* Explicitly exclude from core dump, |
| 92 | 					 overrides the coredump filter bits */ | 92 | 					 overrides the coredump filter bits */ |
| 93 | #define MADV_DODUMP	17		/* Clear the MADV_NODUMP flag */ | 93 | #define MADV_DODUMP	17		/* Clear the MADV_NODUMP flag */ |
| 94 | 94 |
lib/libc/include/mips-linux-any/asm/msgbuf.h+1-1| ... | @@ -62,7 +62,7 @@ struct msqid64_ds { | ... | @@ -62,7 +62,7 @@ struct msqid64_ds { |
| 62 | 	unsigned long __unused5; | 62 | 	unsigned long __unused5; |
| 63 | }; | 63 | }; |
| 64 | #else | 64 | #else |
| 65 | #warning no endianess set | 65 | #warning no endianness set |
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | #endif /* _ASM_MSGBUF_H */ | 68 | #endif /* _ASM_MSGBUF_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/socket.h+3| ... | @@ -148,6 +148,9 @@ | ... | @@ -148,6 +148,9 @@ |
| 148 | 148 | ||
| 149 | #define SO_RCVMARK		75 | 149 | #define SO_RCVMARK		75 |
| 150 | 150 | ||
| 151 | #define SO_PASSPIDFD		76 | ||
| 152 | #define SO_PEERPIDFD		77 | ||
| 153 | |||
| 151 | 154 | ||
| 152 | #if __BITS_PER_LONG == 64 | 155 | #if __BITS_PER_LONG == 64 |
| 153 | #define SO_TIMESTAMP		SO_TIMESTAMP_OLD | 156 | #define SO_TIMESTAMP		SO_TIMESTAMP_OLD |
lib/libc/include/mips-linux-any/asm/unistd_n32.h+12| ... | @@ -379,5 +379,17 @@ | ... | @@ -379,5 +379,17 @@ |
| 379 | #define __NR_process_mrelease (__NR_Linux + 448) | 379 | #define __NR_process_mrelease (__NR_Linux + 448) |
| 380 | #define __NR_futex_waitv (__NR_Linux + 449) | 380 | #define __NR_futex_waitv (__NR_Linux + 449) |
| 381 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) | 381 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) |
| 382 | #define __NR_cachestat (__NR_Linux + 451) | ||
| 383 | #define __NR_fchmodat2 (__NR_Linux + 452) | ||
| 384 | #define __NR_map_shadow_stack (__NR_Linux + 453) | ||
| 385 | #define __NR_futex_wake (__NR_Linux + 454) | ||
| 386 | #define __NR_futex_wait (__NR_Linux + 455) | ||
| 387 | #define __NR_futex_requeue (__NR_Linux + 456) | ||
| 388 | #define __NR_statmount (__NR_Linux + 457) | ||
| 389 | #define __NR_listmount (__NR_Linux + 458) | ||
| 390 | #define __NR_lsm_get_self_attr (__NR_Linux + 459) | ||
| 391 | #define __NR_lsm_set_self_attr (__NR_Linux + 460) | ||
| 392 | #define __NR_lsm_list_modules (__NR_Linux + 461) | ||
| 393 | #define __NR_mseal (__NR_Linux + 462) | ||
| 382 | 394 | ||
| 383 | #endif /* _ASM_UNISTD_N32_H */ | 395 | #endif /* _ASM_UNISTD_N32_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/unistd_n64.h+12| ... | @@ -355,5 +355,17 @@ | ... | @@ -355,5 +355,17 @@ |
| 355 | #define __NR_process_mrelease (__NR_Linux + 448) | 355 | #define __NR_process_mrelease (__NR_Linux + 448) |
| 356 | #define __NR_futex_waitv (__NR_Linux + 449) | 356 | #define __NR_futex_waitv (__NR_Linux + 449) |
| 357 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) | 357 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) |
| 358 | #define __NR_cachestat (__NR_Linux + 451) | ||
| 359 | #define __NR_fchmodat2 (__NR_Linux + 452) | ||
| 360 | #define __NR_map_shadow_stack (__NR_Linux + 453) | ||
| 361 | #define __NR_futex_wake (__NR_Linux + 454) | ||
| 362 | #define __NR_futex_wait (__NR_Linux + 455) | ||
| 363 | #define __NR_futex_requeue (__NR_Linux + 456) | ||
| 364 | #define __NR_statmount (__NR_Linux + 457) | ||
| 365 | #define __NR_listmount (__NR_Linux + 458) | ||
| 366 | #define __NR_lsm_get_self_attr (__NR_Linux + 459) | ||
| 367 | #define __NR_lsm_set_self_attr (__NR_Linux + 460) | ||
| 368 | #define __NR_lsm_list_modules (__NR_Linux + 461) | ||
| 369 | #define __NR_mseal (__NR_Linux + 462) | ||
| 358 | 370 | ||
| 359 | #endif /* _ASM_UNISTD_N64_H */ | 371 | #endif /* _ASM_UNISTD_N64_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/unistd_o32.h+12| ... | @@ -425,5 +425,17 @@ | ... | @@ -425,5 +425,17 @@ |
| 425 | #define __NR_process_mrelease (__NR_Linux + 448) | 425 | #define __NR_process_mrelease (__NR_Linux + 448) |
| 426 | #define __NR_futex_waitv (__NR_Linux + 449) | 426 | #define __NR_futex_waitv (__NR_Linux + 449) |
| 427 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) | 427 | #define __NR_set_mempolicy_home_node (__NR_Linux + 450) |
| 428 | #define __NR_cachestat (__NR_Linux + 451) | ||
| 429 | #define __NR_fchmodat2 (__NR_Linux + 452) | ||
| 430 | #define __NR_map_shadow_stack (__NR_Linux + 453) | ||
| 431 | #define __NR_futex_wake (__NR_Linux + 454) | ||
| 432 | #define __NR_futex_wait (__NR_Linux + 455) | ||
| 433 | #define __NR_futex_requeue (__NR_Linux + 456) | ||
| 434 | #define __NR_statmount (__NR_Linux + 457) | ||
| 435 | #define __NR_listmount (__NR_Linux + 458) | ||
| 436 | #define __NR_lsm_get_self_attr (__NR_Linux + 459) | ||
| 437 | #define __NR_lsm_set_self_attr (__NR_Linux + 460) | ||
| 438 | #define __NR_lsm_list_modules (__NR_Linux + 461) | ||
| 439 | #define __NR_mseal (__NR_Linux + 462) | ||
| 428 | 440 | ||
| 429 | #endif /* _ASM_UNISTD_O32_H */ | 441 | #endif /* _ASM_UNISTD_O32_H */ |
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/bootx.h+1-1| ... | @@ -108,7 +108,7 @@ typedef struct boot_infos | ... | @@ -108,7 +108,7 @@ typedef struct boot_infos |
| 108 | /* ALL BELOW NEW (vers. 4) */ | 108 | /* ALL BELOW NEW (vers. 4) */ |
| 109 | 109 | ||
| 110 | /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag | 110 | /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag |
| 111 | (non-PCI) only. On PCI, memory is contiguous and it's size is in the | 111 | (non-PCI) only. On PCI, memory is contiguous and its size is in the |
| 112 | device-tree. */ | 112 | device-tree. */ |
| 113 | boot_info_map_entry_t | 113 | boot_info_map_entry_t |
| 114 | 	 physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ | 114 | 	 physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ |
lib/libc/include/powerpc-linux-any/asm/elf.h+6| ... | @@ -98,6 +98,8 @@ | ... | @@ -98,6 +98,8 @@ |
| 98 | #define ELF_NEBB	3	/* includes ebbrr, ebbhr, bescr */ | 98 | #define ELF_NEBB	3	/* includes ebbrr, ebbhr, bescr */ |
| 99 | #define ELF_NPMU	5	/* includes siar, sdar, sier, mmcr2, mmcr0 */ | 99 | #define ELF_NPMU	5	/* includes siar, sdar, sier, mmcr2, mmcr0 */ |
| 100 | #define ELF_NPKEY	3	/* includes amr, iamr, uamor */ | 100 | #define ELF_NPKEY	3	/* includes amr, iamr, uamor */ |
| 101 | #define ELF_NDEXCR	2	/* includes dexcr, hdexcr */ | ||
| 102 | #define ELF_NHASHKEYR	1	/* includes hashkeyr */ | ||
| 101 | 103 | ||
| 102 | typedef unsigned long elf_greg_t64; | 104 | typedef unsigned long elf_greg_t64; |
| 103 | typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; | 105 | typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; |
| ... | @@ -279,8 +281,12 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; | ... | @@ -279,8 +281,12 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; |
| 279 | #define R_PPC64_TLSLD		108 | 281 | #define R_PPC64_TLSLD		108 |
| 280 | #define R_PPC64_TOCSAVE		109 | 282 | #define R_PPC64_TOCSAVE		109 |
| 281 | 283 | ||
| 284 | #define R_PPC64_REL24_NOTOC	116 | ||
| 282 | #define R_PPC64_ENTRY		118 | 285 | #define R_PPC64_ENTRY		118 |
| 283 | 286 | ||
| 287 | #define R_PPC64_PCREL34		132 | ||
| 288 | #define R_PPC64_GOT_PCREL34	133 | ||
| 289 | |||
| 284 | #define R_PPC64_REL16		249 | 290 | #define R_PPC64_REL16		249 |
| 285 | #define R_PPC64_REL16_LO	250 | 291 | #define R_PPC64_REL16_LO	250 |
| 286 | #define R_PPC64_REL16_HI	251 | 292 | #define R_PPC64_REL16_HI	251 |
lib/libc/include/powerpc-linux-any/asm/kvm.h+44-1| ... | @@ -28,7 +28,6 @@ | ... | @@ -28,7 +28,6 @@ |
| 28 | #define __KVM_HAVE_PPC_SMT | 28 | #define __KVM_HAVE_PPC_SMT |
| 29 | #define __KVM_HAVE_IRQCHIP | 29 | #define __KVM_HAVE_IRQCHIP |
| 30 | #define __KVM_HAVE_IRQ_LINE | 30 | #define __KVM_HAVE_IRQ_LINE |
| 31 | #define __KVM_HAVE_GUEST_DEBUG | ||
| 32 | 31 | ||
| 33 | /* Not always available, but if it is, this is the correct offset. */ | 32 | /* Not always available, but if it is, this is the correct offset. */ |
| 34 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 33 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| ... | @@ -733,4 +732,48 @@ struct kvm_ppc_xive_eq { | ... | @@ -733,4 +732,48 @@ struct kvm_ppc_xive_eq { |
| 733 | #define KVM_XIVE_TIMA_PAGE_OFFSET	0 | 732 | #define KVM_XIVE_TIMA_PAGE_OFFSET	0 |
| 734 | #define KVM_XIVE_ESB_PAGE_OFFSET	4 | 733 | #define KVM_XIVE_ESB_PAGE_OFFSET	4 |
| 735 | 734 | ||
| 735 | /* for KVM_PPC_GET_PVINFO */ | ||
| 736 | |||
| 737 | #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) | ||
| 738 | |||
| 739 | struct kvm_ppc_pvinfo { | ||
| 740 | 	/* out */ | ||
| 741 | 	__u32 flags; | ||
| 742 | 	__u32 hcall[4]; | ||
| 743 | 	__u8 pad[108]; | ||
| 744 | }; | ||
| 745 | |||
| 746 | /* for KVM_PPC_GET_SMMU_INFO */ | ||
| 747 | #define KVM_PPC_PAGE_SIZES_MAX_SZ	8 | ||
| 748 | |||
| 749 | struct kvm_ppc_one_page_size { | ||
| 750 | 	__u32 page_shift;	/* Page shift (or 0) */ | ||
| 751 | 	__u32 pte_enc;		/* Encoding in the HPTE (>>12) */ | ||
| 752 | }; | ||
| 753 | |||
| 754 | struct kvm_ppc_one_seg_page_size { | ||
| 755 | 	__u32 page_shift;	/* Base page shift of segment (or 0) */ | ||
| 756 | 	__u32 slb_enc;		/* SLB encoding for BookS */ | ||
| 757 | 	struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
| 758 | }; | ||
| 759 | |||
| 760 | #define KVM_PPC_PAGE_SIZES_REAL		0x00000001 | ||
| 761 | #define KVM_PPC_1T_SEGMENTS		0x00000002 | ||
| 762 | #define KVM_PPC_NO_HASH			0x00000004 | ||
| 763 | |||
| 764 | struct kvm_ppc_smmu_info { | ||
| 765 | 	__u64 flags; | ||
| 766 | 	__u32 slb_size; | ||
| 767 | 	__u16 data_keys;	/* # storage keys supported for data */ | ||
| 768 | 	__u16 instr_keys;	/* # storage keys supported for instructions */ | ||
| 769 | 	struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
| 770 | }; | ||
| 771 | |||
| 772 | /* for KVM_PPC_RESIZE_HPT_{PREPARE,COMMIT} */ | ||
| 773 | struct kvm_ppc_resize_hpt { | ||
| 774 | 	__u64 flags; | ||
| 775 | 	__u32 shift; | ||
| 776 | 	__u32 pad; | ||
| 777 | }; | ||
| 778 | |||
| 736 | #endif /* __LINUX_KVM_POWERPC_H */ | 779 | #endif /* __LINUX_KVM_POWERPC_H */ |
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr-miscdev.h created+9| ... | @@ -0,0 +1,9 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_MISCDEV_H_ | ||
| 3 | #define _PAPR_MISCDEV_H_ | ||
| 4 | |||
| 5 | enum { | ||
| 6 | 	PAPR_MISCDEV_IOC_ID = 0xb2, | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif /* _PAPR_MISCDEV_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr-sysparm.h created+58| ... | @@ -0,0 +1,58 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_SYSPARM_H_ | ||
| 3 | #define _PAPR_SYSPARM_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <asm/ioctl.h> | ||
| 7 | #include <asm/papr-miscdev.h> | ||
| 8 | |||
| 9 | enum { | ||
| 10 | 	PAPR_SYSPARM_MAX_INPUT = 1024, | ||
| 11 | 	PAPR_SYSPARM_MAX_OUTPUT = 4000, | ||
| 12 | }; | ||
| 13 | |||
| 14 | struct papr_sysparm_io_block { | ||
| 15 | 	__u32 parameter; | ||
| 16 | 	__u16 length; | ||
| 17 | 	__u8 data[PAPR_SYSPARM_MAX_OUTPUT]; | ||
| 18 | }; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * PAPR_SYSPARM_IOC_GET - Retrieve the value of a PAPR system parameter. | ||
| 22 | * | ||
| 23 | * Uses _IOWR because of one corner case: Retrieving the value of the | ||
| 24 | * "OS Service Entitlement Status" parameter (60) requires the caller | ||
| 25 | * to supply input data (a date string) in the buffer passed to | ||
| 26 | * firmware. So the @length and @data of the incoming | ||
| 27 | * papr_sysparm_io_block are always used to initialize the work area | ||
| 28 | * supplied to ibm,get-system-parameter. No other parameters are known | ||
| 29 | * to parameterize the result this way, and callers are encouraged | ||
| 30 | * (but not required) to zero-initialize @length and @data in the | ||
| 31 | * common case. | ||
| 32 | * | ||
| 33 | * On error the contents of the ioblock are indeterminate. | ||
| 34 | * | ||
| 35 | * Return: | ||
| 36 | * 0: Success; @length is the length of valid data in @data, not to exceed @PAPR_SYSPARM_MAX_OUTPUT. | ||
| 37 | * -EIO: Platform error. (-1) | ||
| 38 | * -EINVAL: Incorrect data length or format. (-9999) | ||
| 39 | * -EPERM: The calling partition is not allowed to access this parameter. (-9002) | ||
| 40 | * -EOPNOTSUPP: Parameter not supported on this platform (-3) | ||
| 41 | */ | ||
| 42 | #define PAPR_SYSPARM_IOC_GET _IOWR(PAPR_MISCDEV_IOC_ID, 1, struct papr_sysparm_io_block) | ||
| 43 | |||
| 44 | /** | ||
| 45 | * PAPR_SYSPARM_IOC_SET - Update the value of a PAPR system parameter. | ||
| 46 | * | ||
| 47 | * The contents of the ioblock are unchanged regardless of success. | ||
| 48 | * | ||
| 49 | * Return: | ||
| 50 | * 0: Success; the parameter has been updated. | ||
| 51 | * -EIO: Platform error. (-1) | ||
| 52 | * -EINVAL: Incorrect data length or format. (-9999) | ||
| 53 | * -EPERM: The calling partition is not allowed to access this parameter. (-9002) | ||
| 54 | * -EOPNOTSUPP: Parameter not supported on this platform (-3) | ||
| 55 | */ | ||
| 56 | #define PAPR_SYSPARM_IOC_SET _IOW(PAPR_MISCDEV_IOC_ID, 2, struct papr_sysparm_io_block) | ||
| 57 | |||
| 58 | #endif /* _PAPR_SYSPARM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr-vpd.h created+22| ... | @@ -0,0 +1,22 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_VPD_H_ | ||
| 3 | #define _PAPR_VPD_H_ | ||
| 4 | |||
| 5 | #include <asm/ioctl.h> | ||
| 6 | #include <asm/papr-miscdev.h> | ||
| 7 | |||
| 8 | struct papr_location_code { | ||
| 9 | 	/* | ||
| 10 | 	 * PAPR+ v2.13 12.3.2.4 Converged Location Code Rules - Length | ||
| 11 | 	 * Restrictions. 79 characters plus nul. | ||
| 12 | 	 */ | ||
| 13 | 	char str[80]; | ||
| 14 | }; | ||
| 15 | |||
| 16 | /* | ||
| 17 | * ioctl for /dev/papr-vpd. Returns a VPD handle fd corresponding to | ||
| 18 | * the location code. | ||
| 19 | */ | ||
| 20 | #define PAPR_VPD_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 0, struct papr_location_code) | ||
| 21 | |||
| 22 | #endif /* _PAPR_VPD_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr_pdsm.h deleted-165| ... | @@ -1,165 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * PAPR nvDimm Specific Methods (PDSM) and structs for libndctl | ||
| 4 | * | ||
| 5 | * (C) Copyright IBM 2020 | ||
| 6 | * | ||
| 7 | * Author: Vaibhav Jain <vaibhav at linux.ibm.com> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _ASM_POWERPC_PAPR_PDSM_H_ | ||
| 11 | #define _ASM_POWERPC_PAPR_PDSM_H_ | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/ndctl.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * PDSM Envelope: | ||
| 18 | * | ||
| 19 | * The ioctl ND_CMD_CALL exchange data between user-space and kernel via | ||
| 20 | * envelope which consists of 2 headers sections and payload sections as | ||
| 21 | * illustrated below: | ||
| 22 | * +-----------------+---------------+---------------------------+ | ||
| 23 | * | 64-Bytes | 8-Bytes | Max 184-Bytes | | ||
| 24 | * +-----------------+---------------+---------------------------+ | ||
| 25 | * | ND-HEADER | PDSM-HEADER | PDSM-PAYLOAD | | ||
| 26 | * +-----------------+---------------+---------------------------+ | ||
| 27 | * | nd_family | | | | ||
| 28 | * | nd_size_out | cmd_status | | | ||
| 29 | * | nd_size_in | reserved | nd_pdsm_payload | | ||
| 30 | * | nd_command | payload --> | | | ||
| 31 | * | nd_fw_size | | | | ||
| 32 | * | nd_payload ---> | | | | ||
| 33 | * +---------------+-----------------+---------------------------+ | ||
| 34 | * | ||
| 35 | * ND Header: | ||
| 36 | * This is the generic libnvdimm header described as 'struct nd_cmd_pkg' | ||
| 37 | * which is interpreted by libnvdimm before passed on to papr_scm. Important | ||
| 38 | * member fields used are: | ||
| 39 | * 'nd_family'		: (In) NVDIMM_FAMILY_PAPR_SCM | ||
| 40 | * 'nd_size_in'		: (In) PDSM-HEADER + PDSM-IN-PAYLOAD (usually 0) | ||
| 41 | * 'nd_size_out' : (In) PDSM-HEADER + PDSM-RETURN-PAYLOAD | ||
| 42 | * 'nd_command' : (In) One of PAPR_PDSM_XXX | ||
| 43 | * 'nd_fw_size' : (Out) PDSM-HEADER + size of actual payload returned | ||
| 44 | * | ||
| 45 | * PDSM Header: | ||
| 46 | * This is papr-scm specific header that precedes the payload. This is defined | ||
| 47 | * as nd_cmd_pdsm_pkg. Following fields aare available in this header: | ||
| 48 | * | ||
| 49 | * 'cmd_status'		: (Out) Errors if any encountered while servicing PDSM. | ||
| 50 | * 'reserved'		: Not used, reserved for future and should be set to 0. | ||
| 51 | * 'payload' : A union of all the possible payload structs | ||
| 52 | * | ||
| 53 | * PDSM Payload: | ||
| 54 | * | ||
| 55 | * The layout of the PDSM Payload is defined by various structs shared between | ||
| 56 | * papr_scm and libndctl so that contents of payload can be interpreted. As such | ||
| 57 | * its defined as a union of all possible payload structs as | ||
| 58 | * 'union nd_pdsm_payload'. Based on the value of 'nd_cmd_pkg.nd_command' | ||
| 59 | * appropriate member of the union is accessed. | ||
| 60 | */ | ||
| 61 | |||
| 62 | /* Max payload size that we can handle */ | ||
| 63 | #define ND_PDSM_PAYLOAD_MAX_SIZE 184 | ||
| 64 | |||
| 65 | /* Max payload size that we can handle */ | ||
| 66 | #define ND_PDSM_HDR_SIZE \ | ||
| 67 | 	(sizeof(struct nd_pkg_pdsm) - ND_PDSM_PAYLOAD_MAX_SIZE) | ||
| 68 | |||
| 69 | /* Various nvdimm health indicators */ | ||
| 70 | #define PAPR_PDSM_DIMM_HEALTHY 0 | ||
| 71 | #define PAPR_PDSM_DIMM_UNHEALTHY 1 | ||
| 72 | #define PAPR_PDSM_DIMM_CRITICAL 2 | ||
| 73 | #define PAPR_PDSM_DIMM_FATAL 3 | ||
| 74 | |||
| 75 | /* struct nd_papr_pdsm_health.extension_flags field flags */ | ||
| 76 | |||
| 77 | /* Indicate that the 'dimm_fuel_gauge' field is valid */ | ||
| 78 | #define PDSM_DIMM_HEALTH_RUN_GAUGE_VALID 1 | ||
| 79 | |||
| 80 | /* Indicate that the 'dimm_dsc' field is valid */ | ||
| 81 | #define PDSM_DIMM_DSC_VALID 2 | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Struct exchanged between kernel & ndctl in for PAPR_PDSM_HEALTH | ||
| 85 | * Various flags indicate the health status of the dimm. | ||
| 86 | * | ||
| 87 | * extension_flags	: Any extension fields present in the struct. | ||
| 88 | * dimm_unarmed		: Dimm not armed. So contents wont persist. | ||
| 89 | * dimm_bad_shutdown	: Previous shutdown did not persist contents. | ||
| 90 | * dimm_bad_restore	: Contents from previous shutdown werent restored. | ||
| 91 | * dimm_scrubbed	: Contents of the dimm have been scrubbed. | ||
| 92 | * dimm_locked		: Contents of the dimm cant be modified until CEC reboot | ||
| 93 | * dimm_encrypted	: Contents of dimm are encrypted. | ||
| 94 | * dimm_health		: Dimm health indicator. One of PAPR_PDSM_DIMM_XXXX | ||
| 95 | * dimm_fuel_gauge	: Life remaining of DIMM as a percentage from 0-100 | ||
| 96 | */ | ||
| 97 | struct nd_papr_pdsm_health { | ||
| 98 | 	union { | ||
| 99 | 		struct { | ||
| 100 | 			__u32 extension_flags; | ||
| 101 | 			__u8 dimm_unarmed; | ||
| 102 | 			__u8 dimm_bad_shutdown; | ||
| 103 | 			__u8 dimm_bad_restore; | ||
| 104 | 			__u8 dimm_scrubbed; | ||
| 105 | 			__u8 dimm_locked; | ||
| 106 | 			__u8 dimm_encrypted; | ||
| 107 | 			__u16 dimm_health; | ||
| 108 | |||
| 109 | 			/* Extension flag PDSM_DIMM_HEALTH_RUN_GAUGE_VALID */ | ||
| 110 | 			__u16 dimm_fuel_gauge; | ||
| 111 | |||
| 112 | 			/* Extension flag PDSM_DIMM_DSC_VALID */ | ||
| 113 | 			__u64 dimm_dsc; | ||
| 114 | 		}; | ||
| 115 | 		__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 116 | 	}; | ||
| 117 | }; | ||
| 118 | |||
| 119 | /* Flags for injecting specific smart errors */ | ||
| 120 | #define PDSM_SMART_INJECT_HEALTH_FATAL		(1 << 0) | ||
| 121 | #define PDSM_SMART_INJECT_BAD_SHUTDOWN		(1 << 1) | ||
| 122 | |||
| 123 | struct nd_papr_pdsm_smart_inject { | ||
| 124 | 	union { | ||
| 125 | 		struct { | ||
| 126 | 			/* One or more of PDSM_SMART_INJECT_ */ | ||
| 127 | 			__u32 flags; | ||
| 128 | 			__u8 fatal_enable; | ||
| 129 | 			__u8 unsafe_shutdown_enable; | ||
| 130 | 		}; | ||
| 131 | 		__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 132 | 	}; | ||
| 133 | }; | ||
| 134 | |||
| 135 | /* | ||
| 136 | * Methods to be embedded in ND_CMD_CALL request. These are sent to the kernel | ||
| 137 | * via 'nd_cmd_pkg.nd_command' member of the ioctl struct | ||
| 138 | */ | ||
| 139 | enum papr_pdsm { | ||
| 140 | 	PAPR_PDSM_MIN = 0x0, | ||
| 141 | 	PAPR_PDSM_HEALTH, | ||
| 142 | 	PAPR_PDSM_SMART_INJECT, | ||
| 143 | 	PAPR_PDSM_MAX, | ||
| 144 | }; | ||
| 145 | |||
| 146 | /* Maximal union that can hold all possible payload types */ | ||
| 147 | union nd_pdsm_payload { | ||
| 148 | 	struct nd_papr_pdsm_health health; | ||
| 149 | 	struct nd_papr_pdsm_smart_inject smart_inject; | ||
| 150 | 	__u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE]; | ||
| 151 | } __attribute__((packed)); | ||
| 152 | |||
| 153 | /* | ||
| 154 | * PDSM-header + payload expected with ND_CMD_CALL ioctl from libnvdimm | ||
| 155 | * Valid member of union 'payload' is identified via 'nd_cmd_pkg.nd_command' | ||
| 156 | * that should always precede this struct when sent to papr_scm via CMD_CALL | ||
| 157 | * interface. | ||
| 158 | */ | ||
| 159 | struct nd_pkg_pdsm { | ||
| 160 | 	__s32 cmd_status;	/* Out: Sub-cmd status returned back */ | ||
| 161 | 	__u16 reserved[2];	/* Ignored and to be set as '0' */ | ||
| 162 | 	union nd_pdsm_payload payload; | ||
| 163 | } __attribute__((packed)); | ||
| 164 | |||
| 165 | #endif /* _ASM_POWERPC_PAPR_PDSM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/unistd_32.h+12| ... | @@ -432,6 +432,18 @@ | ... | @@ -432,6 +432,18 @@ |
| 432 | #define __NR_process_mrelease 448 | 432 | #define __NR_process_mrelease 448 |
| 433 | #define __NR_futex_waitv 449 | 433 | #define __NR_futex_waitv 449 |
| 434 | #define __NR_set_mempolicy_home_node 450 | 434 | #define __NR_set_mempolicy_home_node 450 |
| 435 | #define __NR_cachestat 451 | ||
| 436 | #define __NR_fchmodat2 452 | ||
| 437 | #define __NR_map_shadow_stack 453 | ||
| 438 | #define __NR_futex_wake 454 | ||
| 439 | #define __NR_futex_wait 455 | ||
| 440 | #define __NR_futex_requeue 456 | ||
| 441 | #define __NR_statmount 457 | ||
| 442 | #define __NR_listmount 458 | ||
| 443 | #define __NR_lsm_get_self_attr 459 | ||
| 444 | #define __NR_lsm_set_self_attr 460 | ||
| 445 | #define __NR_lsm_list_modules 461 | ||
| 446 | #define __NR_mseal 462 | ||
| 435 | 447 | ||
| 436 | 448 | ||
| 437 | #endif /* _ASM_UNISTD_32_H */ | 449 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/unistd_64.h+12| ... | @@ -404,6 +404,18 @@ | ... | @@ -404,6 +404,18 @@ |
| 404 | #define __NR_process_mrelease 448 | 404 | #define __NR_process_mrelease 448 |
| 405 | #define __NR_futex_waitv 449 | 405 | #define __NR_futex_waitv 449 |
| 406 | #define __NR_set_mempolicy_home_node 450 | 406 | #define __NR_set_mempolicy_home_node 450 |
| 407 | #define __NR_cachestat 451 | ||
| 408 | #define __NR_fchmodat2 452 | ||
| 409 | #define __NR_map_shadow_stack 453 | ||
| 410 | #define __NR_futex_wake 454 | ||
| 411 | #define __NR_futex_wait 455 | ||
| 412 | #define __NR_futex_requeue 456 | ||
| 413 | #define __NR_statmount 457 | ||
| 414 | #define __NR_listmount 458 | ||
| 415 | #define __NR_lsm_get_self_attr 459 | ||
| 416 | #define __NR_lsm_set_self_attr 460 | ||
| 417 | #define __NR_lsm_list_modules 461 | ||
| 418 | #define __NR_mseal 462 | ||
| 407 | 419 | ||
| 408 | 420 | ||
| 409 | #endif /* _ASM_UNISTD_64_H */ | 421 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/auxvec.h+2-1| ... | @@ -34,6 +34,7 @@ | ... | @@ -34,6 +34,7 @@ |
| 34 | #define AT_L3_CACHEGEOMETRY	47 | 34 | #define AT_L3_CACHEGEOMETRY	47 |
| 35 | 35 | ||
| 36 | /* entries in ARCH_DLINFO */ | 36 | /* entries in ARCH_DLINFO */ |
| 37 | #define AT_VECTOR_SIZE_ARCH	9 | 37 | #define AT_VECTOR_SIZE_ARCH	10 |
| 38 | #define AT_MINSIGSTKSZ		51 | ||
| 38 | 39 | ||
| 39 | #endif /* _ASM_RISCV_AUXVEC_H */ | 40 | #endif /* _ASM_RISCV_AUXVEC_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/elf.h+4-1| ... | @@ -49,6 +49,7 @@ typedef union __riscv_fp_state elf_fpregset_t; | ... | @@ -49,6 +49,7 @@ typedef union __riscv_fp_state elf_fpregset_t; |
| 49 | #define R_RISCV_TLS_DTPREL64	9 | 49 | #define R_RISCV_TLS_DTPREL64	9 |
| 50 | #define R_RISCV_TLS_TPREL32	10 | 50 | #define R_RISCV_TLS_TPREL32	10 |
| 51 | #define R_RISCV_TLS_TPREL64	11 | 51 | #define R_RISCV_TLS_TPREL64	11 |
| 52 | #define R_RISCV_IRELATIVE	58 | ||
| 52 | 53 | ||
| 53 | /* Relocation types not used by the dynamic linker */ | 54 | /* Relocation types not used by the dynamic linker */ |
| 54 | #define R_RISCV_BRANCH		16 | 55 | #define R_RISCV_BRANCH		16 |
| ... | @@ -81,7 +82,6 @@ typedef union __riscv_fp_state elf_fpregset_t; | ... | @@ -81,7 +82,6 @@ typedef union __riscv_fp_state elf_fpregset_t; |
| 81 | #define R_RISCV_ALIGN		43 | 82 | #define R_RISCV_ALIGN		43 |
| 82 | #define R_RISCV_RVC_BRANCH	44 | 83 | #define R_RISCV_RVC_BRANCH	44 |
| 83 | #define R_RISCV_RVC_JUMP	45 | 84 | #define R_RISCV_RVC_JUMP	45 |
| 84 | #define R_RISCV_LUI		46 | ||
| 85 | #define R_RISCV_GPREL_I		47 | 85 | #define R_RISCV_GPREL_I		47 |
| 86 | #define R_RISCV_GPREL_S		48 | 86 | #define R_RISCV_GPREL_S		48 |
| 87 | #define R_RISCV_TPREL_I		49 | 87 | #define R_RISCV_TPREL_I		49 |
| ... | @@ -93,6 +93,9 @@ typedef union __riscv_fp_state elf_fpregset_t; | ... | @@ -93,6 +93,9 @@ typedef union __riscv_fp_state elf_fpregset_t; |
| 93 | #define R_RISCV_SET16		55 | 93 | #define R_RISCV_SET16		55 |
| 94 | #define R_RISCV_SET32		56 | 94 | #define R_RISCV_SET32		56 |
| 95 | #define R_RISCV_32_PCREL	57 | 95 | #define R_RISCV_32_PCREL	57 |
| 96 | #define R_RISCV_PLT32		59 | ||
| 97 | #define R_RISCV_SET_ULEB128	60 | ||
| 98 | #define R_RISCV_SUB_ULEB128	61 | ||
| 96 | 99 | ||
| 97 | 100 | ||
| 98 | #endif /* _ASM_RISCV_ELF_H */ | 101 | #endif /* _ASM_RISCV_ELF_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/hwcap.h+1| ... | @@ -21,5 +21,6 @@ | ... | @@ -21,5 +21,6 @@ |
| 21 | #define COMPAT_HWCAP_ISA_F	(1 << ('F' - 'A')) | 21 | #define COMPAT_HWCAP_ISA_F	(1 << ('F' - 'A')) |
| 22 | #define COMPAT_HWCAP_ISA_D	(1 << ('D' - 'A')) | 22 | #define COMPAT_HWCAP_ISA_D	(1 << ('D' - 'A')) |
| 23 | #define COMPAT_HWCAP_ISA_C	(1 << ('C' - 'A')) | 23 | #define COMPAT_HWCAP_ISA_C	(1 << ('C' - 'A')) |
| 24 | #define COMPAT_HWCAP_ISA_V	(1 << ('V' - 'A')) | ||
| 24 | 25 | ||
| 25 | #endif /* _ASM_RISCV_HWCAP_H */ | 26 | #endif /* _ASM_RISCV_HWCAP_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/hwprobe.h created+76| ... | @@ -0,0 +1,76 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright 2023 Rivos, Inc | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _ASM_HWPROBE_H | ||
| 7 | #define _ASM_HWPROBE_H | ||
| 8 | |||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Interface for probing hardware capabilities from userspace, see | ||
| 13 | * Documentation/arch/riscv/hwprobe.rst for more information. | ||
| 14 | */ | ||
| 15 | struct riscv_hwprobe { | ||
| 16 | 	__s64 key; | ||
| 17 | 	__u64 value; | ||
| 18 | }; | ||
| 19 | |||
| 20 | #define RISCV_HWPROBE_KEY_MVENDORID	0 | ||
| 21 | #define RISCV_HWPROBE_KEY_MARCHID	1 | ||
| 22 | #define RISCV_HWPROBE_KEY_MIMPID	2 | ||
| 23 | #define RISCV_HWPROBE_KEY_BASE_BEHAVIOR	3 | ||
| 24 | #define		RISCV_HWPROBE_BASE_BEHAVIOR_IMA	(1 << 0) | ||
| 25 | #define RISCV_HWPROBE_KEY_IMA_EXT_0	4 | ||
| 26 | #define		RISCV_HWPROBE_IMA_FD		(1 << 0) | ||
| 27 | #define		RISCV_HWPROBE_IMA_C		(1 << 1) | ||
| 28 | #define		RISCV_HWPROBE_IMA_V		(1 << 2) | ||
| 29 | #define		RISCV_HWPROBE_EXT_ZBA		(1 << 3) | ||
| 30 | #define		RISCV_HWPROBE_EXT_ZBB		(1 << 4) | ||
| 31 | #define		RISCV_HWPROBE_EXT_ZBS		(1 << 5) | ||
| 32 | #define		RISCV_HWPROBE_EXT_ZICBOZ	(1 << 6) | ||
| 33 | #define		RISCV_HWPROBE_EXT_ZBC		(1 << 7) | ||
| 34 | #define		RISCV_HWPROBE_EXT_ZBKB		(1 << 8) | ||
| 35 | #define		RISCV_HWPROBE_EXT_ZBKC		(1 << 9) | ||
| 36 | #define		RISCV_HWPROBE_EXT_ZBKX		(1 << 10) | ||
| 37 | #define		RISCV_HWPROBE_EXT_ZKND		(1 << 11) | ||
| 38 | #define		RISCV_HWPROBE_EXT_ZKNE		(1 << 12) | ||
| 39 | #define		RISCV_HWPROBE_EXT_ZKNH		(1 << 13) | ||
| 40 | #define		RISCV_HWPROBE_EXT_ZKSED		(1 << 14) | ||
| 41 | #define		RISCV_HWPROBE_EXT_ZKSH		(1 << 15) | ||
| 42 | #define		RISCV_HWPROBE_EXT_ZKT		(1 << 16) | ||
| 43 | #define		RISCV_HWPROBE_EXT_ZVBB		(1 << 17) | ||
| 44 | #define		RISCV_HWPROBE_EXT_ZVBC		(1 << 18) | ||
| 45 | #define		RISCV_HWPROBE_EXT_ZVKB		(1 << 19) | ||
| 46 | #define		RISCV_HWPROBE_EXT_ZVKG		(1 << 20) | ||
| 47 | #define		RISCV_HWPROBE_EXT_ZVKNED	(1 << 21) | ||
| 48 | #define		RISCV_HWPROBE_EXT_ZVKNHA	(1 << 22) | ||
| 49 | #define		RISCV_HWPROBE_EXT_ZVKNHB	(1 << 23) | ||
| 50 | #define		RISCV_HWPROBE_EXT_ZVKSED	(1 << 24) | ||
| 51 | #define		RISCV_HWPROBE_EXT_ZVKSH		(1 << 25) | ||
| 52 | #define		RISCV_HWPROBE_EXT_ZVKT		(1 << 26) | ||
| 53 | #define		RISCV_HWPROBE_EXT_ZFH		(1 << 27) | ||
| 54 | #define		RISCV_HWPROBE_EXT_ZFHMIN	(1 << 28) | ||
| 55 | #define		RISCV_HWPROBE_EXT_ZIHINTNTL	(1 << 29) | ||
| 56 | #define		RISCV_HWPROBE_EXT_ZVFH		(1 << 30) | ||
| 57 | #define		RISCV_HWPROBE_EXT_ZVFHMIN	(1ULL << 31) | ||
| 58 | #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32) | ||
| 59 | #define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33) | ||
| 60 | #define		RISCV_HWPROBE_EXT_ZACAS		(1ULL << 34) | ||
| 61 | #define		RISCV_HWPROBE_EXT_ZICOND	(1ULL << 35) | ||
| 62 | #define		RISCV_HWPROBE_EXT_ZIHINTPAUSE	(1ULL << 36) | ||
| 63 | #define RISCV_HWPROBE_KEY_CPUPERF_0	5 | ||
| 64 | #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0) | ||
| 65 | #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0) | ||
| 66 | #define		RISCV_HWPROBE_MISALIGNED_SLOW		(2 << 0) | ||
| 67 | #define		RISCV_HWPROBE_MISALIGNED_FAST		(3 << 0) | ||
| 68 | #define		RISCV_HWPROBE_MISALIGNED_UNSUPPORTED	(4 << 0) | ||
| 69 | #define		RISCV_HWPROBE_MISALIGNED_MASK		(7 << 0) | ||
| 70 | #define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE	6 | ||
| 71 | /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ | ||
| 72 | |||
| 73 | /* Flags */ | ||
| 74 | #define RISCV_HWPROBE_WHICH_CPUS	(1 << 0) | ||
| 75 | |||
| 76 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/kvm.h+204-2| ... | @@ -12,9 +12,10 @@ | ... | @@ -12,9 +12,10 @@ |
| 12 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
| 13 | 13 | ||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <asm/bitsperlong.h> | ||
| 15 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
| 16 | 17 | ||
| 17 | #define __KVM_HAVE_READONLY_MEM | 18 | #define __KVM_HAVE_IRQ_LINE |
| 18 | 19 | ||
| 19 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 20 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 20 | 21 | ||
| ... | @@ -52,6 +53,8 @@ struct kvm_riscv_config { | ... | @@ -52,6 +53,8 @@ struct kvm_riscv_config { |
| 52 | 	unsigned long mvendorid; | 53 | 	unsigned long mvendorid; |
| 53 | 	unsigned long marchid; | 54 | 	unsigned long marchid; |
| 54 | 	unsigned long mimpid; | 55 | 	unsigned long mimpid; |
| 56 | 	unsigned long zicboz_block_size; | ||
| 57 | 	unsigned long satp_mode; | ||
| 55 | }; | 58 | }; |
| 56 | 59 | ||
| 57 | /* CORE registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | 60 | /* CORE registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ |
| ... | @@ -64,7 +67,7 @@ struct kvm_riscv_core { | ... | @@ -64,7 +67,7 @@ struct kvm_riscv_core { |
| 64 | #define KVM_RISCV_MODE_S	1 | 67 | #define KVM_RISCV_MODE_S	1 |
| 65 | #define KVM_RISCV_MODE_U	0 | 68 | #define KVM_RISCV_MODE_U	0 |
| 66 | 69 | ||
| 67 | /* CSR registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | 70 | /* General CSR registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ |
| 68 | struct kvm_riscv_csr { | 71 | struct kvm_riscv_csr { |
| 69 | 	unsigned long sstatus; | 72 | 	unsigned long sstatus; |
| 70 | 	unsigned long sie; | 73 | 	unsigned long sie; |
| ... | @@ -76,6 +79,23 @@ struct kvm_riscv_csr { | ... | @@ -76,6 +79,23 @@ struct kvm_riscv_csr { |
| 76 | 	unsigned long sip; | 79 | 	unsigned long sip; |
| 77 | 	unsigned long satp; | 80 | 	unsigned long satp; |
| 78 | 	unsigned long scounteren; | 81 | 	unsigned long scounteren; |
| 82 | 	unsigned long senvcfg; | ||
| 83 | }; | ||
| 84 | |||
| 85 | /* AIA CSR registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | ||
| 86 | struct kvm_riscv_aia_csr { | ||
| 87 | 	unsigned long siselect; | ||
| 88 | 	unsigned long iprio1; | ||
| 89 | 	unsigned long iprio2; | ||
| 90 | 	unsigned long sieh; | ||
| 91 | 	unsigned long siph; | ||
| 92 | 	unsigned long iprio1h; | ||
| 93 | 	unsigned long iprio2h; | ||
| 94 | }; | ||
| 95 | |||
| 96 | /* Smstateen CSR for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | ||
| 97 | struct kvm_riscv_smstateen_csr { | ||
| 98 | 	unsigned long sstateen0; | ||
| 79 | }; | 99 | }; |
| 80 | 100 | ||
| 81 | /* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | 101 | /* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ |
| ... | @@ -105,9 +125,77 @@ enum KVM_RISCV_ISA_EXT_ID { | ... | @@ -105,9 +125,77 @@ enum KVM_RISCV_ISA_EXT_ID { |
| 105 | 	KVM_RISCV_ISA_EXT_SVINVAL, | 125 | 	KVM_RISCV_ISA_EXT_SVINVAL, |
| 106 | 	KVM_RISCV_ISA_EXT_ZIHINTPAUSE, | 126 | 	KVM_RISCV_ISA_EXT_ZIHINTPAUSE, |
| 107 | 	KVM_RISCV_ISA_EXT_ZICBOM, | 127 | 	KVM_RISCV_ISA_EXT_ZICBOM, |
| 128 | 	KVM_RISCV_ISA_EXT_ZICBOZ, | ||
| 129 | 	KVM_RISCV_ISA_EXT_ZBB, | ||
| 130 | 	KVM_RISCV_ISA_EXT_SSAIA, | ||
| 131 | 	KVM_RISCV_ISA_EXT_V, | ||
| 132 | 	KVM_RISCV_ISA_EXT_SVNAPOT, | ||
| 133 | 	KVM_RISCV_ISA_EXT_ZBA, | ||
| 134 | 	KVM_RISCV_ISA_EXT_ZBS, | ||
| 135 | 	KVM_RISCV_ISA_EXT_ZICNTR, | ||
| 136 | 	KVM_RISCV_ISA_EXT_ZICSR, | ||
| 137 | 	KVM_RISCV_ISA_EXT_ZIFENCEI, | ||
| 138 | 	KVM_RISCV_ISA_EXT_ZIHPM, | ||
| 139 | 	KVM_RISCV_ISA_EXT_SMSTATEEN, | ||
| 140 | 	KVM_RISCV_ISA_EXT_ZICOND, | ||
| 141 | 	KVM_RISCV_ISA_EXT_ZBC, | ||
| 142 | 	KVM_RISCV_ISA_EXT_ZBKB, | ||
| 143 | 	KVM_RISCV_ISA_EXT_ZBKC, | ||
| 144 | 	KVM_RISCV_ISA_EXT_ZBKX, | ||
| 145 | 	KVM_RISCV_ISA_EXT_ZKND, | ||
| 146 | 	KVM_RISCV_ISA_EXT_ZKNE, | ||
| 147 | 	KVM_RISCV_ISA_EXT_ZKNH, | ||
| 148 | 	KVM_RISCV_ISA_EXT_ZKR, | ||
| 149 | 	KVM_RISCV_ISA_EXT_ZKSED, | ||
| 150 | 	KVM_RISCV_ISA_EXT_ZKSH, | ||
| 151 | 	KVM_RISCV_ISA_EXT_ZKT, | ||
| 152 | 	KVM_RISCV_ISA_EXT_ZVBB, | ||
| 153 | 	KVM_RISCV_ISA_EXT_ZVBC, | ||
| 154 | 	KVM_RISCV_ISA_EXT_ZVKB, | ||
| 155 | 	KVM_RISCV_ISA_EXT_ZVKG, | ||
| 156 | 	KVM_RISCV_ISA_EXT_ZVKNED, | ||
| 157 | 	KVM_RISCV_ISA_EXT_ZVKNHA, | ||
| 158 | 	KVM_RISCV_ISA_EXT_ZVKNHB, | ||
| 159 | 	KVM_RISCV_ISA_EXT_ZVKSED, | ||
| 160 | 	KVM_RISCV_ISA_EXT_ZVKSH, | ||
| 161 | 	KVM_RISCV_ISA_EXT_ZVKT, | ||
| 162 | 	KVM_RISCV_ISA_EXT_ZFH, | ||
| 163 | 	KVM_RISCV_ISA_EXT_ZFHMIN, | ||
| 164 | 	KVM_RISCV_ISA_EXT_ZIHINTNTL, | ||
| 165 | 	KVM_RISCV_ISA_EXT_ZVFH, | ||
| 166 | 	KVM_RISCV_ISA_EXT_ZVFHMIN, | ||
| 167 | 	KVM_RISCV_ISA_EXT_ZFA, | ||
| 168 | 	KVM_RISCV_ISA_EXT_ZTSO, | ||
| 169 | 	KVM_RISCV_ISA_EXT_ZACAS, | ||
| 170 | 	KVM_RISCV_ISA_EXT_SSCOFPMF, | ||
| 108 | 	KVM_RISCV_ISA_EXT_MAX, | 171 | 	KVM_RISCV_ISA_EXT_MAX, |
| 109 | }; | 172 | }; |
| 110 | 173 | ||
| 174 | /* | ||
| 175 | * SBI extension IDs specific to KVM. This is not the same as the SBI | ||
| 176 | * extension IDs defined by the RISC-V SBI specification. | ||
| 177 | */ | ||
| 178 | enum KVM_RISCV_SBI_EXT_ID { | ||
| 179 | 	KVM_RISCV_SBI_EXT_V01 = 0, | ||
| 180 | 	KVM_RISCV_SBI_EXT_TIME, | ||
| 181 | 	KVM_RISCV_SBI_EXT_IPI, | ||
| 182 | 	KVM_RISCV_SBI_EXT_RFENCE, | ||
| 183 | 	KVM_RISCV_SBI_EXT_SRST, | ||
| 184 | 	KVM_RISCV_SBI_EXT_HSM, | ||
| 185 | 	KVM_RISCV_SBI_EXT_PMU, | ||
| 186 | 	KVM_RISCV_SBI_EXT_EXPERIMENTAL, | ||
| 187 | 	KVM_RISCV_SBI_EXT_VENDOR, | ||
| 188 | 	KVM_RISCV_SBI_EXT_DBCN, | ||
| 189 | 	KVM_RISCV_SBI_EXT_STA, | ||
| 190 | 	KVM_RISCV_SBI_EXT_MAX, | ||
| 191 | }; | ||
| 192 | |||
| 193 | /* SBI STA extension registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ | ||
| 194 | struct kvm_riscv_sbi_sta { | ||
| 195 | 	unsigned long shmem_lo; | ||
| 196 | 	unsigned long shmem_hi; | ||
| 197 | }; | ||
| 198 | |||
| 111 | /* Possible states for kvm_riscv_timer */ | 199 | /* Possible states for kvm_riscv_timer */ |
| 112 | #define KVM_RISCV_TIMER_STATE_OFF	0 | 200 | #define KVM_RISCV_TIMER_STATE_OFF	0 |
| 113 | #define KVM_RISCV_TIMER_STATE_ON	1 | 201 | #define KVM_RISCV_TIMER_STATE_ON	1 |
| ... | @@ -118,6 +206,8 @@ enum KVM_RISCV_ISA_EXT_ID { | ... | @@ -118,6 +206,8 @@ enum KVM_RISCV_ISA_EXT_ID { |
| 118 | /* If you need to interpret the index values, here is the key: */ | 206 | /* If you need to interpret the index values, here is the key: */ |
| 119 | #define KVM_REG_RISCV_TYPE_MASK		0x00000000FF000000 | 207 | #define KVM_REG_RISCV_TYPE_MASK		0x00000000FF000000 |
| 120 | #define KVM_REG_RISCV_TYPE_SHIFT	24 | 208 | #define KVM_REG_RISCV_TYPE_SHIFT	24 |
| 209 | #define KVM_REG_RISCV_SUBTYPE_MASK	0x0000000000FF0000 | ||
| 210 | #define KVM_REG_RISCV_SUBTYPE_SHIFT	16 | ||
| 121 | 211 | ||
| 122 | /* Config registers are mapped as type 1 */ | 212 | /* Config registers are mapped as type 1 */ |
| 123 | #define KVM_REG_RISCV_CONFIG		(0x01 << KVM_REG_RISCV_TYPE_SHIFT) | 213 | #define KVM_REG_RISCV_CONFIG		(0x01 << KVM_REG_RISCV_TYPE_SHIFT) |
| ... | @@ -131,8 +221,15 @@ enum KVM_RISCV_ISA_EXT_ID { | ... | @@ -131,8 +221,15 @@ enum KVM_RISCV_ISA_EXT_ID { |
| 131 | 221 | ||
| 132 | /* Control and status registers are mapped as type 3 */ | 222 | /* Control and status registers are mapped as type 3 */ |
| 133 | #define KVM_REG_RISCV_CSR		(0x03 << KVM_REG_RISCV_TYPE_SHIFT) | 223 | #define KVM_REG_RISCV_CSR		(0x03 << KVM_REG_RISCV_TYPE_SHIFT) |
| 224 | #define KVM_REG_RISCV_CSR_GENERAL	(0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 225 | #define KVM_REG_RISCV_CSR_AIA		(0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 226 | #define KVM_REG_RISCV_CSR_SMSTATEEN	(0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 134 | #define KVM_REG_RISCV_CSR_REG(name)	\ | 227 | #define KVM_REG_RISCV_CSR_REG(name)	\ |
| 135 | 		(offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long)) | 228 | 		(offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long)) |
| 229 | #define KVM_REG_RISCV_CSR_AIA_REG(name)	\ | ||
| 230 | 	(offsetof(struct kvm_riscv_aia_csr, name) / sizeof(unsigned long)) | ||
| 231 | #define KVM_REG_RISCV_CSR_SMSTATEEN_REG(name) \ | ||
| 232 | 	(offsetof(struct kvm_riscv_smstateen_csr, name) / sizeof(unsigned long)) | ||
| 136 | 233 | ||
| 137 | /* Timer registers are mapped as type 4 */ | 234 | /* Timer registers are mapped as type 4 */ |
| 138 | #define KVM_REG_RISCV_TIMER		(0x04 << KVM_REG_RISCV_TYPE_SHIFT) | 235 | #define KVM_REG_RISCV_TIMER		(0x04 << KVM_REG_RISCV_TYPE_SHIFT) |
| ... | @@ -151,6 +248,111 @@ enum KVM_RISCV_ISA_EXT_ID { | ... | @@ -151,6 +248,111 @@ enum KVM_RISCV_ISA_EXT_ID { |
| 151 | 248 | ||
| 152 | /* ISA Extension registers are mapped as type 7 */ | 249 | /* ISA Extension registers are mapped as type 7 */ |
| 153 | #define KVM_REG_RISCV_ISA_EXT		(0x07 << KVM_REG_RISCV_TYPE_SHIFT) | 250 | #define KVM_REG_RISCV_ISA_EXT		(0x07 << KVM_REG_RISCV_TYPE_SHIFT) |
| 251 | #define KVM_REG_RISCV_ISA_SINGLE	(0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 252 | #define KVM_REG_RISCV_ISA_MULTI_EN	(0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 253 | #define KVM_REG_RISCV_ISA_MULTI_DIS	(0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 254 | #define KVM_REG_RISCV_ISA_MULTI_REG(__ext_id)	\ | ||
| 255 | 		((__ext_id) / __BITS_PER_LONG) | ||
| 256 | #define KVM_REG_RISCV_ISA_MULTI_MASK(__ext_id)	\ | ||
| 257 | 		(1UL << ((__ext_id) % __BITS_PER_LONG)) | ||
| 258 | #define KVM_REG_RISCV_ISA_MULTI_REG_LAST	\ | ||
| 259 | 		KVM_REG_RISCV_ISA_MULTI_REG(KVM_RISCV_ISA_EXT_MAX - 1) | ||
| 260 | |||
| 261 | /* SBI extension registers are mapped as type 8 */ | ||
| 262 | #define KVM_REG_RISCV_SBI_EXT		(0x08 << KVM_REG_RISCV_TYPE_SHIFT) | ||
| 263 | #define KVM_REG_RISCV_SBI_SINGLE	(0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 264 | #define KVM_REG_RISCV_SBI_MULTI_EN	(0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 265 | #define KVM_REG_RISCV_SBI_MULTI_DIS	(0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 266 | #define KVM_REG_RISCV_SBI_MULTI_REG(__ext_id)	\ | ||
| 267 | 		((__ext_id) / __BITS_PER_LONG) | ||
| 268 | #define KVM_REG_RISCV_SBI_MULTI_MASK(__ext_id)	\ | ||
| 269 | 		(1UL << ((__ext_id) % __BITS_PER_LONG)) | ||
| 270 | #define KVM_REG_RISCV_SBI_MULTI_REG_LAST	\ | ||
| 271 | 		KVM_REG_RISCV_SBI_MULTI_REG(KVM_RISCV_SBI_EXT_MAX - 1) | ||
| 272 | |||
| 273 | /* V extension registers are mapped as type 9 */ | ||
| 274 | #define KVM_REG_RISCV_VECTOR		(0x09 << KVM_REG_RISCV_TYPE_SHIFT) | ||
| 275 | #define KVM_REG_RISCV_VECTOR_CSR_REG(name)	\ | ||
| 276 | 		(offsetof(struct __riscv_v_ext_state, name) / sizeof(unsigned long)) | ||
| 277 | #define KVM_REG_RISCV_VECTOR_REG(n)	\ | ||
| 278 | 		((n) + sizeof(struct __riscv_v_ext_state) / sizeof(unsigned long)) | ||
| 279 | |||
| 280 | /* Registers for specific SBI extensions are mapped as type 10 */ | ||
| 281 | #define KVM_REG_RISCV_SBI_STATE		(0x0a << KVM_REG_RISCV_TYPE_SHIFT) | ||
| 282 | #define KVM_REG_RISCV_SBI_STA		(0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT) | ||
| 283 | #define KVM_REG_RISCV_SBI_STA_REG(name)		\ | ||
| 284 | 		(offsetof(struct kvm_riscv_sbi_sta, name) / sizeof(unsigned long)) | ||
| 285 | |||
| 286 | /* Device Control API: RISC-V AIA */ | ||
| 287 | #define KVM_DEV_RISCV_APLIC_ALIGN		0x1000 | ||
| 288 | #define KVM_DEV_RISCV_APLIC_SIZE		0x4000 | ||
| 289 | #define KVM_DEV_RISCV_APLIC_MAX_HARTS		0x4000 | ||
| 290 | #define KVM_DEV_RISCV_IMSIC_ALIGN		0x1000 | ||
| 291 | #define KVM_DEV_RISCV_IMSIC_SIZE		0x1000 | ||
| 292 | |||
| 293 | #define KVM_DEV_RISCV_AIA_GRP_CONFIG		0 | ||
| 294 | #define KVM_DEV_RISCV_AIA_CONFIG_MODE		0 | ||
| 295 | #define KVM_DEV_RISCV_AIA_CONFIG_IDS		1 | ||
| 296 | #define KVM_DEV_RISCV_AIA_CONFIG_SRCS		2 | ||
| 297 | #define KVM_DEV_RISCV_AIA_CONFIG_GROUP_BITS	3 | ||
| 298 | #define KVM_DEV_RISCV_AIA_CONFIG_GROUP_SHIFT	4 | ||
| 299 | #define KVM_DEV_RISCV_AIA_CONFIG_HART_BITS	5 | ||
| 300 | #define KVM_DEV_RISCV_AIA_CONFIG_GUEST_BITS	6 | ||
| 301 | |||
| 302 | /* | ||
| 303 | * Modes of RISC-V AIA device: | ||
| 304 | * 1) EMUL (aka Emulation): Trap-n-emulate IMSIC | ||
| 305 | * 2) HWACCEL (aka HW Acceleration): Virtualize IMSIC using IMSIC guest files | ||
| 306 | * 3) AUTO (aka Automatic): Virtualize IMSIC using IMSIC guest files whenever | ||
| 307 | * available otherwise fallback to trap-n-emulation | ||
| 308 | */ | ||
| 309 | #define KVM_DEV_RISCV_AIA_MODE_EMUL		0 | ||
| 310 | #define KVM_DEV_RISCV_AIA_MODE_HWACCEL		1 | ||
| 311 | #define KVM_DEV_RISCV_AIA_MODE_AUTO		2 | ||
| 312 | |||
| 313 | #define KVM_DEV_RISCV_AIA_IDS_MIN		63 | ||
| 314 | #define KVM_DEV_RISCV_AIA_IDS_MAX		2048 | ||
| 315 | #define KVM_DEV_RISCV_AIA_SRCS_MAX		1024 | ||
| 316 | #define KVM_DEV_RISCV_AIA_GROUP_BITS_MAX	8 | ||
| 317 | #define KVM_DEV_RISCV_AIA_GROUP_SHIFT_MIN	24 | ||
| 318 | #define KVM_DEV_RISCV_AIA_GROUP_SHIFT_MAX	56 | ||
| 319 | #define KVM_DEV_RISCV_AIA_HART_BITS_MAX		16 | ||
| 320 | #define KVM_DEV_RISCV_AIA_GUEST_BITS_MAX	8 | ||
| 321 | |||
| 322 | #define KVM_DEV_RISCV_AIA_GRP_ADDR		1 | ||
| 323 | #define KVM_DEV_RISCV_AIA_ADDR_APLIC		0 | ||
| 324 | #define KVM_DEV_RISCV_AIA_ADDR_IMSIC(__vcpu)	(1 + (__vcpu)) | ||
| 325 | #define KVM_DEV_RISCV_AIA_ADDR_MAX		\ | ||
| 326 | 		(1 + KVM_DEV_RISCV_APLIC_MAX_HARTS) | ||
| 327 | |||
| 328 | #define KVM_DEV_RISCV_AIA_GRP_CTRL		2 | ||
| 329 | #define KVM_DEV_RISCV_AIA_CTRL_INIT		0 | ||
| 330 | |||
| 331 | /* | ||
| 332 | * The device attribute type contains the memory mapped offset of the | ||
| 333 | * APLIC register (range 0x0000-0x3FFF) and it must be 4-byte aligned. | ||
| 334 | */ | ||
| 335 | #define KVM_DEV_RISCV_AIA_GRP_APLIC		3 | ||
| 336 | |||
| 337 | /* | ||
| 338 | * The lower 12-bits of the device attribute type contains the iselect | ||
| 339 | * value of the IMSIC register (range 0x70-0xFF) whereas the higher order | ||
| 340 | * bits contains the VCPU id. | ||
| 341 | */ | ||
| 342 | #define KVM_DEV_RISCV_AIA_GRP_IMSIC		4 | ||
| 343 | #define KVM_DEV_RISCV_AIA_IMSIC_ISEL_BITS	12 | ||
| 344 | #define KVM_DEV_RISCV_AIA_IMSIC_ISEL_MASK	\ | ||
| 345 | 		((1U << KVM_DEV_RISCV_AIA_IMSIC_ISEL_BITS) - 1) | ||
| 346 | #define KVM_DEV_RISCV_AIA_IMSIC_MKATTR(__vcpu, __isel)	\ | ||
| 347 | 		(((__vcpu) << KVM_DEV_RISCV_AIA_IMSIC_ISEL_BITS) | \ | ||
| 348 | 		 ((__isel) & KVM_DEV_RISCV_AIA_IMSIC_ISEL_MASK)) | ||
| 349 | #define KVM_DEV_RISCV_AIA_IMSIC_GET_ISEL(__attr)	\ | ||
| 350 | 		((__attr) & KVM_DEV_RISCV_AIA_IMSIC_ISEL_MASK) | ||
| 351 | #define KVM_DEV_RISCV_AIA_IMSIC_GET_VCPU(__attr)	\ | ||
| 352 | 		((__attr) >> KVM_DEV_RISCV_AIA_IMSIC_ISEL_BITS) | ||
| 353 | |||
| 354 | /* One single KVM irqchip, ie. the AIA */ | ||
| 355 | #define KVM_NR_IRQCHIPS			1 | ||
| 154 | 356 | ||
| 155 | #endif | 357 | #endif |
| 156 | 358 |
lib/libc/include/riscv-linux-any/asm/ptrace.h+50| ... | @@ -10,6 +10,11 @@ | ... | @@ -10,6 +10,11 @@ |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | 12 | ||
| 13 | #define PTRACE_GETFDPIC		33 | ||
| 14 | |||
| 15 | #define PTRACE_GETFDPIC_EXEC	0 | ||
| 16 | #define PTRACE_GETFDPIC_INTERP	1 | ||
| 17 | |||
| 13 | /* | 18 | /* |
| 14 | * User-mode register state for core dumps, ptrace, sigcontext | 19 | * User-mode register state for core dumps, ptrace, sigcontext |
| 15 | * | 20 | * |
| ... | @@ -71,12 +76,57 @@ struct __riscv_q_ext_state { | ... | @@ -71,12 +76,57 @@ struct __riscv_q_ext_state { |
| 71 | 	__u32 reserved[3]; | 76 | 	__u32 reserved[3]; |
| 72 | }; | 77 | }; |
| 73 | 78 | ||
| 79 | struct __riscv_ctx_hdr { | ||
| 80 | 	__u32 magic; | ||
| 81 | 	__u32 size; | ||
| 82 | }; | ||
| 83 | |||
| 84 | struct __riscv_extra_ext_header { | ||
| 85 | 	__u32 __padding[129] __attribute__((aligned(16))); | ||
| 86 | 	/* | ||
| 87 | 	 * Reserved for expansion of sigcontext structure. Currently zeroed | ||
| 88 | 	 * upon signal, and must be zero upon sigreturn. | ||
| 89 | 	 */ | ||
| 90 | 	__u32 reserved; | ||
| 91 | 	struct __riscv_ctx_hdr hdr; | ||
| 92 | }; | ||
| 93 | |||
| 74 | union __riscv_fp_state { | 94 | union __riscv_fp_state { |
| 75 | 	struct __riscv_f_ext_state f; | 95 | 	struct __riscv_f_ext_state f; |
| 76 | 	struct __riscv_d_ext_state d; | 96 | 	struct __riscv_d_ext_state d; |
| 77 | 	struct __riscv_q_ext_state q; | 97 | 	struct __riscv_q_ext_state q; |
| 78 | }; | 98 | }; |
| 79 | 99 | ||
| 100 | struct __riscv_v_ext_state { | ||
| 101 | 	unsigned long vstart; | ||
| 102 | 	unsigned long vl; | ||
| 103 | 	unsigned long vtype; | ||
| 104 | 	unsigned long vcsr; | ||
| 105 | 	unsigned long vlenb; | ||
| 106 | 	void *datap; | ||
| 107 | 	/* | ||
| 108 | 	 * In signal handler, datap will be set a correct user stack offset | ||
| 109 | 	 * and vector registers will be copied to the address of datap | ||
| 110 | 	 * pointer. | ||
| 111 | 	 */ | ||
| 112 | }; | ||
| 113 | |||
| 114 | struct __riscv_v_regset_state { | ||
| 115 | 	unsigned long vstart; | ||
| 116 | 	unsigned long vl; | ||
| 117 | 	unsigned long vtype; | ||
| 118 | 	unsigned long vcsr; | ||
| 119 | 	unsigned long vlenb; | ||
| 120 | 	char vreg[]; | ||
| 121 | }; | ||
| 122 | |||
| 123 | /* | ||
| 124 | * According to spec: The number of bits in a single vector register, | ||
| 125 | * VLEN >= ELEN, which must be a power of 2, and must be no greater than | ||
| 126 | * 2^16 = 65536bits = 8192bytes | ||
| 127 | */ | ||
| 128 | #define RISCV_MAX_VLENB (8192) | ||
| 129 | |||
| 80 | #endif /* __ASSEMBLY__ */ | 130 | #endif /* __ASSEMBLY__ */ |
| 81 | 131 | ||
| 82 | #endif /* _ASM_RISCV_PTRACE_H */ | 132 | #endif /* _ASM_RISCV_PTRACE_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/sigcontext.h+20-2| ... | @@ -8,15 +8,33 @@ | ... | @@ -8,15 +8,33 @@ |
| 8 | 8 | ||
| 9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
| 10 | 10 | ||
| 11 | /* The Magic number for signal context frame header. */ | ||
| 12 | #define RISCV_V_MAGIC	0x53465457 | ||
| 13 | #define END_MAGIC	0x0 | ||
| 14 | |||
| 15 | /* The size of END signal context header. */ | ||
| 16 | #define END_HDR_SIZE	0x0 | ||
| 17 | |||
| 18 | #ifndef __ASSEMBLY__ | ||
| 19 | |||
| 20 | struct __sc_riscv_v_state { | ||
| 21 | 	struct __riscv_v_ext_state v_state; | ||
| 22 | } __attribute__((aligned(16))); | ||
| 23 | |||
| 11 | /* | 24 | /* |
| 12 | * Signal context structure | 25 | * Signal context structure |
| 13 | * | 26 | * |
| 14 | * This contains the context saved before a signal handler is invoked; | 27 | * This contains the context saved before a signal handler is invoked; |
| 15 | * it is restored by sys_sigreturn / sys_rt_sigreturn. | 28 | * it is restored by sys_rt_sigreturn. |
| 16 | */ | 29 | */ |
| 17 | struct sigcontext { | 30 | struct sigcontext { |
| 18 | 	struct user_regs_struct sc_regs; | 31 | 	struct user_regs_struct sc_regs; |
| 19 | 	union __riscv_fp_state sc_fpregs; | 32 | 	union { |
| 33 | 		union __riscv_fp_state sc_fpregs; | ||
| 34 | 		struct __riscv_extra_ext_header sc_extdesc; | ||
| 35 | 	}; | ||
| 20 | }; | 36 | }; |
| 21 | 37 | ||
| 38 | #endif /*!__ASSEMBLY__*/ | ||
| 39 | |||
| 22 | #endif /* _ASM_RISCV_SIGCONTEXT_H */ | 40 | #endif /* _ASM_RISCV_SIGCONTEXT_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/unistd.h+10-1| ... | @@ -42,4 +42,13 @@ | ... | @@ -42,4 +42,13 @@ |
| 42 | #ifndef __NR_riscv_flush_icache | 42 | #ifndef __NR_riscv_flush_icache |
| 43 | #define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15) | 43 | #define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15) |
| 44 | #endif | 44 | #endif |
| 45 | __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache) | ||
| \ No newline at end of file | |||
| 45 | __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache) | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Allows userspace to query the kernel for CPU architecture and | ||
| 49 | * microarchitecture details across a given set of CPUs. | ||
| 50 | */ | ||
| 51 | #ifndef __NR_riscv_hwprobe | ||
| 52 | #define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14) | ||
| 53 | #endif | ||
| 54 | __SYSCALL(__NR_riscv_hwprobe, sys_riscv_hwprobe) | ||
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/cmb.h+1-1| ... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
| 31 | struct cmbdata { | 31 | struct cmbdata { |
| 32 | 	__u64 size; | 32 | 	__u64 size; |
| 33 | 	__u64 elapsed_time; | 33 | 	__u64 elapsed_time; |
| 34 | /* basic and exended format: */ | 34 | /* basic and extended format: */ |
| 35 | 	__u64 ssch_rsch_count; | 35 | 	__u64 ssch_rsch_count; |
| 36 | 	__u64 sample_count; | 36 | 	__u64 sample_count; |
| 37 | 	__u64 device_connect_time; | 37 | 	__u64 device_connect_time; |
lib/libc/include/s390x-linux-any/asm/dasd.h+3-1| ... | @@ -24,7 +24,7 @@ | ... | @@ -24,7 +24,7 @@ |
| 24 | /* | 24 | /* |
| 25 | * struct dasd_information2_t | 25 | * struct dasd_information2_t |
| 26 | * represents any data about the device, which is visible to userspace. | 26 | * represents any data about the device, which is visible to userspace. |
| 27 | * including foramt and featueres. | 27 | * including format and featueres. |
| 28 | */ | 28 | */ |
| 29 | typedef struct dasd_information2_t { | 29 | typedef struct dasd_information2_t { |
| 30 | 	unsigned int devno;	 /* S/390 devno */ | 30 | 	unsigned int devno;	 /* S/390 devno */ |
| ... | @@ -78,6 +78,7 @@ typedef struct dasd_information2_t { | ... | @@ -78,6 +78,7 @@ typedef struct dasd_information2_t { |
| 78 | * 0x040: give access to raw eckd data | 78 | * 0x040: give access to raw eckd data |
| 79 | * 0x080: enable discard support | 79 | * 0x080: enable discard support |
| 80 | * 0x100: enable autodisable for IFCC errors (default) | 80 | * 0x100: enable autodisable for IFCC errors (default) |
| 81 | * 0x200: enable requeue of all requests on autoquiesce | ||
| 81 | */ | 82 | */ |
| 82 | #define DASD_FEATURE_READONLY	 0x001 | 83 | #define DASD_FEATURE_READONLY	 0x001 |
| 83 | #define DASD_FEATURE_USEDIAG	 0x002 | 84 | #define DASD_FEATURE_USEDIAG	 0x002 |
| ... | @@ -88,6 +89,7 @@ typedef struct dasd_information2_t { | ... | @@ -88,6 +89,7 @@ typedef struct dasd_information2_t { |
| 88 | #define DASD_FEATURE_USERAW	 0x040 | 89 | #define DASD_FEATURE_USERAW	 0x040 |
| 89 | #define DASD_FEATURE_DISCARD	 0x080 | 90 | #define DASD_FEATURE_DISCARD	 0x080 |
| 90 | #define DASD_FEATURE_PATH_AUTODISABLE 0x100 | 91 | #define DASD_FEATURE_PATH_AUTODISABLE 0x100 |
| 92 | #define DASD_FEATURE_REQUEUEQUIESCE 0x200 | ||
| 91 | #define DASD_FEATURE_DEFAULT	 DASD_FEATURE_PATH_AUTODISABLE | 93 | #define DASD_FEATURE_DEFAULT	 DASD_FEATURE_PATH_AUTODISABLE |
| 92 | 94 | ||
| 93 | #define DASD_PARTN_BITS 2 | 95 | #define DASD_PARTN_BITS 2 |
lib/libc/include/s390x-linux-any/asm/kvm.h+330-1| ... | @@ -12,7 +12,320 @@ | ... | @@ -12,7 +12,320 @@ |
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | 13 | ||
| 14 | #define __KVM_S390 | 14 | #define __KVM_S390 |
| 15 | #define __KVM_HAVE_GUEST_DEBUG | 15 | |
| 16 | struct kvm_s390_skeys { | ||
| 17 | 	__u64 start_gfn; | ||
| 18 | 	__u64 count; | ||
| 19 | 	__u64 skeydata_addr; | ||
| 20 | 	__u32 flags; | ||
| 21 | 	__u32 reserved[9]; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #define KVM_S390_CMMA_PEEK (1 << 0) | ||
| 25 | |||
| 26 | /** | ||
| 27 | * kvm_s390_cmma_log - Used for CMMA migration. | ||
| 28 | * | ||
| 29 | * Used both for input and output. | ||
| 30 | * | ||
| 31 | * @start_gfn: Guest page number to start from. | ||
| 32 | * @count: Size of the result buffer. | ||
| 33 | * @flags: Control operation mode via KVM_S390_CMMA_* flags | ||
| 34 | * @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty | ||
| 35 | * pages are still remaining. | ||
| 36 | * @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set | ||
| 37 | * in the PGSTE. | ||
| 38 | * @values: Pointer to the values buffer. | ||
| 39 | * | ||
| 40 | * Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls. | ||
| 41 | */ | ||
| 42 | struct kvm_s390_cmma_log { | ||
| 43 | 	__u64 start_gfn; | ||
| 44 | 	__u32 count; | ||
| 45 | 	__u32 flags; | ||
| 46 | 	union { | ||
| 47 | 		__u64 remaining; | ||
| 48 | 		__u64 mask; | ||
| 49 | 	}; | ||
| 50 | 	__u64 values; | ||
| 51 | }; | ||
| 52 | |||
| 53 | #define KVM_S390_RESET_POR 1 | ||
| 54 | #define KVM_S390_RESET_CLEAR 2 | ||
| 55 | #define KVM_S390_RESET_SUBSYSTEM 4 | ||
| 56 | #define KVM_S390_RESET_CPU_INIT 8 | ||
| 57 | #define KVM_S390_RESET_IPL 16 | ||
| 58 | |||
| 59 | /* for KVM_S390_MEM_OP */ | ||
| 60 | struct kvm_s390_mem_op { | ||
| 61 | 	/* in */ | ||
| 62 | 	__u64 gaddr;		/* the guest address */ | ||
| 63 | 	__u64 flags;		/* flags */ | ||
| 64 | 	__u32 size;		/* amount of bytes */ | ||
| 65 | 	__u32 op;		/* type of operation */ | ||
| 66 | 	__u64 buf;		/* buffer in userspace */ | ||
| 67 | 	union { | ||
| 68 | 		struct { | ||
| 69 | 			__u8 ar;	/* the access register number */ | ||
| 70 | 			__u8 key;	/* access key, ignored if flag unset */ | ||
| 71 | 			__u8 pad1[6];	/* ignored */ | ||
| 72 | 			__u64 old_addr;	/* ignored if cmpxchg flag unset */ | ||
| 73 | 		}; | ||
| 74 | 		__u32 sida_offset; /* offset into the sida */ | ||
| 75 | 		__u8 reserved[32]; /* ignored */ | ||
| 76 | 	}; | ||
| 77 | }; | ||
| 78 | /* types for kvm_s390_mem_op->op */ | ||
| 79 | #define KVM_S390_MEMOP_LOGICAL_READ	0 | ||
| 80 | #define KVM_S390_MEMOP_LOGICAL_WRITE	1 | ||
| 81 | #define KVM_S390_MEMOP_SIDA_READ	2 | ||
| 82 | #define KVM_S390_MEMOP_SIDA_WRITE	3 | ||
| 83 | #define KVM_S390_MEMOP_ABSOLUTE_READ	4 | ||
| 84 | #define KVM_S390_MEMOP_ABSOLUTE_WRITE	5 | ||
| 85 | #define KVM_S390_MEMOP_ABSOLUTE_CMPXCHG	6 | ||
| 86 | |||
| 87 | /* flags for kvm_s390_mem_op->flags */ | ||
| 88 | #define KVM_S390_MEMOP_F_CHECK_ONLY		(1ULL << 0) | ||
| 89 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION	(1ULL << 1) | ||
| 90 | #define KVM_S390_MEMOP_F_SKEY_PROTECTION	(1ULL << 2) | ||
| 91 | |||
| 92 | /* flags specifying extension support via KVM_CAP_S390_MEM_OP_EXTENSION */ | ||
| 93 | #define KVM_S390_MEMOP_EXTENSION_CAP_BASE	(1 << 0) | ||
| 94 | #define KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG	(1 << 1) | ||
| 95 | |||
| 96 | struct kvm_s390_psw { | ||
| 97 | 	__u64 mask; | ||
| 98 | 	__u64 addr; | ||
| 99 | }; | ||
| 100 | |||
| 101 | /* valid values for type in kvm_s390_interrupt */ | ||
| 102 | #define KVM_S390_SIGP_STOP		0xfffe0000u | ||
| 103 | #define KVM_S390_PROGRAM_INT		0xfffe0001u | ||
| 104 | #define KVM_S390_SIGP_SET_PREFIX	0xfffe0002u | ||
| 105 | #define KVM_S390_RESTART		0xfffe0003u | ||
| 106 | #define KVM_S390_INT_PFAULT_INIT	0xfffe0004u | ||
| 107 | #define KVM_S390_INT_PFAULT_DONE	0xfffe0005u | ||
| 108 | #define KVM_S390_MCHK			0xfffe1000u | ||
| 109 | #define KVM_S390_INT_CLOCK_COMP		0xffff1004u | ||
| 110 | #define KVM_S390_INT_CPU_TIMER		0xffff1005u | ||
| 111 | #define KVM_S390_INT_VIRTIO		0xffff2603u | ||
| 112 | #define KVM_S390_INT_SERVICE		0xffff2401u | ||
| 113 | #define KVM_S390_INT_EMERGENCY		0xffff1201u | ||
| 114 | #define KVM_S390_INT_EXTERNAL_CALL	0xffff1202u | ||
| 115 | /* Anything below 0xfffe0000u is taken by INT_IO */ | ||
| 116 | #define KVM_S390_INT_IO(ai,cssid,ssid,schid) \ | ||
| 117 | 	(((schid)) |			 \ | ||
| 118 | 	 ((ssid) << 16) |		 \ | ||
| 119 | 	 ((cssid) << 18) |		 \ | ||
| 120 | 	 ((ai) << 26)) | ||
| 121 | #define KVM_S390_INT_IO_MIN		0x00000000u | ||
| 122 | #define KVM_S390_INT_IO_MAX		0xfffdffffu | ||
| 123 | #define KVM_S390_INT_IO_AI_MASK		0x04000000u | ||
| 124 | |||
| 125 | |||
| 126 | struct kvm_s390_interrupt { | ||
| 127 | 	__u32 type; | ||
| 128 | 	__u32 parm; | ||
| 129 | 	__u64 parm64; | ||
| 130 | }; | ||
| 131 | |||
| 132 | struct kvm_s390_io_info { | ||
| 133 | 	__u16 subchannel_id; | ||
| 134 | 	__u16 subchannel_nr; | ||
| 135 | 	__u32 io_int_parm; | ||
| 136 | 	__u32 io_int_word; | ||
| 137 | }; | ||
| 138 | |||
| 139 | struct kvm_s390_ext_info { | ||
| 140 | 	__u32 ext_params; | ||
| 141 | 	__u32 pad; | ||
| 142 | 	__u64 ext_params2; | ||
| 143 | }; | ||
| 144 | |||
| 145 | struct kvm_s390_pgm_info { | ||
| 146 | 	__u64 trans_exc_code; | ||
| 147 | 	__u64 mon_code; | ||
| 148 | 	__u64 per_address; | ||
| 149 | 	__u32 data_exc_code; | ||
| 150 | 	__u16 code; | ||
| 151 | 	__u16 mon_class_nr; | ||
| 152 | 	__u8 per_code; | ||
| 153 | 	__u8 per_atmid; | ||
| 154 | 	__u8 exc_access_id; | ||
| 155 | 	__u8 per_access_id; | ||
| 156 | 	__u8 op_access_id; | ||
| 157 | #define KVM_S390_PGM_FLAGS_ILC_VALID	0x01 | ||
| 158 | #define KVM_S390_PGM_FLAGS_ILC_0	0x02 | ||
| 159 | #define KVM_S390_PGM_FLAGS_ILC_1	0x04 | ||
| 160 | #define KVM_S390_PGM_FLAGS_ILC_MASK	0x06 | ||
| 161 | #define KVM_S390_PGM_FLAGS_NO_REWIND	0x08 | ||
| 162 | 	__u8 flags; | ||
| 163 | 	__u8 pad[2]; | ||
| 164 | }; | ||
| 165 | |||
| 166 | struct kvm_s390_prefix_info { | ||
| 167 | 	__u32 address; | ||
| 168 | }; | ||
| 169 | |||
| 170 | struct kvm_s390_extcall_info { | ||
| 171 | 	__u16 code; | ||
| 172 | }; | ||
| 173 | |||
| 174 | struct kvm_s390_emerg_info { | ||
| 175 | 	__u16 code; | ||
| 176 | }; | ||
| 177 | |||
| 178 | #define KVM_S390_STOP_FLAG_STORE_STATUS	0x01 | ||
| 179 | struct kvm_s390_stop_info { | ||
| 180 | 	__u32 flags; | ||
| 181 | }; | ||
| 182 | |||
| 183 | struct kvm_s390_mchk_info { | ||
| 184 | 	__u64 cr14; | ||
| 185 | 	__u64 mcic; | ||
| 186 | 	__u64 failing_storage_address; | ||
| 187 | 	__u32 ext_damage_code; | ||
| 188 | 	__u32 pad; | ||
| 189 | 	__u8 fixed_logout[16]; | ||
| 190 | }; | ||
| 191 | |||
| 192 | struct kvm_s390_irq { | ||
| 193 | 	__u64 type; | ||
| 194 | 	union { | ||
| 195 | 		struct kvm_s390_io_info io; | ||
| 196 | 		struct kvm_s390_ext_info ext; | ||
| 197 | 		struct kvm_s390_pgm_info pgm; | ||
| 198 | 		struct kvm_s390_emerg_info emerg; | ||
| 199 | 		struct kvm_s390_extcall_info extcall; | ||
| 200 | 		struct kvm_s390_prefix_info prefix; | ||
| 201 | 		struct kvm_s390_stop_info stop; | ||
| 202 | 		struct kvm_s390_mchk_info mchk; | ||
| 203 | 		char reserved[64]; | ||
| 204 | 	} u; | ||
| 205 | }; | ||
| 206 | |||
| 207 | struct kvm_s390_irq_state { | ||
| 208 | 	__u64 buf; | ||
| 209 | 	__u32 flags; /* will stay unused for compatibility reasons */ | ||
| 210 | 	__u32 len; | ||
| 211 | 	__u32 reserved[4]; /* will stay unused for compatibility reasons */ | ||
| 212 | }; | ||
| 213 | |||
| 214 | struct kvm_s390_ucas_mapping { | ||
| 215 | 	__u64 user_addr; | ||
| 216 | 	__u64 vcpu_addr; | ||
| 217 | 	__u64 length; | ||
| 218 | }; | ||
| 219 | |||
| 220 | struct kvm_s390_pv_sec_parm { | ||
| 221 | 	__u64 origin; | ||
| 222 | 	__u64 length; | ||
| 223 | }; | ||
| 224 | |||
| 225 | struct kvm_s390_pv_unp { | ||
| 226 | 	__u64 addr; | ||
| 227 | 	__u64 size; | ||
| 228 | 	__u64 tweak; | ||
| 229 | }; | ||
| 230 | |||
| 231 | enum pv_cmd_dmp_id { | ||
| 232 | 	KVM_PV_DUMP_INIT, | ||
| 233 | 	KVM_PV_DUMP_CONFIG_STOR_STATE, | ||
| 234 | 	KVM_PV_DUMP_COMPLETE, | ||
| 235 | 	KVM_PV_DUMP_CPU, | ||
| 236 | }; | ||
| 237 | |||
| 238 | struct kvm_s390_pv_dmp { | ||
| 239 | 	__u64 subcmd; | ||
| 240 | 	__u64 buff_addr; | ||
| 241 | 	__u64 buff_len; | ||
| 242 | 	__u64 gaddr;		/* For dump storage state */ | ||
| 243 | 	__u64 reserved[4]; | ||
| 244 | }; | ||
| 245 | |||
| 246 | enum pv_cmd_info_id { | ||
| 247 | 	KVM_PV_INFO_VM, | ||
| 248 | 	KVM_PV_INFO_DUMP, | ||
| 249 | }; | ||
| 250 | |||
| 251 | struct kvm_s390_pv_info_dump { | ||
| 252 | 	__u64 dump_cpu_buffer_len; | ||
| 253 | 	__u64 dump_config_mem_buffer_per_1m; | ||
| 254 | 	__u64 dump_config_finalize_len; | ||
| 255 | }; | ||
| 256 | |||
| 257 | struct kvm_s390_pv_info_vm { | ||
| 258 | 	__u64 inst_calls_list[4]; | ||
| 259 | 	__u64 max_cpus; | ||
| 260 | 	__u64 max_guests; | ||
| 261 | 	__u64 max_guest_addr; | ||
| 262 | 	__u64 feature_indication; | ||
| 263 | }; | ||
| 264 | |||
| 265 | struct kvm_s390_pv_info_header { | ||
| 266 | 	__u32 id; | ||
| 267 | 	__u32 len_max; | ||
| 268 | 	__u32 len_written; | ||
| 269 | 	__u32 reserved; | ||
| 270 | }; | ||
| 271 | |||
| 272 | struct kvm_s390_pv_info { | ||
| 273 | 	struct kvm_s390_pv_info_header header; | ||
| 274 | 	union { | ||
| 275 | 		struct kvm_s390_pv_info_dump dump; | ||
| 276 | 		struct kvm_s390_pv_info_vm vm; | ||
| 277 | 	}; | ||
| 278 | }; | ||
| 279 | |||
| 280 | enum pv_cmd_id { | ||
| 281 | 	KVM_PV_ENABLE, | ||
| 282 | 	KVM_PV_DISABLE, | ||
| 283 | 	KVM_PV_SET_SEC_PARMS, | ||
| 284 | 	KVM_PV_UNPACK, | ||
| 285 | 	KVM_PV_VERIFY, | ||
| 286 | 	KVM_PV_PREP_RESET, | ||
| 287 | 	KVM_PV_UNSHARE_ALL, | ||
| 288 | 	KVM_PV_INFO, | ||
| 289 | 	KVM_PV_DUMP, | ||
| 290 | 	KVM_PV_ASYNC_CLEANUP_PREPARE, | ||
| 291 | 	KVM_PV_ASYNC_CLEANUP_PERFORM, | ||
| 292 | }; | ||
| 293 | |||
| 294 | struct kvm_pv_cmd { | ||
| 295 | 	__u32 cmd;	/* Command to be executed */ | ||
| 296 | 	__u16 rc;	/* Ultravisor return code */ | ||
| 297 | 	__u16 rrc;	/* Ultravisor return reason code */ | ||
| 298 | 	__u64 data;	/* Data or address */ | ||
| 299 | 	__u32 flags; /* flags for future extensions. Must be 0 for now */ | ||
| 300 | 	__u32 reserved[3]; | ||
| 301 | }; | ||
| 302 | |||
| 303 | struct kvm_s390_zpci_op { | ||
| 304 | 	/* in */ | ||
| 305 | 	__u32 fh; /* target device */ | ||
| 306 | 	__u8 op; /* operation to perform */ | ||
| 307 | 	__u8 pad[3]; | ||
| 308 | 	union { | ||
| 309 | 		/* for KVM_S390_ZPCIOP_REG_AEN */ | ||
| 310 | 		struct { | ||
| 311 | 			__u64 ibv; /* Guest addr of interrupt bit vector */ | ||
| 312 | 			__u64 sb; /* Guest addr of summary bit */ | ||
| 313 | 			__u32 flags; | ||
| 314 | 			__u32 noi; /* Number of interrupts */ | ||
| 315 | 			__u8 isc; /* Guest interrupt subclass */ | ||
| 316 | 			__u8 sbo; /* Offset of guest summary bit vector */ | ||
| 317 | 			__u16 pad; | ||
| 318 | 		} reg_aen; | ||
| 319 | 		__u64 reserved[8]; | ||
| 320 | 	} u; | ||
| 321 | }; | ||
| 322 | |||
| 323 | /* types for kvm_s390_zpci_op->op */ | ||
| 324 | #define KVM_S390_ZPCIOP_REG_AEN 0 | ||
| 325 | #define KVM_S390_ZPCIOP_DEREG_AEN 1 | ||
| 326 | |||
| 327 | /* flags for kvm_s390_zpci_op->u.reg_aen.flags */ | ||
| 328 | #define KVM_S390_ZPCIOP_REGAEN_HOST (1 << 0) | ||
| 16 | 329 | ||
| 17 | /* Device control API: s390-specific devices */ | 330 | /* Device control API: s390-specific devices */ |
| 18 | #define KVM_DEV_FLIC_GET_ALL_IRQS	1 | 331 | #define KVM_DEV_FLIC_GET_ALL_IRQS	1 |
| ... | @@ -159,6 +472,22 @@ struct kvm_s390_vm_cpu_subfunc { | ... | @@ -159,6 +472,22 @@ struct kvm_s390_vm_cpu_subfunc { |
| 159 | 	__u8 reserved[1728]; | 472 | 	__u8 reserved[1728]; |
| 160 | }; | 473 | }; |
| 161 | 474 | ||
| 475 | #define KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST	6 | ||
| 476 | #define KVM_S390_VM_CPU_MACHINE_UV_FEAT_GUEST	7 | ||
| 477 | |||
| 478 | #define KVM_S390_VM_CPU_UV_FEAT_NR_BITS	64 | ||
| 479 | struct kvm_s390_vm_cpu_uv_feat { | ||
| 480 | 	union { | ||
| 481 | 		struct { | ||
| 482 | 			__u64 : 4; | ||
| 483 | 			__u64 ap : 1;		/* bit 4 */ | ||
| 484 | 			__u64 ap_intr : 1;	/* bit 5 */ | ||
| 485 | 			__u64 : 58; | ||
| 486 | 		}; | ||
| 487 | 		__u64 feat; | ||
| 488 | 	}; | ||
| 489 | }; | ||
| 490 | |||
| 162 | /* kvm attributes for crypto */ | 491 | /* kvm attributes for crypto */ |
| 163 | #define KVM_S390_VM_CRYPTO_ENABLE_AES_KW	0 | 492 | #define KVM_S390_VM_CRYPTO_ENABLE_AES_KW	0 |
| 164 | #define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW	1 | 493 | #define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW	1 |
lib/libc/include/s390x-linux-any/asm/pkey.h+14-9| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | /* | 2 | /* |
| 3 | * Userspace interface to the pkey device driver | 3 | * Userspace interface to the pkey device driver |
| 4 | * | 4 | * |
| 5 | * Copyright IBM Corp. 2017, 2019 | 5 | * Copyright IBM Corp. 2017, 2023 |
| 6 | * | 6 | * |
| 7 | * Author: Harald Freudenberger <freude@de.ibm.com> | 7 | * Author: Harald Freudenberger <freude@de.ibm.com> |
| 8 | * | 8 | * |
| ... | @@ -26,16 +26,21 @@ | ... | @@ -26,16 +26,21 @@ |
| 26 | #define MAXCLRKEYSIZE	32	 /* a clear key value may be up to 32 bytes */ | 26 | #define MAXCLRKEYSIZE	32	 /* a clear key value may be up to 32 bytes */ |
| 27 | #define MAXAESCIPHERKEYSIZE 136 /* our aes cipher keys have always 136 bytes */ | 27 | #define MAXAESCIPHERKEYSIZE 136 /* our aes cipher keys have always 136 bytes */ |
| 28 | #define MINEP11AESKEYBLOBSIZE 256 /* min EP11 AES key blob size */ | 28 | #define MINEP11AESKEYBLOBSIZE 256 /* min EP11 AES key blob size */ |
| 29 | #define MAXEP11AESKEYBLOBSIZE 320 /* max EP11 AES key blob size */ | 29 | #define MAXEP11AESKEYBLOBSIZE 336 /* max EP11 AES key blob size */ |
| 30 | 30 | ||
| 31 | /* Minimum size of a key blob */ | 31 | /* Minimum size of a key blob */ |
| 32 | #define MINKEYBLOBSIZE	SECKEYBLOBSIZE | 32 | #define MINKEYBLOBSIZE	SECKEYBLOBSIZE |
| 33 | 33 | ||
| 34 | /* defines for the type field within the pkey_protkey struct */ | 34 | /* defines for the type field within the pkey_protkey struct */ |
| 35 | #define PKEY_KEYTYPE_AES_128		 1 | 35 | #define PKEY_KEYTYPE_AES_128		1 |
| 36 | #define PKEY_KEYTYPE_AES_192		 2 | 36 | #define PKEY_KEYTYPE_AES_192		2 |
| 37 | #define PKEY_KEYTYPE_AES_256		 3 | 37 | #define PKEY_KEYTYPE_AES_256		3 |
| 38 | #define PKEY_KEYTYPE_ECC		 4 | 38 | #define PKEY_KEYTYPE_ECC		4 |
| 39 | #define PKEY_KEYTYPE_ECC_P256		5 | ||
| 40 | #define PKEY_KEYTYPE_ECC_P384		6 | ||
| 41 | #define PKEY_KEYTYPE_ECC_P521		7 | ||
| 42 | #define PKEY_KEYTYPE_ECC_ED25519	8 | ||
| 43 | #define PKEY_KEYTYPE_ECC_ED448		9 | ||
| 39 | 44 | ||
| 40 | /* the newer ioctls use a pkey_key_type enum for type information */ | 45 | /* the newer ioctls use a pkey_key_type enum for type information */ |
| 41 | enum pkey_key_type { | 46 | enum pkey_key_type { |
| ... | @@ -348,7 +353,7 @@ struct pkey_kblob2pkey2 { | ... | @@ -348,7 +353,7 @@ struct pkey_kblob2pkey2 { |
| 348 | * Is able to find out which type of secure key is given (CCA AES secure | 353 | * Is able to find out which type of secure key is given (CCA AES secure |
| 349 | * key, CCA AES cipher key, CCA ECC private key, EP11 AES key, EP11 ECC private | 354 | * key, CCA AES cipher key, CCA ECC private key, EP11 AES key, EP11 ECC private |
| 350 | * key) and tries to find all matching crypto cards based on the MKVP and maybe | 355 | * key) and tries to find all matching crypto cards based on the MKVP and maybe |
| 351 | * other criterias (like CCA AES cipher keys need a CEX5C or higher, EP11 keys | 356 | * other criteria (like CCA AES cipher keys need a CEX5C or higher, EP11 keys |
| 352 | * with BLOB_PKEY_EXTRACTABLE need a CEX7 and EP11 api version 4). The list of | 357 | * with BLOB_PKEY_EXTRACTABLE need a CEX7 and EP11 api version 4). The list of |
| 353 | * APQNs is further filtered by the key's mkvp which needs to match to either | 358 | * APQNs is further filtered by the key's mkvp which needs to match to either |
| 354 | * the current mkvp (CCA and EP11) or the alternate mkvp (old mkvp, CCA adapters | 359 | * the current mkvp (CCA and EP11) or the alternate mkvp (old mkvp, CCA adapters |
| ... | @@ -365,7 +370,7 @@ struct pkey_kblob2pkey2 { | ... | @@ -365,7 +370,7 @@ struct pkey_kblob2pkey2 { |
| 365 | * is empty (apqn_entries is 0) the apqn_entries field is updated to the number | 370 | * is empty (apqn_entries is 0) the apqn_entries field is updated to the number |
| 366 | * of apqn targets found and the ioctl returns with 0. If apqn_entries is > 0 | 371 | * of apqn targets found and the ioctl returns with 0. If apqn_entries is > 0 |
| 367 | * but the number of apqn targets does not fit into the list, the apqn_targets | 372 | * but the number of apqn targets does not fit into the list, the apqn_targets |
| 368 | * field is updatedd with the number of reqired entries but there are no apqn | 373 | * field is updated with the number of required entries but there are no apqn |
| 369 | * values stored in the list and the ioctl returns with ENOSPC. If no matching | 374 | * values stored in the list and the ioctl returns with ENOSPC. If no matching |
| 370 | * APQN is found, the ioctl returns with 0 but the apqn_entries value is 0. | 375 | * APQN is found, the ioctl returns with 0 but the apqn_entries value is 0. |
| 371 | */ | 376 | */ |
| ... | @@ -403,7 +408,7 @@ struct pkey_apqns4key { | ... | @@ -403,7 +408,7 @@ struct pkey_apqns4key { |
| 403 | * is empty (apqn_entries is 0) the apqn_entries field is updated to the number | 408 | * is empty (apqn_entries is 0) the apqn_entries field is updated to the number |
| 404 | * of apqn targets found and the ioctl returns with 0. If apqn_entries is > 0 | 409 | * of apqn targets found and the ioctl returns with 0. If apqn_entries is > 0 |
| 405 | * but the number of apqn targets does not fit into the list, the apqn_targets | 410 | * but the number of apqn targets does not fit into the list, the apqn_targets |
| 406 | * field is updatedd with the number of reqired entries but there are no apqn | 411 | * field is updated with the number of required entries but there are no apqn |
| 407 | * values stored in the list and the ioctl returns with ENOSPC. If no matching | 412 | * values stored in the list and the ioctl returns with ENOSPC. If no matching |
| 408 | * APQN is found, the ioctl returns with 0 but the apqn_entries value is 0. | 413 | * APQN is found, the ioctl returns with 0 but the apqn_entries value is 0. |
| 409 | */ | 414 | */ |
lib/libc/include/s390x-linux-any/asm/ptrace.h+60-63| ... | @@ -8,6 +8,8 @@ | ... | @@ -8,6 +8,8 @@ |
| 8 | #ifndef _S390_PTRACE_H | 8 | #ifndef _S390_PTRACE_H |
| 9 | #define _S390_PTRACE_H | 9 | #define _S390_PTRACE_H |
| 10 | 10 | ||
| 11 | #include <linux/const.h> | ||
| 12 | |||
| 11 | /* | 13 | /* |
| 12 | * Offsets in the user_regs_struct. They are used for the ptrace | 14 | * Offsets in the user_regs_struct. They are used for the ptrace |
| 13 | * system call and in entry.S | 15 | * system call and in entry.S |
| ... | @@ -166,6 +168,64 @@ | ... | @@ -166,6 +168,64 @@ |
| 166 | 168 | ||
| 167 | #endif /* __s390x__ */ | 169 | #endif /* __s390x__ */ |
| 168 | 170 | ||
| 171 | #ifndef __s390x__ | ||
| 172 | |||
| 173 | #define PSW_MASK_PER		_AC(0x40000000, UL) | ||
| 174 | #define PSW_MASK_DAT		_AC(0x04000000, UL) | ||
| 175 | #define PSW_MASK_IO		_AC(0x02000000, UL) | ||
| 176 | #define PSW_MASK_EXT		_AC(0x01000000, UL) | ||
| 177 | #define PSW_MASK_KEY		_AC(0x00F00000, UL) | ||
| 178 | #define PSW_MASK_BASE		_AC(0x00080000, UL)	/* always one */ | ||
| 179 | #define PSW_MASK_MCHECK		_AC(0x00040000, UL) | ||
| 180 | #define PSW_MASK_WAIT		_AC(0x00020000, UL) | ||
| 181 | #define PSW_MASK_PSTATE		_AC(0x00010000, UL) | ||
| 182 | #define PSW_MASK_ASC		_AC(0x0000C000, UL) | ||
| 183 | #define PSW_MASK_CC		_AC(0x00003000, UL) | ||
| 184 | #define PSW_MASK_PM		_AC(0x00000F00, UL) | ||
| 185 | #define PSW_MASK_RI		_AC(0x00000000, UL) | ||
| 186 | #define PSW_MASK_EA		_AC(0x00000000, UL) | ||
| 187 | #define PSW_MASK_BA		_AC(0x00000000, UL) | ||
| 188 | |||
| 189 | #define PSW_MASK_USER		_AC(0x0000FF00, UL) | ||
| 190 | |||
| 191 | #define PSW_ADDR_AMODE		_AC(0x80000000, UL) | ||
| 192 | #define PSW_ADDR_INSN		_AC(0x7FFFFFFF, UL) | ||
| 193 | |||
| 194 | #define PSW_ASC_PRIMARY		_AC(0x00000000, UL) | ||
| 195 | #define PSW_ASC_ACCREG		_AC(0x00004000, UL) | ||
| 196 | #define PSW_ASC_SECONDARY	_AC(0x00008000, UL) | ||
| 197 | #define PSW_ASC_HOME		_AC(0x0000C000, UL) | ||
| 198 | |||
| 199 | #else /* __s390x__ */ | ||
| 200 | |||
| 201 | #define PSW_MASK_PER		_AC(0x4000000000000000, UL) | ||
| 202 | #define PSW_MASK_DAT		_AC(0x0400000000000000, UL) | ||
| 203 | #define PSW_MASK_IO		_AC(0x0200000000000000, UL) | ||
| 204 | #define PSW_MASK_EXT		_AC(0x0100000000000000, UL) | ||
| 205 | #define PSW_MASK_BASE		_AC(0x0000000000000000, UL) | ||
| 206 | #define PSW_MASK_KEY		_AC(0x00F0000000000000, UL) | ||
| 207 | #define PSW_MASK_MCHECK		_AC(0x0004000000000000, UL) | ||
| 208 | #define PSW_MASK_WAIT		_AC(0x0002000000000000, UL) | ||
| 209 | #define PSW_MASK_PSTATE		_AC(0x0001000000000000, UL) | ||
| 210 | #define PSW_MASK_ASC		_AC(0x0000C00000000000, UL) | ||
| 211 | #define PSW_MASK_CC		_AC(0x0000300000000000, UL) | ||
| 212 | #define PSW_MASK_PM		_AC(0x00000F0000000000, UL) | ||
| 213 | #define PSW_MASK_RI		_AC(0x0000008000000000, UL) | ||
| 214 | #define PSW_MASK_EA		_AC(0x0000000100000000, UL) | ||
| 215 | #define PSW_MASK_BA		_AC(0x0000000080000000, UL) | ||
| 216 | |||
| 217 | #define PSW_MASK_USER		_AC(0x0000FF0180000000, UL) | ||
| 218 | |||
| 219 | #define PSW_ADDR_AMODE		_AC(0x0000000000000000, UL) | ||
| 220 | #define PSW_ADDR_INSN		_AC(0xFFFFFFFFFFFFFFFF, UL) | ||
| 221 | |||
| 222 | #define PSW_ASC_PRIMARY		_AC(0x0000000000000000, UL) | ||
| 223 | #define PSW_ASC_ACCREG		_AC(0x0000400000000000, UL) | ||
| 224 | #define PSW_ASC_SECONDARY	_AC(0x0000800000000000, UL) | ||
| 225 | #define PSW_ASC_HOME		_AC(0x0000C00000000000, UL) | ||
| 226 | |||
| 227 | #endif /* __s390x__ */ | ||
| 228 | |||
| 169 | #define NUM_GPRS	16 | 229 | #define NUM_GPRS	16 |
| 170 | #define NUM_FPRS	16 | 230 | #define NUM_FPRS	16 |
| 171 | #define NUM_CRS		16 | 231 | #define NUM_CRS		16 |
| ... | @@ -214,69 +274,6 @@ typedef struct { | ... | @@ -214,69 +274,6 @@ typedef struct { |
| 214 | 	unsigned long addr; | 274 | 	unsigned long addr; |
| 215 | } __attribute__ ((aligned(8))) psw_t; | 275 | } __attribute__ ((aligned(8))) psw_t; |
| 216 | 276 | ||
| 217 | #ifndef __s390x__ | ||
| 218 | |||
| 219 | #define PSW_MASK_PER		0x40000000UL | ||
| 220 | #define PSW_MASK_DAT		0x04000000UL | ||
| 221 | #define PSW_MASK_IO		0x02000000UL | ||
| 222 | #define PSW_MASK_EXT		0x01000000UL | ||
| 223 | #define PSW_MASK_KEY		0x00F00000UL | ||
| 224 | #define PSW_MASK_BASE		0x00080000UL	/* always one */ | ||
| 225 | #define PSW_MASK_MCHECK		0x00040000UL | ||
| 226 | #define PSW_MASK_WAIT		0x00020000UL | ||
| 227 | #define PSW_MASK_PSTATE		0x00010000UL | ||
| 228 | #define PSW_MASK_ASC		0x0000C000UL | ||
| 229 | #define PSW_MASK_CC		0x00003000UL | ||
| 230 | #define PSW_MASK_PM		0x00000F00UL | ||
| 231 | #define PSW_MASK_RI		0x00000000UL | ||
| 232 | #define PSW_MASK_EA		0x00000000UL | ||
| 233 | #define PSW_MASK_BA		0x00000000UL | ||
| 234 | |||
| 235 | #define PSW_MASK_USER		0x0000FF00UL | ||
| 236 | |||
| 237 | #define PSW_ADDR_AMODE		0x80000000UL | ||
| 238 | #define PSW_ADDR_INSN		0x7FFFFFFFUL | ||
| 239 | |||
| 240 | #define PSW_DEFAULT_KEY		(((unsigned long) PAGE_DEFAULT_ACC) << 20) | ||
| 241 | |||
| 242 | #define PSW_ASC_PRIMARY		0x00000000UL | ||
| 243 | #define PSW_ASC_ACCREG		0x00004000UL | ||
| 244 | #define PSW_ASC_SECONDARY	0x00008000UL | ||
| 245 | #define PSW_ASC_HOME		0x0000C000UL | ||
| 246 | |||
| 247 | #else /* __s390x__ */ | ||
| 248 | |||
| 249 | #define PSW_MASK_PER		0x4000000000000000UL | ||
| 250 | #define PSW_MASK_DAT		0x0400000000000000UL | ||
| 251 | #define PSW_MASK_IO		0x0200000000000000UL | ||
| 252 | #define PSW_MASK_EXT		0x0100000000000000UL | ||
| 253 | #define PSW_MASK_BASE		0x0000000000000000UL | ||
| 254 | #define PSW_MASK_KEY		0x00F0000000000000UL | ||
| 255 | #define PSW_MASK_MCHECK		0x0004000000000000UL | ||
| 256 | #define PSW_MASK_WAIT		0x0002000000000000UL | ||
| 257 | #define PSW_MASK_PSTATE		0x0001000000000000UL | ||
| 258 | #define PSW_MASK_ASC		0x0000C00000000000UL | ||
| 259 | #define PSW_MASK_CC		0x0000300000000000UL | ||
| 260 | #define PSW_MASK_PM		0x00000F0000000000UL | ||
| 261 | #define PSW_MASK_RI		0x0000008000000000UL | ||
| 262 | #define PSW_MASK_EA		0x0000000100000000UL | ||
| 263 | #define PSW_MASK_BA		0x0000000080000000UL | ||
| 264 | |||
| 265 | #define PSW_MASK_USER		0x0000FF0180000000UL | ||
| 266 | |||
| 267 | #define PSW_ADDR_AMODE		0x0000000000000000UL | ||
| 268 | #define PSW_ADDR_INSN		0xFFFFFFFFFFFFFFFFUL | ||
| 269 | |||
| 270 | #define PSW_DEFAULT_KEY		(((unsigned long) PAGE_DEFAULT_ACC) << 52) | ||
| 271 | |||
| 272 | #define PSW_ASC_PRIMARY		0x0000000000000000UL | ||
| 273 | #define PSW_ASC_ACCREG		0x0000400000000000UL | ||
| 274 | #define PSW_ASC_SECONDARY	0x0000800000000000UL | ||
| 275 | #define PSW_ASC_HOME		0x0000C00000000000UL | ||
| 276 | |||
| 277 | #endif /* __s390x__ */ | ||
| 278 | |||
| 279 | |||
| 280 | /* | 277 | /* |
| 281 | * The s390_regs structure is used to define the elf_gregset_t. | 278 | * The s390_regs structure is used to define the elf_gregset_t. |
| 282 | */ | 279 | */ |
lib/libc/include/s390x-linux-any/asm/statfs.h+2-2| ... | @@ -30,7 +30,7 @@ struct statfs { | ... | @@ -30,7 +30,7 @@ struct statfs { |
| 30 | 	unsigned int	f_namelen; | 30 | 	unsigned int	f_namelen; |
| 31 | 	unsigned int	f_frsize; | 31 | 	unsigned int	f_frsize; |
| 32 | 	unsigned int	f_flags; | 32 | 	unsigned int	f_flags; |
| 33 | 	unsigned int	f_spare[4]; | 33 | 	unsigned int	f_spare[5]; |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | struct statfs64 { | 36 | struct statfs64 { |
| ... | @@ -45,7 +45,7 @@ struct statfs64 { | ... | @@ -45,7 +45,7 @@ struct statfs64 { |
| 45 | 	unsigned int	f_namelen; | 45 | 	unsigned int	f_namelen; |
| 46 | 	unsigned int	f_frsize; | 46 | 	unsigned int	f_frsize; |
| 47 | 	unsigned int	f_flags; | 47 | 	unsigned int	f_flags; |
| 48 | 	unsigned int	f_spare[4]; | 48 | 	unsigned int	f_spare[5]; |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | #endif | 51 | #endif |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/unistd_32.h+13| ... | @@ -419,8 +419,21 @@ | ... | @@ -419,8 +419,21 @@ |
| 419 | #define __NR_landlock_create_ruleset 444 | 419 | #define __NR_landlock_create_ruleset 444 |
| 420 | #define __NR_landlock_add_rule 445 | 420 | #define __NR_landlock_add_rule 445 |
| 421 | #define __NR_landlock_restrict_self 446 | 421 | #define __NR_landlock_restrict_self 446 |
| 422 | #define __NR_memfd_secret 447 | ||
| 422 | #define __NR_process_mrelease 448 | 423 | #define __NR_process_mrelease 448 |
| 423 | #define __NR_futex_waitv 449 | 424 | #define __NR_futex_waitv 449 |
| 424 | #define __NR_set_mempolicy_home_node 450 | 425 | #define __NR_set_mempolicy_home_node 450 |
| 426 | #define __NR_cachestat 451 | ||
| 427 | #define __NR_fchmodat2 452 | ||
| 428 | #define __NR_map_shadow_stack 453 | ||
| 429 | #define __NR_futex_wake 454 | ||
| 430 | #define __NR_futex_wait 455 | ||
| 431 | #define __NR_futex_requeue 456 | ||
| 432 | #define __NR_statmount 457 | ||
| 433 | #define __NR_listmount 458 | ||
| 434 | #define __NR_lsm_get_self_attr 459 | ||
| 435 | #define __NR_lsm_set_self_attr 460 | ||
| 436 | #define __NR_lsm_list_modules 461 | ||
| 437 | #define __NR_mseal 462 | ||
| 425 | 438 | ||
| 426 | #endif /* _ASM_S390_UNISTD_32_H */ | 439 | #endif /* _ASM_S390_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/unistd_64.h+13| ... | @@ -367,8 +367,21 @@ | ... | @@ -367,8 +367,21 @@ |
| 367 | #define __NR_landlock_create_ruleset 444 | 367 | #define __NR_landlock_create_ruleset 444 |
| 368 | #define __NR_landlock_add_rule 445 | 368 | #define __NR_landlock_add_rule 445 |
| 369 | #define __NR_landlock_restrict_self 446 | 369 | #define __NR_landlock_restrict_self 446 |
| 370 | #define __NR_memfd_secret 447 | ||
| 370 | #define __NR_process_mrelease 448 | 371 | #define __NR_process_mrelease 448 |
| 371 | #define __NR_futex_waitv 449 | 372 | #define __NR_futex_waitv 449 |
| 372 | #define __NR_set_mempolicy_home_node 450 | 373 | #define __NR_set_mempolicy_home_node 450 |
| 374 | #define __NR_cachestat 451 | ||
| 375 | #define __NR_fchmodat2 452 | ||
| 376 | #define __NR_map_shadow_stack 453 | ||
| 377 | #define __NR_futex_wake 454 | ||
| 378 | #define __NR_futex_wait 455 | ||
| 379 | #define __NR_futex_requeue 456 | ||
| 380 | #define __NR_statmount 457 | ||
| 381 | #define __NR_listmount 458 | ||
| 382 | #define __NR_lsm_get_self_attr 459 | ||
| 383 | #define __NR_lsm_set_self_attr 460 | ||
| 384 | #define __NR_lsm_list_modules 461 | ||
| 385 | #define __NR_mseal 462 | ||
| 373 | 386 | ||
| 374 | #endif /* _ASM_S390_UNISTD_64_H */ | 387 | #endif /* _ASM_S390_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/uvdevice.h+52-1| ... | @@ -32,6 +32,33 @@ struct uvio_attest { | ... | @@ -32,6 +32,33 @@ struct uvio_attest { |
| 32 | 	__u16 reserved136;				/* 0x0136 */ | 32 | 	__u16 reserved136;				/* 0x0136 */ |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | /** | ||
| 36 | * uvio_uvdev_info - Information of supported functions | ||
| 37 | * @supp_uvio_cmds - supported IOCTLs by this device | ||
| 38 | * @supp_uv_cmds - supported UVCs corresponding to the IOCTL | ||
| 39 | * | ||
| 40 | * UVIO request to get information about supported request types by this | ||
| 41 | * uvdevice and the Ultravisor. Everything is output. Bits are in LSB0 | ||
| 42 | * ordering. If the bit is set in both, @supp_uvio_cmds and @supp_uv_cmds, the | ||
| 43 | * uvdevice and the Ultravisor support that call. | ||
| 44 | * | ||
| 45 | * Note that bit 0 (UVIO_IOCTL_UVDEV_INFO_NR) is always zero for `supp_uv_cmds` | ||
| 46 | * as there is no corresponding UV-call. | ||
| 47 | */ | ||
| 48 | struct uvio_uvdev_info { | ||
| 49 | 	/* | ||
| 50 | 	 * If bit `n` is set, this device supports the IOCTL with nr `n`. | ||
| 51 | 	 */ | ||
| 52 | 	__u64 supp_uvio_cmds; | ||
| 53 | 	/* | ||
| 54 | 	 * If bit `n` is set, the Ultravisor(UV) supports the UV-call | ||
| 55 | 	 * corresponding to the IOCTL with nr `n` in the calling contextx (host | ||
| 56 | 	 * or guest). The value is only valid if the corresponding bit in | ||
| 57 | 	 * @supp_uvio_cmds is set as well. | ||
| 58 | 	 */ | ||
| 59 | 	__u64 supp_uv_cmds; | ||
| 60 | }; | ||
| 61 | |||
| 35 | /* | 62 | /* |
| 36 | * The following max values define an upper length for the IOCTL in/out buffers. | 63 | * The following max values define an upper length for the IOCTL in/out buffers. |
| 37 | * However, they do not represent the maximum the Ultravisor allows which is | 64 | * However, they do not represent the maximum the Ultravisor allows which is |
| ... | @@ -42,10 +69,34 @@ struct uvio_attest { | ... | @@ -42,10 +69,34 @@ struct uvio_attest { |
| 42 | #define UVIO_ATT_ARCB_MAX_LEN		0x100000 | 69 | #define UVIO_ATT_ARCB_MAX_LEN		0x100000 |
| 43 | #define UVIO_ATT_MEASUREMENT_MAX_LEN	0x8000 | 70 | #define UVIO_ATT_MEASUREMENT_MAX_LEN	0x8000 |
| 44 | #define UVIO_ATT_ADDITIONAL_MAX_LEN	0x8000 | 71 | #define UVIO_ATT_ADDITIONAL_MAX_LEN	0x8000 |
| 72 | #define UVIO_ADD_SECRET_MAX_LEN		0x100000 | ||
| 73 | #define UVIO_LIST_SECRETS_LEN		0x1000 | ||
| 45 | 74 | ||
| 46 | #define UVIO_DEVICE_NAME "uv" | 75 | #define UVIO_DEVICE_NAME "uv" |
| 47 | #define UVIO_TYPE_UVC 'u' | 76 | #define UVIO_TYPE_UVC 'u' |
| 48 | 77 | ||
| 49 | #define UVIO_IOCTL_ATT _IOWR(UVIO_TYPE_UVC, 0x01, struct uvio_ioctl_cb) | 78 | enum UVIO_IOCTL_NR { |
| 79 | 	UVIO_IOCTL_UVDEV_INFO_NR = 0x00, | ||
| 80 | 	UVIO_IOCTL_ATT_NR, | ||
| 81 | 	UVIO_IOCTL_ADD_SECRET_NR, | ||
| 82 | 	UVIO_IOCTL_LIST_SECRETS_NR, | ||
| 83 | 	UVIO_IOCTL_LOCK_SECRETS_NR, | ||
| 84 | 	/* must be the last entry */ | ||
| 85 | 	UVIO_IOCTL_NUM_IOCTLS | ||
| 86 | }; | ||
| 87 | |||
| 88 | #define UVIO_IOCTL(nr)		_IOWR(UVIO_TYPE_UVC, nr, struct uvio_ioctl_cb) | ||
| 89 | #define UVIO_IOCTL_UVDEV_INFO	UVIO_IOCTL(UVIO_IOCTL_UVDEV_INFO_NR) | ||
| 90 | #define UVIO_IOCTL_ATT		UVIO_IOCTL(UVIO_IOCTL_ATT_NR) | ||
| 91 | #define UVIO_IOCTL_ADD_SECRET	UVIO_IOCTL(UVIO_IOCTL_ADD_SECRET_NR) | ||
| 92 | #define UVIO_IOCTL_LIST_SECRETS	UVIO_IOCTL(UVIO_IOCTL_LIST_SECRETS_NR) | ||
| 93 | #define UVIO_IOCTL_LOCK_SECRETS	UVIO_IOCTL(UVIO_IOCTL_LOCK_SECRETS_NR) | ||
| 94 | |||
| 95 | #define UVIO_SUPP_CALL(nr)	(1ULL << (nr)) | ||
| 96 | #define UVIO_SUPP_UDEV_INFO	UVIO_SUPP_CALL(UVIO_IOCTL_UDEV_INFO_NR) | ||
| 97 | #define UVIO_SUPP_ATT		UVIO_SUPP_CALL(UVIO_IOCTL_ATT_NR) | ||
| 98 | #define UVIO_SUPP_ADD_SECRET	UVIO_SUPP_CALL(UVIO_IOCTL_ADD_SECRET_NR) | ||
| 99 | #define UVIO_SUPP_LIST_SECRETS	UVIO_SUPP_CALL(UVIO_IOCTL_LIST_SECRETS_NR) | ||
| 100 | #define UVIO_SUPP_LOCK_SECRETS	UVIO_SUPP_CALL(UVIO_IOCTL_LOCK_SECRETS_NR) | ||
| 50 | 101 | ||
| 51 | #endif /* __S390_ASM_UVDEVICE_H */ | 102 | #endif /* __S390_ASM_UVDEVICE_H */ |
| \ No newline at end of file | |||
lib/libc/include/sparc-linux-any/asm/openpromio.h+2-3| ... | @@ -10,10 +10,9 @@ | ... | @@ -10,10 +10,9 @@ |
| 10 | * were chosen to be exactly equal to the SunOS equivalents. | 10 | * were chosen to be exactly equal to the SunOS equivalents. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | struct openpromio | 13 | struct openpromio { |
| 14 | { | ||
| 15 | 	unsigned int oprom_size;	/* Actual size of the oprom_array. */ | 14 | 	unsigned int oprom_size;	/* Actual size of the oprom_array. */ |
| 16 | 	char	oprom_array[1];		/* Holds property names and values. */ | 15 | 	char	oprom_array[];		/* Holds property names and values. */ |
| 17 | }; | 16 | }; |
| 18 | 17 | ||
| 19 | #define	OPROMMAXPARAM	4096		/* Maximum size of oprom_array. */ | 18 | #define	OPROMMAXPARAM	4096		/* Maximum size of oprom_array. */ |
lib/libc/include/sparc-linux-any/asm/socket.h+3| ... | @@ -130,6 +130,9 @@ | ... | @@ -130,6 +130,9 @@ |
| 130 | 130 | ||
| 131 | #define SO_RCVMARK 0x0054 | 131 | #define SO_RCVMARK 0x0054 |
| 132 | 132 | ||
| 133 | #define SO_PASSPIDFD 0x0055 | ||
| 134 | #define SO_PEERPIDFD 0x0056 | ||
| 135 | |||
| 133 | 136 | ||
| 134 | 137 | ||
| 135 | #if __BITS_PER_LONG == 64 | 138 | #if __BITS_PER_LONG == 64 |
lib/libc/include/sparc-linux-any/asm/termbits.h-10| ... | @@ -10,16 +10,6 @@ typedef unsigned int	tcflag_t; | ... | @@ -10,16 +10,6 @@ typedef unsigned int	tcflag_t; |
| 10 | typedef unsigned long	tcflag_t; | 10 | typedef unsigned long	tcflag_t; |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | #define NCC 8 | ||
| 14 | struct termio { | ||
| 15 | 	unsigned short c_iflag;		/* input mode flags */ | ||
| 16 | 	unsigned short c_oflag;		/* output mode flags */ | ||
| 17 | 	unsigned short c_cflag;		/* control mode flags */ | ||
| 18 | 	unsigned short c_lflag;		/* local mode flags */ | ||
| 19 | 	unsigned char c_line;		/* line discipline */ | ||
| 20 | 	unsigned char c_cc[NCC];	/* control characters */ | ||
| 21 | }; | ||
| 22 | |||
| 23 | #define NCCS 17 | 13 | #define NCCS 17 |
| 24 | struct termios { | 14 | struct termios { |
| 25 | 	tcflag_t c_iflag;		/* input mode flags */ | 15 | 	tcflag_t c_iflag;		/* input mode flags */ |
lib/libc/include/sparc-linux-any/asm/termios.h+9| ... | @@ -40,5 +40,14 @@ struct winsize { | ... | @@ -40,5 +40,14 @@ struct winsize { |
| 40 | 	unsigned short ws_ypixel; | 40 | 	unsigned short ws_ypixel; |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | #define NCC 8 | ||
| 44 | struct termio { | ||
| 45 | 	unsigned short c_iflag;		/* input mode flags */ | ||
| 46 | 	unsigned short c_oflag;		/* output mode flags */ | ||
| 47 | 	unsigned short c_cflag;		/* control mode flags */ | ||
| 48 | 	unsigned short c_lflag;		/* local mode flags */ | ||
| 49 | 	unsigned char c_line;		/* line discipline */ | ||
| 50 | 	unsigned char c_cc[NCC];	/* control characters */ | ||
| 51 | }; | ||
| 43 | 52 | ||
| 44 | #endif /* _SPARC_TERMIOS_H */ | 53 | #endif /* _SPARC_TERMIOS_H */ |
| \ No newline at end of file | |||
lib/libc/include/sparc-linux-any/asm/unistd_32.h+12| ... | @@ -420,6 +420,18 @@ | ... | @@ -420,6 +420,18 @@ |
| 420 | #define __NR_process_mrelease 448 | 420 | #define __NR_process_mrelease 448 |
| 421 | #define __NR_futex_waitv 449 | 421 | #define __NR_futex_waitv 449 |
| 422 | #define __NR_set_mempolicy_home_node 450 | 422 | #define __NR_set_mempolicy_home_node 450 |
| 423 | #define __NR_cachestat 451 | ||
| 424 | #define __NR_fchmodat2 452 | ||
| 425 | #define __NR_map_shadow_stack 453 | ||
| 426 | #define __NR_futex_wake 454 | ||
| 427 | #define __NR_futex_wait 455 | ||
| 428 | #define __NR_futex_requeue 456 | ||
| 429 | #define __NR_statmount 457 | ||
| 430 | #define __NR_listmount 458 | ||
| 431 | #define __NR_lsm_get_self_attr 459 | ||
| 432 | #define __NR_lsm_set_self_attr 460 | ||
| 433 | #define __NR_lsm_list_modules 461 | ||
| 434 | #define __NR_mseal 462 | ||
| 423 | 435 | ||
| 424 | 436 | ||
| 425 | #endif /* _ASM_UNISTD_32_H */ | 437 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/sparc-linux-any/asm/unistd_64.h+12| ... | @@ -383,6 +383,18 @@ | ... | @@ -383,6 +383,18 @@ |
| 383 | #define __NR_process_mrelease 448 | 383 | #define __NR_process_mrelease 448 |
| 384 | #define __NR_futex_waitv 449 | 384 | #define __NR_futex_waitv 449 |
| 385 | #define __NR_set_mempolicy_home_node 450 | 385 | #define __NR_set_mempolicy_home_node 450 |
| 386 | #define __NR_cachestat 451 | ||
| 387 | #define __NR_fchmodat2 452 | ||
| 388 | #define __NR_map_shadow_stack 453 | ||
| 389 | #define __NR_futex_wake 454 | ||
| 390 | #define __NR_futex_wait 455 | ||
| 391 | #define __NR_futex_requeue 456 | ||
| 392 | #define __NR_statmount 457 | ||
| 393 | #define __NR_listmount 458 | ||
| 394 | #define __NR_lsm_get_self_attr 459 | ||
| 395 | #define __NR_lsm_set_self_attr 460 | ||
| 396 | #define __NR_lsm_list_modules 461 | ||
| 397 | #define __NR_mseal 462 | ||
| 386 | 398 | ||
| 387 | 399 | ||
| 388 | #endif /* _ASM_UNISTD_64_H */ | 400 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/amd_hsmp.h+110-1| ... | @@ -47,6 +47,9 @@ enum hsmp_message_ids { | ... | @@ -47,6 +47,9 @@ enum hsmp_message_ids { |
| 47 | 	HSMP_SET_PCI_RATE,		/* 20h Control link rate on PCIe devices */ | 47 | 	HSMP_SET_PCI_RATE,		/* 20h Control link rate on PCIe devices */ |
| 48 | 	HSMP_SET_POWER_MODE,		/* 21h Select power efficiency profile policy */ | 48 | 	HSMP_SET_POWER_MODE,		/* 21h Select power efficiency profile policy */ |
| 49 | 	HSMP_SET_PSTATE_MAX_MIN,	/* 22h Set the max and min DF P-State */ | 49 | 	HSMP_SET_PSTATE_MAX_MIN,	/* 22h Set the max and min DF P-State */ |
| 50 | 	HSMP_GET_METRIC_TABLE_VER,	/* 23h Get metrics table version */ | ||
| 51 | 	HSMP_GET_METRIC_TABLE,		/* 24h Get metrics table */ | ||
| 52 | 	HSMP_GET_METRIC_TABLE_DRAM_ADDR,/* 25h Get metrics table dram address */ | ||
| 50 | 	HSMP_MSG_ID_MAX, | 53 | 	HSMP_MSG_ID_MAX, |
| 51 | }; | 54 | }; |
| 52 | 55 | ||
| ... | @@ -64,6 +67,14 @@ enum hsmp_msg_type { | ... | @@ -64,6 +67,14 @@ enum hsmp_msg_type { |
| 64 | 	HSMP_GET = 1, | 67 | 	HSMP_GET = 1, |
| 65 | }; | 68 | }; |
| 66 | 69 | ||
| 70 | enum hsmp_proto_versions { | ||
| 71 | 	HSMP_PROTO_VER2	= 2, | ||
| 72 | 	HSMP_PROTO_VER3, | ||
| 73 | 	HSMP_PROTO_VER4, | ||
| 74 | 	HSMP_PROTO_VER5, | ||
| 75 | 	HSMP_PROTO_VER6 | ||
| 76 | }; | ||
| 77 | |||
| 67 | struct hsmp_msg_desc { | 78 | struct hsmp_msg_desc { |
| 68 | 	int num_args; | 79 | 	int num_args; |
| 69 | 	int response_sz; | 80 | 	int response_sz; |
| ... | @@ -227,7 +238,7 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { | ... | @@ -227,7 +238,7 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { |
| 227 | 	/* | 238 | 	/* |
| 228 | 	 * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1 | 239 | 	 * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1 |
| 229 | 	 * input: args[0] = DIMM address[7:0] | 240 | 	 * input: args[0] = DIMM address[7:0] |
| 230 | 	 * output: args[0] = temperature in degree celcius[31:21] + update rate in ms[16:8] + | 241 | 	 * output: args[0] = temperature in degree celsius[31:21] + update rate in ms[16:8] + |
| 231 | 	 * DIMM address[7:0] | 242 | 	 * DIMM address[7:0] |
| 232 | 	 */ | 243 | 	 */ |
| 233 | 	{1, 1, HSMP_GET}, | 244 | 	{1, 1, HSMP_GET}, |
| ... | @@ -295,6 +306,104 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { | ... | @@ -295,6 +306,104 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { |
| 295 | 	 * input: args[0] = min df pstate[15:8] + max df pstate[7:0] | 306 | 	 * input: args[0] = min df pstate[15:8] + max df pstate[7:0] |
| 296 | 	 */ | 307 | 	 */ |
| 297 | 	{1, 0, HSMP_SET}, | 308 | 	{1, 0, HSMP_SET}, |
| 309 | |||
| 310 | 	/* | ||
| 311 | 	 * HSMP_GET_METRIC_TABLE_VER, num_args = 0, response_sz = 1 | ||
| 312 | 	 * output: args[0] = metrics table version | ||
| 313 | 	 */ | ||
| 314 | 	{0, 1, HSMP_GET}, | ||
| 315 | |||
| 316 | 	/* | ||
| 317 | 	 * HSMP_GET_METRIC_TABLE, num_args = 0, response_sz = 0 | ||
| 318 | 	 */ | ||
| 319 | 	{0, 0, HSMP_GET}, | ||
| 320 | |||
| 321 | 	/* | ||
| 322 | 	 * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz = 2 | ||
| 323 | 	 * output: args[0] = lower 32 bits of the address | ||
| 324 | 	 * output: args[1] = upper 32 bits of the address | ||
| 325 | 	 */ | ||
| 326 | 	{0, 2, HSMP_GET}, | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* Metrics table (supported only with proto version 6) */ | ||
| 330 | struct hsmp_metric_table { | ||
| 331 | 	__u32 accumulation_counter; | ||
| 332 | |||
| 333 | 	/* TEMPERATURE */ | ||
| 334 | 	__u32 max_socket_temperature; | ||
| 335 | 	__u32 max_vr_temperature; | ||
| 336 | 	__u32 max_hbm_temperature; | ||
| 337 | 	__u64 max_socket_temperature_acc; | ||
| 338 | 	__u64 max_vr_temperature_acc; | ||
| 339 | 	__u64 max_hbm_temperature_acc; | ||
| 340 | |||
| 341 | 	/* POWER */ | ||
| 342 | 	__u32 socket_power_limit; | ||
| 343 | 	__u32 max_socket_power_limit; | ||
| 344 | 	__u32 socket_power; | ||
| 345 | |||
| 346 | 	/* ENERGY */ | ||
| 347 | 	__u64 timestamp; | ||
| 348 | 	__u64 socket_energy_acc; | ||
| 349 | 	__u64 ccd_energy_acc; | ||
| 350 | 	__u64 xcd_energy_acc; | ||
| 351 | 	__u64 aid_energy_acc; | ||
| 352 | 	__u64 hbm_energy_acc; | ||
| 353 | |||
| 354 | 	/* FREQUENCY */ | ||
| 355 | 	__u32 cclk_frequency_limit; | ||
| 356 | 	__u32 gfxclk_frequency_limit; | ||
| 357 | 	__u32 fclk_frequency; | ||
| 358 | 	__u32 uclk_frequency; | ||
| 359 | 	__u32 socclk_frequency[4]; | ||
| 360 | 	__u32 vclk_frequency[4]; | ||
| 361 | 	__u32 dclk_frequency[4]; | ||
| 362 | 	__u32 lclk_frequency[4]; | ||
| 363 | 	__u64 gfxclk_frequency_acc[8]; | ||
| 364 | 	__u64 cclk_frequency_acc[96]; | ||
| 365 | |||
| 366 | 	/* FREQUENCY RANGE */ | ||
| 367 | 	__u32 max_cclk_frequency; | ||
| 368 | 	__u32 min_cclk_frequency; | ||
| 369 | 	__u32 max_gfxclk_frequency; | ||
| 370 | 	__u32 min_gfxclk_frequency; | ||
| 371 | 	__u32 fclk_frequency_table[4]; | ||
| 372 | 	__u32 uclk_frequency_table[4]; | ||
| 373 | 	__u32 socclk_frequency_table[4]; | ||
| 374 | 	__u32 vclk_frequency_table[4]; | ||
| 375 | 	__u32 dclk_frequency_table[4]; | ||
| 376 | 	__u32 lclk_frequency_table[4]; | ||
| 377 | 	__u32 max_lclk_dpm_range; | ||
| 378 | 	__u32 min_lclk_dpm_range; | ||
| 379 | |||
| 380 | 	/* XGMI */ | ||
| 381 | 	__u32 xgmi_width; | ||
| 382 | 	__u32 xgmi_bitrate; | ||
| 383 | 	__u64 xgmi_read_bandwidth_acc[8]; | ||
| 384 | 	__u64 xgmi_write_bandwidth_acc[8]; | ||
| 385 | |||
| 386 | 	/* ACTIVITY */ | ||
| 387 | 	__u32 socket_c0_residency; | ||
| 388 | 	__u32 socket_gfx_busy; | ||
| 389 | 	__u32 dram_bandwidth_utilization; | ||
| 390 | 	__u64 socket_c0_residency_acc; | ||
| 391 | 	__u64 socket_gfx_busy_acc; | ||
| 392 | 	__u64 dram_bandwidth_acc; | ||
| 393 | 	__u32 max_dram_bandwidth; | ||
| 394 | 	__u64 dram_bandwidth_utilization_acc; | ||
| 395 | 	__u64 pcie_bandwidth_acc[4]; | ||
| 396 | |||
| 397 | 	/* THROTTLERS */ | ||
| 398 | 	__u32 prochot_residency_acc; | ||
| 399 | 	__u32 ppt_residency_acc; | ||
| 400 | 	__u32 socket_thm_residency_acc; | ||
| 401 | 	__u32 vr_thm_residency_acc; | ||
| 402 | 	__u32 hbm_thm_residency_acc; | ||
| 403 | 	__u32 spare; | ||
| 404 | |||
| 405 | 	/* New items at the end to maintain driver compatibility */ | ||
| 406 | 	__u32 gfxclk_frequency[8]; | ||
| 298 | }; | 407 | }; |
| 299 | 408 | ||
| 300 | /* Reset to default packing */ | 409 | /* Reset to default packing */ |
lib/libc/include/x86-linux-any/asm/bootparam.h+2-71| ... | @@ -2,21 +2,7 @@ | ... | @@ -2,21 +2,7 @@ |
| 2 | #ifndef _ASM_X86_BOOTPARAM_H | 2 | #ifndef _ASM_X86_BOOTPARAM_H |
| 3 | #define _ASM_X86_BOOTPARAM_H | 3 | #define _ASM_X86_BOOTPARAM_H |
| 4 | 4 | ||
| 5 | /* setup_data/setup_indirect types */ | 5 | #include <asm/setup_data.h> |
| 6 | #define SETUP_NONE			0 | ||
| 7 | #define SETUP_E820_EXT			1 | ||
| 8 | #define SETUP_DTB			2 | ||
| 9 | #define SETUP_PCI			3 | ||
| 10 | #define SETUP_EFI			4 | ||
| 11 | #define SETUP_APPLE_PROPERTIES		5 | ||
| 12 | #define SETUP_JAILHOUSE			6 | ||
| 13 | #define SETUP_CC_BLOB			7 | ||
| 14 | #define SETUP_IMA			8 | ||
| 15 | #define SETUP_RNG_SEED			9 | ||
| 16 | #define SETUP_ENUM_MAX			SETUP_RNG_SEED | ||
| 17 | |||
| 18 | #define SETUP_INDIRECT			(1<<31) | ||
| 19 | #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT) | ||
| 20 | 6 | ||
| 21 | /* ram_size flags */ | 7 | /* ram_size flags */ |
| 22 | #define RAMDISK_IMAGE_START_MASK	0x07FF | 8 | #define RAMDISK_IMAGE_START_MASK	0x07FF |
| ... | @@ -38,6 +24,7 @@ | ... | @@ -38,6 +24,7 @@ |
| 38 | #define XLF_EFI_KEXEC			(1<<4) | 24 | #define XLF_EFI_KEXEC			(1<<4) |
| 39 | #define XLF_5LEVEL			(1<<5) | 25 | #define XLF_5LEVEL			(1<<5) |
| 40 | #define XLF_5LEVEL_ENABLED		(1<<6) | 26 | #define XLF_5LEVEL_ENABLED		(1<<6) |
| 27 | #define XLF_MEM_ENCRYPTION		(1<<7) | ||
| 41 | 28 | ||
| 42 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLY__ |
| 43 | 30 | ||
| ... | @@ -48,22 +35,6 @@ | ... | @@ -48,22 +35,6 @@ |
| 48 | #include <asm/ist.h> | 35 | #include <asm/ist.h> |
| 49 | #include <video/edid.h> | 36 | #include <video/edid.h> |
| 50 | 37 | ||
| 51 | /* extensible setup data list node */ | ||
| 52 | struct setup_data { | ||
| 53 | 	__u64 next; | ||
| 54 | 	__u32 type; | ||
| 55 | 	__u32 len; | ||
| 56 | 	__u8 data[]; | ||
| 57 | }; | ||
| 58 | |||
| 59 | /* extensible setup indirect data node */ | ||
| 60 | struct setup_indirect { | ||
| 61 | 	__u32 type; | ||
| 62 | 	__u32 reserved; /* Reserved, must be set to zero. */ | ||
| 63 | 	__u64 len; | ||
| 64 | 	__u64 addr; | ||
| 65 | }; | ||
| 66 | |||
| 67 | struct setup_header { | 38 | struct setup_header { |
| 68 | 	__u8	setup_sects; | 39 | 	__u8	setup_sects; |
| 69 | 	__u16	root_flags; | 40 | 	__u16	root_flags; |
| ... | @@ -136,51 +107,11 @@ struct efi_info { | ... | @@ -136,51 +107,11 @@ struct efi_info { |
| 136 | */ | 107 | */ |
| 137 | #define E820_MAX_ENTRIES_ZEROPAGE 128 | 108 | #define E820_MAX_ENTRIES_ZEROPAGE 128 |
| 138 | 109 | ||
| 139 | /* | ||
| 140 | * The E820 memory region entry of the boot protocol ABI: | ||
| 141 | */ | ||
| 142 | struct boot_e820_entry { | ||
| 143 | 	__u64 addr; | ||
| 144 | 	__u64 size; | ||
| 145 | 	__u32 type; | ||
| 146 | } __attribute__((packed)); | ||
| 147 | |||
| 148 | /* | 110 | /* |
| 149 | * Smallest compatible version of jailhouse_setup_data required by this kernel. | 111 | * Smallest compatible version of jailhouse_setup_data required by this kernel. |
| 150 | */ | 112 | */ |
| 151 | #define JAILHOUSE_SETUP_REQUIRED_VERSION	1 | 113 | #define JAILHOUSE_SETUP_REQUIRED_VERSION	1 |
| 152 | 114 | ||
| 153 | /* | ||
| 154 | * The boot loader is passing platform information via this Jailhouse-specific | ||
| 155 | * setup data structure. | ||
| 156 | */ | ||
| 157 | struct jailhouse_setup_data { | ||
| 158 | 	struct { | ||
| 159 | 		__u16	version; | ||
| 160 | 		__u16	compatible_version; | ||
| 161 | 	} __attribute__((packed)) hdr; | ||
| 162 | 	struct { | ||
| 163 | 		__u16	pm_timer_address; | ||
| 164 | 		__u16	num_cpus; | ||
| 165 | 		__u64	pci_mmconfig_base; | ||
| 166 | 		__u32	tsc_khz; | ||
| 167 | 		__u32	apic_khz; | ||
| 168 | 		__u8	standard_ioapic; | ||
| 169 | 		__u8	cpu_ids[255]; | ||
| 170 | 	} __attribute__((packed)) v1; | ||
| 171 | 	struct { | ||
| 172 | 		__u32	flags; | ||
| 173 | 	} __attribute__((packed)) v2; | ||
| 174 | } __attribute__((packed)); | ||
| 175 | |||
| 176 | /* | ||
| 177 | * IMA buffer setup data information from the previous kernel during kexec | ||
| 178 | */ | ||
| 179 | struct ima_setup_data { | ||
| 180 | 	__u64 addr; | ||
| 181 | 	__u64 size; | ||
| 182 | } __attribute__((packed)); | ||
| 183 | |||
| 184 | /* The so-called "zeropage" */ | 115 | /* The so-called "zeropage" */ |
| 185 | struct boot_params { | 116 | struct boot_params { |
| 186 | 	struct screen_info screen_info;			/* 0x000 */ | 117 | 	struct screen_info screen_info;			/* 0x000 */ |
lib/libc/include/x86-linux-any/asm/kvm.h+325-9| ... | @@ -7,6 +7,8 @@ | ... | @@ -7,6 +7,8 @@ |
| 7 | * | 7 | * |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #include <linux/const.h> | ||
| 11 | #include <linux/bits.h> | ||
| 10 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 11 | #include <linux/ioctl.h> | 13 | #include <linux/ioctl.h> |
| 12 | #include <linux/stddef.h> | 14 | #include <linux/stddef.h> |
| ... | @@ -40,7 +42,6 @@ | ... | @@ -40,7 +42,6 @@ |
| 40 | #define __KVM_HAVE_IRQ_LINE | 42 | #define __KVM_HAVE_IRQ_LINE |
| 41 | #define __KVM_HAVE_MSI | 43 | #define __KVM_HAVE_MSI |
| 42 | #define __KVM_HAVE_USER_NMI | 44 | #define __KVM_HAVE_USER_NMI |
| 43 | #define __KVM_HAVE_GUEST_DEBUG | ||
| 44 | #define __KVM_HAVE_MSIX | 45 | #define __KVM_HAVE_MSIX |
| 45 | #define __KVM_HAVE_MCE | 46 | #define __KVM_HAVE_MCE |
| 46 | #define __KVM_HAVE_PIT_STATE2 | 47 | #define __KVM_HAVE_PIT_STATE2 |
| ... | @@ -49,7 +50,6 @@ | ... | @@ -49,7 +50,6 @@ |
| 49 | #define __KVM_HAVE_DEBUGREGS | 50 | #define __KVM_HAVE_DEBUGREGS |
| 50 | #define __KVM_HAVE_XSAVE | 51 | #define __KVM_HAVE_XSAVE |
| 51 | #define __KVM_HAVE_XCRS | 52 | #define __KVM_HAVE_XCRS |
| 52 | #define __KVM_HAVE_READONLY_MEM | ||
| 53 | 53 | ||
| 54 | /* Architectural interrupt line count. */ | 54 | /* Architectural interrupt line count. */ |
| 55 | #define KVM_NR_INTERRUPTS 256 | 55 | #define KVM_NR_INTERRUPTS 256 |
| ... | @@ -455,8 +455,13 @@ struct kvm_sync_regs { | ... | @@ -455,8 +455,13 @@ struct kvm_sync_regs { |
| 455 | 455 | ||
| 456 | #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE	0x00000001 | 456 | #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE	0x00000001 |
| 457 | 457 | ||
| 458 | /* attributes for system fd (group 0) */ | 458 | /* vendor-independent attributes for system fd (group 0) */ |
| 459 | #define KVM_X86_XCOMP_GUEST_SUPP	0 | 459 | #define KVM_X86_GRP_SYSTEM		0 |
| 460 | # define KVM_X86_XCOMP_GUEST_SUPP	0 | ||
| 461 | |||
| 462 | /* vendor-specific groups and attributes for system fd */ | ||
| 463 | #define KVM_X86_GRP_SEV			1 | ||
| 464 | # define KVM_X86_SEV_VMSA_FEATURES	0 | ||
| 460 | 465 | ||
| 461 | struct kvm_vmx_nested_state_data { | 466 | struct kvm_vmx_nested_state_data { |
| 462 | 	__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; | 467 | 	__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; |
| ... | @@ -524,9 +529,312 @@ struct kvm_pmu_event_filter { | ... | @@ -524,9 +529,312 @@ struct kvm_pmu_event_filter { |
| 524 | #define KVM_PMU_EVENT_ALLOW 0 | 529 | #define KVM_PMU_EVENT_ALLOW 0 |
| 525 | #define KVM_PMU_EVENT_DENY 1 | 530 | #define KVM_PMU_EVENT_DENY 1 |
| 526 | 531 | ||
| 527 | #define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0) | 532 | #define KVM_PMU_EVENT_FLAG_MASKED_EVENTS _BITUL(0) |
| 528 | #define KVM_PMU_EVENT_FLAGS_VALID_MASK (KVM_PMU_EVENT_FLAG_MASKED_EVENTS) | 533 | #define KVM_PMU_EVENT_FLAGS_VALID_MASK (KVM_PMU_EVENT_FLAG_MASKED_EVENTS) |
| 529 | 534 | ||
| 535 | /* for KVM_CAP_MCE */ | ||
| 536 | struct kvm_x86_mce { | ||
| 537 | 	__u64 status; | ||
| 538 | 	__u64 addr; | ||
| 539 | 	__u64 misc; | ||
| 540 | 	__u64 mcg_status; | ||
| 541 | 	__u8 bank; | ||
| 542 | 	__u8 pad1[7]; | ||
| 543 | 	__u64 pad2[3]; | ||
| 544 | }; | ||
| 545 | |||
| 546 | /* for KVM_CAP_XEN_HVM */ | ||
| 547 | #define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR	(1 << 0) | ||
| 548 | #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL	(1 << 1) | ||
| 549 | #define KVM_XEN_HVM_CONFIG_SHARED_INFO		(1 << 2) | ||
| 550 | #define KVM_XEN_HVM_CONFIG_RUNSTATE		(1 << 3) | ||
| 551 | #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL	(1 << 4) | ||
| 552 | #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND		(1 << 5) | ||
| 553 | #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG	(1 << 6) | ||
| 554 | #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE	(1 << 7) | ||
| 555 | #define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA	(1 << 8) | ||
| 556 | |||
| 557 | struct kvm_xen_hvm_config { | ||
| 558 | 	__u32 flags; | ||
| 559 | 	__u32 msr; | ||
| 560 | 	__u64 blob_addr_32; | ||
| 561 | 	__u64 blob_addr_64; | ||
| 562 | 	__u8 blob_size_32; | ||
| 563 | 	__u8 blob_size_64; | ||
| 564 | 	__u8 pad2[30]; | ||
| 565 | }; | ||
| 566 | |||
| 567 | struct kvm_xen_hvm_attr { | ||
| 568 | 	__u16 type; | ||
| 569 | 	__u16 pad[3]; | ||
| 570 | 	union { | ||
| 571 | 		__u8 long_mode; | ||
| 572 | 		__u8 vector; | ||
| 573 | 		__u8 runstate_update_flag; | ||
| 574 | 		union { | ||
| 575 | 			__u64 gfn; | ||
| 576 | #define KVM_XEN_INVALID_GFN ((__u64)-1) | ||
| 577 | 			__u64 hva; | ||
| 578 | 		} shared_info; | ||
| 579 | 		struct { | ||
| 580 | 			__u32 send_port; | ||
| 581 | 			__u32 type; /* EVTCHNSTAT_ipi / EVTCHNSTAT_interdomain */ | ||
| 582 | 			__u32 flags; | ||
| 583 | #define KVM_XEN_EVTCHN_DEASSIGN		(1 << 0) | ||
| 584 | #define KVM_XEN_EVTCHN_UPDATE		(1 << 1) | ||
| 585 | #define KVM_XEN_EVTCHN_RESET		(1 << 2) | ||
| 586 | 			/* | ||
| 587 | 			 * Events sent by the guest are either looped back to | ||
| 588 | 			 * the guest itself (potentially on a different port#) | ||
| 589 | 			 * or signalled via an eventfd. | ||
| 590 | 			 */ | ||
| 591 | 			union { | ||
| 592 | 				struct { | ||
| 593 | 					__u32 port; | ||
| 594 | 					__u32 vcpu; | ||
| 595 | 					__u32 priority; | ||
| 596 | 				} port; | ||
| 597 | 				struct { | ||
| 598 | 					__u32 port; /* Zero for eventfd */ | ||
| 599 | 					__s32 fd; | ||
| 600 | 				} eventfd; | ||
| 601 | 				__u32 padding[4]; | ||
| 602 | 			} deliver; | ||
| 603 | 		} evtchn; | ||
| 604 | 		__u32 xen_version; | ||
| 605 | 		__u64 pad[8]; | ||
| 606 | 	} u; | ||
| 607 | }; | ||
| 608 | |||
| 609 | |||
| 610 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */ | ||
| 611 | #define KVM_XEN_ATTR_TYPE_LONG_MODE		0x0 | ||
| 612 | #define KVM_XEN_ATTR_TYPE_SHARED_INFO		0x1 | ||
| 613 | #define KVM_XEN_ATTR_TYPE_UPCALL_VECTOR		0x2 | ||
| 614 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ | ||
| 615 | #define KVM_XEN_ATTR_TYPE_EVTCHN		0x3 | ||
| 616 | #define KVM_XEN_ATTR_TYPE_XEN_VERSION		0x4 | ||
| 617 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG */ | ||
| 618 | #define KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG	0x5 | ||
| 619 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA */ | ||
| 620 | #define KVM_XEN_ATTR_TYPE_SHARED_INFO_HVA	0x6 | ||
| 621 | |||
| 622 | struct kvm_xen_vcpu_attr { | ||
| 623 | 	__u16 type; | ||
| 624 | 	__u16 pad[3]; | ||
| 625 | 	union { | ||
| 626 | 		__u64 gpa; | ||
| 627 | #define KVM_XEN_INVALID_GPA ((__u64)-1) | ||
| 628 | 		__u64 hva; | ||
| 629 | 		__u64 pad[8]; | ||
| 630 | 		struct { | ||
| 631 | 			__u64 state; | ||
| 632 | 			__u64 state_entry_time; | ||
| 633 | 			__u64 time_running; | ||
| 634 | 			__u64 time_runnable; | ||
| 635 | 			__u64 time_blocked; | ||
| 636 | 			__u64 time_offline; | ||
| 637 | 		} runstate; | ||
| 638 | 		__u32 vcpu_id; | ||
| 639 | 		struct { | ||
| 640 | 			__u32 port; | ||
| 641 | 			__u32 priority; | ||
| 642 | 			__u64 expires_ns; | ||
| 643 | 		} timer; | ||
| 644 | 		__u8 vector; | ||
| 645 | 	} u; | ||
| 646 | }; | ||
| 647 | |||
| 648 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */ | ||
| 649 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO	0x0 | ||
| 650 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO	0x1 | ||
| 651 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR	0x2 | ||
| 652 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT	0x3 | ||
| 653 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA	0x4 | ||
| 654 | #define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST	0x5 | ||
| 655 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ | ||
| 656 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID		0x6 | ||
| 657 | #define KVM_XEN_VCPU_ATTR_TYPE_TIMER		0x7 | ||
| 658 | #define KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR	0x8 | ||
| 659 | /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA */ | ||
| 660 | #define KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA	0x9 | ||
| 661 | |||
| 662 | /* Secure Encrypted Virtualization command */ | ||
| 663 | enum sev_cmd_id { | ||
| 664 | 	/* Guest initialization commands */ | ||
| 665 | 	KVM_SEV_INIT = 0, | ||
| 666 | 	KVM_SEV_ES_INIT, | ||
| 667 | 	/* Guest launch commands */ | ||
| 668 | 	KVM_SEV_LAUNCH_START, | ||
| 669 | 	KVM_SEV_LAUNCH_UPDATE_DATA, | ||
| 670 | 	KVM_SEV_LAUNCH_UPDATE_VMSA, | ||
| 671 | 	KVM_SEV_LAUNCH_SECRET, | ||
| 672 | 	KVM_SEV_LAUNCH_MEASURE, | ||
| 673 | 	KVM_SEV_LAUNCH_FINISH, | ||
| 674 | 	/* Guest migration commands (outgoing) */ | ||
| 675 | 	KVM_SEV_SEND_START, | ||
| 676 | 	KVM_SEV_SEND_UPDATE_DATA, | ||
| 677 | 	KVM_SEV_SEND_UPDATE_VMSA, | ||
| 678 | 	KVM_SEV_SEND_FINISH, | ||
| 679 | 	/* Guest migration commands (incoming) */ | ||
| 680 | 	KVM_SEV_RECEIVE_START, | ||
| 681 | 	KVM_SEV_RECEIVE_UPDATE_DATA, | ||
| 682 | 	KVM_SEV_RECEIVE_UPDATE_VMSA, | ||
| 683 | 	KVM_SEV_RECEIVE_FINISH, | ||
| 684 | 	/* Guest status and debug commands */ | ||
| 685 | 	KVM_SEV_GUEST_STATUS, | ||
| 686 | 	KVM_SEV_DBG_DECRYPT, | ||
| 687 | 	KVM_SEV_DBG_ENCRYPT, | ||
| 688 | 	/* Guest certificates commands */ | ||
| 689 | 	KVM_SEV_CERT_EXPORT, | ||
| 690 | 	/* Attestation report */ | ||
| 691 | 	KVM_SEV_GET_ATTESTATION_REPORT, | ||
| 692 | 	/* Guest Migration Extension */ | ||
| 693 | 	KVM_SEV_SEND_CANCEL, | ||
| 694 | |||
| 695 | 	/* Second time is the charm; improved versions of the above ioctls. */ | ||
| 696 | 	KVM_SEV_INIT2, | ||
| 697 | |||
| 698 | 	KVM_SEV_NR_MAX, | ||
| 699 | }; | ||
| 700 | |||
| 701 | struct kvm_sev_cmd { | ||
| 702 | 	__u32 id; | ||
| 703 | 	__u32 pad0; | ||
| 704 | 	__u64 data; | ||
| 705 | 	__u32 error; | ||
| 706 | 	__u32 sev_fd; | ||
| 707 | }; | ||
| 708 | |||
| 709 | struct kvm_sev_init { | ||
| 710 | 	__u64 vmsa_features; | ||
| 711 | 	__u32 flags; | ||
| 712 | 	__u16 ghcb_version; | ||
| 713 | 	__u16 pad1; | ||
| 714 | 	__u32 pad2[8]; | ||
| 715 | }; | ||
| 716 | |||
| 717 | struct kvm_sev_launch_start { | ||
| 718 | 	__u32 handle; | ||
| 719 | 	__u32 policy; | ||
| 720 | 	__u64 dh_uaddr; | ||
| 721 | 	__u32 dh_len; | ||
| 722 | 	__u32 pad0; | ||
| 723 | 	__u64 session_uaddr; | ||
| 724 | 	__u32 session_len; | ||
| 725 | 	__u32 pad1; | ||
| 726 | }; | ||
| 727 | |||
| 728 | struct kvm_sev_launch_update_data { | ||
| 729 | 	__u64 uaddr; | ||
| 730 | 	__u32 len; | ||
| 731 | 	__u32 pad0; | ||
| 732 | }; | ||
| 733 | |||
| 734 | |||
| 735 | struct kvm_sev_launch_secret { | ||
| 736 | 	__u64 hdr_uaddr; | ||
| 737 | 	__u32 hdr_len; | ||
| 738 | 	__u32 pad0; | ||
| 739 | 	__u64 guest_uaddr; | ||
| 740 | 	__u32 guest_len; | ||
| 741 | 	__u32 pad1; | ||
| 742 | 	__u64 trans_uaddr; | ||
| 743 | 	__u32 trans_len; | ||
| 744 | 	__u32 pad2; | ||
| 745 | }; | ||
| 746 | |||
| 747 | struct kvm_sev_launch_measure { | ||
| 748 | 	__u64 uaddr; | ||
| 749 | 	__u32 len; | ||
| 750 | 	__u32 pad0; | ||
| 751 | }; | ||
| 752 | |||
| 753 | struct kvm_sev_guest_status { | ||
| 754 | 	__u32 handle; | ||
| 755 | 	__u32 policy; | ||
| 756 | 	__u32 state; | ||
| 757 | }; | ||
| 758 | |||
| 759 | struct kvm_sev_dbg { | ||
| 760 | 	__u64 src_uaddr; | ||
| 761 | 	__u64 dst_uaddr; | ||
| 762 | 	__u32 len; | ||
| 763 | 	__u32 pad0; | ||
| 764 | }; | ||
| 765 | |||
| 766 | struct kvm_sev_attestation_report { | ||
| 767 | 	__u8 mnonce[16]; | ||
| 768 | 	__u64 uaddr; | ||
| 769 | 	__u32 len; | ||
| 770 | 	__u32 pad0; | ||
| 771 | }; | ||
| 772 | |||
| 773 | struct kvm_sev_send_start { | ||
| 774 | 	__u32 policy; | ||
| 775 | 	__u32 pad0; | ||
| 776 | 	__u64 pdh_cert_uaddr; | ||
| 777 | 	__u32 pdh_cert_len; | ||
| 778 | 	__u32 pad1; | ||
| 779 | 	__u64 plat_certs_uaddr; | ||
| 780 | 	__u32 plat_certs_len; | ||
| 781 | 	__u32 pad2; | ||
| 782 | 	__u64 amd_certs_uaddr; | ||
| 783 | 	__u32 amd_certs_len; | ||
| 784 | 	__u32 pad3; | ||
| 785 | 	__u64 session_uaddr; | ||
| 786 | 	__u32 session_len; | ||
| 787 | 	__u32 pad4; | ||
| 788 | }; | ||
| 789 | |||
| 790 | struct kvm_sev_send_update_data { | ||
| 791 | 	__u64 hdr_uaddr; | ||
| 792 | 	__u32 hdr_len; | ||
| 793 | 	__u32 pad0; | ||
| 794 | 	__u64 guest_uaddr; | ||
| 795 | 	__u32 guest_len; | ||
| 796 | 	__u32 pad1; | ||
| 797 | 	__u64 trans_uaddr; | ||
| 798 | 	__u32 trans_len; | ||
| 799 | 	__u32 pad2; | ||
| 800 | }; | ||
| 801 | |||
| 802 | struct kvm_sev_receive_start { | ||
| 803 | 	__u32 handle; | ||
| 804 | 	__u32 policy; | ||
| 805 | 	__u64 pdh_uaddr; | ||
| 806 | 	__u32 pdh_len; | ||
| 807 | 	__u32 pad0; | ||
| 808 | 	__u64 session_uaddr; | ||
| 809 | 	__u32 session_len; | ||
| 810 | 	__u32 pad1; | ||
| 811 | }; | ||
| 812 | |||
| 813 | struct kvm_sev_receive_update_data { | ||
| 814 | 	__u64 hdr_uaddr; | ||
| 815 | 	__u32 hdr_len; | ||
| 816 | 	__u32 pad0; | ||
| 817 | 	__u64 guest_uaddr; | ||
| 818 | 	__u32 guest_len; | ||
| 819 | 	__u32 pad1; | ||
| 820 | 	__u64 trans_uaddr; | ||
| 821 | 	__u32 trans_len; | ||
| 822 | 	__u32 pad2; | ||
| 823 | }; | ||
| 824 | |||
| 825 | #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) | ||
| 826 | #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1) | ||
| 827 | |||
| 828 | struct kvm_hyperv_eventfd { | ||
| 829 | 	__u32 conn_id; | ||
| 830 | 	__s32 fd; | ||
| 831 | 	__u32 flags; | ||
| 832 | 	__u32 padding[3]; | ||
| 833 | }; | ||
| 834 | |||
| 835 | #define KVM_HYPERV_CONN_ID_MASK		0x00ffffff | ||
| 836 | #define KVM_HYPERV_EVENTFD_DEASSIGN	(1 << 0) | ||
| 837 | |||
| 530 | /* | 838 | /* |
| 531 | * Masked event layout. | 839 | * Masked event layout. |
| 532 | * Bits Description | 840 | * Bits Description |
| ... | @@ -547,14 +855,22 @@ struct kvm_pmu_event_filter { | ... | @@ -547,14 +855,22 @@ struct kvm_pmu_event_filter { |
| 547 | 	((__u64)(!!(exclude)) << 55)) | 855 | 	((__u64)(!!(exclude)) << 55)) |
| 548 | 856 | ||
| 549 | #define KVM_PMU_MASKED_ENTRY_EVENT_SELECT \ | 857 | #define KVM_PMU_MASKED_ENTRY_EVENT_SELECT \ |
| 550 | 	(GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32)) | 858 | 	(__GENMASK_ULL(7, 0) | __GENMASK_ULL(35, 32)) |
| 551 | #define KVM_PMU_MASKED_ENTRY_UMASK_MASK		(GENMASK_ULL(63, 56)) | 859 | #define KVM_PMU_MASKED_ENTRY_UMASK_MASK		(__GENMASK_ULL(63, 56)) |
| 552 | #define KVM_PMU_MASKED_ENTRY_UMASK_MATCH	(GENMASK_ULL(15, 8)) | 860 | #define KVM_PMU_MASKED_ENTRY_UMASK_MATCH	(__GENMASK_ULL(15, 8)) |
| 553 | #define KVM_PMU_MASKED_ENTRY_EXCLUDE		(BIT_ULL(55)) | 861 | #define KVM_PMU_MASKED_ENTRY_EXCLUDE		(_BITULL(55)) |
| 554 | #define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT	(56) | 862 | #define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT	(56) |
| 555 | 863 | ||
| 556 | /* for KVM_{GET,SET,HAS}_DEVICE_ATTR */ | 864 | /* for KVM_{GET,SET,HAS}_DEVICE_ATTR */ |
| 557 | #define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */ | 865 | #define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */ |
| 558 | #define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */ | 866 | #define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */ |
| 559 | 867 | ||
| 868 | /* x86-specific KVM_EXIT_HYPERCALL flags. */ | ||
| 869 | #define KVM_EXIT_HYPERCALL_LONG_MODE	_BITULL(0) | ||
| 870 | |||
| 871 | #define KVM_X86_DEFAULT_VM	0 | ||
| 872 | #define KVM_X86_SW_PROTECTED_VM	1 | ||
| 873 | #define KVM_X86_SEV_VM		2 | ||
| 874 | #define KVM_X86_SEV_ES_VM	3 | ||
| 875 | |||
| 560 | #endif /* _ASM_X86_KVM_H */ | 876 | #endif /* _ASM_X86_KVM_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/kvm_para.h+1-2| ... | @@ -92,7 +92,7 @@ struct kvm_clock_pairing { | ... | @@ -92,7 +92,7 @@ struct kvm_clock_pairing { |
| 92 | #define KVM_ASYNC_PF_DELIVERY_AS_INT		(1 << 3) | 92 | #define KVM_ASYNC_PF_DELIVERY_AS_INT		(1 << 3) |
| 93 | 93 | ||
| 94 | /* MSR_KVM_ASYNC_PF_INT */ | 94 | /* MSR_KVM_ASYNC_PF_INT */ |
| 95 | #define KVM_ASYNC_PF_VEC_MASK			GENMASK(7, 0) | 95 | #define KVM_ASYNC_PF_VEC_MASK			__GENMASK(7, 0) |
| 96 | 96 | ||
| 97 | /* MSR_KVM_MIGRATION_CONTROL */ | 97 | /* MSR_KVM_MIGRATION_CONTROL */ |
| 98 | #define KVM_MIGRATION_READY		(1 << 0) | 98 | #define KVM_MIGRATION_READY		(1 << 0) |
| ... | @@ -142,7 +142,6 @@ struct kvm_vcpu_pv_apf_data { | ... | @@ -142,7 +142,6 @@ struct kvm_vcpu_pv_apf_data { |
| 142 | 	__u32 token; | 142 | 	__u32 token; |
| 143 | 143 | ||
| 144 | 	__u8 pad[56]; | 144 | 	__u8 pad[56]; |
| 145 | 	__u32 enabled; | ||
| 146 | }; | 145 | }; |
| 147 | 146 | ||
| 148 | #define KVM_PV_EOI_BIT 0 | 147 | #define KVM_PV_EOI_BIT 0 |
lib/libc/include/x86-linux-any/asm/mman.h+3-7| ... | @@ -3,14 +3,10 @@ | ... | @@ -3,14 +3,10 @@ |
| 3 | #define _ASM_X86_MMAN_H | 3 | #define _ASM_X86_MMAN_H |
| 4 | 4 | ||
| 5 | #define MAP_32BIT	0x40		/* only give out 32bit addresses */ | 5 | #define MAP_32BIT	0x40		/* only give out 32bit addresses */ |
| 6 | #define MAP_ABOVE4G	0x80		/* only map above 4GB */ | ||
| 6 | 7 | ||
| 7 | #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS | 8 | /* Flags for map_shadow_stack(2) */ |
| 8 | #define arch_calc_vm_prot_bits(prot, key) (		\ | 9 | #define SHADOW_STACK_SET_TOKEN	(1ULL << 0)	/* Set up a restore token in the shadow stack */ |
| 9 | 		((key) & 0x1 ? VM_PKEY_BIT0 : 0) | \ | ||
| 10 | 		((key) & 0x2 ? VM_PKEY_BIT1 : 0) | \ | ||
| 11 | 		((key) & 0x4 ? VM_PKEY_BIT2 : 0) | \ | ||
| 12 | 		((key) & 0x8 ? VM_PKEY_BIT3 : 0)) | ||
| 13 | #endif | ||
| 14 | 10 | ||
| 15 | #include <asm-generic/mman.h> | 11 | #include <asm-generic/mman.h> |
| 16 | 12 |
lib/libc/include/x86-linux-any/asm/mtrr.h+3-11| ... | @@ -81,14 +81,6 @@ typedef __u8 mtrr_type; | ... | @@ -81,14 +81,6 @@ typedef __u8 mtrr_type; |
| 81 | #define MTRR_NUM_FIXED_RANGES 88 | 81 | #define MTRR_NUM_FIXED_RANGES 88 |
| 82 | #define MTRR_MAX_VAR_RANGES 256 | 82 | #define MTRR_MAX_VAR_RANGES 256 |
| 83 | 83 | ||
| 84 | struct mtrr_state_type { | ||
| 85 | 	struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES]; | ||
| 86 | 	mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES]; | ||
| 87 | 	unsigned char enabled; | ||
| 88 | 	unsigned char have_fixed; | ||
| 89 | 	mtrr_type def_type; | ||
| 90 | }; | ||
| 91 | |||
| 92 | #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) | 84 | #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) |
| 93 | #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) | 85 | #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) |
| 94 | 86 | ||
| ... | @@ -115,9 +107,9 @@ struct mtrr_state_type { | ... | @@ -115,9 +107,9 @@ struct mtrr_state_type { |
| 115 | #define MTRR_NUM_TYPES 7 | 107 | #define MTRR_NUM_TYPES 7 |
| 116 | 108 | ||
| 117 | /* | 109 | /* |
| 118 | * Invalid MTRR memory type. mtrr_type_lookup() returns this value when | 110 | * Invalid MTRR memory type. No longer used outside of MTRR code. |
| 119 | * MTRRs are disabled. Note, this value is allocated from the reserved | 111 | * Note, this value is allocated from the reserved values (0x7-0xff) of |
| 120 | * values (0x7-0xff) of the MTRR memory types. | 112 | * the MTRR memory types. |
| 121 | */ | 113 | */ |
| 122 | #define MTRR_TYPE_INVALID 0xff | 114 | #define MTRR_TYPE_INVALID 0xff |
| 123 | 115 |
lib/libc/include/x86-linux-any/asm/prctl.h+20| ... | @@ -16,8 +16,28 @@ | ... | @@ -16,8 +16,28 @@ |
| 16 | #define ARCH_GET_XCOMP_GUEST_PERM	0x1024 | 16 | #define ARCH_GET_XCOMP_GUEST_PERM	0x1024 |
| 17 | #define ARCH_REQ_XCOMP_GUEST_PERM	0x1025 | 17 | #define ARCH_REQ_XCOMP_GUEST_PERM	0x1025 |
| 18 | 18 | ||
| 19 | #define ARCH_XCOMP_TILECFG		17 | ||
| 20 | #define ARCH_XCOMP_TILEDATA		18 | ||
| 21 | |||
| 19 | #define ARCH_MAP_VDSO_X32		0x2001 | 22 | #define ARCH_MAP_VDSO_X32		0x2001 |
| 20 | #define ARCH_MAP_VDSO_32		0x2002 | 23 | #define ARCH_MAP_VDSO_32		0x2002 |
| 21 | #define ARCH_MAP_VDSO_64		0x2003 | 24 | #define ARCH_MAP_VDSO_64		0x2003 |
| 22 | 25 | ||
| 26 | /* Don't use 0x3001-0x3004 because of old glibcs */ | ||
| 27 | |||
| 28 | #define ARCH_GET_UNTAG_MASK		0x4001 | ||
| 29 | #define ARCH_ENABLE_TAGGED_ADDR		0x4002 | ||
| 30 | #define ARCH_GET_MAX_TAG_BITS		0x4003 | ||
| 31 | #define ARCH_FORCE_TAGGED_SVA		0x4004 | ||
| 32 | |||
| 33 | #define ARCH_SHSTK_ENABLE		0x5001 | ||
| 34 | #define ARCH_SHSTK_DISABLE		0x5002 | ||
| 35 | #define ARCH_SHSTK_LOCK			0x5003 | ||
| 36 | #define ARCH_SHSTK_UNLOCK		0x5004 | ||
| 37 | #define ARCH_SHSTK_STATUS		0x5005 | ||
| 38 | |||
| 39 | /* ARCH_SHSTK_ features bits */ | ||
| 40 | #define ARCH_SHSTK_SHSTK		(1ULL << 0) | ||
| 41 | #define ARCH_SHSTK_WRSS			(1ULL << 1) | ||
| 42 | |||
| 23 | #endif /* _ASM_X86_PRCTL_H */ | 43 | #endif /* _ASM_X86_PRCTL_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/processor-flags.h+13| ... | @@ -82,6 +82,10 @@ | ... | @@ -82,6 +82,10 @@ |
| 82 | #define X86_CR3_PCID_BITS	12 | 82 | #define X86_CR3_PCID_BITS	12 |
| 83 | #define X86_CR3_PCID_MASK	(_AC((1UL << X86_CR3_PCID_BITS) - 1, UL)) | 83 | #define X86_CR3_PCID_MASK	(_AC((1UL << X86_CR3_PCID_BITS) - 1, UL)) |
| 84 | 84 | ||
| 85 | #define X86_CR3_LAM_U57_BIT	61 /* Activate LAM for userspace, 62:57 bits masked */ | ||
| 86 | #define X86_CR3_LAM_U57		_BITULL(X86_CR3_LAM_U57_BIT) | ||
| 87 | #define X86_CR3_LAM_U48_BIT	62 /* Activate LAM for userspace, 62:48 bits masked */ | ||
| 88 | #define X86_CR3_LAM_U48		_BITULL(X86_CR3_LAM_U48_BIT) | ||
| 85 | #define X86_CR3_PCID_NOFLUSH_BIT 63 /* Preserve old PCID */ | 89 | #define X86_CR3_PCID_NOFLUSH_BIT 63 /* Preserve old PCID */ |
| 86 | #define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT) | 90 | #define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT) |
| 87 | 91 | ||
| ... | @@ -132,6 +136,15 @@ | ... | @@ -132,6 +136,15 @@ |
| 132 | #define X86_CR4_PKE		_BITUL(X86_CR4_PKE_BIT) | 136 | #define X86_CR4_PKE		_BITUL(X86_CR4_PKE_BIT) |
| 133 | #define X86_CR4_CET_BIT		23 /* enable Control-flow Enforcement Technology */ | 137 | #define X86_CR4_CET_BIT		23 /* enable Control-flow Enforcement Technology */ |
| 134 | #define X86_CR4_CET		_BITUL(X86_CR4_CET_BIT) | 138 | #define X86_CR4_CET		_BITUL(X86_CR4_CET_BIT) |
| 139 | #define X86_CR4_LAM_SUP_BIT	28 /* LAM for supervisor pointers */ | ||
| 140 | #define X86_CR4_LAM_SUP		_BITUL(X86_CR4_LAM_SUP_BIT) | ||
| 141 | |||
| 142 | #ifdef __x86_64__ | ||
| 143 | #define X86_CR4_FRED_BIT	32 /* enable FRED kernel entry */ | ||
| 144 | #define X86_CR4_FRED		_BITUL(X86_CR4_FRED_BIT) | ||
| 145 | #else | ||
| 146 | #define X86_CR4_FRED		(0) | ||
| 147 | #endif | ||
| 135 | 148 | ||
| 136 | /* | 149 | /* |
| 137 | * x86-64 Task Priority Register, CR8 | 150 | * x86-64 Task Priority Register, CR8 |
lib/libc/include/x86-linux-any/asm/setup_data.h created+83| ... | @@ -0,0 +1,83 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _ASM_X86_SETUP_DATA_H | ||
| 3 | #define _ASM_X86_SETUP_DATA_H | ||
| 4 | |||
| 5 | /* setup_data/setup_indirect types */ | ||
| 6 | #define SETUP_NONE			0 | ||
| 7 | #define SETUP_E820_EXT			1 | ||
| 8 | #define SETUP_DTB			2 | ||
| 9 | #define SETUP_PCI			3 | ||
| 10 | #define SETUP_EFI			4 | ||
| 11 | #define SETUP_APPLE_PROPERTIES		5 | ||
| 12 | #define SETUP_JAILHOUSE			6 | ||
| 13 | #define SETUP_CC_BLOB			7 | ||
| 14 | #define SETUP_IMA			8 | ||
| 15 | #define SETUP_RNG_SEED			9 | ||
| 16 | #define SETUP_ENUM_MAX			SETUP_RNG_SEED | ||
| 17 | |||
| 18 | #define SETUP_INDIRECT			(1<<31) | ||
| 19 | #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT) | ||
| 20 | |||
| 21 | #ifndef __ASSEMBLY__ | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | /* extensible setup data list node */ | ||
| 26 | struct setup_data { | ||
| 27 | 	__u64 next; | ||
| 28 | 	__u32 type; | ||
| 29 | 	__u32 len; | ||
| 30 | 	__u8 data[]; | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* extensible setup indirect data node */ | ||
| 34 | struct setup_indirect { | ||
| 35 | 	__u32 type; | ||
| 36 | 	__u32 reserved; /* Reserved, must be set to zero. */ | ||
| 37 | 	__u64 len; | ||
| 38 | 	__u64 addr; | ||
| 39 | }; | ||
| 40 | |||
| 41 | /* | ||
| 42 | * The E820 memory region entry of the boot protocol ABI: | ||
| 43 | */ | ||
| 44 | struct boot_e820_entry { | ||
| 45 | 	__u64 addr; | ||
| 46 | 	__u64 size; | ||
| 47 | 	__u32 type; | ||
| 48 | } __attribute__((packed)); | ||
| 49 | |||
| 50 | /* | ||
| 51 | * The boot loader is passing platform information via this Jailhouse-specific | ||
| 52 | * setup data structure. | ||
| 53 | */ | ||
| 54 | struct jailhouse_setup_data { | ||
| 55 | 	struct { | ||
| 56 | 		__u16	version; | ||
| 57 | 		__u16	compatible_version; | ||
| 58 | 	} __attribute__((packed)) hdr; | ||
| 59 | 	struct { | ||
| 60 | 		__u16	pm_timer_address; | ||
| 61 | 		__u16	num_cpus; | ||
| 62 | 		__u64	pci_mmconfig_base; | ||
| 63 | 		__u32	tsc_khz; | ||
| 64 | 		__u32	apic_khz; | ||
| 65 | 		__u8	standard_ioapic; | ||
| 66 | 		__u8	cpu_ids[255]; | ||
| 67 | 	} __attribute__((packed)) v1; | ||
| 68 | 	struct { | ||
| 69 | 		__u32	flags; | ||
| 70 | 	} __attribute__((packed)) v2; | ||
| 71 | } __attribute__((packed)); | ||
| 72 | |||
| 73 | /* | ||
| 74 | * IMA buffer setup data information from the previous kernel during kexec | ||
| 75 | */ | ||
| 76 | struct ima_setup_data { | ||
| 77 | 	__u64 addr; | ||
| 78 | 	__u64 size; | ||
| 79 | } __attribute__((packed)); | ||
| 80 | |||
| 81 | #endif /* __ASSEMBLY__ */ | ||
| 82 | |||
| 83 | #endif /* _ASM_X86_SETUP_DATA_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/signal.h-1| ... | @@ -4,7 +4,6 @@ | ... | @@ -4,7 +4,6 @@ |
| 4 | 4 | ||
| 5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | #include <linux/time.h> | ||
| 8 | 7 | ||
| 9 | 8 | ||
| 10 | /* Avoid too many header ordering problems. */ | 9 | /* Avoid too many header ordering problems. */ |
lib/libc/include/x86-linux-any/asm/unistd_32.h+12| ... | @@ -441,6 +441,18 @@ | ... | @@ -441,6 +441,18 @@ |
| 441 | #define __NR_process_mrelease 448 | 441 | #define __NR_process_mrelease 448 |
| 442 | #define __NR_futex_waitv 449 | 442 | #define __NR_futex_waitv 449 |
| 443 | #define __NR_set_mempolicy_home_node 450 | 443 | #define __NR_set_mempolicy_home_node 450 |
| 444 | #define __NR_cachestat 451 | ||
| 445 | #define __NR_fchmodat2 452 | ||
| 446 | #define __NR_map_shadow_stack 453 | ||
| 447 | #define __NR_futex_wake 454 | ||
| 448 | #define __NR_futex_wait 455 | ||
| 449 | #define __NR_futex_requeue 456 | ||
| 450 | #define __NR_statmount 457 | ||
| 451 | #define __NR_listmount 458 | ||
| 452 | #define __NR_lsm_get_self_attr 459 | ||
| 453 | #define __NR_lsm_set_self_attr 460 | ||
| 454 | #define __NR_lsm_list_modules 461 | ||
| 455 | #define __NR_mseal 462 | ||
| 444 | 456 | ||
| 445 | 457 | ||
| 446 | #endif /* _ASM_UNISTD_32_H */ | 458 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/unistd_64.h+12| ... | @@ -363,6 +363,18 @@ | ... | @@ -363,6 +363,18 @@ |
| 363 | #define __NR_process_mrelease 448 | 363 | #define __NR_process_mrelease 448 |
| 364 | #define __NR_futex_waitv 449 | 364 | #define __NR_futex_waitv 449 |
| 365 | #define __NR_set_mempolicy_home_node 450 | 365 | #define __NR_set_mempolicy_home_node 450 |
| 366 | #define __NR_cachestat 451 | ||
| 367 | #define __NR_fchmodat2 452 | ||
| 368 | #define __NR_map_shadow_stack 453 | ||
| 369 | #define __NR_futex_wake 454 | ||
| 370 | #define __NR_futex_wait 455 | ||
| 371 | #define __NR_futex_requeue 456 | ||
| 372 | #define __NR_statmount 457 | ||
| 373 | #define __NR_listmount 458 | ||
| 374 | #define __NR_lsm_get_self_attr 459 | ||
| 375 | #define __NR_lsm_set_self_attr 460 | ||
| 376 | #define __NR_lsm_list_modules 461 | ||
| 377 | #define __NR_mseal 462 | ||
| 366 | 378 | ||
| 367 | 379 | ||
| 368 | #endif /* _ASM_UNISTD_64_H */ | 380 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/unistd_x32.h+12| ... | @@ -316,6 +316,18 @@ | ... | @@ -316,6 +316,18 @@ |
| 316 | #define __NR_process_mrelease (__X32_SYSCALL_BIT + 448) | 316 | #define __NR_process_mrelease (__X32_SYSCALL_BIT + 448) |
| 317 | #define __NR_futex_waitv (__X32_SYSCALL_BIT + 449) | 317 | #define __NR_futex_waitv (__X32_SYSCALL_BIT + 449) |
| 318 | #define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450) | 318 | #define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450) |
| 319 | #define __NR_cachestat (__X32_SYSCALL_BIT + 451) | ||
| 320 | #define __NR_fchmodat2 (__X32_SYSCALL_BIT + 452) | ||
| 321 | #define __NR_map_shadow_stack (__X32_SYSCALL_BIT + 453) | ||
| 322 | #define __NR_futex_wake (__X32_SYSCALL_BIT + 454) | ||
| 323 | #define __NR_futex_wait (__X32_SYSCALL_BIT + 455) | ||
| 324 | #define __NR_futex_requeue (__X32_SYSCALL_BIT + 456) | ||
| 325 | #define __NR_statmount (__X32_SYSCALL_BIT + 457) | ||
| 326 | #define __NR_listmount (__X32_SYSCALL_BIT + 458) | ||
| 327 | #define __NR_lsm_get_self_attr (__X32_SYSCALL_BIT + 459) | ||
| 328 | #define __NR_lsm_set_self_attr (__X32_SYSCALL_BIT + 460) | ||
| 329 | #define __NR_lsm_list_modules (__X32_SYSCALL_BIT + 461) | ||
| 330 | #define __NR_mseal (__X32_SYSCALL_BIT + 462) | ||
| 319 | #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) | 331 | #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) |
| 320 | #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) | 332 | #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) |
| 321 | #define __NR_ioctl (__X32_SYSCALL_BIT + 514) | 333 | #define __NR_ioctl (__X32_SYSCALL_BIT + 514) |
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+12| ... | @@ -397,6 +397,18 @@ | ... | @@ -397,6 +397,18 @@ |
| 397 | #define __NR_process_mrelease 448 | 397 | #define __NR_process_mrelease 448 |
| 398 | #define __NR_futex_waitv 449 | 398 | #define __NR_futex_waitv 449 |
| 399 | #define __NR_set_mempolicy_home_node 450 | 399 | #define __NR_set_mempolicy_home_node 450 |
| 400 | #define __NR_cachestat 451 | ||
| 401 | #define __NR_fchmodat2 452 | ||
| 402 | #define __NR_map_shadow_stack 453 | ||
| 403 | #define __NR_futex_wake 454 | ||
| 404 | #define __NR_futex_wait 455 | ||
| 405 | #define __NR_futex_requeue 456 | ||
| 406 | #define __NR_statmount 457 | ||
| 407 | #define __NR_listmount 458 | ||
| 408 | #define __NR_lsm_get_self_attr 459 | ||
| 409 | #define __NR_lsm_set_self_attr 460 | ||
| 410 | #define __NR_lsm_list_modules 461 | ||
| 411 | #define __NR_mseal 462 | ||
| 400 | 412 | ||
| 401 | 413 | ||
| 402 | #endif /* _ASM_UNISTD_32_H */ | 414 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/std/Target.zig+1-1| ... | @@ -481,7 +481,7 @@ pub const Os = struct { | ... | @@ -481,7 +481,7 @@ pub const Os = struct { |
| 481 | .linux = .{ | 481 | .linux = .{ |
| 482 | .range = .{ | 482 | .range = .{ |
| 483 | .min = .{ .major = 4, .minor = 19, .patch = 0 }, | 483 | .min = .{ .major = 4, .minor = 19, .patch = 0 }, |
| 484 | .max = .{ .major = 6, .minor = 5, .patch = 7 }, | 484 | .max = .{ .major = 6, .minor = 10, .patch = 3 }, |
| 485 | }, | 485 | }, |
| 486 | .glibc = blk: { | 486 | .glibc = blk: { |
| 487 | const default_min = .{ .major = 2, .minor = 28, .patch = 0 }; | 487 | const default_min = .{ .major = 2, .minor = 28, .patch = 0 }; |
lib/std/os/linux/syscalls.zig+120| ... | @@ -448,6 +448,12 @@ pub const X86 = enum(usize) { | ... | @@ -448,6 +448,12 @@ pub const X86 = enum(usize) { |
| 448 | futex_wake = 454, | 448 | futex_wake = 454, |
| 449 | futex_wait = 455, | 449 | futex_wait = 455, |
| 450 | futex_requeue = 456, | 450 | futex_requeue = 456, |
| 451 | statmount = 457, | ||
| 452 | listmount = 458, | ||
| 453 | lsm_get_self_attr = 459, | ||
| 454 | lsm_set_self_attr = 460, | ||
| 455 | lsm_list_modules = 461, | ||
| 456 | mseal = 462, | ||
| 451 | }; | 457 | }; |
| 452 | 458 | ||
| 453 | pub const X64 = enum(usize) { | 459 | pub const X64 = enum(usize) { |
| ... | @@ -819,6 +825,12 @@ pub const X64 = enum(usize) { | ... | @@ -819,6 +825,12 @@ pub const X64 = enum(usize) { |
| 819 | futex_wake = 454, | 825 | futex_wake = 454, |
| 820 | futex_wait = 455, | 826 | futex_wait = 455, |
| 821 | futex_requeue = 456, | 827 | futex_requeue = 456, |
| 828 | statmount = 457, | ||
| 829 | listmount = 458, | ||
| 830 | lsm_get_self_attr = 459, | ||
| 831 | lsm_set_self_attr = 460, | ||
| 832 | lsm_list_modules = 461, | ||
| 833 | mseal = 462, | ||
| 822 | }; | 834 | }; |
| 823 | 835 | ||
| 824 | pub const Arm = enum(usize) { | 836 | pub const Arm = enum(usize) { |
| ... | @@ -1233,6 +1245,12 @@ pub const Arm = enum(usize) { | ... | @@ -1233,6 +1245,12 @@ pub const Arm = enum(usize) { |
| 1233 | futex_wake = 454, | 1245 | futex_wake = 454, |
| 1234 | futex_wait = 455, | 1246 | futex_wait = 455, |
| 1235 | futex_requeue = 456, | 1247 | futex_requeue = 456, |
| 1248 | statmount = 457, | ||
| 1249 | listmount = 458, | ||
| 1250 | lsm_get_self_attr = 459, | ||
| 1251 | lsm_set_self_attr = 460, | ||
| 1252 | lsm_list_modules = 461, | ||
| 1253 | mseal = 462, | ||
| 1236 | 1254 | ||
| 1237 | breakpoint = arm_base + 1, | 1255 | breakpoint = arm_base + 1, |
| 1238 | cacheflush = arm_base + 2, | 1256 | cacheflush = arm_base + 2, |
| ... | @@ -1668,6 +1686,12 @@ pub const Sparc = enum(usize) { | ... | @@ -1668,6 +1686,12 @@ pub const Sparc = enum(usize) { |
| 1668 | futex_wake = 454, | 1686 | futex_wake = 454, |
| 1669 | futex_wait = 455, | 1687 | futex_wait = 455, |
| 1670 | futex_requeue = 456, | 1688 | futex_requeue = 456, |
| 1689 | statmount = 457, | ||
| 1690 | listmount = 458, | ||
| 1691 | lsm_get_self_attr = 459, | ||
| 1692 | lsm_set_self_attr = 460, | ||
| 1693 | lsm_list_modules = 461, | ||
| 1694 | mseal = 462, | ||
| 1671 | }; | 1695 | }; |
| 1672 | 1696 | ||
| 1673 | pub const Sparc64 = enum(usize) { | 1697 | pub const Sparc64 = enum(usize) { |
| ... | @@ -2059,6 +2083,12 @@ pub const Sparc64 = enum(usize) { | ... | @@ -2059,6 +2083,12 @@ pub const Sparc64 = enum(usize) { |
| 2059 | futex_wake = 454, | 2083 | futex_wake = 454, |
| 2060 | futex_wait = 455, | 2084 | futex_wait = 455, |
| 2061 | futex_requeue = 456, | 2085 | futex_requeue = 456, |
| 2086 | statmount = 457, | ||
| 2087 | listmount = 458, | ||
| 2088 | lsm_get_self_attr = 459, | ||
| 2089 | lsm_set_self_attr = 460, | ||
| 2090 | lsm_list_modules = 461, | ||
| 2091 | mseal = 462, | ||
| 2062 | }; | 2092 | }; |
| 2063 | 2093 | ||
| 2064 | pub const M68k = enum(usize) { | 2094 | pub const M68k = enum(usize) { |
| ... | @@ -2490,6 +2520,12 @@ pub const M68k = enum(usize) { | ... | @@ -2490,6 +2520,12 @@ pub const M68k = enum(usize) { |
| 2490 | futex_wake = 454, | 2520 | futex_wake = 454, |
| 2491 | futex_wait = 455, | 2521 | futex_wait = 455, |
| 2492 | futex_requeue = 456, | 2522 | futex_requeue = 456, |
| 2523 | statmount = 457, | ||
| 2524 | listmount = 458, | ||
| 2525 | lsm_get_self_attr = 459, | ||
| 2526 | lsm_set_self_attr = 460, | ||
| 2527 | lsm_list_modules = 461, | ||
| 2528 | mseal = 462, | ||
| 2493 | }; | 2529 | }; |
| 2494 | 2530 | ||
| 2495 | pub const MipsO32 = enum(usize) { | 2531 | pub const MipsO32 = enum(usize) { |
| ... | @@ -2917,6 +2953,12 @@ pub const MipsO32 = enum(usize) { | ... | @@ -2917,6 +2953,12 @@ pub const MipsO32 = enum(usize) { |
| 2917 | futex_wake = linux_base + 454, | 2953 | futex_wake = linux_base + 454, |
| 2918 | futex_wait = linux_base + 455, | 2954 | futex_wait = linux_base + 455, |
| 2919 | futex_requeue = linux_base + 456, | 2955 | futex_requeue = linux_base + 456, |
| 2956 | statmount = linux_base + 457, | ||
| 2957 | listmount = linux_base + 458, | ||
| 2958 | lsm_get_self_attr = linux_base + 459, | ||
| 2959 | lsm_set_self_attr = linux_base + 460, | ||
| 2960 | lsm_list_modules = linux_base + 461, | ||
| 2961 | mseal = linux_base + 462, | ||
| 2920 | }; | 2962 | }; |
| 2921 | 2963 | ||
| 2922 | pub const MipsN64 = enum(usize) { | 2964 | pub const MipsN64 = enum(usize) { |
| ... | @@ -3280,6 +3322,12 @@ pub const MipsN64 = enum(usize) { | ... | @@ -3280,6 +3322,12 @@ pub const MipsN64 = enum(usize) { |
| 3280 | futex_wake = linux_base + 454, | 3322 | futex_wake = linux_base + 454, |
| 3281 | futex_wait = linux_base + 455, | 3323 | futex_wait = linux_base + 455, |
| 3282 | futex_requeue = linux_base + 456, | 3324 | futex_requeue = linux_base + 456, |
| 3325 | statmount = linux_base + 457, | ||
| 3326 | listmount = linux_base + 458, | ||
| 3327 | lsm_get_self_attr = linux_base + 459, | ||
| 3328 | lsm_set_self_attr = linux_base + 460, | ||
| 3329 | lsm_list_modules = linux_base + 461, | ||
| 3330 | mseal = linux_base + 462, | ||
| 3283 | }; | 3331 | }; |
| 3284 | 3332 | ||
| 3285 | pub const MipsN32 = enum(usize) { | 3333 | pub const MipsN32 = enum(usize) { |
| ... | @@ -3667,6 +3715,12 @@ pub const MipsN32 = enum(usize) { | ... | @@ -3667,6 +3715,12 @@ pub const MipsN32 = enum(usize) { |
| 3667 | futex_wake = linux_base + 454, | 3715 | futex_wake = linux_base + 454, |
| 3668 | futex_wait = linux_base + 455, | 3716 | futex_wait = linux_base + 455, |
| 3669 | futex_requeue = linux_base + 456, | 3717 | futex_requeue = linux_base + 456, |
| 3718 | statmount = linux_base + 457, | ||
| 3719 | listmount = linux_base + 458, | ||
| 3720 | lsm_get_self_attr = linux_base + 459, | ||
| 3721 | lsm_set_self_attr = linux_base + 460, | ||
| 3722 | lsm_list_modules = linux_base + 461, | ||
| 3723 | mseal = linux_base + 462, | ||
| 3670 | }; | 3724 | }; |
| 3671 | 3725 | ||
| 3672 | pub const PowerPC = enum(usize) { | 3726 | pub const PowerPC = enum(usize) { |
| ... | @@ -4107,6 +4161,12 @@ pub const PowerPC = enum(usize) { | ... | @@ -4107,6 +4161,12 @@ pub const PowerPC = enum(usize) { |
| 4107 | futex_wake = 454, | 4161 | futex_wake = 454, |
| 4108 | futex_wait = 455, | 4162 | futex_wait = 455, |
| 4109 | futex_requeue = 456, | 4163 | futex_requeue = 456, |
| 4164 | statmount = 457, | ||
| 4165 | listmount = 458, | ||
| 4166 | lsm_get_self_attr = 459, | ||
| 4167 | lsm_set_self_attr = 460, | ||
| 4168 | lsm_list_modules = 461, | ||
| 4169 | mseal = 462, | ||
| 4110 | }; | 4170 | }; |
| 4111 | 4171 | ||
| 4112 | pub const PowerPC64 = enum(usize) { | 4172 | pub const PowerPC64 = enum(usize) { |
| ... | @@ -4519,6 +4579,12 @@ pub const PowerPC64 = enum(usize) { | ... | @@ -4519,6 +4579,12 @@ pub const PowerPC64 = enum(usize) { |
| 4519 | futex_wake = 454, | 4579 | futex_wake = 454, |
| 4520 | futex_wait = 455, | 4580 | futex_wait = 455, |
| 4521 | futex_requeue = 456, | 4581 | futex_requeue = 456, |
| 4582 | statmount = 457, | ||
| 4583 | listmount = 458, | ||
| 4584 | lsm_get_self_attr = 459, | ||
| 4585 | lsm_set_self_attr = 460, | ||
| 4586 | lsm_list_modules = 461, | ||
| 4587 | mseal = 462, | ||
| 4522 | }; | 4588 | }; |
| 4523 | 4589 | ||
| 4524 | pub const S390x = enum(usize) { | 4590 | pub const S390x = enum(usize) { |
| ... | @@ -4897,6 +4963,12 @@ pub const S390x = enum(usize) { | ... | @@ -4897,6 +4963,12 @@ pub const S390x = enum(usize) { |
| 4897 | futex_wake = 454, | 4963 | futex_wake = 454, |
| 4898 | futex_wait = 455, | 4964 | futex_wait = 455, |
| 4899 | futex_requeue = 456, | 4965 | futex_requeue = 456, |
| 4966 | statmount = 457, | ||
| 4967 | listmount = 458, | ||
| 4968 | lsm_get_self_attr = 459, | ||
| 4969 | lsm_set_self_attr = 460, | ||
| 4970 | lsm_list_modules = 461, | ||
| 4971 | mseal = 462, | ||
| 4900 | }; | 4972 | }; |
| 4901 | 4973 | ||
| 4902 | pub const Xtensa = enum(usize) { | 4974 | pub const Xtensa = enum(usize) { |
| ... | @@ -5279,6 +5351,12 @@ pub const Xtensa = enum(usize) { | ... | @@ -5279,6 +5351,12 @@ pub const Xtensa = enum(usize) { |
| 5279 | futex_wake = 454, | 5351 | futex_wake = 454, |
| 5280 | futex_wait = 455, | 5352 | futex_wait = 455, |
| 5281 | futex_requeue = 456, | 5353 | futex_requeue = 456, |
| 5354 | statmount = 457, | ||
| 5355 | listmount = 458, | ||
| 5356 | lsm_get_self_attr = 459, | ||
| 5357 | lsm_set_self_attr = 460, | ||
| 5358 | lsm_list_modules = 461, | ||
| 5359 | mseal = 462, | ||
| 5282 | }; | 5360 | }; |
| 5283 | 5361 | ||
| 5284 | pub const Arm64 = enum(usize) { | 5362 | pub const Arm64 = enum(usize) { |
| ... | @@ -5594,6 +5672,12 @@ pub const Arm64 = enum(usize) { | ... | @@ -5594,6 +5672,12 @@ pub const Arm64 = enum(usize) { |
| 5594 | futex_wake = 454, | 5672 | futex_wake = 454, |
| 5595 | futex_wait = 455, | 5673 | futex_wait = 455, |
| 5596 | futex_requeue = 456, | 5674 | futex_requeue = 456, |
| 5675 | statmount = 457, | ||
| 5676 | listmount = 458, | ||
| 5677 | lsm_get_self_attr = 459, | ||
| 5678 | lsm_set_self_attr = 460, | ||
| 5679 | lsm_list_modules = 461, | ||
| 5680 | mseal = 462, | ||
| 5597 | }; | 5681 | }; |
| 5598 | 5682 | ||
| 5599 | pub const RiscV32 = enum(usize) { | 5683 | pub const RiscV32 = enum(usize) { |
| ... | @@ -5898,6 +5982,12 @@ pub const RiscV32 = enum(usize) { | ... | @@ -5898,6 +5982,12 @@ pub const RiscV32 = enum(usize) { |
| 5898 | futex_wake = 454, | 5982 | futex_wake = 454, |
| 5899 | futex_wait = 455, | 5983 | futex_wait = 455, |
| 5900 | futex_requeue = 456, | 5984 | futex_requeue = 456, |
| 5985 | statmount = 457, | ||
| 5986 | listmount = 458, | ||
| 5987 | lsm_get_self_attr = 459, | ||
| 5988 | lsm_set_self_attr = 460, | ||
| 5989 | lsm_list_modules = 461, | ||
| 5990 | mseal = 462, | ||
| 5901 | riscv_flush_icache = (244 + 15), | 5991 | riscv_flush_icache = (244 + 15), |
| 5902 | riscv_hwprobe = (244 + 14), | 5992 | riscv_hwprobe = (244 + 14), |
| 5903 | }; | 5993 | }; |
| ... | @@ -6214,6 +6304,12 @@ pub const RiscV64 = enum(usize) { | ... | @@ -6214,6 +6304,12 @@ pub const RiscV64 = enum(usize) { |
| 6214 | futex_wake = 454, | 6304 | futex_wake = 454, |
| 6215 | futex_wait = 455, | 6305 | futex_wait = 455, |
| 6216 | futex_requeue = 456, | 6306 | futex_requeue = 456, |
| 6307 | statmount = 457, | ||
| 6308 | listmount = 458, | ||
| 6309 | lsm_get_self_attr = 459, | ||
| 6310 | lsm_set_self_attr = 460, | ||
| 6311 | lsm_list_modules = 461, | ||
| 6312 | mseal = 462, | ||
| 6217 | riscv_flush_icache = (244 + 15), | 6313 | riscv_flush_icache = (244 + 15), |
| 6218 | riscv_hwprobe = (244 + 14), | 6314 | riscv_hwprobe = (244 + 14), |
| 6219 | }; | 6315 | }; |
| ... | @@ -6525,6 +6621,12 @@ pub const LoongArch64 = enum(usize) { | ... | @@ -6525,6 +6621,12 @@ pub const LoongArch64 = enum(usize) { |
| 6525 | futex_wake = 454, | 6621 | futex_wake = 454, |
| 6526 | futex_wait = 455, | 6622 | futex_wait = 455, |
| 6527 | futex_requeue = 456, | 6623 | futex_requeue = 456, |
| 6624 | statmount = 457, | ||
| 6625 | listmount = 458, | ||
| 6626 | lsm_get_self_attr = 459, | ||
| 6627 | lsm_set_self_attr = 460, | ||
| 6628 | lsm_list_modules = 461, | ||
| 6629 | mseal = 462, | ||
| 6528 | }; | 6630 | }; |
| 6529 | 6631 | ||
| 6530 | pub const Arc = enum(usize) { | 6632 | pub const Arc = enum(usize) { |
| ... | @@ -6859,6 +6961,12 @@ pub const Arc = enum(usize) { | ... | @@ -6859,6 +6961,12 @@ pub const Arc = enum(usize) { |
| 6859 | futex_wake = 454, | 6961 | futex_wake = 454, |
| 6860 | futex_wait = 455, | 6962 | futex_wait = 455, |
| 6861 | futex_requeue = 456, | 6963 | futex_requeue = 456, |
| 6964 | statmount = 457, | ||
| 6965 | listmount = 458, | ||
| 6966 | lsm_get_self_attr = 459, | ||
| 6967 | lsm_set_self_attr = 460, | ||
| 6968 | lsm_list_modules = 461, | ||
| 6969 | mseal = 462, | ||
| 6862 | cacheflush = (244 + 0), | 6970 | cacheflush = (244 + 0), |
| 6863 | arc_settls = (244 + 1), | 6971 | arc_settls = (244 + 1), |
| 6864 | arc_gettls = (244 + 2), | 6972 | arc_gettls = (244 + 2), |
| ... | @@ -7197,6 +7305,12 @@ pub const CSky = enum(usize) { | ... | @@ -7197,6 +7305,12 @@ pub const CSky = enum(usize) { |
| 7197 | futex_wake = 454, | 7305 | futex_wake = 454, |
| 7198 | futex_wait = 455, | 7306 | futex_wait = 455, |
| 7199 | futex_requeue = 456, | 7307 | futex_requeue = 456, |
| 7308 | statmount = 457, | ||
| 7309 | listmount = 458, | ||
| 7310 | lsm_get_self_attr = 459, | ||
| 7311 | lsm_set_self_attr = 460, | ||
| 7312 | lsm_list_modules = 461, | ||
| 7313 | mseal = 462, | ||
| 7200 | set_thread_area = (244 + 0), | 7314 | set_thread_area = (244 + 0), |
| 7201 | cacheflush = (244 + 1), | 7315 | cacheflush = (244 + 1), |
| 7202 | }; | 7316 | }; |
| ... | @@ -7532,4 +7646,10 @@ pub const Hexagon = enum(usize) { | ... | @@ -7532,4 +7646,10 @@ pub const Hexagon = enum(usize) { |
| 7532 | futex_wake = 454, | 7646 | futex_wake = 454, |
| 7533 | futex_wait = 455, | 7647 | futex_wait = 455, |
| 7534 | futex_requeue = 456, | 7648 | futex_requeue = 456, |
| 7649 | statmount = 457, | ||
| 7650 | listmount = 458, | ||
| 7651 | lsm_get_self_attr = 459, | ||
| 7652 | lsm_set_self_attr = 460, | ||
| 7653 | lsm_list_modules = 461, | ||
| 7654 | mseal = 462, | ||
| 7535 | }; | 7655 | }; |