| author | |
| committer | |
| log | bf1c847719ebf933517b5b6e10e07087c725a35b |
| tree | dce2d0538f2ac7eefb863f2761a347989401016c |
| parent | 3b3833acf73aae7d5e84e9e9ae15c9c4f9d5b367 |
| parent | c13bf5d7784f61825847bdf65676f1420c7e7e9b |
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35375119 files changed, 1511 insertions(+), 819 deletions(-)
lib/libc/include/aarch64-openbsd-none/arm64/cpu.h+7-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /* $OpenBSD: cpu.h,v 1.51 2025/02/11 22:27:09 kettenis Exp $ */ | |
| 1 | /* $OpenBSD: cpu.h,v 1.55 2026/04/03 14:20:23 kettenis Exp $ */ | |
| 2 | 2 | /* |
| 3 | 3 | * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com> |
| 4 | 4 | * |
| ... | ... | @@ -112,6 +112,7 @@ void cpu_identify_cleanup(void); |
| 112 | 112 | #include <sys/sched.h> |
| 113 | 113 | #include <sys/srp.h> |
| 114 | 114 | #include <uvm/uvm_percpu.h> |
| 115 | #include <sys/xcall.h> | |
| 115 | 116 | |
| 116 | 117 | struct cpu_info { |
| 117 | 118 | 	struct device		*ci_dev; /* Device corresponding to this CPU */ |
| ... | ... | @@ -126,6 +127,7 @@ struct cpu_info { |
| 126 | 127 | 	struct cpu_info		*ci_self; |
| 127 | 128 | |
| 128 | 129 | #define __HAVE_CPU_TOPOLOGY |
| 130 | 	u_int32_t		ci_cputype; | |
| 129 | 131 | 	u_int32_t		ci_smt_id; |
| 130 | 132 | 	u_int32_t		ci_core_id; |
| 131 | 133 | 	u_int32_t		ci_pkg_id; |
| ... | ... | @@ -162,11 +164,14 @@ struct cpu_info { |
| 162 | 164 | 	volatile int		ci_opp_max; |
| 163 | 165 | 	uint32_t		ci_cpu_supply; |
| 164 | 166 | |
| 167 | 	uint64_t		ci_capacity; | |
| 168 | ||
| 165 | 169 | 	u_long			ci_prev_sleep; |
| 166 | 170 | 	u_long			ci_last_itime; |
| 167 | 171 | |
| 168 | 172 | #ifdef MULTIPROCESSOR |
| 169 | 173 | 	struct srp_hazard	ci_srp_hazards[SRP_HAZARD_NUM]; |
| 174 | 	struct xcall_cpu	ci_xcall; | |
| 170 | 175 | #define __HAVE_UVM_PERCPU |
| 171 | 176 | 	struct uvm_pmr_cache	ci_uvm; |
| 172 | 177 | 	volatile int		ci_flags; |
| ... | ... | @@ -339,6 +344,7 @@ intr_restore(u_long daif) |
| 339 | 344 | 	restore_daif(daif); |
| 340 | 345 | } |
| 341 | 346 | |
| 347 | void	cpu_classify(void); | |
| 342 | 348 | void	cpu_halt(void); |
| 343 | 349 | int	cpu_suspend_primary(void); |
| 344 | 350 | void	cpu_resume_secondary(struct cpu_info *); |
lib/libc/include/aarch64-openbsd-none/arm64/intr.h+9-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intr.h,v 1.25 2025/06/30 14:19:20 kettenis Exp $ */ | |
| 1 | /*	$OpenBSD: intr.h,v 1.26 2025/12/15 01:39:32 dlg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) |
| ... | ... | @@ -84,6 +84,8 @@ |
| 84 | 84 | #ifndef _LOCORE |
| 85 | 85 | #include <sys/queue.h> |
| 86 | 86 | |
| 87 | #define SOFTINTR_XCALL		NSOFTINTR | |
| 88 | ||
| 87 | 89 | void	softintr(int); |
| 88 | 90 | |
| 89 | 91 | int	splraise(int); |
| ... | ... | @@ -199,6 +201,12 @@ extern void (*intr_send_ipi_func)(struct cpu_info *, int); |
| 199 | 201 | #define ARM_IPI_NOP	0 |
| 200 | 202 | #define ARM_IPI_DDB	1 |
| 201 | 203 | #define ARM_IPI_HALT	2 |
| 204 | #define ARM_IPI_XCALL	3 | |
| 205 | ||
| 206 | /* kern_xcall calls this to dispatch xcalls */ | |
| 207 | #define cpu_xcall_ipi(_ci) arm_send_ipi((_ci), ARM_IPI_XCALL) | |
| 208 | /* interrupt controllers call this to get cpu_xcall_dispatch run */ | |
| 209 | #define arm_cpu_xcall_dispatch() softintr(SOFTINTR_XCALL) | |
| 202 | 210 | |
| 203 | 211 | #ifdef DIAGNOSTIC |
| 204 | 212 | /* |
lib/libc/include/aarch64-openbsd-none/machine/cpu.h+7-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /* $OpenBSD: cpu.h,v 1.51 2025/02/11 22:27:09 kettenis Exp $ */ | |
| 1 | /* $OpenBSD: cpu.h,v 1.55 2026/04/03 14:20:23 kettenis Exp $ */ | |
| 2 | 2 | /* |
| 3 | 3 | * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com> |
| 4 | 4 | * |
| ... | ... | @@ -112,6 +112,7 @@ void cpu_identify_cleanup(void); |
| 112 | 112 | #include <sys/sched.h> |
| 113 | 113 | #include <sys/srp.h> |
| 114 | 114 | #include <uvm/uvm_percpu.h> |
| 115 | #include <sys/xcall.h> | |
| 115 | 116 | |
| 116 | 117 | struct cpu_info { |
| 117 | 118 | 	struct device		*ci_dev; /* Device corresponding to this CPU */ |
| ... | ... | @@ -126,6 +127,7 @@ struct cpu_info { |
| 126 | 127 | 	struct cpu_info		*ci_self; |
| 127 | 128 | |
| 128 | 129 | #define __HAVE_CPU_TOPOLOGY |
| 130 | 	u_int32_t		ci_cputype; | |
| 129 | 131 | 	u_int32_t		ci_smt_id; |
| 130 | 132 | 	u_int32_t		ci_core_id; |
| 131 | 133 | 	u_int32_t		ci_pkg_id; |
| ... | ... | @@ -162,11 +164,14 @@ struct cpu_info { |
| 162 | 164 | 	volatile int		ci_opp_max; |
| 163 | 165 | 	uint32_t		ci_cpu_supply; |
| 164 | 166 | |
| 167 | 	uint64_t		ci_capacity; | |
| 168 | ||
| 165 | 169 | 	u_long			ci_prev_sleep; |
| 166 | 170 | 	u_long			ci_last_itime; |
| 167 | 171 | |
| 168 | 172 | #ifdef MULTIPROCESSOR |
| 169 | 173 | 	struct srp_hazard	ci_srp_hazards[SRP_HAZARD_NUM]; |
| 174 | 	struct xcall_cpu	ci_xcall; | |
| 170 | 175 | #define __HAVE_UVM_PERCPU |
| 171 | 176 | 	struct uvm_pmr_cache	ci_uvm; |
| 172 | 177 | 	volatile int		ci_flags; |
| ... | ... | @@ -339,6 +344,7 @@ intr_restore(u_long daif) |
| 339 | 344 | 	restore_daif(daif); |
| 340 | 345 | } |
| 341 | 346 | |
| 347 | void	cpu_classify(void); | |
| 342 | 348 | void	cpu_halt(void); |
| 343 | 349 | int	cpu_suspend_primary(void); |
| 344 | 350 | void	cpu_resume_secondary(struct cpu_info *); |
lib/libc/include/aarch64-openbsd-none/machine/intr.h+9-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intr.h,v 1.25 2025/06/30 14:19:20 kettenis Exp $ */ | |
| 1 | /*	$OpenBSD: intr.h,v 1.26 2025/12/15 01:39:32 dlg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) |
| ... | ... | @@ -84,6 +84,8 @@ |
| 84 | 84 | #ifndef _LOCORE |
| 85 | 85 | #include <sys/queue.h> |
| 86 | 86 | |
| 87 | #define SOFTINTR_XCALL		NSOFTINTR | |
| 88 | ||
| 87 | 89 | void	softintr(int); |
| 88 | 90 | |
| 89 | 91 | int	splraise(int); |
| ... | ... | @@ -199,6 +201,12 @@ extern void (*intr_send_ipi_func)(struct cpu_info *, int); |
| 199 | 201 | #define ARM_IPI_NOP	0 |
| 200 | 202 | #define ARM_IPI_DDB	1 |
| 201 | 203 | #define ARM_IPI_HALT	2 |
| 204 | #define ARM_IPI_XCALL	3 | |
| 205 | ||
| 206 | /* kern_xcall calls this to dispatch xcalls */ | |
| 207 | #define cpu_xcall_ipi(_ci) arm_send_ipi((_ci), ARM_IPI_XCALL) | |
| 208 | /* interrupt controllers call this to get cpu_xcall_dispatch run */ | |
| 209 | #define arm_cpu_xcall_dispatch() softintr(SOFTINTR_XCALL) | |
| 202 | 210 | |
| 203 | 211 | #ifdef DIAGNOSTIC |
| 204 | 212 | /* |
lib/libc/include/generic-openbsd/db.h+1-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: db.h,v 1.12 2015/10/17 21:48:42 guenther Exp $	*/ | |
| 1 | /*	$OpenBSD: db.h,v 1.14 2026/03/10 04:30:34 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: db.h,v 1.13 1994/10/26 00:55:48 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -84,15 +84,9 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; |
| 84 | 84 | * is so that the access methods can skip copying the key/data pair when |
| 85 | 85 | * the DB_LOCK flag isn't set. |
| 86 | 86 | */ |
| 87 | #if UINT_MAX > 65535 | |
| 88 | 87 | #define	DB_LOCK		0x20000000	/* Do locking. */ |
| 89 | 88 | #define	DB_SHMEM	0x40000000	/* Use shared memory. */ |
| 90 | 89 | #define	DB_TXN		0x80000000	/* Do transactions. */ |
| 91 | #else | |
| 92 | #define	DB_LOCK		 0x2000	/* Do locking. */ | |
| 93 | #define	DB_SHMEM	 0x4000	/* Use shared memory. */ | |
| 94 | #define	DB_TXN		 0x8000	/* Do transactions. */ | |
| 95 | #endif | |
| 96 | 90 | |
| 97 | 91 | /* Access method description structure. */ |
| 98 | 92 | typedef struct __db { |
lib/libc/include/generic-openbsd/ddb/db_interface.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: db_interface.h,v 1.28 2024/09/05 08:52:27 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: db_interface.h,v 1.29 2026/02/02 15:20:51 claudio Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -41,6 +41,7 @@ vaddr_t db_disasm(vaddr_t, int); |
| 41 | 41 | |
| 42 | 42 | /* kern/kern_proc.c */ |
| 43 | 43 | void db_kill_cmd(db_expr_t, int, db_expr_t, char *); |
| 44 | void db_stop_cmd(db_expr_t, int, db_expr_t, char *); | |
| 44 | 45 | void db_show_all_procs(db_expr_t, int, db_expr_t, char *); |
| 45 | 46 | |
| 46 | 47 | /* kern/kern_clockintr.c */ |
lib/libc/include/generic-openbsd/fnmatch.h+6-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: fnmatch.h,v 1.8 2005/12/13 00:35:22 millert Exp $	*/ | |
| 1 | /*	$OpenBSD: fnmatch.h,v 1.9 2026/03/29 14:08:46 daniel Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -43,11 +43,15 @@ |
| 43 | 43 | #define	FNM_NOESCAPE	0x01	/* Disable backslash escaping. */ |
| 44 | 44 | #define	FNM_PATHNAME	0x02	/* Slash must be matched by slash. */ |
| 45 | 45 | #define	FNM_PERIOD	0x04	/* Period must be matched by period. */ |
| 46 | ||
| 46 | 47 | #if __BSD_VISIBLE |
| 47 | 48 | #define	FNM_LEADING_DIR	0x08	/* Ignore /<tail> after Imatch. */ |
| 49 | #define	FNM_FILE_NAME	FNM_PATHNAME | |
| 50 | #endif | |
| 51 | ||
| 52 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405 | |
| 48 | 53 | #define	FNM_CASEFOLD	0x10	/* Case insensitive search. */ |
| 49 | 54 | #define	FNM_IGNORECASE	FNM_CASEFOLD |
| 50 | #define	FNM_FILE_NAME	FNM_PATHNAME | |
| 51 | 55 | #endif |
| 52 | 56 | |
| 53 | 57 | __BEGIN_DECLS |
lib/libc/include/generic-openbsd/login_cap.h+3-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: login_cap.h,v 1.19 2022/03/01 01:22:11 tedu Exp $	*/ | |
| 1 | /*	$OpenBSD: login_cap.h,v 1.21 2025/11/24 12:37:15 jca Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /*- |
| 4 | 4 | * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. |
| ... | ... | @@ -56,6 +56,8 @@ |
| 56 | 56 | #define	LOGIN_SETENV		0x0080	/* Set environment */ |
| 57 | 57 | #define	LOGIN_SETRTABLE		0x0100	/* Set rtable */ |
| 58 | 58 | #define	LOGIN_SETALL 		0x01ff	/* Set all. */ |
| 59 | /* The LOGIN defines below are not part of LOGIN_SETALL */ | |
| 60 | #define	LOGIN_SETXDGENV		0x0200	/* Set XDG environment variables */ | |
| 59 | 61 | |
| 60 | 62 | #define	BI_AUTH		"authorize"		/* Accepted authentication */ |
| 61 | 63 | #define	BI_REJECT	"reject"		/* Rejected authentication */ |
lib/libc/include/generic-openbsd/miscfs/fuse/fusefs_node.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /* $OpenBSD: fusefs_node.h,v 1.5 2024/10/31 13:55:21 claudio Exp $ */ | |
| 1 | /* $OpenBSD: fusefs_node.h,v 1.6 2026/01/22 11:53:31 helg Exp $ */ | |
| 2 | 2 | /* |
| 3 | 3 | * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> |
| 4 | 4 | * |
| ... | ... | @@ -40,6 +40,7 @@ struct fusefs_node { |
| 40 | 40 | 	struct	fusefs_mnt	*i_ump; |
| 41 | 41 | 	dev_t			 i_dev;	 /* Device associated with the inode. */ |
| 42 | 42 | 	ino_t			 i_number;	/* The identity of the inode. */ |
| 43 | 	ino_t			 i_parent_cache;/* Parent inode (only dirs). */ | |
| 43 | 44 | 	struct	lockf_state	*i_lockf;	/* Byte-level lock state. */ |
| 44 | 45 | 	struct	rrwlock		 i_lock;	/* Inode lock */ |
| 45 | 46 |
lib/libc/include/generic-openbsd/net/bpf.h+3-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: bpf.h,v 1.74 2025/03/04 01:01:25 dlg Exp $	*/ | |
| 1 | /*	$OpenBSD: bpf.h,v 1.75 2025/11/16 02:20:08 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: bpf.h,v 1.15 1996/12/13 07:57:33 mikel Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -255,6 +255,8 @@ struct bpf_hdr { |
| 255 | 255 | #define		BPF_LSH		0x60 |
| 256 | 256 | #define		BPF_RSH		0x70 |
| 257 | 257 | #define		BPF_NEG		0x80 |
| 258 | #define		BPF_MOD		0x90 | |
| 259 | #define		BPF_XOR		0xa0 | |
| 258 | 260 | #define		BPF_JA		0x00 |
| 259 | 261 | #define		BPF_JEQ		0x10 |
| 260 | 262 | #define		BPF_JGT		0x20 |
lib/libc/include/generic-openbsd/net/hfsc.h+4-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: hfsc.h,v 1.14 2025/07/07 00:55:15 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: hfsc.h,v 1.15 2026/03/19 14:59:05 sthen Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org> |
| ... | ... | @@ -45,9 +45,9 @@ struct hfsc_pktcntr { |
| 45 | 45 | 	do { (cntr)->packets++; (cntr)->bytes += len; } while (0) |
| 46 | 46 | |
| 47 | 47 | struct hfsc_sc { |
| 48 | 	u_int	m1;	/* slope of the first segment in bits/sec */ | |
| 49 | 	u_int	d;	/* the x-projection of the first segment in msec */ | |
| 50 | 	u_int	m2;	/* slope of the second segment in bits/sec */ | |
| 48 | 	u_int64_t	m1;	/* slope of the first segment in bits/sec */ | |
| 49 | 	u_int64_t	m2;	/* slope of the second segment in bits/sec */ | |
| 50 | 	u_int		d;	/* the x-projection of the first segment in msec */ | |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | /* special class handles */ |
lib/libc/include/generic-openbsd/net/if.h+5-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if.h,v 1.221 2025/09/09 09:16:18 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: if.h,v 1.223 2025/12/09 03:33:06 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -526,6 +526,9 @@ struct if_sffpage { |
| 526 | 526 | #include <net/if_arp.h> |
| 527 | 527 | |
| 528 | 528 | #ifdef _KERNEL |
| 529 | ||
| 530 | #define IF_MAX_VECTORS		8 | |
| 531 | ||
| 529 | 532 | struct socket; |
| 530 | 533 | struct ifnet; |
| 531 | 534 | struct ifq_ops; |
| ... | ... | @@ -555,6 +558,7 @@ void	if_group_routechange(const struct sockaddr *, const struct sockaddr *); |
| 555 | 558 | struct	ifnet *if_unit(const char *); |
| 556 | 559 | struct	ifnet *if_get(unsigned int); |
| 557 | 560 | struct	ifnet *if_ref(struct ifnet *); |
| 561 | struct	ifnet *if_get_smr(unsigned int); | |
| 558 | 562 | void	if_put(struct ifnet *); |
| 559 | 563 | void	ifnewlladdr(struct ifnet *); |
| 560 | 564 | void	if_congestion(void); |
lib/libc/include/generic-openbsd/net/if_bridge.h+48-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_bridge.h,v 1.73 2021/11/11 10:03:10 claudio Exp $	*/ | |
| 1 | /*	$OpenBSD: if_bridge.h,v 1.77 2025/11/21 04:44:26 dlg Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) |
| ... | ... | @@ -39,6 +39,12 @@ |
| 39 | 39 | #include <sys/timeout.h> |
| 40 | 40 | #include <net/pfvar.h> |
| 41 | 41 | |
| 42 | #define IFBR_PVID_NULL		EVL_VLID_NULL | |
| 43 | #define IFBR_PVID_MIN		EVL_VLID_MIN | |
| 44 | #define IFBR_PVID_MAX		EVL_VLID_MAX | |
| 45 | #define IFBR_PVID_NONE		0xffff | |
| 46 | #define IFBR_PVID_DECLINE	0xfffe | |
| 47 | ||
| 42 | 48 | /* |
| 43 | 49 | * Bridge control request: add/delete member interfaces. |
| 44 | 50 | */ |
| ... | ... | @@ -51,6 +57,7 @@ struct ifbreq { |
| 51 | 57 | |
| 52 | 58 | 	u_int8_t	ifbr_state;		/* member stp state */ |
| 53 | 59 | 	u_int8_t	ifbr_priority;		/* member stp priority */ |
| 60 | 	u_int16_t	ifbr_pvid;		/* member port vlan id */ | |
| 54 | 61 | 	u_int32_t	ifbr_path_cost;		/* member stp path cost */ |
| 55 | 62 | 	u_int32_t	ifbr_stpflags; /* member stp flags */ |
| 56 | 63 | 	u_int8_t	ifbr_proto;		/* member stp protocol */ |
| ... | ... | @@ -74,6 +81,8 @@ struct ifbreq { |
| 74 | 81 | #define IFBIF_BSTP_AUTOPTP	0x0080	/* member stp autoptp enabled */ |
| 75 | 82 | #define	IFBIF_SPAN		0x0100	/* ifs is a span port (ro) */ |
| 76 | 83 | #define	IFBIF_LOCAL		0x1000	/* local port in switch(4) */ |
| 84 | #define	IFBIF_LOCKED		0x2000	/* restrict rx src mac with fib */ | |
| 85 | #define	IFBIF_PVLAN_PTAGS	0x4000	/* only use tags for primary pvlans */ | |
| 77 | 86 | #define	IFBIF_RO_MASK		0x0f00	/* read only bits */ |
| 78 | 87 | |
| 79 | 88 | /* SIOCBRDGFLUSH */ |
| ... | ... | @@ -133,15 +142,19 @@ struct ifbareq { |
| 133 | 142 | #define	IFBAF_DYNAMIC		0x00		/* dynamically learned */ |
| 134 | 143 | #define	IFBAF_STATIC		0x01		/* static address */ |
| 135 | 144 | |
| 145 | struct ifbvareq; | |
| 146 | ||
| 136 | 147 | struct ifbaconf { |
| 137 | 148 | 	char			ifbac_name[IFNAMSIZ];	/* bridge ifs name */ |
| 138 | 149 | 	u_int32_t		ifbac_len;		/* buffer size */ |
| 139 | 150 | 	union { |
| 140 | 151 | 		caddr_t	ifbacu_buf;			/* buffer */ |
| 141 | 152 | 		struct ifbareq *ifbacu_req;		/* request pointer */ |
| 153 | 		struct ifbvareq *ifbacu_vreq;		/* request pointer */ | |
| 142 | 154 | 	} ifbac_ifbacu; |
| 143 | 155 | #define	ifbac_buf	ifbac_ifbacu.ifbacu_buf |
| 144 | 156 | #define	ifbac_req	ifbac_ifbacu.ifbacu_req |
| 157 | #define	ifbac_vreq	ifbac_ifbacu.ifbacu_vreq | |
| 145 | 158 | }; |
| 146 | 159 | |
| 147 | 160 | struct ifbrparam { |
| ... | ... | @@ -237,6 +250,40 @@ struct ifbrlconf { |
| 237 | 250 | #define	ifbrl_req	ifbrl_ifbrlu.ifbrlu_req |
| 238 | 251 | }; |
| 239 | 252 | |
| 253 | struct ifbvareq { | |
| 254 | 	char			ifbva_name[IFNAMSIZ];	/* bridge name */ | |
| 255 | 	char			ifbva_ifsname[IFNAMSIZ];	/* destination ifs */ | |
| 256 | 	time_t			ifbva_created;		/* monotime */ | |
| 257 | 	time_t			ifbva_used;		/* monotime */ | |
| 258 | 	unsigned int		ifbva_flags;		/* address flags */ | |
| 259 | 	uint16_t		ifbva_vid;		/* vlan */ | |
| 260 | 	struct ether_addr	ifbva_dst;		/* destination addr */ | |
| 261 | 	struct sockaddr_storage	ifbva_dstsa;		/* tunnel endpoint */ | |
| 262 | }; | |
| 263 | ||
| 264 | struct ifbrvidmap { | |
| 265 | 	char			ifbrvm_name[IFNAMSIZ]; | |
| 266 | 	char			ifbrvm_ifsname[IFNAMSIZ]; | |
| 267 | 	unsigned int		ifbrvm_op; | |
| 268 | #define IFBRVM_OP_SET			0x0	/* kernel = ifbrvm_map */ | |
| 269 | #define IFBRVM_OP_OR			0x1	/* kernel |= ifbrvm_map */ | |
| 270 | #define IFBRVM_OP_ANDNOT		0x2	/* kernel &= ~ifbrvm_map */ | |
| 271 | 	unsigned int		ifbrvm_gen; | |
| 272 | 	uint8_t			ifbrvm_map[512]; | |
| 273 | }; | |
| 274 | ||
| 275 | struct ifbrpvlan { | |
| 276 | 	char			ifbrpv_name[IFNAMSIZ]; | |
| 277 | 	uint16_t		ifbrpv_primary; | |
| 278 | 	uint16_t		ifbrpv_secondary; | |
| 279 | 	unsigned int		ifbrpv_type; | |
| 280 | #define IFBRPV_T_PRIMARY		0 | |
| 281 | #define IFBRPV_T_SECONDARY		1	/* for searching */ | |
| 282 | #define IFBRPV_T_ISOLATED		2 | |
| 283 | #define IFBRPV_T_COMMUNITY		3 | |
| 284 | 	unsigned int		ifbrpv_gen; | |
| 285 | }; | |
| 286 | ||
| 240 | 287 | #ifdef _KERNEL |
| 241 | 288 | |
| 242 | 289 | #include <sys/mutex.h> |
lib/libc/include/generic-openbsd/net/if_etherbridge.h+20-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_etherbridge.h,v 1.5 2024/11/04 00:13:15 jsg Exp $ */ | |
| 1 | /*	$OpenBSD: if_etherbridge.h,v 1.7 2025/11/21 04:44:26 dlg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2018, 2021 David Gwynne <dlg@openbsd.org> |
| ... | ... | @@ -44,16 +44,21 @@ struct eb_entry { |
| 44 | 44 | |
| 45 | 45 | 	uint64_t			 ebe_addr; |
| 46 | 46 | 	void				*ebe_port; |
| 47 | 	uint16_t			 ebe_vs; /* secondary vid */ | |
| 47 | 48 | 	unsigned int			 ebe_type; |
| 48 | 49 | #define EBE_DYNAMIC				0x0 |
| 49 | 50 | #define EBE_STATIC				0x1 |
| 50 | 51 | #define EBE_DEAD				0xdead |
| 52 | 	time_t				 ebe_created; | |
| 51 | 53 | 	time_t				 ebe_age; |
| 52 | 54 | |
| 53 | 55 | 	struct etherbridge		*ebe_etherbridge; |
| 54 | 56 | 	struct smr_entry		 ebe_smr_entry; |
| 55 | 57 | }; |
| 56 | 58 | |
| 59 | #define etherbridge_port(_ebe)	((_ebe)->ebe_port) | |
| 60 | #define etherbridge_vs(_ebe)	((_ebe)->ebe_vs) | |
| 61 | ||
| 57 | 62 | SMR_TAILQ_HEAD(eb_list, eb_entry); |
| 58 | 63 | RBT_HEAD(eb_tree, eb_entry); |
| 59 | 64 | TAILQ_HEAD(eb_queue, eb_entry); |
| ... | ... | @@ -80,13 +85,19 @@ int	 etherbridge_up(struct etherbridge *); |
| 80 | 85 | int	 etherbridge_down(struct etherbridge *); |
| 81 | 86 | void	 etherbridge_destroy(struct etherbridge *); |
| 82 | 87 | |
| 83 | void	 etherbridge_map(struct etherbridge *, void *, uint64_t); | |
| 88 | void	 etherbridge_map(struct etherbridge *, void *, | |
| 89 | 	 uint16_t, uint16_t, uint64_t); | |
| 84 | 90 | void	 etherbridge_map_ea(struct etherbridge *, void *, |
| 85 | 	 const struct ether_addr *); | |
| 86 | void	*etherbridge_resolve(struct etherbridge *, uint64_t); | |
| 91 | 	 uint16_t, uint16_t, const struct ether_addr *); | |
| 92 | struct eb_entry * | |
| 93 | 	 etherbridge_resolve_entry(struct etherbridge *, | |
| 94 | 	 uint16_t, uint64_t); | |
| 95 | void	*etherbridge_resolve(struct etherbridge *, uint16_t, uint64_t); | |
| 87 | 96 | void	*etherbridge_resolve_ea(struct etherbridge *, |
| 88 | 	 const struct ether_addr *); | |
| 97 | 	 uint16_t, const struct ether_addr *); | |
| 89 | 98 | void	 etherbridge_detach_port(struct etherbridge *, void *); |
| 99 | void	 etherbridge_filter(struct etherbridge *, | |
| 100 | 	 int (*)(struct etherbridge *, struct eb_entry *, void *), void *); | |
| 90 | 101 | |
| 91 | 102 | /* ioctl support */ |
| 92 | 103 | int	 etherbridge_set_max(struct etherbridge *, struct ifbrparam *); |
| ... | ... | @@ -94,9 +105,11 @@ int	 etherbridge_get_max(struct etherbridge *, struct ifbrparam *); |
| 94 | 105 | int	 etherbridge_set_tmo(struct etherbridge *, struct ifbrparam *); |
| 95 | 106 | int	 etherbridge_get_tmo(struct etherbridge *, struct ifbrparam *); |
| 96 | 107 | int	 etherbridge_rtfind(struct etherbridge *, struct ifbaconf *); |
| 108 | int	 etherbridge_vareq(struct etherbridge *, struct ifbaconf *); | |
| 97 | 109 | int	 etherbridge_add_addr(struct etherbridge *, void *, |
| 98 | 	 const struct ether_addr *, unsigned int); | |
| 99 | int	 etherbridge_del_addr(struct etherbridge *, const struct ether_addr *); | |
| 110 | 	 uint16_t, uint16_t, const struct ether_addr *, unsigned int); | |
| 111 | int	 etherbridge_del_addr(struct etherbridge *, | |
| 112 | 	 uint16_t, const struct ether_addr *); | |
| 100 | 113 | void	 etherbridge_flush(struct etherbridge *, uint32_t); |
| 101 | 114 | |
| 102 | 115 | #endif /* _NET_ETHERBRIDGE_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/net/if_media.h+26-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_media.h,v 1.46 2025/06/13 00:08:16 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: if_media.h,v 1.47 2026/03/19 16:50:32 chris Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if_media.h,v 1.22 2000/02/17 21:53:16 sommerfeld Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -327,6 +327,18 @@ uint64_t	ifmedia_baudrate(uint64_t); |
| 327 | 327 | #define IFM_IEEE80211_VHT_MCS7	103	/* 11ac MCS 7 */ |
| 328 | 328 | #define IFM_IEEE80211_VHT_MCS8	104	/* 11ac MCS 8 */ |
| 329 | 329 | #define IFM_IEEE80211_VHT_MCS9	105	/* 11ac MCS 9 */ |
| 330 | #define IFM_IEEE80211_HE_MCS0	106	/* 11ax MCS 0 */ | |
| 331 | #define IFM_IEEE80211_HE_MCS1	107	/* 11ax MCS 1 */ | |
| 332 | #define IFM_IEEE80211_HE_MCS2	108	/* 11ax MCS 2 */ | |
| 333 | #define IFM_IEEE80211_HE_MCS3	109	/* 11ax MCS 3 */ | |
| 334 | #define IFM_IEEE80211_HE_MCS4	110	/* 11ax MCS 4 */ | |
| 335 | #define IFM_IEEE80211_HE_MCS5	111	/* 11ax MCS 5 */ | |
| 336 | #define IFM_IEEE80211_HE_MCS6	112	/* 11ax MCS 6 */ | |
| 337 | #define IFM_IEEE80211_HE_MCS7	113	/* 11ax MCS 7 */ | |
| 338 | #define IFM_IEEE80211_HE_MCS8	114	/* 11ax MCS 8 */ | |
| 339 | #define IFM_IEEE80211_HE_MCS9	115	/* 11ax MCS 9 */ | |
| 340 | #define IFM_IEEE80211_HE_MCS10	116	/* 11ax MCS 10 */ | |
| 341 | #define IFM_IEEE80211_HE_MCS11	117	/* 11ax MCS 11 */ | |
| 330 | 342 | |
| 331 | 343 | #define	IFM_IEEE80211_ADHOC	0x0000000000010000ULL	/* Operate in Adhoc mode */ |
| 332 | 344 | #define	IFM_IEEE80211_HOSTAP	0x0000000000020000ULL	/* Operate in Host AP mode */ |
| ... | ... | @@ -341,6 +353,7 @@ uint64_t	ifmedia_baudrate(uint64_t); |
| 341 | 353 | #define IFM_IEEE80211_FH	0x0000000400000000ULL	/* 2GHz, GFSK mode */ |
| 342 | 354 | #define IFM_IEEE80211_11N	0x0000000800000000ULL	/* 11n/HT 2GHz/5GHz */ |
| 343 | 355 | #define IFM_IEEE80211_11AC	0x0000001000000000ULL	/* 11ac/VHT 5GHz */ |
| 356 | #define IFM_IEEE80211_11AX	0x0000002000000000ULL	/* 11ax/HE 2GHz/5GHz */ | |
| 344 | 357 | |
| 345 | 358 | /* |
| 346 | 359 | * Digitally multiplexed "Carrier" Serial Interfaces |
| ... | ... | @@ -721,6 +734,18 @@ struct ifmedia_description { |
| 721 | 734 | 	{ IFM_IEEE80211|IFM_IEEE80211_VHT_MCS7,	"VHT-MCS7" },		\ |
| 722 | 735 | 	{ IFM_IEEE80211|IFM_IEEE80211_VHT_MCS8,	"VHT-MCS8" },		\ |
| 723 | 736 | 	{ IFM_IEEE80211|IFM_IEEE80211_VHT_MCS9,	"VHT-MCS9" },		\ |
| 737 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS0, "HE-MCS0" },		\ | |
| 738 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS1, "HE-MCS1" },		\ | |
| 739 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS2, "HE-MCS2" },		\ | |
| 740 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS3, "HE-MCS3" },		\ | |
| 741 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS4, "HE-MCS4" },		\ | |
| 742 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS5, "HE-MCS5" },		\ | |
| 743 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS6, "HE-MCS6" },		\ | |
| 744 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS7, "HE-MCS7" },		\ | |
| 745 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS8, "HE-MCS8" },		\ | |
| 746 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS9, "HE-MCS9" },		\ | |
| 747 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS10, "HE-MCS10" },		\ | |
| 748 | 	{ IFM_IEEE80211|IFM_IEEE80211_HE_MCS11, "HE-MCS11" },		\ | |
| 724 | 749 | 									\ |
| 725 | 750 | 	{ IFM_TDM|IFM_TDM_T1,		"t1" },				\ |
| 726 | 751 | 	{ IFM_TDM|IFM_TDM_T1_AMI,	"t1-ami" },			\ |
lib/libc/include/generic-openbsd/net/if_pflow.h+71-20| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_pflow.h,v 1.23 2023/12/16 22:16:02 mvs Exp $	*/ | |
| 1 | /*	$OpenBSD: if_pflow.h,v 1.24 2025/11/13 17:12:30 chris Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2008 Henning Brauer <henning@openbsd.org> |
| ... | ... | @@ -33,22 +33,26 @@ |
| 33 | 33 | |
| 34 | 34 | /* RFC 5102 Information Element Identifiers */ |
| 35 | 35 | |
| 36 | #define PFIX_IE_octetDeltaCount			 1 | |
| 37 | #define PFIX_IE_packetDeltaCount		 2 | |
| 38 | #define PFIX_IE_protocolIdentifier		 4 | |
| 39 | #define PFIX_IE_ipClassOfService		 5 | |
| 40 | #define PFIX_IE_sourceTransportPort		 7 | |
| 41 | #define PFIX_IE_sourceIPv4Address		 8 | |
| 42 | #define PFIX_IE_ingressInterface		 10 | |
| 43 | #define PFIX_IE_destinationTransportPort	 11 | |
| 44 | #define PFIX_IE_destinationIPv4Address		 12 | |
| 45 | #define PFIX_IE_egressInterface			 14 | |
| 46 | #define PFIX_IE_flowEndSysUpTime		 21 | |
| 47 | #define PFIX_IE_flowStartSysUpTime		 22 | |
| 48 | #define PFIX_IE_sourceIPv6Address		 27 | |
| 49 | #define PFIX_IE_destinationIPv6Address		 28 | |
| 50 | #define PFIX_IE_flowStartMilliseconds		152 | |
| 51 | #define PFIX_IE_flowEndMilliseconds		153 | |
| 36 | #define PFIX_IE_octetDeltaCount				 1 | |
| 37 | #define PFIX_IE_packetDeltaCount			 2 | |
| 38 | #define PFIX_IE_protocolIdentifier			 4 | |
| 39 | #define PFIX_IE_ipClassOfService			 5 | |
| 40 | #define PFIX_IE_sourceTransportPort		 	 7 | |
| 41 | #define PFIX_IE_sourceIPv4Address		 	 8 | |
| 42 | #define PFIX_IE_ingressInterface		 	 10 | |
| 43 | #define PFIX_IE_destinationTransportPort	 	 11 | |
| 44 | #define PFIX_IE_destinationIPv4Address		 	 12 | |
| 45 | #define PFIX_IE_egressInterface			 	 14 | |
| 46 | #define PFIX_IE_flowEndSysUpTime		 	 21 | |
| 47 | #define PFIX_IE_flowStartSysUpTime		 	 22 | |
| 48 | #define PFIX_IE_sourceIPv6Address		 	 27 | |
| 49 | #define PFIX_IE_destinationIPv6Address		 	 28 | |
| 50 | #define PFIX_IE_flowStartMilliseconds			152 | |
| 51 | #define PFIX_IE_flowEndMilliseconds			153 | |
| 52 | #define PFIX_IE_postNATSourceIPv4Address		225 | |
| 53 | #define PFIX_IE_postNATDestinationIPv4Address		226 | |
| 54 | #define PFIX_IE_postNAPTSourceTransportPort		227 | |
| 55 | #define PFIX_IE_postNAPTDestinationTransportPort	228 | |
| 52 | 56 | |
| 53 | 57 | struct pflow_flow { |
| 54 | 58 | 	u_int32_t	src_ip; |
| ... | ... | @@ -110,6 +114,28 @@ struct pflow_ipfix_tmpl_ipv4 { |
| 110 | 114 | #define PFLOW_IPFIX_TMPL_IPV4_ID 256 |
| 111 | 115 | } __packed; |
| 112 | 116 | |
| 117 | struct pflow_ipfix_tmpl_nat_ipv4 { | |
| 118 | 	struct pflow_tmpl_hdr	h; | |
| 119 | 	struct pflow_tmpl_fspec src_ip; | |
| 120 | 	struct pflow_tmpl_fspec dest_ip; | |
| 121 | 	struct pflow_tmpl_fspec if_index_in; | |
| 122 | 	struct pflow_tmpl_fspec if_index_out; | |
| 123 | 	struct pflow_tmpl_fspec packets; | |
| 124 | 	struct pflow_tmpl_fspec octets; | |
| 125 | 	struct pflow_tmpl_fspec start; | |
| 126 | 	struct pflow_tmpl_fspec finish; | |
| 127 | 	struct pflow_tmpl_fspec post_src_ip; | |
| 128 | 	struct pflow_tmpl_fspec post_dest_ip; | |
| 129 | 	struct pflow_tmpl_fspec post_src_port; | |
| 130 | 	struct pflow_tmpl_fspec post_dest_port; | |
| 131 | 	struct pflow_tmpl_fspec src_port; | |
| 132 | 	struct pflow_tmpl_fspec dest_port; | |
| 133 | 	struct pflow_tmpl_fspec tos; | |
| 134 | 	struct pflow_tmpl_fspec protocol; | |
| 135 | #define PFLOW_IPFIX_TMPL_NAT_IPV4_FIELD_COUNT 16 | |
| 136 | #define PFLOW_IPFIX_TMPL_NAT_IPV4_ID 257 | |
| 137 | } __packed; | |
| 138 | ||
| 113 | 139 | /* update pflow_clone_create() when changing pflow_ipfix_tmpl_v6 */ |
| 114 | 140 | struct pflow_ipfix_tmpl_ipv6 { |
| 115 | 141 | 	struct pflow_tmpl_hdr	h; |
| ... | ... | @@ -126,13 +152,14 @@ struct pflow_ipfix_tmpl_ipv6 { |
| 126 | 152 | 	struct pflow_tmpl_fspec	tos; |
| 127 | 153 | 	struct pflow_tmpl_fspec	protocol; |
| 128 | 154 | #define PFLOW_IPFIX_TMPL_IPV6_FIELD_COUNT 12 |
| 129 | #define PFLOW_IPFIX_TMPL_IPV6_ID 257 | |
| 155 | #define PFLOW_IPFIX_TMPL_IPV6_ID 258 | |
| 130 | 156 | } __packed; |
| 131 | 157 | |
| 132 | 158 | struct pflow_ipfix_tmpl { |
| 133 | 159 | 	struct pflow_set_header	set_header; |
| 134 | 	struct pflow_ipfix_tmpl_ipv4	ipv4_tmpl; | |
| 135 | 	struct pflow_ipfix_tmpl_ipv6	ipv6_tmpl; | |
| 160 | 	struct pflow_ipfix_tmpl_ipv4		ipv4_tmpl; | |
| 161 | 	struct pflow_ipfix_tmpl_nat_ipv4	ipv4_nat_tmpl; | |
| 162 | 	struct pflow_ipfix_tmpl_ipv6		ipv6_tmpl; | |
| 136 | 163 | } __packed; |
| 137 | 164 | |
| 138 | 165 | struct pflow_ipfix_flow4 { |
| ... | ... | @@ -151,6 +178,26 @@ struct pflow_ipfix_flow4 { |
| 151 | 178 | 	/* XXX padding needed? */ |
| 152 | 179 | } __packed; |
| 153 | 180 | |
| 181 | struct pflow_ipfix_nat_flow4 { | |
| 182 | 	u_int32_t	src_ip;		/* sourceIPv4Address*/ | |
| 183 | 	u_int32_t	dest_ip;	/* destinationIPv4Address */ | |
| 184 | 	u_int32_t	if_index_in;	/* ingressInterface */ | |
| 185 | 	u_int32_t	if_index_out;	/* egressInterface */ | |
| 186 | 	u_int64_t	flow_packets;	/* packetDeltaCount */ | |
| 187 | 	u_int64_t	flow_octets;	/* octetDeltaCount */ | |
| 188 | 	int64_t		flow_start;	/* flowStartMilliseconds */ | |
| 189 | 	int64_t		flow_finish;	/* flowEndMilliseconds */ | |
| 190 | 	u_int32_t	post_src_ip;	/* postNATSourceIPv4Address */ | |
| 191 | 	u_int32_t	post_dest_ip;	/* postNATDestinationIPv4Address */ | |
| 192 | 	u_int16_t	post_src_port;	/* postNAPTSourceTransportPort */ | |
| 193 | 	u_int16_t	post_dest_port;	/* postNAPTDestinationTransportPort */ | |
| 194 | 	u_int16_t	src_port;	/* sourceTransportPort */ | |
| 195 | 	u_int16_t	dest_port;	/* destinationTransportPort */ | |
| 196 | 	u_int8_t	tos;		/* ipClassOfService */ | |
| 197 | 	u_int8_t	protocol;	/* protocolIdentifier */ | |
| 198 | 	/* XXX padding needed? */ | |
| 199 | } __packed; | |
| 200 | ||
| 154 | 201 | struct pflow_ipfix_flow6 { |
| 155 | 202 | 	struct in6_addr src_ip;		/* sourceIPv6Address */ |
| 156 | 203 | 	struct in6_addr dest_ip;	/* destinationIPv6Address */ |
| ... | ... | @@ -187,6 +234,7 @@ struct pflow_softc { |
| 187 | 234 | |
| 188 | 235 | 	unsigned int		 sc_count;	/* [m] */ |
| 189 | 236 | 	unsigned int		 sc_count4;	/* [m] */ |
| 237 | 	unsigned int		 sc_count4_nat;	/* [m] */ | |
| 190 | 238 | 	unsigned int		 sc_count6;	/* [m] */ |
| 191 | 239 | 	unsigned int		 sc_maxcount;	/* [m] */ |
| 192 | 240 | 	unsigned int		 sc_maxcount4;	/* [m] */ |
| ... | ... | @@ -196,6 +244,7 @@ struct pflow_softc { |
| 196 | 244 | 	struct timeout		 sc_tmo; |
| 197 | 245 | 	struct timeout		 sc_tmo6; |
| 198 | 246 | 	struct timeout		 sc_tmo_tmpl; |
| 247 | 	struct timeout		 sc_tmo_nat; | |
| 199 | 248 | 	struct mbuf_queue	 sc_outputqueue; |
| 200 | 249 | 	struct task		 sc_outputtask; |
| 201 | 250 | 	struct socket		*so;		/* [p] */ |
| ... | ... | @@ -208,6 +257,8 @@ struct pflow_softc { |
| 208 | 257 | 						 mbuf */ |
| 209 | 258 | 	struct mbuf		*sc_mbuf6;	/* [m] current cumulative |
| 210 | 259 | 						 mbuf */ |
| 260 | 	struct mbuf		*sc_mbuf_nat;	/* [m] current cumulative | |
| 261 | 						 mbuf */ | |
| 211 | 262 | 	SMR_SLIST_ENTRY(pflow_softc) sc_next; |
| 212 | 263 | }; |
| 213 | 264 |
lib/libc/include/generic-openbsd/net/if_pfsync.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_pfsync.h,v 1.65 2025/07/07 00:55:15 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: if_pfsync.h,v 1.66 2026/04/12 03:16:04 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001 Michael Shalayeff |
| ... | ... | @@ -112,7 +112,7 @@ struct pfsync_header { |
| 112 | 112 | 	u_int8_t			version; |
| 113 | 113 | 	u_int8_t			_pad; |
| 114 | 114 | 	u_int16_t			len; /* in bytes */ |
| 115 | 	u_int8_t			pfcksum[PF_MD5_DIGEST_LENGTH]; | |
| 115 | 	u_int8_t			spare[16]; | |
| 116 | 116 | } __packed; |
| 117 | 117 | |
| 118 | 118 | /* |
lib/libc/include/generic-openbsd/net/if_sppp.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_sppp.h,v 1.31 2025/01/15 06:15:44 dlg Exp $	*/ | |
| 1 | /*	$OpenBSD: if_sppp.h,v 1.32 2025/11/02 08:04:04 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if_sppp.h,v 1.2.2.1 1999/04/04 06:57:39 explorer Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -174,6 +174,7 @@ struct sppp { |
| 174 | 174 | 	time_t	pp_last_receive;	/* peer's last "sign of life" */ |
| 175 | 175 | 	time_t	pp_last_activity;	/* second of last payload data s/r */ |
| 176 | 176 | 	enum ppp_phase pp_phase;	/* phase we're currently in */ |
| 177 | 	struct task pp_autodial; | |
| 177 | 178 | 	int	state[IDX_COUNT];	/* state machine */ |
| 178 | 179 | 	u_char confid[IDX_COUNT];	/* id of last configuration request */ |
| 179 | 180 | 	int	rst_counter[IDX_COUNT];	/* restart counter */ |
lib/libc/include/generic-openbsd/net/if_trunk.h+3-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_trunk.h,v 1.32 2025/03/02 21:28:32 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: if_trunk.h,v 1.33 2025/11/24 23:40:00 dlg Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> |
| ... | ... | @@ -159,6 +159,8 @@ struct trunk_softc; |
| 159 | 159 | struct trunk_port { |
| 160 | 160 | 	struct ifnet			*tp_if;		/* physical interface */ |
| 161 | 161 | 	struct trunk_softc		*tp_trunk;	/* parent trunk */ |
| 162 | 	struct refcnt			tp_refs; | |
| 163 | 	struct ether_port		tp_ether_port; | |
| 162 | 164 | 	u_int8_t			tp_lladdr[ETHER_ADDR_LEN]; |
| 163 | 165 | 	caddr_t				tp_psc;		/* protocol data */ |
| 164 | 166 | |
| ... | ... | @@ -172,7 +174,6 @@ struct trunk_port { |
| 172 | 174 | 	int	(*tp_ioctl)(struct ifnet *, u_long, caddr_t); |
| 173 | 175 | 	int	(*tp_output)(struct ifnet *, struct mbuf *, struct sockaddr *, |
| 174 | 176 | 		 struct rtentry *); |
| 175 | 	void	(*tp_input)(struct ifnet *, struct mbuf *, struct netstack *); | |
| 176 | 177 | |
| 177 | 178 | 	SLIST_ENTRY(trunk_port)		tp_entries; |
| 178 | 179 | }; |
lib/libc/include/generic-openbsd/net/if_types.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_types.h,v 1.24 2022/01/02 22:36:04 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: if_types.h,v 1.25 2026/03/23 08:42:22 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if_types.h,v 1.17 2000/10/26 06:51:31 onoe Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -175,7 +175,7 @@ |
| 175 | 175 | #define	IFT_A12MPPSWITCH	 0x82	/* Avalon Parallel Processor */ |
| 176 | 176 | #define	IFT_TUNNEL		 0x83	/* Encapsulation interface */ |
| 177 | 177 | #define	IFT_COFFEE		 0x84	/* coffee pot */ |
| 178 | #define	IFT_CES			 0x85	/* Circiut Emulation Service */ | |
| 178 | #define	IFT_CES			 0x85	/* Circuit Emulation Service */ | |
| 179 | 179 | #define	IFT_ATMSUBINTERFACE	 0x86	/* (x) ATM Sub Interface */ |
| 180 | 180 | #define	IFT_L2VLAN		 0x87	/* Layer 2 Virtual LAN using 802.1Q */ |
| 181 | 181 | #define	IFT_L3IPVLAN		 0x88	/* Layer 3 Virtual LAN - IP Protocol */ |
lib/libc/include/generic-openbsd/net/if_var.h+34-12| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_var.h,v 1.139 2025/07/19 16:40:40 mvs Exp $	*/ | |
| 1 | /*	$OpenBSD: if_var.h,v 1.148 2026/03/22 23:14:00 bluhm Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | |
| 41 | 41 | #include <sys/queue.h> |
| 42 | 42 | #include <sys/mbuf.h> |
| 43 | #include <sys/srp.h> | |
| 43 | #include <sys/smr.h> | |
| 44 | 44 | #include <sys/refcnt.h> |
| 45 | 45 | #include <sys/task.h> |
| 46 | 46 | #include <sys/timeout.h> |
| ... | ... | @@ -81,6 +81,7 @@ |
| 81 | 81 | *	K	kernel lock |
| 82 | 82 | *	N	net lock |
| 83 | 83 | *	T	if_tmplist_lock |
| 84 | *	m	interface multicast rwlock if_maddrlock | |
| 84 | 85 | * |
| 85 | 86 | * For SRP related structures that allow lock-free reads, the write lock |
| 86 | 87 | * is indicated below. |
| ... | ... | @@ -92,9 +93,12 @@ struct task; |
| 92 | 93 | struct cpumem; |
| 93 | 94 | |
| 94 | 95 | struct netstack { |
| 95 | 	struct route		ns_route; | |
| 96 | 	struct mbuf_list	ns_tcp_ml; | |
| 97 | 	struct mbuf_list	ns_tcp6_ml; | |
| 96 | 	struct mbuf_list	 ns_input; | |
| 97 | 	struct mbuf_list	 ns_proto; | |
| 98 | ||
| 99 | 	struct route		 ns_route; | |
| 100 | 	struct mbuf_list	 ns_tcp_ml; | |
| 101 | 	struct mbuf_list	 ns_tcp6_ml; | |
| 98 | 102 | }; |
| 99 | 103 | |
| 100 | 104 | /* |
| ... | ... | @@ -141,6 +145,8 @@ enum if_counters { |
| 141 | 145 | * (Would like to call this struct ``if'', but C isn't PL/1.) |
| 142 | 146 | */ |
| 143 | 147 | TAILQ_HEAD(ifnet_head, ifnet);		/* the actual queue head */ |
| 148 | struct carp_softc; | |
| 149 | SMR_LIST_HEAD(carp_iflist, carp_softc); | |
| 144 | 150 | |
| 145 | 151 | struct ifnet {				/* and the entries */ |
| 146 | 152 | 	void	*if_softc;		/* [I] lower-level data for this if */ |
| ... | ... | @@ -148,8 +154,9 @@ struct ifnet {				/* and the entries */ |
| 148 | 154 | 	TAILQ_ENTRY(ifnet) if_list;	/* [NK] all struct ifnets are chained */ |
| 149 | 155 | 	TAILQ_ENTRY(ifnet) if_tmplist;	/* [T] temporary list */ |
| 150 | 156 | 	TAILQ_HEAD(, ifaddr) if_addrlist; /* [N] list of addresses per if */ |
| 151 | 	TAILQ_HEAD(, ifmaddr) if_maddrlist; /* [N] list of multicast records */ | |
| 157 | 	TAILQ_HEAD(, ifmaddr) if_maddrlist; /* [m] list of multicast records */ | |
| 152 | 158 | 	TAILQ_HEAD(, ifg_list) if_groups; /* [N] list of groups per if */ |
| 159 | 	struct rwlock if_maddrlock; | |
| 153 | 160 | 	struct task_list if_addrhooks;	/* [I] address change callbacks */ |
| 154 | 161 | 	struct task_list if_linkstatehooks; /* [I] link change callbacks*/ |
| 155 | 162 | 	struct task_list if_detachhooks; /* [I] detach callbacks */ |
| ... | ... | @@ -163,9 +170,11 @@ struct ifnet {				/* and the entries */ |
| 163 | 170 | 	caddr_t if_mcast6;		/* used by IPv6 multicast code */ |
| 164 | 171 | 	caddr_t	if_pf_kif;		/* pf interface abstraction */ |
| 165 | 172 | 	union { |
| 166 | 		struct srpl carp_s;	/* carp if list (used by !carp ifs) */ | |
| 167 | 		unsigned int carp_idx;	/* index of carpdev (used by carp | |
| 168 | 						ifs) */ | |
| 173 | 		/* carp if list (used by IFT_ETHER) */ | |
| 174 | 		struct carp_iflist carp_s; | |
| 175 | ||
| 176 | 		/* index of carpdev (used by IFT_CARP) */ | |
| 177 | 		unsigned int carp_idx; | |
| 169 | 178 | 	} if_carp_ptr; |
| 170 | 179 | #define if_carp		if_carp_ptr.carp_s |
| 171 | 180 | #define if_carpdevidx	if_carp_ptr.carp_idx |
| ... | ... | @@ -254,6 +263,7 @@ struct ifaddr { |
| 254 | 263 | 	struct	ifnet *ifa_ifp;		/* back-pointer to interface */ |
| 255 | 264 | 	TAILQ_ENTRY(ifaddr) ifa_list;	/* [N] list of addresses for |
| 256 | 265 | 					 interface */ |
| 266 | 	TAILQ_ENTRY(ifaddr) ifa_tmplist;/* [T] temporary list */ | |
| 257 | 267 | 	u_int	ifa_flags;		/* interface flags, see below */ |
| 258 | 268 | 	struct	refcnt ifa_refcnt;	/* number of `rt_ifa` references */ |
| 259 | 269 | 	int	ifa_metric;		/* cost of going out this interface */ |
| ... | ... | @@ -265,10 +275,10 @@ struct ifaddr { |
| 265 | 275 | * Interface multicast address. |
| 266 | 276 | */ |
| 267 | 277 | struct ifmaddr { |
| 268 | 	struct sockaddr		*ifma_addr;	/* Protocol address */ | |
| 269 | 	unsigned int		 ifma_ifidx;	/* Index of the interface */ | |
| 278 | 	TAILQ_ENTRY(ifmaddr)	 ifma_list;	/* [m] Per-interface list */ | |
| 279 | 	struct sockaddr		*ifma_addr;	/* [I] Protocol address */ | |
| 270 | 280 | 	struct refcnt		 ifma_refcnt;	/* Count of references */ |
| 271 | 	TAILQ_ENTRY(ifmaddr)	 ifma_list;	/* Per-interface list */ | |
| 281 | 	unsigned int		 ifma_ifidx;	/* [I] Index of the interface */ | |
| 272 | 282 | }; |
| 273 | 283 | |
| 274 | 284 | /* |
| ... | ... | @@ -337,6 +347,9 @@ int	if_enqueue_ifq(struct ifnet *, struct mbuf *); |
| 337 | 347 | void	if_input(struct ifnet *, struct mbuf_list *); |
| 338 | 348 | void	if_vinput(struct ifnet *, struct mbuf *, struct netstack *); |
| 339 | 349 | void	if_input_process(struct ifnet *, struct mbuf_list *, unsigned int); |
| 350 | void	if_input_proto(struct ifnet *, struct mbuf *, | |
| 351 | 	 void (*)(struct ifnet *, struct mbuf *, struct netstack *), | |
| 352 | 	 struct netstack *); | |
| 340 | 353 | int	if_input_local(struct ifnet *, struct mbuf *, sa_family_t, |
| 341 | 354 | 	 struct netstack *); |
| 342 | 355 | int	if_output_ml(struct ifnet *, struct mbuf_list *, |
| ... | ... | @@ -351,6 +364,15 @@ void	p2p_rtrequest(struct ifnet *, int, struct rtentry *); |
| 351 | 364 | void	p2p_input(struct ifnet *, struct mbuf *, struct netstack *); |
| 352 | 365 | int	p2p_bpf_mtap(caddr_t, const struct mbuf *, u_int); |
| 353 | 366 | |
| 367 | /* this is a helper for if_input_process and similar functions */ | |
| 368 | static inline void | |
| 369 | if_input_process_proto(struct ifnet *ifp, struct mbuf *m, struct netstack *ns) | |
| 370 | { | |
| 371 | 	void (*input)(struct ifnet *, struct mbuf *, struct netstack *); | |
| 372 | 	input = m->m_pkthdr.ph_cookie; | |
| 373 | 	(*input)(ifp, m, ns); | |
| 374 | } | |
| 375 | ||
| 354 | 376 | struct	ifaddr *ifa_ifwithaddr(const struct sockaddr *, u_int); |
| 355 | 377 | struct	ifaddr *ifa_ifwithdstaddr(const struct sockaddr *, u_int); |
| 356 | 378 | struct	ifaddr *ifaof_ifpforaddr(const struct sockaddr *, struct ifnet *); |
lib/libc/include/generic-openbsd/net/netisr.h+1-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: netisr.h,v 1.61 2023/07/06 04:55:05 dlg Exp $	*/ | |
| 1 | /*	$OpenBSD: netisr.h,v 1.62 2025/10/30 17:30:46 mvs Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: netisr.h,v 1.12 1995/08/12 23:59:24 mycroft Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -44,7 +44,6 @@ |
| 44 | 44 | #define NETISR_IP	2		/* same as AF_INET */ |
| 45 | 45 | #define NETISR_ARP	18		/* same as AF_LINK */ |
| 46 | 46 | #define NETISR_IPV6	24		/* same as AF_INET6 */ |
| 47 | #define NETISR_PIPEX	27		/* for pipex processing */ | |
| 48 | 47 | #define NETISR_PPP	28		/* for PPP processing */ |
| 49 | 48 | #define NETISR_BRIDGE	29		/* for bridge processing */ |
| 50 | 49 | #define NETISR_PPPOE	30		/* for pppoe processing */ |
| ... | ... | @@ -63,7 +62,6 @@ void	ipintr(void); |
| 63 | 62 | void	ip6intr(void); |
| 64 | 63 | void	pppintr(void); |
| 65 | 64 | void	bridgeintr(void); |
| 66 | void	pipexintr(void); | |
| 67 | 65 | void	pppoeintr(void); |
| 68 | 66 | |
| 69 | 67 | #define	schednetisr(anisr)						\ |
lib/libc/include/generic-openbsd/net/pfvar.h+154-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pfvar.h,v 1.543 2025/04/14 20:02:34 sf Exp $ */ | |
| 1 | /*	$OpenBSD: pfvar.h,v 1.548 2026/02/05 03:26:00 dlg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001 Daniel Hartmeier |
| ... | ... | @@ -479,6 +479,13 @@ union pf_rule_ptr { |
| 479 | 479 | #define	PF_ANCHOR_HIWAT		 512 |
| 480 | 480 | #define	PF_OPTIMIZER_TABLE_PFX	"__automatic_" |
| 481 | 481 | |
| 482 | enum { | |
| 483 | 	PF_LIMITER_NOMATCH, | |
| 484 | 	PF_LIMITER_BLOCK | |
| 485 | }; | |
| 486 | ||
| 487 | #define	PF_LIMITER_DEFAULT	PF_LIMITER_BLOCK | |
| 488 | ||
| 482 | 489 | struct pf_rule { |
| 483 | 490 | 	struct pf_rule_addr	 src; |
| 484 | 491 | 	struct pf_rule_addr	 dst; |
| ... | ... | @@ -591,6 +598,14 @@ struct pf_rule { |
| 591 | 598 | 	u_int8_t		 set_prio[2]; |
| 592 | 599 | 	sa_family_t		 naf; |
| 593 | 600 | 	u_int8_t		 rcvifnot; |
| 601 | 	struct { | |
| 602 | 		u_int8_t	 id; | |
| 603 | 		int		 limiter_action; | |
| 604 | 	} 			 statelim; | |
| 605 | 	struct { | |
| 606 | 		u_int8_t	 id; | |
| 607 | 		int		 limiter_action; | |
| 608 | 	}			 sourcelim; | |
| 594 | 609 | |
| 595 | 610 | 	struct { |
| 596 | 611 | 		struct pf_addr		addr; |
| ... | ... | @@ -1502,6 +1517,133 @@ struct pfioc_synflwats { |
| 1502 | 1517 | 	u_int32_t	lowat; |
| 1503 | 1518 | }; |
| 1504 | 1519 | |
| 1520 | #define PF_STATELIM_NAME_LEN	16	/* kstat istr */ | |
| 1521 | #define PF_STATELIM_DESCR_LEN	64 | |
| 1522 | ||
| 1523 | struct pfioc_statelim { | |
| 1524 | 	u_int32_t	ticket; | |
| 1525 | ||
| 1526 | 	char		name[PF_STATELIM_NAME_LEN]; | |
| 1527 | 	uint32_t	id; | |
| 1528 | #define PF_STATELIM_ID_NONE	0 | |
| 1529 | #define PF_STATELIM_ID_MIN	1 | |
| 1530 | #define PF_STATELIM_ID_MAX	255	/* fits in pf_state uint8_t */ | |
| 1531 | ||
| 1532 | 	/* limit on the total number of states */ | |
| 1533 | 	unsigned int	limit; | |
| 1534 | #define PF_STATELIM_LIMIT_MIN	1 | |
| 1535 | #define PF_STATELIM_LIMIT_MAX	(1 << 24) /* pf is pretty scalable */ | |
| 1536 | ||
| 1537 | 	/* rate limit on the creation of states */ | |
| 1538 | 	struct { | |
| 1539 | 		unsigned int	limit; | |
| 1540 | 		unsigned int	seconds; | |
| 1541 | 	}		rate; | |
| 1542 | ||
| 1543 | 	char		description[PF_STATELIM_DESCR_LEN]; | |
| 1544 | ||
| 1545 | 	/* kernel state for GET ioctls */ | |
| 1546 | 	unsigned int	inuse;		/* gauge */ | |
| 1547 | 	uint64_t	admitted;	/* counter */ | |
| 1548 | 	uint64_t	hardlimited;	/* counter */ | |
| 1549 | 	uint64_t	ratelimited;	/* counter */ | |
| 1550 | }; | |
| 1551 | ||
| 1552 | #define PF_SOURCELIM_NAME_LEN	16	/* kstat istr */ | |
| 1553 | #define PF_SOURCELIM_DESCR_LEN	64 | |
| 1554 | ||
| 1555 | struct pfioc_sourcelim { | |
| 1556 | 	u_int32_t	ticket; | |
| 1557 | ||
| 1558 | 	char		name[PF_SOURCELIM_NAME_LEN]; | |
| 1559 | 	uint32_t	id; | |
| 1560 | #define PF_SOURCELIM_ID_NONE	0 | |
| 1561 | #define PF_SOURCELIM_ID_MIN	1 | |
| 1562 | #define PF_SOURCELIM_ID_MAX	255	/* fits in pf_state uint8_t */ | |
| 1563 | ||
| 1564 | 	/* limit on the total number of address entries */ | |
| 1565 | 	unsigned int	entries; | |
| 1566 | ||
| 1567 | 	/* limit on the number of states per address entry */ | |
| 1568 | 	unsigned int	limit; | |
| 1569 | ||
| 1570 | 	/* rate limit on the creation of states by an address entry */ | |
| 1571 | 	struct { | |
| 1572 | 		unsigned int	limit; | |
| 1573 | 		unsigned int	seconds; | |
| 1574 | 	}		rate; | |
| 1575 | ||
| 1576 | 	/* | |
| 1577 | 	 * when the number of states on an entry exceeds hwm, add | |
| 1578 | 	 * the address to the specified table. when the number of | |
| 1579 | 	 * states goes below lwm, remove it from the table. | |
| 1580 | 	 */ | |
| 1581 | 	char		overload_tblname[PF_TABLE_NAME_SIZE]; | |
| 1582 | 	unsigned int	overload_hwm; | |
| 1583 | 	unsigned int	overload_lwm; | |
| 1584 | ||
| 1585 | 	/* | |
| 1586 | 	 * mask addresses before they're used for entries. /64s | |
| 1587 | 	 * everywhere for inet6 makes it easy to use too much memory. | |
| 1588 | 	 */ | |
| 1589 | 	unsigned int	inet_prefix; | |
| 1590 | 	unsigned int	inet6_prefix; | |
| 1591 | ||
| 1592 | 	char		description[PF_SOURCELIM_DESCR_LEN]; | |
| 1593 | ||
| 1594 | 	/* kernel state for GET ioctls */ | |
| 1595 | 	unsigned int	nentries;	/* gauge */ | |
| 1596 | 	unsigned int	inuse;		/* gauge */ | |
| 1597 | ||
| 1598 | 	uint64_t	addrallocs;	/* counter */ | |
| 1599 | 	uint64_t	addrnomem;	/* counter */ | |
| 1600 | 	uint64_t	admitted;	/* counter */ | |
| 1601 | 	uint64_t	addrlimited;	/* counter */ | |
| 1602 | 	uint64_t	hardlimited;	/* counter */ | |
| 1603 | 	uint64_t	ratelimited;	/* counter */ | |
| 1604 | }; | |
| 1605 | ||
| 1606 | struct pfioc_source_entry { | |
| 1607 | 	sa_family_t	af; | |
| 1608 | 	unsigned int	rdomain; | |
| 1609 | 	struct pf_addr	addr; | |
| 1610 | ||
| 1611 | 	/* stats */ | |
| 1612 | ||
| 1613 | 	unsigned int	inuse;		/* gauge */ | |
| 1614 | 	uint64_t	admitted;	/* counter */ | |
| 1615 | 	uint64_t	hardlimited;	/* counter */ | |
| 1616 | 	uint64_t	ratelimited;	/* counter */ | |
| 1617 | }; | |
| 1618 | ||
| 1619 | struct pfioc_source { | |
| 1620 | 	char		name[PF_SOURCELIM_NAME_LEN]; | |
| 1621 | 	uint32_t	id; | |
| 1622 | ||
| 1623 | 	/* copied from the parent source limiter */ | |
| 1624 | ||
| 1625 | 	unsigned int	inet_prefix; | |
| 1626 | 	unsigned int	inet6_prefix; | |
| 1627 | 	unsigned int	limit; | |
| 1628 | ||
| 1629 | 	/* source entries */ | |
| 1630 | 	size_t		entry_size;	/* sizeof(struct pfioc_source_entry) */ | |
| 1631 | ||
| 1632 | 	struct pfioc_source_entry *key; | |
| 1633 | 	struct pfioc_source_entry *entries; | |
| 1634 | 	size_t		entrieslen;	/* bytes */ | |
| 1635 | }; | |
| 1636 | ||
| 1637 | struct pfioc_source_kill { | |
| 1638 | 	char		name[PF_SOURCELIM_NAME_LEN]; | |
| 1639 | 	uint32_t	id; | |
| 1640 | 	unsigned int	rdomain; | |
| 1641 | 	sa_family_t	af; | |
| 1642 | 	struct pf_addr	addr; | |
| 1643 | ||
| 1644 | 	unsigned int	rmstates;	/* kill the states too? */ | |
| 1645 | }; | |
| 1646 | ||
| 1505 | 1647 | /* |
| 1506 | 1648 | * ioctl operations |
| 1507 | 1649 | */ |
| ... | ... | @@ -1570,6 +1712,15 @@ struct pfioc_synflwats { |
| 1570 | 1712 | #define DIOCSETSYNCOOKIES	_IOWR('D', 98, u_int8_t) |
| 1571 | 1713 | #define DIOCGETSYNFLWATS	_IOWR('D', 99, struct pfioc_synflwats) |
| 1572 | 1714 | #define DIOCXEND	_IOWR('D', 100, u_int32_t) |
| 1715 | #define DIOCADDSTATELIM		_IOW('D', 101, struct pfioc_statelim) | |
| 1716 | #define DIOCADDSOURCELIM	_IOW('D', 102, struct pfioc_sourcelim) | |
| 1717 | #define DIOCGETSTATELIM		_IOWR('D', 103, struct pfioc_statelim) | |
| 1718 | #define DIOCGETSOURCELIM	_IOWR('D', 104, struct pfioc_sourcelim) | |
| 1719 | #define DIOCGETSOURCE		_IOWR('D', 105, struct pfioc_source) | |
| 1720 | #define DIOCGETNSTATELIM	_IOWR('D', 106, struct pfioc_statelim) | |
| 1721 | #define DIOCGETNSOURCELIM	_IOWR('D', 107, struct pfioc_sourcelim) | |
| 1722 | #define DIOCGETNSOURCE		_IOWR('D', 108, struct pfioc_source) | |
| 1723 | #define DIOCCLRSOURCE		_IOWR('D', 109, struct pfioc_source_kill) | |
| 1573 | 1724 | |
| 1574 | 1725 | #ifdef _KERNEL |
| 1575 | 1726 | |
| ... | ... | @@ -1723,6 +1874,8 @@ int	pfr_clr_tstats(struct pfr_table *, int, int *, int); |
| 1723 | 1874 | int	pfr_set_tflags(struct pfr_table *, int, int, int, int *, int *, int); |
| 1724 | 1875 | int	pfr_clr_addrs(struct pfr_table *, int *, int); |
| 1725 | 1876 | int	pfr_insert_kentry(struct pfr_ktable *, struct pfr_addr *, time_t); |
| 1877 | int	pfr_remove_kentry(struct pfr_ktable *, struct pfr_addr *); | |
| 1878 | ||
| 1726 | 1879 | int	pfr_add_addrs(struct pfr_table *, struct pfr_addr *, int, int *, |
| 1727 | 1880 | 	 int); |
| 1728 | 1881 | int	pfr_del_addrs(struct pfr_table *, struct pfr_addr *, int, int *, |
lib/libc/include/generic-openbsd/net/pfvar_priv.h+256-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pfvar_priv.h,v 1.38 2024/09/07 22:41:55 aisha Exp $	*/ | |
| 1 | /*	$OpenBSD: pfvar_priv.h,v 1.42 2026/02/05 03:26:00 dlg Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001 Daniel Hartmeier |
| ... | ... | @@ -39,6 +39,7 @@ |
| 39 | 39 | |
| 40 | 40 | #include <sys/rwlock.h> |
| 41 | 41 | #include <sys/mutex.h> |
| 42 | #include <sys/pclock.h> | |
| 42 | 43 | #include <sys/percpu.h> |
| 43 | 44 | |
| 44 | 45 | /* |
| ... | ... | @@ -47,6 +48,45 @@ |
| 47 | 48 | */ |
| 48 | 49 | |
| 49 | 50 | struct pfsync_deferral; |
| 51 | struct kstat; | |
| 52 | ||
| 53 | /* | |
| 54 | * PF state links | |
| 55 | * | |
| 56 | * This is used to augment a struct pf_state so it can be | |
| 57 | * tracked/referenced by the state and source address limiter things. | |
| 58 | * Each limiter maintains a list of the states they "own", and these | |
| 59 | * state links are what the limiters use to wire a state into their | |
| 60 | * lists. | |
| 61 | * | |
| 62 | * Without PF state links, the pf_state struct would have to grow | |
| 63 | * a lot to support a feature that may not be used. | |
| 64 | * | |
| 65 | * pfl_entry is used by the pools to add states to their list. | |
| 66 | * pfl_state allows the pools to get from their list of states to | |
| 67 | * the states themselves. | |
| 68 | * | |
| 69 | * pfl_link allows operations on states (well, delete) to be able | |
| 70 | * to quickly locate the pf_state_link struct so they can be unwired | |
| 71 | * from the pools. | |
| 72 | */ | |
| 73 | ||
| 74 | #define PF_STATE_LINK_TYPE_STATELIM	1 | |
| 75 | #define PF_STATE_LINK_TYPE_SOURCELIM	2 | |
| 76 | ||
| 77 | struct pf_state_link { | |
| 78 | 	/* used by source/state pools to get to states */ | |
| 79 | 	TAILQ_ENTRY(pf_state_link)	 pfl_link; | |
| 80 | ||
| 81 | 	/* used by pf_state to get to source/state pools */ | |
| 82 | 	SLIST_ENTRY(pf_state_link)	 pfl_linkage; | |
| 83 | ||
| 84 | 	struct pf_state			*pfl_state; | |
| 85 | 	unsigned int			 pfl_type; | |
| 86 | }; | |
| 87 | ||
| 88 | TAILQ_HEAD(pf_state_link_list, pf_state_link); | |
| 89 | SLIST_HEAD(pf_state_linkage, pf_state_link); | |
| 50 | 90 | |
| 51 | 91 | /* |
| 52 | 92 | * pf state items - links from pf_state_key to pf_states |
| ... | ... | @@ -144,6 +184,9 @@ struct pf_state { |
| 144 | 184 | 	u_int16_t		 if_index_out;	/* [I] */ |
| 145 | 185 | 	u_int16_t		 delay;		/* [I] */ |
| 146 | 186 | 	u_int8_t		 rt;		/* [I] */ |
| 187 | 	uint8_t			 statelim; | |
| 188 | 	uint8_t			 sourcelim; | |
| 189 | 	struct pf_state_linkage	 linkage; | |
| 147 | 190 | }; |
| 148 | 191 | |
| 149 | 192 | RBT_HEAD(pf_state_tree_id, pf_state); |
| ... | ... | @@ -256,6 +299,214 @@ struct pf_state_list { |
| 256 | 299 | 	.pfs_rwl	= RWLOCK_INITIALIZER("pfstates"),		\ |
| 257 | 300 | } |
| 258 | 301 | |
| 302 | /* | |
| 303 | * State limiter | |
| 304 | */ | |
| 305 | ||
| 306 | struct pf_statelim { | |
| 307 | 	RBT_ENTRY(pf_statelim)		 pfstlim_id_tree; | |
| 308 | 	RBT_ENTRY(pf_statelim)		 pfstlim_nm_tree; | |
| 309 | 	TAILQ_ENTRY(pf_statelim)	 pfstlim_list; | |
| 310 | 	struct kstat			*pfstlim_ks; | |
| 311 | ||
| 312 | 	uint32_t			 pfstlim_id; | |
| 313 | 	char				 pfstlim_nm[PF_STATELIM_NAME_LEN]; | |
| 314 | ||
| 315 | 	/* config */ | |
| 316 | ||
| 317 | 	unsigned int			 pfstlim_limit; | |
| 318 | 	struct { | |
| 319 | 		unsigned int			limit; | |
| 320 | 		unsigned int			seconds; | |
| 321 | 	}				 pfstlim_rate; | |
| 322 | ||
| 323 | 	/* run state */ | |
| 324 | 	struct pc_lock			 pfstlim_lock; | |
| 325 | ||
| 326 | 	/* rate limiter */ | |
| 327 | 	uint64_t			 pfstlim_rate_ts; | |
| 328 | 	uint64_t			 pfstlim_rate_token; | |
| 329 | 	uint64_t			 pfstlim_rate_bucket; | |
| 330 | ||
| 331 | 	unsigned int			 pfstlim_inuse; | |
| 332 | 	struct pf_state_link_list	 pfstlim_states; | |
| 333 | ||
| 334 | 	/* counters */ | |
| 335 | ||
| 336 | 	struct { | |
| 337 | 		uint64_t			admitted; | |
| 338 | 		uint64_t			hardlimited; | |
| 339 | 		uint64_t			ratelimited; | |
| 340 | 	}				 pfstlim_counters; | |
| 341 | ||
| 342 | 	struct { | |
| 343 | 		time_t				created; | |
| 344 | 		time_t				updated; | |
| 345 | 		time_t				cleared; | |
| 346 | 	}				 pfstlim_timestamps; | |
| 347 | }; | |
| 348 | ||
| 349 | RBT_HEAD(pf_statelim_id_tree, pf_statelim); | |
| 350 | RBT_PROTOTYPE(pf_statelim_id_tree, pf_statelim, pfstlim_id_tree, cmp); | |
| 351 | ||
| 352 | RBT_HEAD(pf_statelim_nm_tree, pf_statelim); | |
| 353 | RBT_PROTOTYPE(pf_statelim_nm_tree, pf_statelim, pfstlim_nm_tree, cmp); | |
| 354 | ||
| 355 | TAILQ_HEAD(pf_statelim_list, pf_statelim); | |
| 356 | ||
| 357 | extern struct pf_statelim_id_tree pf_statelim_id_tree_active; | |
| 358 | extern struct pf_statelim_list pf_statelim_list_active; | |
| 359 | ||
| 360 | extern struct pf_statelim_id_tree pf_statelim_id_tree_inactive; | |
| 361 | extern struct pf_statelim_nm_tree pf_statelim_nm_tree_inactive; | |
| 362 | extern struct pf_statelim_list pf_statelim_list_inactive; | |
| 363 | ||
| 364 | static inline unsigned int | |
| 365 | pf_statelim_enter(struct pf_statelim *pfstlim) | |
| 366 | { | |
| 367 | 	return (pc_sprod_enter(&pfstlim->pfstlim_lock)); | |
| 368 | } | |
| 369 | ||
| 370 | static inline void | |
| 371 | pf_statelim_leave(struct pf_statelim *pfstlim, unsigned int gen) | |
| 372 | { | |
| 373 | 	pc_sprod_leave(&pfstlim->pfstlim_lock, gen); | |
| 374 | } | |
| 375 | ||
| 376 | /* | |
| 377 | * Source address pools | |
| 378 | */ | |
| 379 | ||
| 380 | struct pf_sourcelim; | |
| 381 | ||
| 382 | struct pf_source { | |
| 383 | 	RBT_ENTRY(pf_source)		 pfsr_tree; | |
| 384 | 	RBT_ENTRY(pf_source)		 pfsr_ioc_tree; | |
| 385 | 	struct pf_sourcelim		*pfsr_parent; | |
| 386 | ||
| 387 | 	sa_family_t			 pfsr_af; | |
| 388 | 	u_int16_t			 pfsr_rdomain; | |
| 389 | 	struct pf_addr			 pfsr_addr; | |
| 390 | ||
| 391 | 	/* run state */ | |
| 392 | ||
| 393 | 	unsigned int			 pfsr_inuse; | |
| 394 | 	unsigned int			 pfsr_intable; | |
| 395 | 	struct pf_state_link_list	 pfsr_states; | |
| 396 | 	time_t				 pfsr_empty_ts; | |
| 397 | 	TAILQ_ENTRY(pf_source)		 pfsr_empty_gc; | |
| 398 | ||
| 399 | 	/* rate limiter */ | |
| 400 | 	uint64_t			 pfsr_rate_ts; | |
| 401 | ||
| 402 | 	struct { | |
| 403 | 		uint64_t			admitted; | |
| 404 | 		uint64_t			hardlimited; | |
| 405 | 		uint64_t			ratelimited; | |
| 406 | 	}				 pfsr_counters; | |
| 407 | }; | |
| 408 | ||
| 409 | RBT_HEAD(pf_source_tree, pf_source); | |
| 410 | RBT_PROTOTYPE(pf_source_tree, pf_source, pfsr_tree, cmp); | |
| 411 | ||
| 412 | RBT_HEAD(pf_source_ioc_tree, pf_source); | |
| 413 | RBT_PROTOTYPE(pf_source_ioc_tree, pf_source, pfsr_ioc_tree, cmp); | |
| 414 | ||
| 415 | TAILQ_HEAD(pf_source_list, pf_source); | |
| 416 | ||
| 417 | struct pf_sourcelim { | |
| 418 | 	RBT_ENTRY(pf_sourcelim)		 pfsrlim_id_tree; | |
| 419 | 	RBT_ENTRY(pf_sourcelim)		 pfsrlim_nm_tree; | |
| 420 | 	TAILQ_ENTRY(pf_sourcelim)	 pfsrlim_list; | |
| 421 | 	struct kstat			*pfsrlim_ks; | |
| 422 | ||
| 423 | 	uint32_t			 pfsrlim_id; | |
| 424 | 	char				 pfsrlim_nm[PF_SOURCELIM_NAME_LEN]; | |
| 425 | 	unsigned int			 pfsrlim_disabled; | |
| 426 | ||
| 427 | 	/* config */ | |
| 428 | ||
| 429 | 	unsigned int			 pfsrlim_entries; | |
| 430 | 	unsigned int			 pfsrlim_limit; | |
| 431 | 	unsigned int			 pfsrlim_ipv4_prefix; | |
| 432 | 	unsigned int			 pfsrlim_ipv6_prefix; | |
| 433 | ||
| 434 | 	struct { | |
| 435 | 		unsigned int			limit; | |
| 436 | 		unsigned int			seconds; | |
| 437 | 	}				 pfsrlim_rate; | |
| 438 | ||
| 439 | 	struct { | |
| 440 | 		char				name[PF_TABLE_NAME_SIZE]; | |
| 441 | 		unsigned int			hwm; | |
| 442 | 		unsigned int			lwm; | |
| 443 | 	 struct pfr_ktable		*table; | |
| 444 | 	}				 pfsrlim_overload; | |
| 445 | ||
| 446 | 	/* run state */ | |
| 447 | 	struct pc_lock			 pfsrlim_lock; | |
| 448 | ||
| 449 | 	struct pf_addr			 pfsrlim_ipv4_mask; | |
| 450 | 	struct pf_addr			 pfsrlim_ipv6_mask; | |
| 451 | ||
| 452 | 	uint64_t			 pfsrlim_rate_token; | |
| 453 | 	uint64_t			 pfsrlim_rate_bucket; | |
| 454 | ||
| 455 | 	/* number of pf_sources */ | |
| 456 | 	unsigned int			 pfsrlim_nsources; | |
| 457 | 	struct pf_source_tree		 pfsrlim_sources; | |
| 458 | 	struct pf_source_ioc_tree	 pfsrlim_ioc_sources; | |
| 459 | ||
| 460 | 	struct { | |
| 461 | 		/* number of times pf_source was allocated */ | |
| 462 | 		uint64_t			addrallocs; | |
| 463 | 		/* state was rejected because the address limit was hit */ | |
| 464 | 		uint64_t			addrlimited; | |
| 465 | 		/* no memory to create address thing */ | |
| 466 | 		uint64_t			addrnomem; | |
| 467 | ||
| 468 | 		/* sum of pf_source inuse gauges */ | |
| 469 | 		uint64_t			inuse; | |
| 470 | 		/* sum of pf_source admitted counters */ | |
| 471 | 		uint64_t			admitted; | |
| 472 | 		/* sum of pf_source hardlimited counters */ | |
| 473 | 		uint64_t			hardlimited; | |
| 474 | 		/* sum of pf_source ratelimited counters */ | |
| 475 | 		uint64_t			ratelimited; | |
| 476 | 	}				 pfsrlim_counters; | |
| 477 | }; | |
| 478 | ||
| 479 | RBT_HEAD(pf_sourcelim_id_tree, pf_sourcelim); | |
| 480 | RBT_PROTOTYPE(pf_sourcelim_id_tree, pf_sourcelim, pfsrlim_id_tree, cmp); | |
| 481 | ||
| 482 | RBT_HEAD(pf_sourcelim_nm_tree, pf_sourcelim); | |
| 483 | RBT_PROTOTYPE(pf_sourcelim_nm_tree, pf_sourcelim, pfsrlim_nm_tree, cmp); | |
| 484 | ||
| 485 | TAILQ_HEAD(pf_sourcelim_list, pf_sourcelim); | |
| 486 | ||
| 487 | extern struct pf_sourcelim_id_tree pf_sourcelim_id_tree_active; | |
| 488 | extern struct pf_sourcelim_list pf_sourcelim_list_active; | |
| 489 | ||
| 490 | extern struct pf_sourcelim_id_tree pf_sourcelim_id_tree_inactive; | |
| 491 | extern struct pf_sourcelim_nm_tree pf_sourcelim_nm_tree_inactive; | |
| 492 | extern struct pf_sourcelim_list pf_sourcelim_list_inactive; | |
| 493 | ||
| 494 | static inline unsigned int | |
| 495 | pf_sourcelim_enter(struct pf_sourcelim *pfsrlim) | |
| 496 | { | |
| 497 | 	return (pc_sprod_enter(&pfsrlim->pfsrlim_lock)); | |
| 498 | } | |
| 499 | ||
| 500 | static inline void | |
| 501 | pf_sourcelim_leave(struct pf_sourcelim *pfsrlim, unsigned int gen) | |
| 502 | { | |
| 503 | 	pc_sprod_leave(&pfsrlim->pfsrlim_lock, gen); | |
| 504 | } | |
| 505 | ||
| 506 | /* | |
| 507 | * pf internals | |
| 508 | */ | |
| 509 | ||
| 259 | 510 | extern struct rwlock pf_lock; |
| 260 | 511 | |
| 261 | 512 | struct pf_pdesc { |
| ... | ... | @@ -429,6 +680,10 @@ u_int16_t		pf_pkt_hash(sa_family_t, uint8_t, |
| 429 | 680 | 			 const struct pf_addr *, const struct pf_addr *, |
| 430 | 681 | 			 uint16_t, uint16_t); |
| 431 | 682 | |
| 683 | void			pf_status_init(void); | |
| 684 | void			pf_status_clear(void); | |
| 685 | void			pf_status_read(struct pf_status *); | |
| 686 | ||
| 432 | 687 | #endif /* _KERNEL */ |
| 433 | 688 | |
| 434 | 689 | #endif /* _NET_PFVAR_PRIV_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/net80211/ieee80211.h+76-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ieee80211.h,v 1.64 2025/08/04 11:39:50 stsp Exp $	*/ | |
| 1 | /*	$OpenBSD: ieee80211.h,v 1.66 2026/03/29 21:16:21 kirill Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ieee80211.h,v 1.6 2004/04/30 23:51:53 dyoung Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -454,9 +454,16 @@ enum { |
| 454 | 454 | 	IEEE80211_ELEMID_QUIET_CHNL		= 198,	/* 11ac */ |
| 455 | 455 | 	IEEE80211_ELEMID_OPMODE_NOTIF		= 199,	/* 11ac */ |
| 456 | 456 | 	/* 200-220 reserved */ |
| 457 | 	IEEE80211_ELEMID_VENDOR			= 221	/* vendor private */ | |
| 458 | 	/* 222-255 reserved */ | |
| 457 | 	IEEE80211_ELEMID_VENDOR			= 221,	/* vendor private */ | |
| 458 | 	/* 222-254 reserved */ | |
| 459 | 	IEEE80211_ELEMID_EXTENSION		= 255	/* Extension */ | |
| 459 | 460 | }; |
| 461 | /* | |
| 462 | * Extension element IDs | |
| 463 | * Used with IEEE80211_ELEMID_EXTENSION (255) | |
| 464 | */ | |
| 465 | #define IEEE80211_ELEMID_EXT_HECAPS		35	/* 11ax HE Capabilities */ | |
| 466 | #define IEEE80211_ELEMID_EXT_HEOP		36	/* 11ax HE Operation */ | |
| 460 | 467 | |
| 461 | 468 | /* |
| 462 | 469 | * Action field category values (see 802.11-2012 8.4.1.11 Table 8-38). |
| ... | ... | @@ -518,6 +525,7 @@ enum { |
| 518 | 525 | |
| 519 | 526 | #define	IEEE80211_HT_NUM_MCS			77 |
| 520 | 527 | #define	IEEE80211_VHT_NUM_MCS			10 |
| 528 | #define	IEEE80211_HE_NUM_MCS			12 | |
| 521 | 529 | |
| 522 | 530 | /* |
| 523 | 531 | * BlockAck/BlockAckReq Control field (see 802.11-2012 8.3.1.9 Figure 8-25). |
| ... | ... | @@ -712,7 +720,8 @@ enum { |
| 712 | 720 | #define IEEE80211_HTOP1_NONGF_STA	0x0004 |
| 713 | 721 | /* Bit 3 is reserved. */ |
| 714 | 722 | #define IEEE80211_HTOP1_OBSS_NONHT_STA	0x0010 |
| 715 | /* Bits 5-15 are reserved. */ | |
| 723 | #define IEEE80211_HTOP1_CCFS2_SHIFT	5 | |
| 724 | #define IEEE80211_HTOP1_CCFS2_MASK	0x1fe0 | |
| 716 | 725 | /* Bytes 4-5. */ |
| 717 | 726 | /* Bits 0-5 are reserved. */ |
| 718 | 727 | #define IEEE80211_HTOP2_DUALBEACON	0x0040 |
| ... | ... | @@ -768,6 +777,8 @@ enum { |
| 768 | 777 | #define IEEE80211_VHTCAP_LINK_ADAPT_MRQ_MFB	3 |
| 769 | 778 | #define IEEE80211_VHTCAP_RX_ANT_PATTERN		0x10000000 |
| 770 | 779 | #define IEEE80211_VHTCAP_TX_ANT_PATTERN		0x20000000 |
| 780 | #define IEEE80211_VHTCAP_EXT_NSS_BW_SHIFT	30 | |
| 781 | #define IEEE80211_VHTCAP_EXT_NSS_BW_MASK	0xc0000000 | |
| 771 | 782 | |
| 772 | 783 | /* |
| 773 | 784 | * VHT-MCS and NSS map (see 802.11ac-2013 8.4.2.160.3, Figure 8-401bs). |
| ... | ... | @@ -784,6 +795,7 @@ enum { |
| 784 | 795 | |
| 785 | 796 | #define IEEE80211_VHT_MAX_LGI_MBIT_S_MASK	0x1fff |
| 786 | 797 | #define IEEE80211_VHT_MAX_LGI_MBIT_S_SHIFT	0 |
| 798 | #define IEEE80211_VHT_EXT_NSS_BW_CAPABLE	(1 << 13) | |
| 787 | 799 | |
| 788 | 800 | /* The highest number of spatial streams supported by VHT. */ |
| 789 | 801 | #define IEEE80211_VHT_NUM_SS	8 |
| ... | ... | @@ -801,6 +813,66 @@ enum { |
| 801 | 813 | /* Byte 1 contains channel center frequency index 0 for 80, 80+80, 160 MHz. */ |
| 802 | 814 | /* Byte 2 contains channel center frequency index 1 for 80+80 MHz only. */ |
| 803 | 815 | |
| 816 | ||
| 817 | /* | |
| 818 | * 802.11ax (HE) definitions. | |
| 819 | */ | |
| 820 | ||
| 821 | /* HE Capabilities element fixed fields */ | |
| 822 | #define IEEE80211_HE_MAC_CAPS_LEN		6 | |
| 823 | #define IEEE80211_HE_PHY_CAPS_LEN		11 | |
| 824 | #define IEEE80211_HE_CAPS_FIXED_LEN		(IEEE80211_HE_MAC_CAPS_LEN + \ | |
| 825 | 						 IEEE80211_HE_PHY_CAPS_LEN) | |
| 826 | ||
| 827 | /* HE Tx/Rx MCS NSS Support field size for 80 MHz */ | |
| 828 | #define IEEE80211_HE_MCS_NSS_80_LEN		4 | |
| 829 | ||
| 830 | /* Minimum length of the HE Capabilities element body (includes Ext ID) */ | |
| 831 | #define IEEE80211_HE_CAPS_MINLEN		(1 + IEEE80211_HE_CAPS_FIXED_LEN + \ | |
| 832 | 						 IEEE80211_HE_MCS_NSS_80_LEN) | |
| 833 | ||
| 834 | /* | |
| 835 | * Selected HE PHY capability bits (phy_cap_info[0]) | |
| 836 | * These are used to determine the presence of additional MCS/NSS maps. | |
| 837 | */ | |
| 838 | #define IEEE80211_HE_PHYCAP0_CHAN_WIDTH_40_IN_2G		0x02 | |
| 839 | #define IEEE80211_HE_PHYCAP0_CHAN_WIDTH_40_80_IN_5G		0x04 | |
| 840 | #define IEEE80211_HE_PHYCAP0_CHAN_WIDTH_160_IN_5G		0x08 | |
| 841 | #define IEEE80211_HE_PHYCAP0_CHAN_WIDTH_8080_IN_5G		0x10 | |
| 842 | ||
| 843 | /* | |
| 844 | * Size of the HE Tx/Rx MCS NSS Support field, in bytes, for a given | |
| 845 | * HE PHY capabilities byte 0. | |
| 846 | */ | |
| 847 | #define IEEE80211_HE_MCS_NSS_SIZE(_phycap0)	(IEEE80211_HE_MCS_NSS_80_LEN + \ | |
| 848 | 	((((_phycap0) & IEEE80211_HE_PHYCAP0_CHAN_WIDTH_160_IN_5G) ? 4 : 0)) + \ | |
| 849 | 	((((_phycap0) & IEEE80211_HE_PHYCAP0_CHAN_WIDTH_8080_IN_5G) ? 4 : 0))) | |
| 850 | ||
| 851 | /* | |
| 852 | * HE MCS and NSS map (HE-MCS/NSS set) | |
| 853 | * | |
| 854 | * Set of HE MCS supported for a given number of spatial streams, `n'. | |
| 855 | * Used by the HE capabilities IE and by the basic HE MCS set in | |
| 856 | * the HE operation IE. | |
| 857 | */ | |
| 858 | #define IEEE80211_HE_MCS_FOR_SS_MASK(n)	(0x3 << (2 * ((n) - 1))) | |
| 859 | #define IEEE80211_HE_MCS_FOR_SS_SHIFT(n)	(2 * ((n) - 1)) | |
| 860 | #define IEEE80211_HE_MCS_0_7			0 | |
| 861 | #define IEEE80211_HE_MCS_0_9			1 | |
| 862 | #define IEEE80211_HE_MCS_0_11			2 | |
| 863 | #define IEEE80211_HE_MCS_SS_NOT_SUPP		3 | |
| 864 | ||
| 865 | /* The highest number of spatial streams supported by HE */ | |
| 866 | #define IEEE80211_HE_NUM_SS			8 | |
| 867 | ||
| 868 | /* | |
| 869 | * HE Operation element fixed fields (not including the Ext ID byte) | |
| 870 | */ | |
| 871 | #define IEEE80211_HEOP_PARAMS_LEN		4 | |
| 872 | #define IEEE80211_HEOP_BASIC_MCS_LEN		2 | |
| 873 | #define IEEE80211_HEOP_FIXED_LEN		(IEEE80211_HEOP_PARAMS_LEN + \ | |
| 874 | 					IEEE80211_HEOP_BASIC_MCS_LEN) | |
| 875 | ||
| 804 | 876 | /* |
| 805 | 877 | * EDCA Access Categories. |
| 806 | 878 | */ |
lib/libc/include/generic-openbsd/net80211/ieee80211_ioctl.h+3-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ieee80211_ioctl.h,v 1.44 2025/03/22 07:24:08 kevlo Exp $	*/ | |
| 1 | /*	$OpenBSD: ieee80211_ioctl.h,v 1.45 2026/03/26 12:15:01 kirill Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -385,9 +385,10 @@ struct ieee80211_nodereq { |
| 385 | 385 | #define IEEE80211_NODEREQ_ASSOCFAIL_BSSID	0x20 |
| 386 | 386 | #define IEEE80211_NODEREQ_ASSOCFAIL_WPA_PROTO	0x40 |
| 387 | 387 | #define IEEE80211_NODEREQ_ASSOCFAIL_WPA_KEY	0x80 |
| 388 | #define IEEE80211_NODEREQ_ASSOCFAIL_CSA		0x100 | |
| 388 | 389 | #define IEEE80211_NODEREQ_ASSOCFAIL_BITS	\ |
| 389 | 390 | 	"\20\1!CHAN\2!IBSS\3!PRIVACY\4!BASICRATE\5!ESSID\6!BSSID\7!WPAPROTO" \ |
| 390 | 	"\10!WPAKEY" | |
| 391 | 	"\10!WPAKEY\11!CSA" | |
| 391 | 392 | |
| 392 | 393 | /* get the entire node cache */ |
| 393 | 394 | struct ieee80211_nodereq_all { |
lib/libc/include/generic-openbsd/net80211/ieee80211_node.h+48-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ieee80211_node.h,v 1.97 2025/08/01 20:39:26 stsp Exp $	*/ | |
| 1 | /*	$OpenBSD: ieee80211_node.h,v 1.101 2026/03/29 21:16:21 kirill Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -370,6 +370,20 @@ struct ieee80211_node { |
| 370 | 370 | 	uint8_t			ni_vht_chan_center_freq_idx1; |
| 371 | 371 | 	uint16_t		ni_vht_basic_mcs; |
| 372 | 372 | |
| 373 | 	/* HE capabilities */ | |
| 374 | 	uint8_t			ni_he_mac_cap[IEEE80211_HE_MAC_CAPS_LEN]; | |
| 375 | 	uint8_t			ni_he_phy_cap[IEEE80211_HE_PHY_CAPS_LEN]; | |
| 376 | 	uint16_t		ni_he_rxmcs_80; | |
| 377 | 	uint16_t		ni_he_txmcs_80; | |
| 378 | 	uint16_t		ni_he_rxmcs_160; | |
| 379 | 	uint16_t		ni_he_txmcs_160; | |
| 380 | 	uint16_t		ni_he_rxmcs_80p80; | |
| 381 | 	uint16_t		ni_he_txmcs_80p80; | |
| 382 | ||
| 383 | 	/* HE operation */ | |
| 384 | 	uint8_t			ni_he_oper_params[IEEE80211_HEOP_PARAMS_LEN]; | |
| 385 | 	uint16_t		ni_he_basic_mcs; | |
| 386 | ||
| 373 | 387 | 	/* Timeout handlers which trigger Tx Block Ack negotiation. */ |
| 374 | 388 | 	struct timeout		ni_addba_req_to[IEEE80211_NUM_TID]; |
| 375 | 389 | 	int			ni_addba_req_intval[IEEE80211_NUM_TID]; |
| ... | ... | @@ -381,6 +395,7 @@ struct ieee80211_node { |
| 381 | 395 | |
| 382 | 396 | 	int			ni_txmcs;	/* current MCS used for TX */ |
| 383 | 397 | 	int			ni_vht_ss;	/* VHT # spatial streams */ |
| 398 | 	int			ni_he_ss;	/* HE # spatial streams */ | |
| 384 | 399 | |
| 385 | 400 | 	/* others */ |
| 386 | 401 | 	u_int16_t		ni_associd;	/* assoc response */ |
| ... | ... | @@ -398,6 +413,7 @@ struct ieee80211_node { |
| 398 | 413 | #define IEEE80211_NODE_ASSOCFAIL_BSSID		0x20 |
| 399 | 414 | #define IEEE80211_NODE_ASSOCFAIL_WPA_PROTO	0x40 |
| 400 | 415 | #define IEEE80211_NODE_ASSOCFAIL_WPA_KEY	0x80 |
| 416 | #define IEEE80211_NODE_ASSOCFAIL_CSA		0x100 | |
| 401 | 417 | |
| 402 | 418 | 	int			ni_inact;	/* inactivity mark count */ |
| 403 | 419 | 	int			ni_txrate;	/* index to ni_rates[] */ |
| ... | ... | @@ -427,6 +443,9 @@ struct ieee80211_node { |
| 427 | 443 | #define IEEE80211_NODE_VHTCAP		0x40000	/* claims to support VHT */ |
| 428 | 444 | #define IEEE80211_NODE_VHT_SGI80	0x80000	/* SGI on 80 MHz negotiated */ |
| 429 | 445 | #define IEEE80211_NODE_VHT_SGI160	0x100000 /* SGI on 160 MHz negotiated */ |
| 446 | #define IEEE80211_NODE_HE		0x200000 /* HE negotiated */ | |
| 447 | #define IEEE80211_NODE_HECAP		0x400000 /* claims to support HE */ | |
| 448 | #define IEEE80211_NODE_CSA		0x800000 /* channel switch announced */ | |
| 430 | 449 | |
| 431 | 450 | 	/* If not NULL, this function gets called when ni_refcnt hits zero. */ |
| 432 | 451 | 	void			(*ni_unref_cb)(struct ieee80211com *, |
| ... | ... | @@ -590,7 +609,11 @@ ieee80211_node_supports_vht_chan160(struct ieee80211_node *ni) |
| 590 | 609 | |
| 591 | 610 | 	cap_chan_width = (ni->ni_vhtcaps & IEEE80211_VHTCAP_CHAN_WIDTH_MASK) >> |
| 592 | 611 | 	 IEEE80211_VHTCAP_CHAN_WIDTH_SHIFT; |
| 593 | 	if (cap_chan_width != IEEE80211_VHTCAP_CHAN_WIDTH_160) | |
| 612 | 	if (cap_chan_width != IEEE80211_VHTCAP_CHAN_WIDTH_160 && | |
| 613 | 	 cap_chan_width != IEEE80211_VHTCAP_CHAN_WIDTH_160_8080 && | |
| 614 | 	 ((ni->ni_vhtcaps & IEEE80211_VHTCAP_EXT_NSS_BW_MASK) == 0 || | |
| 615 | 	 (ni->ni_vht_tx_max_lgi_mbit_s & | |
| 616 | 	 IEEE80211_VHT_EXT_NSS_BW_CAPABLE) == 0)) | |
| 594 | 617 | 		return 0; |
| 595 | 618 | |
| 596 | 619 | 	op_chan_width = (ni->ni_vht_chan_width & |
| ... | ... | @@ -600,6 +623,23 @@ ieee80211_node_supports_vht_chan160(struct ieee80211_node *ni) |
| 600 | 623 | 	return (op_chan_width == IEEE80211_VHTOP0_CHAN_WIDTH_160); |
| 601 | 624 | } |
| 602 | 625 | |
| 626 | /* | |
| 627 | * Check if the peer supports HE. | |
| 628 | * Require a HE capabilities IE and support for HE MCS with a single | |
| 629 | * spatial stream. | |
| 630 | */ | |
| 631 | static inline int | |
| 632 | ieee80211_node_supports_he(struct ieee80211_node *ni) | |
| 633 | { | |
| 634 | 	uint16_t rx_mcs; | |
| 635 | ||
| 636 | 	rx_mcs = (ni->ni_he_rxmcs_80 & IEEE80211_HE_MCS_FOR_SS_MASK(1)) >> | |
| 637 | 	 IEEE80211_HE_MCS_FOR_SS_SHIFT(1); | |
| 638 | ||
| 639 | 	return ((ni->ni_flags & IEEE80211_NODE_HECAP) && | |
| 640 | 	 rx_mcs != IEEE80211_HE_MCS_SS_NOT_SUPP); | |
| 641 | } | |
| 642 | ||
| 603 | 643 | struct ieee80211com; |
| 604 | 644 | |
| 605 | 645 | typedef void ieee80211_iter_func(void *, struct ieee80211_node *); |
| ... | ... | @@ -642,6 +682,11 @@ void ieee80211_setup_vhtcaps(struct ieee80211_node *, const uint8_t *, |
| 642 | 682 | void ieee80211_clear_vhtcaps(struct ieee80211_node *); |
| 643 | 683 | int ieee80211_setup_vhtop(struct ieee80211_node *, const uint8_t *, |
| 644 | 684 | uint8_t, int); |
| 685 | void ieee80211_setup_hecaps(struct ieee80211_node *, const uint8_t *, | |
| 686 | uint8_t); | |
| 687 | void ieee80211_clear_hecaps(struct ieee80211_node *); | |
| 688 | int ieee80211_setup_heop(struct ieee80211_node *, const uint8_t *, | |
| 689 | uint8_t, int); | |
| 645 | 690 | int ieee80211_setup_rates(struct ieee80211com *, |
| 646 | 691 | 	 struct ieee80211_node *, const u_int8_t *, const u_int8_t *, int); |
| 647 | 692 | enum ieee80211_phymode ieee80211_node_abg_mode(struct ieee80211com *, |
| ... | ... | @@ -656,6 +701,7 @@ void ieee80211_node_join(struct ieee80211com *, |
| 656 | 701 | void ieee80211_node_leave(struct ieee80211com *, |
| 657 | 702 | 		struct ieee80211_node *); |
| 658 | 703 | int ieee80211_match_bss(struct ieee80211com *, struct ieee80211_node *, int); |
| 704 | void ieee80211_node_switch_bss(struct ieee80211com *, struct ieee80211_node *); | |
| 659 | 705 | void ieee80211_node_tx_stopped(struct ieee80211com *, struct ieee80211_node *); |
| 660 | 706 | struct ieee80211_node *ieee80211_node_choose_bss(struct ieee80211com *, int, |
| 661 | 707 | 		struct ieee80211_node **); |
lib/libc/include/generic-openbsd/net80211/ieee80211_proto.h+4-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ieee80211_proto.h,v 1.50 2025/06/14 08:46:34 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: ieee80211_proto.h,v 1.51 2026/03/19 16:50:32 chris Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ieee80211_proto.h,v 1.3 2003/10/13 04:23:56 dyoung Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -137,6 +137,7 @@ extern	u_int8_t *ieee80211_add_xrates(u_int8_t *, |
| 137 | 137 | extern	u_int8_t *ieee80211_add_htcaps(u_int8_t *, struct ieee80211com *); |
| 138 | 138 | extern	u_int8_t *ieee80211_add_htop(u_int8_t *, struct ieee80211com *); |
| 139 | 139 | extern	u_int8_t *ieee80211_add_vhtcaps(u_int8_t *, struct ieee80211com *); |
| 140 | extern	u_int8_t *ieee80211_add_hecaps(u_int8_t *, struct ieee80211com *); | |
| 140 | 141 | extern	u_int8_t *ieee80211_add_tie(u_int8_t *, u_int8_t, u_int32_t); |
| 141 | 142 | |
| 142 | 143 | extern	int ieee80211_parse_rsn(struct ieee80211com *, const u_int8_t *, |
| ... | ... | @@ -169,6 +170,8 @@ extern	void ieee80211_ht_negotiate(struct ieee80211com *, |
| 169 | 170 | struct ieee80211_node *); |
| 170 | 171 | extern	void ieee80211_vht_negotiate(struct ieee80211com *, |
| 171 | 172 | struct ieee80211_node *); |
| 173 | extern	void ieee80211_he_negotiate(struct ieee80211com *, | |
| 174 | struct ieee80211_node *); | |
| 172 | 175 | extern	void ieee80211_tx_ba_timeout(void *); |
| 173 | 176 | extern	void ieee80211_rx_ba_timeout(void *); |
| 174 | 177 | extern	int ieee80211_addba_request(struct ieee80211com *, |
lib/libc/include/generic-openbsd/net80211/ieee80211_var.h+18-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ieee80211_var.h,v 1.112 2025/08/01 20:39:26 stsp Exp $	*/ | |
| 1 | /*	$OpenBSD: ieee80211_var.h,v 1.114 2026/03/19 16:50:32 chris Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -92,8 +92,9 @@ enum ieee80211_phymode { |
| 92 | 92 | 	IEEE80211_MODE_11G	= 3,	/* 2GHz, OFDM */ |
| 93 | 93 | 	IEEE80211_MODE_11N	= 4,	/* 2GHz/5GHz, OFDM/HT */ |
| 94 | 94 | 	IEEE80211_MODE_11AC	= 5,	/* 5GHz, OFDM/VHT */ |
| 95 | 	IEEE80211_MODE_11AX	= 6,	/* 2GHz/5GHz, OFDM/HE */ | |
| 95 | 96 | }; |
| 96 | #define	IEEE80211_MODE_MAX	(IEEE80211_MODE_11AC+1) | |
| 97 | #define	IEEE80211_MODE_MAX	(IEEE80211_MODE_11AX+1) | |
| 97 | 98 | |
| 98 | 99 | enum ieee80211_opmode { |
| 99 | 100 | 	IEEE80211_M_STA		= 1,	/* infrastructure station */ |
| ... | ... | @@ -142,6 +143,7 @@ struct ieee80211_channel { |
| 142 | 143 | */ |
| 143 | 144 | #define IEEE80211_CHANX_80MHZ	0x00000001 /* use of 80 MHz is allowed */ |
| 144 | 145 | #define IEEE80211_CHANX_160MHZ	0x00000002 /* use of 160 MHz is allowed */ |
| 146 | #define IEEE80211_CHANX_HE	0x00000004 /* 11ax/HE channel */ | |
| 145 | 147 | |
| 146 | 148 | /* |
| 147 | 149 | * Useful combinations of channel characteristics. |
| ... | ... | @@ -185,6 +187,8 @@ struct ieee80211_channel { |
| 185 | 187 | 	(((_c)->ic_xflags & IEEE80211_CHANX_80MHZ) != 0) |
| 186 | 188 | #define	IEEE80211_CHAN_160MHZ_ALLOWED(_c) \ |
| 187 | 189 | 	(((_c)->ic_xflags & IEEE80211_CHANX_160MHZ) != 0) |
| 190 | #define	IEEE80211_CHAN_HE(_c) \ | |
| 191 | 	(((_c)->ic_xflags & IEEE80211_CHANX_HE) != 0) | |
| 188 | 192 | |
| 189 | 193 | /* |
| 190 | 194 | * EDCA AC parameters. |
| ... | ... | @@ -337,6 +341,8 @@ struct ieee80211com { |
| 337 | 341 | 							 */ |
| 338 | 342 | 	struct ieee80211_edca_ac_params ic_edca_ac[EDCA_NUM_AC]; |
| 339 | 343 | 	u_int			ic_edca_updtcount; |
| 344 | 	u_int			ic_edca_txop_count[EDCA_NUM_AC]; | |
| 345 | 	struct timeval		ic_edca_txop_time[EDCA_NUM_AC]; | |
| 340 | 346 | 	u_int16_t		ic_tid_noack; |
| 341 | 347 | 	u_int8_t		ic_globalcnt[EAPOL_KEY_NONCE_LEN]; |
| 342 | 348 | 	u_int8_t		ic_nonce[EAPOL_KEY_NONCE_LEN]; |
| ... | ... | @@ -383,6 +389,15 @@ struct ieee80211com { |
| 383 | 389 | 	uint16_t		ic_vht_txmcs; |
| 384 | 390 | 	uint16_t		ic_vht_tx_max_lgi_mbit_s; |
| 385 | 391 | |
| 392 | 	u_int8_t		ic_he_mac_cap[IEEE80211_HE_MAC_CAPS_LEN]; | |
| 393 | 	u_int8_t		ic_he_phy_cap[IEEE80211_HE_PHY_CAPS_LEN]; | |
| 394 | 	uint16_t		ic_he_rxmcs_80; | |
| 395 | 	uint16_t		ic_he_txmcs_80; | |
| 396 | 	uint16_t		ic_he_rxmcs_160; | |
| 397 | 	uint16_t		ic_he_txmcs_160; | |
| 398 | 	uint16_t		ic_he_rxmcs_80p80; | |
| 399 | 	uint16_t		ic_he_txmcs_80p80; | |
| 400 | ||
| 386 | 401 | 	TAILQ_HEAD(, ieee80211_ess)	 ic_ess; |
| 387 | 402 | }; |
| 388 | 403 | #define	ic_if		ic_ac.ac_if |
| ... | ... | @@ -440,6 +455,7 @@ struct ieee80211_ess { |
| 440 | 455 | #define	IEEE80211_F_BGSCAN	0x08000000	/* STATUS: background scan */ |
| 441 | 456 | #define IEEE80211_F_AUTO_JOIN	0x10000000	/* CONF: auto-join active */ |
| 442 | 457 | #define	IEEE80211_F_VHTON	0x20000000	/* CONF: VHT enabled */ |
| 458 | #define	IEEE80211_F_HEON	0x40000000	/* CONF: HE enabled */ | |
| 443 | 459 | |
| 444 | 460 | /* ic_xflags */ |
| 445 | 461 | #define	IEEE80211_F_TX_MGMT_ONLY 0x00000001	/* leave data frames on ifq */ |
lib/libc/include/generic-openbsd/netinet/if_ether.h+12-11| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: if_ether.h,v 1.96 2025/07/07 00:55:15 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: if_ether.h,v 1.99 2025/12/02 03:24:19 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -220,12 +220,12 @@ do {									\ |
| 220 | 220 | |
| 221 | 221 | #include <net/if_var.h>	/* for "struct ifnet" */ |
| 222 | 222 | |
| 223 | struct ether_brport { | |
| 224 | 	struct mbuf	*(*eb_input)(struct ifnet *, struct mbuf *, | |
| 223 | struct ether_port { | |
| 224 | 	struct mbuf	*(*ep_input)(struct ifnet *, struct mbuf *, | |
| 225 | 225 | 			 uint64_t, void *, struct netstack *); |
| 226 | 	void		(*eb_port_take)(void *); | |
| 227 | 	void		(*eb_port_rele)(void *); | |
| 228 | 	void		 *eb_port; | |
| 226 | 	void		*(*ep_port_take)(void *); | |
| 227 | 	void		 (*ep_port_rele)(void *, void *); | |
| 228 | 	void		 *ep_port; | |
| 229 | 229 | }; |
| 230 | 230 | |
| 231 | 231 | /* |
| ... | ... | @@ -241,8 +241,8 @@ struct	arpcom { |
| 241 | 241 | 	int	 ac_multicnt;			/* length of ac_multiaddrs */ |
| 242 | 242 | 	int	 ac_multirangecnt;		/* number of mcast ranges */ |
| 243 | 243 | |
| 244 | 	void	*ac_trunkport; | |
| 245 | 	const struct ether_brport *ac_brport; | |
| 244 | 	const struct ether_port *ac_trport; | |
| 245 | 	const struct ether_port *ac_brport; | |
| 246 | 246 | }; |
| 247 | 247 | |
| 248 | 248 | extern int arpt_keep;				/* arp resolved cache expire */ |
| ... | ... | @@ -289,11 +289,11 @@ void	ether_rtrequest(struct ifnet *, int, struct rtentry *); |
| 289 | 289 | char	*ether_sprintf(u_char *); |
| 290 | 290 | |
| 291 | 291 | int	ether_brport_isset(struct ifnet *); |
| 292 | void	ether_brport_set(struct ifnet *, const struct ether_brport *); | |
| 292 | void	ether_brport_set(struct ifnet *, const struct ether_port *); | |
| 293 | 293 | void	ether_brport_clr(struct ifnet *); |
| 294 | const struct ether_brport * | |
| 294 | const struct ether_port * | |
| 295 | 295 | 	ether_brport_get(struct ifnet *); |
| 296 | const struct ether_brport * | |
| 296 | const struct ether_port * | |
| 297 | 297 | 	ether_brport_get_locked(struct ifnet *); |
| 298 | 298 | |
| 299 | 299 | uint64_t	ether_addr_to_e64(const struct ether_addr *); |
| ... | ... | @@ -313,6 +313,7 @@ struct ether_extracted { |
| 313 | 313 | }; |
| 314 | 314 | |
| 315 | 315 | void ether_extract_headers(struct mbuf *, struct ether_extracted *); |
| 316 | struct mbuf *ether_offload_ifcap(struct ifnet *, struct mbuf *); | |
| 316 | 317 | |
| 317 | 318 | /* |
| 318 | 319 | * Ethernet multicast address structure. There is one of these for each |
lib/libc/include/generic-openbsd/netinet/igmp_var.h+17-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: igmp_var.h,v 1.16 2025/03/02 21:28:32 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: igmp_var.h,v 1.17 2026/02/26 00:53:18 bluhm Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: igmp_var.h,v 1.9 1996/02/13 23:41:31 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -105,12 +105,26 @@ igmpstat_inc(enum igmpstat_counters c) |
| 105 | 105 | */ |
| 106 | 106 | #define	IGMP_RANDOM_DELAY(X)	(arc4random_uniform(X) + 1) |
| 107 | 107 | |
| 108 | struct igmp_pktinfo { | |
| 109 | 	STAILQ_ENTRY(igmp_pktinfo)	ipi_list; | |
| 110 | 	struct in_addr			ipi_addr; | |
| 111 | 	unsigned int			ipi_rdomain; | |
| 112 | 	unsigned int			ipi_ifidx; | |
| 113 | 	int				ipi_type; | |
| 114 | }; | |
| 115 | STAILQ_HEAD(igmp_pktlist, igmp_pktinfo); | |
| 116 | ||
| 108 | 117 | void	igmp_init(void); |
| 109 | 118 | int	igmp_input(struct mbuf **, int *, int, int, struct netstack *); |
| 110 | void	igmp_joingroup(struct in_multi *, struct ifnet *); | |
| 111 | void	igmp_leavegroup(struct in_multi *, struct ifnet *); | |
| 119 | void	igmp_joingroup(struct in_multi *, struct ifnet *, | |
| 120 | 	 struct igmp_pktinfo *); | |
| 121 | void	igmp_leavegroup(struct in_multi *, struct ifnet *, | |
| 122 | 	 struct igmp_pktinfo *); | |
| 112 | 123 | void	igmp_fasttimo(void); |
| 113 | 124 | void	igmp_slowtimo(void); |
| 114 | 125 | int	igmp_sysctl(int *, u_int, void *, size_t *, void *, size_t); |
| 126 | void	igmp_sendpkt(struct igmp_pktinfo *); | |
| 127 | ||
| 115 | 128 | #endif /* _KERNEL */ |
| 129 | ||
| 116 | 130 | #endif /* _NETINET_IGMP_VAR_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/netinet/in_pcb.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: in_pcb.h,v 1.171 2025/07/14 09:01:52 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: in_pcb.h,v 1.174 2026/02/05 03:26:00 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -357,6 +357,7 @@ void	 in_setpeeraddr(struct inpcb *, struct mbuf *); |
| 357 | 357 | void	 in_setsockaddr(struct inpcb *, struct mbuf *); |
| 358 | 358 | int	 in_sockaddr(struct socket *, struct mbuf *); |
| 359 | 359 | int	 in_peeraddr(struct socket *, struct mbuf *); |
| 360 | int	 in_flowid(struct socket *); | |
| 360 | 361 | int	 in_baddynamic(u_int16_t, u_int16_t); |
| 361 | 362 | int	 in_rootonly(u_int16_t, u_int16_t); |
| 362 | 363 | int	 in_pcbselsrc(struct in_addr *, const struct sockaddr_in *, |
lib/libc/include/generic-openbsd/netinet/in_var.h+17-59| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: in_var.h,v 1.41 2018/10/18 15:23:04 cheloha Exp $	*/ | |
| 1 | /*	$OpenBSD: in_var.h,v 1.47 2026/03/22 23:14:00 bluhm Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: in_var.h,v 1.16 1996/02/13 23:42:15 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -35,6 +35,12 @@ |
| 35 | 35 | #ifndef _NETINET_IN_VAR_H_ |
| 36 | 36 | #define _NETINET_IN_VAR_H_ |
| 37 | 37 | |
| 38 | /* | |
| 39 | * Locks used to protect struct members in this file: | |
| 40 | *	I	immutable after creation | |
| 41 | *	m	multicast if_maddrlock rwlock of parent interface | |
| 42 | */ | |
| 43 | ||
| 38 | 44 | #include <sys/queue.h> |
| 39 | 45 | |
| 40 | 46 | #ifdef _KERNEL |
| ... | ... | @@ -75,37 +81,9 @@ struct	in_aliasreq { |
| 75 | 81 | 	struct	sockaddr_in ifra_mask; |
| 76 | 82 | }; |
| 77 | 83 | |
| 78 | ||
| 79 | #ifdef	_KERNEL | |
| 80 | /* | |
| 81 | * Macro for finding the internet address structure (in_ifaddr) corresponding | |
| 82 | * to a given interface (ifnet structure). | |
| 83 | */ | |
| 84 | #define IFP_TO_IA(ifp, ia)						\ | |
| 85 | 	/* struct ifnet *ifp; */					\ | |
| 86 | 	/* struct in_ifaddr *ia; */					\ | |
| 87 | do {									\ | |
| 88 | 	struct ifaddr *ifa;						\ | |
| 89 | 	NET_ASSERT_LOCKED();						\ | |
| 90 | 	TAILQ_FOREACH(ifa, &(ifp)->if_addrlist, ifa_list) {		\ | |
| 91 | 		if (ifa->ifa_addr->sa_family == AF_INET)		\ | |
| 92 | 			break;						\ | |
| 93 | 	}								\ | |
| 94 | 	(ia) = ifatoia(ifa);						\ | |
| 95 | } while (/* CONSTCOND */ 0) | |
| 96 | #endif | |
| 97 | ||
| 98 | /* | |
| 99 | * Per-interface router version information. | |
| 100 | */ | |
| 101 | struct router_info { | |
| 102 | 	unsigned int	rti_ifidx; | |
| 103 | 	int		rti_type;	/* type of router on this interface */ | |
| 104 | 	int		rti_age;	/* time since last v1 query */ | |
| 105 | 	LIST_ENTRY(router_info)	rti_list; | |
| 106 | }; | |
| 107 | ||
| 108 | 84 | #ifdef _KERNEL |
| 85 | struct router_info; | |
| 86 | ||
| 109 | 87 | /* |
| 110 | 88 | * Internet multicast address structure. There is one of these for each IP |
| 111 | 89 | * multicast group to which this host belongs on a given network interface. |
| ... | ... | @@ -115,11 +93,11 @@ struct in_multi { |
| 115 | 93 | #define inm_refcnt		inm_ifma.ifma_refcnt |
| 116 | 94 | #define inm_ifidx		inm_ifma.ifma_ifidx |
| 117 | 95 | |
| 118 | 	struct sockaddr_in	inm_sin; /* IPv4 multicast address */ | |
| 96 | 	struct sockaddr_in	inm_sin; /* [I] IPv4 multicast address */ | |
| 119 | 97 | #define inm_addr		inm_sin.sin_addr |
| 120 | 98 | |
| 121 | 	u_int			inm_state; /* state of membership */ | |
| 122 | 	u_int			inm_timer; /* IGMP membership report timer */ | |
| 99 | 	u_int			inm_state; /* [m] state of membership */ | |
| 100 | 	u_int			inm_timer; /* [m] IGMP membership report */ | |
| 123 | 101 | |
| 124 | 102 | 	struct router_info	*inm_rti; /* router version info */ |
| 125 | 103 | }; |
| ... | ... | @@ -130,37 +108,17 @@ ifmatoinm(struct ifmaddr *ifma) |
| 130 | 108 | return ((struct in_multi *)(ifma)); |
| 131 | 109 | } |
| 132 | 110 | |
| 133 | /* | |
| 134 | * Macro for looking up the in_multi record for a given IP multicast | |
| 135 | * address on a given interface. If no matching record is found, "inm" | |
| 136 | * returns NULL. | |
| 137 | */ | |
| 138 | #define IN_LOOKUP_MULTI(addr, ifp, inm)					\ | |
| 139 | 	/* struct in_addr addr; */					\ | |
| 140 | 	/* struct ifnet *ifp; */					\ | |
| 141 | 	/* struct in_multi *inm; */					\ | |
| 142 | do {									\ | |
| 143 | 	struct ifmaddr *ifma;						\ | |
| 144 | 									\ | |
| 145 | 	(inm) = NULL;							\ | |
| 146 | 	NET_ASSERT_LOCKED();						\ | |
| 147 | 	TAILQ_FOREACH(ifma, &(ifp)->if_maddrlist, ifma_list)		\ | |
| 148 | 		if (ifma->ifma_addr->sa_family == AF_INET &&		\ | |
| 149 | 		 ifmatoinm(ifma)->inm_addr.s_addr == (addr).s_addr) {\ | |
| 150 | 			(inm) = ifmatoinm(ifma);			\ | |
| 151 | 			break;						\ | |
| 152 | 		}							\ | |
| 153 | } while (/* CONSTCOND */ 0) | |
| 154 | ||
| 111 | struct	in_ifaddr *in_ifp2ia(struct ifnet *); | |
| 155 | 112 | int	in_ifinit(struct ifnet *, |
| 156 | 113 | 	 struct in_ifaddr *, struct sockaddr_in *, int); |
| 157 | struct	in_multi *in_addmulti(struct in_addr *, struct ifnet *); | |
| 114 | struct	in_multi *in_lookupmulti(const struct in_addr *, struct ifnet *); | |
| 115 | struct	in_multi *in_addmulti(const struct in_addr *, struct ifnet *); | |
| 158 | 116 | void	in_delmulti(struct in_multi *); |
| 159 | int	in_hasmulti(struct in_addr *, struct ifnet *); | |
| 117 | int	in_hasmulti(const struct in_addr *, struct ifnet *); | |
| 160 | 118 | void	in_ifscrub(struct ifnet *, struct in_ifaddr *); |
| 161 | 119 | int	in_control(struct socket *, u_long, caddr_t, struct ifnet *); |
| 162 | 120 | int	in_ioctl(u_long, caddr_t, struct ifnet *, int); |
| 163 | 121 | void	in_prefixlen2mask(struct in_addr *, int); |
| 164 | #endif | |
| 122 | #endif /* _KERNEL */ | |
| 165 | 123 | |
| 166 | 124 | #endif /* _NETINET_IN_VAR_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/netinet/ip.h+3-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ip.h,v 1.20 2021/12/14 23:47:36 dtucker Exp $	*/ | |
| 1 | /*	$OpenBSD: ip.h,v 1.22 2025/12/19 13:58:53 tb Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -95,7 +95,7 @@ struct ip { |
| 95 | 95 | #define	IPTOS_PREC_ROUTINE		0x00 |
| 96 | 96 | |
| 97 | 97 | /* |
| 98 | * Definitions for DiffServ Codepoints as per RFCs 2474, 3246, 4594 & 8622. | |
| 98 | * Definitions for DiffServ Codepoints as per RFCs 2474, 3246, 4594, 5865, 8622. | |
| 99 | 99 | * These are the 6 most significant bits as they appear on the wire, so the |
| 100 | 100 | * two least significant bits must be zero. |
| 101 | 101 | */ |
| ... | ... | @@ -118,6 +118,7 @@ struct ip { |
| 118 | 118 | #define	IPTOS_DSCP_AF42		0x90 |
| 119 | 119 | #define	IPTOS_DSCP_AF43		0x98 |
| 120 | 120 | #define	IPTOS_DSCP_CS5		0xa0 |
| 121 | #define	IPTOS_DSCP_VA		0xb0 | |
| 121 | 122 | #define	IPTOS_DSCP_EF		0xb8 |
| 122 | 123 | #define	IPTOS_DSCP_CS6		0xc0 |
| 123 | 124 | #define	IPTOS_DSCP_CS7		0xe0 |
lib/libc/include/generic-openbsd/netinet/tcp_timer.h+1-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: tcp_timer.h,v 1.27 2025/06/08 17:06:19 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: tcp_timer.h,v 1.28 2025/12/31 03:47:04 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: tcp_timer.h,v 1.6 1995/03/26 20:32:37 jtc Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -162,7 +162,6 @@ extern int tcp_keepintvl;	/* [a] time between keepalive probes */ |
| 162 | 162 | extern int tcp_keepinit_sec;	/* [a] copy of above in seconds for sysctl */ |
| 163 | 163 | extern int tcp_keepidle_sec;	/* [a] copy of above in seconds for sysctl */ |
| 164 | 164 | extern int tcp_keepintvl_sec;	/* [a] copy of above in seconds for sysctl */ |
| 165 | extern int tcp_ttl;		/* time to live for TCP segs */ | |
| 166 | 165 | extern const int tcp_backoff[]; |
| 167 | 166 | #endif /* _KERNEL */ |
| 168 | 167 | #endif /* _NETINET_TCP_TIMER_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/netinet6/in6_var.h+15-29| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: in6_var.h,v 1.81 2025/05/20 05:51:43 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: in6_var.h,v 1.85 2026/03/22 23:14:00 bluhm Exp $	*/ | |
| 2 | 2 | /*	$KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -64,6 +64,12 @@ |
| 64 | 64 | #ifndef _NETINET6_IN6_VAR_H_ |
| 65 | 65 | #define _NETINET6_IN6_VAR_H_ |
| 66 | 66 | |
| 67 | /* | |
| 68 | * Locks used to protect struct members in this file: | |
| 69 | *	I	immutable after creation | |
| 70 | *	m	multicast if_maddrlock rwlock of parent interface | |
| 71 | */ | |
| 72 | ||
| 67 | 73 | /* |
| 68 | 74 | * Interface address, Internet version. One of these structures |
| 69 | 75 | * is allocated for each interface with an Internet address. |
| ... | ... | @@ -316,11 +322,11 @@ struct in6_multi { |
| 316 | 322 | #define in6m_refcnt		in6m_ifma.ifma_refcnt |
| 317 | 323 | #define in6m_ifidx		in6m_ifma.ifma_ifidx |
| 318 | 324 | |
| 319 | 	struct sockaddr_in6	in6m_sin; /* IPv6 multicast address */ | |
| 325 | 	struct sockaddr_in6	in6m_sin; /* [I] IPv6 multicast address */ | |
| 320 | 326 | #define in6m_addr		in6m_sin.sin6_addr |
| 321 | 327 | |
| 322 | 	u_int			in6m_state; /* state of membership */ | |
| 323 | 	u_int			in6m_timer; /* MLD6 membership report timer */ | |
| 328 | 	u_int			in6m_state; /* [m] state of membership */ | |
| 329 | 	u_int			in6m_timer; /* [m] MLD6 membership report */ | |
| 324 | 330 | }; |
| 325 | 331 | |
| 326 | 332 | static __inline struct in6_multi * |
| ... | ... | @@ -329,32 +335,12 @@ ifmatoin6m(struct ifmaddr *ifma) |
| 329 | 335 | return ((struct in6_multi *)(ifma)); |
| 330 | 336 | } |
| 331 | 337 | |
| 332 | /* | |
| 333 | * Macros for looking up the in6_multi record for a given IP6 multicast | |
| 334 | * address on a given interface. If no matching record is found, "in6m" | |
| 335 | * returns NULL. | |
| 336 | */ | |
| 337 | #define IN6_LOOKUP_MULTI(addr, ifp, in6m)				\ | |
| 338 | 	/* struct in6_addr addr; */					\ | |
| 339 | 	/* struct ifnet *ifp; */					\ | |
| 340 | 	/* struct in6_multi *in6m; */					\ | |
| 341 | do {									\ | |
| 342 | 	struct ifmaddr *ifma;						\ | |
| 343 | 									\ | |
| 344 | 	(in6m) = NULL;							\ | |
| 345 | 	TAILQ_FOREACH(ifma, &(ifp)->if_maddrlist, ifma_list)		\ | |
| 346 | 		if (ifma->ifma_addr->sa_family == AF_INET6 &&		\ | |
| 347 | 		 IN6_ARE_ADDR_EQUAL(&ifmatoin6m(ifma)->in6m_addr,	\ | |
| 348 | 				 &(addr))) {			\ | |
| 349 | 			(in6m) = ifmatoin6m(ifma);			\ | |
| 350 | 			break;						\ | |
| 351 | 		}							\ | |
| 352 | } while (/* CONSTCOND */ 0) | |
| 353 | ||
| 354 | struct	in6_multi *in6_addmulti(struct in6_addr *, struct ifnet *, int *); | |
| 338 | struct	in6_multi *in6_lookupmulti(const struct in6_addr *, struct ifnet *); | |
| 339 | struct	in6_multi *in6_addmulti(const struct in6_addr *, struct ifnet *, int *); | |
| 355 | 340 | void	in6_delmulti(struct in6_multi *); |
| 356 | int	in6_hasmulti(struct in6_addr *, struct ifnet *); | |
| 357 | struct in6_multi_mship *in6_joingroup(struct ifnet *, struct in6_addr *, int *); | |
| 341 | int	in6_hasmulti(const struct in6_addr *, struct ifnet *); | |
| 342 | struct in6_multi_mship *in6_joingroup(struct ifnet *, const struct in6_addr *, | |
| 343 | 	 int *); | |
| 358 | 344 | void	in6_leavegroup(struct in6_multi_mship *); |
| 359 | 345 | int	in6_control(struct socket *, u_long, caddr_t, struct ifnet *); |
| 360 | 346 | int	in6_ioctl(u_long, caddr_t, struct ifnet *, int); |
lib/libc/include/generic-openbsd/netinet6/ip6_var.h+1-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ip6_var.h,v 1.128 2025/09/16 09:19:16 florian Exp $	*/ | |
| 1 | /*	$OpenBSD: ip6_var.h,v 1.129 2025/12/31 04:10:00 jsg Exp $	*/ | |
| 2 | 2 | /*	$KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -280,7 +280,6 @@ extern int	ip6_defmcasthlim;	/* default multicast hop limit */ |
| 280 | 280 | extern int	ip6_forwarding;		/* act as router? */ |
| 281 | 281 | extern int	ip6_mforwarding;	/* act as multicast router? */ |
| 282 | 282 | extern int	ip6_multipath;		/* use multipath routes */ |
| 283 | extern int	ip6_sendredirect;	/* send ICMPv6 redirect? */ | |
| 284 | 283 | extern int	ip6_mcast_pmtu;		/* path MTU discovery for multicast */ |
| 285 | 284 | extern int	ip6_neighborgcthresh; /* Threshold # of NDP entries for GC */ |
| 286 | 285 | extern int	ip6_maxdynroutes; /* Max # of routes created via redirect */ |
lib/libc/include/generic-openbsd/netinet6/mld6_var.h+17-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: mld6_var.h,v 1.6 2008/04/18 06:42:20 djm Exp $	*/ | |
| 1 | /*	$OpenBSD: mld6_var.h,v 1.10 2026/02/26 00:53:18 bluhm Exp $	*/ | |
| 2 | 2 | /*	$KAME: mld6_var.h,v 1.4 2000/03/25 07:23:54 sumikawa Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -43,11 +43,24 @@ |
| 43 | 43 | #define MLD_OTHERLISTENER			0 |
| 44 | 44 | #define MLD_IREPORTEDLAST			1 |
| 45 | 45 | |
| 46 | struct mld6_pktinfo { | |
| 47 | 	STAILQ_ENTRY(mld6_pktinfo)	mpi_list; | |
| 48 | 	struct in6_addr			mpi_addr; | |
| 49 | 	unsigned int			mpi_rdomain; | |
| 50 | 	unsigned int			mpi_ifidx; | |
| 51 | 	int				mpi_type; | |
| 52 | }; | |
| 53 | STAILQ_HEAD(mld6_pktlist, mld6_pktinfo); | |
| 54 | ||
| 46 | 55 | void	mld6_init(void); |
| 47 | 56 | void	mld6_input(struct mbuf *, int); |
| 48 | void	mld6_start_listening(struct in6_multi *); | |
| 49 | void	mld6_stop_listening(struct in6_multi *); | |
| 50 | void	mld6_fasttimeo(void); | |
| 57 | void	mld6_start_listening(struct in6_multi *, struct ifnet *, | |
| 58 | 	 struct mld6_pktinfo *); | |
| 59 | void	mld6_stop_listening(struct in6_multi *, struct ifnet *, | |
| 60 | 	 struct mld6_pktinfo *); | |
| 61 | void	mld6_fasttimo(void); | |
| 62 | void	mld6_sendpkt(const struct mld6_pktinfo *); | |
| 63 | ||
| 51 | 64 | #endif /* _KERNEL */ |
| 52 | 65 | |
| 53 | 66 | #endif /* _NETINET6_MLD6_VAR_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/netinet6/nd6.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: nd6.h,v 1.105 2025/09/16 09:19:43 florian Exp $	*/ | |
| 1 | /*	$OpenBSD: nd6.h,v 1.106 2026/03/23 13:12:39 jsg Exp $	*/ | |
| 2 | 2 | /*	$KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -83,7 +83,7 @@ struct llinfo_nd6 { |
| 83 | 83 | 	TAILQ_ENTRY(llinfo_nd6)	 ln_list;	/* [m] global nd6_list */ |
| 84 | 84 | 	struct	rtentry		*ln_rt;		/* [I] backpointer to rtentry */ |
| 85 | 85 | 	/* keep fields above in sync with struct llinfo_nd6_iterator */ |
| 86 | 	struct	refcnt		 ln_refcnt;	/* entry refereced by list */ | |
| 86 | 	struct	refcnt		 ln_refcnt;	/* entry referenced by list */ | |
| 87 | 87 | 	struct	mbuf_queue ln_mq;	/* hold packets until resolved */ |
| 88 | 88 | 	struct	in6_addr ln_saddr6;	/* source of prompting packet */ |
| 89 | 89 | 	long	ln_asked;	/* number of queries already sent for addr */ |
lib/libc/include/generic-openbsd/pthread.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pthread.h,v 1.4 2018/03/05 01:15:26 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: pthread.h,v 1.5 2025/11/11 18:54:05 semarie Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu |
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | * Run-time invariant values: |
| 51 | 51 | */ |
| 52 | 52 | #define PTHREAD_DESTRUCTOR_ITERATIONS		4 |
| 53 | #define PTHREAD_KEYS_MAX			256 | |
| 53 | #define PTHREAD_KEYS_MAX			512 | |
| 54 | 54 | #define PTHREAD_STACK_MIN			(1U << _MAX_PAGE_SHIFT) |
| 55 | 55 | #define PTHREAD_THREADS_MAX			ULONG_MAX |
| 56 | 56 |
lib/libc/include/generic-openbsd/signal.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: signal.h,v 1.27 2026/03/23 21:33:43 daniel Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -132,7 +132,7 @@ int	thrkill(pid_t _tid, int _signum, void *_tcb); |
| 132 | 132 | int	sigwait(const sigset_t *__restrict, int *__restrict); |
| 133 | 133 | #endif |
| 134 | 134 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 |
| 135 | void	psignal(unsigned int, const char *); | |
| 135 | void	psignal(int, const char *); | |
| 136 | 136 | #endif |
| 137 | 137 | #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */ |
| 138 | 138 | __END_DECLS |
lib/libc/include/generic-openbsd/sndio.h+6-12| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: sndio.h,v 1.15 2024/05/24 15:10:26 ratchov Exp $	*/ | |
| 1 | /*	$OpenBSD: sndio.h,v 1.17 2026/01/22 09:31:22 ratchov Exp $	*/ | |
| 2 | 2 | /* |
| 3 | 3 | * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> |
| 4 | 4 | * |
| ... | ... | @@ -27,17 +27,9 @@ |
| 27 | 27 | |
| 28 | 28 | /* |
| 29 | 29 | * limits |
| 30 | * | |
| 31 | * For now SIOCTL_DISPLAYMAX is 12 byte only. It nicely fits in the | |
| 32 | * padding of the sioctl_desc structure: this allows any binary linked | |
| 33 | * to the library version with no sioctl_desc->display to work with | |
| 34 | * this library version. Currently, any string reported by the lower | |
| 35 | * layers fits in the 12-byte buffer. Once larger strings start | |
| 36 | * being used (or the ABI changes for any other reason) increase | |
| 37 | * SIOCTL_DISPLAYMAX and properly pad the sioctl_desc structure. | |
| 38 | 30 | */ |
| 39 | #define SIOCTL_NAMEMAX		12	/* max name length */ | |
| 40 | #define SIOCTL_DISPLAYMAX	12	/* max display string length */ | |
| 31 | #define SIOCTL_NAMEMAX		16	/* max name length */ | |
| 32 | #define SIOCTL_DISPLAYMAX	32	/* max display string length */ | |
| 41 | 33 | |
| 42 | 34 | /* |
| 43 | 35 | * private ``handle'' structure |
| ... | ... | @@ -119,11 +111,12 @@ struct sioctl_desc { |
| 119 | 111 | #define SIOCTL_LIST		5	/* switch, element of a list */ |
| 120 | 112 | #define SIOCTL_SEL		6	/* element of a selector */ |
| 121 | 113 | 	unsigned int type;		/* one of above */ |
| 114 | 	unsigned int maxval;		/* max value */ | |
| 115 | 	int __pad[3];			/* for future use */ | |
| 122 | 116 | 	char func[SIOCTL_NAMEMAX];	/* function name, ex. "level" */ |
| 123 | 117 | 	char group[SIOCTL_NAMEMAX];	/* group this control belongs to */ |
| 124 | 118 | 	struct sioctl_node node0;	/* affected node */ |
| 125 | 119 | 	struct sioctl_node node1;	/* dito for SIOCTL_{VEC,LIST,SEL} */ |
| 126 | 	unsigned int maxval;		/* max value */ | |
| 127 | 120 | 	char display[SIOCTL_DISPLAYMAX];	/* free-format hint */ |
| 128 | 121 | }; |
| 129 | 122 | |
| ... | ... | @@ -169,6 +162,7 @@ int sio_setpar(struct sio_hdl *, struct sio_par *); |
| 169 | 162 | int sio_getpar(struct sio_hdl *, struct sio_par *); |
| 170 | 163 | int sio_getcap(struct sio_hdl *, struct sio_cap *); |
| 171 | 164 | void sio_onmove(struct sio_hdl *, void (*)(void *, int), void *); |
| 165 | void sio_onxrun(struct sio_hdl *, void (*)(void *), void *); | |
| 172 | 166 | size_t sio_write(struct sio_hdl *, const void *, size_t); |
| 173 | 167 | size_t sio_read(struct sio_hdl *, void *, size_t); |
| 174 | 168 | int sio_start(struct sio_hdl *); |
lib/libc/include/generic-openbsd/strings.h+5-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: strings.h,v 1.6 2017/09/10 21:50:36 schwarze Exp $	*/ | |
| 1 | /*	$OpenBSD: strings.h,v 1.7 2025/10/24 11:30:06 claudio Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /*- |
| 4 | 4 | * Copyright (c) 1990 The Regents of the University of California. |
| ... | ... | @@ -78,6 +78,10 @@ int	 strncasecmp(const char *, const char *, size_t); |
| 78 | 78 | int	 strcasecmp_l(const char *, const char *, locale_t); |
| 79 | 79 | int	 strncasecmp_l(const char *, const char *, size_t, locale_t); |
| 80 | 80 | #endif |
| 81 | #if __POSIX_VISIBLE >= 202405 | |
| 82 | int	 ffsl(long); | |
| 83 | int	 ffsll(long long); | |
| 84 | #endif | |
| 81 | 85 | __END_DECLS |
| 82 | 86 | |
| 83 | 87 | #endif /* _STRINGS_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/sys/device.h+4-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: device.h,v 1.70 2025/09/16 12:18:10 hshoexer Exp $	*/ | |
| 1 | /*	$OpenBSD: device.h,v 1.71 2026/03/11 16:18:42 kettenis Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: device.h,v 1.15 1996/04/09 20:55:24 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -204,8 +204,9 @@ void config_process_deferred_mountroot(void); |
| 204 | 204 | |
| 205 | 205 | int	request_sleep(int); |
| 206 | 206 | int	sleep_state(void *, int); |
| 207 | #define SLEEP_SUSPEND	0x01 | |
| 208 | #define SLEEP_HIBERNATE	0x02 | |
| 207 | #define SLEEP_RESUME	0 | |
| 208 | #define SLEEP_SUSPEND	1 | |
| 209 | #define SLEEP_HIBERNATE	2 | |
| 209 | 210 | void	sleep_mp(void); |
| 210 | 211 | void	resume_mp(void); |
| 211 | 212 | int	sleep_showstate(void *v, int sleepmode); |
lib/libc/include/generic-openbsd/sys/disklabel.h+17-5| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: disklabel.h,v 1.93 2025/09/17 10:16:09 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: disklabel.h,v 1.94 2025/11/13 20:59:14 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -49,14 +49,26 @@ |
| 49 | 49 | |
| 50 | 50 | #include <sys/uuid.h> |
| 51 | 51 | |
| 52 | /* | |
| 53 | * The dev_t split has 64 partitions, but only 52 are visible | |
| 54 | * and easily useable in userland (a-z and A-Z). | |
| 55 | * The MD variable MAXPARTITIONS remains 52 (or less). | |
| 56 | */ | |
| 57 | #define	MAXPARTITIONSUNIT	64 | |
| 58 | ||
| 59 | /* | |
| 60 | * Various situations still have structures limited to 16 partitions. | |
| 61 | */ | |
| 62 | #define MAXPARTITIONS16		16 | |
| 63 | ||
| 52 | 64 | /* |
| 53 | 65 | * Translate between device numbers and major/disk unit/disk partition. |
| 54 | 66 | */ |
| 55 | #define	DISKUNIT(dev)	(minor(dev) / MAXPARTITIONS) | |
| 56 | #define	DISKPART(dev)	(minor(dev) % MAXPARTITIONS) | |
| 67 | #define	DISKUNIT(dev)	(minor(dev) / MAXPARTITIONSUNIT) | |
| 68 | #define	DISKPART(dev)	(minor(dev) % MAXPARTITIONSUNIT) | |
| 57 | 69 | #define	RAW_PART	2	/* 'c' partition */ |
| 58 | 70 | #define	DISKMINOR(unit, part) \ |
| 59 | (((unit) * MAXPARTITIONS) + (part)) | |
| 71 | (((unit) * MAXPARTITIONSUNIT) + (part)) | |
| 60 | 72 | #define	MAKEDISKDEV(maj, unit, part) \ |
| 61 | 73 | (makedev((maj), DISKMINOR((unit), (part)))) |
| 62 | 74 | #define	DISKLABELDEV(dev) \ |
| ... | ... | @@ -117,7 +129,7 @@ struct disklabel { |
| 117 | 129 | 		u_int8_t p_fstype;	/* filesystem type, see below */ |
| 118 | 130 | 		u_int8_t p_fragblock;	/* encoded filesystem frag/block */ |
| 119 | 131 | 		u_int16_t p_cpg;	/* UFS: FS cylinders per group */ |
| 120 | 	} d_partitions[MAXPARTITIONS];	/* actually may be more */ | |
| 132 | 	} d_partitions[MAXPARTITIONSUNIT]; /* maximum 52 in use */ | |
| 121 | 133 | }; |
| 122 | 134 | #endif /* _LOCORE */ |
| 123 | 135 |
lib/libc/include/generic-openbsd/sys/dkio.h+3-5| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: dkio.h,v 1.13 2025/09/17 10:24:25 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: dkio.h,v 1.14 2025/11/13 20:59:14 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: dkio.h,v 1.1 1996/01/30 18:21:48 thorpej Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -50,11 +50,9 @@ |
| 50 | 50 | #define DIOCGPDINFO	_IOR('d', 114, struct disklabel)/* get physical */ |
| 51 | 51 | #define DIOCRLDINFO	_IO('d', 115)			/* reload disklabel */ |
| 52 | 52 | |
| 53 | #if MAXPARTITIONS != 16 | |
| 54 | 53 | /* XXX temporary to support the transition to more partitions */ |
| 55 | #define O_sizeof_disklabel (offsetof(struct disklabel, d_partitions[16])) | |
| 56 | #define O_DIOCGDINFO _IOC(IOC_OUT, 'd', 101, O_sizeof_disklabel) | |
| 57 | #endif | |
| 54 | #define O_disklabel offsetof(struct disklabel, d_partitions[MAXPARTITIONS16]) | |
| 55 | #define O_DIOCGDINFO _IOC(IOC_OUT, 'd', 101, O_disklabel) | |
| 58 | 56 | |
| 59 | 57 | struct dk_inquiry { |
| 60 | 58 | 	char		vendor[64]; |
lib/libc/include/generic-openbsd/sys/filedesc.h+3-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: filedesc.h,v 1.48 2025/08/04 04:59:30 guenther Exp $	*/ | |
| 1 | /*	$OpenBSD: filedesc.h,v 1.49 2026/03/08 16:41:19 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: filedesc.h,v 1.14 1996/04/09 20:55:28 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -114,8 +114,9 @@ struct filedesc0 { |
| 114 | 114 | * Per-process open flags. |
| 115 | 115 | */ |
| 116 | 116 | #define	UF_EXCLOSE 	0x01		/* auto-close on exec */ |
| 117 | #define	UF_PLEDGED 	0x02		/* open after pledge(2) */ | |
| 117 | #define	UF_PLEDGED 	0x02		/* opened after pledge(2) */ | |
| 118 | 118 | #define	UF_FORKCLOSE 	0x04		/* auto-close on fork */ |
| 119 | #define	UF_PLEDGEOPEN 	0x08		/* opened with __pledge_open() */ | |
| 119 | 120 | |
| 120 | 121 | /* |
| 121 | 122 | * Flags on the file descriptor table. |
lib/libc/include/generic-openbsd/sys/mbuf.h+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: mbuf.h,v 1.267 2025/06/25 20:26:32 miod Exp $	*/ | |
| 1 | /*	$OpenBSD: mbuf.h,v 1.269 2026/02/05 03:26:00 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
lib/libc/include/generic-openbsd/sys/mman.h+7-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: mman.h,v 1.35 2022/10/07 14:59:39 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: mman.h,v 1.36 2026/03/26 21:46:24 daniel Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: mman.h,v 1.11 1995/03/26 20:24:23 jtc Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -142,6 +142,11 @@ typedef __size_t	size_t; |
| 142 | 142 | typedef __off_t		off_t; |
| 143 | 143 | #endif |
| 144 | 144 | |
| 145 | #ifndef _MODE_T_DEFINED_ | |
| 146 | #define _MODE_T_DEFINED_ | |
| 147 | typedef __mode_t	mode_t; | |
| 148 | #endif | |
| 149 | ||
| 145 | 150 | __BEGIN_DECLS |
| 146 | 151 | void *	mmap(void *, size_t, int, int, int, off_t); |
| 147 | 152 | int	mprotect(void *, size_t, int); |
| ... | ... | @@ -158,7 +163,7 @@ int	mimmutable(void *, size_t); |
| 158 | 163 | void *	mquery(void *, size_t, int, int, int, off_t); |
| 159 | 164 | #endif |
| 160 | 165 | int	posix_madvise(void *, size_t, int); |
| 161 | int	shm_open(const char *, int, __mode_t); | |
| 166 | int	shm_open(const char *, int, mode_t); | |
| 162 | 167 | int	shm_unlink(const char *); |
| 163 | 168 | int	shm_mkstemp(char *); |
| 164 | 169 | __END_DECLS |
lib/libc/include/generic-openbsd/sys/mutex.h+10-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: mutex.h,v 1.23 2025/07/02 14:36:56 claudio Exp $	*/ | |
| 1 | /*	$OpenBSD: mutex.h,v 1.26 2025/12/11 23:34:44 dlg Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2004 Artur Grabowski <art@openbsd.org> |
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | #include <sys/_lock.h> |
| 55 | 55 | |
| 56 | 56 | struct mutex { |
| 57 | 	void *volatile mtx_owner; | |
| 57 | 	volatile unsigned long mtx_owner; | |
| 58 | 58 | 	int mtx_wantipl; |
| 59 | 59 | 	int mtx_oldipl; |
| 60 | 60 | #ifdef WITNESS |
| ... | ... | @@ -64,23 +64,26 @@ struct mutex { |
| 64 | 64 | |
| 65 | 65 | #ifdef WITNESS |
| 66 | 66 | #define MUTEX_INITIALIZER_FLAGS(ipl, name, flags) \ |
| 67 | 	{ NULL, __MUTEX_IPL((ipl)), IPL_NONE, MTX_LO_INITIALIZER(name, flags) } | |
| 67 | 	{ 0, __MUTEX_IPL((ipl)), IPL_NONE, MTX_LO_INITIALIZER(name, flags) } | |
| 68 | 68 | #else |
| 69 | 69 | #define MUTEX_INITIALIZER_FLAGS(ipl, name, flags) \ |
| 70 | 	{ NULL, __MUTEX_IPL((ipl)), IPL_NONE } | |
| 70 | 	{ 0, __MUTEX_IPL((ipl)), IPL_NONE } | |
| 71 | 71 | #endif |
| 72 | 72 | |
| 73 | 73 | void __mtx_init(struct mutex *, int); |
| 74 | 74 | #define _mtx_init(mtx, ipl) __mtx_init((mtx), __MUTEX_IPL((ipl))) |
| 75 | 75 | |
| 76 | #define mtx_curcpu() (unsigned long)curcpu() | |
| 77 | #define mtx_owner(mtx) ((mtx)->mtx_owner & ~1UL) | |
| 78 | ||
| 76 | 79 | #ifdef DIAGNOSTIC |
| 77 | 80 | #define MUTEX_ASSERT_LOCKED(mtx) do {					\ |
| 78 | 	if (((mtx)->mtx_owner != curcpu()) && !(panicstr || db_active))	\ | |
| 81 | 	if (mtx_owner(mtx) != mtx_curcpu() && !(panicstr || db_active))	\ | |
| 79 | 82 | 		panic("mutex %p not held in %s", (mtx), __func__);	\ |
| 80 | 83 | } while (0) |
| 81 | 84 | |
| 82 | 85 | #define MUTEX_ASSERT_UNLOCKED(mtx) do {					\ |
| 83 | 	if (((mtx)->mtx_owner == curcpu()) && !(panicstr || db_active))	\ | |
| 86 | 	if (mtx_owner(mtx) == mtx_curcpu() && !(panicstr || db_active))	\ | |
| 84 | 87 | 		panic("mutex %p held in %s", (mtx), __func__);		\ |
| 85 | 88 | } while (0) |
| 86 | 89 | #else |
| ... | ... | @@ -128,7 +131,7 @@ void	mtx_leave(struct mutex *); |
| 128 | 131 | #define mtx_init(m, ipl)	mtx_init_flags(m, ipl, NULL, 0) |
| 129 | 132 | |
| 130 | 133 | #define mtx_owned(mtx) \ |
| 131 | 	(((mtx)->mtx_owner == curcpu()) || panicstr || db_active) | |
| 134 | 	((mtx_owner(mtx) == mtx_curcpu()) || panicstr || db_active) | |
| 132 | 135 | |
| 133 | 136 | #ifdef WITNESS |
| 134 | 137 |
lib/libc/include/generic-openbsd/sys/namei.h+8-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: namei.h,v 1.50 2022/01/11 23:59:55 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: namei.h,v 1.51 2026/03/08 16:41:19 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: namei.h,v 1.11 1996/02/09 18:25:20 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -264,11 +264,12 @@ struct	nchstats { |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /* Unveil flags for namei */ |
| 267 | #define	UNVEIL_READ	0x01 | |
| 268 | #define	UNVEIL_WRITE	0x02 | |
| 269 | #define	UNVEIL_CREATE	0x04 | |
| 270 | #define	UNVEIL_EXEC	0x08 | |
| 271 | #define	UNVEIL_USERSET	0x10 | |
| 272 | #define	UNVEIL_MASK	0x0F | |
| 267 | #define	UNVEIL_READ		0x01 | |
| 268 | #define	UNVEIL_WRITE		0x02 | |
| 269 | #define	UNVEIL_CREATE		0x04 | |
| 270 | #define	UNVEIL_EXEC		0x08 | |
| 271 | #define	UNVEIL_USERSET		0x10 | |
| 272 | #define	UNVEIL_PLEDGEOPEN	0X20 | |
| 273 | #define	UNVEIL_MASK		0x0f | |
| 273 | 274 | |
| 274 | 275 | #endif /* !_SYS_NAMEI_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/sys/param.h+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: param.h,v 1.145 2025/09/10 16:00:04 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: param.h,v 1.146 2026/03/11 02:27:20 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /*- |
| 4 | 4 | * Copyright (c) 1982, 1986, 1989, 1993 |
lib/libc/include/generic-openbsd/sys/pledge.h+1-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pledge.h,v 1.52 2025/07/05 09:24:37 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: pledge.h,v 1.53 2026/02/26 07:42:25 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #define PLEDGE_WPATH	0x0000000000000002ULL	/* allow open for write */ |
| 29 | 29 | #define PLEDGE_CPATH	0x0000000000000004ULL	/* allow creat, mkdir, unlink etc */ |
| 30 | 30 | #define PLEDGE_STDIO	0x0000000000000008ULL	/* operate on own pid */ |
| 31 | #define PLEDGE_TMPPATH	0x0000000000000010ULL	/* for mk*temp() */ | |
| 32 | 31 | #define PLEDGE_DNS	0x0000000000000020ULL	/* DNS services */ |
| 33 | 32 | #define PLEDGE_INET	0x0000000000000040ULL	/* AF_INET/AF_INET6 sockets */ |
| 34 | 33 | #define PLEDGE_FLOCK	0x0000000000000080ULL	/* file locking */ |
| ... | ... | @@ -78,7 +77,6 @@ static const struct { |
| 78 | 77 | 	{ PLEDGE_WPATH,		"wpath" }, |
| 79 | 78 | 	{ PLEDGE_CPATH,		"cpath" }, |
| 80 | 79 | 	{ PLEDGE_DPATH,		"dpath" }, |
| 81 | 	{ PLEDGE_TMPPATH,	"tmppath" }, | |
| 82 | 80 | 	{ PLEDGE_INET,		"inet" }, |
| 83 | 81 | 	{ PLEDGE_MCAST,		"mcast" }, |
| 84 | 82 | 	{ PLEDGE_FATTR,		"fattr" }, |
lib/libc/include/generic-openbsd/sys/protosw.h+8-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: protosw.h,v 1.72 2025/03/02 21:28:32 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: protosw.h,v 1.73 2025/10/24 15:09:56 bluhm Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: protosw.h,v 1.10 1996/04/09 20:55:32 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -86,6 +86,7 @@ struct pr_usrreqs { |
| 86 | 86 | 		 struct mbuf *); |
| 87 | 87 | 	int	(*pru_sockaddr)(struct socket *, struct mbuf *); |
| 88 | 88 | 	int	(*pru_peeraddr)(struct socket *, struct mbuf *); |
| 89 | 	int	(*pru_flowid)(struct socket *); | |
| 89 | 90 | 	int	(*pru_connect2)(struct socket *, struct socket *); |
| 90 | 91 | }; |
| 91 | 92 | |
| ... | ... | @@ -394,6 +395,12 @@ pru_peeraddr(struct socket *so, struct mbuf *addr) |
| 394 | 395 | 	return (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, addr); |
| 395 | 396 | } |
| 396 | 397 | |
| 398 | static inline int | |
| 399 | pru_flowid(struct socket *so) | |
| 400 | { | |
| 401 | 	return (*so->so_proto->pr_usrreqs->pru_flowid)(so); | |
| 402 | } | |
| 403 | ||
| 397 | 404 | static inline int |
| 398 | 405 | pru_connect2(struct socket *so1, struct socket *so2) |
| 399 | 406 | { |
lib/libc/include/generic-openbsd/sys/ptrace.h+4-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ptrace.h,v 1.16 2020/03/16 11:58:46 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: ptrace.h,v 1.17 2025/12/11 14:13:18 kurt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: ptrace.h,v 1.21 1996/02/09 18:25:26 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -82,8 +82,11 @@ typedef struct ptrace_state { |
| 82 | 82 | #define PT_GET_THREAD_FIRST	15 |
| 83 | 83 | #define PT_GET_THREAD_NEXT	16 |
| 84 | 84 | |
| 85 | #define PT_PTS_NAMELEN	32 | |
| 86 | ||
| 85 | 87 | struct ptrace_thread_state { |
| 86 | 88 | 	pid_t	pts_tid; |
| 89 | 	char	pts_name[PT_PTS_NAMELEN]; | |
| 87 | 90 | }; |
| 88 | 91 | |
| 89 | 92 | #define	PT_FIRSTMACH	32	/* for machine-specific requests */ |
lib/libc/include/generic-openbsd/sys/sched.h+8-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: sched.h,v 1.77 2025/06/09 10:57:46 claudio Exp $	*/ | |
| 1 | /*	$OpenBSD: sched.h,v 1.78 2026/03/31 16:46:21 deraadt Exp $	*/ | |
| 2 | 2 | /* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -179,8 +179,15 @@ void sched_barrier(struct cpu_info *ci); |
| 179 | 179 | int sysctl_hwsetperf(void *, size_t *, void *, size_t); |
| 180 | 180 | int sysctl_hwperfpolicy(void *, size_t *, void *, size_t); |
| 181 | 181 | int sysctl_hwsmt(void *, size_t *, void *, size_t); |
| 182 | int sysctl_hwblockcpu(void *, size_t *, void *, size_t); | |
| 182 | 183 | int sysctl_hwncpuonline(void); |
| 183 | 184 | |
| 185 | #define CPUTYP_SMT	0x01	/* SMT cpu */ | |
| 186 | #define CPUTYP_P	0x02	/* Performance core */ | |
| 187 | #define CPUTYP_E	0x04	/* Efficiency core */ | |
| 188 | #define CPUTYP_L	0x08	/* Lethargic, Low Power Efficiency core */ | |
| 189 | extern int sched_blockcpu; | |
| 190 | ||
| 184 | 191 | #ifdef MULTIPROCESSOR |
| 185 | 192 | void sched_start_secondary_cpus(void); |
| 186 | 193 | void sched_stop_secondary_cpus(void); |
lib/libc/include/generic-openbsd/sys/signal.h+4-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: signal.h,v 1.30 2026/03/21 01:56:51 daniel Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -80,8 +80,10 @@ |
| 80 | 80 | #define	SIGXFSZ	25	/* exceeded file size limit */ |
| 81 | 81 | #define	SIGVTALRM 26	/* virtual time alarm */ |
| 82 | 82 | #define	SIGPROF	27	/* profiling time alarm */ |
| 83 | #if __BSD_VISIBLE | |
| 83 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405 | |
| 84 | 84 | #define SIGWINCH 28	/* window size changes */ |
| 85 | #endif | |
| 86 | #if __BSD_VISIBLE | |
| 85 | 87 | #define SIGINFO	29	/* information request */ |
| 86 | 88 | #endif |
| 87 | 89 | #define SIGUSR1 30	/* user defined signal 1 */ |
lib/libc/include/generic-openbsd/sys/socketvar.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: socketvar.h,v 1.159 2025/07/25 08:58:44 mvs Exp $	*/ | |
| 1 | /*	$OpenBSD: socketvar.h,v 1.160 2025/10/24 15:09:56 bluhm Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -74,6 +74,7 @@ struct sosplice { |
| 74 | 74 | 	struct	timeval ssp_idletv;	/* [I] idle timeout */ |
| 75 | 75 | 	struct	timeout ssp_idleto; |
| 76 | 76 | 	struct	task ssp_task;		/* task for somove */ |
| 77 | 	struct	taskq *ssp_queue;	/* [I] softnet queue where we add */ | |
| 77 | 78 | }; |
| 78 | 79 | |
| 79 | 80 | /* |
lib/libc/include/generic-openbsd/sys/sockio.h+11-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: sockio.h,v 1.84 2021/11/11 10:03:10 claudio Exp $	*/ | |
| 1 | /*	$OpenBSD: sockio.h,v 1.86 2025/11/21 04:44:26 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: sockio.h,v 1.5 1995/08/23 00:40:47 thorpej Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -75,7 +75,11 @@ |
| 75 | 75 | #define	SIOCGLIFPHYADDR	_IOWR('i', 75, struct if_laddrreq) /* get gif addrs */ |
| 76 | 76 | |
| 77 | 77 | #define	SIOCBRDGADD	 _IOW('i', 60, struct ifbreq)	/* add bridge ifs */ |
| 78 | #define	SIOCBRDGADDPV	 _IOW('i', 60, struct ifbrpvlan) /* add pvlan */ | |
| 79 | #define	SIOCBRDGFINDPV	_IOWR('i', 60, struct ifbrpvlan) /* find pvlan */ | |
| 78 | 80 | #define	SIOCBRDGDEL	 _IOW('i', 61, struct ifbreq)	/* del bridge ifs */ |
| 81 | #define	SIOCBRDGDELPV	 _IOW('i', 61, struct ifbrpvlan) /* del pvlan */ | |
| 82 | #define	SIOCBRDGNFINDPV	_IOWR('i', 61, struct ifbrpvlan) /* nfind pvlan */ | |
| 79 | 83 | #define	SIOCBRDGGIFFLGS	_IOWR('i', 62, struct ifbreq)	/* get brdg if flags */ |
| 80 | 84 | #define	SIOCBRDGSIFFLGS	 _IOW('i', 63, struct ifbreq)	/* set brdg if flags */ |
| 81 | 85 | #define	SIOCBRDGSCACHE	 _IOW('i', 64, struct ifbrparam)/* set cache size */ |
| ... | ... | @@ -85,12 +89,17 @@ |
| 85 | 89 | #define	SIOCBRDGDELS	 _IOW('i', 66, struct ifbreq)	/* del span port */ |
| 86 | 90 | #define	SIOCBRDGRTS	_IOWR('i', 67, struct ifbaconf)	/* get addresses */ |
| 87 | 91 | #define	SIOCBRDGSADDR	_IOWR('i', 68, struct ifbareq)	/* set addr flags */ |
| 92 | #define	SIOCBRDGSVADDR	 _IOW('i', 68, struct ifbvareq)	/* add addr@vid */ | |
| 88 | 93 | #define	SIOCBRDGSTO	 _IOW('i', 69, struct ifbrparam)/* cache timeout */ |
| 89 | 94 | #define	SIOCBRDGGTO	_IOWR('i', 70, struct ifbrparam)/* cache timeout */ |
| 90 | 95 | #define	SIOCBRDGDADDR	 _IOW('i', 71, struct ifbareq)	/* delete addr */ |
| 96 | #define	SIOCBRDGDVADDR	 _IOW('i', 71, struct ifbvareq)	/* delete addr@vid */ | |
| 91 | 97 | #define	SIOCBRDGFLUSH	 _IOW('i', 72, struct ifbreq)	/* flush addr cache */ |
| 92 | 98 | #define	SIOCBRDGADDL	 _IOW('i', 73, struct ifbreq)	/* add local port */ |
| 93 | 99 | #define	SIOCBRDGSIFPROT	 _IOW('i', 74, struct ifbreq)	/* set protected grp */ |
| 100 | #define	SIOCBRDGSPVID	 _IOW('i', 76, struct ifbreq)	/* set pvid */ | |
| 101 | #define	SIOCBRDGSVMAP	 _IOW('i', 76, struct ifbrvidmap) /* set vid map */ | |
| 102 | #define	SIOCBRDGGVMAP	_IOWR('i', 76, struct ifbrvidmap) /* get vid map */ | |
| 94 | 103 | |
| 95 | 104 | #define SIOCBRDGARL	 _IOW('i', 77, struct ifbrlreq)	/* add bridge rule */ |
| 96 | 105 | #define SIOCBRDGFRL	 _IOW('i', 78, struct ifbrlreq)	/* flush brdg rules */ |
| ... | ... | @@ -105,6 +114,7 @@ |
| 105 | 114 | #define	SIOCBRDGSMA	 _IOW('i', 83, struct ifbrparam)/* set max age */ |
| 106 | 115 | #define	SIOCBRDGSIFPRIO	 _IOW('i', 84, struct ifbreq)	/* set if priority */ |
| 107 | 116 | #define	SIOCBRDGSIFCOST _IOW('i', 85, struct ifbreq)	/* set if cost */ |
| 117 | #define	SIOCBRDGVRTS	_IOWR('i', 86, struct ifbaconf)	/* get vaddresses */ | |
| 108 | 118 | |
| 109 | 119 | #define SIOCBRDGGPARAM _IOWR('i', 88, struct ifbropreq)/* get brdg STP parms */ |
| 110 | 120 | #define SIOCBRDGSTXHC _IOW('i', 89, struct ifbrparam)/* set tx hold count */ |
lib/libc/include/generic-openbsd/sys/syscall.h+5-3| ... | ... | @@ -1,10 +1,10 @@ |
| 1 | /*	$OpenBSD: syscall.h,v 1.283 2025/05/24 06:50:02 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: syscall.h,v 1.284 2026/03/08 16:41:35 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * System call numbers. |
| 5 | 5 | * |
| 6 | 6 | * DO NOT EDIT-- this file is automatically generated. |
| 7 | * created from;	OpenBSD: syscalls.master,v 1.270 2025/05/24 06:49:16 deraadt Exp | |
| 7 | * created from;	OpenBSD: syscalls.master,v 1.271 2026/03/08 16:41:21 deraadt Exp | |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | /* syscall: "exit" ret: "void" args: "int" */ |
| ... | ... | @@ -371,7 +371,9 @@ |
| 371 | 371 | /* syscall: "fchmod" ret: "int" args: "int" "mode_t" */ |
| 372 | 372 | #define	SYS_fchmod	124 |
| 373 | 373 | |
| 374 | 				/* 125 is obsolete orecvfrom */ | |
| 374 | /* syscall: "__pledge_open" ret: "int" args: "const char *" "int" "..." "mode_t" */ | |
| 375 | #define	SYS___pledge_open	125 | |
| 376 | ||
| 375 | 377 | /* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */ |
| 376 | 378 | #define	SYS_setreuid	126 |
| 377 | 379 |
lib/libc/include/generic-openbsd/sys/syscallargs.h+9-2| ... | ... | @@ -1,10 +1,10 @@ |
| 1 | /*	$OpenBSD: syscallargs.h,v 1.286 2025/05/24 06:50:02 deraadt Exp $	*/ | |
| 1 | /*	$OpenBSD: syscallargs.h,v 1.287 2026/03/08 16:41:35 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * System call argument lists. |
| 5 | 5 | * |
| 6 | 6 | * DO NOT EDIT-- this file is automatically generated. |
| 7 | * created from;	OpenBSD: syscalls.master,v 1.270 2025/05/24 06:49:16 deraadt Exp | |
| 7 | * created from;	OpenBSD: syscalls.master,v 1.271 2026/03/08 16:41:21 deraadt Exp | |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | #ifdef	syscallarg |
| ... | ... | @@ -640,6 +640,12 @@ struct sys_fchmod_args { |
| 640 | 640 | 	syscallarg(mode_t) mode; |
| 641 | 641 | }; |
| 642 | 642 | |
| 643 | struct sys___pledge_open_args { | |
| 644 | 	syscallarg(const char *) path; | |
| 645 | 	syscallarg(int) flags; | |
| 646 | 	syscallarg(mode_t) mode; | |
| 647 | }; | |
| 648 | ||
| 643 | 649 | struct sys_setreuid_args { |
| 644 | 650 | 	syscallarg(uid_t) ruid; |
| 645 | 651 | 	syscallarg(uid_t) euid; |
| ... | ... | @@ -1291,6 +1297,7 @@ int	sys_writev(struct proc *, void *, register_t *); |
| 1291 | 1297 | int	sys_kill(struct proc *, void *, register_t *); |
| 1292 | 1298 | int	sys_fchown(struct proc *, void *, register_t *); |
| 1293 | 1299 | int	sys_fchmod(struct proc *, void *, register_t *); |
| 1300 | int	sys___pledge_open(struct proc *, void *, register_t *); | |
| 1294 | 1301 | int	sys_setreuid(struct proc *, void *, register_t *); |
| 1295 | 1302 | int	sys_setregid(struct proc *, void *, register_t *); |
| 1296 | 1303 | int	sys_rename(struct proc *, void *, register_t *); |
lib/libc/include/generic-openbsd/sys/sysctl.h+7-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: sysctl.h,v 1.246 2025/07/31 09:05:11 mvs Exp $	*/ | |
| 1 | /*	$OpenBSD: sysctl.h,v 1.248 2026/04/16 14:47:24 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -684,7 +684,6 @@ do {									\ |
| 684 | 684 | 			(kp)->p_vm_dsize = (vm)->vm_dused;		\ |
| 685 | 685 | 			(kp)->p_vm_ssize = (vm)->vm_ssize;		\ |
| 686 | 686 | 		}							\ |
| 687 | 		(kp)->p_addr = PTRTOINT64((p)->p_addr);			\ | |
| 688 | 687 | 		(kp)->p_stat = (p)->p_stat;				\ |
| 689 | 688 | 		(kp)->p_slptime = (p)->p_slptime;			\ |
| 690 | 689 | 		(kp)->p_holdcnt = 1;					\ |
| ... | ... | @@ -693,8 +692,10 @@ do {									\ |
| 693 | 692 | 		if ((p)->p_wchan && (p)->p_wmesg)			\ |
| 694 | 693 | 			copy_str((kp)->p_wmesg, (p)->p_wmesg,		\ |
| 695 | 694 | 			 sizeof((kp)->p_wmesg));			\ |
| 696 | 		if (show_addresses)					\ | |
| 695 | 		if (show_addresses) {					\ | |
| 697 | 696 | 			(kp)->p_wchan = PTRTOINT64((p)->p_wchan);	\ |
| 697 | 			(kp)->p_addr = PTRTOINT64((p)->p_addr);		\ | |
| 698 | 		}							\ | |
| 698 | 699 | 	}								\ |
| 699 | 700 | 									\ |
| 700 | 701 | 	if (((pr)->ps_flags & PS_ZOMBIE) == 0) {			\ |
| ... | ... | @@ -926,7 +927,8 @@ struct kinfo_file { |
| 926 | 927 | #define	HW_POWER		26	/* int: machine has wall-power */ |
| 927 | 928 | #define	HW_BATTERY		27	/* node: battery */ |
| 928 | 929 | #define	HW_UCOMNAMES		28	/* strings: ucom names */ |
| 929 | #define	HW_MAXID		29	/* number of valid hw ids */ | |
| 930 | #define	HW_BLOCKCPU		29	/* string: cpu types to block */ | |
| 931 | #define	HW_MAXID		30	/* number of valid hw ids */ | |
| 930 | 932 | |
| 931 | 933 | #define	CTL_HW_NAMES { \ |
| 932 | 934 | 	{ 0, 0 }, \ |
| ... | ... | @@ -958,6 +960,7 @@ struct kinfo_file { |
| 958 | 960 | 	{ "power", CTLTYPE_INT }, \ |
| 959 | 961 | 	{ "battery", CTLTYPE_NODE }, \ |
| 960 | 962 | 	{ "ucomnames", CTLTYPE_STRING }, \ |
| 963 | 	{ "blockcpu", CTLTYPE_STRING }, \ | |
| 961 | 964 | } |
| 962 | 965 | |
| 963 | 966 | /* |
lib/libc/include/generic-openbsd/sys/types.h+6-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $	*/ | |
| 1 | /*	$OpenBSD: types.h,v 1.50 2026/03/26 21:46:24 daniel Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -140,7 +140,6 @@ typedef	__gid_t		gid_t;		/* group id */ |
| 140 | 140 | typedef	__id_t		id_t;		/* may contain pid, uid or gid */ |
| 141 | 141 | typedef	__ino_t		ino_t;		/* inode number */ |
| 142 | 142 | typedef	__key_t		key_t;		/* IPC key (for Sys V IPC) */ |
| 143 | typedef	__mode_t	mode_t;		/* permissions */ | |
| 144 | 143 | typedef	__nlink_t	nlink_t;	/* link count */ |
| 145 | 144 | typedef	__rlim_t	rlim_t;		/* resource limit */ |
| 146 | 145 | typedef	__segsz_t	segsz_t;	/* segment size */ |
| ... | ... | @@ -193,6 +192,11 @@ typedef	__timer_t	timer_t; |
| 193 | 192 | typedef	__off_t		off_t; |
| 194 | 193 | #endif |
| 195 | 194 | |
| 195 | #ifndef	_MODE_T_DEFINED_ | |
| 196 | #define	_MODE_T_DEFINED_ | |
| 197 | typedef	__mode_t	mode_t;		/* permissions */ | |
| 198 | #endif | |
| 199 | ||
| 196 | 200 | /* |
| 197 | 201 | * These belong in unistd.h, but are placed here too to ensure that |
| 198 | 202 | * long arguments will be promoted to off_t if the program fails to |
lib/libc/include/generic-openbsd/sys/videoio.h+143-68| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: videoio.h,v 1.26 2025/08/02 09:27:59 kirill Exp $	*/ | |
| 1 | /*	$OpenBSD: videoio.h,v 1.29 2026/02/19 20:42:45 kirill Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Video for Linux Two header file |
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | * |
| 55 | 55 | *	Author: Bill Dirks <bill@thedirks.org> |
| 56 | 56 | *		Justin Schoeman |
| 57 | * Hans Verkuil <hverkuil@xs4all.nl> | |
| 57 | * Hans Verkuil <hverkuil@kernel.org> | |
| 58 | 58 | *		et al. |
| 59 | 59 | */ |
| 60 | 60 | |
| ... | ... | @@ -343,6 +343,12 @@ enum v4l2_colorfx { |
| 343 | 343 | */ |
| 344 | 344 | #define V4L2_CID_USER_RKISP1_BASE		(V4L2_CID_USER_BASE + 0x1220) |
| 345 | 345 | |
| 346 | /* | |
| 347 | * The base for the Arm Mali-C55 ISP driver controls. | |
| 348 | * We reserve 16 controls for this driver | |
| 349 | */ | |
| 350 | #define V4L2_CID_USER_MALI_C55_BASE		(V4L2_CID_USER_BASE + 0x1230) | |
| 351 | ||
| 346 | 352 | /* MPEG-class control IDs */ |
| 347 | 353 | /* The MPEG controls are applicable to all codec controls |
| 348 | 354 | * and the 'MPEG' part of the define is historical */ |
| ... | ... | @@ -1299,6 +1305,8 @@ enum v4l2_flash_strobe_source { |
| 1299 | 1305 | |
| 1300 | 1306 | #define V4L2_CID_FLASH_CHARGE			(V4L2_CID_FLASH_CLASS_BASE + 11) |
| 1301 | 1307 | #define V4L2_CID_FLASH_READY			(V4L2_CID_FLASH_CLASS_BASE + 12) |
| 1308 | #define V4L2_CID_FLASH_DURATION			(V4L2_CID_FLASH_CLASS_BASE + 13) | |
| 1309 | #define V4L2_CID_FLASH_STROBE_OE		(V4L2_CID_FLASH_CLASS_BASE + 14) | |
| 1302 | 1310 | |
| 1303 | 1311 | |
| 1304 | 1312 | /* JPEG-class control IDs */ |
| ... | ... | @@ -1306,7 +1314,7 @@ enum v4l2_flash_strobe_source { |
| 1306 | 1314 | #define V4L2_CID_JPEG_CLASS_BASE		(V4L2_CTRL_CLASS_JPEG | 0x900) |
| 1307 | 1315 | #define V4L2_CID_JPEG_CLASS			(V4L2_CTRL_CLASS_JPEG | 1) |
| 1308 | 1316 | |
| 1309 | #define	V4L2_CID_JPEG_CHROMA_SUBSAMPLING	(V4L2_CID_JPEG_CLASS_BASE + 1) | |
| 1317 | #define V4L2_CID_JPEG_CHROMA_SUBSAMPLING	(V4L2_CID_JPEG_CLASS_BASE + 1) | |
| 1310 | 1318 | enum v4l2_jpeg_chroma_subsampling { |
| 1311 | 1319 | 	V4L2_JPEG_CHROMA_SUBSAMPLING_444	= 0, |
| 1312 | 1320 | 	V4L2_JPEG_CHROMA_SUBSAMPLING_422	= 1, |
| ... | ... | @@ -1315,15 +1323,15 @@ enum v4l2_jpeg_chroma_subsampling { |
| 1315 | 1323 | 	V4L2_JPEG_CHROMA_SUBSAMPLING_410	= 4, |
| 1316 | 1324 | 	V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY	= 5, |
| 1317 | 1325 | }; |
| 1318 | #define	V4L2_CID_JPEG_RESTART_INTERVAL		(V4L2_CID_JPEG_CLASS_BASE + 2) | |
| 1319 | #define	V4L2_CID_JPEG_COMPRESSION_QUALITY	(V4L2_CID_JPEG_CLASS_BASE + 3) | |
| 1326 | #define V4L2_CID_JPEG_RESTART_INTERVAL		(V4L2_CID_JPEG_CLASS_BASE + 2) | |
| 1327 | #define V4L2_CID_JPEG_COMPRESSION_QUALITY	(V4L2_CID_JPEG_CLASS_BASE + 3) | |
| 1320 | 1328 | |
| 1321 | #define	V4L2_CID_JPEG_ACTIVE_MARKER		(V4L2_CID_JPEG_CLASS_BASE + 4) | |
| 1322 | #define	V4L2_JPEG_ACTIVE_MARKER_APP0		(1 << 0) | |
| 1323 | #define	V4L2_JPEG_ACTIVE_MARKER_APP1		(1 << 1) | |
| 1324 | #define	V4L2_JPEG_ACTIVE_MARKER_COM		(1 << 16) | |
| 1325 | #define	V4L2_JPEG_ACTIVE_MARKER_DQT		(1 << 17) | |
| 1326 | #define	V4L2_JPEG_ACTIVE_MARKER_DHT		(1 << 18) | |
| 1329 | #define V4L2_CID_JPEG_ACTIVE_MARKER		(V4L2_CID_JPEG_CLASS_BASE + 4) | |
| 1330 | #define V4L2_JPEG_ACTIVE_MARKER_APP0		(1 << 0) | |
| 1331 | #define V4L2_JPEG_ACTIVE_MARKER_APP1		(1 << 1) | |
| 1332 | #define V4L2_JPEG_ACTIVE_MARKER_COM		(1 << 16) | |
| 1333 | #define V4L2_JPEG_ACTIVE_MARKER_DQT		(1 << 17) | |
| 1334 | #define V4L2_JPEG_ACTIVE_MARKER_DHT		(1 << 18) | |
| 1327 | 1335 | |
| 1328 | 1336 | |
| 1329 | 1337 | /* Image source controls */ |
| ... | ... | @@ -1356,10 +1364,10 @@ enum v4l2_jpeg_chroma_subsampling { |
| 1356 | 1364 | #define V4L2_CID_DV_CLASS_BASE			(V4L2_CTRL_CLASS_DV | 0x900) |
| 1357 | 1365 | #define V4L2_CID_DV_CLASS			(V4L2_CTRL_CLASS_DV | 1) |
| 1358 | 1366 | |
| 1359 | #define	V4L2_CID_DV_TX_HOTPLUG			(V4L2_CID_DV_CLASS_BASE + 1) | |
| 1360 | #define	V4L2_CID_DV_TX_RXSENSE			(V4L2_CID_DV_CLASS_BASE + 2) | |
| 1361 | #define	V4L2_CID_DV_TX_EDID_PRESENT		(V4L2_CID_DV_CLASS_BASE + 3) | |
| 1362 | #define	V4L2_CID_DV_TX_MODE			(V4L2_CID_DV_CLASS_BASE + 4) | |
| 1367 | #define V4L2_CID_DV_TX_HOTPLUG			(V4L2_CID_DV_CLASS_BASE + 1) | |
| 1368 | #define V4L2_CID_DV_TX_RXSENSE			(V4L2_CID_DV_CLASS_BASE + 2) | |
| 1369 | #define V4L2_CID_DV_TX_EDID_PRESENT		(V4L2_CID_DV_CLASS_BASE + 3) | |
| 1370 | #define V4L2_CID_DV_TX_MODE			(V4L2_CID_DV_CLASS_BASE + 4) | |
| 1363 | 1371 | enum v4l2_dv_tx_mode { |
| 1364 | 1372 | 	V4L2_DV_TX_MODE_DVI_D	= 0, |
| 1365 | 1373 | 	V4L2_DV_TX_MODE_HDMI	= 1, |
| ... | ... | @@ -1380,7 +1388,7 @@ enum v4l2_dv_it_content_type { |
| 1380 | 1388 | 	V4L2_DV_IT_CONTENT_TYPE_NO_ITC	 = 4, |
| 1381 | 1389 | }; |
| 1382 | 1390 | |
| 1383 | #define	V4L2_CID_DV_RX_POWER_PRESENT		(V4L2_CID_DV_CLASS_BASE + 100) | |
| 1391 | #define V4L2_CID_DV_RX_POWER_PRESENT		(V4L2_CID_DV_CLASS_BASE + 100) | |
| 1384 | 1392 | #define V4L2_CID_DV_RX_RGB_RANGE		(V4L2_CID_DV_CLASS_BASE + 101) |
| 1385 | 1393 | #define V4L2_CID_DV_RX_IT_CONTENT_TYPE		(V4L2_CID_DV_CLASS_BASE + 102) |
| 1386 | 1394 | |
| ... | ... | @@ -1650,15 +1658,6 @@ struct v4l2_ctrl_h264_pred_weights { |
| 1650 | 1658 | 	struct v4l2_h264_weight_factors weight_factors[2]; |
| 1651 | 1659 | }; |
| 1652 | 1660 | |
| 1653 | #define V4L2_H264_SLICE_TYPE_P				0 | |
| 1654 | #define V4L2_H264_SLICE_TYPE_B				1 | |
| 1655 | #define V4L2_H264_SLICE_TYPE_I				2 | |
| 1656 | #define V4L2_H264_SLICE_TYPE_SP				3 | |
| 1657 | #define V4L2_H264_SLICE_TYPE_SI				4 | |
| 1658 | ||
| 1659 | #define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED	0x01 | |
| 1660 | #define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH		0x02 | |
| 1661 | ||
| 1662 | 1661 | #define V4L2_H264_TOP_FIELD_REF				0x1 |
| 1663 | 1662 | #define V4L2_H264_BOTTOM_FIELD_REF			0x2 |
| 1664 | 1663 | #define V4L2_H264_FRAME_REF				0x3 |
| ... | ... | @@ -1679,8 +1678,17 @@ struct v4l2_h264_reference { |
| 1679 | 1678 | * Maximum DPB size, as specified by section 'A.3.1 Level limits |
| 1680 | 1679 | * common to the Baseline, Main, and Extended profiles'. |
| 1681 | 1680 | */ |
| 1682 | #define V4L2_H264_NUM_DPB_ENTRIES 16 | |
| 1683 | #define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES) | |
| 1681 | #define V4L2_H264_NUM_DPB_ENTRIES		16 | |
| 1682 | #define V4L2_H264_REF_LIST_LEN			(2 * V4L2_H264_NUM_DPB_ENTRIES) | |
| 1683 | ||
| 1684 | #define V4L2_H264_SLICE_TYPE_P				0 | |
| 1685 | #define V4L2_H264_SLICE_TYPE_B				1 | |
| 1686 | #define V4L2_H264_SLICE_TYPE_I				2 | |
| 1687 | #define V4L2_H264_SLICE_TYPE_SP				3 | |
| 1688 | #define V4L2_H264_SLICE_TYPE_SI				4 | |
| 1689 | ||
| 1690 | #define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED		0x01 | |
| 1691 | #define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH			0x02 | |
| 1684 | 1692 | |
| 1685 | 1693 | #define V4L2_CID_STATELESS_H264_SLICE_PARAMS	(V4L2_CID_CODEC_STATELESS_BASE + 6) |
| 1686 | 1694 | /** |
| ... | ... | @@ -1820,7 +1828,6 @@ struct v4l2_ctrl_h264_decode_params { |
| 1820 | 1828 | 	u_int32_t flags; |
| 1821 | 1829 | }; |
| 1822 | 1830 | |
| 1823 | ||
| 1824 | 1831 | /* Stateless FWHT control, used by the vicodec driver */ |
| 1825 | 1832 | |
| 1826 | 1833 | /* Current FWHT version */ |
| ... | ... | @@ -2207,6 +2214,8 @@ struct v4l2_ctrl_mpeg2_quantisation { |
| 2207 | 2214 | #define V4L2_CID_STATELESS_HEVC_DECODE_MODE	(V4L2_CID_CODEC_STATELESS_BASE + 405) |
| 2208 | 2215 | #define V4L2_CID_STATELESS_HEVC_START_CODE	(V4L2_CID_CODEC_STATELESS_BASE + 406) |
| 2209 | 2216 | #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) |
| 2217 | #define V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (V4L2_CID_CODEC_STATELESS_BASE + 408) | |
| 2218 | #define V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (V4L2_CID_CODEC_STATELESS_BASE + 409) | |
| 2210 | 2219 | |
| 2211 | 2220 | enum v4l2_stateless_hevc_decode_mode { |
| 2212 | 2221 | 	V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, |
| ... | ... | @@ -2662,44 +2671,69 @@ struct v4l2_ctrl_hevc_scaling_matrix { |
| 2662 | 2671 | 	u_int8_t	scaling_list_dc_coef_32x32[2]; |
| 2663 | 2672 | }; |
| 2664 | 2673 | |
| 2665 | #define V4L2_CID_COLORIMETRY_CLASS_BASE	(V4L2_CTRL_CLASS_COLORIMETRY | 0x900) | |
| 2666 | #define V4L2_CID_COLORIMETRY_CLASS	(V4L2_CTRL_CLASS_COLORIMETRY | 1) | |
| 2674 | #define V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED	0x1 | |
| 2667 | 2675 | |
| 2668 | #define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO	(V4L2_CID_COLORIMETRY_CLASS_BASE + 0) | |
| 2669 | ||
| 2670 | struct v4l2_ctrl_hdr10_cll_info { | |
| 2671 | 	u_int16_t max_content_light_level; | |
| 2672 | 	u_int16_t max_pic_average_light_level; | |
| 2673 | }; | |
| 2674 | ||
| 2675 | #define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY	(V4L2_CID_COLORIMETRY_CLASS_BASE + 1) | |
| 2676 | ||
| 2677 | #define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW	5 | |
| 2678 | #define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH	37000 | |
| 2679 | #define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW	5 | |
| 2680 | #define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH	42000 | |
| 2681 | #define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW	5 | |
| 2682 | #define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH	37000 | |
| 2683 | #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW	5 | |
| 2684 | #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH	42000 | |
| 2685 | #define V4L2_HDR10_MASTERING_MAX_LUMA_LOW	50000 | |
| 2686 | #define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH	100000000 | |
| 2687 | #define V4L2_HDR10_MASTERING_MIN_LUMA_LOW	1 | |
| 2688 | #define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH	50000 | |
| 2676 | /* | |
| 2677 | * struct v4l2_ctrl_hevc_ext_sps_st_rps - HEVC short term RPS parameters | |
| 2678 | * | |
| 2679 | * Dynamic size 1-dimension array for short term RPS. The number of elements | |
| 2680 | * is v4l2_ctrl_hevc_sps::num_short_term_ref_pic_sets. It can contain up to 65 elements. | |
| 2681 | * | |
| 2682 | * @delta_idx_minus1: Specifies the delta compare to the index. See details in section 7.4.8 | |
| 2683 | * "Short-term reference picture set semantics" of the specification. | |
| 2684 | * @delta_rps_sign: Sign of the delta as specified in section 7.4.8 "Short-term reference picture | |
| 2685 | * set semantics" of the specification. | |
| 2686 | * @abs_delta_rps_minus1: Absolute delta RPS as specified in section 7.4.8 "Short-term reference | |
| 2687 | * picture set semantics" of the specification. | |
| 2688 | * @num_negative_pics: Number of short-term RPS entries that have picture order count values less | |
| 2689 | * than the picture order count value of the current picture. | |
| 2690 | * @num_positive_pics: Number of short-term RPS entries that have picture order count values | |
| 2691 | * greater than the picture order count value of the current picture. | |
| 2692 | * @used_by_curr_pic: Bit j specifies if short-term RPS j is used by the current picture. | |
| 2693 | * @use_delta_flag: Bit j equals to 1 specifies that the j-th entry in the source candidate | |
| 2694 | * short-term RPS is included in this candidate short-term RPS. | |
| 2695 | * @delta_poc_s0_minus1: Specifies the negative picture order count delta for the i-th entry in | |
| 2696 | * the short-term RPS. See details in section 7.4.8 "Short-term reference | |
| 2697 | * picture set semantics" of the specification. | |
| 2698 | * @delta_poc_s1_minus1: Specifies the positive picture order count delta for the i-th entry in | |
| 2699 | * the short-term RPS. See details in section 7.4.8 "Short-term reference | |
| 2700 | * picture set semantics" of the specification. | |
| 2701 | * @flags: See V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_{} | |
| 2702 | */ | |
| 2703 | struct v4l2_ctrl_hevc_ext_sps_st_rps { | |
| 2704 | 	u_int8_t	delta_idx_minus1; | |
| 2705 | 	u_int8_t	delta_rps_sign; | |
| 2706 | 	u_int8_t	num_negative_pics; | |
| 2707 | 	u_int8_t	num_positive_pics; | |
| 2708 | 	u_int32_t	used_by_curr_pic; | |
| 2709 | 	u_int32_t	use_delta_flag; | |
| 2710 | 	u_int16_t	abs_delta_rps_minus1; | |
| 2711 | 	u_int16_t	delta_poc_s0_minus1[16]; | |
| 2712 | 	u_int16_t	delta_poc_s1_minus1[16]; | |
| 2713 | 	u_int16_t	flags; | |
| 2714 | }; | |
| 2715 | ||
| 2716 | #define V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT		0x1 | |
| 2689 | 2717 | |
| 2690 | struct v4l2_ctrl_hdr10_mastering_display { | |
| 2691 | 	u_int16_t display_primaries_x[3]; | |
| 2692 | 	u_int16_t display_primaries_y[3]; | |
| 2693 | 	u_int16_t white_point_x; | |
| 2694 | 	u_int16_t white_point_y; | |
| 2695 | 	u_int32_t max_display_mastering_luminance; | |
| 2696 | 	u_int32_t min_display_mastering_luminance; | |
| 2718 | /* | |
| 2719 | * struct v4l2_ctrl_hevc_ext_sps_lt_rps - HEVC long term RPS parameters | |
| 2720 | * | |
| 2721 | * Dynamic size 1-dimension array for long term RPS. The number of elements | |
| 2722 | * is v4l2_ctrl_hevc_sps::num_long_term_ref_pics_sps. It can contain up to 65 elements. | |
| 2723 | * | |
| 2724 | * @lt_ref_pic_poc_lsb_sps: picture order count modulo MaxPicOrderCntLsb of the i-th candidate | |
| 2725 | * long-term reference picture. | |
| 2726 | * @flags: See V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_{} | |
| 2727 | */ | |
| 2728 | struct v4l2_ctrl_hevc_ext_sps_lt_rps { | |
| 2729 | 	u_int16_t	lt_ref_pic_poc_lsb_sps; | |
| 2730 | 	u_int16_t	flags; | |
| 2697 | 2731 | }; |
| 2698 | 2732 | |
| 2699 | 2733 | /* Stateless VP9 controls */ |
| 2700 | 2734 | |
| 2701 | 2735 | #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED	0x1 |
| 2702 | #define	V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE	0x2 | |
| 2736 | #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE	0x2 | |
| 2703 | 2737 | |
| 2704 | 2738 | /** |
| 2705 | 2739 | * struct v4l2_vp9_loop_filter - VP9 loop filter parameters |
| ... | ... | @@ -3625,6 +3659,40 @@ struct v4l2_ctrl_av1_film_grain { |
| 3625 | 3659 | #define V4L2_CID_MPEG_BASE V4L2_CID_CODEC_BASE |
| 3626 | 3660 | #define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE |
| 3627 | 3661 | #define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE |
| 3662 | #define V4L2_CID_COLORIMETRY_CLASS_BASE	(V4L2_CTRL_CLASS_COLORIMETRY | 0x900) | |
| 3663 | #define V4L2_CID_COLORIMETRY_CLASS	(V4L2_CTRL_CLASS_COLORIMETRY | 1) | |
| 3664 | ||
| 3665 | #define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO	(V4L2_CID_COLORIMETRY_CLASS_BASE + 0) | |
| 3666 | ||
| 3667 | struct v4l2_ctrl_hdr10_cll_info { | |
| 3668 | 	u_int16_t max_content_light_level; | |
| 3669 | 	u_int16_t max_pic_average_light_level; | |
| 3670 | }; | |
| 3671 | ||
| 3672 | #define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY	(V4L2_CID_COLORIMETRY_CLASS_BASE + 1) | |
| 3673 | ||
| 3674 | #define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW	5 | |
| 3675 | #define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH	37000 | |
| 3676 | #define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW	5 | |
| 3677 | #define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH	42000 | |
| 3678 | #define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW	5 | |
| 3679 | #define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH	37000 | |
| 3680 | #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW	5 | |
| 3681 | #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH	42000 | |
| 3682 | #define V4L2_HDR10_MASTERING_MAX_LUMA_LOW	50000 | |
| 3683 | #define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH	100000000 | |
| 3684 | #define V4L2_HDR10_MASTERING_MIN_LUMA_LOW	1 | |
| 3685 | #define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH	50000 | |
| 3686 | ||
| 3687 | struct v4l2_ctrl_hdr10_mastering_display { | |
| 3688 | 	u_int16_t display_primaries_x[3]; | |
| 3689 | 	u_int16_t display_primaries_y[3]; | |
| 3690 | 	u_int16_t white_point_x; | |
| 3691 | 	u_int16_t white_point_y; | |
| 3692 | 	u_int32_t max_display_mastering_luminance; | |
| 3693 | 	u_int32_t min_display_mastering_luminance; | |
| 3694 | }; | |
| 3695 | ||
| 3628 | 3696 | /* |
| 3629 | 3697 | * End of v4l2-controls.h |
| 3630 | 3698 | */ |
| ... | ... | @@ -4316,6 +4384,7 @@ struct v4l2_pix_format { |
| 4316 | 4384 | #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ |
| 4317 | 4385 | #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ |
| 4318 | 4386 | #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */ |
| 4387 | #define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '0', '1') /* AV1 */ | |
| 4319 | 4388 | #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ |
| 4320 | 4389 | #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ |
| 4321 | 4390 | #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */ |
| ... | ... | @@ -4425,6 +4494,10 @@ struct v4l2_pix_format { |
| 4425 | 4494 | #define V4L2_META_FMT_RPI_FE_CFG	v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ |
| 4426 | 4495 | #define V4L2_META_FMT_RPI_FE_STATS	v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */ |
| 4427 | 4496 | |
| 4497 | /* Vendor specific - used for Arm Mali-C55 ISP */ | |
| 4498 | #define V4L2_META_FMT_MALI_C55_PARAMS	v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */ | |
| 4499 | #define V4L2_META_FMT_MALI_C55_STATS	v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */ | |
| 4500 | ||
| 4428 | 4501 | /* priv field value to indicates that subsequent fields are valid. */ |
| 4429 | 4502 | #define V4L2_PIX_FMT_PRIV_MAGIC		0xfeedcafe |
| 4430 | 4503 | |
| ... | ... | @@ -5108,8 +5181,8 @@ struct v4l2_bt_timings { |
| 5108 | 5181 | } __attribute__ ((packed)); |
| 5109 | 5182 | |
| 5110 | 5183 | /* Interlaced or progressive format */ |
| 5111 | #define	V4L2_DV_PROGRESSIVE	0 | |
| 5112 | #define	V4L2_DV_INTERLACED	1 | |
| 5184 | #define V4L2_DV_PROGRESSIVE	0 | |
| 5185 | #define V4L2_DV_INTERLACED	1 | |
| 5113 | 5186 | |
| 5114 | 5187 | /* Polarities. If bit is not set, it is assumed to be negative polarity */ |
| 5115 | 5188 | #define V4L2_DV_VSYNC_POS_POL	0x00000001 |
| ... | ... | @@ -5478,6 +5551,8 @@ enum v4l2_ctrl_type { |
| 5478 | 5551 | 	V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS	= 0x0272, |
| 5479 | 5552 | 	V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX	= 0x0273, |
| 5480 | 5553 | 	V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS	= 0x0274, |
| 5554 | 	V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS	= 0x0275, | |
| 5555 | 	V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS	= 0x0276, | |
| 5481 | 5556 | |
| 5482 | 5557 | 	V4L2_CTRL_TYPE_AV1_SEQUENCE	 = 0x280, |
| 5483 | 5558 | 	V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281, |
| ... | ... | @@ -6281,15 +6356,15 @@ struct v4l2_remove_buffers { |
| 6281 | 6356 | * Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. |
| 6282 | 6357 | * You must be root to use these ioctls. Never use these in applications! |
| 6283 | 6358 | */ |
| 6284 | #define	VIDIOC_DBG_S_REGISTER	 _IOW('V', 79, struct v4l2_dbg_register) | |
| 6285 | #define	VIDIOC_DBG_G_REGISTER	_IOWR('V', 80, struct v4l2_dbg_register) | |
| 6359 | #define VIDIOC_DBG_S_REGISTER	 _IOW('V', 79, struct v4l2_dbg_register) | |
| 6360 | #define VIDIOC_DBG_G_REGISTER	_IOWR('V', 80, struct v4l2_dbg_register) | |
| 6286 | 6361 | |
| 6287 | 6362 | #define VIDIOC_S_HW_FREQ_SEEK	 _IOW('V', 82, struct v4l2_hw_freq_seek) |
| 6288 | #define	VIDIOC_S_DV_TIMINGS	_IOWR('V', 87, struct v4l2_dv_timings) | |
| 6289 | #define	VIDIOC_G_DV_TIMINGS	_IOWR('V', 88, struct v4l2_dv_timings) | |
| 6290 | #define	VIDIOC_DQEVENT		 _IOR('V', 89, struct v4l2_event) | |
| 6291 | #define	VIDIOC_SUBSCRIBE_EVENT	 _IOW('V', 90, struct v4l2_event_subscription) | |
| 6292 | #define	VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) | |
| 6363 | #define VIDIOC_S_DV_TIMINGS	_IOWR('V', 87, struct v4l2_dv_timings) | |
| 6364 | #define VIDIOC_G_DV_TIMINGS	_IOWR('V', 88, struct v4l2_dv_timings) | |
| 6365 | #define VIDIOC_DQEVENT		 _IOR('V', 89, struct v4l2_event) | |
| 6366 | #define VIDIOC_SUBSCRIBE_EVENT	 _IOW('V', 90, struct v4l2_event_subscription) | |
| 6367 | #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) | |
| 6293 | 6368 | #define VIDIOC_CREATE_BUFS	_IOWR('V', 92, struct v4l2_create_buffers) |
| 6294 | 6369 | #define VIDIOC_PREPARE_BUF	_IOWR('V', 93, struct v4l2_buffer) |
| 6295 | 6370 | #define VIDIOC_G_SELECTION	_IOWR('V', 94, struct v4l2_selection) |
lib/libc/include/generic-openbsd/sys/xcall.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: xcall.h,v 1.1 2025/07/13 05:45:21 dlg Exp $ */ | |
| 1 | /*	$OpenBSD: xcall.h,v 1.2 2025/11/10 12:34:52 dlg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2025 David Gwynne <dlg@openbsd.org> |
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | * |
| 46 | 46 | * 4. cpu_xcall_ipi has to be provided by machine/intr.h. |
| 47 | 47 | * |
| 48 | * 5. The MD xcall IPI handler has to call cpu_xcall_dispatch. | |
| 48 | * 5. call cpu_xcall_dispatch at IPL_SOFTCLOCK on the target CPU. | |
| 49 | 49 | */ |
| 50 | 50 | |
| 51 | 51 | #ifndef _SYS_XCALL_H |
lib/libc/include/generic-openbsd/time.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: time.h,v 1.32 2022/10/25 16:30:30 millert Exp $	*/ | |
| 1 | /*	$OpenBSD: time.h,v 1.33 2025/11/20 10:58:11 tb Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -106,7 +106,7 @@ struct tm { |
| 106 | 106 | 	int	tm_yday;	/* days since January 1 [0-365] */ |
| 107 | 107 | 	int	tm_isdst;	/* Daylight Saving Time flag */ |
| 108 | 108 | 	long	tm_gmtoff;	/* offset from UTC in seconds */ |
| 109 | 	char	*tm_zone;	/* timezone abbreviation */ | |
| 109 | 	const char *tm_zone;	/* timezone abbreviation */ | |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | 112 | __BEGIN_DECLS |
lib/libc/include/generic-openbsd/unistd.h+2-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: unistd.h,v 1.112 2025/05/24 06:49:16 deraadt Exp $ */ | |
| 1 | /*	$OpenBSD: unistd.h,v 1.113 2025/10/07 12:02:21 brynet Exp $ */ | |
| 2 | 2 | /*	$NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -530,7 +530,7 @@ int	 setpgrp(pid_t _pid, pid_t _pgrp);	/* BSD compat version */ |
| 530 | 530 | int	 setthrname(pid_t, const char *); |
| 531 | 531 | void	 setusershell(void); |
| 532 | 532 | int	 strtofflags(char **, u_int32_t *, u_int32_t *); |
| 533 | int	 swapctl(int cmd, const void *arg, int misc); | |
| 533 | int	 swapctl(int, const void *, int); | |
| 534 | 534 | int	 pledge(const char *, const char *); |
| 535 | 535 | int	 unveil(const char *, const char *); |
| 536 | 536 | pid_t	 __tfork_thread(const struct __tfork *, size_t, void (*)(void *), |
lib/libc/include/generic-openbsd/uvm/uvm_anon.h+2-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_anon.h,v 1.23 2025/04/16 09:16:48 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_anon.h,v 1.24 2025/12/15 13:02:18 mpi Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: uvm_anon.h,v 1.13 2000/12/27 09:17:04 chs Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -88,7 +88,7 @@ struct vm_aref { |
| 88 | 88 | |
| 89 | 89 | #ifdef _KERNEL |
| 90 | 90 | struct vm_anon	*uvm_analloc(void); |
| 91 | void		 uvm_anfree_list(struct vm_anon *, struct pglist *); | |
| 91 | void		 uvm_anfree(struct vm_anon *); | |
| 92 | 92 | void		 uvm_anon_release(struct vm_anon *); |
| 93 | 93 | void		 uvm_anwait(void); |
| 94 | 94 | void		 uvm_anon_init(void); |
| ... | ... | @@ -96,7 +96,6 @@ void		 uvm_anon_init_percpu(void); |
| 96 | 96 | void		 uvm_anon_dropswap(struct vm_anon *); |
| 97 | 97 | boolean_t	 uvm_anon_pagein(struct vm_amap *, struct vm_anon *); |
| 98 | 98 | |
| 99 | #define		uvm_anfree(an)	uvm_anfree_list((an), NULL) | |
| 100 | 99 | |
| 101 | 100 | #endif /* _KERNEL */ |
| 102 | 101 |
lib/libc/include/generic-openbsd/uvm/uvm_extern.h+1-19| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_extern.h,v 1.184 2025/06/03 08:38:17 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_extern.h,v 1.187 2025/11/13 10:55:51 mpi Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -126,15 +126,6 @@ typedef int		vm_prot_t; |
| 126 | 126 | #define UVM_UNKNOWN_OFFSET ((voff_t) -1) |
| 127 | 127 | 				/* offset not known(obj) or don't care(!obj) */ |
| 128 | 128 | |
| 129 | /* | |
| 130 | * the following defines are for uvm_km_kmemalloc's flags | |
| 131 | */ | |
| 132 | #define UVM_KMF_NOWAIT	0x1			/* matches M_NOWAIT */ | |
| 133 | #define UVM_KMF_VALLOC	0x2			/* allocate VA only */ | |
| 134 | #define UVM_KMF_CANFAIL	0x4			/* caller handles failure */ | |
| 135 | #define UVM_KMF_ZERO	0x08			/* zero pages */ | |
| 136 | #define UVM_KMF_TRYLOCK	UVM_FLAG_TRYLOCK	/* try locking only */ | |
| 137 | ||
| 138 | 129 | /* |
| 139 | 130 | * flags for uvm_pagealloc() |
| 140 | 131 | */ |
| ... | ... | @@ -286,12 +277,6 @@ int			uvm_io(vm_map_t, struct uio *, int); |
| 286 | 277 | |
| 287 | 278 | #define	UVM_IO_FIXPROT	0x01 |
| 288 | 279 | |
| 289 | void			uvm_km_free(vm_map_t, vaddr_t, vsize_t); | |
| 290 | vaddr_t			uvm_km_kmemalloc_pla(struct vm_map *, | |
| 291 | 			 struct uvm_object *, vsize_t, vsize_t, int, | |
| 292 | 			 paddr_t, paddr_t, paddr_t, paddr_t, int); | |
| 293 | #define uvm_km_kmemalloc(map, obj, sz, flags)				\ | |
| 294 | 	uvm_km_kmemalloc_pla(map, obj, sz, 0, flags, 0, (paddr_t)-1, 0, 0, 0) | |
| 295 | 280 | struct vm_map		*uvm_km_suballoc(vm_map_t, vaddr_t *, vaddr_t *, |
| 296 | 281 | 			 vsize_t, int, boolean_t, vm_map_t); |
| 297 | 282 | /* |
| ... | ... | @@ -443,9 +428,6 @@ void			kmeminit_nkmempages(void); |
| 443 | 428 | void			kmeminit(void); |
| 444 | 429 | extern u_int		nkmempages; |
| 445 | 430 | |
| 446 | struct vnode; | |
| 447 | struct uvm_object	*uvn_attach(struct vnode *, vm_prot_t); | |
| 448 | ||
| 449 | 431 | struct process; |
| 450 | 432 | struct kinfo_vmentry; |
| 451 | 433 | int			fill_vmmap(struct process *, struct kinfo_vmentry *, |
lib/libc/include/generic-openbsd/uvm/uvm_pager.h+3-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_pager.h,v 1.33 2021/10/12 07:38:22 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_pager.h,v 1.34 2025/12/18 16:05:18 mpi Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: uvm_pager.h,v 1.20 2000/11/27 08:40:05 chs Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -110,7 +110,6 @@ struct uvm_pagerops { |
| 110 | 110 | #define PGO_DOACTCLUST	0x020	/* flag to mk_pcluster to include active */ |
| 111 | 111 | #define PGO_LOCKED	0x040	/* fault data structures are locked [get] */ |
| 112 | 112 | #define PGO_PDFREECLUST	0x080	/* daemon's free cluster flag [uvm_pager_put] */ |
| 113 | #define PGO_REALLOCSWAP	0x100	/* reallocate swap area [pager_dropcluster] */ | |
| 114 | 113 | #define PGO_NOWAIT	0x200	/* do not wait for inode lock */ |
| 115 | 114 | |
| 116 | 115 | /* page we are not interested in getting */ |
| ... | ... | @@ -120,8 +119,8 @@ struct uvm_pagerops { |
| 120 | 119 | * prototypes |
| 121 | 120 | */ |
| 122 | 121 | |
| 123 | void		uvm_pager_dropcluster(struct uvm_object *, struct vm_page *, | |
| 124 | 		 struct vm_page **, int *, int); | |
| 122 | void		uvm_pager_dropcluster(struct uvm_object *, struct vm_page **, | |
| 123 | 		 int *, int); | |
| 125 | 124 | void		uvm_pager_init(void); |
| 126 | 125 | int		uvm_pager_put(struct uvm_object *, struct vm_page *, |
| 127 | 126 | 		 struct vm_page ***, int *, int, voff_t, voff_t); |
lib/libc/include/generic-openbsd/uvm/uvm_pmemrange.h+1-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_pmemrange.h,v 1.19 2024/11/07 11:12:46 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_pmemrange.h,v 1.20 2026/01/28 21:09:41 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2009 Ariane van der Steldt <ariane@stack.nl> |
| ... | ... | @@ -100,7 +100,6 @@ extern struct uvm_pmalloc nowait_pma;			/* [F] */ |
| 100 | 100 | * uvm_pmalloc flags. |
| 101 | 101 | */ |
| 102 | 102 | #define UVM_PMA_LINKED	0x01	/* uvm_pmalloc is on list */ |
| 103 | #define UVM_PMA_BUSY	0x02	/* entry is busy with fpageq unlocked */ | |
| 104 | 103 | #define UVM_PMA_FAIL	0x10	/* page daemon cannot free pages */ |
| 105 | 104 | #define UVM_PMA_FREED	0x20	/* at least one page in the range was freed */ |
| 106 | 105 |
lib/libc/include/generic-openbsd/uvm/uvm_swap.h+4-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_swap.h,v 1.20 2023/10/27 19:18:53 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_swap.h,v 1.22 2026/04/11 01:36:23 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: uvm_swap.h,v 1.5 2000/01/11 06:57:51 chs Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -37,6 +37,7 @@ |
| 37 | 37 | |
| 38 | 38 | #ifdef _KERNEL |
| 39 | 39 | |
| 40 | int			uvm_swap_dropcluster(struct vm_page **, int, int); | |
| 40 | 41 | int			uvm_swap_get(struct vm_page *, int, int); |
| 41 | 42 | int			uvm_swap_put(int, struct vm_page **, int, int); |
| 42 | 43 | int			uvm_swap_alloc(int *, boolean_t); |
| ... | ... | @@ -53,6 +54,8 @@ void			uvm_swap_initcrypt_all(void); |
| 53 | 54 | void			uvm_swap_finicrypt_all(void); |
| 54 | 55 | #endif |
| 55 | 56 | |
| 57 | extern volatile int seb_free; | |
| 58 | ||
| 56 | 59 | #endif /* _KERNEL */ |
| 57 | 60 | |
| 58 | 61 | #endif /* _UVM_UVM_SWAP_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/uvm/uvm_vnode.h+3-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvm_vnode.h,v 1.22 2025/09/25 09:05:47 mpi Exp $	*/ | |
| 1 | /*	$OpenBSD: uvm_vnode.h,v 1.24 2025/11/10 15:53:06 mpi Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: uvm_vnode.h,v 1.9 2000/03/26 20:54:48 kleink Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -72,7 +72,6 @@ struct uvm_vnode { |
| 72 | 72 | */ |
| 73 | 73 | #define UVM_VNODE_VALID		0x001	/* we are attached to the vnode */ |
| 74 | 74 | #define UVM_VNODE_CANPERSIST	0x002	/* we can persist after ref == 0 */ |
| 75 | #define UVM_VNODE_ALOCK		0x004	/* uvn_attach is locked out */ | |
| 76 | 75 | #define UVM_VNODE_DYING		0x008	/* final detach/terminate in |
| 77 | 76 | 					 progress */ |
| 78 | 77 | #define UVM_VNODE_RELKILL	0x010	/* uvn should be killed by releasepg |
| ... | ... | @@ -92,9 +91,9 @@ struct uvm_vnode { |
| 92 | 91 | * UVM_VNODE_BLOCKED: any condition that should new processes from |
| 93 | 92 | * touching the vnode [set WANTED and sleep to wait for it to clear] |
| 94 | 93 | */ |
| 95 | #define UVM_VNODE_BLOCKED (UVM_VNODE_ALOCK|UVM_VNODE_DYING|UVM_VNODE_RELKILL) | |
| 94 | #define UVM_VNODE_BLOCKED (UVM_VNODE_DYING|UVM_VNODE_RELKILL) | |
| 96 | 95 | |
| 97 | void			uvm_vnp_obj_alloc(struct vnode *); | |
| 96 | struct uvm_object	*uvn_attach(struct vnode *, vm_prot_t); | |
| 98 | 97 | void			uvm_vnp_terminate(struct vnode *); |
| 99 | 98 | |
| 100 | 99 | #endif /* _UVM_UVM_VNODE_H_ */ |
| \ No newline at end of file |
lib/libc/include/generic-openbsd/uvm/uvmexp.h+41-35| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: uvmexp.h,v 1.19 2025/03/10 19:52:57 miod Exp $	*/ | |
| 1 | /*	$OpenBSD: uvmexp.h,v 1.27 2026/03/08 17:06:10 deraadt Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | #ifndef	_UVM_UVMEXP_ |
| 4 | 4 | #define	_UVM_UVMEXP_ |
| ... | ... | @@ -41,13 +41,14 @@ |
| 41 | 41 | * other than the vm system. |
| 42 | 42 | * |
| 43 | 43 | * Locks used to protect struct members in this file: |
| 44 | *	a	atomic operations | |
| 44 | *	a	atomic operations (signed int, so use atomic_load_sint) | |
| 45 | 45 | *	I	immutable after creation |
| 46 | 46 | *	K	kernel lock |
| 47 | 47 | *	F	uvm_lock_fpageq |
| 48 | 48 | *	L	uvm_lock_pageq |
| 49 | 49 | *	S	uvm_swap_data_lock |
| 50 | 50 | *	p	copy of per-CPU counters, used only by userland. |
| 51 | *	o	updated only by the page daemon | |
| 51 | 52 | */ |
| 52 | 53 | struct uvmexp { |
| 53 | 54 | 	/* vm_page constants */ |
| ... | ... | @@ -57,13 +58,13 @@ struct uvmexp { |
| 57 | 58 | |
| 58 | 59 | 	/* vm_page counters */ |
| 59 | 60 | 	int npages; /* [I] number of pages we manage */ |
| 60 | 	int free; /* [F] number of free pages */ | |
| 61 | 	int active; /* [L] # of active pages */ | |
| 62 | 	int inactive; /* [L] # of pages that we free'd but may want back */ | |
| 63 | 	int paging;	/* [a] # of pages in the process of being paged out */ | |
| 64 | 	int wired; /* [a] number of wired pages */ | |
| 61 | 	int free; /* [aF] number of free pages */ | |
| 62 | 	int active; /* [aL] # of active pages */ | |
| 63 | 	int inactive; /* [aL] # of pages that we free'd but may want back */ | |
| 64 | 	int paging;	/* [a] # number of pages in the process of being paged out */ | |
| 65 | 	int wired; /* [a] # number of wired pages */ | |
| 65 | 66 | |
| 66 | 	int zeropages;		/* [F] number of zero'd pages */ | |
| 67 | 	int zeropages;		/* [aF] number of zero'd pages */ | |
| 67 | 68 | 	int reserve_pagedaemon; /* [I] # of pages reserved for pagedaemon */ |
| 68 | 69 | 	int reserve_kernel;	/* [I] # of pages reserved for kernel */ |
| 69 | 70 | 	int percpucaches;	/* [a] # of pages in per-CPU caches */ |
| ... | ... | @@ -83,9 +84,9 @@ struct uvmexp { |
| 83 | 84 | 	int vnodeminpct;/* min percent vnode pages */ |
| 84 | 85 | |
| 85 | 86 | 	/* swap */ |
| 86 | 	int nswapdev;	/* [S] number of configured swap devices in system */ | |
| 87 | 	int swpages;	/* [S] number of PAGE_SIZE'ed swap pages */ | |
| 88 | 	int swpginuse;	/* [S] number of swap pages in use */ | |
| 87 | 	int nswapdev;	/* [aS] number of configured swap devices in system */ | |
| 88 | 	int swpages;	/* [aS] number of PAGE_SIZE'ed swap pages */ | |
| 89 | 	int swpginuse;	/* [aS] number of swap pages in use */ | |
| 89 | 90 | 	int swpgonly;	/* [a] number of swap pages in use, not also in RAM */ |
| 90 | 91 | 	int nswget;	/* [a] number of swap pages moved from disk to RAM */ |
| 91 | 92 | 	int nanon;	/* XXX number total of anon's in system */ |
| ... | ... | @@ -94,23 +95,23 @@ struct uvmexp { |
| 94 | 95 | |
| 95 | 96 | 	/* stat counters */ |
| 96 | 97 | 	int faults;		/* [p] page fault count */ |
| 97 | 	int traps;		/* trap count */ | |
| 98 | 	int intrs;		/* interrupt count */ | |
| 98 | 	int traps;		/* [a] trap count */ | |
| 99 | 	int intrs;		/* [a] interrupt count */ | |
| 99 | 100 | 	int swtch;		/* context switch count */ |
| 100 | 	int softs;		/* software interrupt count */ | |
| 101 | 	int syscalls;		/* system calls */ | |
| 101 | 	int softs;		/* [a] software interrupt count */ | |
| 102 | 	int syscalls;		/* [a] system calls */ | |
| 102 | 103 | 	int pageins;		/* [p] pagein operation count */ |
| 103 | 104 | 				/* pageouts are in pdpageouts below */ |
| 104 | 105 | 	int pcphit;		/* [a] # of pagealloc from per-CPU cache */ |
| 105 | 106 | 	int pcpmiss;		/* [a] # of times a per-CPU cache was empty */ |
| 106 | 107 | 	int pgswapin;		/* pages swapped in */ |
| 107 | 	int pgswapout;		/* pages swapped out */ | |
| 108 | 	int pgswapout;		/* [a] pages swapped out */ | |
| 108 | 109 | 	int forks; 		/* forks */ |
| 109 | 110 | 	int forks_ppwait;	/* forks where parent waits */ |
| 110 | 111 | 	int forks_sharevm;	/* forks where vmspace is shared */ |
| 111 | 	int pga_zerohit;	/* pagealloc where zero wanted and zero | |
| 112 | 	int pga_zerohit;	/* [a] pagealloc where zero wanted and zero | |
| 112 | 113 | 				 was available */ |
| 113 | 	int pga_zeromiss;	/* pagealloc where zero wanted and zero | |
| 114 | 	int pga_zeromiss;	/* [a] pagealloc where zero wanted and zero | |
| 114 | 115 | 				 not available */ |
| 115 | 116 | 	int unused09;		/* formerly zeroaborts */ |
| 116 | 117 | |
| ... | ... | @@ -138,23 +139,22 @@ struct uvmexp { |
| 138 | 139 | 	int fltnoup;	/* [p] # of times fault upgrade failed */ |
| 139 | 140 | |
| 140 | 141 | 	/* daemon counters */ |
| 141 | 	int pdwoke;	/* [F] # of times daemon woke up */ | |
| 142 | 	int pdrevs;	/* number of times daemon scanned for free pages */ | |
| 143 | 	int pdswout;	/* number of times daemon called for swapout */ | |
| 144 | 	int pdfreed;	/* number of pages daemon freed since boot */ | |
| 145 | 	int pdscans;	/* number of pages daemon scanned since boot */ | |
| 146 | 	int pdanscan;	/* number of anonymous pages scanned by daemon */ | |
| 147 | 	int pdobscan;	/* number of object pages scanned by daemon */ | |
| 148 | 	int pdreact;	/* number of pages daemon reactivated since boot */ | |
| 149 | 	int pdbusy;	/* number of times daemon found a busy page */ | |
| 150 | 	int pdpageouts;	/* number of times daemon started a pageout */ | |
| 151 | 	int pdpending;	/* number of times daemon got a pending pagout */ | |
| 152 | 	int pddeact;	/* number of pages daemon deactivates */ | |
| 153 | ||
| 154 | 	int unused13;	/* formerly pdrevtext */ | |
| 155 | ||
| 156 | 	int fpswtch;	/* FPU context switches */ | |
| 157 | 	int kmapent;	/* number of kernel map entries */ | |
| 142 | 	int pdwoke;	/* [ao] # of times daemon woke up */ | |
| 143 | 	int pdrevs;	/* [ao] # of times daemon scanned for free pages */ | |
| 144 | 	int pdswout;	/* [o] # of times daemon called for swapout */ | |
| 145 | 	int pdfreed;	/* [ao] # of pages daemon freed since boot */ | |
| 146 | 	int pdscans;	/* [ao] # of pages daemon scanned since boot */ | |
| 147 | 	int pdanscan;	/* [ao] # of anonymous pages scanned by daemon */ | |
| 148 | 	int pdobscan;	/* [ao] # of object pages scanned by daemon */ | |
| 149 | 	int pdreact;	/* [ao] # of pages daemon reactivated since boot */ | |
| 150 | 	int pdbusy;	/* [ao] # of times daemon found a busy page */ | |
| 151 | 	int pdpageouts;	/* [ao] # of times daemon started a pageout */ | |
| 152 | 	int pdpending;	/* [ao] # of times daemon got a pending pagout */ | |
| 153 | 	int pddeact;	/* [ao] # of pages daemon deactivates */ | |
| 154 | 	int swpskip;	/* [ao] # of pages delayed because swap crypt busy */ | |
| 155 | ||
| 156 | 	int fpswtch;	/* [a] FPU context switches */ | |
| 157 | 	int kmapent;	/* [a] number of kernel map entries */ | |
| 158 | 158 | }; |
| 159 | 159 | |
| 160 | 160 | struct _ps_strings { |
| ... | ... | @@ -163,6 +163,12 @@ struct _ps_strings { |
| 163 | 163 | |
| 164 | 164 | #ifdef _KERNEL |
| 165 | 165 | |
| 166 | static inline int | |
| 167 | atomic_load_sint(volatile const int *p) | |
| 168 | { | |
| 169 | return *p; | |
| 170 | } | |
| 171 | ||
| 166 | 172 | /* |
| 167 | 173 | * Per-cpu UVM counters. |
| 168 | 174 | */ |
lib/libc/include/mips64-openbsd-none/machine/octeonvar.h+1-27| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: octeonvar.h,v 1.54 2022/08/29 02:01:18 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: octeonvar.h,v 1.55 2025/12/30 22:55:07 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: maltavar.h,v 1.3 2002/03/18 10:10:16 simonb Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -335,32 +335,6 @@ int	octeon_ioclock_speed(void); |
| 335 | 335 | #endif /* _KERNEL */ |
| 336 | 336 | #endif /* _KERNEL || _STANDALONE */ |
| 337 | 337 | |
| 338 | static inline int | |
| 339 | ffs64(uint64_t val) | |
| 340 | { | |
| 341 | 	int ret; | |
| 342 | ||
| 343 | 	__asm volatile ( \ | |
| 344 | 		_ASM_PROLOGUE_MIPS64 | |
| 345 | 		"	dclz	%0, %1			\n" | |
| 346 | 		_ASM_EPILOGUE | |
| 347 | 		: "=r"(ret) : "r"(val)); | |
| 348 | 	return 64 - ret; | |
| 349 | } | |
| 350 | ||
| 351 | static inline int | |
| 352 | ffs32(uint32_t val) | |
| 353 | { | |
| 354 | 	int ret; | |
| 355 | ||
| 356 | 	__asm volatile ( \ | |
| 357 | 		_ASM_PROLOGUE_MIPS64 | |
| 358 | 		"	clz	%0, %1			\n" | |
| 359 | 		_ASM_EPILOGUE | |
| 360 | 		: "=r"(ret) : "r"(val)); | |
| 361 | 	return 32 - ret; | |
| 362 | } | |
| 363 | ||
| 364 | 338 | static inline uint64_t |
| 365 | 339 | octeon_xkphys_read_8(paddr_t address) |
| 366 | 340 | { |
lib/libc/include/mips64-openbsd-none/octeon/octeonvar.h+1-27| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: octeonvar.h,v 1.54 2022/08/29 02:01:18 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: octeonvar.h,v 1.55 2025/12/30 22:55:07 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: maltavar.h,v 1.3 2002/03/18 10:10:16 simonb Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -335,32 +335,6 @@ int	octeon_ioclock_speed(void); |
| 335 | 335 | #endif /* _KERNEL */ |
| 336 | 336 | #endif /* _KERNEL || _STANDALONE */ |
| 337 | 337 | |
| 338 | static inline int | |
| 339 | ffs64(uint64_t val) | |
| 340 | { | |
| 341 | 	int ret; | |
| 342 | ||
| 343 | 	__asm volatile ( \ | |
| 344 | 		_ASM_PROLOGUE_MIPS64 | |
| 345 | 		"	dclz	%0, %1			\n" | |
| 346 | 		_ASM_EPILOGUE | |
| 347 | 		: "=r"(ret) : "r"(val)); | |
| 348 | 	return 64 - ret; | |
| 349 | } | |
| 350 | ||
| 351 | static inline int | |
| 352 | ffs32(uint32_t val) | |
| 353 | { | |
| 354 | 	int ret; | |
| 355 | ||
| 356 | 	__asm volatile ( \ | |
| 357 | 		_ASM_PROLOGUE_MIPS64 | |
| 358 | 		"	clz	%0, %1			\n" | |
| 359 | 		_ASM_EPILOGUE | |
| 360 | 		: "=r"(ret) : "r"(val)); | |
| 361 | 	return 32 - ret; | |
| 362 | } | |
| 363 | ||
| 364 | 338 | static inline uint64_t |
| 365 | 339 | octeon_xkphys_read_8(paddr_t address) |
| 366 | 340 | { |
lib/libc/include/mips64el-openbsd-none/loongson/apmvar.h+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: apmvar.h,v 1.6 2019/01/22 02:36:30 phessler Exp $	*/ | |
| 1 | /*	$OpenBSD: apmvar.h,v 1.8 2026/04/09 05:03:42 miod Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001 Alexander Guy |
lib/libc/include/mips64el-openbsd-none/loongson/hibernate.h deleted-33| ... | ... | @@ -1,33 +0,0 @@ |
| 1 | /*	$OpenBSD: hibernate.h,v 1.3 2018/06/21 07:33:30 mlarkin Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2013 Paul Irofti. | |
| 5 | * | |
| 6 | * Permission to use, copy, modify, and distribute this software for any | |
| 7 | * purpose with or without fee is hereby granted, provided that the above | |
| 8 | * copyright notice and this permission notice appear in all copies. | |
| 9 | * | |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 17 | */ | |
| 18 | ||
| 19 | ||
| 20 | #include <machine/hibernate_var.h> | |
| 21 | ||
| 22 | /* Loongson hibernate support structures and functions */ | |
| 23 | ||
| 24 | int	get_hibernate_info_md(union hibernate_info *); | |
| 25 | void	hibernate_flush(void); | |
| 26 | void	hibernate_enter_resume_mapping(vaddr_t, paddr_t, int); | |
| 27 | int	hibernate_inflate_skip(union hibernate_info *, paddr_t); | |
| 28 | int	hibernate_suspend(void); | |
| 29 | void	hibernate_switch_stack_machdep(void); | |
| 30 | void	hibernate_resume_machdep(vaddr_t); | |
| 31 | void	hibernate_activate_resume_pt_machdep(void); | |
| 32 | void	hibernate_enable_intr_machdep(void); | |
| 33 | void	hibernate_disable_intr_machdep(void); | |
| \ No newline at end of file |
lib/libc/include/mips64el-openbsd-none/loongson/hibernate_var.h deleted-39| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | /*	$OpenBSD: hibernate_var.h,v 1.1 2013/06/02 21:46:04 pirofti Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2013 Paul Irofti. | |
| 5 | * | |
| 6 | * Permission to use, copy, modify, and distribute this software for any | |
| 7 | * purpose with or without fee is hereby granted, provided that the above | |
| 8 | * copyright notice and this permission notice appear in all copies. | |
| 9 | * | |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 17 | */ | |
| 18 | ||
| 19 | /* Loongson hibernate support definitions */ | |
| 20 | ||
| 21 | #define PAGE_MASK_4M ((256 * PAGE_SIZE) - 1) | |
| 22 | ||
| 23 | #define PIGLET_PAGE_MASK ~((paddr_t)PAGE_MASK_4M) | |
| 24 | ||
| 25 | /* | |
| 26 | * Steal hibernate pages right after the first page which is reserved | |
| 27 | * for the exception area. | |
| 28 | * */ | |
| 29 | #define HIBERNATE_STACK_PAGE	(PAGE_SIZE * 1) | |
| 30 | #define HIBERNATE_INFLATE_PAGE	(PAGE_SIZE * 2) | |
| 31 | #define HIBERNATE_COPY_PAGE	(PAGE_SIZE * 3) | |
| 32 | #define HIBERNATE_HIBALLOC_PAGE	(PAGE_SIZE * 4) | |
| 33 | ||
| 34 | #define HIBERNATE_RESERVED_PAGES	4 | |
| 35 | ||
| 36 | /* Use 4MB hibernation chunks */ | |
| 37 | #define HIBERNATE_CHUNK_SIZE		0x400000 | |
| 38 | ||
| 39 | #define HIBERNATE_CHUNK_TABLE_SIZE	0x100000 | |
| \ No newline at end of file |
lib/libc/include/mips64el-openbsd-none/loongson/param.h+1-5| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: param.h,v 1.3 2013/03/23 16:12:23 deraadt Exp $ */ | |
| 1 | /*	$OpenBSD: param.h,v 1.4 2025/12/03 11:59:18 miod Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* Public Domain */ |
| 4 | 4 | |
| ... | ... | @@ -13,8 +13,6 @@ |
| 13 | 13 | #define	_MACHINE_CPU	mips64 |
| 14 | 14 | #define	MID_MACHINE	MID_MIPS64 |
| 15 | 15 | |
| 16 | #ifdef _KERNEL | |
| 17 | ||
| 18 | 16 | /* |
| 19 | 17 | * The Loongson level 1 cache expects software to prevent virtual |
| 20 | 18 | * aliases. Unfortunately, since this cache is physically tagged, |
| ... | ... | @@ -24,8 +22,6 @@ |
| 24 | 22 | */ |
| 25 | 23 | #define	PAGE_SHIFT	14 |
| 26 | 24 | |
| 27 | #endif /* _KERNEL */ | |
| 28 | ||
| 29 | 25 | #include <mips64/param.h> |
| 30 | 26 | |
| 31 | 27 | #endif /* _MACHINE_PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/mips64el-openbsd-none/machine/apmvar.h+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: apmvar.h,v 1.6 2019/01/22 02:36:30 phessler Exp $	*/ | |
| 1 | /*	$OpenBSD: apmvar.h,v 1.8 2026/04/09 05:03:42 miod Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2001 Alexander Guy |
lib/libc/include/mips64el-openbsd-none/machine/hibernate.h deleted-33| ... | ... | @@ -1,33 +0,0 @@ |
| 1 | /*	$OpenBSD: hibernate.h,v 1.3 2018/06/21 07:33:30 mlarkin Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2013 Paul Irofti. | |
| 5 | * | |
| 6 | * Permission to use, copy, modify, and distribute this software for any | |
| 7 | * purpose with or without fee is hereby granted, provided that the above | |
| 8 | * copyright notice and this permission notice appear in all copies. | |
| 9 | * | |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 17 | */ | |
| 18 | ||
| 19 | ||
| 20 | #include <machine/hibernate_var.h> | |
| 21 | ||
| 22 | /* Loongson hibernate support structures and functions */ | |
| 23 | ||
| 24 | int	get_hibernate_info_md(union hibernate_info *); | |
| 25 | void	hibernate_flush(void); | |
| 26 | void	hibernate_enter_resume_mapping(vaddr_t, paddr_t, int); | |
| 27 | int	hibernate_inflate_skip(union hibernate_info *, paddr_t); | |
| 28 | int	hibernate_suspend(void); | |
| 29 | void	hibernate_switch_stack_machdep(void); | |
| 30 | void	hibernate_resume_machdep(vaddr_t); | |
| 31 | void	hibernate_activate_resume_pt_machdep(void); | |
| 32 | void	hibernate_enable_intr_machdep(void); | |
| 33 | void	hibernate_disable_intr_machdep(void); | |
| \ No newline at end of file |
lib/libc/include/mips64el-openbsd-none/machine/hibernate_var.h deleted-39| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | /*	$OpenBSD: hibernate_var.h,v 1.1 2013/06/02 21:46:04 pirofti Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2013 Paul Irofti. | |
| 5 | * | |
| 6 | * Permission to use, copy, modify, and distribute this software for any | |
| 7 | * purpose with or without fee is hereby granted, provided that the above | |
| 8 | * copyright notice and this permission notice appear in all copies. | |
| 9 | * | |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 17 | */ | |
| 18 | ||
| 19 | /* Loongson hibernate support definitions */ | |
| 20 | ||
| 21 | #define PAGE_MASK_4M ((256 * PAGE_SIZE) - 1) | |
| 22 | ||
| 23 | #define PIGLET_PAGE_MASK ~((paddr_t)PAGE_MASK_4M) | |
| 24 | ||
| 25 | /* | |
| 26 | * Steal hibernate pages right after the first page which is reserved | |
| 27 | * for the exception area. | |
| 28 | * */ | |
| 29 | #define HIBERNATE_STACK_PAGE	(PAGE_SIZE * 1) | |
| 30 | #define HIBERNATE_INFLATE_PAGE	(PAGE_SIZE * 2) | |
| 31 | #define HIBERNATE_COPY_PAGE	(PAGE_SIZE * 3) | |
| 32 | #define HIBERNATE_HIBALLOC_PAGE	(PAGE_SIZE * 4) | |
| 33 | ||
| 34 | #define HIBERNATE_RESERVED_PAGES	4 | |
| 35 | ||
| 36 | /* Use 4MB hibernation chunks */ | |
| 37 | #define HIBERNATE_CHUNK_SIZE		0x400000 | |
| 38 | ||
| 39 | #define HIBERNATE_CHUNK_TABLE_SIZE	0x100000 | |
| \ No newline at end of file |
lib/libc/include/mips64el-openbsd-none/machine/param.h+1-5| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: param.h,v 1.3 2013/03/23 16:12:23 deraadt Exp $ */ | |
| 1 | /*	$OpenBSD: param.h,v 1.4 2025/12/03 11:59:18 miod Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* Public Domain */ |
| 4 | 4 | |
| ... | ... | @@ -13,8 +13,6 @@ |
| 13 | 13 | #define	_MACHINE_CPU	mips64 |
| 14 | 14 | #define	MID_MACHINE	MID_MIPS64 |
| 15 | 15 | |
| 16 | #ifdef _KERNEL | |
| 17 | ||
| 18 | 16 | /* |
| 19 | 17 | * The Loongson level 1 cache expects software to prevent virtual |
| 20 | 18 | * aliases. Unfortunately, since this cache is physically tagged, |
| ... | ... | @@ -24,8 +22,6 @@ |
| 24 | 22 | */ |
| 25 | 23 | #define	PAGE_SHIFT	14 |
| 26 | 24 | |
| 27 | #endif /* _KERNEL */ | |
| 28 | ||
| 29 | 25 | #include <mips64/param.h> |
| 30 | 26 | |
| 31 | 27 | #endif /* _MACHINE_PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/powerpc-openbsd-eabihf/powerpc/intr.h+1-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intr.h,v 1.57 2025/05/10 09:54:17 visa Exp $ */ | |
| 1 | /*	$OpenBSD: intr.h,v 1.58 2026/01/04 23:51:12 jsg Exp $ */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. |
| ... | ... | @@ -64,7 +64,6 @@ |
| 64 | 64 | #if defined(_KERNEL) && !defined(_LOCORE) |
| 65 | 65 | |
| 66 | 66 | #include <sys/evcount.h> |
| 67 | #include <machine/atomic.h> | |
| 68 | 67 | |
| 69 | 68 | #define	PPC_NIRQ	66 |
| 70 | 69 | #define	PPC_CLK_IRQ	64 |
| ... | ... | @@ -111,8 +110,6 @@ void splassert_check(int, const char *); |
| 111 | 110 | #define splsoftassert(wantipl)	do { /* nada */ } while (0) |
| 112 | 111 | #endif |
| 113 | 112 | |
| 114 | #define	set_sint(p)	atomic_setbits_int(&curcpu()->ci_ipending, p) | |
| 115 | ||
| 116 | 113 | #define	splbio()	splraise(IPL_BIO) |
| 117 | 114 | #define	splnet()	splraise(IPL_NET) |
| 118 | 115 | #define	spltty()	splraise(IPL_TTY) |
lib/libc/include/powerpc64-openbsd-none/machine/atomic.h+3-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: atomic.h,v 1.3 2022/08/29 02:01:18 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: atomic.h,v 1.4 2025/11/18 05:24:38 gkoehler Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2015 Martin Pieuchot |
| ... | ... | @@ -276,10 +276,10 @@ _atomic_addic_long_nv(volatile unsigned long *p, unsigned long v) |
| 276 | 276 | #define __membar(_f) do { __asm volatile(_f ::: "memory"); } while (0) |
| 277 | 277 | |
| 278 | 278 | #if defined(MULTIPROCESSOR) || !defined(_KERNEL) |
| 279 | #define membar_enter()		__membar("isync") | |
| 279 | #define membar_enter()		__membar("sync") | |
| 280 | 280 | #define membar_exit()		__membar("sync") |
| 281 | 281 | #define membar_producer()	__membar("sync") |
| 282 | #define membar_consumer()	__membar("isync") | |
| 282 | #define membar_consumer()	__membar("sync") | |
| 283 | 283 | #define membar_sync()		__membar("sync") |
| 284 | 284 | #else |
| 285 | 285 | #define membar_enter()		__membar("") |
lib/libc/include/powerpc64-openbsd-none/powerpc64/atomic.h+3-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: atomic.h,v 1.3 2022/08/29 02:01:18 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: atomic.h,v 1.4 2025/11/18 05:24:38 gkoehler Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2015 Martin Pieuchot |
| ... | ... | @@ -276,10 +276,10 @@ _atomic_addic_long_nv(volatile unsigned long *p, unsigned long v) |
| 276 | 276 | #define __membar(_f) do { __asm volatile(_f ::: "memory"); } while (0) |
| 277 | 277 | |
| 278 | 278 | #if defined(MULTIPROCESSOR) || !defined(_KERNEL) |
| 279 | #define membar_enter()		__membar("isync") | |
| 279 | #define membar_enter()		__membar("sync") | |
| 280 | 280 | #define membar_exit()		__membar("sync") |
| 281 | 281 | #define membar_producer()	__membar("sync") |
| 282 | #define membar_consumer()	__membar("isync") | |
| 282 | #define membar_consumer()	__membar("sync") | |
| 283 | 283 | #define membar_sync()		__membar("sync") |
| 284 | 284 | #else |
| 285 | 285 | #define membar_enter()		__membar("") |
lib/libc/include/riscv64-openbsd-none/machine/cpu.h+4-8| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpu.h,v 1.24 2024/06/11 16:02:35 jca Exp $	*/ | |
| 1 | /*	$OpenBSD: cpu.h,v 1.25 2026/04/06 08:10:54 jca Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019 Mike Larkin <mlarkin@openbsd.org> |
| ... | ... | @@ -141,13 +141,9 @@ struct cpu_info { |
| 141 | 141 | #define CPUF_GO			(1<<5) |
| 142 | 142 | #define CPUF_RUNNING		(1<<6) |
| 143 | 143 | |
| 144 | static inline struct cpu_info * | |
| 145 | curcpu(void) | |
| 146 | { | |
| 147 | 	struct cpu_info *__ci = NULL; | |
| 148 | 	__asm volatile("mv %0, tp" : "=&r"(__ci)); | |
| 149 | 	return (__ci); | |
| 150 | } | |
| 144 | register struct cpu_info *__curcpu asm ("tp"); | |
| 145 | ||
| 146 | #define	curcpu()		(__curcpu) | |
| 151 | 147 | |
| 152 | 148 | extern uint32_t boot_hart;	/* The hart we booted on. */ |
| 153 | 149 | extern struct cpu_info cpu_info_primary; |
lib/libc/include/riscv64-openbsd-none/machine/cpufunc.h+4-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.6 2023/08/21 20:17:30 miod Exp $	*/ | |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.7 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /*- |
| 4 | 4 | * Copyright (c) 2014 Andrew Turner |
| ... | ... | @@ -89,9 +89,9 @@ sfence_vma_page_asid(uintptr_t addr, uint64_t asid) |
| 89 | 89 | extern int64_t dcache_line_size; |
| 90 | 90 | extern int64_t icache_line_size; |
| 91 | 91 | |
| 92 | extern void (*cpu_dcache_wbinv_range)(paddr_t, psize_t); | |
| 93 | extern void (*cpu_dcache_inv_range)(paddr_t, psize_t); | |
| 94 | extern void (*cpu_dcache_wb_range)(paddr_t, psize_t); | |
| 92 | extern void (*cpu_dcache_wbinv_range)(vaddr_t, vsize_t); | |
| 93 | extern void (*cpu_dcache_inv_range)(vaddr_t, vsize_t); | |
| 94 | extern void (*cpu_dcache_wb_range)(vaddr_t, vsize_t); | |
| 95 | 95 | |
| 96 | 96 | static __inline void |
| 97 | 97 | load_satp(uint64_t val) |
lib/libc/include/riscv64-openbsd-none/machine/pmap.h+5-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pmap.h,v 1.14 2025/02/03 17:59:40 jca Exp $	*/ | |
| 1 | /*	$OpenBSD: pmap.h,v 1.15 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com> |
| ... | ... | @@ -75,6 +75,10 @@ struct pmap { |
| 75 | 75 | #define PMAP_NOCACHE	0x1 /* non-cacheable memory */ |
| 76 | 76 | #define PMAP_DEVICE	0x2 /* device memory */ |
| 77 | 77 | |
| 78 | extern uint64_t pmap_pma; | |
| 79 | extern uint64_t pmap_nc; | |
| 80 | extern uint64_t pmap_io; | |
| 81 | ||
| 78 | 82 | #define PG_PMAP_MOD		PG_PMAP0 |
| 79 | 83 | #define PG_PMAP_REF		PG_PMAP1 |
| 80 | 84 | #define PG_PMAP_EXE		PG_PMAP2 |
lib/libc/include/riscv64-openbsd-none/machine/pte.h+9-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pte.h,v 1.4 2024/10/14 12:02:16 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: pte.h,v 1.5 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019 Brian Bamsch <bbamsch@google.com> |
| ... | ... | @@ -38,6 +38,14 @@ |
| 38 | 38 | #define	PTE_RX		(PTE_R | PTE_X) |
| 39 | 39 | #define	PTE_KERN	(PTE_V | PTE_R | PTE_W | PTE_A | PTE_D) |
| 40 | 40 | |
| 41 | /* Svpmbt extension */ | |
| 42 | #define	PTE_PMA		(0ULL << 61) | |
| 43 | #define	PTE_NC		(1ULL << 61) | |
| 44 | #define	PTE_IO		(2ULL << 61) | |
| 45 | ||
| 46 | /* Svnapot extension */ | |
| 47 | #define	PTE_N		(1ULL << 63) | |
| 48 | ||
| 41 | 49 | /* T-Head extended page attributes */ |
| 42 | 50 | #define	PTE_THEAD_SO	(1ULL << 63) |
| 43 | 51 | #define	PTE_THEAD_C	(1ULL << 62) |
lib/libc/include/riscv64-openbsd-none/riscv64/cpu.h+4-8| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpu.h,v 1.24 2024/06/11 16:02:35 jca Exp $	*/ | |
| 1 | /*	$OpenBSD: cpu.h,v 1.25 2026/04/06 08:10:54 jca Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019 Mike Larkin <mlarkin@openbsd.org> |
| ... | ... | @@ -141,13 +141,9 @@ struct cpu_info { |
| 141 | 141 | #define CPUF_GO			(1<<5) |
| 142 | 142 | #define CPUF_RUNNING		(1<<6) |
| 143 | 143 | |
| 144 | static inline struct cpu_info * | |
| 145 | curcpu(void) | |
| 146 | { | |
| 147 | 	struct cpu_info *__ci = NULL; | |
| 148 | 	__asm volatile("mv %0, tp" : "=&r"(__ci)); | |
| 149 | 	return (__ci); | |
| 150 | } | |
| 144 | register struct cpu_info *__curcpu asm ("tp"); | |
| 145 | ||
| 146 | #define	curcpu()		(__curcpu) | |
| 151 | 147 | |
| 152 | 148 | extern uint32_t boot_hart;	/* The hart we booted on. */ |
| 153 | 149 | extern struct cpu_info cpu_info_primary; |
lib/libc/include/riscv64-openbsd-none/riscv64/cpufunc.h+4-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.6 2023/08/21 20:17:30 miod Exp $	*/ | |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.7 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /*- |
| 4 | 4 | * Copyright (c) 2014 Andrew Turner |
| ... | ... | @@ -89,9 +89,9 @@ sfence_vma_page_asid(uintptr_t addr, uint64_t asid) |
| 89 | 89 | extern int64_t dcache_line_size; |
| 90 | 90 | extern int64_t icache_line_size; |
| 91 | 91 | |
| 92 | extern void (*cpu_dcache_wbinv_range)(paddr_t, psize_t); | |
| 93 | extern void (*cpu_dcache_inv_range)(paddr_t, psize_t); | |
| 94 | extern void (*cpu_dcache_wb_range)(paddr_t, psize_t); | |
| 92 | extern void (*cpu_dcache_wbinv_range)(vaddr_t, vsize_t); | |
| 93 | extern void (*cpu_dcache_inv_range)(vaddr_t, vsize_t); | |
| 94 | extern void (*cpu_dcache_wb_range)(vaddr_t, vsize_t); | |
| 95 | 95 | |
| 96 | 96 | static __inline void |
| 97 | 97 | load_satp(uint64_t val) |
lib/libc/include/riscv64-openbsd-none/riscv64/pmap.h+5-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pmap.h,v 1.14 2025/02/03 17:59:40 jca Exp $	*/ | |
| 1 | /*	$OpenBSD: pmap.h,v 1.15 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com> |
| ... | ... | @@ -75,6 +75,10 @@ struct pmap { |
| 75 | 75 | #define PMAP_NOCACHE	0x1 /* non-cacheable memory */ |
| 76 | 76 | #define PMAP_DEVICE	0x2 /* device memory */ |
| 77 | 77 | |
| 78 | extern uint64_t pmap_pma; | |
| 79 | extern uint64_t pmap_nc; | |
| 80 | extern uint64_t pmap_io; | |
| 81 | ||
| 78 | 82 | #define PG_PMAP_MOD		PG_PMAP0 |
| 79 | 83 | #define PG_PMAP_REF		PG_PMAP1 |
| 80 | 84 | #define PG_PMAP_EXE		PG_PMAP2 |
lib/libc/include/riscv64-openbsd-none/riscv64/pte.h+9-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: pte.h,v 1.4 2024/10/14 12:02:16 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: pte.h,v 1.5 2026/04/05 11:48:17 kettenis Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2019 Brian Bamsch <bbamsch@google.com> |
| ... | ... | @@ -38,6 +38,14 @@ |
| 38 | 38 | #define	PTE_RX		(PTE_R | PTE_X) |
| 39 | 39 | #define	PTE_KERN	(PTE_V | PTE_R | PTE_W | PTE_A | PTE_D) |
| 40 | 40 | |
| 41 | /* Svpmbt extension */ | |
| 42 | #define	PTE_PMA		(0ULL << 61) | |
| 43 | #define	PTE_NC		(1ULL << 61) | |
| 44 | #define	PTE_IO		(2ULL << 61) | |
| 45 | ||
| 46 | /* Svnapot extension */ | |
| 47 | #define	PTE_N		(1ULL << 63) | |
| 48 | ||
| 41 | 49 | /* T-Head extended page attributes */ |
| 42 | 50 | #define	PTE_THEAD_SO	(1ULL << 63) |
| 43 | 51 | #define	PTE_THEAD_C	(1ULL << 62) |
lib/libc/include/x86-openbsd-none/i386/specialreg.h+3-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: specialreg.h,v 1.85 2023/08/16 04:07:38 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: specialreg.h,v 1.86 2026/04/19 01:10:28 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -528,6 +528,8 @@ |
| 528 | 528 | #define MSR_PATCH_LOADER 0xc0010020 |
| 529 | 529 | #define MSR_INT_PEN_MSG	0xc0010055		/* Interrupt pending message */ |
| 530 | 530 | |
| 531 | #define MSR_FP_CFG	0xc0011028	/* Floating Point Configuration */ | |
| 532 | #define FP_CFG_9	(1 << 9)	/* FP-DSS chickenbit */ | |
| 531 | 533 | #define MSR_DE_CFG	0xc0011029		/* Decode Configuration */ |
| 532 | 534 | #define	DE_CFG_721	0x00000001	/* errata 721 */ |
| 533 | 535 | #define	DE_CFG_SERIALIZE_LFENCE	(1 << 1)	/* Enable serializing lfence */ |
lib/libc/include/x86-openbsd-none/machine/specialreg.h+3-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: specialreg.h,v 1.85 2023/08/16 04:07:38 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: specialreg.h,v 1.86 2026/04/19 01:10:28 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -528,6 +528,8 @@ |
| 528 | 528 | #define MSR_PATCH_LOADER 0xc0010020 |
| 529 | 529 | #define MSR_INT_PEN_MSG	0xc0010055		/* Interrupt pending message */ |
| 530 | 530 | |
| 531 | #define MSR_FP_CFG	0xc0011028	/* Floating Point Configuration */ | |
| 532 | #define FP_CFG_9	(1 << 9)	/* FP-DSS chickenbit */ | |
| 531 | 533 | #define MSR_DE_CFG	0xc0011029		/* Decode Configuration */ |
| 532 | 534 | #define	DE_CFG_721	0x00000001	/* errata 721 */ |
| 533 | 535 | #define	DE_CFG_SERIALIZE_LFENCE	(1 << 1)	/* Enable serializing lfence */ |
lib/libc/include/x86_64-openbsd-none/amd64/conf.h+11-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: conf.h,v 1.11 2024/09/04 07:45:08 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: conf.h,v 1.12 2025/11/12 11:34:36 hshoexer Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -56,4 +56,13 @@ cdev_decl(pctr); |
| 56 | 56 | cdev_decl(vmm); |
| 57 | 57 | |
| 58 | 58 | #include "psp.h" |
| 59 | cdev_decl(psp); | |
| \ No newline at end of file | ||
| 59 | cdev_decl(psp); | |
| 60 | ||
| 61 | #include "kexec.h" | |
| 62 | #define cdev_kexec_init(c,n) { \ | |
| 63 | 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ | |
| 64 | 	(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ | |
| 65 | 	(dev_type_stop((*))) nullop, 0, \ | |
| 66 | 	(dev_type_mmap((*))) enodev } | |
| 67 | ||
| 68 | cdev_decl(kexec); | |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/amd64/cpu.h+14-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpu.h,v 1.180 2025/04/28 16:18:25 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: cpu.h,v 1.185 2026/03/31 16:46:22 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -53,6 +53,7 @@ |
| 53 | 53 | #include <sys/sched.h> |
| 54 | 54 | #include <sys/sensors.h> |
| 55 | 55 | #include <sys/srp.h> |
| 56 | #include <sys/xcall.h> | |
| 56 | 57 | #include <uvm/uvm_percpu.h> |
| 57 | 58 | |
| 58 | 59 | #ifdef _KERNEL |
| ... | ... | @@ -187,6 +188,7 @@ struct cpu_info { |
| 187 | 188 | 	int		ci_inatomic;		/* [o] */ |
| 188 | 189 | |
| 189 | 190 | #define __HAVE_CPU_TOPOLOGY |
| 191 | 	u_int32_t	ci_cputype;		/* [I] */ | |
| 190 | 192 | 	u_int32_t	ci_smt_id;		/* [I] */ |
| 191 | 193 | 	u_int32_t	ci_core_id;		/* [I] */ |
| 192 | 194 | 	u_int32_t	ci_pkg_id;		/* [I] */ |
| ... | ... | @@ -215,6 +217,7 @@ struct cpu_info { |
| 215 | 217 | |
| 216 | 218 | #ifdef MULTIPROCESSOR |
| 217 | 219 | 	struct srp_hazard	ci_srp_hazards[SRP_HAZARD_NUM]; |
| 220 | 	struct xcall_cpu	ci_xcall; | |
| 218 | 221 | #define __HAVE_UVM_PERCPU |
| 219 | 222 | 	struct uvm_pmr_cache	ci_uvm;		/* [o] page cache */ |
| 220 | 223 | #endif |
| ... | ... | @@ -289,7 +292,7 @@ extern void need_resched(struct cpu_info *); |
| 289 | 292 | |
| 290 | 293 | #if defined(MULTIPROCESSOR) |
| 291 | 294 | |
| 292 | #define MAXCPUS		64	/* bitmask */ | |
| 295 | #define MAXCPUS		255 | |
| 293 | 296 | |
| 294 | 297 | #define CPU_STARTUP(_ci)	((_ci)->ci_func->start(_ci)) |
| 295 | 298 | #define CPU_STOP(_ci)		((_ci)->ci_func->stop(_ci)) |
| ... | ... | @@ -431,6 +434,7 @@ extern void (*cpu_suspend_cycle_fcn)(void); |
| 431 | 434 | #define	cpu_idle_leave()	do { /* nothing */ } while (0) |
| 432 | 435 | extern void (*initclock_func)(void); |
| 433 | 436 | extern void (*startclock_func)(void); |
| 437 | extern int hibernate_delay; | |
| 434 | 438 | |
| 435 | 439 | struct region_descriptor; |
| 436 | 440 | void	lgdt(struct region_descriptor *); |
| ... | ... | @@ -444,6 +448,9 @@ void	startclocks(void); |
| 444 | 448 | void	rtcinit(void); |
| 445 | 449 | void	rtcstart(void); |
| 446 | 450 | void	rtcstop(void); |
| 451 | int	rtcalarm_suspend(struct timeval *tv); | |
| 452 | void	rtcalarm_resume(void); | |
| 453 | int	rtcalarm_fired(void); | |
| 447 | 454 | void	i8254_delay(int); |
| 448 | 455 | void	i8254_initclocks(void); |
| 449 | 456 | void	i8254_startclock(void); |
| ... | ... | @@ -496,13 +503,15 @@ void mp_setperf_init(void); |
| 496 | 503 | #define CPU_CPUFEATURE		8	/* cpuid features */ |
| 497 | 504 | #define CPU_KBDRESET		10	/* keyboard reset under pcvt */ |
| 498 | 505 | #define CPU_XCRYPT		12	/* supports VIA xcrypt in userland */ |
| 506 | #define CPU_HIBERNATEDELAY	13	/* hibernate delay after suspend */ | |
| 499 | 507 | #define CPU_LIDACTION		14	/* action caused by lid close */ |
| 500 | 508 | #define CPU_FORCEUKBD		15	/* Force ukbd(4) as console keyboard */ |
| 501 | 509 | #define CPU_TSCFREQ		16	/* TSC frequency */ |
| 502 | 510 | #define CPU_INVARIANTTSC	17	/* has invariant TSC */ |
| 503 | 511 | #define CPU_PWRACTION		18	/* action caused by power button */ |
| 504 | 512 | #define CPU_RETPOLINE		19	/* cpu requires retpoline pattern */ |
| 505 | #define CPU_MAXID		20	/* number of valid machdep ids */ | |
| 513 | #define CPU_VMMODE		20	/* virtualization mode */ | |
| 514 | #define CPU_MAXID		21	/* number of valid machdep ids */ | |
| 506 | 515 | |
| 507 | 516 | #define	CTL_MACHDEP_NAMES { \ |
| 508 | 517 | 	{ 0, 0 }, \ |
| ... | ... | @@ -518,13 +527,14 @@ void mp_setperf_init(void); |
| 518 | 527 | 	{ "kbdreset", CTLTYPE_INT }, \ |
| 519 | 528 | 	{ 0, 0 }, \ |
| 520 | 529 | 	{ "xcrypt", CTLTYPE_INT }, \ |
| 521 | 	{ 0, 0 }, \ | |
| 530 | 	{ "hibernatedelay", CTLTYPE_INT }, \ | |
| 522 | 531 | 	{ "lidaction", CTLTYPE_INT }, \ |
| 523 | 532 | 	{ "forceukbd", CTLTYPE_INT }, \ |
| 524 | 533 | 	{ "tscfreq", CTLTYPE_QUAD }, \ |
| 525 | 534 | 	{ "invarianttsc", CTLTYPE_INT }, \ |
| 526 | 535 | 	{ "pwraction", CTLTYPE_INT }, \ |
| 527 | 536 | 	{ "retpoline", CTLTYPE_INT }, \ |
| 537 | 	{ "vmmode", CTLTYPE_STRING }, \ | |
| 528 | 538 | } |
| 529 | 539 | |
| 530 | 540 | #endif /* !_MACHINE_CPU_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/amd64/cpufunc.h+2-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.45 2025/06/27 17:23:49 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.47 2025/12/30 03:19:15 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -249,7 +249,7 @@ rdmsr(u_int msr) |
| 249 | 249 | 	return (((uint64_t)hi << 32) | (uint64_t) lo); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | static __inline int | |
| 252 | static __inline uint32_t | |
| 253 | 253 | rdpkru(u_int ecx) |
| 254 | 254 | { |
| 255 | 255 | 	uint32_t edx, pkru; |
| ... | ... | @@ -304,7 +304,6 @@ wbinvd(void) |
| 304 | 304 | |
| 305 | 305 | #ifdef MULTIPROCESSOR |
| 306 | 306 | int wbinvd_on_all_cpus(void); |
| 307 | void wbinvd_on_all_cpus_acked(void); | |
| 308 | 307 | #else |
| 309 | 308 | static inline int |
| 310 | 309 | wbinvd_on_all_cpus(void) |
lib/libc/include/x86_64-openbsd-none/amd64/ghcb.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ghcb.h,v 1.6 2025/09/17 18:37:44 sf Exp $	*/ | |
| 1 | /*	$OpenBSD: ghcb.h,v 1.7 2026/02/16 15:06:03 hshoexer Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2024, 2025 Hans-Joerg Hoexer <hshoexer@genua.de> |
| ... | ... | @@ -128,6 +128,7 @@ int	ghcb_valbm_set(uint8_t *, int); |
| 128 | 128 | int	ghcb_valbm_isset(uint8_t *, int); |
| 129 | 129 | int	ghcb_verify_bm(uint8_t *, uint8_t *); |
| 130 | 130 | int	ghcb_valid(struct ghcb_sa *); |
| 131 | int	ghcb_empty(struct ghcb_sa *); | |
| 131 | 132 | |
| 132 | 133 | void	ghcb_sync_val(int, int, struct ghcb_sync *); |
| 133 | 134 | void	ghcb_sync_out(struct trapframe *, const struct ghcb_extra_regs *, |
lib/libc/include/x86_64-openbsd-none/amd64/i82489var.h+2-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: i82489var.h,v 1.21 2024/11/07 17:24:42 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: i82489var.h,v 1.22 2025/11/12 09:48:52 hshoexer Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: i82489var.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -72,8 +72,7 @@ extern void Xresume_lapic_ipi(void); |
| 72 | 72 | #define LAPIC_IPI_INVLTLB			(LAPIC_IPI_OFFSET + 0) |
| 73 | 73 | #define LAPIC_IPI_INVLPG			(LAPIC_IPI_OFFSET + 1) |
| 74 | 74 | #define LAPIC_IPI_INVLRANGE			(LAPIC_IPI_OFFSET + 2) |
| 75 | #define LAPIC_IPI_WBINVD			(LAPIC_IPI_OFFSET + 3) | |
| 76 | #define LAPIC_IPI_INVEPT			(LAPIC_IPI_OFFSET + 4) | |
| 75 | #define LAPIC_IPI_INVEPT			(LAPIC_IPI_OFFSET + 3) | |
| 77 | 76 | |
| 78 | 77 | extern void Xipi_invltlb(void); |
| 79 | 78 | extern void Xipi_invltlb_pcid(void); |
| ... | ... | @@ -81,7 +80,6 @@ extern void Xipi_invlpg(void); |
| 81 | 80 | extern void Xipi_invlpg_pcid(void); |
| 82 | 81 | extern void Xipi_invlrange(void); |
| 83 | 82 | extern void Xipi_invlrange_pcid(void); |
| 84 | extern void Xipi_wbinvd(void); | |
| 85 | 83 | #if NVMM > 0 |
| 86 | 84 | extern void Xipi_invept(void); |
| 87 | 85 | #endif /* NVMM > 0 */ |
lib/libc/include/x86_64-openbsd-none/amd64/i8259.h+1-53| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: i8259.h,v 1.4 2015/09/02 13:39:23 mikeb Exp $	*/ | |
| 1 | /*	$OpenBSD: i8259.h,v 1.5 2026/01/15 15:43:45 sf Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: i8259.h,v 1.3 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -63,82 +63,30 @@ extern void i8259_default_setup(void); |
| 63 | 63 | #define	ICU_LEN		16		/* 32-47 are ISA interrupts */ |
| 64 | 64 | |
| 65 | 65 | |
| 66 | #define ICU_HARDWARE_MASK | |
| 67 | ||
| 68 | /* | |
| 69 | * These macros are fairly self explanatory. If ICU_SPECIAL_MASK_MODE is | |
| 70 | * defined, we try to take advantage of the ICU's `special mask mode' by only | |
| 71 | * EOIing the interrupts on return. This avoids the requirement of masking and | |
| 72 | * unmasking. We can't do this without special mask mode, because the ICU | |
| 73 | * would also hold interrupts that it thinks are of lower priority. | |
| 74 | * | |
| 75 | * Many machines do not support special mask mode, so by default we don't try | |
| 76 | * to use it. | |
| 77 | */ | |
| 78 | ||
| 79 | 66 | #define	IRQ_BIT(num)	(1 << ((num) % 8)) |
| 80 | 67 | #define	IRQ_BYTE(num)	((num) >> 3) |
| 81 | 68 | |
| 82 | 69 | #define i8259_late_ack(num) |
| 83 | 70 | |
| 84 | #ifdef ICU_SPECIAL_MASK_MODE | |
| 85 | ||
| 86 | #define	i8259_asm_ack1(num) | |
| 87 | #define	i8259_asm_ack2(num) \ | |
| 88 | 	movb	$(0x60|IRQ_SLAVE),%al	/* specific EOI for IRQ2 */	;\ | |
| 89 | 	outb	%al,$IO_ICU1 | |
| 90 | #define	i8259_asm_mask(num) | |
| 91 | #define	i8259_asm_unmask(num) \ | |
| 92 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ | |
| 93 | 	outb	%al,$ICUADDR | |
| 94 | ||
| 95 | #else /* ICU_SPECIAL_MASK_MODE */ | |
| 96 | ||
| 97 | #ifndef	AUTO_EOI_1 | |
| 98 | 71 | #define	i8259_asm_ack1(num) \ |
| 99 | 72 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ |
| 100 | 73 | 	outb	%al,$IO_ICU1 |
| 101 | #else | |
| 102 | #define	i8259_asm_ack1(num) | |
| 103 | #endif | |
| 104 | 74 | |
| 105 | #ifndef AUTO_EOI_2 | |
| 106 | 75 | #define	i8259_asm_ack2(num) \ |
| 107 | 76 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ |
| 108 | 77 | 	outb	%al,$IO_ICU2		/* do the second ICU first */	;\ |
| 109 | 78 | 	movb	$(0x60|IRQ_SLAVE),%al	/* specific EOI for IRQ2 */	;\ |
| 110 | 79 | 	outb	%al,$IO_ICU1 |
| 111 | #else | |
| 112 | #define	i8259_asm_ack2(num) | |
| 113 | #endif | |
| 114 | ||
| 115 | #ifdef PIC_MASKDELAY | |
| 116 | #define MASKDELAY	pushl %eax ; inb $0x84,%al ; popl %eax | |
| 117 | #else | |
| 118 | #define MASKDELAY | |
| 119 | #endif | |
| 120 | ||
| 121 | #ifdef ICU_HARDWARE_MASK | |
| 122 | 80 | |
| 123 | 81 | #define	i8259_asm_mask(num) \ |
| 124 | 82 | 	movb	CVAROFF(i8259_imen, IRQ_BYTE(num)),%al			;\ |
| 125 | 83 | 	orb	$IRQ_BIT(num),%al					;\ |
| 126 | 84 | 	movb	%al,CVAROFF(i8259_imen, IRQ_BYTE(num))			;\ |
| 127 | 	MASKDELAY							;\ | |
| 128 | 85 | 	outb	%al,$(ICUADDR+1) |
| 129 | 86 | #define	i8259_asm_unmask(num) \ |
| 130 | 87 | 	movb	CVAROFF(i8259_imen, IRQ_BYTE(num)),%al			;\ |
| 131 | 88 | 	andb	$~IRQ_BIT(num),%al					;\ |
| 132 | 89 | 	movb	%al,CVAROFF(i8259_imen, IRQ_BYTE(num))			;\ |
| 133 | 	MASKDELAY							;\ | |
| 134 | 90 | 	outb	%al,$(ICUADDR+1) |
| 135 | 91 | |
| 136 | #else /* ICU_HARDWARE_MASK */ | |
| 137 | ||
| 138 | #define	i8259_asm_mask(num) | |
| 139 | #define	i8259_asm_unmask(num) | |
| 140 | ||
| 141 | #endif /* ICU_HARDWARE_MASK */ | |
| 142 | #endif /* ICU_SPECIAL_MASK_MODE */ | |
| 143 | ||
| 144 | 92 | #endif /* !_MACHINE_I8259_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/amd64/intr.h+5-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intr.h,v 1.36 2025/06/11 09:57:01 kettenis Exp $	*/ | |
| 1 | /*	$OpenBSD: intr.h,v 1.37 2025/11/10 12:34:52 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -222,7 +222,10 @@ void x86_ipi_handler(void); |
| 222 | 222 | void x86_setperf_ipi(struct cpu_info *); |
| 223 | 223 | |
| 224 | 224 | extern void (*ipifunc[X86_NIPI])(struct cpu_info *); |
| 225 | #endif | |
| 225 | ||
| 226 | #define cpu_xcall_ipi(_ci) x86_send_ipi((_ci), X86_IPI_XCALL) | |
| 227 | void Xxcallintr(void); | |
| 228 | #endif /* MULTIPROCESSOR */ | |
| 226 | 229 | |
| 227 | 230 | #endif /* !_LOCORE */ |
| 228 | 231 |
lib/libc/include/x86_64-openbsd-none/amd64/intrdefs.h+9-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intrdefs.h,v 1.24 2024/05/26 13:37:31 kettenis Exp $	*/ | |
| 1 | /*	$OpenBSD: intrdefs.h,v 1.25 2025/11/10 12:34:52 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | #ifndef _AMD64_INTRDEFS_H |
| ... | ... | @@ -52,12 +52,13 @@ |
| 52 | 52 | #define LIR_TIMER	62 |
| 53 | 53 | |
| 54 | 54 | /* Soft interrupt masks. */ |
| 55 | #define	SIR_CLOCK	61 | |
| 56 | #define	SIR_NET		60 | |
| 57 | #define	SIR_TTY		59 | |
| 55 | #define	SIR_XCALL	61 | |
| 56 | #define	SIR_CLOCK	60 | |
| 57 | #define	SIR_NET		59 | |
| 58 | #define	SIR_TTY		58 | |
| 58 | 59 | |
| 59 | #define	LIR_XEN		58 | |
| 60 | #define	LIR_HYPERV	57 | |
| 60 | #define	LIR_XEN		57 | |
| 61 | #define	LIR_HYPERV	56 | |
| 61 | 62 | |
| 62 | 63 | /* |
| 63 | 64 | * Maximum # of interrupt sources per CPU. 64 to fit in one word. |
| ... | ... | @@ -85,8 +86,9 @@ |
| 85 | 86 | #define X86_IPI_START_VMM		0x00000100 |
| 86 | 87 | #define X86_IPI_STOP_VMM		0x00000200 |
| 87 | 88 | #define X86_IPI_WBINVD			0x00000400 |
| 89 | #define X86_IPI_XCALL			0x00000800 | |
| 88 | 90 | |
| 89 | #define X86_NIPI			12 | |
| 91 | #define X86_NIPI			13 | |
| 90 | 92 | |
| 91 | 93 | #define IREENT_MAGIC	0x18041969 |
| 92 | 94 |
lib/libc/include/x86_64-openbsd-none/amd64/kexec.h created+48| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | /*	$OpenBSD: kexec.h,v 1.1 2025/11/12 11:34:36 hshoexer Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2019-2020 Visa Hankala | |
| 5 | * Copyright (c) 2025 Hans-Joerg Hoexer <hshoexer@yerbouti.franken.de> | |
| 6 | * | |
| 7 | * Permission to use, copy, modify, and/or distribute this software for any | |
| 8 | * purpose with or without fee is hereby granted, provided that the above | |
| 9 | * copyright notice and this permission notice appear in all copies. | |
| 10 | * | |
| 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 18 | */ | |
| 19 | ||
| 20 | #ifndef _MACHINE_KEXEC_H_ | |
| 21 | #define _MACHINE_KEXEC_H_ | |
| 22 | ||
| 23 | #include <sys/ioccom.h> | |
| 24 | ||
| 25 | #define KEXEC_TRAMPOLINE	(35 * NBPG)	/* @ 140 Kb */ | |
| 26 | #define KEXEC_TRAMP_DATA	(36 * NBPG) | |
| 27 | #define PA_KERN			(16*1024*1024)	/* @ 16 Mb */ | |
| 28 | ||
| 29 | #ifndef _LOCORE | |
| 30 | ||
| 31 | #define KEXEC_MAX_ARGS	8	/* maximum number of boot arguments */ | |
| 32 | ||
| 33 | struct kexec_args { | |
| 34 | 	char		*kimg;		/* kernel image buffer */ | |
| 35 | 	size_t		klen;		/* size of kernel image */ | |
| 36 | 	int		boothowto; | |
| 37 | 	u_char		bootduid[8]; | |
| 38 | }; | |
| 39 | ||
| 40 | #define KIOC_KEXEC		_IOW('K', 1, struct kexec_args) | |
| 41 | #define KIOC_GETBOOTDUID	_IOR('K', 2, u_char[8]) | |
| 42 | ||
| 43 | extern unsigned int	kexec_size; | |
| 44 | extern void		kexec_tramp(vaddr_t, vaddr_t, paddr_t, size_t, vaddr_t); | |
| 45 | ||
| 46 | #endif	/* !_LOCORE */ | |
| 47 | ||
| 48 | #endif /* _MACHINE_KEXEC_H_ */ | |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/amd64/specialreg.h+4-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: specialreg.h,v 1.120 2025/07/16 07:15:41 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: specialreg.h,v 1.122 2026/04/19 01:10:28 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $	*/ |
| 3 | 3 | /*	$NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $	*/ |
| 4 | 4 | |
| ... | ... | @@ -699,9 +699,12 @@ |
| 699 | 699 | #define MSR_FSBASE	0xc0000100	/* 64bit offset for fs: */ |
| 700 | 700 | #define MSR_GSBASE	0xc0000101	/* 64bit offset for gs: */ |
| 701 | 701 | #define MSR_KERNELGSBASE 0xc0000102	/* storage for swapgs ins */ |
| 702 | #define MSR_SYS_CFG	0xc0010010	/* System Configuration */ | |
| 702 | 703 | #define MSR_PATCH_LOADER	0xc0010020 |
| 703 | 704 | #define MSR_INT_PEN_MSG	0xc0010055	/* Interrupt pending message */ |
| 704 | 705 | |
| 706 | #define MSR_FP_CFG	0xc0011028	/* Floating Point Configuration */ | |
| 707 | #define FP_CFG_9	(1 << 9)	/* FP-DSS chickenbit */ | |
| 705 | 708 | #define MSR_DE_CFG	0xc0011029	/* Decode Configuration */ |
| 706 | 709 | #define	DE_CFG_721	0x00000001	/* errata 721 */ |
| 707 | 710 | #define DE_CFG_SERIALIZE_LFENCE	(1 << 1)	/* Enable serializing lfence */ |
lib/libc/include/x86_64-openbsd-none/machine/conf.h+11-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: conf.h,v 1.11 2024/09/04 07:45:08 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: conf.h,v 1.12 2025/11/12 11:34:36 hshoexer Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /* |
| ... | ... | @@ -56,4 +56,13 @@ cdev_decl(pctr); |
| 56 | 56 | cdev_decl(vmm); |
| 57 | 57 | |
| 58 | 58 | #include "psp.h" |
| 59 | cdev_decl(psp); | |
| \ No newline at end of file | ||
| 59 | cdev_decl(psp); | |
| 60 | ||
| 61 | #include "kexec.h" | |
| 62 | #define cdev_kexec_init(c,n) { \ | |
| 63 | 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ | |
| 64 | 	(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ | |
| 65 | 	(dev_type_stop((*))) nullop, 0, \ | |
| 66 | 	(dev_type_mmap((*))) enodev } | |
| 67 | ||
| 68 | cdev_decl(kexec); | |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/machine/cpu.h+14-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpu.h,v 1.180 2025/04/28 16:18:25 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: cpu.h,v 1.185 2026/03/31 16:46:22 deraadt Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -53,6 +53,7 @@ |
| 53 | 53 | #include <sys/sched.h> |
| 54 | 54 | #include <sys/sensors.h> |
| 55 | 55 | #include <sys/srp.h> |
| 56 | #include <sys/xcall.h> | |
| 56 | 57 | #include <uvm/uvm_percpu.h> |
| 57 | 58 | |
| 58 | 59 | #ifdef _KERNEL |
| ... | ... | @@ -187,6 +188,7 @@ struct cpu_info { |
| 187 | 188 | 	int		ci_inatomic;		/* [o] */ |
| 188 | 189 | |
| 189 | 190 | #define __HAVE_CPU_TOPOLOGY |
| 191 | 	u_int32_t	ci_cputype;		/* [I] */ | |
| 190 | 192 | 	u_int32_t	ci_smt_id;		/* [I] */ |
| 191 | 193 | 	u_int32_t	ci_core_id;		/* [I] */ |
| 192 | 194 | 	u_int32_t	ci_pkg_id;		/* [I] */ |
| ... | ... | @@ -215,6 +217,7 @@ struct cpu_info { |
| 215 | 217 | |
| 216 | 218 | #ifdef MULTIPROCESSOR |
| 217 | 219 | 	struct srp_hazard	ci_srp_hazards[SRP_HAZARD_NUM]; |
| 220 | 	struct xcall_cpu	ci_xcall; | |
| 218 | 221 | #define __HAVE_UVM_PERCPU |
| 219 | 222 | 	struct uvm_pmr_cache	ci_uvm;		/* [o] page cache */ |
| 220 | 223 | #endif |
| ... | ... | @@ -289,7 +292,7 @@ extern void need_resched(struct cpu_info *); |
| 289 | 292 | |
| 290 | 293 | #if defined(MULTIPROCESSOR) |
| 291 | 294 | |
| 292 | #define MAXCPUS		64	/* bitmask */ | |
| 295 | #define MAXCPUS		255 | |
| 293 | 296 | |
| 294 | 297 | #define CPU_STARTUP(_ci)	((_ci)->ci_func->start(_ci)) |
| 295 | 298 | #define CPU_STOP(_ci)		((_ci)->ci_func->stop(_ci)) |
| ... | ... | @@ -431,6 +434,7 @@ extern void (*cpu_suspend_cycle_fcn)(void); |
| 431 | 434 | #define	cpu_idle_leave()	do { /* nothing */ } while (0) |
| 432 | 435 | extern void (*initclock_func)(void); |
| 433 | 436 | extern void (*startclock_func)(void); |
| 437 | extern int hibernate_delay; | |
| 434 | 438 | |
| 435 | 439 | struct region_descriptor; |
| 436 | 440 | void	lgdt(struct region_descriptor *); |
| ... | ... | @@ -444,6 +448,9 @@ void	startclocks(void); |
| 444 | 448 | void	rtcinit(void); |
| 445 | 449 | void	rtcstart(void); |
| 446 | 450 | void	rtcstop(void); |
| 451 | int	rtcalarm_suspend(struct timeval *tv); | |
| 452 | void	rtcalarm_resume(void); | |
| 453 | int	rtcalarm_fired(void); | |
| 447 | 454 | void	i8254_delay(int); |
| 448 | 455 | void	i8254_initclocks(void); |
| 449 | 456 | void	i8254_startclock(void); |
| ... | ... | @@ -496,13 +503,15 @@ void mp_setperf_init(void); |
| 496 | 503 | #define CPU_CPUFEATURE		8	/* cpuid features */ |
| 497 | 504 | #define CPU_KBDRESET		10	/* keyboard reset under pcvt */ |
| 498 | 505 | #define CPU_XCRYPT		12	/* supports VIA xcrypt in userland */ |
| 506 | #define CPU_HIBERNATEDELAY	13	/* hibernate delay after suspend */ | |
| 499 | 507 | #define CPU_LIDACTION		14	/* action caused by lid close */ |
| 500 | 508 | #define CPU_FORCEUKBD		15	/* Force ukbd(4) as console keyboard */ |
| 501 | 509 | #define CPU_TSCFREQ		16	/* TSC frequency */ |
| 502 | 510 | #define CPU_INVARIANTTSC	17	/* has invariant TSC */ |
| 503 | 511 | #define CPU_PWRACTION		18	/* action caused by power button */ |
| 504 | 512 | #define CPU_RETPOLINE		19	/* cpu requires retpoline pattern */ |
| 505 | #define CPU_MAXID		20	/* number of valid machdep ids */ | |
| 513 | #define CPU_VMMODE		20	/* virtualization mode */ | |
| 514 | #define CPU_MAXID		21	/* number of valid machdep ids */ | |
| 506 | 515 | |
| 507 | 516 | #define	CTL_MACHDEP_NAMES { \ |
| 508 | 517 | 	{ 0, 0 }, \ |
| ... | ... | @@ -518,13 +527,14 @@ void mp_setperf_init(void); |
| 518 | 527 | 	{ "kbdreset", CTLTYPE_INT }, \ |
| 519 | 528 | 	{ 0, 0 }, \ |
| 520 | 529 | 	{ "xcrypt", CTLTYPE_INT }, \ |
| 521 | 	{ 0, 0 }, \ | |
| 530 | 	{ "hibernatedelay", CTLTYPE_INT }, \ | |
| 522 | 531 | 	{ "lidaction", CTLTYPE_INT }, \ |
| 523 | 532 | 	{ "forceukbd", CTLTYPE_INT }, \ |
| 524 | 533 | 	{ "tscfreq", CTLTYPE_QUAD }, \ |
| 525 | 534 | 	{ "invarianttsc", CTLTYPE_INT }, \ |
| 526 | 535 | 	{ "pwraction", CTLTYPE_INT }, \ |
| 527 | 536 | 	{ "retpoline", CTLTYPE_INT }, \ |
| 537 | 	{ "vmmode", CTLTYPE_STRING }, \ | |
| 528 | 538 | } |
| 529 | 539 | |
| 530 | 540 | #endif /* !_MACHINE_CPU_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/machine/cpufunc.h+2-3| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.45 2025/06/27 17:23:49 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: cpufunc.h,v 1.47 2025/12/30 03:19:15 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -249,7 +249,7 @@ rdmsr(u_int msr) |
| 249 | 249 | 	return (((uint64_t)hi << 32) | (uint64_t) lo); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | static __inline int | |
| 252 | static __inline uint32_t | |
| 253 | 253 | rdpkru(u_int ecx) |
| 254 | 254 | { |
| 255 | 255 | 	uint32_t edx, pkru; |
| ... | ... | @@ -304,7 +304,6 @@ wbinvd(void) |
| 304 | 304 | |
| 305 | 305 | #ifdef MULTIPROCESSOR |
| 306 | 306 | int wbinvd_on_all_cpus(void); |
| 307 | void wbinvd_on_all_cpus_acked(void); | |
| 308 | 307 | #else |
| 309 | 308 | static inline int |
| 310 | 309 | wbinvd_on_all_cpus(void) |
lib/libc/include/x86_64-openbsd-none/machine/ghcb.h+2-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: ghcb.h,v 1.6 2025/09/17 18:37:44 sf Exp $	*/ | |
| 1 | /*	$OpenBSD: ghcb.h,v 1.7 2026/02/16 15:06:03 hshoexer Exp $	*/ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Copyright (c) 2024, 2025 Hans-Joerg Hoexer <hshoexer@genua.de> |
| ... | ... | @@ -128,6 +128,7 @@ int	ghcb_valbm_set(uint8_t *, int); |
| 128 | 128 | int	ghcb_valbm_isset(uint8_t *, int); |
| 129 | 129 | int	ghcb_verify_bm(uint8_t *, uint8_t *); |
| 130 | 130 | int	ghcb_valid(struct ghcb_sa *); |
| 131 | int	ghcb_empty(struct ghcb_sa *); | |
| 131 | 132 | |
| 132 | 133 | void	ghcb_sync_val(int, int, struct ghcb_sync *); |
| 133 | 134 | void	ghcb_sync_out(struct trapframe *, const struct ghcb_extra_regs *, |
lib/libc/include/x86_64-openbsd-none/machine/i82489var.h+2-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: i82489var.h,v 1.21 2024/11/07 17:24:42 bluhm Exp $	*/ | |
| 1 | /*	$OpenBSD: i82489var.h,v 1.22 2025/11/12 09:48:52 hshoexer Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: i82489var.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -72,8 +72,7 @@ extern void Xresume_lapic_ipi(void); |
| 72 | 72 | #define LAPIC_IPI_INVLTLB			(LAPIC_IPI_OFFSET + 0) |
| 73 | 73 | #define LAPIC_IPI_INVLPG			(LAPIC_IPI_OFFSET + 1) |
| 74 | 74 | #define LAPIC_IPI_INVLRANGE			(LAPIC_IPI_OFFSET + 2) |
| 75 | #define LAPIC_IPI_WBINVD			(LAPIC_IPI_OFFSET + 3) | |
| 76 | #define LAPIC_IPI_INVEPT			(LAPIC_IPI_OFFSET + 4) | |
| 75 | #define LAPIC_IPI_INVEPT			(LAPIC_IPI_OFFSET + 3) | |
| 77 | 76 | |
| 78 | 77 | extern void Xipi_invltlb(void); |
| 79 | 78 | extern void Xipi_invltlb_pcid(void); |
| ... | ... | @@ -81,7 +80,6 @@ extern void Xipi_invlpg(void); |
| 81 | 80 | extern void Xipi_invlpg_pcid(void); |
| 82 | 81 | extern void Xipi_invlrange(void); |
| 83 | 82 | extern void Xipi_invlrange_pcid(void); |
| 84 | extern void Xipi_wbinvd(void); | |
| 85 | 83 | #if NVMM > 0 |
| 86 | 84 | extern void Xipi_invept(void); |
| 87 | 85 | #endif /* NVMM > 0 */ |
lib/libc/include/x86_64-openbsd-none/machine/i8259.h+1-53| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: i8259.h,v 1.4 2015/09/02 13:39:23 mikeb Exp $	*/ | |
| 1 | /*	$OpenBSD: i8259.h,v 1.5 2026/01/15 15:43:45 sf Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: i8259.h,v 1.3 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -63,82 +63,30 @@ extern void i8259_default_setup(void); |
| 63 | 63 | #define	ICU_LEN		16		/* 32-47 are ISA interrupts */ |
| 64 | 64 | |
| 65 | 65 | |
| 66 | #define ICU_HARDWARE_MASK | |
| 67 | ||
| 68 | /* | |
| 69 | * These macros are fairly self explanatory. If ICU_SPECIAL_MASK_MODE is | |
| 70 | * defined, we try to take advantage of the ICU's `special mask mode' by only | |
| 71 | * EOIing the interrupts on return. This avoids the requirement of masking and | |
| 72 | * unmasking. We can't do this without special mask mode, because the ICU | |
| 73 | * would also hold interrupts that it thinks are of lower priority. | |
| 74 | * | |
| 75 | * Many machines do not support special mask mode, so by default we don't try | |
| 76 | * to use it. | |
| 77 | */ | |
| 78 | ||
| 79 | 66 | #define	IRQ_BIT(num)	(1 << ((num) % 8)) |
| 80 | 67 | #define	IRQ_BYTE(num)	((num) >> 3) |
| 81 | 68 | |
| 82 | 69 | #define i8259_late_ack(num) |
| 83 | 70 | |
| 84 | #ifdef ICU_SPECIAL_MASK_MODE | |
| 85 | ||
| 86 | #define	i8259_asm_ack1(num) | |
| 87 | #define	i8259_asm_ack2(num) \ | |
| 88 | 	movb	$(0x60|IRQ_SLAVE),%al	/* specific EOI for IRQ2 */	;\ | |
| 89 | 	outb	%al,$IO_ICU1 | |
| 90 | #define	i8259_asm_mask(num) | |
| 91 | #define	i8259_asm_unmask(num) \ | |
| 92 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ | |
| 93 | 	outb	%al,$ICUADDR | |
| 94 | ||
| 95 | #else /* ICU_SPECIAL_MASK_MODE */ | |
| 96 | ||
| 97 | #ifndef	AUTO_EOI_1 | |
| 98 | 71 | #define	i8259_asm_ack1(num) \ |
| 99 | 72 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ |
| 100 | 73 | 	outb	%al,$IO_ICU1 |
| 101 | #else | |
| 102 | #define	i8259_asm_ack1(num) | |
| 103 | #endif | |
| 104 | 74 | |
| 105 | #ifndef AUTO_EOI_2 | |
| 106 | 75 | #define	i8259_asm_ack2(num) \ |
| 107 | 76 | 	movb	$(0x60|(num%8)),%al	/* specific EOI */		;\ |
| 108 | 77 | 	outb	%al,$IO_ICU2		/* do the second ICU first */	;\ |
| 109 | 78 | 	movb	$(0x60|IRQ_SLAVE),%al	/* specific EOI for IRQ2 */	;\ |
| 110 | 79 | 	outb	%al,$IO_ICU1 |
| 111 | #else | |
| 112 | #define	i8259_asm_ack2(num) | |
| 113 | #endif | |
| 114 | ||
| 115 | #ifdef PIC_MASKDELAY | |
| 116 | #define MASKDELAY	pushl %eax ; inb $0x84,%al ; popl %eax | |
| 117 | #else | |
| 118 | #define MASKDELAY | |
| 119 | #endif | |
| 120 | ||
| 121 | #ifdef ICU_HARDWARE_MASK | |
| 122 | 80 | |
| 123 | 81 | #define	i8259_asm_mask(num) \ |
| 124 | 82 | 	movb	CVAROFF(i8259_imen, IRQ_BYTE(num)),%al			;\ |
| 125 | 83 | 	orb	$IRQ_BIT(num),%al					;\ |
| 126 | 84 | 	movb	%al,CVAROFF(i8259_imen, IRQ_BYTE(num))			;\ |
| 127 | 	MASKDELAY							;\ | |
| 128 | 85 | 	outb	%al,$(ICUADDR+1) |
| 129 | 86 | #define	i8259_asm_unmask(num) \ |
| 130 | 87 | 	movb	CVAROFF(i8259_imen, IRQ_BYTE(num)),%al			;\ |
| 131 | 88 | 	andb	$~IRQ_BIT(num),%al					;\ |
| 132 | 89 | 	movb	%al,CVAROFF(i8259_imen, IRQ_BYTE(num))			;\ |
| 133 | 	MASKDELAY							;\ | |
| 134 | 90 | 	outb	%al,$(ICUADDR+1) |
| 135 | 91 | |
| 136 | #else /* ICU_HARDWARE_MASK */ | |
| 137 | ||
| 138 | #define	i8259_asm_mask(num) | |
| 139 | #define	i8259_asm_unmask(num) | |
| 140 | ||
| 141 | #endif /* ICU_HARDWARE_MASK */ | |
| 142 | #endif /* ICU_SPECIAL_MASK_MODE */ | |
| 143 | ||
| 144 | 92 | #endif /* !_MACHINE_I8259_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/machine/intr.h+5-2| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intr.h,v 1.36 2025/06/11 09:57:01 kettenis Exp $	*/ | |
| 1 | /*	$OpenBSD: intr.h,v 1.37 2025/11/10 12:34:52 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | /*- |
| ... | ... | @@ -222,7 +222,10 @@ void x86_ipi_handler(void); |
| 222 | 222 | void x86_setperf_ipi(struct cpu_info *); |
| 223 | 223 | |
| 224 | 224 | extern void (*ipifunc[X86_NIPI])(struct cpu_info *); |
| 225 | #endif | |
| 225 | ||
| 226 | #define cpu_xcall_ipi(_ci) x86_send_ipi((_ci), X86_IPI_XCALL) | |
| 227 | void Xxcallintr(void); | |
| 228 | #endif /* MULTIPROCESSOR */ | |
| 226 | 229 | |
| 227 | 230 | #endif /* !_LOCORE */ |
| 228 | 231 |
lib/libc/include/x86_64-openbsd-none/machine/intrdefs.h+9-7| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: intrdefs.h,v 1.24 2024/05/26 13:37:31 kettenis Exp $	*/ | |
| 1 | /*	$OpenBSD: intrdefs.h,v 1.25 2025/11/10 12:34:52 dlg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $	*/ |
| 3 | 3 | |
| 4 | 4 | #ifndef _AMD64_INTRDEFS_H |
| ... | ... | @@ -52,12 +52,13 @@ |
| 52 | 52 | #define LIR_TIMER	62 |
| 53 | 53 | |
| 54 | 54 | /* Soft interrupt masks. */ |
| 55 | #define	SIR_CLOCK	61 | |
| 56 | #define	SIR_NET		60 | |
| 57 | #define	SIR_TTY		59 | |
| 55 | #define	SIR_XCALL	61 | |
| 56 | #define	SIR_CLOCK	60 | |
| 57 | #define	SIR_NET		59 | |
| 58 | #define	SIR_TTY		58 | |
| 58 | 59 | |
| 59 | #define	LIR_XEN		58 | |
| 60 | #define	LIR_HYPERV	57 | |
| 60 | #define	LIR_XEN		57 | |
| 61 | #define	LIR_HYPERV	56 | |
| 61 | 62 | |
| 62 | 63 | /* |
| 63 | 64 | * Maximum # of interrupt sources per CPU. 64 to fit in one word. |
| ... | ... | @@ -85,8 +86,9 @@ |
| 85 | 86 | #define X86_IPI_START_VMM		0x00000100 |
| 86 | 87 | #define X86_IPI_STOP_VMM		0x00000200 |
| 87 | 88 | #define X86_IPI_WBINVD			0x00000400 |
| 89 | #define X86_IPI_XCALL			0x00000800 | |
| 88 | 90 | |
| 89 | #define X86_NIPI			12 | |
| 91 | #define X86_NIPI			13 | |
| 90 | 92 | |
| 91 | 93 | #define IREENT_MAGIC	0x18041969 |
| 92 | 94 |
lib/libc/include/x86_64-openbsd-none/machine/kexec.h created+48| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | /*	$OpenBSD: kexec.h,v 1.1 2025/11/12 11:34:36 hshoexer Exp $	*/ | |
| 2 | ||
| 3 | /* | |
| 4 | * Copyright (c) 2019-2020 Visa Hankala | |
| 5 | * Copyright (c) 2025 Hans-Joerg Hoexer <hshoexer@yerbouti.franken.de> | |
| 6 | * | |
| 7 | * Permission to use, copy, modify, and/or distribute this software for any | |
| 8 | * purpose with or without fee is hereby granted, provided that the above | |
| 9 | * copyright notice and this permission notice appear in all copies. | |
| 10 | * | |
| 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| 17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 18 | */ | |
| 19 | ||
| 20 | #ifndef _MACHINE_KEXEC_H_ | |
| 21 | #define _MACHINE_KEXEC_H_ | |
| 22 | ||
| 23 | #include <sys/ioccom.h> | |
| 24 | ||
| 25 | #define KEXEC_TRAMPOLINE	(35 * NBPG)	/* @ 140 Kb */ | |
| 26 | #define KEXEC_TRAMP_DATA	(36 * NBPG) | |
| 27 | #define PA_KERN			(16*1024*1024)	/* @ 16 Mb */ | |
| 28 | ||
| 29 | #ifndef _LOCORE | |
| 30 | ||
| 31 | #define KEXEC_MAX_ARGS	8	/* maximum number of boot arguments */ | |
| 32 | ||
| 33 | struct kexec_args { | |
| 34 | 	char		*kimg;		/* kernel image buffer */ | |
| 35 | 	size_t		klen;		/* size of kernel image */ | |
| 36 | 	int		boothowto; | |
| 37 | 	u_char		bootduid[8]; | |
| 38 | }; | |
| 39 | ||
| 40 | #define KIOC_KEXEC		_IOW('K', 1, struct kexec_args) | |
| 41 | #define KIOC_GETBOOTDUID	_IOR('K', 2, u_char[8]) | |
| 42 | ||
| 43 | extern unsigned int	kexec_size; | |
| 44 | extern void		kexec_tramp(vaddr_t, vaddr_t, paddr_t, size_t, vaddr_t); | |
| 45 | ||
| 46 | #endif	/* !_LOCORE */ | |
| 47 | ||
| 48 | #endif /* _MACHINE_KEXEC_H_ */ | |
| \ No newline at end of file |
lib/libc/include/x86_64-openbsd-none/machine/specialreg.h+4-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | /*	$OpenBSD: specialreg.h,v 1.120 2025/07/16 07:15:41 jsg Exp $	*/ | |
| 1 | /*	$OpenBSD: specialreg.h,v 1.122 2026/04/19 01:10:28 jsg Exp $	*/ | |
| 2 | 2 | /*	$NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $	*/ |
| 3 | 3 | /*	$NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $	*/ |
| 4 | 4 | |
| ... | ... | @@ -699,9 +699,12 @@ |
| 699 | 699 | #define MSR_FSBASE	0xc0000100	/* 64bit offset for fs: */ |
| 700 | 700 | #define MSR_GSBASE	0xc0000101	/* 64bit offset for gs: */ |
| 701 | 701 | #define MSR_KERNELGSBASE 0xc0000102	/* storage for swapgs ins */ |
| 702 | #define MSR_SYS_CFG	0xc0010010	/* System Configuration */ | |
| 702 | 703 | #define MSR_PATCH_LOADER	0xc0010020 |
| 703 | 704 | #define MSR_INT_PEN_MSG	0xc0010055	/* Interrupt pending message */ |
| 704 | 705 | |
| 706 | #define MSR_FP_CFG	0xc0011028	/* Floating Point Configuration */ | |
| 707 | #define FP_CFG_9	(1 << 9)	/* FP-DSS chickenbit */ | |
| 705 | 708 | #define MSR_DE_CFG	0xc0011029	/* Decode Configuration */ |
| 706 | 709 | #define	DE_CFG_721	0x00000001	/* errata 721 */ |
| 707 | 710 | #define DE_CFG_SERIALIZE_LFENCE	(1 << 1)	/* Enable serializing lfence */ |
lib/libc/openbsd/abilists| Binary files a/lib/libc/openbsd/abilists and b/lib/libc/openbsd/abilists differ |
lib/std/Target.zig+1-1| ... | ... | @@ -552,7 +552,7 @@ pub const Os = struct { |
| 552 | 552 | |
| 553 | 553 | break :blk default_min; |
| 554 | 554 | }, |
| 555 | .max = .{ .major = 7, .minor = 8, .patch = 0 }, | |
| 555 | .max = .{ .major = 7, .minor = 9, .patch = 0 }, | |
| 556 | 556 | }, |
| 557 | 557 | }, |
| 558 | 558 |